| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <template>
- <div>
- <DialogCom
- title="履职任务详情"
- :visible.sync="isShow"
- width="1200px"
- @close="onClose"
- >
- <el-descriptions
- class="margin-top"
- size="medium"
- border
- :column="2"
- v-if="detail"
- style="width: 100%;"
- :label-style="labelStyle"
- :contentStyle="content_style"
- >
- <el-descriptions-item label="任务名称" labelClassName="gx_info_label">{{
- detail.taskName
- }}</el-descriptions-item>
- <el-descriptions-item label="任务进度" labelClassName="gx_info_label">{{
- getLabel(statusOptions, detail.status)
- }}</el-descriptions-item>
- <el-descriptions-item label="任务时间" labelClassName="gx_info_label"
- >{{ dayjs(detail.planStartTime).format("YYYY-MM-DD HH:mm") }}-{{
- dayjs(detail.planEndTime).format("YYYY-MM-DD HH:mm")
- }}</el-descriptions-item
- >
- <el-descriptions-item label="履职机构" labelClassName="gx_info_label"
- >{{ detail.orgName }}
- </el-descriptions-item>
- <el-descriptions-item label="履职人员" labelClassName="gx_info_label">{{
- detail.roleNames.join("、")
- }}</el-descriptions-item>
- <el-descriptions-item label="登记人" labelClassName="gx_info_label">{{
- detail.submitorName
- }}</el-descriptions-item>
- <el-descriptions-item
- label="隐患问题数"
- labelClassName="gx_info_label"
- >{{ detail.exceptionCount }}</el-descriptions-item
- >
- <el-descriptions-item label="登记时间" labelClassName="gx_info_label">{{
- dayjs(detail.submitTime).format("YYYY-MM-DD HH:mm")
- }}</el-descriptions-item>
- </el-descriptions>
- <div class="extend_mod">
- <el-table
- size="small"
- :data="tableData"
- row-key="itemId"
- height="441"
- border
- style="max-height: 450px; overflow-y: auto"
- default-expand-all
- :show-header="false"
- >
- <!-- align="left" -->
- <el-table-column type="expand">
- <template slot-scope="props">
- <el-table
- size="small"
- v-if="props.row.dataInfoList"
- :data="props.row.dataInfoList"
- >
- <el-table-column
- label="履职内容"
- align="left"
- width="250"
- prop="pointName"
- >
- <template slot-scope="scope">
- <pre>{{ scope.row.pointName }}</pre>
- </template>
- </el-table-column>
- <el-table-column
- label="履职区域"
- align="center"
- :show-overflow-tooltip="true"
- prop="areaName"
- >
- </el-table-column>
- <el-table-column
- label="履职点位"
- align="center"
- :show-overflow-tooltip="true"
- prop="checkName"
- >
- </el-table-column>
- <el-table-column
- label="检查结果"
- align="center"
- :show-overflow-tooltip="true"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.executeResult === '0'">
- <!-- <i class="circle" style="background-color: #1890ff" /> -->
- <label> 正常</label> </span
- ><span v-else>
- <!-- <i class="circle" style="background-color: #f5222d" /> -->
- <label> 异常</label>
- </span>
- </template>
- </el-table-column>
- <!-- <el-table-column
- label="履职时间"
- align="center"
- :show-overflow-tooltip="true"
- prop="executeTime"
- >
- </el-table-column> -->
- <el-table-column
- label="问题描述"
- align="center"
- :show-overflow-tooltip="true"
- prop="resRemark"
- >
- </el-table-column>
- <el-table-column label="异常图片" align="center">
- <template slot-scope="scope">
- <div
- class="block"
- v-for="img in scope.row.appResumptionDataImgList"
- >
- <el-image
- style="width: 50px; height: 50px; margin-right: 5px"
- :src="img.imgPath"
- fit="fit"
- :preview-src-list="
- imgPreviewSrcList(scope.row.appResumptionDataImgList)
- "
- >
- </el-image>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </template>
- </el-table-column>
- <el-table-column
- label="履职项"
- prop="itemName"
- :show-overflow-tooltip="true"
- />
- </el-table>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button @click="onHide">关闭</el-button>
- </div>
- </DialogCom>
- </div>
- </template>
- <script>
- import * as api from "@/api/resumption/taskManger.js";
- import dayjs from "dayjs";
- import { getLabel } from "@/views/commonOption.js";
- export default {
- data() {
- return {
- isShow: false,
- labelStyle: {
- color: "#000",
- "text-align": "center",
- height: "40px",
- "min-width": "150px",
- "word-break": "keep-all",
- },
- content_style: {
- "text-align": "left",
- "min-width": "300px",
- "word-break": "break-all",
- },
- title: "",
- tableData: [],
- detail: null,
- };
- },
- props: ["statusOptions"],
- methods: {
- dayjs,
- getLabel,
- async refresh(id) {
- let detail = (await api.one(id)).data;
- if (detail && detail.items && detail.items.length > 0) {
- this.tableData = detail.items;
- } else {
- this.tableData = [];
- }
- this.detail = detail;
- },
- async show(id, title) {
- this.title = title;
- await this.refresh(id);
- this.isShow = true;
- },
- onHide() {
- this.isShow = false;
- },
- onClose() {
- this.detail = null;
- this.tableData = [];
- },
- imgPreviewSrcList(imgList) {
- let srcList = [];
- imgList.forEach((element) => {
- srcList.push(element.imgPath);
- });
- return srcList;
- },
- valueColor(v) {
- let color = "";
- switch (v) {
- case "0":
- color = "1890FF";
- break;
- case "1":
- color = "F5222D";
- break;
- }
- return "color:" + color;
- },
- valueBgColor(v) {
- let color = "";
- switch (v) {
- case "0":
- color = "1890FF";
- break;
- case "1":
- color = "F5222D";
- break;
- }
- return "background-color:" + color;
- },
- },
- };
- </script>
- <style lang="scss">
- .dialog-footer {
- margin-top: 20px;
- }
- .block {
- /* padding: 10px 10px; */
- text-align: center;
- /* border-right: 1px solid #eff2f6; */
- display: inline-block;
- /* width: 20%;
- vertical-align: top; */
- }
- .circle {
- display: inline-block;
- width: 5px;
- height: 5px;
- border-radius: 5px;
- background-color: red;
- border: none;
- margin-bottom: 3px;
- }
- </style>
|