ef21428b3aaf9aa7d41e96e874c4c7bd0166d236.svn-base 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. <template>
  2. <el-dialog
  3. class="verify_dialog"
  4. :title="title"
  5. :visible.sync="dialogVisible"
  6. :before-close="handleClose"
  7. append-to-body
  8. >
  9. <div class="verify_div">
  10. <el-table
  11. :data="tableData"
  12. style="width: 100%;overflow: auto;"
  13. :row-class-name="tableRowClassName"
  14. height="460px"
  15. empty-text="上传数据已全部验证通过!"
  16. >
  17. <el-table-column
  18. fixed
  19. type="index"
  20. :index="getIndex"
  21. width="90"
  22. label="模板行号"
  23. show-overflow-tooltip
  24. ></el-table-column>
  25. <el-table-column
  26. prop="groupName"
  27. label="组别(带上级名称)"
  28. width="150"
  29. align="center"
  30. show-overflow-tooltip
  31. >
  32. <template slot-scope="scope">
  33. <div v-if="scope.row.groupName.indexOf('$W$')>0">
  34. <el-popover trigger="hover" placement="bottom">
  35. <p>请检查"组别"是否不对;选择继续填报,此条数据可能不会入库.</p>
  36. <div slot="reference" class="name-wrapper">
  37. <span :style="{ color: scope.row.groupName.indexOf('$E$')>0 ? '#ED3F14' : scope.row.groupName.indexOf('$W$')>0 ? '#E7E708' : '' }">
  38. {{ scope.row.groupName.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  39. </span>
  40. </div>
  41. </el-popover>
  42. </div>
  43. <div v-else>
  44. <span :style="{ color: scope.row.groupName.indexOf('$E$')>0 ? '#ED3F14' : scope.row.groupName.indexOf('$W$')>0 ? '#E7E708' : '' }">
  45. {{ scope.row.groupName.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  46. </span>
  47. </div>
  48. </template>
  49. </el-table-column>
  50. <!-- <el-table-column
  51. prop="code"
  52. label="水利工程建设编码"
  53. width="150"
  54. align="center"
  55. show-overflow-tooltip
  56. >
  57. <template slot-scope="scope">
  58. <span :style="{ color: scope.row.code.indexOf('$E$')>0 ? '#ED3F14' : '' }">
  59. {{ scope.row.code.replace(/\$E\$/g,'') }}
  60. </span>
  61. </template>
  62. </el-table-column> -->
  63. <el-table-column prop="nm" label="工程名称" width="150" align="center" show-overflow-tooltip>
  64. <template slot-scope="scope">
  65. <div v-if="scope.row.nm.indexOf('$W$')>0">
  66. <el-popover trigger="hover" placement="bottom">
  67. <p>请检查"工程名称"与"标段名称"、"单位名称"是否匹配;选择继续填报,此条数据可能不会入库.</p>
  68. <div slot="reference" class="name-wrapper">
  69. <span :style="{ color: scope.row.nm.indexOf('$E$')>0 ? '#ED3F14' : scope.row.nm.indexOf('$W$')>0 ? '#E7E708' : '' }">
  70. {{ scope.row.nm.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  71. </span>
  72. </div>
  73. </el-popover>
  74. </div>
  75. <div v-else>
  76. <span :style="{ color: scope.row.nm.indexOf('$E$')>0 ? '#ED3F14' : scope.row.nm.indexOf('$W$')>0 ? '#E7E708' : '' }">
  77. {{ scope.row.nm.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  78. </span>
  79. </div>
  80. </template>
  81. </el-table-column>
  82. <el-table-column prop="bdNm" label="标段名称" width="150" align="center" show-overflow-tooltip>
  83. <template slot-scope="scope">
  84. <div v-if="scope.row.bdNm.indexOf('$W$')>0">
  85. <el-popover trigger="hover" placement="bottom">
  86. <p>请检查"标段名称"与"工程名称"、"单位名称"是否匹配;选择继续填报,此条数据可能不会入库.</p>
  87. <div slot="reference" class="name-wrapper">
  88. <span :style="{ color: scope.row.bdNm.indexOf('$E$')>0 ? '#ED3F14' : scope.row.bdNm.indexOf('$W$')>0 ? '#E7E708' : '' }">
  89. {{ scope.row.bdNm.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  90. </span>
  91. </div>
  92. </el-popover>
  93. </div>
  94. <div v-else>
  95. <span :style="{ color: scope.row.bdNm.indexOf('$E$')>0 ? '#ED3F14' : scope.row.bdNm.indexOf('$W$')>0 ? '#E7E708' : '' }">
  96. {{ scope.row.bdNm.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  97. </span>
  98. </div>
  99. </template>
  100. </el-table-column>
  101. <el-table-column prop="dwNm" label="单位名称" width="150" align="center" show-overflow-tooltip>
  102. <template slot-scope="scope">
  103. <div v-if="scope.row.dwNm.indexOf('$W$')>0">
  104. <el-popover trigger="hover" placement="bottom">
  105. <p>请检查"单位名称"与"工程名称"、"标段名称"是否匹配;选择继续填报,此条数据可能不会入库.</p>
  106. <div slot="reference" class="name-wrapper">
  107. <span :style="{ color: scope.row.dwNm.indexOf('$E$')>0 ? '#ED3F14' : scope.row.dwNm.indexOf('$W$')>0 ? '#E7E708' : '' }">
  108. {{ scope.row.dwNm.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  109. </span>
  110. </div>
  111. </el-popover>
  112. </div>
  113. <div v-else>
  114. <span :style="{ color: scope.row.dwNm.indexOf('$E$')>0 ? '#ED3F14' : scope.row.dwNm.indexOf('$W$')>0 ? '#E7E708' : '' }">
  115. {{ scope.row.dwNm.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  116. </span>
  117. </div>
  118. </template>
  119. </el-table-column>
  120. <el-table-column prop="inspPblmName" label="问题类别" width="150" align="center" show-overflow-tooltip></el-table-column>
  121. <!-- 违规行为 -->
  122. <el-table-column
  123. prop="attachWg"
  124. label="违规行为附件编号"
  125. width="150"
  126. align="center"
  127. show-overflow-tooltip
  128. >
  129. <template slot-scope="scope">
  130. <span :style="{ color: scope.row.attachWg.indexOf('$E$')>0 ? '#ED3F14' : scope.row.attachWg.indexOf('$W$')>0 ? '#E7E708' : '' }">
  131. {{ scope.row.attachWg.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  132. </span>
  133. </template>
  134. </el-table-column>
  135. <el-table-column
  136. prop="attachWgSn"
  137. label="违规行为问题标准序号"
  138. width="160"
  139. align="center"
  140. show-overflow-tooltip
  141. >
  142. <template slot-scope="scope">
  143. <span :style="{ color: scope.row.attachWgSn.indexOf('$E$')>0 ? '#ED3F14' : scope.row.attachWgSn.indexOf('$W$')>0 ? '#E7E708' : '' }">
  144. {{ scope.row.attachWgSn.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  145. </span>
  146. </template>
  147. </el-table-column>
  148. <!-- 合同管理 -->
  149. <el-table-column
  150. prop="attachHetong"
  151. label="合同管理附件编号"
  152. width="150"
  153. align="center"
  154. show-overflow-tooltip
  155. >
  156. <template slot-scope="scope">
  157. <span :style="{ color: scope.row.attachHetong.indexOf('$E$')>0 ? '#ED3F14' : scope.row.attachHetong.indexOf('$W$')>0 ? '#E7E708' : '' }">
  158. {{ scope.row.attachHetong.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  159. </span>
  160. </template>
  161. </el-table-column>
  162. <el-table-column
  163. prop="attachHetongSn"
  164. label="合同管理问题标准序号"
  165. width="160"
  166. align="center"
  167. show-overflow-tooltip
  168. >
  169. <template slot-scope="scope">
  170. <span :style="{ color: scope.row.attachHetongSn.indexOf('$E$')>0 ? '#ED3F14' : scope.row.attachHetongSn.indexOf('$W$')>0 ? '#E7E708' : '' }">
  171. {{ scope.row.attachHetongSn.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  172. </span>
  173. </template>
  174. </el-table-column>
  175. <!-- 质量安全 -->
  176. <el-table-column
  177. prop="attachQua"
  178. label="质量安全附件编号"
  179. width="150"
  180. align="center"
  181. show-overflow-tooltip
  182. >
  183. <template slot-scope="scope">
  184. <span :style="{ color: scope.row.attachQua.indexOf('$E$')>0 ? '#ED3F14' : scope.row.attachQua.indexOf('$W$')>0 ? '#E7E708' : '' }">
  185. {{ scope.row.attachQua.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  186. </span>
  187. </template>
  188. </el-table-column>
  189. <el-table-column
  190. prop="attachQuaSn"
  191. label="质量安全问题标准序号"
  192. width="160"
  193. align="center"
  194. show-overflow-tooltip
  195. >
  196. <template slot-scope="scope">
  197. <span :style="{ color: scope.row.attachQuaSn.indexOf('$E$')>0 ? '#ED3F14' : scope.row.attachQuaSn.indexOf('$W$')>0 ? '#E7E708' : '' }">
  198. {{ scope.row.attachQuaSn.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  199. </span>
  200. </template>
  201. </el-table-column>
  202. <el-table-column prop="inspPblmDesc" label="问题详情" width="150" align="center" show-overflow-tooltip></el-table-column>
  203. <el-table-column
  204. prop="inspPblmCate"
  205. label="问题严重程度"
  206. width="150"
  207. align="center"
  208. show-overflow-tooltip
  209. >
  210. <template slot-scope="scope">
  211. <span :style="{ color: scope.row.inspPblmCate.indexOf('$E$')>0 ? '#ED3F14' : scope.row.inspPblmCate.indexOf('$W$')>0 ? '#E7E708' : '' }">
  212. {{ scope.row.inspPblmCate.replace(/\$E\$/g,'').replace(/\$W\$/g,'') }}
  213. </span>
  214. </template>
  215. </el-table-column>
  216. <el-table-column
  217. prop="ifCasePblm"
  218. label="是否典型"
  219. width="150"
  220. align="center"
  221. show-overflow-tooltip
  222. >
  223. <template slot-scope="scope">
  224. <span :style="{ color: scope.row.ifCasePblm.indexOf('$E$')>0 ? '#ED3F14' : '' }">
  225. {{ scope.row.ifCasePblm.replace(/\$E\$/g,'') }}
  226. </span>
  227. </template>
  228. </el-table-column>
  229. <el-table-column
  230. prop="path"
  231. label="路径"
  232. width="150"
  233. align="center"
  234. show-overflow-tooltip
  235. >
  236. <template slot-scope="scope">
  237. <span :style="{ color: scope.row.path.indexOf('$E$')>0 ? '#ED3F14' : '' }">
  238. {{ scope.row.path.replace(/\$E\$/g,'') }}
  239. </span>
  240. </template>
  241. </el-table-column>
  242. </el-table>
  243. <template>
  244. <lable v-show="confirmUploadState">
  245. <el-radio v-model="updateState" label="1">新增</el-radio>
  246. <el-radio v-model="updateState" label="0">覆盖</el-radio>
  247. </lable>
  248. </template>
  249. <el-button type="warning" v-show="reUploadState" @click="handleClose" >重新上传</el-button>
  250. <el-button type="primary" v-show="confirmUploadState" @click="confirmUpload"
  251. :loading="uploadLoading"
  252. :disabled="buttonState"
  253. >确定填报</el-button>
  254. </div>
  255. </el-dialog>
  256. </template>
  257. <script>
  258. import request from "@util/gw_ajax_request.js";
  259. export default {
  260. props: ['tableData','cacheId','uploadButtonState'],
  261. components: {},
  262. data() {
  263. return {
  264. dialogVisible: true,
  265. reUploadState:false,
  266. confirmUploadState:true,
  267. rDisabled:false,
  268. cDisabled:false,
  269. title:'水利工程建设问题批量导入验证页面(验证通过√)',
  270. uploadLoading: false,
  271. buttonState: false,
  272. updateState: '1',
  273. };
  274. },
  275. mounted(){
  276. if(this.uploadButtonState != undefined){
  277. this.buttonState = this.uploadButtonState;
  278. }
  279. },
  280. computed: {
  281. persId() {
  282. return localStorage.getItem("userid")
  283. ? localStorage.getItem("userid")
  284. : "1098101939614724096";
  285. }
  286. },
  287. methods: {
  288. handleClose(done) {
  289. this.reUploadState = false;
  290. this.$emit("closePlVerDialog");
  291. },
  292. getIndex(index) {
  293. return index + 4;
  294. },
  295. tableRowClassName({ row, rowIndex }) {
  296. let values = "";
  297. for(let key in row){
  298. values += row[key];
  299. }
  300. if (values.indexOf('$E$') > 0) {
  301. this.reUploadState = true;
  302. this.confirmUploadState = false;
  303. this.title = '水利工程建设问题批量导入验证页面(验证未通过×)';
  304. return 'warning-row';
  305. }
  306. return "";
  307. },
  308. confirmUpload(){
  309. this.upload();
  310. },
  311. upload(){
  312. this.uploadLoading = true;
  313. this.buttonState = true;
  314. request.get(`/dc/imp/pblm/insert/info?cacheId=${this.cacheId}&userId=${this.persId}&updateState=${this.updateState}&orgType=004`).then(res => {
  315. console.log(res)
  316. this.$alert(res.data.key, '信息', {
  317. dangerouslyUseHTMLString: true,
  318. callback: action => {
  319. this.uploadLoading = false;
  320. this.buttonState = true;
  321. this.handleClose();
  322. }
  323. });
  324. // if(res.data.key == true){
  325. // this.$alert('填报成功!', '提示', {
  326. // confirmButtonText: '确定',
  327. // type: 'success',
  328. // callback: action => {
  329. // this.uploadLoading = false;
  330. // this.buttonState = true;
  331. // this.handleClose();
  332. // }
  333. // });
  334. // }else {
  335. // this.$alert('填报失败!', '提示', {
  336. // confirmButtonText: '确定',
  337. // callback: action => {
  338. // this.$message({
  339. // type: 'info',
  340. // message: `请不要重复提交!`
  341. // });
  342. // }
  343. // });
  344. // this.uploadLoading = false;
  345. // this.buttonState = true;
  346. // }
  347. });
  348. }
  349. },
  350. watch: {
  351. reUploadState(n,o){
  352. if(n){
  353. this.confirmUploadState = false;
  354. }else {
  355. this.confirmUploadState = true;
  356. }
  357. }
  358. }
  359. };
  360. </script>
  361. <style>
  362. .title {
  363. font-size: 16px;
  364. }
  365. .el-icon-edit {
  366. margin-right: 10px;
  367. }
  368. .verify_dialog .el-dialog {
  369. width: 80% !important;
  370. }
  371. .verify_dialog .el-dialog__body {
  372. padding: 30px 20px;
  373. color: #606266;
  374. font-size: 14px;
  375. height: 500px;
  376. overflow: auto;
  377. }
  378. .verify_div {
  379. text-align: center;
  380. }
  381. .verify_div .el-table th > .cell {
  382. font-family: MicrosoftYaHei-Bold;
  383. font-weight: bold;
  384. color: rgba(51, 51, 51, 1);
  385. }
  386. .verify_div .el-table--border th,
  387. .el-table__fixed-right-patch {
  388. background: rgba(240, 240, 240, 1);
  389. box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1),
  390. 0px 1px 0px 0px rgba(0, 0, 0, 0.1), -1px 0px 0px 0px rgba(0, 0, 0, 0.1);
  391. }
  392. .verify_div .el-table td.is-hidden > *,
  393. .nysgc .el-table th.is-hidden > *,
  394. .el-table--hidden {
  395. visibility: visible;
  396. }
  397. .el-table .warning-row {
  398. background: oldlace;
  399. }
  400. .el-table .success-row {
  401. background: #f0f9eb;
  402. }
  403. </style>