0d90d41706754e990b210e2ae5fd6dbef66248e2.svn-base 70 KB

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