5da49feffeb5740cf0f3b2b8f4169763a4bf4b93.svn-base 74 KB

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