cfcafd4c8a47998a873783d75cf17ab8be6b2056.svn-base 74 KB

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