Commit be10520d authored by lixin's avatar lixin

讲师账号只读

parent 3b9f0d62
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
v-if="modalType == 'edit'" v-if="modalType == 'edit'"
label="讲师编号" label="讲师编号"
prop="code" prop="code"
disabled
> >
<a-input <a-input
v-model="formModel.code" v-model="formModel.code"
...@@ -127,28 +126,15 @@ ...@@ -127,28 +126,15 @@
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
v-if="modalType == 'edit'"
label="讲师账号" label="讲师账号"
prop="account" prop="account"
disabled
> >
<a-input <a-input
v-model="formModel.account" disabled v-model="formModel.account" :disabled="isReadOnly"
> >
</a-input> </a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item
v-if="modalType == 'add'"
label="讲师账号"
prop="account"
disabled
>
<a-input
v-model="formModel.account"
>
</a-input>
</a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
...@@ -223,6 +209,7 @@ export default { ...@@ -223,6 +209,7 @@ export default {
modalVisible: false, modalVisible: false,
modalTitle: '添加', modalTitle: '添加',
modalType: 'add', modalType: 'add',
isReadOnly: false,
formModel: { formModel: {
id: '', id: '',
name: '', name: '',
...@@ -307,9 +294,11 @@ export default { ...@@ -307,9 +294,11 @@ export default {
if(row == ''){ if(row == ''){
this.modalTitle = '添加' this.modalTitle = '添加'
this.modalType = 'add' this.modalType = 'add'
this.isReadOnly = false;
}else{ }else{
this.modalTitle = '编辑' this.modalTitle = '编辑'
this.modalType = 'edit' this.modalType = 'edit'
this.isReadOnly = true;
this.formModel = {...row} this.formModel = {...row}
} }
}, },
......
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