|
|
@@ -0,0 +1,150 @@
|
|
|
+<template>
|
|
|
+ <div class="rule-type">
|
|
|
+ <DialogCom title="检查任务详情" :visible.sync="isShow" width="1500px" >
|
|
|
+ <el-descriptions :column="4" border :label-style="labelStyle" :contentStyle="content_style">
|
|
|
+ <el-descriptions-item label="任务名称">{{
|
|
|
+ formData.planName
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="任务类型">{{
|
|
|
+ getLabel(dict.type.check_type, formData.checkType)
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="任务周期">{{
|
|
|
+ getLabel(dict.type.check_cycle, formData.planCycle)
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="开始时间" v-if="formData.planCycle == 6">{{
|
|
|
+ dayjs(formData.startDate).format("YYYY-MM-DD")
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="结束时间" v-if="formData.planCycle == 6">{{
|
|
|
+ dayjs(formData.endDate).format("YYYY-MM-DD")
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="机构主体类型">{{
|
|
|
+ getLabel(orgTypeOptions, formData.execOrgType)
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="检查人员">
|
|
|
+ {{
|
|
|
+ formData.roleList .map((r) => r.roleName).join("、")
|
|
|
+ }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="受检机构类型">{{
|
|
|
+ formData.checkOrgTypeList
|
|
|
+ .map((t) => getLabel(orgTypeOptions, t.typeId))
|
|
|
+ .join("、")
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="任务次数" :span="formData.planCycle!=6 ?2:1">{{
|
|
|
+ formData.count
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item
|
|
|
+ label="检查主体"
|
|
|
+ :span="4"
|
|
|
+ v-if="formData.execOrgList && formData.execOrgList.length > 0"
|
|
|
+ >{{
|
|
|
+ formData.execOrgList.map((org) => org.shortName).join("、")
|
|
|
+ }}</el-descriptions-item
|
|
|
+ >
|
|
|
+ <el-descriptions-item
|
|
|
+ label="受检机构"
|
|
|
+ :span="4"
|
|
|
+ v-if="formData.checkOrgList && formData.checkOrgList.length > 0"
|
|
|
+ >{{
|
|
|
+ formData.checkOrgList.map((org) => org.shortName).join("、")
|
|
|
+ }}</el-descriptions-item
|
|
|
+ >
|
|
|
+ <el-descriptions-item label="备注" :span="formData.planCycle!=6">{{
|
|
|
+ formData.note
|
|
|
+ }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <el-table :data="tableData" style="width: 100%" height="400px">
|
|
|
+ <el-table-column label="是否扫描">
|
|
|
+ <template v-slot="{ row }">
|
|
|
+ {{ row.pointScan ? "是" : "否" }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="必完成项">
|
|
|
+ <template v-slot="{ row }">
|
|
|
+ {{ row.required ? "是" : "否" }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="ruleName" label="检查手册"> </el-table-column>
|
|
|
+ <el-table-column prop="itemName" label="检查项"> </el-table-column>
|
|
|
+ <el-table-column prop="pointName" label="检查内容" width="300px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <pre>{{ scope.row.pointName }}</pre>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="areaName" label="检查区域"> </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-top: 20px">
|
|
|
+ <el-button @click="onHide">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ </DialogCom>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { findAllRole } from "@/api/system/role";
|
|
|
+import * as api from "@/api/safetycheck/plan";
|
|
|
+import { getLabel } from "@/views/commonOption.js";
|
|
|
+import dayjs from 'dayjs';
|
|
|
+export default {
|
|
|
+ dicts: ["check_type", "check_cycle", "check_status"],
|
|
|
+ props: {
|
|
|
+ orgTypeOptions: {
|
|
|
+ type: Array,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isShow: false,
|
|
|
+ tableData: [],
|
|
|
+ formData: {
|
|
|
+ roleList: [],
|
|
|
+ checkOrgTypeList: [],
|
|
|
+ },
|
|
|
+ // resumptionRoles: [],
|
|
|
+ labelStyle: {
|
|
|
+ color: "#000",
|
|
|
+ "text-align": "center",
|
|
|
+ height: "40px",
|
|
|
+ "width": "150px",
|
|
|
+ "word-break": "keep-all",
|
|
|
+ },content_style: {
|
|
|
+ "text-align": "left",
|
|
|
+ "min-width": "150px",
|
|
|
+ "text-wrap":'no-wrap'
|
|
|
+ // "word-break": "break-all",
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getLabel,
|
|
|
+ dayjs,
|
|
|
+ show(id) {
|
|
|
+ this.tableData = null;
|
|
|
+ api.get(id).then((r) => {
|
|
|
+ this.formData = r.data;
|
|
|
+ this.tableData = r.data.rulePointList;
|
|
|
+ this.isShow = true;
|
|
|
+ // if (this.formData.execOrgType) {
|
|
|
+ // this.getRolesByOrg();
|
|
|
+ // }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // getRolesByOrg() {
|
|
|
+ // if (this.formData.execOrgType != null) {
|
|
|
+ // let params = {
|
|
|
+ // orgType: this.formData.execOrgType,
|
|
|
+ // };
|
|
|
+
|
|
|
+ // findAllRole(params).then((res) => {
|
|
|
+ // this.resumptionRoles = res.data;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ onHide() {
|
|
|
+ this.isShow = false;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style></style>
|