参数收集清单 法规工程师选择增加删除按钮

This commit is contained in:
zyx.net
2022-07-02 16:32:53 +08:00
parent 58b2c9ac31
commit 3af51c1bff
2 changed files with 13 additions and 2 deletions
@@ -8,7 +8,7 @@
<a-button type="primary" class="button-box" @click="standardClick">
{{this.$t('PersonnelSelection')}}
</a-button>
<a-button type="primary" class="button-box" @click="standardDelete">
<a-button type="primary" v-if='isDelete' class="button-box" @click="standardDelete">
{{this.$t('delete')}}
</a-button>
</div>
@@ -58,7 +58,7 @@
export default {
name: 'index',
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass'],
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass','isDelete'],
data() {
return {
loading: true,
@@ -92,6 +92,8 @@
},
standardDelete(){
this.$emit('input', null)
this.$forceUpdate()
this.$emit('deleteData',this.query.db_field_name)
},
// onSelect(selectedKeys, info) {
// console.log(selectedKeys)
@@ -99,6 +101,7 @@
// },
onCheck(checkedKeys, info) {
console.log(checkedKeys)
this.userIds = checkedKeys.checked
this.userName = []
if (info.checkedNodes && info.checkedNodes.length > 0) {
@@ -92,6 +92,8 @@
<PersonnelSelection
:query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}"
:personneQuery="formInline"
:isDelete='true'
@deleteData='deleteData'
@change="PersonnelSelectionChange"
v-model="formInline.lawEngineerName"/>
</a-form-model-item>
@@ -110,6 +112,8 @@
<PersonnelSelection
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:personneQuery="formInline"
:isDelete='true'
@deleteData='deleteData'
@change="PersonnelSelectionChange"
v-model="formInline.engineeringInterfacePersonName"/>
</a-form-model-item>
@@ -317,6 +321,10 @@
}
})
},
deleteData(name){
this.formInline[name] = ''
this.formInline = {...this.formInline}
},
getData() {
this.visible = true
this.getList()