d8fc79ec508ab0801bd2142d3db30df8188c7012.svn-base 5.7 KB

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