|
|
@@ -152,6 +152,11 @@
|
|
|
<dict-tag :options="typesOptions" :value="scope.row.type"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="授权方式" align="center" prop="authType">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="authTypeOptions" :value="scope.row.authType"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="互医/商城小程序" align="center" prop="isMall" width="80px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag prop="isMall" v-for="(item, index) in isMallOptions" v-if="scope.row.isMall==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
@@ -207,6 +212,13 @@
|
|
|
v-hasPermi="['course:playSourceConfig:unbind']"
|
|
|
v-if="scope.row.merchantConfigId"
|
|
|
>解绑</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-document"
|
|
|
+ @click="handleAgreement(scope.row)"
|
|
|
+ v-hasPermi="['course:playSourceConfig:agreement']"
|
|
|
+ >协议配置</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -302,6 +314,17 @@
|
|
|
<el-form-item label="图标" prop="img">
|
|
|
<image-upload v-model="form.img" :file-type='["png", "jpg", "jpeg"]' :limit="1"/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="授权方式" prop="authType">
|
|
|
+ <el-select
|
|
|
+ v-model="form.authType"
|
|
|
+ placeholder="请选择授权方式">
|
|
|
+ <el-option
|
|
|
+ v-for="item in authTypeOptions"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="类型" prop="type">
|
|
|
<el-select
|
|
|
v-model="form.type"
|
|
|
@@ -334,11 +357,46 @@
|
|
|
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="showOpenPlatformWarning">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!-- 协议配置对话框 -->
|
|
|
+ <el-dialog title="协议配置" :visible.sync="agreementDialogVisible" width="1000px" append-to-body>
|
|
|
+ <el-form ref="agreementForm" :model="agreementForm" :rules="agreementRules" label-width="150px" style="margin-right: 25px">
|
|
|
+ <el-form-item label="医生注册协议" prop="doctorRegister">
|
|
|
+ <editor v-model="agreementForm.doctorRegister" :min-height="200"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="医生多机构备案协议" prop="doctorFiling">
|
|
|
+ <editor v-model="agreementForm.doctorFiling" :min-height="200"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="用户协议" prop="userRegister">
|
|
|
+ <editor v-model="agreementForm.userRegister" :min-height="200"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="隐私协议" prop="userPrivacy">
|
|
|
+ <editor v-model="agreementForm.userPrivacy" :min-height="200"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="健康客服协议" prop="userHealth">
|
|
|
+ <editor v-model="agreementForm.userHealth" :min-height="200"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="会员服务协议" prop="vipService">
|
|
|
+ <editor v-model="agreementForm.vipService" :min-height="200"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="会员自动续费协议" prop="vipAutomaticService">
|
|
|
+ <editor v-model="agreementForm.vipAutomaticService" :min-height="200"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="用户注销协议" prop="userRemoveService">
|
|
|
+ <editor v-model="agreementForm.userRemoveService" :min-height="200"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="agreementDialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitAgreementForm">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+
|
|
|
<!-- 绑定 -->
|
|
|
<el-dialog :title="bindForm.bindTitle" :visible.sync="bindForm.bindShow" width="800px" append-to-body :before-close="handleBindClose">
|
|
|
<el-form ref="bindForm" :model="bindForm" :rules="bindRules" label-width="130px">
|
|
|
@@ -380,7 +438,9 @@ import {
|
|
|
add,
|
|
|
del,
|
|
|
updateBindConfig,
|
|
|
- updateUnbindConfig
|
|
|
+ updateUnbindConfig,
|
|
|
+ updateAgreementConfig,
|
|
|
+ queryAgreementConfig
|
|
|
} from '@/api/course/coursePlaySourceConfig'
|
|
|
import {updateIsTownOn} from "@/api/system/config";
|
|
|
import { allList } from '@/api/company/company'
|
|
|
@@ -393,6 +453,7 @@ export default {
|
|
|
return {
|
|
|
sysPayModes: [],
|
|
|
bindCurrentRow: {},
|
|
|
+ authTypeOptions: [],
|
|
|
bindForm:{
|
|
|
bindTitle: '绑定支付配置',
|
|
|
bindShow: false,
|
|
|
@@ -416,6 +477,27 @@ export default {
|
|
|
appid: null,
|
|
|
status: null
|
|
|
},
|
|
|
+ // 协议配置相关
|
|
|
+ agreementDialogVisible: false,
|
|
|
+ agreementForm: {
|
|
|
+ appId: null,
|
|
|
+ doctorRegister: '',
|
|
|
+ doctorFiling: '',
|
|
|
+ userRegister: '',
|
|
|
+ userPrivacy: '',
|
|
|
+ userHealth: '',
|
|
|
+ vipService: '',
|
|
|
+ vipAutomaticService: '',
|
|
|
+ userRemoveService: ''
|
|
|
+ },
|
|
|
+ agreementRules: {
|
|
|
+ // doctorRegister: [
|
|
|
+ // { required: true, message: "医生注册协议不能为空", trigger: "blur" }
|
|
|
+ // ],
|
|
|
+ // userRegister: [
|
|
|
+ // { required: true, message: "用户协议不能为空", trigger: "blur" }
|
|
|
+ // ]
|
|
|
+ },
|
|
|
showSearch: true,
|
|
|
single: true,
|
|
|
multiple: true,
|
|
|
@@ -451,6 +533,7 @@ export default {
|
|
|
title: null,
|
|
|
open: false,
|
|
|
form: {
|
|
|
+ authType:'1',
|
|
|
setCompanyIdList: []
|
|
|
},
|
|
|
bindRules:{
|
|
|
@@ -496,6 +579,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ this.getDicts("play_config_auth_type").then(response => {
|
|
|
+ this.authTypeOptions = response.data;
|
|
|
+ });
|
|
|
this.getDicts("sys_pay_mode").then(response => {
|
|
|
this.sysPayModes = response.data;
|
|
|
});
|
|
|
@@ -519,6 +605,82 @@ export default {
|
|
|
this.companyOptions = [];
|
|
|
this.open = false;
|
|
|
},
|
|
|
+ showOpenPlatformWarning() {
|
|
|
+ if (this.form.authType=='1'){
|
|
|
+ this.$confirm('必须绑定开放平台,否则会导致看课冲突。是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ // 用户点击确定,执行原有提交逻辑
|
|
|
+ this.submitForm()
|
|
|
+ }).catch(() => {
|
|
|
+ // 用户点击取消,停留在当前弹窗,不执行任何操作
|
|
|
+ // 可以在这里添加一些提示信息
|
|
|
+ console.log('用户取消提交')
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.submitForm()
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ // 协议配置处理
|
|
|
+ handleAgreement(row) {
|
|
|
+ // 获取当前行的协议相关信息
|
|
|
+ queryAgreementConfig({appid:row.appid}).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ // 返回agreementData json串
|
|
|
+ let agreementData = JSON.parse(response.data.agreementData);
|
|
|
+ this.agreementForm = {
|
|
|
+ appId: row.appid,
|
|
|
+ doctorRegister: agreementData.doctorRegister || '',
|
|
|
+ doctorFiling: agreementData.doctorFiling || '',
|
|
|
+ userRegister: agreementData.userRegister || '',
|
|
|
+ userPrivacy: agreementData.userPrivacy || '',
|
|
|
+ userHealth: agreementData.userHealth || '',
|
|
|
+ vipService: agreementData.vipService || '',
|
|
|
+ vipAutomaticService: agreementData.vipAutomaticService || '',
|
|
|
+ userRemoveService: agreementData.userRemoveService || ''
|
|
|
+ };
|
|
|
+
|
|
|
+ this.agreementDialogVisible = true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ // 提交协议配置
|
|
|
+ submitAgreementForm() {
|
|
|
+ this.$refs["agreementForm"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ // 调用API更新协议配置
|
|
|
+ const params = {
|
|
|
+ appId: this.agreementForm.appId,
|
|
|
+ agreementData: JSON.stringify({
|
|
|
+ doctorRegister: this.agreementForm.doctorRegister,
|
|
|
+ doctorFiling: this.agreementForm.doctorFiling,
|
|
|
+ userRegister: this.agreementForm.userRegister,
|
|
|
+ userPrivacy: this.agreementForm.userPrivacy,
|
|
|
+ userHealth: this.agreementForm.userHealth,
|
|
|
+ vipService: this.agreementForm.vipService,
|
|
|
+ vipAutomaticService: this.agreementForm.vipAutomaticService,
|
|
|
+ userRemoveService: this.agreementForm.userRemoveService
|
|
|
+ })
|
|
|
+ };
|
|
|
+ updateAgreementConfig(params).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess("协议配置更新成功");
|
|
|
+ this.agreementDialogVisible = false;
|
|
|
+ this.getList(); // 刷新列表
|
|
|
+ } else {
|
|
|
+ this.msgError("协议配置更新失败:" + response.msg);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ this.msgError("请求失败:" + error.message);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
handleUnbind(row) {
|
|
|
this.$confirm('是否确认解绑该配置?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
@@ -695,7 +857,8 @@ export default {
|
|
|
get(id).then(response => {
|
|
|
this.form = {
|
|
|
...response.data,
|
|
|
- type: response.data.type.toString()
|
|
|
+ type: response.data.type.toString(),
|
|
|
+ authType: response.data.authType ? response.data.authType.toString() : '1'
|
|
|
}
|
|
|
if(!!this.form.setCompanyIds){
|
|
|
this.$set(
|