detail.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <div class="app-container">
  3. <el-descriptions title="检查任务详情" border :labelStyle="{'width':'180px'}">
  4. <el-descriptions-item label="任务名称">{{
  5. taskInfo.taskName
  6. }}</el-descriptions-item>
  7. <el-descriptions-item label="任务进度"
  8. >{{ getLabel(dict.type.safety_check_status, taskInfo.status) }}
  9. </el-descriptions-item>
  10. <el-descriptions-item label="登记人"
  11. >{{ taskInfo.submitBy }}
  12. </el-descriptions-item>
  13. <el-descriptions-item label="任务开始时间"
  14. >{{ dayjs(taskInfo.planStartTime).format("YYYY年MM月DD") }}
  15. </el-descriptions-item>
  16. <el-descriptions-item label="任务结束时间"
  17. >{{ dayjs(taskInfo.planEndTime).format("YYYY年MM月DD") }}
  18. </el-descriptions-item>
  19. <el-descriptions-item label="受检机构">{{
  20. taskInfo.beCheckedOrgName
  21. }}</el-descriptions-item>
  22. <el-descriptions-item label="检查主体">{{
  23. taskInfo.checkOrgName
  24. }}</el-descriptions-item>
  25. <el-descriptions-item label="检查人员"
  26. >{{
  27. taskInfo.checkRoles
  28. ? taskInfo.checkRoles.map((r) => r.name).join(",")
  29. : ""
  30. }}
  31. </el-descriptions-item>
  32. <el-descriptions-item label="检查时间"
  33. >{{
  34. taskInfo.submitTime
  35. ? dayjs(taskInfo.submitTime).format("YYYY年MM月DD")
  36. : ""
  37. }}
  38. </el-descriptions-item>
  39. <el-descriptions-item label="隐患问题数"
  40. >{{ taskInfo.exceptionCount }}
  41. </el-descriptions-item>
  42. <el-descriptions-item label="检查组成员" :span="2"
  43. >{{ taskInfo.checkTeam }}
  44. </el-descriptions-item>
  45. </el-descriptions>
  46. <div class="itemDetail">
  47. <div>
  48. <el-table
  49. size="small"
  50. :data="taskInfo.checkList"
  51. row-key="itemId"
  52. height="500"
  53. border
  54. style=" overflow-y: auto"
  55. default-expand-all
  56. :show-header="false"
  57. :row-style="{'backgroundColor':'rgb(215, 215, 215)'}"
  58. >
  59. <el-table-column type="expand" width="60">
  60. <template slot-scope="scope">
  61. <el-table :data="scope.row.pointList" class="point-table" size="small" :header-cell-style="{'backgroundColor':'rgb(255, 255, 255) !important'} ">
  62. <el-table-column type="index" label="序号" width="60" align="center"/>
  63. <el-table-column
  64. align="center"
  65. prop="pointName"
  66. label="检查内容"
  67. min-width="600"
  68. >
  69. <template slot-scope="r">
  70. <div class="text_nbsp">
  71. {{r.row.pointName}}
  72. </div>
  73. </template>
  74. </el-table-column>
  75. <el-table-column
  76. align="center"
  77. prop="areaName"
  78. label="检查区域"
  79. min-width="150"
  80. >
  81. </el-table-column>
  82. <el-table-column align="center" prop="status" label="检查结果" min-width="150">
  83. <template slot-scope="r">
  84. {{
  85. r.row.status == null
  86. ? "-"
  87. : r.row.status == 0
  88. ? "正常"
  89. : "异常"
  90. }}
  91. </template>
  92. </el-table-column>
  93. <el-table-column align="center" prop="remark" label="问题描述" min-width="200">
  94. <template slot-scope="r">
  95. {{ r.row.remark ? r.row.remark : "-" }}
  96. </template>
  97. </el-table-column>
  98. <el-table-column align="center" prop="imgData" label="异常图片" min-width="200">
  99. <template slot-scope="r">
  100. <div v-if="r.row.imgData && r.row.imgData.length > 0">
  101. <el-image
  102. style="width: 30px; height: 30px; margin: 0 10px"
  103. v-for="img in r.row.imgData"
  104. :key="img"
  105. :src="img.imgPath"
  106. :preview-src-list="
  107. r.row.imgData
  108. ? r.row.imgData.map((r) => r.imgPath)
  109. : []
  110. "
  111. ></el-image>
  112. </div>
  113. <span v-else>-</span>
  114. </template>
  115. </el-table-column>
  116. </el-table>
  117. </template>
  118. </el-table-column>
  119. <el-table-column
  120. label="检查项"
  121. prop="itemName"
  122. :show-overflow-tooltip="true"
  123. ><template slot-scope="scope">
  124. ({{ arabicToChinese(scope.$index + 1) }}){{
  125. scope.row.itemName
  126. }}
  127. </template>
  128. </el-table-column>
  129. </el-table>
  130. </div>
  131. </div>
  132. <div class="dialog-footer">
  133. <el-button @click="onClose">关闭</el-button>
  134. </div>
  135. </div>
  136. </template>
  137. <script>
  138. import { mapGetters } from "vuex";
  139. import * as api from "@/api/safetycheck/register.js";
  140. import dayjs from "dayjs";
  141. import { getLabel } from "@/views/commonOption.js";
  142. import { arabicToChinese } from "@/utils/util.js";
  143. export default {
  144. name: "safetyCheckRegister",
  145. data() {
  146. return {
  147. taskInfo: {},
  148. itemIds: [],
  149. };
  150. },
  151. dicts: ["safety_check_status"],
  152. components: {},
  153. computed: {},
  154. mounted() {
  155. let id = this.$route.params.taskId;
  156. let mode = this.$route.query.mode;
  157. let request = api.appinfo;
  158. request(id).then((r) => {
  159. this.taskInfo = r.data;
  160. this.itemIds = r.data.checkList.map((c) => c.itemId);
  161. });
  162. },
  163. methods: {
  164. dayjs,
  165. getLabel,
  166. arabicToChinese,
  167. onClose() {
  168. this.$tab.closePageAndPushPrev();
  169. },
  170. },
  171. };
  172. </script>
  173. <style lang="scss" scoped>
  174. .el-row-button {
  175. margin-top: 20px;
  176. }
  177. .itemDetail {
  178. max-height: calc(100% - 300px);
  179. overflow-y: auto;
  180. margin-top: 20px;
  181. }
  182. .dialog-footer {
  183. width: 100%;
  184. text-align: right;
  185. border-top: #b8bdc0 1px solid;
  186. padding-top: 10px;
  187. padding-right: 30px;
  188. position: absolute;
  189. bottom: 30px;
  190. right: 0px;
  191. }
  192. .el-descriptions {
  193. ::v-deep .el-descriptions__body {
  194. background-color: transparent !important;
  195. }
  196. }
  197. .point-table{
  198. margin-top:-10px !important;
  199. margin-bottom:-10px !important;
  200. }
  201. </style>