diff --git a/src/views/emergen_cyrescue/emergency_information/security_agency/assurance_management/components/detail.vue b/src/views/emergen_cyrescue/emergency_information/security_agency/assurance_management/components/detail.vue index a96ff0f..3d19274 100644 --- a/src/views/emergen_cyrescue/emergency_information/security_agency/assurance_management/components/detail.vue +++ b/src/views/emergen_cyrescue/emergency_information/security_agency/assurance_management/components/detail.vue @@ -1,70 +1,126 @@ + diff --git a/src/views/emergen_cyrescue/emergency_information/security_agency/assurance_management/components/list.vue b/src/views/emergen_cyrescue/emergency_information/security_agency/assurance_management/components/list.vue index c30c370..1e9d395 100644 --- a/src/views/emergen_cyrescue/emergency_information/security_agency/assurance_management/components/list.vue +++ b/src/views/emergen_cyrescue/emergency_information/security_agency/assurance_management/components/list.vue @@ -18,7 +18,7 @@ - + @@ -46,7 +46,16 @@ - + + @@ -75,6 +84,7 @@ placeholder="请选择所属区域" no-options-text="暂无数据" no-children-text="暂无数据" + @input="handleRegionChange" /> @@ -145,6 +155,7 @@ placeholder="请选择主管单位" no-options-text="暂无数据" no-children-text="暂无数据" + @input="handleDepartmentChange" /> @@ -239,6 +250,7 @@ export default { form: { ORG_NAME: '', ORG_TYPE: '', + ORG_TYPE_NAME: '', ORG_LEVEL: '', ADDRESS: '', POSTAL_CODE: '', @@ -246,6 +258,7 @@ export default { DUTY_PHONE: '', FAX: '', ADMINISTRATIVE_REGION: '', + ADMINISTRATIVE_REGION_NAME: '', LONGITUDE: '', LATITUDE: '', EMERGENCY_COMMUNICATION_VEHICLES: 0, @@ -263,6 +276,7 @@ export default { CONTACT_HOME_PHONE: '', CONTACT_EMAIL: '', SUPERVISING_UNIT: '', + SUPERVISING_UNIT_NAME: '', SUPERVISING_UNIT_ADDRESS: '', COMPANY_OVERVIEW: '', EMERGENCY_CAPACITY_DESCRIPTION: '', @@ -390,6 +404,7 @@ export default { caseSummaryList: [], treeData: [], DepartmentData: [], + yjorgTypeData: [], normalizer(node) { return { id: node.DICTIONARIES_ID, @@ -400,11 +415,30 @@ export default { } }, created() { + this.getyjorgTypeDataList() this.getList() this.getTreeList() this.getDepartmentList() }, methods: { + handleRegionChange(value) { + const selectedRegion = this.treeData.find(region => region.DICTIONARIES_ID === value) + if (selectedRegion) { + this.form.ADMINISTRATIVE_REGION_NAME = selectedRegion.name + } + }, + handleOrgTypeChange(value) { + const selectedOrgType = this.yjorgTypeData.find(type => type.DICTIONARIES_ID === value) + if (selectedOrgType) { + this.form.ORG_TYPE_NAME = selectedOrgType.name + } + }, + handleDepartmentChange(value) { + const selectedDepartment = this.DepartmentData.find(department => department.id === value) + if (selectedDepartment) { + this.form.SUPERVISING_UNIT_NAME = selectedDepartment.label + } + }, resetQuery() { this.KEYWORDS_ORG_NAME = '' this.KEYWORDS_ORG_TYPE = '' @@ -415,6 +449,16 @@ export default { this.$parent.CASE_ID = CASE_ID this.$parent.ticketType = ticketType }, + getyjorgTypeDataList() { + const params = { + PARENT_ID: '2bd21d9d4d254f179e79f75d6377f651' + } + requestFN('/dictionaries/listTree', params).then((data) => { + this.yjorgTypeData = JSON.parse(data.zTreeNodes) + }).catch((e) => { + console.error('获取树形数据失败', e) + }) + }, getDepartmentList() { requestFN('/department/listAll').then((data) => { this.DepartmentData = data.list.map(item => ({ @@ -431,6 +475,7 @@ export default { } requestFN('/dictionaries/listTree', params).then((data) => { this.treeData = JSON.parse(data.zTreeNodes) + console.log(this.treeData) }).catch((e) => { console.error('获取树形数据失败', e) }) @@ -590,6 +635,7 @@ export default { Id: data.ID, ORG_NAME: data.ORG_NAME, ORG_TYPE: data.ORG_TYPE, + ORG_TYPE_NAME: data.ORG_TYPE_NAME, ORG_LEVEL: data.ORG_LEVEL, ADDRESS: data.ADDRESS, POSTAL_CODE: data.POSTAL_CODE, @@ -597,6 +643,7 @@ export default { DUTY_PHONE: data.DUTY_PHONE, FAX: data.FAX, ADMINISTRATIVE_REGION: data.ADMINISTRATIVE_REGION, + ADMINISTRATIVE_REGION_NAME: data.ADMINISTRATIVE_REGION_NAME, LONGITUDE: data.LONGITUDE, LATITUDE: data.LATITUDE, EMERGENCY_COMMUNICATION_VEHICLES: data.EMERGENCY_COMMUNICATION_VEHICLES, @@ -614,6 +661,7 @@ export default { CONTACT_HOME_PHONE: data.CONTACT_HOME_PHONE, CONTACT_EMAIL: data.CONTACT_EMAIL, SUPERVISING_UNIT: data.SUPERVISING_UNIT, + SUPERVISING_UNIT_NAME: data.SUPERVISING_UNIT_NAME, SUPERVISING_UNIT_ADDRESS: data.SUPERVISING_UNIT_ADDRESS, COMPANY_OVERVIEW: data.COMPANY_OVERVIEW, EMERGENCY_CAPACITY_DESCRIPTION: data.EMERGENCY_CAPACITY_DESCRIPTION, diff --git a/src/views/emergen_cyrescue/emergency_information/security_agency/transportation_management/components/list.vue b/src/views/emergen_cyrescue/emergency_information/security_agency/transportation_management/components/list.vue index 1e99448..8c0bc68 100644 --- a/src/views/emergen_cyrescue/emergency_information/security_agency/transportation_management/components/list.vue +++ b/src/views/emergen_cyrescue/emergency_information/security_agency/transportation_management/components/list.vue @@ -18,7 +18,7 @@ - + @@ -46,7 +46,16 @@ - + + @@ -72,6 +81,7 @@ placeholder="请选择所属区域" no-options-text="暂无数据" no-children-text="暂无数据" + @input="handleRegionChange" /> @@ -231,12 +241,14 @@ export default { form: { ORG_NAME: '', ORG_TYPE: '', + ORG_TYPE_NAME: '', ORG_LEVEL: '', ADDRESS: '', POSTAL_CODE: '', SECURITY_LEVEL: '', DUTY_PHONE: '', ADMINISTRATIVE_REGION: '', + ADMINISTRATIVE_REGION_NAME: '', LONGITUDE: '', LATITUDE: '', EMERGENCY_TRANSPORT_MODE: '', @@ -372,6 +384,7 @@ export default { caseSummaryList: [], treeData: [], DepartmentData: [], + yjorgTypeData: [], normalizer(node) { return { id: node.DICTIONARIES_ID, @@ -382,11 +395,24 @@ export default { } }, created() { + this.getyjorgTypeDataList() this.getList() this.getTreeList() this.getDepartmentList() }, methods: { + handleRegionChange(value) { + const selectedRegion = this.treeData.find(region => region.DICTIONARIES_ID === value) + if (selectedRegion) { + this.form.ADMINISTRATIVE_REGION_NAME = selectedRegion.name + } + }, + handleOrgTypeChange(value) { + const selectedOrgType = this.yjorgTypeData.find(type => type.DICTIONARIES_ID === value) + if (selectedOrgType) { + this.form.ORG_TYPE_NAME = selectedOrgType.name + } + }, handleDepartmentChange(value) { const selectedDepartment = this.DepartmentData.find(department => department.id === value) if (selectedDepartment) { @@ -560,6 +586,16 @@ export default { this.listLoading = false }) }, + getyjorgTypeDataList() { + const params = { + PARENT_ID: '2bd21d9d4d254f179e79f75d6377f651' + } + requestFN('/dictionaries/listTree', params).then((data) => { + this.yjorgTypeData = JSON.parse(data.zTreeNodes) + }).catch((e) => { + console.error('获取树形数据失败', e) + }) + }, //* ***************************数据保存********************************** handleEdit(id) { this.dialogFormEdit = true @@ -577,12 +613,14 @@ export default { this.form = { ORG_NAME: data.ORG_NAME, ORG_TYPE: data.ORG_TYPE, + ORG_TYPE_NAME: data.ORG_TYPE_NAME, ORG_LEVEL: data.ORG_LEVEL, ADDRESS: data.ADDRESS, POSTAL_CODE: data.POSTAL_CODE, SECURITY_LEVEL: data.SECURITY_LEVEL, DUTY_PHONE: data.DUTY_PHONE, ADMINISTRATIVE_REGION: data.ADMINISTRATIVE_REGION, + ADMINISTRATIVE_REGION_NAME: data.ADMINISTRATIVE_REGION_NAME, LONGITUDE: data.LONGITUDE, LATITUDE: data.LATITUDE, EMERGENCY_TRANSPORT_MODE: data.EMERGENCY_TRANSPORT_MODE,