0578beb11550dfc5b68b87a65286dc4c07b7fbfa.svn-base 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. <template>
  2. <el-container class="problem_list">
  3. <el-main style="padding: 10px 10px" v-show="tableShow">
  4. <div class="content_wrapper">
  5. <el-table
  6. :data="tableData"
  7. border
  8. stripe
  9. v-loading="loading"
  10. :height="tableHeight"
  11. align="center"
  12. style="width: 100%"
  13. >
  14. <el-table-column
  15. prop="ordr1"
  16. label="序号"
  17. align="center"
  18. min-width="80"
  19. >
  20. </el-table-column>
  21. <el-table-column
  22. v-if="pageName === 'inspectionView'"
  23. prop="spfsnlType"
  24. label="专业"
  25. show-overflow-tooltip
  26. align="center"
  27. :formatter="formatterspfsnlType"
  28. min-width="120"
  29. >
  30. </el-table-column>
  31. <el-table-column
  32. prop="genus"
  33. label="检查内容"
  34. align="center"
  35. min-width="200"
  36. >
  37. </el-table-column>
  38. <el-table-column
  39. prop="focPblm"
  40. label="重点检查项目"
  41. align="center"
  42. min-width="260"
  43. >
  44. </el-table-column>
  45. <el-table-column
  46. v-if="pageName === 'inspectionIndex'"
  47. prop="sn"
  48. align="center"
  49. show-overflow-tooltip
  50. min-width="160"
  51. label="与问题清单对应的编号"
  52. >
  53. </el-table-column>
  54. <el-table-column
  55. prop="chkItem"
  56. label="具体检查项目"
  57. align="center"
  58. min-width="420"
  59. >
  60. </el-table-column>
  61. <el-table-column
  62. prop="chkGist"
  63. show-overflow-tooltip
  64. min-width="200"
  65. align="center"
  66. label="检查依据(法规及规范相应条款)"
  67. >
  68. </el-table-column>
  69. <el-table-column v-if="pageName === 'inspectionView'" label="检查结果" align="center" >
  70. <el-table-column label="无问题" align="center">
  71. <el-table-column
  72. prop="pblmNt"
  73. show-overflow-tooltip
  74. align="center"
  75. min-width="160"
  76. label="记录检查结果"
  77. >
  78. </el-table-column>
  79. <el-table-column
  80. prop="isPblm"
  81. show-overflow-tooltip
  82. align="center"
  83. min-width="160"
  84. label="直接勾选"
  85. >
  86. <template slot-scope="scope">
  87. <div v-for="item in ynList" :key="item">
  88. <span v-if="scope.row.isPblm === item.value">☑</span
  89. ><span v-else>□</span><span>{{ item.label }}</span>
  90. </div>
  91. </template>
  92. </el-table-column>
  93. </el-table-column>
  94. <el-table-column label="有问题" align="center">
  95. <el-table-column
  96. prop="pblmDesc"
  97. align="center"
  98. show-overflow-tooltip
  99. min-width="160"
  100. label="问题描述(完成底稿)"
  101. >
  102. </el-table-column>
  103. <el-table-column
  104. prop="pblmPasi"
  105. align="center"
  106. show-overflow-tooltip
  107. min-width="160"
  108. label="问题定性"
  109. >
  110. <template slot-scope="scope">
  111. <div v-for="item in problemType" :key="item">
  112. <span v-if="scope.row.scale === item.value">☑</span
  113. ><span v-else>□</span><span>{{ item.label }}</span>
  114. </div>
  115. </template>
  116. </el-table-column>
  117. <el-table-column
  118. prop="subjectNames"
  119. show-overflow-tooltip
  120. align="center"
  121. min-width="160"
  122. label="确认责任单位"
  123. >
  124. </el-table-column>
  125. <el-table-column
  126. prop="pblmMasteryLevel"
  127. align="center"
  128. show-overflow-tooltip
  129. min-width="160"
  130. label="问题掌握标准"
  131. >
  132. </el-table-column>
  133. </el-table-column>
  134. <el-table-column
  135. prop="nt"
  136. align="center"
  137. show-overflow-tooltip
  138. min-width="160"
  139. label="其他情况说明"
  140. >
  141. </el-table-column>
  142. </el-table-column>
  143. <el-table-column
  144. v-if="pageName === 'inspectionIndex'"
  145. prop="pblmMasteryLevel"
  146. align="center"
  147. show-overflow-tooltip
  148. min-width="160"
  149. label="问题掌握标准"
  150. >
  151. </el-table-column>
  152. <el-table-column
  153. prop="chkFrp"
  154. show-overflow-tooltip
  155. align="center"
  156. min-width="160"
  157. label="检查资料或部位"
  158. >
  159. </el-table-column>
  160. <el-table-column
  161. v-if="pageName === 'inspectionView'"
  162. prop="subName"
  163. show-overflow-tooltip
  164. align="center"
  165. min-width="160"
  166. label="参考范本"
  167. >
  168. <template slot-scope="scope">
  169. <div>
  170. <p v-for="item in scope.row.fileList" :key="item.id">
  171. <a
  172. v-if="item.bizType === '1'"
  173. :href="`${hostUrl}/${item.filePath}`"
  174. target="_blank"
  175. rel="noopener noreferrer"
  176. >
  177. {{ item.fileName }}
  178. </a>
  179. </p>
  180. </div>
  181. </template>
  182. </el-table-column>
  183. <el-table-column
  184. v-if="pageName === 'inspectionView'"
  185. prop="subName"
  186. show-overflow-tooltip
  187. align="center"
  188. min-width="160"
  189. label="佐证资料(上传照片或扫描件为主)"
  190. >
  191. <template slot-scope="scope">
  192. <div>
  193. <p v-for="item in scope.row.fileList" :key="item.id">
  194. <a
  195. v-if="item.bizType === '2'"
  196. :href="`${hostUrl}/${item.filePath}`"
  197. target="_blank"
  198. rel="noopener noreferrer"
  199. >
  200. {{ item.fileName }}
  201. </a>
  202. </p>
  203. </div>
  204. </template>
  205. </el-table-column>
  206. <el-table-column
  207. v-if="pageName === 'inspectionView'"
  208. prop="pblmsDesc"
  209. show-overflow-tooltip
  210. align="center"
  211. min-width="160"
  212. label="备注"
  213. >
  214. </el-table-column>
  215. <el-table-column
  216. fixed="right"
  217. align="center"
  218. label="操作"
  219. width="130"
  220. >
  221. <template slot-scope="scope">
  222. <el-button
  223. type="text"
  224. size="small"
  225. @click="toEditProblem(scope.row)"
  226. >编辑</el-button
  227. >
  228. <el-button
  229. @click="deleteProblem(scope.row)"
  230. type="text"
  231. size="small"
  232. >删除</el-button>
  233. </template>
  234. </el-table-column>
  235. </el-table>
  236. <el-pagination
  237. style="margin-left: 30px"
  238. :pager-count="5"
  239. :current-page="pageIndex"
  240. background
  241. :page-size="pageSize"
  242. layout="total, sizes, prev, pager, next, jumper"
  243. :total="total"
  244. :page-sizes="[10, 20, 50, 100]"
  245. @current-change="pageIndexChange"
  246. @size-change="handleSizeChange"
  247. ></el-pagination>
  248. </div>
  249. <add-problem-com
  250. v-if="addFileVisiual"
  251. :titleType="'编辑'"
  252. :rowData="rowData"
  253. :currentNodeId="currentNodeId"
  254. :listType="type"
  255. :pageName="pageName"
  256. :objId="objId"
  257. @dialogClose="dialogClose"
  258. ></add-problem-com>
  259. </el-main>
  260. </el-container>
  261. </template>
  262. <script>
  263. import request from "@util/gw_ajax_request.js";
  264. // import addProblemCom from './dialogCom/addProblemCom.vue'
  265. import ProblemModifyCom from "./dialogCom/ProblemModifyCom.vue";
  266. import ProblemDetailCom from "./dialogCom/ProblemDetails.vue";
  267. import ExportExcel from "./dialogCom/ExportExcel.vue";
  268. import ExportWord from "./dialogCom/ExportWord.vue";
  269. import axios from "axios";
  270. import { hostUrl } from "@util/global_variable.js";
  271. import { TacObiPblmHbPage, TacObiPblmHbInsert } from "@api/InspectionReport.js";
  272. import addProblemCom from "./dialogCom/addProblemView.vue";
  273. export default {
  274. props: [
  275. "currentNodeId",
  276. "type",
  277. "objId",
  278. "pertype",
  279. "submitStatus",
  280. "rightTableName",
  281. "pageName",
  282. ],
  283. data() {
  284. return {
  285. problemType: [
  286. { label: "一般", value: "0" },
  287. { label: "较重", value: "1" },
  288. { label: "严重", value: "2" },
  289. ],
  290. pblmPasi: "", //严重程度
  291. pblmNm: "",
  292. subjectNames: "", //单位名称,多个单位逗号拼接字符串
  293. ifCasePblm: "",
  294. tableData: [],
  295. baseInfo: {
  296. nm: "",
  297. condition: "",
  298. comment: "",
  299. },
  300. // problemId: '',
  301. pageIndex: 1,
  302. pageSize: 20,
  303. total: 0,
  304. loading: false,
  305. // showFileVisiual: false,
  306. addFileVisiual: false,
  307. modifyFileVisiual: false,
  308. // exportEvent: false,//导出对话框v-if
  309. // exportWordDialog: false,
  310. // problemId: '',
  311. name: "",
  312. tableHeight: window.innerHeight - 245,
  313. // showtypical:"",
  314. professionList: [
  315. { label: "前期与设计", value: "1" },
  316. { label: "建设管理", value: "2" },
  317. { label: "计划下达与执行", value: "3" },
  318. { label: "资金使用与管理", value: "4" },
  319. { label: "质量行为", value: "5" },
  320. { label: "质量实体", value: "6" },
  321. { label: "工程安全", value: "7" },
  322. ],
  323. ynList: [
  324. { label: "是", value: "1" },
  325. { label: "否", value: "0" },
  326. ],
  327. rowData: {},
  328. tableShow: false,
  329. };
  330. },
  331. components: {
  332. addProblemCom,
  333. ProblemModifyCom,
  334. ExportExcel,
  335. ExportWord,
  336. ProblemDetailCom,
  337. },
  338. computed: {
  339. persId() {
  340. return localStorage.getItem("userid")
  341. ? localStorage.getItem("userid")
  342. : "1098101939614724096";
  343. },
  344. },
  345. created() {
  346. // let currentOrgId = localStorage.getItem("currentOrgId")
  347. // if(currentOrgId == '036'){
  348. // this.showtypical=false;
  349. // }else{
  350. // this.showtypical = true;
  351. // }
  352. },
  353. mounted() {
  354. console.log(
  355. "---problemView----mounted--------",
  356. this.currentNodeId,
  357. this.type,
  358. this.pageName
  359. );
  360. },
  361. activated() {},
  362. methods: {
  363. formatterspfsnlType(row, column) {
  364. const data = this.professionList.filter((item) => {
  365. return item.label === row.spfsnlType;
  366. });
  367. if (data.length > 0) {
  368. return data[0].label;
  369. } else {
  370. return "";
  371. }
  372. },
  373. turnType() {
  374. if (this.type == "7") {
  375. this.name = "参建单位";
  376. } else if (this.type == "6") {
  377. this.name = "工程安全";
  378. } else if (this.type == "5") {
  379. this.name = "质量";
  380. } else if (this.type == "4") {
  381. this.name = "资金使用与管理";
  382. } else if (this.type == "3") {
  383. this.name = "计划下达与执行";
  384. } else if (this.type == "2") {
  385. this.name = "建设管理";
  386. } else if (this.type == "1") {
  387. this.name = "前期与设计";
  388. }
  389. },
  390. getProblemList(val) {
  391. this.turnType();
  392. this.loading = true;
  393. const params = {
  394. spfsnlType: this.name,
  395. // currentNodeId:this.currentNodeId,
  396. // objId: this.currentNodeId,
  397. objId: this.objId,
  398. pageSize: this.pageSize,
  399. pageNum: this.pageIndex,
  400. isPblm:val
  401. };
  402. TacObiPblmHbInsert(params)
  403. .then((res1) => {
  404. TacObiPblmHbPage(params)
  405. .then((res) => {
  406. if (res.data.list.length > 0) {
  407. res.data.list.forEach((item, index) => {
  408. item.ordr1 = index + 1;
  409. });
  410. }
  411. this.tableData = res.data.list;
  412. this.total = res.data.total;
  413. this.loading = false;
  414. this.tableShow = true;
  415. })
  416. .catch((err) => {
  417. this.loading = false;
  418. });
  419. })
  420. .catch((err) => {
  421. this.loading = false;
  422. });
  423. },
  424. getProblemList1(val) {
  425. this.turnType();
  426. this.loading = true;
  427. const params = {
  428. spfsnlType: this.name,
  429. objId: this.objId,
  430. pageSize: this.pageSize,
  431. pageNum: this.pageIndex,
  432. isPblm:val
  433. };
  434. TacObiPblmHbPage(params)
  435. .then((res) => {
  436. if (res.data.list.length > 0) {
  437. res.data.list.forEach((item, index) => {
  438. item.ordr1 = index + 1;
  439. });
  440. this.tableData = res.data.list;
  441. this.total = res.data.total;
  442. this.loading = false;
  443. this.tableShow = true;
  444. }
  445. })
  446. .catch((err) => {
  447. this.loading = false;
  448. });
  449. },
  450. // toAddFile() {
  451. // Object.assign(this.rowData,row)
  452. // this.addFileVisiual = true
  453. // },
  454. // //导出Excel
  455. // exportExcel() {
  456. // this.exportEvent = true
  457. // },
  458. // //导出Word
  459. // exportWord() {
  460. // this.exportWordDialog = true
  461. // },
  462. toEditProblem(row) {
  463. Object.assign(this.rowData, row);
  464. this.addFileVisiual = true;
  465. },
  466. deleteProblem(row) {
  467. this.$confirm("确认删除该问题吗?", "提示", {
  468. confirmButtonText: "确定",
  469. cancelButtonText: "取消",
  470. type: "warning",
  471. }).then(() => {
  472. // request.get(`/tac/obj/pblmstb/hb/delete/${row.id}`).then(res=>{
  473. request.get(`/tac/obj/pblm/hb/delete/${row.id}`).then((res) => {
  474. if (res.success) {
  475. this.$message({
  476. type: "success",
  477. message: "删除成功!",
  478. });
  479. this.getProblemList();
  480. } else {
  481. this.$message({
  482. type: "error",
  483. message: res.message,
  484. });
  485. }
  486. });
  487. });
  488. },
  489. pageIndexChange(val) {
  490. this.pageIndex = val;
  491. this.getProblemList();
  492. },
  493. handleSizeChange(val) {
  494. this.pageSize = val;
  495. this.getProblemList();
  496. },
  497. dialogClose() {
  498. this.addFileVisiual = false;
  499. // this.modifyFileVisiual = false
  500. // this.exportEvent = false
  501. // this.showFileVisiual = false
  502. // this.exportWordDialog = false
  503. this.getProblemList();
  504. },
  505. pblmPasiChange(val) {
  506. this.getProblemList();
  507. },
  508. handleSelectionChange(val) {
  509. let problemArr = [];
  510. val.forEach((ele) => {
  511. problemArr.push(ele.id);
  512. });
  513. this.problemId = problemArr.join(",");
  514. },
  515. // showJobFile() {
  516. // // this.exportWordDialog = true
  517. // this.openPageoffice()
  518. // },
  519. // isUsePo() {
  520. // // 是否启用PageOffice
  521. // let _this = this;
  522. // axios.defaults.timeout = 2000;
  523. // axios.get('/pageofficePath/pageoffice/getUsePo').then((res) => {
  524. // let data = res.data
  525. // if (data.isUse == 'true') {
  526. // _this.exportWordDialog = false
  527. // // 打开PageOffice
  528. // _this.openPageoffice()
  529. // } else {
  530. // _this.exportWordDialog = true
  531. // }
  532. // }).catch(function (err) {
  533. // _this.exportWordDialog = true
  534. // })
  535. // },
  536. // openPageoffice: function () {
  537. // let host = hostUrl;
  538. // let nginx = '/pageofficePath/';
  539. // let rgstrId = this.currentNodeId;
  540. // let type = "20" + this.type;
  541. // let persId = this.persId;
  542. // let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblmlist/word/' + type + '/' + rgstrId + '?persId=' + persId + '&pblmId=' + this.problemId + '|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
  543. // let a = document.createElement('a'); // 创建a标签
  544. // a.setAttribute('href', href);// href链接
  545. // a.click();// 自执行点击事件
  546. // console.log(href)
  547. // },
  548. // // 查看问题详情
  549. // toCheckDetail(row) {
  550. // this.problemId = row.id
  551. // this.showFileVisiual = true
  552. // }
  553. },
  554. watch: {
  555. currentNodeId(val) {
  556. // this.getProblemList();
  557. this.tableShow = false;
  558. },
  559. type(val) {
  560. // this.getProblemList();
  561. this.tableShow = false;
  562. },
  563. // backStatus(val) {
  564. // if (val) {
  565. // //回退状态为成功时
  566. // this.getProblemList()
  567. // }
  568. // }
  569. },
  570. };
  571. </script>
  572. <style lang="scss">
  573. .problem_list {
  574. .project_title {
  575. line-height: 50px;
  576. text-align: center;
  577. color: #333;
  578. border-bottom: solid 1px #eee;
  579. }
  580. h4 {
  581. line-height: 50px;
  582. color: #444;
  583. }
  584. .operate_btn {
  585. float: right;
  586. margin-bottom: 10px;
  587. }
  588. .inspPblmCate {
  589. padding: 2px 10px;
  590. border-radius: 10px;
  591. color: #ffffff;
  592. -webkit-border-radius: 10px;
  593. -moz-border-radius: 10px;
  594. border-radius: 10px;
  595. }
  596. .el-form-item__label {
  597. font-size: large;
  598. color: #333;
  599. }
  600. .el-form--inline .el-form-item {
  601. margin-right: 6px;
  602. }
  603. .el-table__header th {
  604. font-size: large !important;
  605. }
  606. tr.el-table__row {
  607. font-size: large;
  608. }
  609. }
  610. </style>