c816f6c3e1ae79dbc8edd6b3464f040089f34191.svn-base 71 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758
  1. <template>
  2. <!-- 问题处置-2020人饮问题编辑 -->
  3. <div style="height:100%;width:100%" id="wenTiContainer_sk">
  4. <el-container>
  5. <!-- 主要窗口 -->
  6. <el-main style="margin:0px;padding:0px;overflow-y:hidden;" class="shuiku" v-loading="exportLoading">
  7. <!-- <el-card> -->
  8. <div class="pages" :style="{'max-height':testHeight+'px'}">
  9. <!-- 为什么要根据rowId来判断过滤条件的显示或者隐藏? -->
  10. <div style="padding: 12px 0 0 0">
  11. <el-row type="flex" justify="space-between">
  12. <el-col :span="24">
  13. <el-form :inline="true" size="mini" class="demo-form-inline"
  14. style="padding-left: 10px;">
  15. <el-form-item label="行政区划:">
  16. <el-input
  17. resize="none"
  18. type="input"
  19. :rows="3"
  20. placeholder="请输入行政区划名称"
  21. v-model.trim="findParams.adFullName"
  22. clearable
  23. ></el-input>
  24. </el-form-item>
  25. <el-form-item label="督查对象名称:">
  26. <el-input
  27. resize="none"
  28. type="input"
  29. :rows="3"
  30. placeholder="请输入名称"
  31. v-model.trim="findParams.nm"
  32. clearable
  33. ></el-input>
  34. </el-form-item>
  35. <el-form-item label="问题类别:">
  36. <el-input
  37. resize="none"
  38. type="input"
  39. :rows="3"
  40. placeholder="请输入名称"
  41. v-model.trim="findParams.inspPblmName"
  42. clearable
  43. ></el-input>
  44. </el-form-item>
  45. <el-form-item label="问题筛选:">
  46. <el-select v-model="pblscr" clearable placeholder="请选择">
  47. <el-option
  48. v-for="item in pblscrList"
  49. :key="item.value"
  50. :label="item.lable"
  51. :value="item.value"
  52. ></el-option>
  53. </el-select>
  54. </el-form-item>
  55. <el-form-item label="上报人员:">
  56. <el-input
  57. resize="none"
  58. type="input"
  59. :rows="3"
  60. placeholder="请输入名称"
  61. v-model.trim="findParams.persName"
  62. ></el-input>
  63. </el-form-item>
  64. <el-form-item label="发现时间:">
  65. <el-date-picker
  66. style="width: 200px;"
  67. v-model="value6"
  68. type="daterange"
  69. value-format="yyyy-MM-dd"
  70. range-separator="至"
  71. start-placeholder="开始日期"
  72. end-placeholder="结束日期"
  73. ></el-date-picker>
  74. </el-form-item>
  75. </el-form>
  76. </el-col>
  77. </el-row>
  78. <el-row type="flex" justify="space-between" style="border-top:1px solid #0014ff2e;">
  79. <el-col :span="24">
  80. <span style="padding-left: 10px;float:right;margin-top:5px;">
  81. <common-upload-auto-simple
  82. ref="ImportPlan"
  83. :limit=1
  84. :url="`/pdcApi/dc/insp/pblm/page/import`"
  85. @uploadOver="uploadOver"
  86. :accept="'.xls,.xlsx'"
  87. style="margin:auto;"
  88. comment=".xls,xlsx格式,不超过2MB(自动上传)"
  89. fileDesc="导入"
  90. ></common-upload-auto-simple>
  91. </span>
  92. <el-button type="primary" @click="downloadTemplate" style="float:right;margin-top:5px;">下载模板</el-button>
  93. <el-button
  94. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  95. type="primary"
  96. icon="el-icon-search"
  97. @click="search"
  98. >&nbsp;查&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;询&nbsp;
  99. </el-button>
  100. <el-button
  101. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  102. type="success"
  103. icon="el-icon-download"
  104. @click="exportExcel"
  105. >导出EXCEL
  106. </el-button>
  107. <el-button
  108. v-if="isGd"
  109. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  110. type="success"
  111. icon="el-icon-download"
  112. @click="toForm"
  113. >导出一表一单
  114. </el-button>
  115. <el-button
  116. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  117. type="success"
  118. icon="el-icon-delete"
  119. @click="batchDelete"
  120. >批量删除
  121. </el-button>
  122. </el-col>
  123. </el-row>
  124. </div>
  125. <!-- 查询展示 -->
  126. <div class="search" style="margin-top:10px;">
  127. <el-table
  128. v-loading="loading"
  129. border
  130. ref="multipleTable"
  131. :height="tableHeight"
  132. :data="searchResult"
  133. tooltip-effect="dark"
  134. style="width: 100%"
  135. @selection-change="handleSelectionChange"
  136. >
  137. <el-table-column
  138. type="selection"
  139. min-width="55">
  140. </el-table-column>
  141. <el-table-column align="center" type="index" label="序号" min-width="50">
  142. <template slot-scope="scope">{{ (currentPage - 1) * pageSize + (scope.$index + 1) }}
  143. </template>
  144. </el-table-column>
  145. <!-- <el-table-column header-align="center" align="center" min-width="140" prop="inspPblmName" label="小水库问题类别"></el-table-column> -->
  146. <el-table-column
  147. header-align="center"
  148. align="center"
  149. min-width="60"
  150. prop="province"
  151. label="省" v-if="isXj"
  152. show-overflow-tooltip
  153. ></el-table-column>
  154. <el-table-column
  155. header-align="center"
  156. align="center"
  157. min-width="60"
  158. prop="city"
  159. :label="ownAdName"
  160. show-overflow-tooltip
  161. ></el-table-column>
  162. <el-table-column
  163. header-align="center"
  164. align="center"
  165. min-width="60"
  166. prop="country"
  167. label="县"
  168. v-if="isXj"
  169. show-overflow-tooltip
  170. ></el-table-column>
  171. <el-table-column
  172. header-align="center"
  173. align="center"
  174. min-width="110"
  175. prop="objName"
  176. label="督查对象名称"
  177. show-overflow-tooltip
  178. ></el-table-column>
  179. <el-table-column
  180. header-align="center"
  181. align="center"
  182. min-width="140"
  183. prop="inspPblmName"
  184. label="督查问题类别"
  185. show-overflow-tooltip
  186. ></el-table-column>
  187. <el-table-column
  188. header-align="center"
  189. align="center"
  190. min-width="100"
  191. prop="checkPointBz"
  192. label="检查项目"
  193. show-overflow-tooltip>
  194. </el-table-column>
  195. <el-table-column
  196. header-align="center"
  197. align="center"
  198. min-width="100"
  199. prop="pblmDescBz"
  200. label="问题描述"
  201. show-overflow-tooltip>
  202. </el-table-column>
  203. <el-table-column
  204. header-align="center"
  205. align="center"
  206. min-width="100"
  207. prop="inspPblmDesc"
  208. label="详细描述"
  209. show-overflow-tooltip>
  210. </el-table-column>
  211. <el-table-column
  212. header-align="center"
  213. align="center"
  214. show-overflow-tooltip="true"
  215. min-width="120"
  216. prop="inspPblmCate"
  217. label="问题严重程度"
  218. >
  219. <template slot-scope="scope">
  220. <span
  221. style="padding: 3px 10px;background:#27C19F;border-radius:15px;color:rgba(255,255,255,1)"
  222. v-if="scope.row.inspPblmCate == 0"
  223. >一般</span>
  224. <span
  225. style="padding: 3px 10px;background:#E6A23C;border-radius:15px;color:rgba(255,255,255,1)"
  226. v-if="scope.row.inspPblmCate == 1"
  227. >较重</span>
  228. <span
  229. style="padding: 3px 10px;background:#F56C6C;border-radius:15px;color:rgba(255,255,255,1)"
  230. v-if="scope.row.inspPblmCate == 2"
  231. >严重</span>
  232. </template>
  233. </el-table-column>
  234. <el-table-column
  235. header-align="center"
  236. align="center"
  237. min-width="120"
  238. prop="ifCasePblm"
  239. label="是否典型"
  240. >
  241. <template slot-scope="scope">
  242. <span v-if="scope.row.ifCasePblm == 1">典型</span>
  243. <span v-if="scope.row.ifCasePblm == 0">非典型</span>
  244. </template>
  245. </el-table-column>
  246. <el-table-column
  247. header-align="center"
  248. align="center"
  249. min-width="70"
  250. prop="persName"
  251. label="上报人"
  252. ></el-table-column>
  253. <el-table-column
  254. prop="collTime"
  255. label="上报时间"
  256. :formatter="timestampToTime"
  257. sortable
  258. align="center"
  259. min-width="110"
  260. show-overflow-tooltip
  261. ></el-table-column>
  262. <el-table-column
  263. header-align="center"
  264. align="center"
  265. min-width="150"
  266. prop="hasVedio"
  267. label="是否包含多媒体文件"
  268. >
  269. <template slot-scope="scope">
  270. <p v-if="scope.row.hasVedio == 1">是</p>
  271. <p v-if="scope.row.hasVedio == 0">否</p>
  272. </template>
  273. </el-table-column>
  274. <el-table-column
  275. fixed="right"
  276. label="操作"
  277. min-width="130"
  278. >
  279. <template slot-scope="scope">
  280. <el-button icon="el-icon-view" title="查看详情" type="text"
  281. @click="showDetails(scope.row.pblmId)"></el-button>
  282. <el-button icon="el-icon-edit" type="text" title="修改问题"
  283. @click="changeSup(scope.row.pblmId,scope.row.cwsCode)"
  284. v-if="ownPriv('manage')"></el-button>
  285. <el-button
  286. icon="el-icon-delete"
  287. type="text"
  288. v-if="ownPriv('manage')"
  289. title="删除问题" @click="removeSuperviseOne(scope.row.pblmId)"
  290. ></el-button>
  291. </template>
  292. </el-table-column>
  293. </el-table>
  294. <!-- 分页 -->
  295. <div class="paginationWarpper">
  296. <el-pagination
  297. class="paginationCenter"
  298. background
  299. @size-change="handleSizeChange"
  300. @current-change="search"
  301. :current-page.sync="currentPage"
  302. :page-sizes="[10, 20, 50, 100]"
  303. :page-size="pageSize"
  304. layout="total, sizes, prev, pager, next, jumper"
  305. :total="total"
  306. ></el-pagination>
  307. </div>
  308. </div>
  309. <!-- 详情弹框 -->
  310. <el-dialog
  311. class="outerDialog custom_dialog"
  312. title="问题详情"
  313. width="60%"
  314. v-if="supervisionDetailsVisible"
  315. :visible.sync="supervisionDetailsVisible"
  316. >
  317. <supervision-details ref="xianqing" :problemId="currentProblemId"
  318. :objType="999"></supervision-details>
  319. <span slot="footer">
  320. <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
  321. </span>
  322. </el-dialog>
  323. <!-- 删除的弹窗 -->
  324. <el-dialog class="deleteDialog" title="问题删除描述" :visible.sync="problemDeleteVisible">
  325. <Problem-delete
  326. ref="deleteMiaoShu"
  327. :deleteProblemId="deleteId"
  328. @deleteSuccess="deleteSuccess"
  329. ></Problem-delete>
  330. <span slot="footer">
  331. <el-button @click="problemDeleteVisible = false">返回</el-button>
  332. </span>
  333. </el-dialog>
  334. </div>
  335. </el-main>
  336. </el-container>
  337. <EditPicOnline
  338. ref="editPicWeakupEvnent"
  339. v-if="editPicDialog"
  340. :picUrl="picUrl"
  341. @cancelHandler="cancelHandler"
  342. @editPicData="editPicDataEvent"
  343. ></EditPicOnline>
  344. <!-- 修改组件 -->
  345. <problem-edit :editId="editId" @closeEditDialog="closeEditDialog" v-if="changeSupervisionVisible"
  346. :pType="pType"></problem-edit>
  347. </div>
  348. </template>
  349. <script>
  350. import {
  351. deleteFileById,
  352. findProblemPageInfoImport,
  353. getSupervisdByID,
  354. showDetailsXq,
  355. submitUpload,
  356. updatelist,
  357. pblmSubmit
  358. } from "@api/duChaAPI.js";
  359. import {exportModel} from "@util/gw_exportModel";
  360. import request from "@util/gw_ajax_request.js";
  361. import elaudio from "@widget/elAudioShort.vue";
  362. import inuptWithDuChaTreeNode from "@widget/inuptWithDuChaTreeNode.vue";
  363. import inputWidthDuChaNodes from "@widget/inputWithDuChaNodes.vue";
  364. import inputWidthDuChaShuiKu from "@widget/inputWith_sk.vue";
  365. import problemDialog from "./problemDialog.vue";
  366. import shuiKuWentiPl from "./problemBatchImp/tongYongWenti_piliang.vue"
  367. import wtLeftTree from "./wtcz_lefttree.vue"
  368. import { hostUrl } from "@util/global_variable.js";
  369. import CommonUploadAutoSimple from "../../widgets/common-upload-auto-simple";
  370. export default {
  371. props: ["codeId", "rowId"],
  372. components: {
  373. upload: resolve => {
  374. require(["@widget/uploadFile.vue"], resolve);
  375. },
  376. //详情页
  377. supervisionDetails: resolve => {
  378. require(["../duChaWenTi/supervisionDetails_import.vue"], resolve);
  379. },
  380. // 删除描述页
  381. ProblemDelete: resolve => {
  382. require(["./problemDelete.vue"], resolve);
  383. },
  384. EditPicOnline: resolve => {
  385. require(["@widget/EditPicOnline/EditPicOnline.vue"], resolve);
  386. },
  387. // addPicDialog: resolve => {
  388. // require(["./addPicDialog.vue"], resolve);
  389. // },
  390. elaudio: elaudio,
  391. inuptWithDuChaTreeNode: inuptWithDuChaTreeNode,
  392. inputWidthDuChaNodes: inputWidthDuChaNodes,
  393. inputWidthDuChaShuiKu: inputWidthDuChaShuiKu,
  394. problemDialog: problemDialog,
  395. shuiKuWentiPl: shuiKuWentiPl,
  396. wtLeftTree: wtLeftTree,
  397. CommonUploadAutoSimple,
  398. // 修改问题
  399. problemEdit: resolve => {
  400. require(["../duChaWenTi/importProblemModify.vue"], resolve);
  401. },
  402. },
  403. data() {
  404. var validatePass1 = (rules1, value, callback) => {
  405. if (this.newSupervision.startTime > this.newSupervision.endTime) {
  406. callback(new Error("结束时间不能早于开始时间"));
  407. } else {
  408. callback();
  409. }
  410. };
  411. var validatePass2 = (rules1, value, callback) => {
  412. let startTime = this.changeSupervision.startTime.slice(0, 10);
  413. if (startTime > this.changeSupervision.endTime) {
  414. callback(new Error("结束时间不能早于开始时间"));
  415. } else {
  416. callback();
  417. }
  418. };
  419. var divisionList = (rules1, value, callback) => {
  420. if (this.newGroup.divisionList.length) {
  421. callback();
  422. } else {
  423. callback(new Error("至少要添加一个地区"));
  424. }
  425. };
  426. return {
  427. commonType:[
  428. {
  429. label:"风险隐患排查堤防",
  430. value:"605"
  431. },
  432. {
  433. label:"风险隐患排查水库",
  434. value:"606"
  435. },
  436. {
  437. label:"风险隐患排查水闸",
  438. value:"607"
  439. }
  440. ],
  441. type:"",
  442. tabType: "0",//0全部,1当前数据,2历史数据
  443. editPicRefresh: true,
  444. showExpandSearchPanel: false,
  445. tableHeight: window.innerHeight - 291,
  446. globoId: "",
  447. addPicPanel: false,
  448. currentDate: new Date(),
  449. deleteId: "",
  450. treeNodeArray: [],
  451. treeNodeSelectVisible: false,
  452. adNodeArray: [],
  453. adNodeSelectVisible: false,
  454. areaSelectVisible: false,
  455. rsvrNodeArray: [],
  456. rsvrNodeSelectVisible: false,
  457. skSelectVisible: false,
  458. currentProblemId: "",
  459. updateIdXiuGai: "",
  460. rules1: {
  461. inspPblmName: [
  462. {
  463. required: true,
  464. message: "请输入问题名称",
  465. trigger: "blur"
  466. },
  467. {
  468. min: 1,
  469. max: 999,
  470. message: "不超过100字符",
  471. trigger: "blur"
  472. }
  473. ],
  474. inspPblmDesc: [
  475. {
  476. required: true,
  477. message: "请输入问题描述",
  478. trigger: "blur"
  479. }
  480. ],
  481. recPers: [
  482. {
  483. required: true,
  484. message: "请输入记录人",
  485. trigger: "blur"
  486. },
  487. {
  488. min: 1,
  489. max: 999,
  490. message: "不超过100字符",
  491. trigger: "blur"
  492. }
  493. ],
  494. objType: [
  495. {
  496. required: true,
  497. message: "请选择督查对象类型",
  498. trigger: "change"
  499. }
  500. ],
  501. objId: [
  502. {
  503. required: true,
  504. message: "请选择督查对象类型",
  505. trigger: "change"
  506. }
  507. ],
  508. inspPblmType: [
  509. {
  510. required: true,
  511. message: "请选择督查问题类型",
  512. trigger: "change"
  513. }
  514. ],
  515. dataStat: [
  516. {
  517. required: true,
  518. message: "请选择数据状态",
  519. trigger: "change"
  520. }
  521. ],
  522. collTime: [
  523. {
  524. required: true,
  525. message: "请选择采集时间",
  526. trigger: "change"
  527. }
  528. ],
  529. ifCasePblm: [
  530. {
  531. required: true,
  532. message: "请选择是否典型",
  533. trigger: "change"
  534. }
  535. ],
  536. pblmStat: [
  537. {
  538. required: true,
  539. message: "请选择问题类型",
  540. trigger: "change"
  541. }
  542. ],
  543. inspPblmCate: [
  544. {
  545. required: true,
  546. message: "请选择问题程度",
  547. trigger: "change"
  548. },
  549. {
  550. trigger: "change"
  551. }
  552. ]
  553. },
  554. dxdcAsideHeight: window.innerHeight - 220,
  555. maxHeight: window.innerHeight - 120,
  556. testHeight: window.innerHeight - 120,
  557. supervisionStateList: [
  558. {
  559. value: "0",
  560. label: "暂存"
  561. },
  562. {
  563. value: "1",
  564. label: "上报"
  565. }
  566. ],
  567. supervisionState: [
  568. {
  569. value: "0",
  570. label: "一般"
  571. },
  572. {
  573. value: "1",
  574. label: "较重"
  575. },
  576. {
  577. value: "2",
  578. label: "严重"
  579. },
  580. {
  581. value: "3",
  582. label: "特别严重"
  583. }
  584. ],
  585. supervision: [
  586. {
  587. value: "1",
  588. label: "是"
  589. },
  590. {
  591. value: "0",
  592. label: "否"
  593. }
  594. ],
  595. hasVedio1: [
  596. {
  597. value: "1",
  598. label: "是"
  599. },
  600. {
  601. value: "0",
  602. label: "否"
  603. }
  604. ],
  605. findUseOrgArray: [],
  606. areaInputValue: {},
  607. memberInputValue: {},
  608. multipleSelection: [], // 已选
  609. selectionType: {
  610. remove: 0,
  611. befor: 0,
  612. now: 0,
  613. after: 0
  614. },
  615. // 根据客户点击的督查类型查找督查对象ID
  616. // 新增
  617. listobjId: [],
  618. userId: localStorage.getItem("userid"),
  619. treeData: [],
  620. // 修改督查
  621. pictureArray: [],
  622. audioArray: [],
  623. videoArray: [],
  624. fileArray: [],
  625. audiotabName: "",
  626. videotabName: "",
  627. picturetabName: "",
  628. filetabName: "",
  629. playerOptions: {
  630. height: "120",
  631. autoplay: true,
  632. muted: true,
  633. language: "en",
  634. playbackRates: [0.7, 1.0, 1.5, 2.0],
  635. sources: [
  636. {
  637. type: "video/mp4",
  638. // mp4
  639. src: "http://vjs.zencdn.net/v/oceans.mp4"
  640. // webm
  641. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  642. },
  643. {
  644. type: "video/mp4",
  645. // mp4
  646. src: "http://vjs.zencdn.net/v/oceans.mp4"
  647. // webm
  648. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  649. },
  650. {
  651. type: "video/mp4",
  652. // mp4
  653. src: "http://vjs.zencdn.net/v/oceans.mp4"
  654. // webm
  655. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  656. },
  657. {
  658. type: "video/mp4",
  659. // mp4
  660. src: "http://vjs.zencdn.net/v/oceans.mp4"
  661. // webm
  662. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  663. }
  664. ]
  665. },
  666. changeSupervisionVisible: false,
  667. changeSupervisionLoading: false,
  668. changeSupervision: {
  669. nm: "",
  670. presId: localStorage.getItem("userid"),
  671. endTime: "",
  672. pblmId: "",
  673. objId: "",
  674. pType: "",
  675. inspGroupId: "",
  676. inspPblmName: "",
  677. inspPblmDesc: "",
  678. pblmLong: "",
  679. pblmLat: "",
  680. pblmStat: "",
  681. ifCasePblm: "",
  682. inspPblmOrgName: "",
  683. pblmPersName: "",
  684. inspPblmCate: "",
  685. reviOpin: "",
  686. reviConc: "",
  687. reviOrgGuid: "",
  688. collTime: "",
  689. recPers: "",
  690. gwComFiles: [
  691. {
  692. id: "",
  693. filePath: "",
  694. bizId: ""
  695. }
  696. ]
  697. },
  698. flash: false,
  699. // 督查类型
  700. supervisionTypeList: [
  701. {
  702. value: "1",
  703. label: "小水库"
  704. }
  705. ],
  706. // 查询
  707. value6: [],
  708. findParams: {
  709. hasVedio: "",
  710. adCode: "",
  711. pblmStat: "",
  712. nm: "",
  713. adFullName: "",
  714. startTime: "",
  715. endTime: "",
  716. pType: 999,
  717. inspPblmName: "",
  718. persId: localStorage.getItem("userid"),
  719. state: ''
  720. },
  721. stateList: [
  722. {
  723. label: '未提交',
  724. value: '0'
  725. },
  726. {
  727. label: '已提交',
  728. value: '2'
  729. },
  730. {
  731. label: '已发布',
  732. value: '3'
  733. }
  734. ],
  735. currentPage: 1, // 页码
  736. pageSize: 20, // 条数
  737. loading: false,
  738. total: 0, // 总数
  739. searchResult: [], // 结果
  740. crId: "", // 当前督查id
  741. // 督查详情
  742. userid: localStorage.getItem("userid"),
  743. supervisionDetailsVisible: false,
  744. problemDeleteVisible: false,
  745. supervisionDetails: {},
  746. pblmId: "",
  747. gwComFiles: [],
  748. pblscr: "",
  749. pblscrList: [
  750. {
  751. lable: "我的问题",
  752. value: localStorage.getItem("userid")
  753. }
  754. ],
  755. pblscrGroup: "",
  756. t1: {},
  757. t2: {},
  758. t3: {},
  759. problemList: [],
  760. currentCheckPointList: [],
  761. currentProblemDescList: [],
  762. xiangqingmiaoshu: '',
  763. wenTiLeiBie: "",
  764. jianChaXiangMu: "",
  765. actionUrl: "",
  766. fileList: [],
  767. header: {
  768. 'persId': localStorage.getItem('userid'),
  769. 'accessToken': localStorage.getItem('accessToken')
  770. },
  771. fileListLength: 0,
  772. showShuiKuTianBaoPl: false,
  773. uploadDisabled: true,
  774. exportLoading: false,
  775. datas: {},
  776. orgIds: '001',
  777. editPicDialog: false,
  778. picUrl: "",
  779. picId: "",
  780. downloadIcon: "el-icon-download",
  781. buttonLoading: false,
  782. treeAllData: [],
  783. newYear: "",
  784. editId: "",
  785. pType: 999,
  786. };
  787. },
  788. computed: {
  789. hostUrl() {
  790. return hostUrl
  791. },
  792. isGd(){
  793. if(localStorage.getItem('currentRlcode').substring(0,2)=="44"){
  794. return true;
  795. }else{
  796. return false;
  797. }
  798. }
  799. },
  800. created() {
  801. if (this.userId) {
  802. console.log("已经登录");
  803. this.search();
  804. } else {
  805. this.$router.push("/login");
  806. }
  807. this.addPicPanel = false;
  808. },
  809. activated() {
  810. },
  811. methods: {
  812. batchDelete(){
  813. var _self = this;
  814. if(this.multipleSelection && this.multipleSelection.length>0){
  815. this.$confirm('确定删除选择的问题吗?', '提示', {
  816. confirmButtonText: '确定',
  817. cancelButtonText: '取消',
  818. type: 'warning'
  819. }).then(() => {
  820. request.post(`/dc/insp/pblm/batch/delete`,this.multipleSelection).then(res => {
  821. if(res.success) {
  822. this.multipleSelection = [];
  823. _self.$refs.multipleTable.clearSelection();
  824. _self.search();
  825. }else{
  826. this.multipleSelection = [];
  827. _self.$refs.multipleTable.clearSelection();
  828. _self.search();
  829. }
  830. })
  831. })
  832. }else{
  833. this.$message.warning("请选择问题");
  834. }
  835. },
  836. uploadOver(){
  837. this.search();
  838. },
  839. changeType(){
  840. this.problemList = [];
  841. this.getproblemSmallType();
  842. },
  843. changeTabType(tabType) {
  844. this.treeNodeArray = [];
  845. this.tabType = tabType;
  846. this.search();
  847. },
  848. //图片编辑
  849. editPicEvent(item) {
  850. this.picUrl = this.hostUrl + "/" + item.filePath;
  851. this.editPicDialog = true;
  852. this.editPicRefresh = false;
  853. this.picId = item.id;
  854. },
  855. cancelHandler() {
  856. this.editPicDialog = false;
  857. this.editPicRefresh = true;
  858. },
  859. editPicDataEvent(item) {
  860. request.post(`/file/updateFile?bizId=${this.changeSupervision.pblmId}&id=${this.picId}`, item, {headers: {'Content-Type': 'multipart/form-data'}}).then(res => {
  861. console.log(res);
  862. if (res.success) {
  863. this.pictureArray = [];
  864. showDetailsXq(this.updateIdXiuGai).then(res => {
  865. res.data.gwComFiles.forEach(item => {
  866. this.pictureArray.push(item);
  867. this.editPicDialog = false;
  868. this.editPicRefresh = true;
  869. });
  870. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  871. });
  872. }
  873. });
  874. },
  875. // 操作成功反馈
  876. successInfo() {
  877. this.$message({
  878. type: "success",
  879. message: "操作成功!"
  880. });
  881. },
  882. // 操作失败反馈
  883. failInfo(val) {
  884. this.$message.error(val);
  885. },
  886. // 已选择项
  887. handleSelectionChange(val) {
  888. this.multipleSelection = val;
  889. },
  890. // 查询
  891. async search() {
  892. this.loading = true;
  893. let _self = this;
  894. let orgAllNode = this.treeAllData;
  895. _self.loading = true;
  896. let data = _self.findParams;
  897. data.startTime = _self.value6 && _self.value6.length > 0 ? _self.value6[0] : '';
  898. data.endTime = _self.value6 && _self.value6.length > 0 ? _self.value6[1] : '';
  899. data.pageNum = _self.currentPage;
  900. data.recPers = _self.pblscr;
  901. data.orgNm = _self.pblscrGroup;
  902. data.pageSize = _self.pageSize;
  903. data.objName = data.nm;
  904. data.villType = "";
  905. _self.findUseOrgArray = [];
  906. _self.treeNodeArray.forEach(item => {
  907. if (item.id.length < 12) {
  908. orgAllNode.forEach(orgItem => {
  909. if (orgItem.id.startsWith(item.code)) {
  910. _self.findUseOrgArray.push(orgItem.id);
  911. }
  912. });
  913. }
  914. _self.findUseOrgArray.push(item.id);
  915. });
  916. if (_self.findUseOrgArray.length > 0) {
  917. data["orgIds"] = _self.findUseOrgArray.join(",");
  918. this.orgIds = _self.findUseOrgArray.join(",");
  919. } else {
  920. data["orgIds"] = "";
  921. }
  922. if (this.rowId) {
  923. data["orgIds"] = this.rowId;
  924. }
  925. data["year"] = this.newYear;
  926. data.tabType = this.tabType;
  927. findProblemPageInfoImport(data).then(res => {
  928. _self.loading = false;
  929. _self.multipleSelection = [];
  930. if (res.success) {
  931. _self.searchResult = res.data.list;
  932. // console.log( "绝对是"+searchResult)
  933. _self.total = res.data.total;
  934. } else {
  935. _self.failInfo();
  936. }
  937. });
  938. },
  939. async submitBtn() {
  940. if (this.multipleSelection.length === 0) {
  941. this.$message.warning('请至少选择一条问题');
  942. return;
  943. }
  944. let newArray = this.multipleSelection.map((item) => {
  945. return {
  946. "objId": item.objId,
  947. "objType": item.objType,
  948. "state": "3"
  949. }
  950. });
  951. const {success, message} = await pblmSubmit(newArray);
  952. if (success) {
  953. this.$message.success('问题发布成功');
  954. this.search();
  955. } else {
  956. this.$message.warning(message);
  957. }
  958. },
  959. toForm(){
  960. var idArr = [];
  961. if(this.multipleSelection && this.multipleSelection.length==0){
  962. this.$message.warning("请选择数据");
  963. return false;
  964. }else{
  965. this.multipleSelection.forEach((item)=>{
  966. idArr.push(item.pblmId);
  967. })
  968. }
  969. var ids = idArr.join(",");
  970. let host = hostUrl;
  971. let nginx = '/pageofficePath/';
  972. let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblm/list/word?ids='+ids+'&filename=pblm|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
  973. let a = document.createElement('a'); // 创建a标签
  974. a.setAttribute('href', href);// href链接
  975. a.click();// 自执行点击事件
  976. },
  977. async exportExcel() {
  978. this.exportLoading = true;
  979. let _self = this;
  980. let orgAllNode = _self.treeAllData;
  981. let data = _self.findParams;
  982. data.pageNum = _self.currentPage;
  983. data.pageSize = _self.pageSize;
  984. data.villType = "";
  985. data.objName = data.nm;
  986. _self.datas = JSON.stringify(data);
  987. _self.treeNodeArray.forEach(item => {
  988. console.log(item);
  989. if (item.id.length < 12) {
  990. orgAllNode.forEach(orgItem => {
  991. if (orgItem.id.startsWith(item.id)) {
  992. _self.findUseOrgArray.push(orgItem.id);
  993. }
  994. });
  995. } else {
  996. _self.findUseOrgArray.push(item.id);
  997. }
  998. });
  999. let url = "/pdcApi/dc/insp/pblm/page/export";
  1000. let type = "post";
  1001. let exportName = "外部导入问题列表.xls"
  1002. let result = await exportModel(type, url, exportName, this.datas);
  1003. _self.exportLoading = result;
  1004. },
  1005. async exportWord() {
  1006. let _self = this;
  1007. _self.exportLoading = true;
  1008. let orgAllNode = _self.treeAllData;
  1009. let data = _self.findParams;
  1010. data.pageNum = _self.currentPage;
  1011. data.pageSize = _self.pageSize;
  1012. data.villType = "";
  1013. this.datas = data;
  1014. _self.treeNodeArray.forEach(item => {
  1015. if (item.id.length < 12) {
  1016. orgAllNode.forEach(orgItem => {
  1017. if (orgItem.id.startsWith(item.id)) {
  1018. _self.findUseOrgArray.push(orgItem.id);
  1019. }
  1020. });
  1021. } else {
  1022. _self.findUseOrgArray.push(item.id);
  1023. }
  1024. });
  1025. //下载word文档2
  1026. await request.post('/rever/doc', this.datas).then(res => {
  1027. if (res.success) {
  1028. console.log(this.response)
  1029. var a = document.createElement('a');
  1030. a.href = `${this.hostUrl}${res.data.downloadPath}`;
  1031. //设置文件名称
  1032. a.download = '小水库问题详情.doc';
  1033. a.click();
  1034. // window.open(`${this.hostUrl}${res.data.downloadPath}`)
  1035. _self.exportLoading = false;
  1036. } else {
  1037. _self.$mesage.error(res.message)
  1038. }
  1039. }).catch(res => {
  1040. _self.$mesage.error(res.message)
  1041. })
  1042. },
  1043. downFile(blob, fileName) {
  1044. // 非IE下载
  1045. if ("download" in document.createElement("a")) {
  1046. let link = document.createElement("a");
  1047. link.href = window.URL.createObjectURL(blob); // 创建下载的链接
  1048. link.download = fileName; // 下载后文件名
  1049. link.style.display = "none";
  1050. document.body.appendChild(link);
  1051. link.click(); // 点击下载
  1052. window.URL.revokeObjectURL(link.href); // 释放掉blob对象
  1053. document.body.removeChild(link); // 下载完成移除元素
  1054. } else {
  1055. // IE10+下载
  1056. window.navigator.msSaveBlob(blob, fileName);
  1057. }
  1058. },
  1059. async downloadTemplate() {
  1060. let url = "/pdcApi/dc/insp/pblm/page/downloadExcel";
  1061. let type = "get";
  1062. let exportName = "问题导入模板.xlsx"
  1063. let result = await exportModel(type, url, exportName, null);
  1064. },
  1065. // 下载模板
  1066. // async downloadTemplate() {
  1067. //
  1068. // await this.search();
  1069. // await this.downloadTemplateSet();
  1070. // this.uploadDisabled = false;
  1071. //
  1072. // },
  1073. downloadTemplateSet() {
  1074. let _this = this;
  1075. _this.downloadIcon = "el-icon-loading"
  1076. // 使用POST传值下载文件,可以看到请求参数和避免请求参数过长导致请求失败
  1077. let xhr = new XMLHttpRequest();
  1078. this.findParams.orgIds = '';
  1079. let datas = JSON.stringify(this.findParams);
  1080. xhr.open('post', '/api/dc/imp/pblm/download', true);
  1081. xhr.responseType = 'blob';
  1082. // data传值方式和Content-Type要对应
  1083. let data = 'userId=' + this.userId + '&orgType=001&orgIds=' + this.orgIds + '&datas=' + datas;
  1084. xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  1085. // xhr.setRequestHeader('Content-Type', 'application/json;charset=utf-8');
  1086. xhr.setRequestHeader('persId', localStorage.getItem('userid') ? localStorage.getItem('userid') : '');
  1087. xhr.onload = function () {
  1088. if (this.status == 200) {
  1089. let blob = this.response;
  1090. let a = document.createElement('a');
  1091. let url = window.URL.createObjectURL(blob);
  1092. a.href = url;
  1093. //设置文件名称
  1094. a.download = '小水库问题.xls';
  1095. a.click();
  1096. }
  1097. _this.downloadIcon = "el-icon-download"
  1098. }
  1099. xhr.send(data);
  1100. },
  1101. showPlDialog() {
  1102. this.showShuiKuTianBaoPl = true
  1103. },
  1104. closePlDialog(val) {
  1105. this.showShuiKuTianBaoPl = false
  1106. this.search();
  1107. },
  1108. handleSizeChange(pageSize) {
  1109. this.pageSize = pageSize;
  1110. this.search();
  1111. },
  1112. // 新增
  1113. getDuChaId() {
  1114. //新增中 获取督查对象id
  1115. getSupervisdByID(this.userid, 1).then(res => {
  1116. if (res.success) {
  1117. // alert(1)
  1118. this.listobjId = res.data;
  1119. } else {
  1120. this.failInfo();
  1121. }
  1122. });
  1123. },
  1124. // 取消
  1125. removeNewSupervision(arg) {
  1126. this.gwComFiles = [];
  1127. if (arg) {
  1128. this.gwComFiles = arg;
  1129. this.$refs.uploadFile.init();
  1130. }
  1131. },
  1132. // 详情弹框
  1133. showDetails(id) {
  1134. this.currentProblemId = id;
  1135. this.supervisionDetailsVisible = true;
  1136. },
  1137. // 删除弹窗
  1138. removeSuperviseOne(id) {
  1139. this.deleteId = id;
  1140. this.problemDeleteVisible = true;
  1141. // showDetailsXq(id).then(res => {
  1142. // // console.log("123" + res.data)
  1143. // this.persNameRen = res.data.persName;
  1144. // });
  1145. },
  1146. deleteSuccess() {
  1147. this.problemDeleteVisible = false;
  1148. this.search();
  1149. this.$emit("problemCount");
  1150. },
  1151. // 修改弹窗显示
  1152. // changeSup(id) {
  1153. // this.currentProblemId = '';
  1154. // this.pictureArray = [];
  1155. // this.audioArray = [];
  1156. // this.videoArray = [];
  1157. // this.fileArray = [];
  1158. // this.updateIdXiuGai = id;
  1159. // showDetailsXq(this.updateIdXiuGai).then(res => {
  1160. // this.changeSupervision = res.data;
  1161. // this.fileList = this.changeSupervision.gwComFiles;
  1162. // this.t1['inspPblmsName'] = this.changeSupervision.inspPblmsName
  1163. // this.problemList.forEach(ele => {
  1164. // if (ele.inspPblmsName == this.t1.inspPblmsName) {
  1165. // this.problemListChange(ele)
  1166. // }
  1167. // })
  1168. // this.t2['checkPointName'] = this.changeSupervision.checkPoint
  1169. // this.currentCheckPointList.forEach(ele => {
  1170. // if (ele.checkPointName == this.t2.checkPointName) {
  1171. // this.currentCheckPointListChange(ele)
  1172. // }
  1173. // })
  1174. // this.t3['pblmDesc'] = this.changeSupervision.pblmDesc
  1175. // this.changeSupervisionVisible = true;
  1176. // res.data.gwComFiles.forEach(item => {
  1177. // if (
  1178. // item.fileExt == "mp3" ||
  1179. // item.fileExt == "MP3" ||
  1180. // item.fileExt == "m4a"
  1181. // ) {
  1182. // this.audioArray.push(item);
  1183. // } else if (
  1184. // item.fileExt == "jpg" ||
  1185. // item.fileExt == "JPG" ||
  1186. // item.fileExt == "png" ||
  1187. // item.fileExt == "PNG" ||
  1188. // item.fileExt == "JPEG" ||
  1189. // item.fileExt == "jpeg"
  1190. // ) {
  1191. // this.pictureArray.push(item);
  1192. // } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  1193. // this.videoArray.push({
  1194. // id: item.id,
  1195. // bizId: item.bizId,
  1196. // width: "130",
  1197. // height: "130",
  1198. // autoplay: false,
  1199. // muted: true,
  1200. // language: "en",
  1201. // playbackRates: [0.7, 1.0, 1.5, 2.0],
  1202. // sources: [
  1203. // {
  1204. // type: "video/mp4",
  1205. // // mp4
  1206. // src: this.hostUrl + item.filePath
  1207. // // webm
  1208. // // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  1209. // }
  1210. // ]
  1211. // });
  1212. // } else {
  1213. // this.fileArray.push(item);
  1214. // }
  1215. // });
  1216. //
  1217. // this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  1218. // this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  1219. // this.videotabName = "视频资料(" + this.videoArray.length + ")";
  1220. // this.filetabName = "其它资料(" + this.fileArray.length + ")";
  1221. // });
  1222. // },
  1223. changeSup(pblmId,cwsCode) {
  1224. this.editId = pblmId;
  1225. this.changeSupervisionVisible = true;
  1226. this.pType = cwsCode;
  1227. },
  1228. // 提交修改信息
  1229. changeSupervisionInfo() {
  1230. this.$refs.changeSupFrom.validate(valid => {
  1231. if (valid) {
  1232. this.$nextTick(() => {
  1233. this.buttonLoading = true;
  1234. if (this.$refs.uploadFile.submitUpload(this.changeSupervision.pblmId)) {
  1235. this.removeNewSupervision();
  1236. }
  1237. setTimeout(() => {
  1238. this.changeSupervisionLoading = true;
  1239. this.changeSupervision.gwComFiles = this.gwComFiles;
  1240. let data = this.changeSupervision;
  1241. updatelist(data).then(res => {
  1242. this.pblmId = res.data.pblmId;
  1243. this.gwComFiles = res.data.gwComFiles;
  1244. this.changeSupervisionLoading = false;
  1245. if (res.success) {
  1246. this.buttonLoading = false;
  1247. this.search();
  1248. this.successInfo();
  1249. this.addPicPanel = false;
  1250. this.changeSupervisionVisible = false;
  1251. } else {
  1252. this.failInfo();
  1253. }
  1254. });
  1255. }, 1000)
  1256. })
  1257. }
  1258. });
  1259. },
  1260. // 时间格式化
  1261. timestampToTime(row, column) {
  1262. var date = new Date(row.collTime);
  1263. var Y = date.getFullYear() + "-";
  1264. var M =
  1265. (date.getMonth() + 1 < 10
  1266. ? "0" + (date.getMonth() + 1)
  1267. : date.getMonth() + 1) + "-";
  1268. var D =
  1269. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  1270. var h =
  1271. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  1272. var m =
  1273. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  1274. return Y + M + D;
  1275. },
  1276. // 删除图片文件
  1277. removeFile(id, index) {
  1278. var _self = this;
  1279. this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
  1280. confirmButtonText: "确定",
  1281. cancelButtonText: "返回",
  1282. type: "warning"
  1283. }).then(
  1284. res => {
  1285. if (res === "confirm") {
  1286. deleteFileById(id, this.userId).then(res => {
  1287. if (res.success) {
  1288. this.fileListLength = 0;
  1289. this.fileList.forEach(item => {
  1290. if (
  1291. item.fileExt == "mp3" ||
  1292. item.fileExt == "MP3" ||
  1293. item.fileExt == "m4a"
  1294. ) {
  1295. this.audioArray.splice(index, 1);
  1296. } else if (
  1297. item.fileExt == "jpg" ||
  1298. item.fileExt == "JPG" ||
  1299. item.fileExt == "png" ||
  1300. item.fileExt == "PNG" ||
  1301. item.fileExt == "JPEG" ||
  1302. item.fileExt == "jpeg"
  1303. ) {
  1304. this.pictureArray.splice(index, 1);
  1305. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  1306. this.videoArray.splice(index, 1);
  1307. }
  1308. });
  1309. _self.changeSup(this.updateIdXiuGai);
  1310. } else {
  1311. this.failInfo();
  1312. }
  1313. });
  1314. }
  1315. },
  1316. res => {
  1317. console.log("返回");
  1318. }
  1319. );
  1320. },
  1321. changeSupervisionVisiblefalse() {
  1322. this.$nextTick(() => {
  1323. if (this.flash) {
  1324. this.flash = false;
  1325. this.search();
  1326. }
  1327. });
  1328. this.changeSupervisionVisible = false;
  1329. this.changeSupervision = {
  1330. dataStat: "",
  1331. nm: "",
  1332. endTime: "",
  1333. pblmId: "",
  1334. objId: "",
  1335. pType: "",
  1336. inspGroupId: "",
  1337. inspPblmCate: "",
  1338. inspPblmName: "",
  1339. inspPblmDesc: "",
  1340. pblmLong: "",
  1341. pblmLat: "",
  1342. pblmStat: "",
  1343. ifCasePblm: "",
  1344. inspPblmOrgName: "",
  1345. pblmPersName: "",
  1346. reviOpin: "",
  1347. reviConc: "",
  1348. reviOrgGuid: "",
  1349. collTime: "",
  1350. recPers: "",
  1351. note: "",
  1352. gwComFiles: [
  1353. {
  1354. id: "",
  1355. filePath: "",
  1356. bizId: ""
  1357. }
  1358. ]
  1359. };
  1360. // this.$refs.uploadFile.init();
  1361. this.addPicPanel = false;
  1362. },
  1363. addPic() {
  1364. this.addPicPanel = !this.addPicPanel;
  1365. },
  1366. getproblemSmallType() {
  1367. let result = [];
  1368. request.get('/dc/insp/pblms/getPblmType', {
  1369. params: {
  1370. type: this.type,
  1371. pguid: '00000000000000000000000000000000'
  1372. }
  1373. }).then(res => {
  1374. if (res.success) {
  1375. res.data.forEach((ele) => {
  1376. let haveinspPblmsName = false;
  1377. result.forEach((inspPblm) => {
  1378. if (inspPblm['inspPblmsName'] == ele.inspPblmsName) {
  1379. //
  1380. let havechekPoint = false;
  1381. inspPblm['checkPoints'].forEach((chekPoint) => {
  1382. if (chekPoint['checkPointName'] == ele.checkPoint) {
  1383. havechekPoint = true;
  1384. }
  1385. });
  1386. if (!havechekPoint) {
  1387. let newCheckPoint = {};
  1388. newCheckPoint['checkPointName'] = ele.checkPoint;
  1389. newCheckPoint['sort2'] = ele.sort2;
  1390. newCheckPoint['guid'] = ele.guid;
  1391. inspPblm['checkPoints'].push(newCheckPoint);
  1392. }
  1393. haveinspPblmsName = true;
  1394. }
  1395. });
  1396. if (!haveinspPblmsName) {
  1397. let haveinspPblmsObj = {};
  1398. haveinspPblmsObj['inspPblmsName'] = ele.inspPblmsName;
  1399. haveinspPblmsObj['sort1'] = ele.sort1;
  1400. haveinspPblmsObj['checkPoints'] = [{
  1401. checkPointName: ele.checkPoint,
  1402. sort2: ele.sort2,
  1403. guid: ele.guid
  1404. }];
  1405. result.push(haveinspPblmsObj);
  1406. }
  1407. })
  1408. this.problemList = result;
  1409. console.log(this.problemList);
  1410. }
  1411. })
  1412. },
  1413. problemListChange: function (item) {
  1414. this.t1 = item;
  1415. this.wenTiLeiBie = item.inspPblmsName;
  1416. this.currentCheckPointList = item.checkPoints;
  1417. },
  1418. currentCheckPointListChange: function (item) {
  1419. this.jianChaXiangMu = item.checkPointName;
  1420. this.currentProblemDescList = item.pblmDescs;
  1421. },
  1422. currentProblemDescListChange: function (item) {
  1423. this.xiangqingmiaoshu = item.pblmDesc;
  1424. console.log(item);
  1425. },
  1426. fileUpErr(err, file, fileList) {
  1427. this.$message.error("上传出错,请修改文件!");
  1428. this.fileList = [];
  1429. },
  1430. fileSuccess(item) {
  1431. this.fileList.push(item.data);
  1432. console.log(this.fileList);
  1433. },
  1434. // onChangeDialog() {
  1435. // this.changeSupervisionVisible = true;
  1436. // this.$refs.changeSupFrom.validate(valid => {
  1437. // if (valid) {
  1438. // this.changeSupervisionLoading = true;
  1439. // this.changeSupervision.inspPblmsName = this.wenTiLeiBie
  1440. // this.changeSupervision.checkPoint = this.jianChaXiangMu
  1441. // this.changeSupervision.inspPblmName = this.wenTiLeiBie //后台只需要这一个字段和问题id inspPblmsName和checkPoint可不传
  1442. // this.changeSupervision.inspPlbmType = this.t2.sort2;
  1443. // this.changeSupervision.pblmsTypeId = this.t2.guid;
  1444. // this.changeSupervision.gwComFiles = this.fileList;
  1445. // let data = this.changeSupervision;
  1446. // updatelist(data).then(res => {
  1447. // this.pblmId = res.data.pblmId;
  1448. // this.gwComFiles = res.data.gwComFiles;
  1449. // if (res.success) {
  1450. // if (this.$refs.uploadFile.submitUpload(data.pblmId)) {
  1451. // this.removeNewSupervision();
  1452. // this.successInfo();
  1453. // this.addPicPanel = false;
  1454. // this.changeSupervisionLoading = false;
  1455. // }
  1456. // } else {
  1457. // _self.failInfo();
  1458. // }
  1459. // });
  1460. // }
  1461. // });
  1462. // },
  1463. addFile(file, fileList) {
  1464. this.fileListLength = fileList.length;
  1465. },
  1466. UploadUrl: function () {
  1467. return `/pdcApi/file/insert?bizId=${this.changeSupervision.pblmId}`
  1468. },
  1469. beforeAvatarUpload(file) {
  1470. console.log(file);
  1471. },
  1472. //切换问题是否被督查简报调用
  1473. changeSfYy(row, val) {
  1474. this.$confirm('此问题将切换是否被督查简报引用, 是否继续?', '提示', {
  1475. confirmButtonText: '确定',
  1476. cancelButtonText: '取消',
  1477. type: 'warning'
  1478. }).then(() => {
  1479. if (val) {
  1480. request.post(`/dc/insp/pblm/update`, {
  1481. "pblmId": row,
  1482. "quote": 0
  1483. }).then(res => {
  1484. if (res.success) {
  1485. this.search();
  1486. }
  1487. })
  1488. } else {
  1489. request.post(`/dc/insp/pblm/update`, {
  1490. "pblmId": row,
  1491. "quote": 1
  1492. }).then(res => {
  1493. if (res.success) {
  1494. this.search();
  1495. }
  1496. })
  1497. }
  1498. }).catch(() => {
  1499. this.$message({
  1500. type: 'info',
  1501. message: '已取消切换'
  1502. });
  1503. });
  1504. },
  1505. treeNodeClickHandler(data) {
  1506. this.treeNodeArray = data;
  1507. },
  1508. changeYear(val) {
  1509. this.newYear = val;
  1510. this.search();
  1511. },
  1512. getAllTreeData(data) {
  1513. this.treeAllData = data;
  1514. },
  1515. closeEditDialog() {
  1516. this.changeSupervisionVisible = false
  1517. setTimeout(() => {
  1518. this.search()
  1519. }, 800)
  1520. }
  1521. },
  1522. watch: {
  1523. codeId: function () {
  1524. this.search();
  1525. },
  1526. showExpandSearchPanel: function (val) {
  1527. if (val) {
  1528. this.tableHeight = window.innerHeight - 390;
  1529. } else {
  1530. this.tableHeight = window.innerHeight - 291;
  1531. }
  1532. },
  1533. rowId(val) {
  1534. if (val) {
  1535. this.search();
  1536. }
  1537. }
  1538. },
  1539. };
  1540. </script>
  1541. <style rel="stylesheet/scss" lang="scss" scoped>
  1542. @import "./base.css";
  1543. @import url("/src/assets/iconfont/iconfont.css");
  1544. @import url("/src/assets/css/mixin.scss");
  1545. .upload-container {
  1546. width: 100%;
  1547. position: relative;
  1548. .image-uploader {
  1549. width: 35%;
  1550. float: left;
  1551. }
  1552. .image-preview {
  1553. width: 200px;
  1554. height: 200px;
  1555. position: relative;
  1556. border: 1px dashed #d9d9d9;
  1557. float: left;
  1558. // margin-left: 50px;
  1559. .image-preview-wrapper {
  1560. position: relative;
  1561. width: 100%;
  1562. height: 100%;
  1563. img {
  1564. width: 100%;
  1565. height: 100%;
  1566. }
  1567. }
  1568. .image-preview-action {
  1569. position: absolute;
  1570. width: 100%;
  1571. height: 100%;
  1572. left: 0;
  1573. top: 0;
  1574. cursor: default;
  1575. text-align: center;
  1576. color: #fff;
  1577. opacity: 0;
  1578. font-size: 20px;
  1579. background-color: rgba(0, 0, 0, 0.5);
  1580. transition: opacity 0.3s;
  1581. cursor: pointer;
  1582. text-align: center;
  1583. line-height: 200px;
  1584. .el-icon-delete {
  1585. font-size: 36px;
  1586. }
  1587. .el-icon-edit-outline {
  1588. font-size: 36px;
  1589. }
  1590. }
  1591. &:hover {
  1592. .image-preview-action {
  1593. opacity: 1;
  1594. }
  1595. }
  1596. }
  1597. .image-app-preview {
  1598. margin-bottom: 10px;
  1599. width: 40vh;
  1600. height: 180px;
  1601. position: relative;
  1602. border: 1px dashed #d9d9d9;
  1603. float: left;
  1604. // margin-left: 50px;
  1605. .app-fake-conver {
  1606. height: 44px;
  1607. position: absolute;
  1608. width: 100%; // background: rgba(0, 0, 0, .1);
  1609. text-align: center;
  1610. line-height: 64px;
  1611. color: #fff;
  1612. }
  1613. }
  1614. }
  1615. .bottom {
  1616. margin-top: 13px;
  1617. line-height: 12px;
  1618. }
  1619. .button {
  1620. padding: 0;
  1621. float: right;
  1622. }
  1623. .image {
  1624. width: 100%;
  1625. display: block;
  1626. }
  1627. .clearfix:before,
  1628. .clearfix:after {
  1629. display: table;
  1630. content: "";
  1631. }
  1632. .clearfix:after {
  1633. clear: both;
  1634. }
  1635. #wenTiContainer_sk .el-tree-node {
  1636. /* overflow: auto; */
  1637. }
  1638. #wenTiContainer_sk .el-tree-node > .el-tree-node__children {
  1639. overflow: auto;
  1640. }
  1641. .shuiku .el-date-editor.el-input {
  1642. min-width: 180px !important;
  1643. }
  1644. .shuiku .header {
  1645. padding: 0px 10px;
  1646. }
  1647. .shuiku .el-row {
  1648. margin-bottom: 5px;
  1649. }
  1650. .shuiku .content {
  1651. margin: 10px;
  1652. }
  1653. /* .search .el-table>>>.el-tooltip {
  1654. white-space: pre-wrap !important;
  1655. line-height: 30px;
  1656. font-size: 0;
  1657. } */
  1658. .shuiku .search > > > .el-table .el-button:nth-child(odd) {
  1659. margin-left: 0 !important;
  1660. }
  1661. .custom_dialog .el-dialog {
  1662. width: 60% !important;
  1663. }
  1664. .custom_dialog .scroll300 {
  1665. max-height: 60vh !important;
  1666. }
  1667. .scroll300 .el-form {
  1668. padding-top: 5px;
  1669. padding-right: 5px;
  1670. }
  1671. .shuiku .el-tag + .el-tag {
  1672. margin-left: 10px;
  1673. }
  1674. .shuiku .button-new-tag {
  1675. margin-left: 10px;
  1676. height: 29px;
  1677. line-height: 29px;
  1678. padding-top: 0;
  1679. padding-bottom: 0;
  1680. }
  1681. .shuiku .input-new-tag {
  1682. width: 90px;
  1683. margin-left: 10px;
  1684. vertical-align: bottom;
  1685. }
  1686. .inspPblmCate {
  1687. padding: 2px 10px;
  1688. border-radius: 10px;
  1689. color: #ffffff;
  1690. -webkit-border-radius: 10px;
  1691. -moz-border-radius: 10px;
  1692. border-radius: 10px;
  1693. }
  1694. #wenTiContainer_sk .el-select, #wenTiContainer_sk .el-input {
  1695. width: 140px !important;
  1696. }
  1697. </style>