|
@@ -1,8 +1,33 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
|
|
+ <el-tab-pane label="CID配置" name="cId.config">
|
|
|
|
|
+ <el-form :model="form40" label-width="200px">
|
|
|
|
|
+ <el-form-item label="是否开启手机号配置" prop="enablePhoneConfig">
|
|
|
|
|
+ <el-switch v-model="form40.enablePhoneConfig"></el-switch>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-if="form40.enablePhoneConfig">
|
|
|
|
|
+ <el-form-item label="生成条数" prop="generateCount">
|
|
|
|
|
+ <el-input-number v-model="form40.generateCount" :min="1" :step="1" :precision="0" placeholder="请输入生成条数"></el-input-number>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
|
|
|
|
|
+ <el-form-item label="开始位置" prop="startIndex">
|
|
|
|
|
+ <el-input-number v-model="form40.startIndex" :min="1" :step="1" :precision="0" placeholder="例如: 1"></el-input-number>
|
|
|
|
|
+ <span class="tip-text">(从第几位开始生成)</span>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
|
|
|
|
|
+ <el-form-item label="结束位置" prop="endIndex">
|
|
|
|
|
+ <el-input-number v-model="form40.endIndex" :min="1" :step="1" :precision="0" placeholder="例如: 11"></el-input-number>
|
|
|
|
|
+ <span class="tip-text">(到第几位结束)</span>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="footer">
|
|
|
|
|
+ <el-button type="primary" @click="submitForm40">提 交</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </el-tab-pane>
|
|
|
|
|
|
|
|
<el-tab-pane label="个微配置" name="wx.config">
|
|
<el-tab-pane label="个微配置" name="wx.config">
|
|
|
<el-form :model="form30" label-width="200px">
|
|
<el-form :model="form30" label-width="200px">
|
|
@@ -2733,6 +2758,12 @@ export default {
|
|
|
form33:{},
|
|
form33:{},
|
|
|
form34:{},
|
|
form34:{},
|
|
|
form35:{},
|
|
form35:{},
|
|
|
|
|
+ form40: {
|
|
|
|
|
+ enablePhoneConfig: false,
|
|
|
|
|
+ generateCount: 1,
|
|
|
|
|
+ startIndex: 1,
|
|
|
|
|
+ endIndex: 11
|
|
|
|
|
+ },
|
|
|
storeProductScrmColumns:[],
|
|
storeProductScrmColumns:[],
|
|
|
storeScrmColumns: [],
|
|
storeScrmColumns: [],
|
|
|
photoArr: [],
|
|
photoArr: [],
|
|
@@ -2741,6 +2772,20 @@ export default {
|
|
|
// 表单校验
|
|
// 表单校验
|
|
|
rules1: {},
|
|
rules1: {},
|
|
|
rules3: {},
|
|
rules3: {},
|
|
|
|
|
+ rules40: {
|
|
|
|
|
+ generateCount: [
|
|
|
|
|
+ { required: true, message: '生成条数不能为空', trigger: 'blur' },
|
|
|
|
|
+ { type: 'number', min: 1, message: '生成条数不能小于1', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ startIndex: [
|
|
|
|
|
+ { required: true, message: '开始位置不能为空', trigger: 'blur' },
|
|
|
|
|
+ { type: 'number', min: 1, max: 11, message: '开始位置必须在1到11之间', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ endIndex: [
|
|
|
|
|
+ { required: true, message: '结束位置不能为空', trigger: 'blur' },
|
|
|
|
|
+ { type: 'number', min: 1, max: 11, message: '结束位置必须在1到11之间', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
rules4: {
|
|
rules4: {
|
|
|
doctorRegister: [
|
|
doctorRegister: [
|
|
|
{ required: true, message: '请输入医生注册协议', trigger: 'blur' }
|
|
{ required: true, message: '请输入医生注册协议', trigger: 'blur' }
|
|
@@ -3001,9 +3046,15 @@ export default {
|
|
|
if(!!response.data){
|
|
if(!!response.data){
|
|
|
this.configId = response.data.configId
|
|
this.configId = response.data.configId
|
|
|
this.configKey = response.data.configKey
|
|
this.configKey = response.data.configKey
|
|
|
|
|
+ if (key == 'cId.config') {
|
|
|
|
|
+ this.form40 = JSON.parse(response.data.configValue);
|
|
|
|
|
+ }
|
|
|
}else{
|
|
}else{
|
|
|
this.configId = null;
|
|
this.configId = null;
|
|
|
this.configKey = key;
|
|
this.configKey = key;
|
|
|
|
|
+ if (key == 'cId.config') {
|
|
|
|
|
+ this.form40 = { enablePhoneConfig: false, generateCount: 1 };
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (key == 'sys.oss.cloudStorage') {
|
|
if (key == 'sys.oss.cloudStorage') {
|
|
|
this.form1 = JSON.parse(response.data.configValue)
|
|
this.form1 = JSON.parse(response.data.configValue)
|
|
@@ -3505,6 +3556,64 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ submitForm40() {
|
|
|
|
|
+ if (this.form40.enablePhoneConfig) {
|
|
|
|
|
+ if (!this.form40.generateCount || this.form40.generateCount < 1) {
|
|
|
|
|
+ this.msgError('生成条数不能为空且不能小于1');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // if (!this.form40.generateCount || this.form40.generateCount > 10) {
|
|
|
|
|
+ // this.msgError('单个手机号生成条数不能大于10条');
|
|
|
|
|
+ // return false;
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ if (!this.form40.startIndex || this.form40.startIndex < 1 || this.form40.startIndex > 11) {
|
|
|
|
|
+ this.msgError('开始位置不能为空,且必须在1到11之间');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!this.form40.endIndex || this.form40.endIndex < 1 || this.form40.endIndex > 11) {
|
|
|
|
|
+ this.msgError('结束位置不能为空,且必须在1到11之间');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (this.form40.startIndex > this.form40.endIndex) {
|
|
|
|
|
+ this.msgError('开始位置不能大于结束位置');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (this.form40.endIndex < this.form40.startIndex) {
|
|
|
|
|
+ this.msgError('结束位置不能小于开始位置');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.form40.startIndex === this.form40.endIndex) {
|
|
|
|
|
+ this.msgError('开始位置不能等于结束位置');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ let num = this.form40.endIndex - this.form40.startIndex
|
|
|
|
|
+ if(num < 4){
|
|
|
|
|
+ this.msgError('开始和结束位置不能小于4位');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.saveConfig40();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ saveConfig40() {
|
|
|
|
|
+ const param = {
|
|
|
|
|
+ configId: this.configId,
|
|
|
|
|
+ configKey: this.configKey,
|
|
|
|
|
+ configValue: JSON.stringify(this.form40)
|
|
|
|
|
+ };
|
|
|
|
|
+ updateConfigByKey(param).then(response => {
|
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
|
+ this.msgSuccess('修改成功');
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
formatColumns(){
|
|
formatColumns(){
|
|
|
console.log(this.form27.pass_columns)
|
|
console.log(this.form27.pass_columns)
|
|
|
|
|
|