Commit 6118bc60 by liuchenxi

update: 多选框回显禁用优化

parent 0619d638
......@@ -9,7 +9,7 @@
</el-form-item>
<el-form-item label="签名应用通道" prop="channelSignList">
<el-checkbox-group v-model="form.channelSignList">
<el-checkbox v-for="v in channelList" :key="v.channelId" :label="v.channelId">{{ v.channelName }}</el-checkbox>
<el-checkbox v-for="v in channelList" :key="v.channelId" :label="v.channelId" :disabled="disabledCheckBox.includes(v.channelId)">{{ v.channelName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="短信模板数量" prop="maxTemplateCount">
......@@ -53,6 +53,7 @@ export default {
};
return {
channelList: [],
disabledCheckBox: [],
form: {
enterpriseSmsSettingId: '',
enterpriseId: '',
......@@ -85,7 +86,10 @@ export default {
for(let key in result) {
if(this.form.hasOwnProperty(key)) {
this.form[key] = result[key] || this.form[key];
if(key == 'channelSignList' && this.form[key]) this.form[key] = this.form[key].split(',').map(el => +el);
if(key == 'channelSignList' && typeof this.form[key] == 'string') {
this.form[key] = this.form[key].split(',').map(el => +el);
this.disabledCheckBox = this.form[key];
};
if(key == 'maxTemplateCount') this.form['limitTemplateCount'] = this.form[key] || 0;
if(key == 'sendSmsType' && this.form[key] != 0) {
this.form['appointChannel'] = this.form[key];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment