429d0a9761482efe18cf951fd14ff4e318c6053b.svn-base 55 KB

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