e0767cc4cd91703222fb1d9362496cee29402cf1.svn-base 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324
  1. <template>
  2. <div style="height:100%;width:100%" id="wenTiContainer_sk">
  3. <el-container>
  4. <el-aside
  5. width="318px"
  6. style="border-right:2px solid #d5d5ff;float:left;text-align: center;"
  7. :style="{'max-height':testHeight+'px','height':testHeight+'px'}">
  8. <el-button size="mini" :class="tabType==1 ? 'skactive' : 'sknormal'" @click="tabChange('1')">当前数据
  9. </el-button>
  10. <!-- <el-button size="mini" :class="tabType==2 ? 'skactive' : 'sknormal'" @click="tabChange('2')">历史数据-->
  11. <!-- </el-button>-->
  12. <el-button size="mini" :class="tabType==0 ? 'skactive' : 'sknormal'" @click="tabChange('0')">全部数据
  13. </el-button>
  14. <div
  15. class="tree"
  16. style="
  17. height: calc(100% - 50px);
  18. width: 100%;
  19. overflow: auto;
  20. display: inline-flex;"
  21. >
  22. <el-tree
  23. :highlight-current="true"
  24. style="height:100%;"
  25. :data="treeData"
  26. node-key="id"
  27. show-checkbox
  28. @check-change="handleCheckChange"
  29. ref="jigou_tree"
  30. >
  31. <div class="custom-tree-node" slot-scope="{ node, data }">
  32. <span style="float:left;">{{ data.pnm}}</span>
  33. <div
  34. style="float:right;display: flex;justify-content: flex-end;align-items: center;width:50%;"
  35. >
  36. <span style="color:blue;width:80px;"></span>
  37. </div>
  38. </div>
  39. </el-tree>
  40. </div>
  41. </el-aside>
  42. <el-main style="margin:0px;padding:0px;" class="shuiku" v-loading="exportLoading">
  43. <div class="pages" :style="{'max-height':testHeight+'px'}">
  44. <div class="search">
  45. <el-row type="flex" justify="space-between">
  46. <el-col :span="24">
  47. <el-form
  48. :inline="true"
  49. size="mini"
  50. class="demo-form-inline"
  51. style="padding-left: 10px;"
  52. >
  53. <el-form-item label="行政区划:">
  54. <el-input
  55. resize="none"
  56. type="input"
  57. :rows="3"
  58. placeholder="请输入行政区划名称"
  59. v-model.trim="findParams.adName"
  60. clearable
  61. ></el-input>
  62. </el-form-item>
  63. <el-form-item label="项目名称:">
  64. <el-input
  65. resize="none"
  66. type="input"
  67. :rows="3"
  68. placeholder="请输入名称"
  69. v-model.trim="findParams.name"
  70. clearable
  71. ></el-input>
  72. </el-form-item>
  73. </el-form>
  74. </el-col>
  75. </el-row>
  76. <el-row type="flex" justify="space-bv-fortween" v-show="showExpandSearchPanel">
  77. <el-col :span="24">
  78. <el-form
  79. :inline="true"
  80. size="mini"
  81. class="demo-form-inline"
  82. style="padding-left: 10px;"
  83. >
  84. <el-form-item label="问题筛选:">
  85. <el-select v-model="pblscr" clearable placeholder="请选择">
  86. <el-option
  87. v-for="item in pblscrList"
  88. :key="item.value"
  89. :label="item.lable"
  90. :value="item.value"
  91. ></el-option>
  92. </el-select>
  93. </el-form-item>
  94. <el-form-item label="上报人员:">
  95. <el-input
  96. resize="none"
  97. type="input"
  98. :rows="3"
  99. placeholder="请输入名称"
  100. v-model.trim="findParams.persName"
  101. ></el-input>
  102. </el-form-item>
  103. <el-form-item label="所在组:">
  104. <el-input
  105. resize="none"
  106. type="input"
  107. :rows="3"
  108. placeholder="请输入所在组名称"
  109. v-model.trim="pblscrGroup"
  110. clearable
  111. ></el-input>
  112. </el-form-item>
  113. <el-form-item label="时间范围:">
  114. <el-select v-model="findParams.tmType" clearable placeholder="请选择">
  115. <el-option
  116. v-for="item in timeType"
  117. :key="item.value"
  118. :label="item.label"
  119. :value="item.value"
  120. ></el-option>
  121. </el-select>
  122. <el-date-picker
  123. v-model="value6"
  124. type="datetimerange"
  125. value-format="yyyy-MM-dd hh:mm:ss"
  126. range-separator="至"
  127. start-placeholder="开始日期"
  128. end-placeholder="结束日期"
  129. ></el-date-picker>
  130. </el-form-item>
  131. <el-form-item label="问题督查状态:">
  132. <el-select v-model="findParams.state" clearable placeholder="请选择">
  133. <el-option
  134. v-for="item in stateList"
  135. :key="item.value"
  136. :label="item.label"
  137. :value="item.value"
  138. ></el-option>
  139. </el-select>
  140. </el-form-item>
  141. </el-form>
  142. </el-col>
  143. </el-row>
  144. <el-row type="flex" justify="space-between" style="border-top:1px solid #0014ff2e;">
  145. <el-col style="padding-bottom:10px;" :offset="11" :span="2">
  146. <el-button
  147. style="float:right;margin-right:10px;border: 1px solid #0014ff2e;
  148. border-radius: 0px 0px 5px 5px;border-top: 0px;"
  149. type="info"
  150. plain
  151. size="mini"
  152. @click="showExpandSearchPanel = !showExpandSearchPanel"
  153. >
  154. {{showExpandSearchPanel?'收起':'更多条件'}}
  155. <i
  156. class="el-icon-arrow-down el-icon--right"
  157. v-show="!showExpandSearchPanel"
  158. />
  159. <i class="el-icon-arrow-up el-icon--right" v-show="showExpandSearchPanel"/>
  160. </el-button>
  161. </el-col>
  162. <el-col :offset="2" :span="9">
  163. <el-button
  164. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  165. type="success"
  166. icon="el-icon-upload2"
  167. @click="showPlDialog"
  168. :disabled="uploadDisabled"
  169. >批 量 填 报
  170. </el-button>
  171. <el-button
  172. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  173. type="primary"
  174. icon="el-icon-search"
  175. @click="search"
  176. >&nbsp;查&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;询&nbsp;
  177. </el-button>
  178. <el-button
  179. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  180. type="success"
  181. @click="submitBtn"
  182. >问题提交
  183. </el-button>
  184. <el-button
  185. v-if="isGd"
  186. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  187. type="success"
  188. icon="el-icon-download"
  189. @click="toForm"
  190. >导出一表一单
  191. </el-button>
  192. <!-- <el-button
  193. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  194. type="success"
  195. icon="el-icon-download"
  196. @click="exportWord"
  197. >导出WORD</el-button> -->
  198. <!-- <el-button
  199. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  200. type="success"
  201. icon="el-icon-download"
  202. @click="exportExcel"
  203. >导出EXCEL</el-button>-->
  204. <!-- <el-button
  205. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  206. type="success"
  207. icon="el-icon-download"
  208. @click="downloadTemplate"
  209. >导出EXCEL</el-button> -->
  210. <shuiZhaWentiPl
  211. v-if="showTianBaoPl"
  212. :showTianBaoPl="showTianBaoPl"
  213. @closePlDialog="closePlDialog"
  214. ></shuiZhaWentiPl>
  215. </el-col>
  216. </el-row>
  217. </div>
  218. <!-- 查询展示 -->
  219. <div class="search" style="margin-top:10px;">
  220. <el-table
  221. v-loading="loading"
  222. border
  223. ref="multipleTable"
  224. :height="tableHeight"
  225. :data="searchResult"
  226. tooltip-effect="dark"
  227. style="width: 100%"
  228. @selection-change="handleSelectionChange">
  229. <el-table-column
  230. type="selection"
  231. min-width="55">
  232. </el-table-column>
  233. <el-table-column align="center" type="index" label="序号" width="60">
  234. <template slot-scope="scope">{{ (currentPage - 1) * pageSize + (scope.$index + 1) }}
  235. </template>
  236. </el-table-column>
  237. <el-table-column
  238. header-align="center"
  239. align="center"
  240. min-width="140"
  241. prop="name"
  242. label="项目名称"
  243. show-overflow-tooltip>
  244. </el-table-column>
  245. <el-table-column
  246. header-align="center"
  247. align="center"
  248. min-width="100"
  249. prop="province"
  250. label="省(直辖市)"
  251. show-overflow-tooltip>
  252. </el-table-column>
  253. <el-table-column
  254. header-align="center"
  255. align="center"
  256. min-width="80"
  257. prop="city"
  258. :label="ownAdName"
  259. show-overflow-tooltip>
  260. </el-table-column>
  261. <el-table-column
  262. header-align="center"
  263. align="center"
  264. min-width="80"
  265. prop="country"
  266. label="县"
  267. v-if="isXj"
  268. show-overflow-tooltip>
  269. </el-table-column>
  270. <el-table-column
  271. header-align="center"
  272. align="center"
  273. min-width="140"
  274. prop="aUnit"
  275. label="责任单位"
  276. show-overflow-tooltip>
  277. </el-table-column>
  278. <el-table-column
  279. header-align="center"
  280. align="center"
  281. min-width="120"
  282. prop="basName"
  283. label="流域机构"
  284. show-overflow-tooltip>
  285. </el-table-column>
  286. <el-table-column
  287. header-align="center"
  288. align="center"
  289. min-width="100"
  290. prop="type"
  291. label="检查分类"
  292. show-overflow-tooltip>
  293. <template slot-scope="scope">
  294. <span v-if="scope.row.type == '1'">水库</span>
  295. <span v-if="scope.row.type == '2'">水闸</span>
  296. <span v-if="scope.row.type == '3'">人饮</span>
  297. <span v-if="scope.row.type == '4'">水利工程建设</span>
  298. <span v-if="scope.row.type == '5'">水利工程运行</span>
  299. </template>
  300. </el-table-column>
  301. <el-table-column
  302. header-align="center"
  303. align="center"
  304. min-width="100"
  305. prop="fdTm"
  306. label="发现时间"
  307. show-overflow-tooltip>
  308. </el-table-column>
  309. <el-table-column
  310. header-align="center"
  311. align="center"
  312. min-width="110"
  313. prop="pblmIsTrue"
  314. label="调查核实情况"
  315. show-overflow-tooltip>
  316. <template slot-scope="scope">
  317. <span v-if="scope.row.pblmIsTrue == 0">不属实</span>
  318. <span v-if="scope.row.pblmIsTrue == 1">部分属实</span>
  319. <span v-if="scope.row.pblmIsTrue == 2">属实</span>
  320. </template>
  321. </el-table-column>
  322. <el-table-column
  323. header-align="center"
  324. align="center"
  325. min-width="110"
  326. prop="rectMeas"
  327. label="整改详细情况"
  328. show-overflow-tooltip>
  329. </el-table-column>
  330. <el-table-column
  331. header-align="center"
  332. align="center"
  333. min-width="100"
  334. prop="rectTm"
  335. label="复查时间"
  336. show-overflow-tooltip>
  337. </el-table-column>
  338. <el-table-column
  339. header-align="center"
  340. align="center"
  341. min-width="100"
  342. prop="persName"
  343. label="上报人"
  344. show-overflow-tooltip>
  345. </el-table-column>
  346. <el-table-column
  347. header-align="center"
  348. align="center"
  349. min-width="100"
  350. prop="groupName"
  351. label="所在组"
  352. show-overflow-tooltip>
  353. </el-table-column>
  354. <el-table-column fixed="right" label="操作" min-width="130">
  355. <template slot-scope="scope">
  356. <el-button icon="el-icon-view" title="查看详情" type="text"
  357. @click="showDetails(scope.row.id)"></el-button>
  358. <el-button
  359. v-if="ownPriv('manage')"
  360. icon="el-icon-edit"
  361. type="text"
  362. @click="changeSup(scope.row.id)"
  363. ></el-button>
  364. <el-button
  365. v-if="ownPriv('manage')"
  366. icon="el-icon-delete"
  367. type="text"
  368. title="删除问题" @click="removeSuperviseOne(scope.row.id)"
  369. ></el-button>
  370. </template>
  371. </el-table-column>
  372. </el-table>
  373. <!-- 分页 -->
  374. <div class="paginationWarpper">
  375. <el-pagination
  376. class="paginationCenter"
  377. background
  378. @size-change="handleSizeChange"
  379. @current-change="search"
  380. :current-page.sync="currentPage"
  381. :page-sizes="[10, 20, 50, 100]"
  382. :page-size="pageSize"
  383. layout="total, sizes, prev, pager, next, jumper"
  384. :total="total"
  385. ></el-pagination>
  386. </div>
  387. </div>
  388. </div>
  389. <!-- 详情组件-->
  390. <el-dialog
  391. class="custom_dialog"
  392. title="问题详情"
  393. width="60%"
  394. append-to-body
  395. v-if="supervisionDetailsVisible"
  396. :visible.sync="supervisionDetailsVisible">
  397. <supervision-details ref="xianqing" :problemId="currentProblemId"></supervision-details>
  398. <span slot="footer">
  399. <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
  400. </span>
  401. </el-dialog>
  402. <!-- 删除组件 -->
  403. <el-dialog class="deleteDialog" title="问题删除描述" append-to-body :visible.sync="problemDeleteVisible">
  404. <Problem-delete
  405. ref="deleteMiaoShu"
  406. :deleteProblemId="deleteId"
  407. @deleteSuccess="deleteSuccess"
  408. ></Problem-delete>
  409. <span slot="footer">
  410. <el-button @click="problemDeleteVisible = false">返回</el-button>
  411. </span>
  412. </el-dialog>
  413. <!-- 修改组件 -->
  414. <problem-edit :editId="editId" @closeEditDialog="closeEditDialog"
  415. v-if="changeSupervisionVisible"></problem-edit>
  416. </el-main>
  417. </el-container>
  418. </div>
  419. </template>
  420. <script>
  421. import {submitUpload, pblmSubmit} from "../../api/duChaAPI.js";
  422. import {dateFormat} from "@util/gw_date";
  423. import {exportModel} from "@util/gw_exportModel";
  424. import request from "../../utils/gw_ajax_request.js";
  425. import {hostUrl} from "@util/global_variable.js";
  426. import inuptWithDuChaTreeNode from "../../widgets/inuptWithDuChaTreeNode.vue";
  427. import inputWidthDuChaNodes from "../../widgets/inputWithDuChaNodes.vue";
  428. import inputWidthDuChaShuiKu from "../../widgets/inputWith_sk.vue";
  429. export default {
  430. props: ["codeId"],
  431. components: {
  432. //详情页
  433. supervisionDetails: resolve => {
  434. require(["./supervisionDetails_qita.vue"], resolve);
  435. },
  436. // 删除描述页
  437. ProblemDelete: resolve => {
  438. require(["./problemDeleteQiTa.vue"], resolve);
  439. },
  440. // 修改问题
  441. problemEdit: resolve => {
  442. require(["./qiTaProblemModify.vue"], resolve);
  443. },
  444. inuptWithDuChaTreeNode: inuptWithDuChaTreeNode,
  445. inputWidthDuChaNodes: inputWidthDuChaNodes,
  446. inputWidthDuChaShuiKu: inputWidthDuChaShuiKu
  447. },
  448. data() {
  449. var validatePass1 = (rules1, value, callback) => {
  450. if (this.newSupervision.startTime > this.newSupervision.endTime) {
  451. callback(new Error("结束时间不能早于开始时间"));
  452. } else {
  453. callback();
  454. }
  455. };
  456. var validatePass2 = (rules1, value, callback) => {
  457. let startTime = this.changeSupervision.startTime.slice(0, 10);
  458. if (startTime > this.changeSupervision.endTime) {
  459. callback(new Error("结束时间不能早于开始时间"));
  460. } else {
  461. callback();
  462. }
  463. };
  464. var divisionList = (rules1, value, callback) => {
  465. if (this.newGroup.divisionList.length) {
  466. callback();
  467. } else {
  468. callback(new Error("至少要添加一个地区"));
  469. }
  470. };
  471. return {
  472. tabType: "0",//0全部数据,1当前数据,2历史数据
  473. showExpandSearchPanel: false,
  474. tableHeight: window.innerHeight - 260,
  475. dataAll: {},
  476. globoId: "",
  477. currentDate: new Date(),
  478. deleteId: "",
  479. treeNodeArray: [],
  480. treeNodeSelectVisible: false,
  481. adNodeArray: [],
  482. adNodeSelectVisible: false,
  483. areaSelectVisible: false,
  484. rsvrNodeArray: [],
  485. rsvrNodeSelectVisible: false,
  486. skSelectVisible: false,
  487. currentProblemId: "",
  488. updateIdXiuGai: "",
  489. rules1: {
  490. inspPblmName: [
  491. {
  492. required: true,
  493. message: "请输入问题名称",
  494. trigger: "blur"
  495. },
  496. {
  497. min: 1,
  498. max: 999,
  499. message: "不超过100字符",
  500. trigger: "blur"
  501. }
  502. ],
  503. inspPblmDesc: [
  504. {
  505. required: true,
  506. message: "请输入问题描述",
  507. trigger: "blur"
  508. }
  509. ],
  510. recPers: [
  511. {
  512. required: true,
  513. message: "请输入记录人",
  514. trigger: "blur"
  515. },
  516. {
  517. min: 1,
  518. max: 999,
  519. message: "不超过100字符",
  520. trigger: "blur"
  521. }
  522. ],
  523. objType: [
  524. {
  525. required: true,
  526. message: "请选择督查对象类型",
  527. trigger: "change"
  528. }
  529. ],
  530. objId: [
  531. {
  532. required: true,
  533. message: "请选择督查对象类型",
  534. trigger: "change"
  535. }
  536. ],
  537. dataStat: [
  538. {
  539. required: true,
  540. message: "请选择数据状态",
  541. trigger: "change"
  542. }
  543. ],
  544. collTime: [
  545. {
  546. required: true,
  547. message: "请选择采集时间",
  548. trigger: "change"
  549. }
  550. ]
  551. },
  552. dxdcAsideHeight: window.innerHeight - 220,
  553. maxHeight: window.innerHeight - 300,
  554. testHeight: window.innerHeight - 80,
  555. supervisionStateList: [
  556. {
  557. value: "0",
  558. label: "暂存"
  559. },
  560. {
  561. value: "1",
  562. label: "上报"
  563. }
  564. ],
  565. supervision: [
  566. {
  567. value: "1",
  568. label: "是"
  569. },
  570. {
  571. value: "0",
  572. label: "否"
  573. }
  574. ],
  575. findUseOrgArray: [],
  576. areaInputValue: {},
  577. memberInputValue: {},
  578. multipleSelection: [], // 已选
  579. // 根据客户点击的督查类型查找督查对象ID
  580. // 新增
  581. listobjId: [],
  582. userId: localStorage.getItem("userid"),
  583. treeData: [],
  584. changeSupervisionVisible: false,
  585. changeSupervisionLoading: false,
  586. changeSupervision: {
  587. nm: "",
  588. presId: localStorage.getItem("userid"),
  589. endTime: "",
  590. pblmId: "",
  591. objId: "",
  592. objType: "",
  593. inspGroupId: "",
  594. inspPblmName: "",
  595. inspPblmDesc: "",
  596. pblmLong: "",
  597. pblmLat: "",
  598. pblmStat: "",
  599. inspPblmOrgName: "",
  600. pblmPersName: "",
  601. reviOpin: "",
  602. reviConc: "",
  603. reviOrgGuid: "",
  604. collTime: "",
  605. recPers: "",
  606. },
  607. // 督查类型
  608. supervisionTypeList: [
  609. {
  610. value: "1",
  611. label: "其他"
  612. }
  613. ],
  614. // 查询
  615. value6: [],
  616. findParams: {
  617. adName: '',
  618. name: '',
  619. persName: '',
  620. startTime: "",
  621. endTime: "",
  622. tmType: '1',
  623. persId: localStorage.getItem("userid"),
  624. state: ''
  625. },
  626. stateList: [
  627. {
  628. label: '未提交',
  629. value: '0'
  630. },
  631. {
  632. label: '已提交',
  633. value: '2'
  634. },
  635. {
  636. label: '已发布',
  637. value: '3'
  638. }
  639. ],
  640. timeType: [
  641. {label: '发现时间', value: '1'},
  642. {label: '复查时间', value: '2'}
  643. ],
  644. currentPage: 1, // 页码
  645. pageSize: 20, // 条数
  646. loading: false,
  647. total: 0, // 总数
  648. searchResult: [], // 结果
  649. crId: "", // 当前督查id
  650. // 督查详情
  651. userid: localStorage.getItem("userid"),
  652. supervisionDetailsVisible: false,
  653. problemDeleteVisible: false,
  654. supervisionDetails: {},
  655. pblmId: "",
  656. pblscr: "",
  657. pblscrList: [
  658. {
  659. lable: "我的问题",
  660. value: localStorage.getItem("userid")
  661. }
  662. ],
  663. pblscrGroup: "",
  664. header: {
  665. 'persId': localStorage.getItem('userid'),
  666. 'accessToken': localStorage.getItem('accessToken')
  667. },
  668. exportLoading: false,
  669. datas: {},
  670. showTianBaoPl: false,
  671. orgIds: "010",
  672. uploadDisabled: true
  673. };
  674. },
  675. computed: {
  676. hostUrl() {
  677. return hostUrl
  678. },
  679. isGd(){
  680. if(localStorage.getItem('currentRlcode').substring(0,2)=="44"){
  681. return true;
  682. }else{
  683. return false;
  684. }
  685. }
  686. },
  687. created() {
  688. if (this.userId) {
  689. console.log("已经登录");
  690. this.search();
  691. } else {
  692. this.$router.push("/login");
  693. }
  694. this.getLeftTreeData();
  695. this.addPicPanel = false;
  696. },
  697. activated() {
  698. this.getLeftTreeData();
  699. this.search();
  700. this.findParams = {
  701. adName: '',
  702. name: '',
  703. persName: '',
  704. startTime: "",
  705. endTime: "",
  706. tmType: '1',
  707. persId: localStorage.getItem("userid")
  708. };
  709. },
  710. methods: {
  711. tabChange(tabType) {
  712. this.tabType = tabType;
  713. this.getLeftTreeData();
  714. this.search();
  715. },
  716. handleCheckChange(data, checked, indeterminate) {
  717. let cNarray = this.$refs["jigou_tree"].getCheckedNodes();
  718. console.log(cNarray);
  719. this.treeNodeArray = cNarray;
  720. },
  721. getLeftTreeData() {
  722. var _self = this;
  723. request.get("/dc/organization/base/getAllNode", {
  724. params: {
  725. userId: this.userId,
  726. orgType: "010",
  727. tabType: this.tabType
  728. }
  729. }).then(res => {
  730. let data = res.data;
  731. data.forEach(ele => {
  732. if (ele.pid == null || ele.pid == "") {
  733. ele.pid = "010";
  734. }
  735. });
  736. data = _self.getTrees(data);
  737. _self.treeData = data;
  738. console.log(data);
  739. });
  740. },
  741. //格式化树形数据
  742. getTrees(list) {
  743. //@wxcwater重写方法 适应多个树
  744. let highLevelLength = 99; //预设最大节点id长度,目前最大应该为12,所以设置为99保证正常
  745. let _self = this;
  746. list.forEach((item, index) => {
  747. item["pidLength"] = item.pid && item.pid != "" ? item.pid.length : 0;
  748. if (highLevelLength > item.pidLength) {
  749. highLevelLength = item.pidLength;
  750. }
  751. });
  752. console.log(highLevelLength);
  753. let heightLevelNode = [];
  754. list.forEach((item, index) => {
  755. if (highLevelLength >= item.pidLength) {
  756. heightLevelNode.push(item);
  757. }
  758. });
  759. list.forEach((item, index) => {
  760. heightLevelNode.forEach(pItem => {
  761. _self.addTreeNode(pItem, item);
  762. });
  763. });
  764. console.log(heightLevelNode);
  765. return heightLevelNode;
  766. },
  767. addTreeNode: function (treeNode, leafNode) {
  768. let _self = this;
  769. if (!treeNode.hasOwnProperty("children")) {
  770. treeNode["children"] = [];
  771. }
  772. if (leafNode.pid == treeNode.id) {
  773. treeNode.children.push(leafNode);
  774. return;
  775. }
  776. treeNode.children.forEach(item => {
  777. _self.addTreeNode(item, leafNode);
  778. });
  779. },
  780. // 查询参数逻辑
  781. insertTreeNode: function (params) {
  782. this.treeNodeArray.push({
  783. name: params.name,
  784. code: params.code
  785. });
  786. this.treeNodeSelectVisible = false;
  787. this.areaSelectVisible = false;
  788. this.skSelectVisible = false;
  789. },
  790. deleteTreeNode: function (tag) {
  791. let deleteIndex;
  792. this.treeNodeArray.forEach((item, index) => {
  793. if (item.code == tag.code) {
  794. deleteIndex = index;
  795. }
  796. });
  797. this.treeNodeArray.splice(deleteIndex, 1);
  798. },
  799. // end
  800. // 操作成功反馈
  801. successInfo() {
  802. this.$message({
  803. type: "success",
  804. message: "操作成功!"
  805. });
  806. },
  807. // 操作失败反馈
  808. failInfo(val) {
  809. this.$message.error(val);
  810. },
  811. // 清空选择
  812. toggleSelection(rows) {
  813. this.$refs.multipleTable.clearSelection();
  814. },
  815. // 已选择项
  816. handleSelectionChange(val) {
  817. this.multipleSelection = val;
  818. },
  819. // 查询
  820. async search() {
  821. this.loading = true;
  822. let _self = this;
  823. await request.get("/dc/organization/base/getAllNode", {
  824. params: {
  825. userId: this.userId,
  826. orgType: "010",
  827. tabType: this.tabType
  828. }
  829. }).then(res => {
  830. let orgAllNode = res.data;
  831. _self.loading = true;
  832. let data = _self.findParams;
  833. data.startTime =
  834. _self.value6 && _self.value6.length > 0 ? _self.value6[0] : "";
  835. data.endTime =
  836. _self.value6 && _self.value6.length > 0 ? _self.value6[1] : "";
  837. data.pageNum = _self.currentPage;
  838. // data.recPers = _self.pblscr;
  839. data.groupName = _self.pblscrGroup;
  840. data.pageSize = _self.pageSize;
  841. _self.findUseOrgArray = [];
  842. _self.treeNodeArray.forEach(item => {
  843. if (item.id.length < 12) {
  844. orgAllNode.forEach(orgItem => {
  845. if (orgItem.id.startsWith(item.code)) {
  846. _self.findUseOrgArray.push(orgItem.id);
  847. }
  848. });
  849. }
  850. _self.findUseOrgArray.push(item.id);
  851. });
  852. if (_self.findUseOrgArray.length > 0) {
  853. data["orgIds"] = _self.findUseOrgArray.join(",");
  854. this.orgIds = _self.findUseOrgArray.join(",");
  855. } else {
  856. data["orgIds"] = "";
  857. }
  858. this.dataAll = data;
  859. data.tabType = this.tabType;
  860. request.post(`/bis/insp/other/pblm/page`, data).then(res => {
  861. _self.loading = false;
  862. _self.multipleSelection = [];
  863. if (res.success) {
  864. res.data.list.forEach((item) => {
  865. if (item.inTm || item.upTm || item.rectTm || item.fdTm) {
  866. item.inTm = typeof (item.inTm) == 'string' ? item.inTm : dateFormat(item.inTm, 'yyyy-MM-dd')
  867. item.upTm = typeof (item.upTm) == 'string' ? item.upTm : dateFormat(item.upTm, 'yyyy-MM-dd')
  868. item.rectTm = typeof (item.rectTm) == 'string' ? item.rectTm : dateFormat(item.rectTm, 'yyyy-MM-dd')
  869. item.fdTm = typeof (item.fdTm) == 'string' ? item.fdTm : dateFormat(item.fdTm, 'yyyy-MM-dd')
  870. }
  871. })
  872. _self.searchResult = res.data.list;
  873. _self.total = res.data.total;
  874. } else {
  875. _self.failInfo();
  876. }
  877. });
  878. });
  879. },
  880. async submitBtn() {
  881. if (this.multipleSelection.length === 0) {
  882. this.$message.warning('请至少选择一条问题');
  883. return;
  884. }
  885. let newArray = this.multipleSelection.map((item) => {
  886. return {
  887. "objId": item.objId,
  888. "objType": item.objType,
  889. "state": "3"
  890. }
  891. });
  892. const {success, message} = await pblmSubmit(newArray);
  893. if (success) {
  894. this.$message.success('问题发布成功');
  895. this.search();
  896. } else {
  897. this.$message.warning(message);
  898. }
  899. },
  900. toForm(){
  901. var idArr = [];
  902. if(this.multipleSelection && this.multipleSelection.length==0){
  903. this.$message.warning("请选择数据");
  904. return false;
  905. }else{
  906. this.multipleSelection.forEach((item)=>{
  907. idArr.push(item.pblmId);
  908. })
  909. }
  910. var ids = idArr.join(",");
  911. let host = hostUrl;
  912. let nginx = '/pageofficePath/';
  913. let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblm/list/word?ids='+ids+'&filename=pblm|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
  914. let a = document.createElement('a'); // 创建a标签
  915. a.setAttribute('href', href);// href链接
  916. a.click();// 自执行点击事件
  917. },
  918. async exportExcel() {
  919. let _self = this;
  920. await request
  921. .get("/dc/organization/base/getAllNode", {
  922. params: {
  923. userId: this.userId,
  924. orgType: "010"
  925. }
  926. })
  927. .then(res => {
  928. let orgAllNode = res.data;
  929. let data = _self.findParams;
  930. data.pageNum = _self.currentPage;
  931. data.pageSize = _self.pageSize;
  932. data.villType = "0";
  933. this.datas = JSON.stringify(data);
  934. _self.treeNodeArray.forEach(item => {
  935. console.log(item);
  936. if (item.id.length < 12) {
  937. orgAllNode.forEach(orgItem => {
  938. if (orgItem.id.startsWith(item.id)) {
  939. _self.findUseOrgArray.push(orgItem.id);
  940. }
  941. });
  942. } else {
  943. _self.findUseOrgArray.push(item.id);
  944. }
  945. });
  946. });
  947. let url = "/pdcApi/dc/insp/pblm/page/waga/export";
  948. let type = "post";
  949. let exportName = "其他问题列表.xls";
  950. let result = await exportModel(type, url, exportName, this.datas);
  951. _self.exportLoading = result;
  952. },
  953. async exportWord() {
  954. let _self = this;
  955. _self.exportLoading = true;
  956. await request
  957. .get("/dc/organization/base/getAllNode", {
  958. params: {
  959. userId: this.userId,
  960. orgType: "010"
  961. }
  962. })
  963. .then(res => {
  964. let orgAllNode = res.data;
  965. let data = _self.findParams;
  966. data.pageNum = _self.currentPage;
  967. data.pageSize = _self.pageSize;
  968. data.villType = "0";
  969. _self.treeNodeArray.forEach(item => {
  970. if (item.id.length < 12) {
  971. orgAllNode.forEach(orgItem => {
  972. if (orgItem.id.startsWith(item.id)) {
  973. _self.findUseOrgArray.push(orgItem.id);
  974. }
  975. });
  976. } else {
  977. _self.findUseOrgArray.push(item.id);
  978. }
  979. });
  980. });
  981. await request
  982. .post("/waga/doc", _self.dataAll)
  983. .then(res => {
  984. if (res.success) {
  985. _self.exportLoading = false;
  986. console.log(this.response);
  987. var a = document.createElement("a");
  988. a.href = `${this.hostUrl}${res.data.downloadPath}`;
  989. //设置文件名称
  990. a.download = "其他问题详情.doc";
  991. a.click();
  992. // window.open(`${this.hostUrl}${res.data.downloadPath}`)
  993. } else {
  994. _self.$mesage.error(res.message);
  995. }
  996. })
  997. .catch(res => {
  998. _self.$mesage.error(res.message);
  999. });
  1000. },
  1001. downFile(blob, fileName) {
  1002. // 非IE下载
  1003. if ("download" in document.createElement("a")) {
  1004. let link = document.createElement("a");
  1005. link.href = window.URL.createObjectURL(blob); // 创建下载的链接
  1006. link.download = fileName; // 下载后文件名
  1007. link.style.display = "none";
  1008. document.body.appendChild(link);
  1009. link.click(); // 点击下载
  1010. window.URL.revokeObjectURL(link.href); // 释放掉blob对象
  1011. document.body.removeChild(link); // 下载完成移除元素
  1012. } else {
  1013. // IE10+下载
  1014. window.navigator.msSaveBlob(blob, fileName);
  1015. }
  1016. },
  1017. // 下载模板
  1018. async downloadTemplate() {
  1019. await this.search();
  1020. await this.downloadTemplateSet();
  1021. this.uploadDisabled = false;
  1022. },
  1023. async downloadTemplateSet() {
  1024. let url =
  1025. "/pdcApi/dc/imp/pblm/download?userId=" +
  1026. this.userId +
  1027. "&orgType=010&orgIds=" +
  1028. this.orgIds;
  1029. let downloadName = "其他问题.xls";
  1030. let type = "get";
  1031. await exportModel(type, url, downloadName);
  1032. },
  1033. handleSizeChange(pageSize) {
  1034. this.pageSize = pageSize;
  1035. this.search();
  1036. },
  1037. // 关闭修改弹窗
  1038. closeEditDialog(val) {
  1039. this.changeSupervisionVisible = false
  1040. if (val == 'success') this.search()
  1041. },
  1042. // 详情弹框
  1043. showDetails(pblmId) {
  1044. this.currentProblemId = pblmId
  1045. this.supervisionDetailsVisible = true
  1046. },
  1047. // 删除弹窗
  1048. removeSuperviseOne(id) {
  1049. this.deleteId = id;
  1050. this.problemDeleteVisible = true;
  1051. },
  1052. deleteSuccess() {
  1053. this.problemDeleteVisible = false;
  1054. this.search();
  1055. this.$emit("problemCount");
  1056. },
  1057. // 修改弹窗显示
  1058. changeSup(pblmId) {
  1059. this.editId = pblmId
  1060. this.changeSupervisionVisible = true
  1061. },
  1062. UploadUrl: function () {
  1063. return `/pdcApi/file/insert?bizId=${this.changeSupervision.pblmId}`;
  1064. },
  1065. showPlDialog() {
  1066. this.showTianBaoPl = true;
  1067. },
  1068. closePlDialog(val) {
  1069. this.showTianBaoPl = false;
  1070. this.search();
  1071. },
  1072. //切换问题是否被督查简报调用
  1073. changeSfYy(row, val) {
  1074. this.$confirm("此问题将切换是否被督查简报引用, 是否继续?", "提示", {
  1075. confirmButtonText: "确定",
  1076. cancelButtonText: "取消",
  1077. type: "warning"
  1078. })
  1079. .then(() => {
  1080. if (val) {
  1081. request
  1082. .post(`/dc/insp/pblm/update`, {
  1083. pblmId: row,
  1084. quote: 0
  1085. })
  1086. .then(res => {
  1087. if (res.success) {
  1088. this.search();
  1089. }
  1090. });
  1091. } else {
  1092. request
  1093. .post(`/dc/insp/pblm/update`, {
  1094. pblmId: row,
  1095. quote: 1
  1096. })
  1097. .then(res => {
  1098. if (res.success) {
  1099. this.search();
  1100. }
  1101. });
  1102. }
  1103. })
  1104. .catch(() => {
  1105. this.$message({
  1106. type: "info",
  1107. message: "已取消切换"
  1108. });
  1109. });
  1110. }
  1111. },
  1112. watch: {
  1113. codeId: function () {
  1114. this.search();
  1115. },
  1116. showExpandSearchPanel: function (val) {
  1117. if (val) {
  1118. this.tableHeight = window.innerHeight - 359;
  1119. } else {
  1120. this.tableHeight = window.innerHeight - 260;
  1121. }
  1122. }
  1123. }
  1124. };
  1125. </script>
  1126. <style rel="stylesheet/scss" lang="scss" scoped>
  1127. @import "./base.css";
  1128. @import url("/src/assets/iconfont/iconfont.css");
  1129. @import url("/src/assets/css/mixin.scss");
  1130. .upload-container {
  1131. width: 100%;
  1132. position: relative;
  1133. .image-uploader {
  1134. width: 35%;
  1135. float: left;
  1136. }
  1137. .image-preview {
  1138. width: 200px;
  1139. height: 200px;
  1140. position: relative;
  1141. border: 1px dashed #d9d9d9;
  1142. float: left;
  1143. // margin-left: 50px;
  1144. .image-preview-wrapper {
  1145. position: relative;
  1146. width: 100%;
  1147. height: 100%;
  1148. img {
  1149. width: 100%;
  1150. height: 100%;
  1151. }
  1152. }
  1153. .image-preview-action {
  1154. position: absolute;
  1155. width: 100%;
  1156. height: 100%;
  1157. left: 0;
  1158. top: 0;
  1159. cursor: default;
  1160. text-align: center;
  1161. color: #fff;
  1162. opacity: 0;
  1163. font-size: 20px;
  1164. background-color: rgba(0, 0, 0, 0.5);
  1165. transition: opacity 0.3s;
  1166. cursor: pointer;
  1167. text-align: center;
  1168. line-height: 200px;
  1169. .el-icon-delete {
  1170. font-size: 36px;
  1171. }
  1172. }
  1173. &:hover {
  1174. .image-preview-action {
  1175. opacity: 1;
  1176. }
  1177. }
  1178. }
  1179. .image-app-preview {
  1180. margin-bottom: 10px;
  1181. width: 40vh;
  1182. height: 180px;
  1183. position: relative;
  1184. border: 1px dashed #d9d9d9;
  1185. float: left;
  1186. // margin-left: 50px;
  1187. .app-fake-conver {
  1188. height: 44px;
  1189. position: absolute;
  1190. width: 100%; // background: rgba(0, 0, 0, .1);
  1191. text-align: center;
  1192. line-height: 64px;
  1193. color: #fff;
  1194. }
  1195. }
  1196. }
  1197. .bottom {
  1198. margin-top: 13px;
  1199. line-height: 12px;
  1200. }
  1201. .button {
  1202. padding: 0;
  1203. float: right;
  1204. }
  1205. .image {
  1206. width: 100%;
  1207. display: block;
  1208. }
  1209. .clearfix:before,
  1210. .clearfix:after {
  1211. display: table;
  1212. content: "";
  1213. }
  1214. .clearfix:after {
  1215. clear: both;
  1216. }
  1217. #wenTiContainer_sk .el-tree-node {
  1218. /* overflow: auto; */
  1219. }
  1220. #wenTiContainer_sk .el-tree-node > .el-tree-node__children {
  1221. overflow: auto;
  1222. }
  1223. .shuiku .el-date-editor.el-input {
  1224. min-width: 180px !important;
  1225. }
  1226. .shuiku .header {
  1227. padding: 0px 10px;
  1228. }
  1229. .shuiku .el-row {
  1230. margin-bottom: 5px;
  1231. }
  1232. .shuiku .content {
  1233. margin: 10px;
  1234. }
  1235. /* .search .el-table>>>.el-tooltip {
  1236. white-space: pre-wrap !important;
  1237. line-height: 30px;
  1238. font-size: 0;
  1239. } */
  1240. .shuiku .search > > > .el-table .el-button:nth-child(odd) {
  1241. margin-left: 0 !important;
  1242. }
  1243. .custom_dialog .el-dialog {
  1244. width: 60% !important;
  1245. }
  1246. .custom_dialog .scroll300 {
  1247. max-height: 60vh !important;
  1248. }
  1249. .shuiku .el-tag + .el-tag {
  1250. margin-left: 10px;
  1251. }
  1252. .shuiku .button-new-tag {
  1253. margin-left: 10px;
  1254. height: 28px;
  1255. line-height: 28px;
  1256. padding-top: 0;
  1257. padding-bottom: 0;
  1258. }
  1259. .shuiku .input-new-tag {
  1260. width: 90px;
  1261. margin-left: 10px;
  1262. vertical-align: bottom;
  1263. }
  1264. .inspPblmCate {
  1265. padding: 2px 10px;
  1266. border-radius: 10px;
  1267. color: #ffffff;
  1268. -webkit-border-radius: 10px;
  1269. -moz-border-radius: 10px;
  1270. border-radius: 10px;
  1271. }
  1272. .skactive {
  1273. background: #3f8eff !important;
  1274. color: white !important;
  1275. margin-top: 5px;
  1276. margin-bottom: 5px;
  1277. }
  1278. .sknormal {
  1279. background: white;
  1280. margin-top: 5px;
  1281. margin-bottom: 5px;
  1282. }
  1283. </style>