|
@@ -423,7 +423,6 @@
|
|
|
import { getById } from '@/api/maintenance/patrol_maintenance';
|
|
import { getById } from '@/api/maintenance/patrol_maintenance';
|
|
|
import { getFile } from '@/api/system/file';
|
|
import { getFile } from '@/api/system/file';
|
|
|
import { deepClone } from 'ele-admin/lib/utils/core';
|
|
import { deepClone } from 'ele-admin/lib/utils/core';
|
|
|
- import work from '@/api/technology/work';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -440,6 +439,11 @@
|
|
|
planId: {
|
|
planId: {
|
|
|
type: String,
|
|
type: String,
|
|
|
required: true
|
|
required: true
|
|
|
|
|
+ },
|
|
|
|
|
+ // 当前信息
|
|
|
|
|
+ info: {
|
|
|
|
|
+ type: Object,
|
|
|
|
|
+ required: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
@@ -698,7 +702,7 @@
|
|
|
},
|
|
},
|
|
|
autoOrderChange(val) {
|
|
autoOrderChange(val) {
|
|
|
if (val == 0) {
|
|
if (val == 0) {
|
|
|
- this.addForm.executorId = '';
|
|
|
|
|
|
|
+ this.addForm.executorId = [];
|
|
|
this.addForm.groupId = '';
|
|
this.addForm.groupId = '';
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -822,8 +826,10 @@
|
|
|
console.log(id);
|
|
console.log(id);
|
|
|
try {
|
|
try {
|
|
|
const res = await getById(id);
|
|
const res = await getById(id);
|
|
|
- console.log('res----------', res);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ console.log('res----------', res.data);
|
|
|
this.addForm = res.data;
|
|
this.addForm = res.data;
|
|
|
|
|
+
|
|
|
this.addForm.id = res.data.planId;
|
|
this.addForm.id = res.data.planId;
|
|
|
if (this.dialogTitle === '派单') {
|
|
if (this.dialogTitle === '派单') {
|
|
|
this.addForm.autoOrder = 1;
|
|
this.addForm.autoOrder = 1;
|
|
@@ -859,7 +865,11 @@
|
|
|
// this._getMatterRulesDetails(res.ruleId);
|
|
// this._getMatterRulesDetails(res.ruleId);
|
|
|
this.$set(this.addForm, 'code', res.data.code);
|
|
this.$set(this.addForm, 'code', res.data.code);
|
|
|
this.$set(this.addForm, 'urgent', JSON.stringify(res.data.urgent));
|
|
this.$set(this.addForm, 'urgent', JSON.stringify(res.data.urgent));
|
|
|
- this.$set(this.addForm, 'executorId', res.data.executorId.split(','));
|
|
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.addForm,
|
|
|
|
|
+ 'executorId',
|
|
|
|
|
+ res.data.executorId.split(',').filter((i) => i)
|
|
|
|
|
+ );
|
|
|
this.$set(this.addForm, 'imageUrl', {});
|
|
this.$set(this.addForm, 'imageUrl', {});
|
|
|
console.log(this.rootData);
|
|
console.log(this.rootData);
|
|
|
if (res.data.groupId) {
|
|
if (res.data.groupId) {
|
|
@@ -881,6 +891,25 @@
|
|
|
// this.$refs.equiListTree.setCheckedKeys(keys);
|
|
// this.$refs.equiListTree.setCheckedKeys(keys);
|
|
|
// });
|
|
// });
|
|
|
// this.clickedTreeNode = true;
|
|
// this.clickedTreeNode = true;
|
|
|
|
|
+
|
|
|
|
|
+ console.log('this.info', this.info);
|
|
|
|
|
+ if (this.info.planDevices) {
|
|
|
|
|
+ let userIds = this.info.planDevices
|
|
|
|
|
+ .map((i) => {
|
|
|
|
|
+ return i.deviceUserId;
|
|
|
|
|
+ })
|
|
|
|
|
+ .filter((i) => i);
|
|
|
|
|
+ // 去重
|
|
|
|
|
+ userIds = [...new Set(userIds)];
|
|
|
|
|
+
|
|
|
|
|
+ console.log('userIds', userIds);
|
|
|
|
|
+ // 赋值负责人
|
|
|
|
|
+ if (userIds.length > 0) {
|
|
|
|
|
+ this.addForm.executorId = userIds;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ console.log('this.addForm', this.addForm);
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.log(error);
|
|
console.log(error);
|
|
|
}
|
|
}
|
|
@@ -1234,4 +1263,10 @@
|
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
gap: 15px;
|
|
gap: 15px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.el-form) {
|
|
|
|
|
+ .el-form-item:last-child {
|
|
|
|
|
+ margin-bottom: 22px !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|