5f6ffa9ae6711ab7da06a85373a5922edf02cc4d.svn-base 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. <template>
  2. <div>
  3. <el-container>
  4. <el-aside
  5. v-if="!rowId"
  6. width="318px"
  7. style="border-right:2px solid #d5d5ff;float:left;height:calc(100vh - 100px)">
  8. <wt-left-tree orgType="035" :isAll="!hasPriv" @treeNodeClickHandler="treeNodeClickHandler"
  9. @changeYear="changeYear"
  10. @organList="getAllTreeData"></wt-left-tree>
  11. </el-aside>
  12. <el-main style="margin:0px;padding:10px;overflow-y:hidden;" class="shuiku" v-loading="exportLoading">
  13. <div class="search_wrapper">
  14. <el-form :inline="true" :model="problemSearch" class="demo-form-inline">
  15. <el-form-item label="工程名称">
  16. <el-input v-model="problemSearch.nm" clearable></el-input>
  17. </el-form-item>
  18. <el-form-item label="问题类别">
  19. <el-input v-model="problemSearch.inspPblmName" clearable></el-input>
  20. </el-form-item>
  21. <el-form-item label="是否典型">
  22. <el-select v-model="problemSearch.ifCasePblm" clearable placeholder="请选择">
  23. <el-option
  24. v-for="item in supervision"
  25. :key="item.value"
  26. :label="item.label"
  27. :value="item.value"
  28. ></el-option>
  29. </el-select>
  30. </el-form-item>
  31. <el-form-item label="发现时间">
  32. <el-date-picker
  33. v-model="findTime"
  34. type="daterange"
  35. value-format="yyyy-MM-dd"
  36. range-separator="至"
  37. start-placeholder="开始日期"
  38. end-placeholder="结束日期">
  39. </el-date-picker>
  40. </el-form-item>
  41. <el-form-item label="问题督查状态:">
  42. <el-select v-model="problemSearch.state" clearable placeholder="请选择">
  43. <el-option
  44. v-for="item in stateList"
  45. :key="item.value"
  46. :label="item.label"
  47. :value="item.value"
  48. ></el-option>
  49. </el-select>
  50. </el-form-item>
  51. </el-form>
  52. <div>
  53. <el-button
  54. style="color:rgba(255,255,255,1);float:right;margin-right:10px;"
  55. type="success"
  56. icon="el-icon-upload2"
  57. @click="showPlDialog"
  58. :disabled="uploadDisabled"> 批 量 填 报
  59. </el-button>
  60. <el-button style="color:rgba(255,255,255,1);float:right;margin-right:20px;margin-bottom:5px"
  61. type="primary"
  62. icon="el-icon-search"
  63. @click="search">&nbsp;&nbsp; 查&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;询&nbsp;&nbsp;
  64. </el-button>
  65. <el-button style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-bottom:5px;"
  66. type="success"
  67. icon="el-icon-download"
  68. @click="exportWord"
  69. :disabled="uploadDisabled">导出WORD
  70. </el-button>
  71. <el-button
  72. style="color:rgba(255,255,255,1);float:right;margin-right:10px;"
  73. type="success"
  74. icon="el-icon-download"
  75. @click="downloadTemplate"
  76. :disabled="uploadDisabled"
  77. >导出EXCEL
  78. </el-button>
  79. <el-button
  80. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  81. type="success"
  82. @click="submitBtn"
  83. >问题提交
  84. </el-button>
  85. <el-button
  86. v-if="isGd"
  87. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  88. type="success"
  89. icon="el-icon-download"
  90. @click="toForm"
  91. >导出一表一单
  92. </el-button>
  93. <YuDiBaWentiPl v-if="showTianBaoPl"
  94. :showTianBaoPl="showTianBaoPl"
  95. titleName="中小河流治理检查"
  96. @closePlDialog="closePlDialog">
  97. </YuDiBaWentiPl>
  98. </div>
  99. </div>
  100. <el-table
  101. :data="tableData"
  102. border
  103. :height="tableHeight"
  104. v-loading="loading"
  105. style="width: 100%">
  106. <el-table-column
  107. type="selection"
  108. min-width="55">
  109. </el-table-column>
  110. <el-table-column
  111. fixed
  112. type="index"
  113. label="序号"
  114. width="50">
  115. </el-table-column>
  116. <el-table-column
  117. prop="adFullName"
  118. show-overflow-tooltip
  119. label="行政区划"
  120. min-width="180">
  121. </el-table-column>
  122. <el-table-column
  123. prop="nm"
  124. show-overflow-tooltip
  125. label="督查对象名称"
  126. min-width="180">
  127. </el-table-column>
  128. <el-table-column
  129. min-width="140"
  130. prop="inspPblmName"
  131. label="问题类别"
  132. show-overflow-tooltip
  133. ></el-table-column>
  134. <el-table-column
  135. min-width="140"
  136. prop="checkPointBz"
  137. label="检查项目"
  138. show-overflow-tooltip
  139. ></el-table-column>
  140. <el-table-column
  141. show-overflow-tooltip
  142. prop="inspPblmDesc"
  143. label="督查问题描述"
  144. min-width="150">
  145. </el-table-column>
  146. <el-table-column
  147. prop="ifCasePblm"
  148. label="是否典型"
  149. min-width="90">
  150. <template slot-scope="scope">
  151. {{scope.row.ifCasePblm == '1' ? '典型' : scope.row.ifCasePblm == '0' ? '非典型' : ''}}
  152. </template>
  153. </el-table-column>
  154. <el-table-column
  155. show-overflow-tooltip
  156. prop="attachBz"
  157. label="附件序号"
  158. min-width="150">
  159. </el-table-column>
  160. <el-table-column
  161. show-overflow-tooltip
  162. prop="snNumBz"
  163. label="问题序号"
  164. min-width="150">
  165. </el-table-column>
  166. <el-table-column
  167. header-align="center"
  168. align="center"
  169. min-width="70"
  170. prop="persName"
  171. label="上报人"
  172. ></el-table-column>
  173. <el-table-column
  174. prop="collTime"
  175. label="发现时间"
  176. min-width="150">
  177. <template slot-scope="scope">
  178. {{scope.row.collTime ? formatDateTime(scope.row.collTime) : ''}}
  179. </template>
  180. </el-table-column>
  181. <el-table-column
  182. fixed="right"
  183. label="操作"
  184. align="center"
  185. min-width="130">
  186. <template slot-scope="scope">
  187. <span style="margin-right:10px;" v-if="hasPriv">
  188. <el-button icon="el-icon-s-flag" type="text" v-if="scope.row.quote == '1'" title="已被督查简报引用"
  189. @click="changeSfYy(scope.row.pblmId,1)"></el-button>
  190. <i class="el-icon-s-flag" v-else title="未被督查简报引用" @click="changeSfYy(scope.row.pblmId,0)"
  191. style="cursor: pointer;"></i>
  192. </span>
  193. <el-button icon="el-icon-view" title="查看详情" type="text"
  194. @click="toShowDetail(scope.row)"></el-button>
  195. <el-button icon="el-icon-edit" title="修改问题" type="text" v-if="hasPriv"
  196. @click="toEditProblem(scope.row)"></el-button>
  197. <el-button icon="el-icon-delete" type="text" title="删除问题"
  198. @click="removeSuperviseOne(scope.row)"
  199. v-if="hasPriv"></el-button>
  200. </template>
  201. </el-table-column>
  202. </el-table>
  203. <el-pagination :pager-count="5" :current-page="pageIndex"
  204. :page-size="pageSize" layout="total, prev, pager, next" :total="total"
  205. @current-change="pageIndexChange" @size-change="handleSizeChange"
  206. ></el-pagination>
  207. </el-main>
  208. </el-container>
  209. <!-- 修改组件 -->
  210. <problem-edit :editId="problemId" @closeEditDialog="closeEditDialog" v-if="edit_dialogVisible"></problem-edit>
  211. <!-- 详情组件-->
  212. <el-dialog
  213. class="custom_dialog"
  214. title="问题详情"
  215. width="60%"
  216. append-to-body
  217. v-if="supervisionDetailsVisible"
  218. :visible.sync="supervisionDetailsVisible">
  219. <supervision-details ref="xianqing" :problemId="problemId"></supervision-details>
  220. <span slot="footer">
  221. <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
  222. </span>
  223. </el-dialog>
  224. <!-- 删除组件 -->
  225. <el-dialog class="deleteDialog" title="问题删除描述" append-to-body :visible.sync="problemDeleteVisible">
  226. <Problem-delete
  227. ref="deleteMiaoShu"
  228. :deleteProblemId="deleteId"
  229. @deleteSuccess="deleteSuccess"
  230. ></Problem-delete>
  231. <span slot="footer">
  232. <el-button @click="problemDeleteVisible = false">返回</el-button>
  233. </span>
  234. </el-dialog>
  235. </div>
  236. </template>
  237. <script>
  238. import {pblmSubmit} from "@api/duChaAPI.js";
  239. import {formatDateTime2} from '@util/gw_date.js'
  240. import request from '@util/gw_ajax_request.js'
  241. import YuDiBaWentiPl from './problemBatchImp/tongYongWenti_piliang.vue'
  242. import wtLeftTree from "./wtcz_lefttree.vue"
  243. import { hostUrl } from "@util/global_variable.js";
  244. export default {
  245. props: ["rowId"],
  246. data() {
  247. return {
  248. currentRow: {},
  249. edit_dialogVisible: false,
  250. tableHeight: window.innerHeight - 250,
  251. tableData: [
  252. {
  253. date: '',
  254. name: '',
  255. province: '',
  256. city: '',
  257. address: '',
  258. zip: ''
  259. }
  260. ],
  261. problemSearch: {
  262. problemType: '',
  263. inspPblmCate: '',
  264. regid: '',
  265. regId: '',
  266. pType: '',
  267. pageSize: '20',
  268. pageNum: 1,
  269. nm: '',
  270. state: ''
  271. },
  272. stateList: [
  273. {
  274. label: '未提交',
  275. value: '0'
  276. },
  277. {
  278. label: '已提交',
  279. value: '2'
  280. },
  281. {
  282. label: '已发布',
  283. value: '3'
  284. }
  285. ],
  286. problemForm: {
  287. objId: '',
  288. objType: '',
  289. problemType: '',
  290. inspPblmDesc: '',
  291. pblmsTypeId: '',
  292. qualityTypeId: '',
  293. pblmsId: '',
  294. defectTypeId: '',
  295. ifCasePblm: '',
  296. inspPblmCate: '',
  297. weigui: '',
  298. hetong: '',
  299. quanlity: '',
  300. gongcheng: '',
  301. gwComFiles: []
  302. },
  303. rectifyForm: {
  304. rectConc: '',
  305. rectMeas: '',
  306. collTime: '',
  307. gwComFiles: [{
  308. id: "",
  309. filePath: "",
  310. bizId: ""
  311. }]
  312. },
  313. weigui: {
  314. pblmRelDics: [],
  315. pblmSn: ''
  316. },
  317. hetong: {
  318. pblmRelDics: [],
  319. pblmSn: ''
  320. },
  321. quanlity: {
  322. pblmRelDics: [],
  323. pblmSn: ''
  324. },
  325. gongcheng: {
  326. pblmRelDics: [],
  327. pblmSn: ''
  328. },
  329. pblmPointNum: '',
  330. pblmDescList: '',
  331. pblmDescListHetong: '',
  332. pblmAttach: [],
  333. pblmsTypeId: '',
  334. pblmId: '',
  335. imgList: [],
  336. videoList: [],
  337. audioList: [],
  338. pblmStat: '',
  339. gwComFiles: [],
  340. problemType: [],
  341. problemStatus: [
  342. {name: '已复查', value: '2'},
  343. {name: '未复查', value: '1'},
  344. {name: '新问题', value: '0'}
  345. ],
  346. rectifyStatus: [
  347. {name: '未整改', value: '0'},
  348. {name: '整改中', value: '1'},
  349. {name: '已整改', value: '2'}
  350. ],
  351. severity: [
  352. {name: '一般', value: '0'},
  353. {name: '较重', value: '1'},
  354. {name: '严重', value: '2'},
  355. // {name: '非常严重',value:'3'}
  356. ],
  357. dialogType: '添加',
  358. dialogVisible: true,
  359. add_dialogVisible: false,
  360. recheck_dialogVisible: false,
  361. chooseWeiguiProblem: false,
  362. chooseHeTongProblem: false,
  363. chooseQuanlityProblem: false,
  364. chooseGongchengProblem: false,
  365. checked: false,
  366. problemId: '',
  367. supervisionDetailsVisible: false,
  368. projectType: '',
  369. findTime: [],
  370. rectifyRow: {},
  371. isRectify: false,
  372. rectifyId: '',
  373. activeName: 'problem-detail',
  374. pageIndex: 1,
  375. pageSize: 20,
  376. total: 0,
  377. treeData: [],
  378. findUseOrgArray: [],
  379. treeNodeArray: [],
  380. loading: true,
  381. multipleSelection: [], // 已选
  382. rectifyProblemInfo: null,
  383. exportLoading: false,
  384. datas: {},
  385. showTianBaoPl: false,
  386. orgIds: '',
  387. uploadDisabled: true,
  388. supervision: [
  389. {
  390. value: "1",
  391. label: "是"
  392. },
  393. {
  394. value: "0",
  395. label: "否"
  396. }
  397. ],
  398. problemDeleteVisible: false,
  399. deleteId: "",
  400. treeAllData: [],
  401. newYear: "",
  402. stateList: [
  403. {
  404. label: '未提交',
  405. value: '0'
  406. },
  407. {
  408. label: '已提交',
  409. value: '2'
  410. },
  411. {
  412. label: '已发布',
  413. value: '3'
  414. }
  415. ],
  416. }
  417. },
  418. computed: {
  419. persId() {
  420. return localStorage.getItem("userid")
  421. ? localStorage.getItem("userid")
  422. : "1098101939614724096";
  423. },
  424. formatDateTime() {
  425. return formatDateTime2
  426. },
  427. hostUrl() {
  428. return hostUrl
  429. },
  430. hasPriv() {
  431. return this.ownPriv('manage')
  432. },
  433. isGd(){
  434. if(localStorage.getItem('currentRlcode').substring(0,2)=="44"){
  435. return true;
  436. }else{
  437. return false;
  438. }
  439. }
  440. },
  441. components: {
  442. upload: resolve => {
  443. require(["../../widgets/uploadFile.vue"], resolve);
  444. },
  445. // 修改问题
  446. problemEdit: resolve => {
  447. require(["../duChaTianBao/zxhlzl/problemModify.vue"], resolve);
  448. },
  449. //详情页
  450. supervisionDetails: resolve => {
  451. require(["../duChaTianBao/zxhlzl/problemDetail.vue"], resolve);
  452. },
  453. // 删除描述页
  454. ProblemDelete: resolve => {
  455. require(["../duChaWenTi/problemDelete.vue"], resolve);
  456. },
  457. YuDiBaWentiPl: YuDiBaWentiPl,
  458. wtLeftTree: wtLeftTree
  459. },
  460. mounted() {
  461. this.search();
  462. // this.getproblemSmallType();
  463. this.findParams = {
  464. hasVedio: "",
  465. adCode: "",
  466. pblmStat: "",
  467. inspPblmCate: "",
  468. ifCasePblm: "",
  469. nm: "",
  470. rsName: "",
  471. adFullName: "",
  472. startTime: "",
  473. endTime: "",
  474. inspPblmName: "",
  475. persId: localStorage.getItem("userid"),
  476. state: ''
  477. }
  478. },
  479. activated() {
  480. },
  481. methods: {
  482. search() {
  483. this.searchList()
  484. },
  485. async searchList() {
  486. let _self = this;
  487. this.problemSearch.persId = this.persId
  488. this.problemSearch.pType = '35'
  489. this.problemSearch.pageSize = this.pageSize
  490. this.problemSearch.pageNum = this.pageIndex
  491. console.log(this.findTime)
  492. if (this.findTime && this.findTime.length) {
  493. this.problemSearch['startTime'] = this.findTime[0]
  494. this.problemSearch['endTime'] = this.findTime[1]
  495. } else {
  496. this.problemSearch['startTime'] = ''
  497. this.problemSearch['endTime'] = ''
  498. }
  499. _self.loading = true;
  500. let orgAllNode = this.treeAllData;
  501. let data = _self.problemSearch;
  502. _self.findUseOrgArray = [];
  503. _self.treeNodeArray.forEach(item => {
  504. if (item.id.length < 12) {
  505. orgAllNode.forEach(orgItem => {
  506. if (orgItem.id.startsWith(item.code)) {
  507. _self.findUseOrgArray.push(orgItem.id);
  508. }
  509. });
  510. }
  511. _self.findUseOrgArray.push(item.id);
  512. });
  513. if (_self.findUseOrgArray.length > 0) {
  514. data["orgIds"] = _self.findUseOrgArray.join(",");
  515. this.orgIds = _self.findUseOrgArray.join(",");
  516. } else {
  517. data["orgIds"] = "";
  518. }
  519. if (_self.rowId) data["orgIds"] = _self.rowId;
  520. data["year"] = this.newYear;
  521. if (!this.hasPriv) data['isAll'] = 1 //只浏览的时候增加isAll参数 左侧树和问题列表展示所有机构
  522. request.post(`/dc/insp/pblm/page/wiuPblm`, this.problemSearch).then(res => {
  523. _self.loading = false;
  524. this.tableData = res.data.list;
  525. this.total = res.data.total;
  526. });
  527. },
  528. async submitBtn() {
  529. if (this.multipleSelection.length === 0) {
  530. this.$message.warning('请至少选择一条问题');
  531. return;
  532. }
  533. let newArray = this.multipleSelection.map((item) => {
  534. return {
  535. "objId": item.objId,
  536. "objType": item.objType,
  537. "state": "3"
  538. }
  539. });
  540. const {success, message} = await pblmSubmit(newArray);
  541. if (success) {
  542. this.$message.success('问题发布成功');
  543. this.search();
  544. } else {
  545. this.$message.warning(message);
  546. }
  547. },
  548. toEditProblem(row) {
  549. this.dialogType = '修改'
  550. this.unitProblemInfo = row
  551. this.problemId = row.pblmId
  552. this.edit_dialogVisible = true
  553. },
  554. // 查看详情
  555. toShowDetail(row) {
  556. this.problemId = row.pblmId
  557. this.supervisionDetailsVisible = true
  558. },
  559. //删除问题
  560. removeSuperviseOne(row) {
  561. this.deleteId = row.pblmId
  562. this.problemDeleteVisible = true
  563. },
  564. deleteSuccess() {
  565. this.problemDeleteVisible = false;
  566. this.searchList();
  567. },
  568. // 文件上传
  569. submitUpload() {
  570. this.$refs.upload.submit();
  571. },
  572. updatefilelist(arg) {
  573. if (this.isRectify) {
  574. request.post('/dc/insp/rectFdbk', {
  575. id: this.pblmId,
  576. gwComFiles: arg
  577. }).then(res => {
  578. this.removeNewSupervision()
  579. });
  580. } else {
  581. if (this.dialogType == '修改') {
  582. this.problemForm.gwComFiles = this.problemForm.gwComFiles.concat(arg)
  583. } else {
  584. this.problemForm.gwComFiles = arg
  585. }
  586. request.post('/dc/insp/pblm/update', {
  587. pblmId: this.pblmId,
  588. gwComFiles: this.problemForm.gwComFiles,
  589. pblmStat: this.pblmStat
  590. }).then(res => {
  591. this.searchList()
  592. this.removeNewSupervision()
  593. });
  594. }
  595. },
  596. removeNewSupervision(arg) {
  597. if (arg) {
  598. console.log(arg);
  599. var args = this.gwComFiles.concat(arg);
  600. this.updatefilelist(args);
  601. }
  602. this.$message.success('保存成功')
  603. this.$emit('closeDialog')
  604. this.gwComFiles = [];
  605. this.$refs.uploadFile.init();
  606. },
  607. handleClose() {
  608. this.$emit('dialogClose')
  609. },
  610. handleDetailClick(tab, event) {
  611. console.log(tab, event);
  612. },
  613. pageIndexChange(val) {
  614. this.pageIndex = val;
  615. this.searchList();
  616. },
  617. handleSizeChange(val) {
  618. this.pageSize = val;
  619. this.searchList();
  620. },
  621. closeEditDialog() {
  622. this.edit_dialogVisible = false;
  623. this.searchList()
  624. },
  625. closeRectifyEditDialog() {
  626. this.recheck_dialogVisible = false
  627. this.searchList()
  628. },
  629. async exportWord() {
  630. let _self = this;
  631. _self.exportLoading = true;
  632. let orgAllNode = this.treeAllData;
  633. let data = _self.findParams;
  634. data.pageNum = _self.pageIndex;
  635. data.pageSize = _self.pageSize;
  636. data.pType = "35";
  637. data.orgIds = _self.orgIds;
  638. this.datas = data;
  639. _self.treeNodeArray.forEach(item => {
  640. if (item.id.length < 12) {
  641. orgAllNode.forEach(orgItem => {
  642. if (orgItem.id.startsWith(item.id)) {
  643. _self.findUseOrgArray.push(orgItem.id);
  644. }
  645. });
  646. } else {
  647. _self.findUseOrgArray.push(item.id);
  648. }
  649. });
  650. //下载word文档2
  651. await request.post('/pblm/doc', this.datas).then(res => {
  652. if (res.success) {
  653. _self.exportLoading = false;
  654. console.log(this.response)
  655. var a = document.createElement('a');
  656. a.href = `${this.hostUrl}${res.data.downloadPath}`;
  657. //设置文件名称
  658. a.download = '中小河流治理问题详情.doc';
  659. a.click();
  660. } else {
  661. _self.$message.error(res.message);
  662. }
  663. }).catch(res => {
  664. _self.$message.error(res.message);
  665. })
  666. },
  667. toForm(){
  668. var idArr = [];
  669. if(this.multipleSelection && this.multipleSelection.length==0){
  670. this.$message.warning("请选择数据");
  671. return false;
  672. }else{
  673. this.multipleSelection.forEach((item)=>{
  674. idArr.push(item.pblmId);
  675. })
  676. }
  677. var ids = idArr.join(",");
  678. let host = hostUrl;
  679. let nginx = '/pageofficePath/';
  680. let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblm/list/word?ids='+ids+'&filename=pblm|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
  681. let a = document.createElement('a'); // 创建a标签
  682. a.setAttribute('href', href);// href链接
  683. a.click();// 自执行点击事件
  684. },
  685. // 下载模板
  686. async downloadTemplate() {
  687. await this.searchList();
  688. await this.downloadTemplateSet();
  689. this.uploadDisabled = false;
  690. },
  691. downloadTemplateSet() {
  692. // 根据过滤条件下载数据
  693. let datas = JSON.stringify(this.problemSearch);
  694. // let href = '/api/dc/imp/pblm/download?userId=' + this.persId + '&orgType=035&orgIds=' + this.orgIds + '&datas=' + datas;
  695. let href = '/dc/imp/pblm/download?userId=' + this.persId + '&orgType=035&orgIds=' + this.orgIds + '&datas=' + datas;
  696. const a = document.createElement('a'); // 创建a标签
  697. a.setAttribute('download', '中小河流治理问题.xls');// download属性
  698. a.setAttribute('href', href);// href链接
  699. a.click();// 自执行点击事件
  700. },
  701. //切换问题是否被督查简报调用
  702. changeSfYy(row, val) {
  703. this.$confirm('此问题将切换是否被督查简报引用, 是否继续?', '提示', {
  704. confirmButtonText: '确定',
  705. cancelButtonText: '取消',
  706. type: 'warning'
  707. }).then(() => {
  708. if (val) {
  709. request.post(`/dc/insp/pblm/update`, {
  710. "pblmId": row,
  711. "quote": 0
  712. }).then(res => {
  713. if (res.success) {
  714. this.search();
  715. }
  716. })
  717. } else {
  718. request.post(`/dc/insp/pblm/update`, {
  719. "pblmId": row,
  720. "quote": 1
  721. }).then(res => {
  722. if (res.success) {
  723. this.search();
  724. }
  725. })
  726. }
  727. }).catch(() => {
  728. this.$message({
  729. type: 'info',
  730. message: '已取消切换'
  731. });
  732. });
  733. },
  734. showPlDialog() {
  735. this.showTianBaoPl = true
  736. },
  737. closePlDialog(val) {
  738. this.showTianBaoPl = false
  739. this.search();
  740. },
  741. treeNodeClickHandler(data) {
  742. this.treeNodeArray = data;
  743. },
  744. changeYear(val) {
  745. this.newYear = val;
  746. this.search();
  747. },
  748. getAllTreeData(data) {
  749. this.treeAllData = data;
  750. }
  751. },
  752. watch: {
  753. rowId(val) {
  754. if (val) {
  755. this.search();
  756. }
  757. }
  758. },
  759. filters: {
  760. inspPblmCate(val) {
  761. if (!val || val == '') {
  762. return ''
  763. }
  764. if (val == '0') {
  765. return '一般'
  766. } else if (val == '1') {
  767. return '较重'
  768. } else if (val == '2') {
  769. return '严重'
  770. } else {
  771. return val
  772. }
  773. },
  774. }
  775. }
  776. </script>
  777. <style lang="scss">
  778. .search_wrapper {
  779. display: flex;
  780. justify-content: space-between;
  781. min-height: 110px;
  782. div:last-child {
  783. min-width: 160px;
  784. }
  785. }
  786. .slide-line {
  787. width: 96%;
  788. margin-left: 3%;
  789. height: 1px;
  790. margin-bottom: 10px;
  791. border-bottom: dashed 1px #DCDFE6;
  792. }
  793. .detail_dialog .el-dialog__body {
  794. padding: 0 20px 30px;
  795. }
  796. .inspPblmCate {
  797. padding: 2px 10px;
  798. border-radius: 10px;
  799. color: #ffffff;
  800. -webkit-border-radius: 10px;
  801. -moz-border-radius: 10px;
  802. border-radius: 10px;
  803. }
  804. </style>