|
|
@@ -2,39 +2,39 @@
|
|
|
<div class="app-container">
|
|
|
<el-descriptions title="检查任务">
|
|
|
<el-descriptions-item label="检查名称">{{
|
|
|
- info.taskName
|
|
|
+ taskInfo.taskName
|
|
|
}}</el-descriptions-item>
|
|
|
<el-descriptions-item label="检查机构">{{
|
|
|
- info.checkOrgName
|
|
|
+ taskInfo.checkOrgName
|
|
|
}}</el-descriptions-item>
|
|
|
<el-descriptions-item label="受检机构">{{
|
|
|
- info.beCheckedOrgName
|
|
|
+ taskInfo.beCheckedOrgName
|
|
|
}}</el-descriptions-item>
|
|
|
<el-descriptions-item label="检查角色"
|
|
|
>{{
|
|
|
- info.checkRoles ? info.checkRoles.map((r) => r.name).join(",") : ""
|
|
|
+ taskInfo.checkRoles ? taskInfo.checkRoles.map((r) => r.name).join(",") : ""
|
|
|
}}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="开始日期"
|
|
|
- >{{ dayjs(info.planStartTime).format("YYYY-MM-DD") }}
|
|
|
+ >{{ dayjs(taskInfo.planStartTime).format("YYYY-MM-DD") }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="截止日期"
|
|
|
- >{{ dayjs(info.planEndTime).format("YYYY-MM-DD") }}
|
|
|
+ >{{ dayjs(taskInfo.planEndTime).format("YYYY-MM-DD") }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="创建时间"
|
|
|
- >{{ dayjs(info.planStartTime).format("YYYY-MM-DD") }}
|
|
|
+ >{{ dayjs(taskInfo.planStartTime).format("YYYY-MM-DD") }}
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="检查组成员"
|
|
|
><el-input
|
|
|
style="width: 80%; margin-top: -8px"
|
|
|
placeHolder="请输入检查组成员"
|
|
|
- v-model="info.checkTeam"
|
|
|
+ v-model="taskInfo.checkTeam"
|
|
|
v-if="isRegister"
|
|
|
></el-input>
|
|
|
- <span v-else>{{ info.checkTeam }}</span>
|
|
|
+ <span v-else>{{ taskInfo.checkTeam }}</span>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="检查状态"
|
|
|
- >{{ dayjs(info.planStartTime).format("YYYY-MM-DD") }}
|
|
|
+ >{{ dayjs(taskInfo.planStartTime).format("YYYY-MM-DD") }}
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
<div>
|
|
|
@@ -48,7 +48,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <div class="area_content" v-for="area in info.checkList">
|
|
|
+ <div class="area_content" v-for="area in taskInfo.checkList">
|
|
|
<div>
|
|
|
{{ area.areaName }}
|
|
|
</div>
|
|
|
@@ -133,10 +133,10 @@
|
|
|
point.rectificationDeadline
|
|
|
)
|
|
|
}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="整改图片">
|
|
|
+ <el-descriptions-item label="异常图片">
|
|
|
<div class="imageList">
|
|
|
<el-image
|
|
|
- style="width: 100px; height: 100px"
|
|
|
+ style="width: 100px; height: 100px;margin:10px;"
|
|
|
v-if="point.imgData"
|
|
|
v-for="url in point.imgData"
|
|
|
:src="url"
|
|
|
@@ -167,7 +167,7 @@
|
|
|
</div>
|
|
|
<SelectPoint
|
|
|
ref="SelectPoint"
|
|
|
- :orgType="info.beCheckOrgType"
|
|
|
+ :orgType="taskInfo.beCheckOrgType"
|
|
|
@select="onSelectPoint"
|
|
|
></SelectPoint>
|
|
|
<UserSelector
|
|
|
@@ -190,7 +190,7 @@ export default {
|
|
|
name: "safetyCheckRegister",
|
|
|
data() {
|
|
|
return {
|
|
|
- info: {},
|
|
|
+ taskInfo: {},
|
|
|
exceptionRules: {
|
|
|
remark: [{ required: true, message: "请输入情况描述" }],
|
|
|
rectificationDeadline: [{ required: true, message: "请选择整改期限" }],
|
|
|
@@ -211,17 +211,17 @@ export default {
|
|
|
showSaveBtn() {
|
|
|
return (
|
|
|
this.isRegister &&
|
|
|
- this.info.status != 3 &&
|
|
|
+ this.taskInfo.status != 3 &&
|
|
|
(checkPermi(["core:safetycheck:register"]) ||
|
|
|
- this.info.grantUserId == this.userId)
|
|
|
+ this.taskInfo.grantUserId == this.userId)
|
|
|
);
|
|
|
},
|
|
|
showGrantBtn() {
|
|
|
let userRoleIds = this.roleList.map((r) => r.roleId);
|
|
|
- let taskRoleIds = this.info.checkRoles.map((r) => r.id);
|
|
|
+ let taskRoleIds = this.taskInfo.checkRoles?this.taskInfo.checkRoles.map((r) => r.id):[];
|
|
|
return (
|
|
|
this.isRegister &&
|
|
|
- this.info.status != 3 &&
|
|
|
+ this.taskInfo.status != 3 &&
|
|
|
userRoleIds.find((ur) => taskRoleIds.includes(ur))
|
|
|
);
|
|
|
},
|
|
|
@@ -236,13 +236,13 @@ export default {
|
|
|
api.info(id).then((r) => {
|
|
|
this.mode = mode;
|
|
|
if (mode != "register") {
|
|
|
- this.info = r.data;
|
|
|
+ this.taskInfo = r.data;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (r.data.status == 3) {
|
|
|
this.mode = "info";
|
|
|
- this.info = r.data;
|
|
|
+ this.taskInfo = r.data;
|
|
|
this.$message.info("任务已完成,将显示详情");
|
|
|
return;
|
|
|
}
|
|
|
@@ -255,7 +255,7 @@ export default {
|
|
|
userRoleIds.find((ur) => taskRoleIds.includes(ur))) ||
|
|
|
r.data.grantUserId == this.userId
|
|
|
) {
|
|
|
- this.info = r.data;
|
|
|
+ this.taskInfo = r.data;
|
|
|
} else {
|
|
|
this.$message.warning("用户不能执行该任务");
|
|
|
this.mode = "info";
|
|
|
@@ -267,7 +267,7 @@ export default {
|
|
|
getLabel,
|
|
|
onAddPoint() {
|
|
|
this.pointIdsWhenAdd = [];
|
|
|
- this.info.checkList.forEach((a) => {
|
|
|
+ this.taskInfo.checkList.forEach((a) => {
|
|
|
a.itemList.forEach((i) => {
|
|
|
i.pointList.forEach((p) => {
|
|
|
this.pointIdsWhenAdd.push(p.pointId);
|
|
|
@@ -283,7 +283,7 @@ export default {
|
|
|
if (this.pointIdsWhenAdd.indexOf(p.id) >= 0) {
|
|
|
continue;
|
|
|
}
|
|
|
- let info = this.info;
|
|
|
+ let info = this.taskInfo;
|
|
|
let area = info.checkList.find((a) => a.areaId === p.areaId);
|
|
|
if (!area) {
|
|
|
area = { areaId: p.areaId, areaName: p.areaName, itemList: [] };
|
|
|
@@ -340,8 +340,8 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (area.itemList.length === 0) {
|
|
|
- index = this.info.checkList.indexOf(area);
|
|
|
- this.info.checkList.splice(index, 1);
|
|
|
+ index = this.taskInfo.checkList.indexOf(area);
|
|
|
+ this.taskInfo.checkList.splice(index, 1);
|
|
|
}
|
|
|
},
|
|
|
onImageChanged(point, value) {
|
|
|
@@ -357,10 +357,10 @@ export default {
|
|
|
|
|
|
api
|
|
|
.grant({
|
|
|
- planId: this.info.planId,
|
|
|
- beCheckedOrgId: this.info.beCheckedOrgId,
|
|
|
- taskId: this.info.id,
|
|
|
- ymdDate: this.info.ymdDate,
|
|
|
+ planId: this.taskInfo.planId,
|
|
|
+ beCheckedOrgId: this.taskInfo.beCheckedOrgId,
|
|
|
+ taskId: this.taskInfo.id,
|
|
|
+ ymdDate: this.taskInfo.ymdDate,
|
|
|
userId: selected[0].id,
|
|
|
})
|
|
|
.then((r) => {
|
|
|
@@ -372,8 +372,8 @@ export default {
|
|
|
this.$refs.UserSelector.show();
|
|
|
},
|
|
|
onSave() {
|
|
|
- this.info.isSubmit = 0;
|
|
|
- api.submit(this.info).then((r) => {
|
|
|
+ this.taskInfo.isSubmit = 0;
|
|
|
+ api.submit(this.taskInfo).then((r) => {
|
|
|
this.$message.info("保存成功");
|
|
|
});
|
|
|
},
|
|
|
@@ -391,9 +391,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (isOk) {
|
|
|
- this.info.isSubmit = 1;
|
|
|
- api.submit(this.info).then((r) => {
|
|
|
+ this.taskInfo.isSubmit = 1;
|
|
|
+ api.submit(this.taskInfo).then((r) => {
|
|
|
this.$message.info("提交成功");
|
|
|
+ this.$tab.closePageAndPushPrev();
|
|
|
});
|
|
|
}
|
|
|
},
|