|
|
@@ -207,6 +207,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>
|
|
|
@@ -339,6 +346,41 @@
|
|
|
</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 +422,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'
|
|
|
@@ -416,6 +460,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,
|
|
|
@@ -519,6 +584,63 @@ export default {
|
|
|
this.companyOptions = [];
|
|
|
this.open = false;
|
|
|
},
|
|
|
+ // 协议配置处理
|
|
|
+ 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: "确定",
|