49a47e4848244d976a0e95a64b06c91a0f02b943.svn-base 5.0 KB

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