14b0c4261ccfea8600b5a19c861791c5e4493312.svn-base 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <template>
  2. <div :style="{'height': tableHeight1 + 'px'}" class="pblmRectifyReviewSituation">
  3. <el-button @click="addProblem" type="primary" style="float: right;margin-bottom: 10px">新增整改问题
  4. </el-button>
  5. <el-table
  6. v-loading="loading"
  7. border
  8. ref="multipleTable"
  9. :data="problemList"
  10. :height="tableHeight"
  11. tooltip-effect="dark"
  12. style="width: 100%">
  13. <el-table-column align="center" type="index" label="序号" min-width="80">
  14. <template slot-scope="scope">
  15. {{ (currentPage - 1) * pageSize + (scope.$index + 1) }}
  16. </template>
  17. </el-table-column>
  18. <el-table-column
  19. header-align="center"
  20. align="center"
  21. min-width="140"
  22. prop="pblmType"
  23. label="问题类别"
  24. show-overflow-tooltip>
  25. </el-table-column>
  26. <el-table-column
  27. header-align="center"
  28. align="center"
  29. min-width="100"
  30. prop="pblmOption"
  31. label="检查项目"
  32. show-overflow-tooltip>
  33. </el-table-column>
  34. <el-table-column
  35. header-align="center"
  36. align="center"
  37. min-width="100"
  38. prop="pblmDesc"
  39. label="问题描述"
  40. show-overflow-tooltip>
  41. </el-table-column>
  42. <el-table-column
  43. header-align="center"
  44. align="center"
  45. min-width="100"
  46. prop="pblmLevl"
  47. label="问题等级">
  48. <template slot-scope="scope">
  49. <p v-if="scope.row.pblmLevl == 0"><span class="inspPblmCate"
  50. style="background: #27C19F;">一般</span>
  51. </p>
  52. <p v-if="scope.row.pblmLevl == 1"><span class="inspPblmCate"
  53. style="background: #E6A23C;">较重</span>
  54. </p>
  55. <p v-if="scope.row.pblmLevl == 2"><span class="inspPblmCate"
  56. style="background: #F56C6C;">严重</span>
  57. </p>
  58. <p v-if="scope.row.pblmLevl == 3"><span class="inspPblmCate"
  59. style="background: #795548;">特别严重</span>
  60. </p>
  61. </template>
  62. </el-table-column>
  63. <el-table-column
  64. header-align="center"
  65. align="center"
  66. min-width="100"
  67. prop="revwInfo"
  68. label="复查情况">
  69. <template slot-scope="scope">
  70. <p v-if="scope.row.revwState == 0"><span class="inspPblmCate"
  71. style="background: #EC808D;">未复查</span>
  72. </p>
  73. <!--<p v-if="scope.row.revwState == 1"><span class="inspPblmCate"-->
  74. <!--style="background: #f59a23;">复查中</span>-->
  75. <p v-if="scope.row.revwState == 2"><span class="inspPblmCate"
  76. style="background: #f59a23;">已复查</span>
  77. <!--0:未填报;1:填报中;2:已填报-->
  78. </p>
  79. </template>
  80. </el-table-column>
  81. <el-table-column
  82. align="center"
  83. prop
  84. min-width="100"
  85. label="操作"
  86. show-overflow-tooltip
  87. fixed="right">
  88. <template slot-scope="scope">
  89. <!--<el-button icon="el-icon-view" type="text" @click="showDetails(scope.row.id)"></el-button>-->
  90. <el-button icon="el-icon-edit" type="text" @click="showDetails(scope.row.id)"></el-button>
  91. </template>
  92. </el-table-column>
  93. </el-table>
  94. <!-- 分页 -->
  95. <div class="paginationWarpper">
  96. <el-pagination
  97. class="paginationCenter"
  98. background
  99. @size-change="handleSizeChange"
  100. @current-change="pageIndexChange"
  101. :current-page.sync="currentPage"
  102. :page-sizes="[10, 20, 50, 100]"
  103. :page-size="pageSize"
  104. layout="total, sizes, prev, pager, next, jumper"
  105. :total="total">
  106. </el-pagination>
  107. </div>
  108. <!-- 详情组件-->
  109. <supervision-details ref="xianqing" :problemId="currentProblemId" v-if="supervisionDetailsVisible"
  110. @cancelHandler="cancelHandler"></supervision-details>
  111. <!-- 添加问题组件 -->
  112. <problem-dialog
  113. v-if="showAddProblemDialog"
  114. :objId="currentObjectId"
  115. :regId="currentObjectRgstrId"
  116. :objName="currentObjectName"
  117. :currentProblemId="currentProblemId"
  118. :currentResCode="currentResCode"
  119. :currentRsvrNm="currentRsvrNm"
  120. :currentAdCode="currentAdCode"
  121. :problemId="currentProblemId"
  122. @closeDialog="closePlDialog"
  123. fenlei="xiaoshuiku"
  124. :objType="1"
  125. :currentObjectRgstrId="currentObjectRgstrId">
  126. </problem-dialog>
  127. </div>
  128. </template>
  129. <script>
  130. import problemDialog from "../../xsk2021/addProblemDialog.vue";
  131. import request from '@util/gw_ajax_request.js'
  132. export default {
  133. props: ['currentObjectId', 'currentObjectName', 'currentObjectRgstrId', 'activeLabel', 'ifReadyOnly', 'currentResCode', 'currentAdCode', 'currentRsvrNm'],
  134. data() {
  135. return {
  136. tableHeight: window.innerHeight * .45,
  137. tableHeight1: window.innerHeight * .55,
  138. problemList: [],
  139. loading: false,
  140. currentPage: 1,
  141. pageSize: 10,
  142. pageNum: 1,
  143. total: 0,
  144. supervisionDetailsVisible: false,
  145. currentProblemId: '',
  146. problemDeleteVisible: false,
  147. deleteId: '',
  148. editId: '',
  149. changeSupervisionVisible: false,
  150. showAddProblemDialog: false,
  151. rsvrRules: null,
  152. probId: '',
  153. }
  154. },
  155. components: {
  156. //详情页
  157. supervisionDetails: resolve => {
  158. require(["../../xsk2021/problemDetail.vue"], resolve);
  159. },
  160. problemDialog
  161. },
  162. computed: {
  163. persId() {
  164. return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
  165. }
  166. },
  167. created() {
  168. },
  169. mounted() {
  170. this.getProblemList()
  171. },
  172. methods: {
  173. //通知List
  174. getProblemList() {
  175. let obj = {
  176. "pageSize": this.pageSize,
  177. "pageNum": this.currentPage,
  178. rsName: this.currentRsvrNm,
  179. adCode: this.currentAdCode
  180. // rsName: '',
  181. // adCode: ''
  182. };
  183. this.loading = true;
  184. request.post(`bis/insp/rsvr/pblm/mend/pagePc`, obj, {headers: {'orgId': this.persId}})
  185. .then(res => {
  186. if (res.success) {
  187. this.problemList = res.data.list;
  188. this.total = res.data.total;
  189. this.loading = false;
  190. }
  191. })
  192. .catch(err => {
  193. console.log(err);
  194. })
  195. },
  196. showDetails(pblmId) {
  197. this.currentProblemId = pblmId
  198. this.supervisionDetailsVisible = true
  199. },
  200. deleteSuccess() {
  201. this.problemDeleteVisible = false;
  202. this.getProblemList();
  203. },
  204. pageIndexChange(val) {
  205. this.currentPage = val;
  206. this.getProblemList();
  207. },
  208. handleSizeChange(val) {
  209. this.pageSize = val;
  210. this.getProblemList();
  211. },
  212. timestampToTime(row, column) {
  213. var date = new Date(row);
  214. var Y = date.getFullYear() + "-";
  215. var M =
  216. (date.getMonth() + 1 < 10
  217. ? "0" + (date.getMonth() + 1)
  218. : date.getMonth() + 1) + "-";
  219. var D =
  220. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  221. var h =
  222. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  223. var m =
  224. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  225. return Y + M + D + h + m;
  226. },
  227. closeEditDialog() {
  228. this.getProblemList()
  229. this.changeSupervisionVisible = false
  230. },
  231. addProblem(item) {
  232. // let rest = this.rsvrRules;
  233. // this.probId = rest[0].id;
  234. this.showAddProblemDialog = true;
  235. },
  236. closePlDialog() {
  237. this.getProblemList();
  238. this.showAddProblemDialog = false;
  239. },
  240. cancelHandler(val) {
  241. if (val) this.getProblemList();
  242. this.supervisionDetailsVisible = false;
  243. },
  244. },
  245. watch: {
  246. activeLabel(val) {
  247. if (val == '问题清单') {
  248. this.getProblemList()
  249. }
  250. }
  251. },
  252. filters: {
  253. checkPointBz(val) {
  254. if (val == '1') {
  255. return '质量安全'
  256. } else if (val == '2') {
  257. return '合同'
  258. } else if (val == '3') {
  259. return '资金'
  260. } else {
  261. return ''
  262. }
  263. }
  264. }
  265. }
  266. </script>
  267. <style scoped lang="scss">
  268. .pblmRectifyReviewSituation {
  269. .inspPblmCate {
  270. padding: 2px 10px;
  271. color: #fff;
  272. -webkit-border-radius: 10px;
  273. -moz-border-radius: 10px;
  274. border-radius: 10px;
  275. }
  276. }
  277. </style>