Browse Source

应急机构父级默认选中第一项

wangqin
刘朋 9 months ago
parent
commit
893b766d2a
  1. 13
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/AddNEditDialog.vue

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

@ -20,7 +20,7 @@ import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import * as PresetFormItems from "@screen/common/PresetFormItems.js";
import request from "@/utils/request";
import { CameraDirectionEnumList } from "@screen/utils/enum.js"
import { Message } from "element-ui";
@ -53,7 +53,7 @@ export default {
key: "parentId",
type: 'select',
options: {
clearable: true,
clearable: false,
options: []
}
},
@ -171,11 +171,11 @@ export default {
this.formData =
!this.data ? null : {
"parentId": this.data.dcOrganizations.parentId,
"organizationType": this.data.dcOrganizations.organizationType,
// "organizationType": this.data.dcOrganizations.organizationType,
"organizationName": this.data.dcOrganizations.organizationName,
"direction": this.data.dcOrganizations.direction,
"organizationAddress": this.data.dcOrganizations.organizationAddress,
"stakeMark": [...(this.data.dcOrganizations.stakeMark || "").match(/[0-9]+/g)],
"stakeMark": this.data.dcOrganizations.stakeMark ? [...(this.data.dcOrganizations.stakeMark || "").match(/[0-9]+/g)] : ["", ""],
"rescueUnit": this.data.dcOrganizations.rescueUnit,
"description": this.data.dcOrganizations.description
}
@ -190,6 +190,7 @@ export default {
const result = await getSelectOptionsStation(1);
this.formList[0].options.options = result;
this.formList[0].default = result[0]?.key;
},
handleSubmit() {
this.$refs.FormConfigRef.validate()
@ -200,9 +201,9 @@ export default {
if (typeof data.parentId != 'number') data.parentId = 0;
if (data.stakeMark[0]) {
data.stakeMark = `K${data.stakeMark[0]}+${data.stakeMark[1]}`
data.stakeMark = `K${data.stakeMark[0]}+${data.stakeMark[1]}`;
}else{
data.stakeMark = ''
data.stakeMark = '';
}
request({

Loading…
Cancel
Save