Browse Source

修改 业务数据管理bug

wangqin
Joe 10 months ago
parent
commit
614d114202
  1. 16
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue
  2. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue
  3. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/AddNEditDialog.vue
  4. 14
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/components/AddNEditDialog.vue
  5. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue

16
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue

@ -20,7 +20,8 @@
<div :class="['line', { active: active == 'dayShift' }]"> <div :class="['line', { active: active == 'dayShift' }]">
<p @click="active = 'dayShift'">白天值班:</p> <p @click="active = 'dayShift'">白天值班:</p>
<div> <div>
<p v-for=" item in dayShift" :key="item.id" @click="removeDutyPerson(item)">{{ item.name }}</p> <p v-for="(item, index) in dayShift" :key="`${item.id}_${index}`" @click="removeDutyPerson(item)">{{
item.name }}</p>
<div class="no-data" v-if="!dayShift.length">未添加人员</div> <div class="no-data" v-if="!dayShift.length">未添加人员</div>
</div> </div>
</div> </div>
@ -28,7 +29,8 @@
<div :class="['line', { active: active == 'graveyardShift' }]"> <div :class="['line', { active: active == 'graveyardShift' }]">
<p @click="active = 'graveyardShift'">晚上值班:</p> <p @click="active = 'graveyardShift'">晚上值班:</p>
<div> <div>
<p v-for=" item in graveyardShift" :key="item.id" @click="removeDutyPerson(item)">{{ item.name }}</p> <p v-for="(item, index) in graveyardShift" :key="`${index}_${item.id}`" @click="removeDutyPerson(item)">{{
item.name }}</p>
<div class="no-data" v-if="!graveyardShift.length">未添加人员</div> <div class="no-data" v-if="!graveyardShift.length">未添加人员</div>
</div> </div>
</div> </div>
@ -122,8 +124,11 @@ export default {
immediate: true, immediate: true,
async handler(bool) { async handler(bool) {
if (!bool) return; if (!bool) return;
if (!this.data) {
this.dayShift = [...this.data?.dayShift || []];
this.graveyardShift = [...this.data?.graveyardShift || []];
if (!this.data) {
const result = await getSelectOptionsStation(2); const result = await getSelectOptionsStation(2);
this.formList[0].options.options = (result || []); this.formList[0].options.options = (result || []);
@ -131,8 +136,6 @@ export default {
} }
this.getPeopleList(this.data.station); this.getPeopleList(this.data.station);
this.dayShift = [...this.data.dayShift || []];
this.graveyardShift = [...this.data.graveyardShift || []];
} }
} }
}, },
@ -214,6 +217,7 @@ export default {
if (!this.data) { if (!this.data) {
this.updateData(data) this.updateData(data)
.then((result) => { .then((result) => {
console.log("%c [ result ]-217-「ModifyDutyInformationTable.vue」", "font-size:15px; background:#335cf6; color:#77a0ff;", result);
if (result.code != 200) return Message.error("保存失败"); if (result.code != 200) return Message.error("保存失败");
Message.success("保存成功"); Message.success("保存成功");
@ -252,7 +256,7 @@ export default {
]) ])
.then(([del, update]) => { .then(([del, update]) => {
if (del.status === 'rejected' && update.status === 'rejected') return Message.error("修改失败"); if (del.status === 'rejected' && update.status === 'rejected') return Message.error("修改失败");
if (del.value.code != '200' && update.value.code != '200') return Message.error("修改失败"); if (del.value?.code != '200' && update.value?.code != '200') return Message.error("修改失败");
this.$emit('close') this.$emit('close')
}) })

3
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue

@ -186,7 +186,8 @@ export default {
if (!bool) this.setCurrentPage(1); if (!bool) this.setCurrentPage(1);
this.modifyDutyInformationTableVisible = bool; this.modifyDutyInformationTableVisible = bool;
this.dialogData = {
this.dialogData = !data ? null : {
...data, ...data,
dayShift: (data.dayShift || []).map(item => ({ ...item, delId: item.id, id: item.employeesId })), dayShift: (data.dayShift || []).map(item => ({ ...item, delId: item.id, id: item.employeesId })),
graveyardShift: (data.graveyardShift || []).map(item => ({ ...item, id: item.employeesId })) graveyardShift: (data.graveyardShift || []).map(item => ({ ...item, id: item.employeesId }))

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/AddNEditDialog.vue

@ -168,9 +168,8 @@ export default {
handler(bool) { handler(bool) {
if (!bool) return; if (!bool) return;
if (this.data) { this.formData =
this.formData = !this.data ? null : {
{
"parentId": this.data.dcOrganizations.parentId, "parentId": this.data.dcOrganizations.parentId,
"organizationType": this.data.dcOrganizations.organizationType, "organizationType": this.data.dcOrganizations.organizationType,
"organizationName": this.data.dcOrganizations.organizationName, "organizationName": this.data.dcOrganizations.organizationName,
@ -180,7 +179,6 @@ export default {
"rescueUnit": this.data.dcOrganizations.rescueUnit, "rescueUnit": this.data.dcOrganizations.rescueUnit,
"description": this.data.dcOrganizations.description "description": this.data.dcOrganizations.description
} }
}
this.getOptions(); this.getOptions();
} }

14
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/components/AddNEditDialog.vue

@ -64,13 +64,11 @@ export default {
handler(bool) { handler(bool) {
if (!bool) return; if (!bool) return;
if (this.data) { this.formData = !this.data ? {} : {
this.formData = { ...this.data,
...this.data, deptId: [],
deptId: [], endStakeMark: stakeMarkToArray(this.data.endStakeMark),
endStakeMark: stakeMarkToArray(this.data.endStakeMark), startStakeMark: stakeMarkToArray(this.data.startStakeMark),
startStakeMark: stakeMarkToArray(this.data.startStakeMark),
}
} }
this.getSelectOptions(); this.getSelectOptions();
@ -95,7 +93,7 @@ export default {
if (departmentData.status != 'rejected' && departmentData.value.code == 200) { if (departmentData.status != 'rejected' && departmentData.value.code == 200) {
this.formList[0].options.options = departmentData.value.data; this.formList[0].options.options = departmentData.value.data;
this.formData.deptId = findPathIdByTreeId(departmentData.value.data, this.data.deptId); if (this.data?.deptId) this.formData.deptId = findPathIdByTreeId(departmentData.value.data, this.data.deptId);
this.$refs.FormConfigRef.reset(true) this.$refs.FormConfigRef.reset(true)
} }

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue

@ -158,7 +158,7 @@ export default {
handleAddEdit(bool, data) { handleAddEdit(bool, data) {
this.editEventInformationDialogVisible = bool this.editEventInformationDialogVisible = bool
this.dialogData = data this.dialogData = data;
}, },
handleExport() { handleExport() {
exportFile({ exportFile({

Loading…
Cancel
Save