|
@@ -161,10 +161,11 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { getDetailById } from '@/api/inspectionWork/index';
|
|
import { getDetailById } from '@/api/inspectionWork/index';
|
|
|
- import { planDetails } from '@/api/inspectionPlan/index'
|
|
|
|
|
|
|
+ import { planDetails } from '@/api/inspectionPlan/index';
|
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
|
import detailMixins from './mixins/detailMixins';
|
|
import detailMixins from './mixins/detailMixins';
|
|
|
- import { parameterGetByCode } from '@/api/main/index';
|
|
|
|
|
|
|
+ import { parameterGetByCode } from '@/api/main/index';
|
|
|
|
|
+ import { getUserPage } from '@/api/system/organization';
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [detailMixins],
|
|
mixins: [detailMixins],
|
|
|
data() {
|
|
data() {
|
|
@@ -178,7 +179,8 @@
|
|
|
sourceData5: [],
|
|
sourceData5: [],
|
|
|
disposeTypeList: [],
|
|
disposeTypeList: [],
|
|
|
form: {},
|
|
form: {},
|
|
|
- showArrange:'0'
|
|
|
|
|
|
|
+ showArrange: '0',
|
|
|
|
|
+ executorList: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -211,14 +213,42 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ async getUserList(params) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ let data = { pageNum: 1, size: -1 };
|
|
|
|
|
+ // 如果传了参数就是获取巡点检人员数据
|
|
|
|
|
+ if (params) {
|
|
|
|
|
+ data = Object.assign(data, params);
|
|
|
|
|
+ }
|
|
|
|
|
+ const res = await getUserPage(data);
|
|
|
|
|
+ console.log(res, 'resres');
|
|
|
|
|
+ this.executorList = res.list;
|
|
|
|
|
+ } catch (error) {}
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
async getData() {
|
|
async getData() {
|
|
|
let id = this.$route.query.id;
|
|
let id = this.$route.query.id;
|
|
|
let name = this.$route.query.name;
|
|
let name = this.$route.query.name;
|
|
|
try {
|
|
try {
|
|
|
const api = name == '计划' ? planDetails : getDetailById;
|
|
const api = name == '计划' ? planDetails : getDetailById;
|
|
|
const result = await api(id);
|
|
const result = await api(id);
|
|
|
- console.log(result,'result')
|
|
|
|
|
|
|
+ console.log(result, 'result');
|
|
|
|
|
+ await this.getUserList({ groupId: result.data.groupId });
|
|
|
const res = result.data;
|
|
const res = result.data;
|
|
|
|
|
+ const qualityName = [];
|
|
|
|
|
+ if (res.qualityId && this.executorList.length != 0) {
|
|
|
|
|
+ res.qualityId.split(',').forEach((item) => {
|
|
|
|
|
+ this.executorList.forEach((el) => {
|
|
|
|
|
+ if (el.id == item) {
|
|
|
|
|
+ qualityName.push(el.name);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ if (qualityName.length != 0) {
|
|
|
|
|
+ res.qualityName = qualityName.join(',');
|
|
|
|
|
+ }
|
|
|
let obj = {};
|
|
let obj = {};
|
|
|
this.infoList.map((item) => {
|
|
this.infoList.map((item) => {
|
|
|
obj[item.prop] = res[item.prop];
|
|
obj[item.prop] = res[item.prop];
|
|
@@ -227,7 +257,7 @@
|
|
|
this.fieldAssign(res, obj);
|
|
this.fieldAssign(res, obj);
|
|
|
this.sampleInfo(res);
|
|
this.sampleInfo(res);
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
- console.log(err,'err')
|
|
|
|
|
|
|
+ console.log(err, 'err');
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
sampleInfo(res) {
|
|
sampleInfo(res) {
|