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

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"> <a-button type="primary" class="button-box" @click="standardClick">
{{this.$t('PersonnelSelection')}} {{this.$t('PersonnelSelection')}}
</a-button> </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')}} {{this.$t('delete')}}
</a-button> </a-button>
</div> </div>
@@ -58,7 +58,7 @@
export default { export default {
name: 'index', name: 'index',
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass'], props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass','isDelete'],
data() { data() {
return { return {
loading: true, loading: true,
@@ -92,6 +92,8 @@
}, },
standardDelete(){ standardDelete(){
this.$emit('input', null) this.$emit('input', null)
this.$forceUpdate()
this.$emit('deleteData',this.query.db_field_name)
}, },
// onSelect(selectedKeys, info) { // onSelect(selectedKeys, info) {
// console.log(selectedKeys) // console.log(selectedKeys)
@@ -99,6 +101,7 @@
// }, // },
onCheck(checkedKeys, info) { onCheck(checkedKeys, info) {
console.log(checkedKeys)
this.userIds = checkedKeys.checked this.userIds = checkedKeys.checked
this.userName = [] this.userName = []
if (info.checkedNodes && info.checkedNodes.length > 0) { if (info.checkedNodes && info.checkedNodes.length > 0) {
@@ -92,6 +92,8 @@
<PersonnelSelection <PersonnelSelection
:query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}" :query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}"
:personneQuery="formInline" :personneQuery="formInline"
:isDelete='true'
@deleteData='deleteData'
@change="PersonnelSelectionChange" @change="PersonnelSelectionChange"
v-model="formInline.lawEngineerName"/> v-model="formInline.lawEngineerName"/>
</a-form-model-item> </a-form-model-item>
@@ -110,6 +112,8 @@
<PersonnelSelection <PersonnelSelection
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}" :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:personneQuery="formInline" :personneQuery="formInline"
:isDelete='true'
@deleteData='deleteData'
@change="PersonnelSelectionChange" @change="PersonnelSelectionChange"
v-model="formInline.engineeringInterfacePersonName"/> v-model="formInline.engineeringInterfacePersonName"/>
</a-form-model-item> </a-form-model-item>
@@ -317,6 +321,10 @@
} }
}) })
}, },
deleteData(name){
this.formInline[name] = ''
this.formInline = {...this.formInline}
},
getData() { getData() {
this.visible = true this.visible = true
this.getList() this.getList()