f8a534c21f1cd630a7ee70179e02ade9a2a63f52.svn-base 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <template>
  2. <div :style="{'height': tableHeight1 + 'px'}" class="pblmRectifyReviewSituation">
  3. <el-button @click="addProblem" type="primary" style="float: right;margin-bottom: 10px" :disabled="ifView">新增整改问题
  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)" v-if="ownPriv('manage') && !ifView"></el-button>
  91. <el-button icon="el-icon-delete" type="text" v-if="ownPriv('manage') && !ifView"
  92. title="删除问题" @click="removeSuperviseOne(scope.row)"
  93. ></el-button>
  94. </template>
  95. </el-table-column>
  96. </el-table>
  97. <!-- 分页 -->
  98. <div class="paginationWarpper">
  99. <el-pagination
  100. class="paginationCenter"
  101. background
  102. @size-change="handleSizeChange"
  103. @current-change="pageIndexChange"
  104. :current-page.sync="currentPage"
  105. :page-sizes="[10, 20, 50, 100]"
  106. :page-size="pageSize"
  107. layout="total, sizes, prev, pager, next, jumper"
  108. :total="total">
  109. </el-pagination>
  110. </div>
  111. <!-- 详情组件-->
  112. <supervision-details ref="xianqing" :problemId="currentProblemId" v-if="supervisionDetailsVisible"
  113. @cancelHandler="cancelHandler" :ifView="ifView"></supervision-details>
  114. <!-- 添加问题组件 -->
  115. <problem-dialog
  116. v-if="showAddProblemDialog"
  117. :objId="currentObjectId"
  118. :regId="currentObjectRgstrId"
  119. :objName="currentObjectName"
  120. :currentProblemId="currentProblemId"
  121. :currentResCode="currentResCode"
  122. :currentRsvrNm="currentRsvrNm"
  123. :currentAdCode="currentAdCode"
  124. :problemId="currentProblemId"
  125. @closeDialog="closePlDialog"
  126. fenlei="xiaoshuiku"
  127. :objType="1"
  128. :currentObjectRgstrId="currentObjectRgstrId">
  129. </problem-dialog>
  130. </div>
  131. </template>
  132. <script>
  133. import problemDialog from "../../xsk2021/addProblemDialog.vue";
  134. import request from '@util/gw_ajax_request.js'
  135. export default {
  136. props: ['currentObjectId', 'currentObjectName', 'currentObjectRgstrId', 'activeLabel', 'ifReadyOnly', 'currentResCode', 'currentAdCode', 'currentRsvrNm','ifView'],
  137. data() {
  138. return {
  139. tableHeight: window.innerHeight * .45,
  140. tableHeight1: window.innerHeight * .55,
  141. problemList: [],
  142. loading: false,
  143. currentPage: 1,
  144. pageSize: 10,
  145. pageNum: 1,
  146. total: 0,
  147. supervisionDetailsVisible: false,
  148. currentProblemId: '',
  149. problemDeleteVisible: false,
  150. deleteId: '',
  151. editId: '',
  152. changeSupervisionVisible: false,
  153. showAddProblemDialog: false,
  154. rsvrRules: null,
  155. probId: '',
  156. }
  157. },
  158. components: {
  159. //详情页
  160. supervisionDetails: resolve => {
  161. require(["../../xsk2021/problemDetail.vue"], resolve);
  162. },
  163. problemDialog
  164. },
  165. computed: {
  166. persId() {
  167. return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
  168. }
  169. },
  170. created() {
  171. },
  172. mounted() {
  173. this.getProblemList()
  174. },
  175. methods: {
  176. removeSuperviseOne(row) {
  177. var _self = this;
  178. this.$confirm('确定要删除该问题吗?', '提示', {
  179. confirmButtonText: '确定',
  180. cancelButtonText: '取消',
  181. type: 'warning'
  182. }).then(() => {
  183. request.get(`/bis/insp/rsvr/pblm/mend/del/`+row.id).then((res) => {
  184. if (res.success) {
  185. _self.getProblemList();
  186. _self.$message.success('删除成功')
  187. } else {
  188. _self.$message.error(res.message)
  189. }
  190. });
  191. }).catch(() => {
  192. });
  193. },
  194. //通知List
  195. getProblemList() {
  196. let obj = {
  197. "pageSize": this.pageSize,
  198. "pageNum": this.currentPage,
  199. // rsName: this.currentRsvrNm,
  200. // adCode: this.currentAdCode,
  201. // rsName: '',
  202. rsCode: this.currentResCode
  203. };
  204. this.loading = true;
  205. request.post(`bis/insp/rsvr/pblm/mend/pagePc`, obj, {headers: {'orgId': this.persId}})
  206. .then(res => {
  207. if (res.success) {
  208. this.problemList = res.data.list;
  209. this.total = res.data.total;
  210. this.loading = false;
  211. }
  212. })
  213. .catch(err => {
  214. console.log(err);
  215. })
  216. },
  217. showDetails(pblmId) {
  218. this.currentProblemId = pblmId
  219. this.supervisionDetailsVisible = true
  220. },
  221. deleteSuccess() {
  222. this.problemDeleteVisible = false;
  223. this.getProblemList();
  224. },
  225. pageIndexChange(val) {
  226. this.currentPage = val;
  227. this.getProblemList();
  228. },
  229. handleSizeChange(val) {
  230. this.pageSize = val;
  231. this.getProblemList();
  232. },
  233. timestampToTime(row, column) {
  234. var date = new Date(row);
  235. var Y = date.getFullYear() + "-";
  236. var M =
  237. (date.getMonth() + 1 < 10
  238. ? "0" + (date.getMonth() + 1)
  239. : date.getMonth() + 1) + "-";
  240. var D =
  241. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  242. var h =
  243. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  244. var m =
  245. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  246. return Y + M + D + h + m;
  247. },
  248. closeEditDialog() {
  249. this.getProblemList()
  250. this.changeSupervisionVisible = false
  251. },
  252. addProblem(item) {
  253. // let rest = this.rsvrRules;
  254. // this.probId = rest[0].id;
  255. this.showAddProblemDialog = true;
  256. },
  257. closePlDialog() {
  258. this.getProblemList();
  259. this.showAddProblemDialog = false;
  260. },
  261. cancelHandler(val) {
  262. if (val) this.getProblemList();
  263. this.supervisionDetailsVisible = false;
  264. },
  265. },
  266. watch: {
  267. activeLabel(val) {
  268. if (val == '问题清单') {
  269. this.getProblemList()
  270. }
  271. }
  272. },
  273. filters: {
  274. checkPointBz(val) {
  275. if (val == '1') {
  276. return '质量安全'
  277. } else if (val == '2') {
  278. return '合同'
  279. } else if (val == '3') {
  280. return '资金'
  281. } else {
  282. return ''
  283. }
  284. }
  285. }
  286. }
  287. </script>
  288. <style scoped lang="scss">
  289. .pblmRectifyReviewSituation {
  290. .inspPblmCate {
  291. padding: 2px 10px;
  292. color: #fff;
  293. -webkit-border-radius: 10px;
  294. -moz-border-radius: 10px;
  295. border-radius: 10px;
  296. }
  297. }
  298. </style>