ffd3b1d92a0a1f7fdc63211002fafcec9b032f17.svn-base 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <div id="shuikutianbaoId" >
  3. <el-dialog :title="currentObjectName" @close="closeDialog" :visible.sync="dialogFormVisible">
  4. <div v-loading="tableLoading" :style="{'height':testHeight+'px',}" ref="dialogHeight">
  5. <el-table border :data="tableData" style="width: 100%">
  6. <!--<el-table-column-->
  7. <!--show-overflow-tooltip="true"-->
  8. <!--prop="nm"-->
  9. <!--label="问题名称"-->
  10. <!--min-width="100"-->
  11. <!--align="center"-->
  12. <!--&gt;</el-table-column>-->
  13. <el-table-column
  14. show-overflow-tooltip="true"
  15. prop="inspPblmName"
  16. label="问题类别"
  17. min-width="100"
  18. align="center"
  19. ></el-table-column>
  20. <!--<el-table-column-->
  21. <!--header-align="center"-->
  22. <!--align="center"-->
  23. <!--show-overflow-tooltip="true"-->
  24. <!--min-width="120"-->
  25. <!--prop="inspPblmCate"-->
  26. <!--label="问题严重程度"-->
  27. <!--&gt;-->
  28. <!--<template slot-scope="scope">-->
  29. <!--<span-->
  30. <!--style="padding: 3px 10px;background:#27C19F;border-radius:15px;color:rgba(255,255,255,1)"-->
  31. <!--v-if="scope.row.inspPblmCate == 0"-->
  32. <!--&gt;一般</span>-->
  33. <!--<span-->
  34. <!--style="padding: 3px 10px;background:#E6A23C;border-radius:15px;color:rgba(255,255,255,1)"-->
  35. <!--v-if="scope.row.inspPblmCate == 1"-->
  36. <!--&gt;较重</span>-->
  37. <!--<span-->
  38. <!--style="padding: 3px 10px;background:#F56C6C;border-radius:15px;color:rgba(255,255,255,1)"-->
  39. <!--v-if="scope.row.inspPblmCate == 2"-->
  40. <!--&gt;严重</span>-->
  41. <!--</template>-->
  42. <!--</el-table-column>-->
  43. <el-table-column
  44. header-align="center"
  45. align="center"
  46. min-width="120"
  47. prop="ifCasePblm"
  48. label="是否典型"
  49. >
  50. <template slot-scope="scope">
  51. <span v-if="scope.row.ifCasePblm == 1">典型</span>
  52. <span v-if="scope.row.ifCasePblm == 0">非典型</span>
  53. </template>
  54. </el-table-column>
  55. <el-table-column
  56. prop="collTime"
  57. label="上报时间"
  58. align="center"
  59. :formatter="timestampToTime"
  60. show-overflow-tooltip="true"
  61. min-width="170"
  62. ></el-table-column>
  63. <el-table-column
  64. align="center"
  65. prop="address"
  66. min-width="100"
  67. label="操作"
  68. show-overflow-tooltip
  69. fixed="right"
  70. >
  71. <template slot-scope="scope">
  72. <el-button size="mini" type="primary" @click="showDetails(scope.row.pblmId)">详情</el-button>
  73. </template>
  74. </el-table-column>
  75. </el-table>
  76. </div>
  77. <!-- 添加/编辑人员弹窗 -->
  78. </el-dialog>
  79. <!-- 详情弹框 -->
  80. <el-dialog class="outerDialog" title="问题详情" :visible.sync="qusDetails">
  81. <dcdxTableListDetails :problemId="currentProblemId"></dcdxTableListDetails>
  82. <!-- <span slot="footer">
  83. <el-button style="margin-top:5px;" @click="qusDetails = false">返回</el-button>
  84. </span>-->
  85. </el-dialog>
  86. </div>
  87. </template>
  88. <script>
  89. import request from "../../utils/gw_ajax_request.js";
  90. export default {
  91. components: {
  92. dcdxTableListDetails: resolve => {
  93. require(["../../views/duChaWenTi/supervisionDetails_dixiashui.vue"], resolve);
  94. }
  95. },
  96. props: [
  97. "currentId",
  98. "currentObjectName"
  99. ],
  100. data() {
  101. return {
  102. testHeight: window.innerHeight * 0.7,
  103. tableLoading: true,
  104. dialogHeightA: "",
  105. value: "",
  106. dialogShow: false,
  107. currentViewId: "基础信息",
  108. dialogFormVisible: true,
  109. pageNum: 1,
  110. pageSize: 10,
  111. problemForm: {},
  112. tableData: [],
  113. qusDetails: false,
  114. currentProblemId: '',
  115. };
  116. },
  117. computed: {
  118. persId() {
  119. return localStorage.getItem("userid")
  120. ? localStorage.getItem("userid")
  121. : "1098101939614724096";
  122. }
  123. },
  124. mounted() {
  125. // this.getQusList();
  126. this.$nextTick(() => {
  127. this.dialogHeightA = this.$refs.dialogHeight.offsetHeight - 80;
  128. this.tableData = this.currentId;
  129. this.tableLoading = false;
  130. });
  131. },
  132. watch: {},
  133. methods: {
  134. getQusList() {
  135. this.problemForm.regid = this.currentId;
  136. // this.problemForm.objType = this.objType;
  137. // this.problemForm.pageNum = this.pageNum;
  138. // this.problemForm.pageSize = this.pageSize;
  139. request
  140. .post(`/dc/insp/pblm/list/${this.persId}`, this.problemForm)
  141. .then(res => {
  142. if (res.success) {
  143. this.tableData = res.data.list;
  144. this.tableLoading = false;
  145. }
  146. });
  147. },
  148. showDetails(id) {
  149. this.currentProblemId = id;
  150. this.qusDetails = true;
  151. },
  152. appearDialog(type) {
  153. this.dialogShow = true;
  154. // this.problemSmallType = type
  155. },
  156. closePDialog() {
  157. this.dialogShow = false;
  158. },
  159. showDialog() {
  160. this.dialogFormVisible = true;
  161. },
  162. cancelHandler() {
  163. this.$emit("cancelHandler");
  164. },
  165. addShuiKuSuccess() {
  166. this.$emit("addShuiKuSuccess");
  167. },
  168. closeDialog() {
  169. this.$emit("cancelHandler");
  170. },
  171. timestampToTime(row, column) {
  172. var date = new Date(row.collTime);
  173. var Y = date.getFullYear() + "-";
  174. var M =
  175. (date.getMonth() + 1 < 10
  176. ? "0" + (date.getMonth() + 1)
  177. : "0" + date.getMonth() + 1) + "-";
  178. var D =
  179. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  180. var h =
  181. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  182. var m =
  183. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  184. return Y + M + D + h + m;
  185. }
  186. }
  187. };
  188. </script>
  189. <style>
  190. #shuikutianbaoId .el-dialog {
  191. margin-top: 10vh;
  192. }
  193. #shuikutianbaoId .el-dialog .el-dialog__body {
  194. padding: 5px 20px;
  195. }
  196. </style>