5a3cf34dd72b218dcc779884dce81f8fc37dd989.svn-base 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <template>
  2. <div>
  3. <el-row class="mb10">
  4. <el-col :span="24">整改问题:</el-col>
  5. </el-row>
  6. <el-row class="mb10">
  7. <el-col :span="24">
  8. <el-table
  9. :data="tableDataZgWt"
  10. border
  11. stripe
  12. style="width: 100%">
  13. <el-table-column
  14. prop="name"
  15. label="项目"
  16. min-width="180"
  17. show-overflow-tooltip>
  18. </el-table-column>
  19. <el-table-column
  20. prop="pblmNm"
  21. label="问题名称"
  22. min-width="180"
  23. show-overflow-tooltip>
  24. </el-table-column>
  25. <el-table-column
  26. prop="note"
  27. label="问题描述"
  28. min-width="180"
  29. show-overflow-tooltip>
  30. </el-table-column>
  31. <el-table-column
  32. label="严重程度"
  33. min-width="120"
  34. show-overflow-tooltip>
  35. <template slot-scope="scope">
  36. <p v-if="scope.row.pblmPasi == 0"><span class="inspPblmCate"
  37. style="background: #27C19F;">一般</span></p>
  38. <p v-if="scope.row.pblmPasi == 1"><span class="inspPblmCate"
  39. style="background: #E6A23C;">较重</span></p>
  40. <p v-if="scope.row.pblmPasi == 2"><span class="inspPblmCate"
  41. style="background: #F56C6C;">严重</span></p>
  42. </template>
  43. </el-table-column>
  44. </el-table>
  45. </el-col>
  46. </el-row>
  47. <el-row class="mb10" :gutter="20">
  48. <el-col :span="4">反馈记录:</el-col>
  49. <el-col :span="20">
  50. <el-button type="primary" @click="addData">增加行</el-button>
  51. <el-button type="primary" @click="delData">删除行</el-button>
  52. </el-col>
  53. </el-row>
  54. <el-row class="mb10">
  55. <el-col :span="24">
  56. <el-table
  57. :data="tableDataFkJl"
  58. ref="tableDataFkJl"
  59. :height="tableHeight"
  60. border
  61. stripe
  62. style="width: 100%"
  63. @selection-change='selectRow'>
  64. <el-table-column type="selection" width="45" align="center"></el-table-column>
  65. <el-table-column type="index" fixed min-width="80" :index="getIndex" label="序号"
  66. show-overflow-tooltip align="center"></el-table-column>
  67. <el-table-column
  68. header-align="center"
  69. align="center"
  70. min-width="200"
  71. label="反馈时间"
  72. prop="intm"
  73. ></el-table-column>
  74. <el-table-column
  75. prop="rectConc"
  76. label="整改状态"
  77. min-width="180"
  78. show-overflow-tooltip>
  79. <template slot-scope="scope">
  80. <span v-if="scope.row.rectConc == 1">整改中</span>
  81. <span v-if="scope.row.rectConc == 2">未整改</span>
  82. <span v-if="scope.row.rectConc == 3">已整改</span>
  83. <span v-if="scope.row.rectConc == 4">不具备整改条件</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column
  87. prop="city"
  88. label="反馈详情"
  89. min-width="120"
  90. show-overflow-tooltip>
  91. <template slot-scope="scope">
  92. <el-button type="text" size="small" @click="problemEditFk(scope.row)">编辑</el-button>
  93. </template>
  94. </el-table-column>
  95. <el-table-column
  96. label="批复时间"
  97. min-width="180"
  98. prop="replyTm"
  99. show-overflow-tooltip>
  100. </el-table-column>
  101. <el-table-column
  102. label="批复意见"
  103. min-width="180"
  104. prop="replyState">
  105. <template slot-scope="scope">
  106. <span v-if="scope.row.replyState == 1">通过</span>
  107. <span v-if="scope.row.replyState == 0">不通过</span>
  108. </template>
  109. </el-table-column>
  110. <el-table-column
  111. prop="inspPblmCate"
  112. label="批复意见说明"
  113. min-width="120"
  114. show-overflow-tooltip>
  115. <template slot-scope="scope">
  116. <el-button type="text" size="small" @click="problemSeePf(scope.row)">查看</el-button>
  117. </template>
  118. </el-table-column>
  119. </el-table>
  120. </el-col>
  121. </el-row>
  122. <!--编辑反馈详情-->
  123. <addRectify v-if="zgfkDialog" @dialogClose="dialogClose" :listId="rowId" :listPlmbId="listPlmbId"></addRectify>
  124. <!--查看反馈详情-->
  125. <el-dialog title="查看反馈" width="60%" :visible.sync="dialogDetailVisible" :close-on-click-modal="false"
  126. :modal-append-to-body="true" :append-to-body="true">
  127. <problem-detail :problemId="rowId"></problem-detail>
  128. </el-dialog>
  129. <!--批复意见编辑-->
  130. <reply v-if="pfYjDialog" @dialogClose="dialogClose" :rowPblRowId="rowPblRowId"></reply>
  131. <!--查看批复详情-->
  132. <el-dialog title="查看批复" width="40%" :visible.sync="dialogDetailPfVisible" :close-on-click-modal="false"
  133. :modal-append-to-body="true" :append-to-body="true">
  134. <problemDetailPf :problemId="rowPblRowId"></problemDetailPf>
  135. </el-dialog>
  136. </div>
  137. </template>
  138. <script>
  139. import problemDetail from './problemDetail_fkxq.vue'
  140. import problemDetailPf from './problemDetail_pfxq.vue'
  141. import request from '@util/gw_ajax_request.js'
  142. import addRectify from './addRectify'
  143. import reply from './reply'
  144. import {dateFormat} from '../../../utils/gw_date';
  145. export default {
  146. props: ["problemId", "pblmListId"], //
  147. data() {
  148. //这里存放数据
  149. return {
  150. dialogFormVisible: true,
  151. tableDataZgWt: [],
  152. tableDataFkJl: [],
  153. selectlistRow: [],
  154. pageSize: 10,
  155. pageNum: 1,
  156. tableHeight: window.innerHeight * .4,
  157. zgfkDialog: false,
  158. pfYjDialog: false,
  159. rowPblRowId: '',
  160. rowId: '',
  161. dialogDetailVisible: false,
  162. dialogDetailPfVisible: false,
  163. listPlmbId: "",
  164. ifMinistriesAgencies: false
  165. };
  166. },
  167. components: {
  168. addRectify,
  169. problemDetail,
  170. problemDetailPf,
  171. reply
  172. },
  173. computed: {
  174. persId() {
  175. return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
  176. },
  177. },
  178. //监控data中的数据变化
  179. watch: {
  180. problemId(n, o) {
  181. if (n) {
  182. this.problemId = n;
  183. this.getDataFkJl();
  184. }
  185. }
  186. },
  187. //方法集合
  188. methods: {
  189. async getDataFkJl() {
  190. this.tableDataZgWt = [];
  191. await request.get(`/tac/pblm/rect/plmb/aps/getPlmbApsByListPlmbId/${this.pblmListId}`).then(res => {
  192. if (res.success) {
  193. this.tableDataFkJl = res.data;
  194. this.tableDataFkJl.forEach(item => {
  195. item.intm = dateFormat(item.intm, "yyyy-MM-dd");
  196. item.replyTm = dateFormat(item.replyTm, "yyyy-MM-dd");
  197. item.uptm = dateFormat(item.uptm, "yyyy-MM-dd");
  198. })
  199. console.log(this.tableDataFkJl);
  200. }
  201. })
  202. await request.get(`/tac/pblm/rect/list/plmb/${this.problemId}`).then(res => {
  203. this.tableDataZgWt.push(res.data);
  204. });
  205. },
  206. //取消
  207. closeDialog() {
  208. this.$emit('closeDialog')
  209. },
  210. getIndex(index) {
  211. return (index + this.pageSize * (this.pageNum - 1)) + 1
  212. },
  213. // 获取表格选中时的数据
  214. selectRow(val) {
  215. this.selectlistRow = val
  216. },
  217. // 增加行
  218. addData() {
  219. var data = {
  220. "listPlmbId": this.problemId
  221. }
  222. this.$nextTick(() => {
  223. this.tableDataFkJl.unshift(data);
  224. })
  225. },
  226. // 删除方法
  227. // 删除选中行
  228. delData() {
  229. if (this.selectlistRow.length === 0) {
  230. this.$message.warning("请勾选要删除的记录");
  231. return;
  232. }
  233. this.tableDataFkJl.splice(this.selectlistRow, this.selectlistRow.length);
  234. // 删除完数据之后清除勾选框
  235. this.$refs.tableDataFkJl.clearSelection();
  236. },
  237. //反馈编辑
  238. problemEditFk(row) {
  239. this.rowId = row.id;
  240. this.listPlmbId = row.listPlmbId;
  241. this.zgfkDialog = true;
  242. },
  243. dialogClose() {
  244. this.zgfkDialog = false;
  245. this.pfYjDialog = false;
  246. },
  247. // 批复意见说明查看
  248. problemSeePf(row) {
  249. this.rowPblRowId = row.listPlmbId;
  250. this.dialogDetailPfVisible = true;
  251. }
  252. },
  253. //生命周期 - 创建完成(可以访问当前this实例)
  254. created() {
  255. },
  256. //生命周期 - 挂载完成(可以访问DOM元素)
  257. mounted() {
  258. this.$nextTick(() => {
  259. console.log(this.problemId);
  260. this.getDataFkJl();
  261. })
  262. }
  263. }
  264. </script>
  265. <style scoped>
  266. .mb10 {
  267. margin-bottom: 10px;
  268. }
  269. .inspPblmCate {
  270. padding: 2px 10px;
  271. border-radius: 10px;
  272. color: #ffffff;
  273. -webkit-border-radius: 10px;
  274. -moz-border-radius: 10px;
  275. border-radius: 10px;
  276. }
  277. </style>