2022-06-08 14:51:11 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<!-- 检查部位 -->
|
|
|
|
|
|
<vue-scroll style="height: 100%">
|
|
|
|
|
|
<div class="checkPoint">
|
2024-05-06 23:45:01 +08:00
|
|
|
|
<el-button type="primary" size="medium" @click="newRootNode"
|
2024-05-28 15:55:00 +08:00
|
|
|
|
v-permission="{key: 'business_add', menuPath: '/project/quality/business'}"
|
2024-05-06 23:45:01 +08:00
|
|
|
|
>新增区域</el-button
|
|
|
|
|
|
>
|
2022-06-08 14:51:11 +08:00
|
|
|
|
<el-table
|
|
|
|
|
|
:data="tableData"
|
|
|
|
|
|
style="width: 100%; margin: 20px 0"
|
|
|
|
|
|
row-key="id"
|
|
|
|
|
|
default-expand-all
|
|
|
|
|
|
:tree-props="{ children: 'children' }"
|
|
|
|
|
|
class="tables"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
prop="regionName"
|
|
|
|
|
|
:label="$t('message.quality.regionName')"
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
2024-05-06 23:45:01 +08:00
|
|
|
|
align="center"
|
2022-06-08 14:51:11 +08:00
|
|
|
|
prop="regionCode"
|
|
|
|
|
|
:label="$t('message.quality.coding')"
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-table-column>
|
2024-05-06 23:45:01 +08:00
|
|
|
|
<el-table-column align="center" prop="enterpriseName" label="责任单位">
|
2024-04-29 15:57:52 +08:00
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
2024-05-06 23:45:01 +08:00
|
|
|
|
align="center"
|
2024-04-29 18:32:57 +08:00
|
|
|
|
prop="dutyUserName"
|
2022-06-08 14:51:11 +08:00
|
|
|
|
:label="$t('message.quality.rectificationPeople')"
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-table-column>
|
2023-10-13 17:51:24 +08:00
|
|
|
|
<!-- <el-table-column
|
2023-04-27 15:22:14 +08:00
|
|
|
|
align="center"
|
|
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
prop="intendanceNames"
|
|
|
|
|
|
:label="$t('message.quality.notifier')"
|
|
|
|
|
|
>
|
2023-10-13 17:51:24 +08:00
|
|
|
|
</el-table-column> -->
|
2024-05-06 23:45:01 +08:00
|
|
|
|
<el-table-column align="center" prop="aiAnalyseHardName" label="AI设备">
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
prop="remark"
|
|
|
|
|
|
:label="$t('message.quality.explain')"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
>
|
2022-06-08 14:51:11 +08:00
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
prop="remark"
|
|
|
|
|
|
:label="$t('message.quality.operation')"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<div class="flex2 edit">
|
2024-05-28 15:55:00 +08:00
|
|
|
|
<!-- <img src="@/assets/images/icon-edit.png" /> -->
|
|
|
|
|
|
<el-button type="text" @click="editBtn(scope.row)"
|
|
|
|
|
|
v-permission="{key: 'business_edit', menuPath: '/project/quality/business'}">{{
|
2024-05-06 23:45:01 +08:00
|
|
|
|
$t("message.quality.compile")
|
2023-02-27 18:47:21 +08:00
|
|
|
|
}}</el-button>
|
2024-05-28 15:55:00 +08:00
|
|
|
|
<el-button type="text" @click="newJuniorBtn(scope.row)"
|
|
|
|
|
|
v-permission="{key: 'business_add', menuPath: '/project/quality/business'}">{{
|
2024-05-06 23:45:01 +08:00
|
|
|
|
$t("message.quality.newJunior")
|
2023-02-27 18:47:21 +08:00
|
|
|
|
}}</el-button>
|
2024-05-28 15:55:00 +08:00
|
|
|
|
<el-button type="text" @click="deleteBtn(scope.row)"
|
|
|
|
|
|
v-permission="{key: 'business_delete', menuPath: '/project/quality/business'}">{{
|
2024-05-06 23:45:01 +08:00
|
|
|
|
$t("message.quality.delete")
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}}</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
:modal-append-to-body="false"
|
|
|
|
|
|
@close="close"
|
|
|
|
|
|
:title="title"
|
|
|
|
|
|
:visible.sync="editDialog"
|
|
|
|
|
|
width="666px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<div class="dialog_content">
|
2024-05-06 23:45:01 +08:00
|
|
|
|
<el-form
|
|
|
|
|
|
ref="form"
|
|
|
|
|
|
:model="form"
|
|
|
|
|
|
:rules="rules"
|
|
|
|
|
|
label-width="80px"
|
|
|
|
|
|
size="medium"
|
|
|
|
|
|
>
|
2022-06-08 14:51:11 +08:00
|
|
|
|
<el-form-item
|
|
|
|
|
|
:label="$t('message.quality.regionName')"
|
|
|
|
|
|
prop="regionName"
|
|
|
|
|
|
:rules="[
|
|
|
|
|
|
{
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message:
|
|
|
|
|
|
$t('message.quality.pleaseEnter') +
|
|
|
|
|
|
$t('message.quality.regionName'),
|
2024-05-06 23:45:01 +08:00
|
|
|
|
trigger: 'blur',
|
|
|
|
|
|
},
|
2022-06-08 14:51:11 +08:00
|
|
|
|
]"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-input
|
2024-04-29 18:32:57 +08:00
|
|
|
|
placeholder="请输入区域名称"
|
2022-06-08 14:51:11 +08:00
|
|
|
|
v-model="form.regionName"
|
|
|
|
|
|
:disabled="dialogType == 2"
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
</el-form-item>
|
2024-04-29 23:43:21 +08:00
|
|
|
|
<!-- 责任单位 -->
|
2024-05-06 23:45:01 +08:00
|
|
|
|
<el-form-item label="责任单位" prop="dutyId">
|
2022-06-08 14:51:11 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.dutyId"
|
2024-05-06 23:45:01 +08:00
|
|
|
|
multiple
|
2024-05-25 18:43:14 +08:00
|
|
|
|
filterable
|
2022-06-08 14:51:11 +08:00
|
|
|
|
@change="changeDutyId"
|
|
|
|
|
|
:placeholder="$t('message.quality.pleaseSelect')"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
prop="dutyId"
|
|
|
|
|
|
clearable
|
2024-04-29 15:57:52 +08:00
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in enterpriseInfoList"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.enterpriseName"
|
|
|
|
|
|
:value="item.id"
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-04-29 23:43:21 +08:00
|
|
|
|
<!-- 责任人 start -->
|
2024-05-06 23:45:01 +08:00
|
|
|
|
<el-form-item label="责任人" prop="personId">
|
2024-04-29 15:57:52 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.personId"
|
2024-05-25 18:43:14 +08:00
|
|
|
|
filterable
|
2024-04-29 15:57:52 +08:00
|
|
|
|
multiple
|
2024-05-25 18:43:14 +08:00
|
|
|
|
reserve-keyword
|
2024-04-29 15:57:52 +08:00
|
|
|
|
:placeholder="$t('message.quality.pleaseSelect')"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
prop="personId"
|
|
|
|
|
|
clearable
|
2022-06-08 14:51:11 +08:00
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in notifierOrPeopleList"
|
|
|
|
|
|
:key="item.userId"
|
2024-04-29 18:32:57 +08:00
|
|
|
|
:label="item.realName"
|
2022-06-08 14:51:11 +08:00
|
|
|
|
:value="item.userId"
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-04-29 15:57:52 +08:00
|
|
|
|
<!-- 责任人 end -->
|
|
|
|
|
|
|
2023-10-13 17:51:24 +08:00
|
|
|
|
<!-- <el-form-item :label="$t('message.quality.notifier')">
|
2022-06-08 14:51:11 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.intendanceIds"
|
|
|
|
|
|
filterable
|
|
|
|
|
|
@change="changeIntendanceIds"
|
|
|
|
|
|
multiple
|
|
|
|
|
|
prop="intendanceIds"
|
|
|
|
|
|
:placeholder="$t('message.quality.pleaseSelect')"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in notifierOrPeopleList"
|
|
|
|
|
|
:key="item.userId"
|
|
|
|
|
|
:label="item.workerName"
|
|
|
|
|
|
:value="item.userId"
|
|
|
|
|
|
>
|
2023-10-13 17:51:24 +08:00
|
|
|
|
<span style="float: left">{{ item.realName }}</span> -->
|
2024-05-06 23:45:01 +08:00
|
|
|
|
<!-- <span-->
|
|
|
|
|
|
<!-- style="-->
|
|
|
|
|
|
<!-- float: right;-->
|
|
|
|
|
|
<!-- color: #aaaaaa;-->
|
|
|
|
|
|
<!-- font-size: 13px;-->
|
|
|
|
|
|
<!-- margin-right: 24px;-->
|
|
|
|
|
|
<!-- "-->
|
|
|
|
|
|
<!-- >{{ $t('message.quality.phoneNumber') }}:{{-->
|
|
|
|
|
|
<!-- item.userTel-->
|
|
|
|
|
|
<!-- ? item.userTel.substring(0, 3) +-->
|
|
|
|
|
|
<!-- "****" +-->
|
|
|
|
|
|
<!-- item.userTel.substring(7)-->
|
|
|
|
|
|
<!-- : ""-->
|
|
|
|
|
|
<!-- }}</span-->
|
|
|
|
|
|
<!-- >-->
|
|
|
|
|
|
<!-- </el-option>
|
2022-06-08 14:51:11 +08:00
|
|
|
|
</el-select>
|
2023-10-13 17:51:24 +08:00
|
|
|
|
</el-form-item> -->
|
2024-05-06 23:45:01 +08:00
|
|
|
|
<!-- AI设备 -->
|
|
|
|
|
|
<el-form-item label="AI设备" prop="aiDeviceId">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.aiDeviceId"
|
|
|
|
|
|
multiple
|
|
|
|
|
|
:placeholder="$t('message.quality.pleaseSelect')"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in aiDeviceList"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.hardwareName"
|
|
|
|
|
|
:value="item.id"
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2022-06-08 14:51:11 +08:00
|
|
|
|
<el-form-item :label="$t('message.quality.explain')">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
prop="remark"
|
|
|
|
|
|
v-model="form.remark"
|
|
|
|
|
|
type="textarea"
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
<!-- <el-checkbox-group v-model="showList">
|
|
|
|
|
|
<el-checkbox :label="1" name="type"
|
|
|
|
|
|
>{{ $t("message.quality.rectificationPeople")
|
|
|
|
|
|
}}{{ $t("message.quality.copyToSubordinate") }}</el-checkbox
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-checkbox :label="2" name="type"
|
|
|
|
|
|
>{{ $t("message.quality.notifier")
|
|
|
|
|
|
}}{{ $t("message.quality.copyToSubordinate") }}</el-checkbox
|
|
|
|
|
|
>
|
|
|
|
|
|
</el-checkbox-group> -->
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
class="cancleBtn"
|
|
|
|
|
|
@click="editDialog = false"
|
|
|
|
|
|
icon="el-icon-circle-close"
|
|
|
|
|
|
size="medium"
|
2024-05-06 23:45:01 +08:00
|
|
|
|
>{{ $t("message.alarmValueSet.cancel") }}
|
2022-06-08 14:51:11 +08:00
|
|
|
|
</el-button>
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
icon="el-icon-circle-check"
|
|
|
|
|
|
@click="submit('form')"
|
|
|
|
|
|
size="medium"
|
2024-05-06 23:45:01 +08:00
|
|
|
|
>{{ $t("message.alarmValueSet.save") }}
|
2022-06-08 14:51:11 +08:00
|
|
|
|
</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
</vue-scroll>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {
|
|
|
|
|
|
addQualityRegionApi,
|
|
|
|
|
|
getQualityRegionListApi,
|
|
|
|
|
|
deleteQualityRegionListApi,
|
2024-05-06 23:45:01 +08:00
|
|
|
|
editQualityRegionListApi,
|
|
|
|
|
|
} from "@/assets/js/api/quality.js";
|
|
|
|
|
|
import {
|
|
|
|
|
|
getProjectChilderSystemUserListApi,
|
|
|
|
|
|
getEnterpriseInfoListApi,
|
|
|
|
|
|
} from "@/assets/js/api/configManage.js";
|
|
|
|
|
|
import { aiAnalyseHardWareRecordList } from "@/assets/js/api/equipmentCenter/electricBox";
|
2022-06-08 14:51:11 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
title: this.$t("message.quality.NewRootNode"),
|
2022-06-08 14:51:11 +08:00
|
|
|
|
dialogType: 1,
|
2024-05-06 23:45:01 +08:00
|
|
|
|
projectSn: "",
|
2022-06-08 14:51:11 +08:00
|
|
|
|
notifierOrPeopleList: [],
|
2024-05-06 23:45:01 +08:00
|
|
|
|
enterpriseInfoList: [],
|
|
|
|
|
|
value: "",
|
2022-06-08 14:51:11 +08:00
|
|
|
|
tableData: [],
|
|
|
|
|
|
editDialog: false,
|
|
|
|
|
|
form: {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
regionName: "",
|
|
|
|
|
|
dutyId: "",
|
|
|
|
|
|
aiDeviceId: "",
|
2024-04-29 18:32:57 +08:00
|
|
|
|
personId: null,
|
2022-06-08 14:51:11 +08:00
|
|
|
|
intendanceIds: [],
|
2024-05-06 23:45:01 +08:00
|
|
|
|
intendanceNames: "",
|
|
|
|
|
|
remark: "",
|
|
|
|
|
|
enterpriseName: "",
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
2024-04-29 23:43:21 +08:00
|
|
|
|
showList: [],
|
|
|
|
|
|
rules: {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
aiDeviceId: [
|
|
|
|
|
|
{
|
2024-04-29 23:43:21 +08:00
|
|
|
|
required: true,
|
2024-05-06 23:45:01 +08:00
|
|
|
|
message: "请选择AI设备",
|
|
|
|
|
|
trigger: "change",
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
dutyId: [
|
|
|
|
|
|
{
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: "请输入责任单位",
|
|
|
|
|
|
trigger: "change",
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
personId: [
|
|
|
|
|
|
{
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: "请输入责任人",
|
|
|
|
|
|
trigger: "change",
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
},
|
|
|
|
|
|
aiDeviceList: [],
|
|
|
|
|
|
};
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
created() {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.projectSn = this.$store.state.projectSn;
|
|
|
|
|
|
this.getQualityRegionList();
|
2024-04-29 18:32:57 +08:00
|
|
|
|
this.getUpdateUnitListFn();
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.getAIDeviceFn();
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
// 获取AI设备
|
|
|
|
|
|
getAIDeviceFn() {
|
|
|
|
|
|
aiAnalyseHardWareRecordList({
|
|
|
|
|
|
projectSn: this.$store.state.projectSn,
|
|
|
|
|
|
}).then((result) => {
|
|
|
|
|
|
if (result.success) {
|
|
|
|
|
|
this.aiDeviceList = result.result;
|
|
|
|
|
|
console.log("列表", result);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2022-06-08 14:51:11 +08:00
|
|
|
|
// 获取列表信息
|
|
|
|
|
|
getQualityRegionList() {
|
|
|
|
|
|
let data = {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
projectSn: this.projectSn,
|
|
|
|
|
|
};
|
2022-06-08 14:51:11 +08:00
|
|
|
|
getQualityRegionListApi(data).then((res) => {
|
2024-04-29 15:57:52 +08:00
|
|
|
|
console.log(res);
|
2022-06-08 14:51:11 +08:00
|
|
|
|
if (res.code == 200) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.tableData = res.result;
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//新增根节点按钮
|
|
|
|
|
|
newRootNode() {
|
|
|
|
|
|
this.form = {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
regionName: "",
|
2024-05-30 19:58:05 +08:00
|
|
|
|
dutyId: [],
|
|
|
|
|
|
personId: [],
|
2024-05-06 23:45:01 +08:00
|
|
|
|
aiDeviceId: "",
|
2022-06-08 14:51:11 +08:00
|
|
|
|
intendanceIds: [],
|
2024-05-06 23:45:01 +08:00
|
|
|
|
intendanceNames: "",
|
|
|
|
|
|
remark: "",
|
|
|
|
|
|
};
|
2024-05-11 02:53:54 +08:00
|
|
|
|
this.notifierOrPeopleList = [];
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.editDialog = true;
|
|
|
|
|
|
this.title = "新增区域";
|
|
|
|
|
|
this.dialogType = 1;
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.$refs["form"].clearValidate();
|
|
|
|
|
|
});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
//切换 整改人
|
|
|
|
|
|
changeDutyId(value) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
console.log(value);
|
|
|
|
|
|
console.log(this.form, 666777);
|
|
|
|
|
|
console.log(this.notifierOrPeopleList, 888999);
|
|
|
|
|
|
if (this.form.dutyId.length > 0) {
|
|
|
|
|
|
let shouldHavePersonIdList = this.notifierOrPeopleList.map((item) => {
|
|
|
|
|
|
if (this.form.dutyId.includes(item.enterpriseId)) {
|
|
|
|
|
|
return item.userId;
|
2024-04-29 23:08:22 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
|
|
|
|
|
const newArr = this.form.personId.filter((item) =>
|
|
|
|
|
|
shouldHavePersonIdList.includes(item)
|
|
|
|
|
|
);
|
2024-04-29 23:08:22 +08:00
|
|
|
|
this.form.personId = newArr;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.form.personId = [];
|
|
|
|
|
|
}
|
2024-04-29 18:32:57 +08:00
|
|
|
|
this.getUpdatePersonListFn();
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
//切换 通知人
|
|
|
|
|
|
changeIntendanceIds(value) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
let arrList = this.notifierOrPeopleList;
|
|
|
|
|
|
let nameArr = [];
|
2022-06-08 14:51:11 +08:00
|
|
|
|
for (let i = 0; i < value.length; i++) {
|
|
|
|
|
|
for (let j = 0; j < arrList.length; j++) {
|
|
|
|
|
|
if (arrList[j].userId == value[i]) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
nameArr.push(arrList[j].workerName);
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.form.intendanceNames = nameArr.length > 0 ? nameArr.join(",") : "";
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//编辑按钮
|
|
|
|
|
|
editBtn(value) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
if (value.intendanceIds == "" || value.intendanceIds == null) {
|
|
|
|
|
|
this.form.intendanceIds = null;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.form.intendanceIds = value.intendanceIds.split(",");
|
2023-07-04 21:16:23 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
console.log("编辑", value);
|
|
|
|
|
|
this.form.regionName = value.regionName;
|
|
|
|
|
|
if (value.enterpriseInfos && value.enterpriseInfos.length > 0) {
|
|
|
|
|
|
this.form.dutyId = value.enterpriseInfos.map((item) => {
|
|
|
|
|
|
return item.id;
|
|
|
|
|
|
});
|
2024-04-29 23:08:22 +08:00
|
|
|
|
this.getUpdatePersonListFn();
|
2024-04-29 18:32:57 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
if (value.systemUsers && value.systemUsers.length > 0) {
|
2024-04-29 23:08:22 +08:00
|
|
|
|
const newArr = [];
|
2024-05-06 23:45:01 +08:00
|
|
|
|
value.systemUsers.map((item) => {
|
|
|
|
|
|
if (item.userId) {
|
|
|
|
|
|
newArr.push(item.userId);
|
2024-04-29 23:08:22 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
2024-04-29 23:08:22 +08:00
|
|
|
|
this.form.personId = newArr;
|
2024-05-06 23:45:01 +08:00
|
|
|
|
console.log(this.form.personId, 123456789);
|
2024-04-29 18:32:57 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
if (value.aiAnalyseHardWareRecords && value.aiAnalyseHardWareRecords.length > 0) {
|
|
|
|
|
|
this.form.aiDeviceId = value.aiAnalyseHardWareRecords.map((item) => {
|
|
|
|
|
|
return item.id;
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.form.aiDeviceId = []
|
|
|
|
|
|
}
|
|
|
|
|
|
this.form.remark = value.remark;
|
|
|
|
|
|
this.form.id = value.id;
|
|
|
|
|
|
this.title = "编辑区域";
|
|
|
|
|
|
this.dialogType = 2;
|
|
|
|
|
|
this.editDialog = true;
|
2024-05-09 20:17:15 +08:00
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.$refs["form"].clearValidate();
|
|
|
|
|
|
});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
//新增下级---按钮
|
|
|
|
|
|
newJuniorBtn(value) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
console.log(value);
|
2022-06-08 14:51:11 +08:00
|
|
|
|
this.form = {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
regionName: "",
|
|
|
|
|
|
dutyId: "",
|
|
|
|
|
|
aiDeviceId: "",
|
2022-06-08 14:51:11 +08:00
|
|
|
|
intendanceIds: [],
|
2024-05-06 23:45:01 +08:00
|
|
|
|
intendanceNames: "",
|
|
|
|
|
|
remark: "",
|
|
|
|
|
|
};
|
|
|
|
|
|
this.form.parentRegion = value.id;
|
2024-04-29 15:57:52 +08:00
|
|
|
|
// console.log(this.form)
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.editDialog = true;
|
|
|
|
|
|
this.title = this.$t("message.quality.newJunior");
|
|
|
|
|
|
this.dialogType = 3;
|
2024-06-07 17:45:09 +08:00
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.$refs["form"].clearValidate();
|
|
|
|
|
|
});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
2024-04-29 18:32:57 +08:00
|
|
|
|
// 获取整改单位列表
|
2024-05-06 23:45:01 +08:00
|
|
|
|
getUpdateUnitListFn() {
|
|
|
|
|
|
getEnterpriseInfoListApi({ projectSn: this.projectSn }).then((res) => {
|
2024-04-29 18:32:57 +08:00
|
|
|
|
console.log(res);
|
2024-05-06 23:45:01 +08:00
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
this.enterpriseInfoList = res.result;
|
2024-04-29 18:32:57 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
2024-04-29 18:32:57 +08:00
|
|
|
|
},
|
|
|
|
|
|
// 获取整改人列表
|
2024-05-06 23:45:01 +08:00
|
|
|
|
getUpdatePersonListFn() {
|
2022-06-08 14:51:11 +08:00
|
|
|
|
let data = {
|
2024-04-29 15:57:52 +08:00
|
|
|
|
projectSn: this.projectSn,
|
2024-05-06 23:45:01 +08:00
|
|
|
|
enterpriseId: this.form.dutyId ? this.form.dutyId.join(",") : "",
|
|
|
|
|
|
};
|
2022-06-08 14:51:11 +08:00
|
|
|
|
getProjectChilderSystemUserListApi(data).then((res) => {
|
2024-04-29 15:57:52 +08:00
|
|
|
|
console.log(res);
|
2022-06-08 14:51:11 +08:00
|
|
|
|
if (res.code == 200) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.notifierOrPeopleList = res.result;
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
2024-04-29 18:32:57 +08:00
|
|
|
|
// //获取 整改人 通知人下拉列表
|
|
|
|
|
|
// getNotifierOrPeopleList() {
|
|
|
|
|
|
// let data = {
|
|
|
|
|
|
// projectSn: this.projectSn,
|
|
|
|
|
|
// enterpriseId: this.enterpriseId
|
|
|
|
|
|
// }
|
|
|
|
|
|
// getProjectChilderSystemUserListApi(data).then((res) => {
|
|
|
|
|
|
// console.log(res);
|
|
|
|
|
|
// if (res.code == 200) {
|
|
|
|
|
|
// console.log('------整改人', res)
|
|
|
|
|
|
// console.log('------form', this.form)
|
|
|
|
|
|
// this.notifierOrPeopleList = res.result
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
|
|
|
|
|
// getEnterpriseInfoListApi({projectSn: this.projectSn}).then(res=>{
|
|
|
|
|
|
// console.log(res);
|
|
|
|
|
|
// if(res.code==200){
|
|
|
|
|
|
// this.enterpriseInfoList = res.result
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
|
|
|
|
|
// },
|
2022-06-08 14:51:11 +08:00
|
|
|
|
//弹窗---保存按钮
|
|
|
|
|
|
submit(formName) {
|
|
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
let data = {
|
|
|
|
|
|
dutyName: this.form.dutyName,
|
2024-04-29 23:56:15 +08:00
|
|
|
|
// dutyId: this.form.dutyId,
|
2024-04-29 23:43:21 +08:00
|
|
|
|
personId: this.form.personId,
|
2023-10-19 15:01:53 +08:00
|
|
|
|
// intendanceIds: this.form.intendanceIds.join(','),
|
2022-06-08 14:51:11 +08:00
|
|
|
|
intendanceNames: this.form.intendanceNames,
|
|
|
|
|
|
regionName: this.form.regionName,
|
|
|
|
|
|
remark: this.form.remark,
|
|
|
|
|
|
projectSn: this.projectSn,
|
2024-05-06 23:45:01 +08:00
|
|
|
|
parentRegion: this.form.parentRegion,
|
|
|
|
|
|
};
|
|
|
|
|
|
if (this.form.aiDeviceId && this.form.aiDeviceId.length > 0) {
|
|
|
|
|
|
data.aiAnalyseHardWareRecords = this.form.aiDeviceId.map((item) => {
|
|
|
|
|
|
return { id: item };
|
|
|
|
|
|
});
|
2023-02-27 18:47:21 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
if (this.form.dutyId && this.form.dutyId.length > 0) {
|
|
|
|
|
|
data.enterpriseInfos = this.form.dutyId.map((item) => {
|
|
|
|
|
|
return { id: item };
|
|
|
|
|
|
});
|
2024-04-29 18:32:57 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
if (this.form.personId && this.form.personId.length > 0) {
|
|
|
|
|
|
console.log(this.form.personId, 777888);
|
|
|
|
|
|
data.systemUsers = this.form.personId.map((item) => {
|
|
|
|
|
|
if (item) {
|
|
|
|
|
|
return { userId: item };
|
2024-04-29 23:08:22 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
2024-04-29 18:32:57 +08:00
|
|
|
|
}
|
2022-06-08 14:51:11 +08:00
|
|
|
|
if (this.dialogType == 1) {
|
|
|
|
|
|
addQualityRegionApi(data).then((res) => {
|
|
|
|
|
|
// console.log(res);
|
|
|
|
|
|
if (res.code == 200) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.$message.success(this.$t("message.quality.newSuccess"));
|
|
|
|
|
|
this.editDialog = false;
|
|
|
|
|
|
this.getQualityRegionList();
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
} else if (this.dialogType == 2) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
data.id = this.form.id;
|
2022-06-08 14:51:11 +08:00
|
|
|
|
editQualityRegionListApi(data).then((res) => {
|
|
|
|
|
|
if (res.code == 200) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.editDialog = false;
|
|
|
|
|
|
this.$message.success(res.message);
|
|
|
|
|
|
this.getQualityRegionList();
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
} else if (this.dialogType == 3) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
data.parentRegion = this.form.parentRegion;
|
2022-06-08 14:51:11 +08:00
|
|
|
|
addQualityRegionApi(data).then((res) => {
|
|
|
|
|
|
if (res.code == 200) {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.$message.success(this.$t("message.quality.newSuccess"));
|
|
|
|
|
|
this.editDialog = false;
|
|
|
|
|
|
this.getQualityRegionList();
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
} else {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
return false;
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
//删除 按钮
|
|
|
|
|
|
deleteBtn(value) {
|
2023-02-27 18:47:21 +08:00
|
|
|
|
this.$confirm(
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.$t("message.quality.deleteHint"),
|
|
|
|
|
|
this.$t("message.quality.hint"),
|
2023-02-27 18:47:21 +08:00
|
|
|
|
{
|
2024-05-06 23:45:01 +08:00
|
|
|
|
confirmButtonText: this.$t("message.quality.confirm"),
|
|
|
|
|
|
cancelButtonText: this.$t("message.quality.cancel"),
|
|
|
|
|
|
type: "warning",
|
2023-02-27 18:47:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
)
|
2022-06-08 14:51:11 +08:00
|
|
|
|
.then(() => {
|
|
|
|
|
|
let data = {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
id: value.id,
|
|
|
|
|
|
};
|
2022-06-08 14:51:11 +08:00
|
|
|
|
|
|
|
|
|
|
deleteQualityRegionListApi(data).then((res) => {
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
this.$message({
|
2024-05-06 23:45:01 +08:00
|
|
|
|
type: "success",
|
|
|
|
|
|
message: this.$t("message.quality.successfullyDelete") + "!",
|
|
|
|
|
|
});
|
|
|
|
|
|
this.getQualityRegionList();
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2024-05-06 23:45:01 +08:00
|
|
|
|
});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
})
|
2024-05-06 23:45:01 +08:00
|
|
|
|
.catch(() => {});
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2023-10-13 17:51:24 +08:00
|
|
|
|
close() {
|
|
|
|
|
|
this.$nextTick(() => {
|
2024-05-06 23:45:01 +08:00
|
|
|
|
this.$refs["form"].clearValidate();
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
2022-06-08 14:51:11 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
|
.flex {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
.flex2 {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.checkPoint {
|
|
|
|
|
|
padding: 16px 20px;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
.edit {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
img {
|
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|