a7a4ed1b88f8d2a901c440e52980eaa057ac2bcb.svn-base 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717
  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="068" @treeNodeClickHandler="treeNodeClickHandler" @changeYear="changeYear"
  12. @organList="getAllTreeData" @changeTabType="changeTabType"></wt-left-tree>
  13. </el-aside>
  14. <!-- 主要窗口 -->
  15. <el-main style="margin:0px;padding:0px;overflow-y:hidden;" class="shuiku" v-loading="exportLoading">
  16. <!-- <el-card> -->
  17. <div class="pages" :style="{'max-height':testHeight+'px'}">
  18. <!-- 为什么要根据rowId来判断过滤条件的显示或者隐藏? -->
  19. <div style="padding: 12px 0 0 0">
  20. <el-row type="flex" justify="space-between">
  21. <el-col :span="24">
  22. <el-form :inline="true" size="mini" class="demo-form-inline"
  23. style="padding-left: 10px;">
  24. <el-form-item label="行政区划:">
  25. <el-input
  26. resize="none"
  27. type="input"
  28. :rows="3"
  29. placeholder="请输入行政区划名称"
  30. v-model.trim="findParams.adFullName"
  31. clearable
  32. ></el-input>
  33. </el-form-item>
  34. <el-form-item label="督查对象名称:">
  35. <el-input
  36. resize="none"
  37. type="input"
  38. :rows="3"
  39. placeholder="请输入名称"
  40. v-model.trim="findParams.nm"
  41. clearable
  42. ></el-input>
  43. </el-form-item>
  44. </el-form>
  45. </el-col>
  46. </el-row>
  47. <el-row type="flex" justify="space-between" v-show="showExpandSearchPanel">
  48. <el-col :span="24">
  49. <el-form :inline="true" size="mini" class="demo-form-inline"
  50. style="padding-left: 10px;">
  51. <el-form-item label="问题类别:">
  52. <el-select v-model="findParams.inspPblmName" clearable placeholder="请选择">
  53. <el-option
  54. v-for="item in problemList"
  55. :key="item.guid"
  56. :label="item.inspPblmsName"
  57. :value="item.inspPblmsName"
  58. ></el-option>
  59. </el-select>
  60. </el-form-item>
  61. <el-form-item label="问题筛选:">
  62. <el-select v-model="pblscr" clearable placeholder="请选择">
  63. <el-option
  64. v-for="item in pblscrList"
  65. :key="item.value"
  66. :label="item.lable"
  67. :value="item.value"
  68. ></el-option>
  69. </el-select>
  70. </el-form-item>
  71. <el-form-item label="上报人员:">
  72. <el-input
  73. resize="none"
  74. type="input"
  75. :rows="3"
  76. placeholder="请输入名称"
  77. v-model.trim="findParams.persName"
  78. ></el-input>
  79. </el-form-item>
  80. <el-form-item label="发现时间:">
  81. <el-date-picker
  82. style="width: 200px;"
  83. v-model="value6"
  84. type="daterange"
  85. value-format="yyyy-MM-dd"
  86. range-separator="至"
  87. start-placeholder="开始日期"
  88. end-placeholder="结束日期"
  89. ></el-date-picker>
  90. </el-form-item>
  91. <el-form-item label="所在组:">
  92. <el-input
  93. resize="none"
  94. type="input"
  95. :rows="3"
  96. placeholder="请输入所在组名称"
  97. v-model.trim="pblscrGroup"
  98. clearable
  99. ></el-input>
  100. </el-form-item>
  101. <el-form-item label="是否包含多媒体文件:">
  102. <el-select v-model="findParams.hasVedio" clearable placeholder="请选择">
  103. <el-option
  104. v-for="item in hasVedio1"
  105. :key="item.value"
  106. :label="item.label"
  107. :value="item.value"
  108. ></el-option>
  109. </el-select>
  110. </el-form-item>
  111. <el-form-item label="问题督查状态:">
  112. <el-select v-model="findParams.state" clearable placeholder="请选择">
  113. <el-option
  114. v-for="item in stateList"
  115. :key="item.value"
  116. :label="item.label"
  117. :value="item.value"
  118. ></el-option>
  119. </el-select>
  120. </el-form-item>
  121. </el-form>
  122. </el-col>
  123. </el-row>
  124. <el-row type="flex" justify="space-between" style="border-top:1px solid #0014ff2e;">
  125. <el-col style='padding-bottom:10px;' :span="12">
  126. <el-button style="float:right;margin-right:10px;border: 1px solid #0014ff2e;
  127. border-radius: 0px 0px 5px 5px;border-top: 0px;" type="info" plain
  128. size="mini"
  129. @click="showExpandSearchPanel = !showExpandSearchPanel"
  130. >
  131. {{showExpandSearchPanel?'收起':'更多条件'}}
  132. <i class="el-icon-arrow-down el-icon--right" v-show="!showExpandSearchPanel"/>
  133. <i class="el-icon-arrow-up el-icon--right" v-show="showExpandSearchPanel"/>
  134. </el-button>
  135. </el-col>
  136. <el-col :span="12">
  137. <el-button
  138. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  139. type="success"
  140. @click="submitBtn"
  141. >问题提交
  142. </el-button>
  143. <el-button
  144. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  145. type="primary"
  146. icon="el-icon-search"
  147. @click="search"
  148. >&nbsp;查&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;询&nbsp;
  149. </el-button>
  150. <el-button
  151. v-if="isGd"
  152. style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
  153. type="success"
  154. icon="el-icon-download"
  155. @click="toForm"
  156. >导出一表一单
  157. </el-button>
  158. <shuiKuWentiPl v-if="showShuiKuTianBaoPl"
  159. :showShuiKuTianBaoPl="showShuiKuTianBaoPl"
  160. titleName="小水库"
  161. @closePlDialog="closePlDialog">
  162. </shuiKuWentiPl>
  163. </el-col>
  164. </el-row>
  165. </div>
  166. <!-- 查询展示 -->
  167. <div class="search" style="margin-top:10px;">
  168. <el-table
  169. v-loading="loading"
  170. border
  171. @row-click="openDetails"
  172. ref="multipleTable"
  173. :height="tableHeight"
  174. :data="searchResult"
  175. tooltip-effect="dark"
  176. style="width: 100%"
  177. @selection-change="handleSelectionChange"
  178. >
  179. <el-table-column
  180. type="selection"
  181. min-width="55">
  182. </el-table-column>
  183. <el-table-column align="center" type="index" label="序号" min-width="25">
  184. <template slot-scope="scope">{{ (currentPage - 1) * pageSize + (scope.$index + 1) }}
  185. </template>
  186. </el-table-column>
  187. <!-- <el-table-column header-align="center" align="center" min-width="140" prop="inspPblmName" label="小水库问题类别"></el-table-column> -->
  188. <el-table-column
  189. header-align="center"
  190. align="center"
  191. min-width="60"
  192. prop="province"
  193. label="省" v-if="isXj"
  194. show-overflow-tooltip
  195. ></el-table-column>
  196. <el-table-column
  197. header-align="center"
  198. align="center"
  199. min-width="60"
  200. prop="city"
  201. :label="ownAdName"
  202. show-overflow-tooltip
  203. ></el-table-column>
  204. <el-table-column
  205. header-align="center"
  206. align="center"
  207. min-width="60"
  208. prop="country"
  209. label="县"
  210. v-if="isXj"
  211. show-overflow-tooltip
  212. ></el-table-column>
  213. <el-table-column
  214. header-align="center"
  215. align="center"
  216. min-width="110"
  217. prop="nm"
  218. label="督查对象名称"
  219. show-overflow-tooltip
  220. ></el-table-column>
  221. <el-table-column
  222. header-align="center"
  223. align="center"
  224. min-width="140"
  225. prop="inspPblmName"
  226. label="督查问题类别"
  227. show-overflow-tooltip
  228. ></el-table-column>
  229. <el-table-column
  230. header-align="center"
  231. align="center"
  232. min-width="120"
  233. prop="persName"
  234. label="上报人"
  235. ></el-table-column>
  236. <el-table-column
  237. header-align="center"
  238. align="center"
  239. min-width="80"
  240. show-overflow-tooltip
  241. prop="orgNm"
  242. label="所在组"
  243. ></el-table-column>
  244. <el-table-column
  245. prop="collTime"
  246. label="上报时间"
  247. :formatter="timestampToTime"
  248. sortable
  249. align="center"
  250. min-width="110"
  251. show-overflow-tooltip
  252. ></el-table-column>
  253. <el-table-column
  254. header-align="center"
  255. align="center"
  256. min-width="150"
  257. prop="hasVedio"
  258. label="是否包含多媒体文件"
  259. >
  260. <template slot-scope="scope">
  261. <p v-if="scope.row.hasVedio == 1">是</p>
  262. <p v-if="scope.row.hasVedio == 0">否</p>
  263. </template>
  264. </el-table-column>
  265. <el-table-column
  266. header-align="center"
  267. align="center"
  268. min-width="100"
  269. prop="state"
  270. label="问题督查状态">
  271. <template slot-scope="scope">
  272. <p v-if="Number(scope.row.state) === 0"><span class="inspPblmCate"
  273. style="background: #F56C6C;">未提交</span>
  274. </p>
  275. <p v-if="scope.row.state == 2"><span class="inspPblmCate"
  276. style="background: #409EFF;">已提交</span>
  277. </p>
  278. <p v-if="scope.row.state == 3"><span class="inspPblmCate"
  279. style="background: #67C23A;">已发布</span>
  280. </p>
  281. </template>
  282. </el-table-column>
  283. <el-table-column
  284. fixed="right"
  285. label="操作"
  286. min-width="130"
  287. >
  288. <template slot-scope="scope">
  289. <span style="margin-right:10px;" v-if="ownPriv('manage')">
  290. <el-button icon="el-icon-s-flag" type="text" v-if="scope.row.quote == '1'"
  291. title="已被督查简报引用"
  292. @click.native.stop="changeSfYy(scope.row.pblmId,1)"></el-button>
  293. <i class="el-icon-s-flag" v-else title="未被督查简报引用"
  294. @click.native.stop="changeSfYy(scope.row.pblmId,0)"
  295. style="cursor: pointer;"></i>
  296. </span>
  297. <el-button icon="el-icon-view" title="查看详情" type="text"
  298. @click.native.stop="showDetails(scope.row.pblmId)"></el-button>
  299. <el-button icon="el-icon-edit" type="text" title="修改问题"
  300. @click.native.stop="changeSup(scope.row.pblmId)"
  301. v-if="ownPriv('manage')"></el-button>
  302. <el-button
  303. icon="el-icon-delete"
  304. type="text"
  305. v-if="ownPriv('manage')"
  306. title="删除问题" @click.native.stop="removeSuperviseOne(scope.row.pblmId)"
  307. ></el-button>
  308. </template>
  309. </el-table-column>
  310. </el-table>
  311. <!-- 分页 -->
  312. <div class="paginationWarpper">
  313. <el-pagination
  314. class="paginationCenter"
  315. background
  316. @size-change="handleSizeChange"
  317. @current-change="search"
  318. :current-page.sync="currentPage"
  319. :page-sizes="[10, 20, 50, 100]"
  320. :page-size="pageSize"
  321. layout="total, sizes, prev, pager, next, jumper"
  322. :total="total"
  323. ></el-pagination>
  324. </div>
  325. </div>
  326. <!-- 详情弹框 -->
  327. <el-dialog
  328. class="outerDialog custom_dialog"
  329. title="问题详情"
  330. width="60%"
  331. v-if="supervisionDetailsVisible"
  332. :visible.sync="supervisionDetailsVisible"
  333. >
  334. <supervision-details ref="xianqing" :problemId="currentProblemId"
  335. :objType="68"></supervision-details>
  336. <span slot="footer">
  337. <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
  338. </span>
  339. </el-dialog>
  340. <!-- 删除的弹窗 -->
  341. <el-dialog class="deleteDialog" title="问题删除描述" :visible.sync="problemDeleteVisible">
  342. <Problem-delete
  343. ref="deleteMiaoShu"
  344. :deleteProblemId="deleteId"
  345. @deleteSuccess="deleteSuccess"
  346. ></Problem-delete>
  347. <span slot="footer">
  348. <el-button @click="problemDeleteVisible = false">返回</el-button>
  349. </span>
  350. </el-dialog>
  351. <!-- 修改弹框 -->
  352. <problem-edit :editId="updateIdXiuGai" @closeEditDialog="closeEditDialog"
  353. v-if="changeSupervisionVisible"></problem-edit>
  354. </div
  355. ><!-- </el-card> -->
  356. </el-main>
  357. </el-container>
  358. <EditPicOnline
  359. ref="editPicWeakupEvnent"
  360. v-if="editPicDialog"
  361. :picUrl="picUrl"
  362. @cancelHandler="cancelHandler"
  363. @editPicData="editPicDataEvent"
  364. ></EditPicOnline>
  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(["../duChaTianBao/xjtdjs/problemDetail.vue"], resolve);
  396. },
  397. // 删除描述页
  398. ProblemDelete: resolve => {
  399. require(["./problemDelete.vue"], resolve);
  400. },
  401. // 修改问题
  402. problemEdit: resolve => {
  403. require(["../duChaTianBao/xjtdjs/problemModify.vue"], resolve);
  404. },
  405. EditPicOnline: resolve => {
  406. require(["@widget/EditPicOnline/EditPicOnline.vue"], resolve);
  407. },
  408. // addPicDialog: resolve => {
  409. // require(["./addPicDialog.vue"], resolve);
  410. // },
  411. elaudio: elaudio,
  412. inuptWithDuChaTreeNode: inuptWithDuChaTreeNode,
  413. inputWidthDuChaNodes: inputWidthDuChaNodes,
  414. inputWidthDuChaShuiKu: inputWidthDuChaShuiKu,
  415. problemDialog: problemDialog,
  416. shuiKuWentiPl: shuiKuWentiPl,
  417. wtLeftTree: wtLeftTree
  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",
  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: 68,
  718. inspPblmName: "",
  719. state: "",
  720. persId: localStorage.getItem("userid")
  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. };
  786. },
  787. computed: {
  788. hostUrl() {
  789. return hostUrl
  790. },
  791. isGd(){
  792. if(localStorage.getItem('currentRlcode').substring(0,2)=="44"){
  793. return true;
  794. }else{
  795. return false;
  796. }
  797. }
  798. },
  799. created() {
  800. if (this.userId) {
  801. console.log("已经登录");
  802. this.search();
  803. } else {
  804. this.$router.push("/login");
  805. }
  806. this.getproblemSmallType();
  807. this.addPicPanel = false;
  808. },
  809. activated() {
  810. },
  811. methods: {
  812. openDetails(row) {
  813. this.currentProblemId = row.pblmId;
  814. this.supervisionDetailsVisible = true;
  815. },
  816. changeTabType(tabType) {
  817. this.treeNodeArray = [];
  818. this.tabType = tabType;
  819. this.search();
  820. },
  821. //图片编辑
  822. editPicEvent(item) {
  823. this.picUrl = this.hostUrl + "/" + item.filePath;
  824. this.editPicDialog = true;
  825. this.editPicRefresh = false;
  826. this.picId = item.id;
  827. },
  828. cancelHandler() {
  829. this.editPicDialog = false;
  830. this.editPicRefresh = true;
  831. },
  832. editPicDataEvent(item) {
  833. request.post(`/file/updateFile?bizId=${this.changeSupervision.pblmId}&id=${this.picId}`, item, {headers: {'Content-Type': 'multipart/form-data'}}).then(res => {
  834. console.log(res);
  835. if (res.success) {
  836. this.pictureArray = [];
  837. showDetailsXq(this.updateIdXiuGai).then(res => {
  838. res.data.gwComFiles.forEach(item => {
  839. this.pictureArray.push(item);
  840. this.editPicDialog = false;
  841. this.editPicRefresh = true;
  842. });
  843. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  844. });
  845. }
  846. });
  847. },
  848. // 操作成功反馈
  849. successInfo() {
  850. this.$message({
  851. type: "success",
  852. message: "操作成功!"
  853. });
  854. },
  855. // 操作失败反馈
  856. failInfo(val) {
  857. this.$message.error(val);
  858. },
  859. // 已选择项
  860. handleSelectionChange(val) {
  861. this.multipleSelection = val;
  862. },
  863. toForm(){
  864. var idArr = [];
  865. if(this.multipleSelection && this.multipleSelection.length==0){
  866. this.$message.warning("请选择数据");
  867. return false;
  868. }else{
  869. this.multipleSelection.forEach((item)=>{
  870. idArr.push(item.pblmId);
  871. })
  872. }
  873. var ids = idArr.join(",");
  874. let host = hostUrl;
  875. let nginx = '/pageofficePath/';
  876. let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblm/list/word?ids='+ids+'&filename=pblm|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
  877. let a = document.createElement('a'); // 创建a标签
  878. a.setAttribute('href', href);// href链接
  879. a.click();// 自执行点击事件
  880. },
  881. // 查询
  882. async search() {
  883. this.loading = true;
  884. let _self = this;
  885. let orgAllNode = this.treeAllData;
  886. _self.loading = true;
  887. let data = _self.findParams;
  888. data.startTime = _self.value6 && _self.value6.length > 0 ? _self.value6[0] : '';
  889. data.endTime = _self.value6 && _self.value6.length > 0 ? _self.value6[1] : '';
  890. data.pageNum = _self.currentPage;
  891. data.recPers = _self.pblscr;
  892. data.orgNm = _self.pblscrGroup;
  893. data.pageSize = _self.pageSize;
  894. data.villType = "";
  895. _self.findUseOrgArray = [];
  896. _self.treeNodeArray.forEach(item => {
  897. if (item.id.length < 12) {
  898. orgAllNode.forEach(orgItem => {
  899. if (orgItem.id.startsWith(item.code)) {
  900. _self.findUseOrgArray.push(orgItem.id);
  901. }
  902. });
  903. }
  904. _self.findUseOrgArray.push(item.id);
  905. });
  906. if (_self.findUseOrgArray.length > 0) {
  907. data["orgIds"] = _self.findUseOrgArray.join(",");
  908. this.orgIds = _self.findUseOrgArray.join(",");
  909. } else {
  910. data["orgIds"] = "";
  911. }
  912. if (this.rowId) {
  913. data["orgIds"] = this.rowId;
  914. }
  915. data["year"] = this.newYear;
  916. data.tabType = this.tabType;
  917. findProblemPageInfo(data).then(res => {
  918. _self.loading = false;
  919. _self.multipleSelection = [];
  920. if (res.success) {
  921. _self.searchResult = res.data.list;
  922. // console.log( "绝对是"+searchResult)
  923. _self.total = res.data.total;
  924. } else {
  925. _self.failInfo();
  926. }
  927. });
  928. },
  929. async submitBtn() {
  930. if (this.multipleSelection.length === 0) {
  931. this.$message.warning('请至少选择一条问题');
  932. return;
  933. }
  934. let newArray = this.multipleSelection.map((item) => {
  935. return {
  936. "objId": item.objId,
  937. "objType": item.objType,
  938. "state": "3"
  939. }
  940. });
  941. const {success, message} = await pblmSubmit(newArray);
  942. if (success) {
  943. this.$message.success('问题发布成功');
  944. this.search();
  945. } else {
  946. this.$message.warning(message);
  947. }
  948. },
  949. async exportExcel() {
  950. this.exportLoading = true;
  951. let _self = this;
  952. let orgAllNode = _self.treeAllData;
  953. let data = _self.findParams;
  954. data.pageNum = _self.currentPage;
  955. data.pageSize = _self.pageSize;
  956. data.villType = "";
  957. _self.datas = JSON.stringify(data);
  958. _self.treeNodeArray.forEach(item => {
  959. console.log(item);
  960. if (item.id.length < 12) {
  961. orgAllNode.forEach(orgItem => {
  962. if (orgItem.id.startsWith(item.id)) {
  963. _self.findUseOrgArray.push(orgItem.id);
  964. }
  965. });
  966. } else {
  967. _self.findUseOrgArray.push(item.id);
  968. }
  969. });
  970. let url = "/api/dc/insp/pblm/page/rever/export";
  971. let type = "post";
  972. let exportName = "小水库问题列表.xls"
  973. let result = await exportModel(type, url, exportName, this.datas);
  974. _self.exportLoading = result;
  975. },
  976. async exportWord() {
  977. let _self = this;
  978. _self.exportLoading = true;
  979. let orgAllNode = _self.treeAllData;
  980. let data = _self.findParams;
  981. data.pageNum = _self.currentPage;
  982. data.pageSize = _self.pageSize;
  983. data.villType = "";
  984. this.datas = data;
  985. _self.treeNodeArray.forEach(item => {
  986. if (item.id.length < 12) {
  987. orgAllNode.forEach(orgItem => {
  988. if (orgItem.id.startsWith(item.id)) {
  989. _self.findUseOrgArray.push(orgItem.id);
  990. }
  991. });
  992. } else {
  993. _self.findUseOrgArray.push(item.id);
  994. }
  995. });
  996. //下载word文档2
  997. await request.post('/rever/doc', this.datas).then(res => {
  998. if (res.success) {
  999. console.log(this.response)
  1000. var a = document.createElement('a');
  1001. a.href = `${this.hostUrl}${res.data.downloadPath}`;
  1002. //设置文件名称
  1003. a.download = '小水库问题详情.doc';
  1004. a.click();
  1005. // window.open(`${this.hostUrl}${res.data.downloadPath}`)
  1006. _self.exportLoading = false;
  1007. } else {
  1008. _self.$mesage.error(res.message)
  1009. }
  1010. }).catch(res => {
  1011. _self.$mesage.error(res.message)
  1012. })
  1013. },
  1014. downFile(blob, fileName) {
  1015. // 非IE下载
  1016. if ("download" in document.createElement("a")) {
  1017. let link = document.createElement("a");
  1018. link.href = window.URL.createObjectURL(blob); // 创建下载的链接
  1019. link.download = fileName; // 下载后文件名
  1020. link.style.display = "none";
  1021. document.body.appendChild(link);
  1022. link.click(); // 点击下载
  1023. window.URL.revokeObjectURL(link.href); // 释放掉blob对象
  1024. document.body.removeChild(link); // 下载完成移除元素
  1025. } else {
  1026. // IE10+下载
  1027. window.navigator.msSaveBlob(blob, fileName);
  1028. }
  1029. },
  1030. // 下载模板
  1031. async downloadTemplate() {
  1032. await this.search();
  1033. await this.downloadTemplateSet();
  1034. this.uploadDisabled = false;
  1035. },
  1036. downloadTemplateSet() {
  1037. let _this = this;
  1038. _this.downloadIcon = "el-icon-loading"
  1039. // 使用POST传值下载文件,可以看到请求参数和避免请求参数过长导致请求失败
  1040. let xhr = new XMLHttpRequest();
  1041. this.findParams.orgIds = '';
  1042. let datas = JSON.stringify(this.findParams);
  1043. xhr.open('post', '/api/dc/imp/pblm/download', true);
  1044. xhr.responseType = 'blob';
  1045. // data传值方式和Content-Type要对应
  1046. let data = 'userId=' + this.userId + '&orgType=001&orgIds=' + this.orgIds + '&datas=' + datas;
  1047. xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  1048. // xhr.setRequestHeader('Content-Type', 'application/json;charset=utf-8');
  1049. xhr.setRequestHeader('persId', localStorage.getItem('userid') ? localStorage.getItem('userid') : '');
  1050. xhr.onload = function () {
  1051. if (this.status == 200) {
  1052. let blob = this.response;
  1053. let a = document.createElement('a');
  1054. let url = window.URL.createObjectURL(blob);
  1055. a.href = url;
  1056. //设置文件名称
  1057. a.download = '小水库问题.xls';
  1058. a.click();
  1059. }
  1060. _this.downloadIcon = "el-icon-download"
  1061. }
  1062. xhr.send(data);
  1063. },
  1064. showPlDialog() {
  1065. this.showShuiKuTianBaoPl = true
  1066. },
  1067. closePlDialog(val) {
  1068. this.showShuiKuTianBaoPl = false
  1069. this.search();
  1070. },
  1071. handleSizeChange(pageSize) {
  1072. this.pageSize = pageSize;
  1073. this.search();
  1074. },
  1075. // 新增
  1076. getDuChaId() {
  1077. //新增中 获取督查对象id
  1078. getSupervisdByID(this.userid, 1).then(res => {
  1079. if (res.success) {
  1080. // alert(1)
  1081. this.listobjId = res.data;
  1082. } else {
  1083. this.failInfo();
  1084. }
  1085. });
  1086. },
  1087. // 取消
  1088. removeNewSupervision(arg) {
  1089. this.gwComFiles = [];
  1090. if (arg) {
  1091. this.gwComFiles = arg;
  1092. this.$refs.uploadFile.init();
  1093. }
  1094. },
  1095. // 详情弹框
  1096. showDetails(id) {
  1097. this.currentProblemId = id;
  1098. this.supervisionDetailsVisible = true;
  1099. },
  1100. // 删除弹窗
  1101. removeSuperviseOne(id) {
  1102. this.deleteId = id;
  1103. this.problemDeleteVisible = true;
  1104. // showDetailsXq(id).then(res => {
  1105. // // console.log("123" + res.data)
  1106. // this.persNameRen = res.data.persName;
  1107. // });
  1108. },
  1109. deleteSuccess() {
  1110. this.problemDeleteVisible = false;
  1111. this.search();
  1112. this.$emit("problemCount");
  1113. },
  1114. // 修改弹窗显示
  1115. changeSup(id) {
  1116. this.currentProblemId = '';
  1117. this.pictureArray = [];
  1118. this.audioArray = [];
  1119. this.videoArray = [];
  1120. this.fileArray = [];
  1121. this.updateIdXiuGai = id;
  1122. showDetailsXq(this.updateIdXiuGai).then(res => {
  1123. this.changeSupervision = res.data;
  1124. this.fileList = this.changeSupervision.gwComFiles;
  1125. this.t1['inspPblmsName'] = this.changeSupervision.inspPblmsName
  1126. this.problemList.forEach(ele => {
  1127. if (ele.inspPblmsName == this.t1.inspPblmsName) {
  1128. this.problemListChange(ele)
  1129. }
  1130. })
  1131. this.t2['checkPointName'] = this.changeSupervision.checkPoint
  1132. this.currentCheckPointList.forEach(ele => {
  1133. if (ele.checkPointName == this.t2.checkPointName) {
  1134. this.currentCheckPointListChange(ele)
  1135. }
  1136. })
  1137. this.t3['pblmDesc'] = this.changeSupervision.pblmDesc
  1138. this.changeSupervisionVisible = true;
  1139. res.data.gwComFiles.forEach(item => {
  1140. if (
  1141. item.fileExt == "mp3" ||
  1142. item.fileExt == "MP3" ||
  1143. item.fileExt == "m4a"
  1144. ) {
  1145. this.audioArray.push(item);
  1146. } else if (
  1147. item.fileExt == "jpg" ||
  1148. item.fileExt == "JPG" ||
  1149. item.fileExt == "png" ||
  1150. item.fileExt == "PNG" ||
  1151. item.fileExt == "JPEG" ||
  1152. item.fileExt == "jpeg"
  1153. ) {
  1154. this.pictureArray.push(item);
  1155. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  1156. this.videoArray.push({
  1157. id: item.id,
  1158. bizId: item.bizId,
  1159. width: "130",
  1160. height: "130",
  1161. autoplay: false,
  1162. muted: true,
  1163. language: "en",
  1164. playbackRates: [0.7, 1.0, 1.5, 2.0],
  1165. sources: [
  1166. {
  1167. type: "video/mp4",
  1168. // mp4
  1169. src: this.hostUrl + item.filePath
  1170. // webm
  1171. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  1172. }
  1173. ]
  1174. });
  1175. } else {
  1176. this.fileArray.push(item);
  1177. }
  1178. });
  1179. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  1180. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  1181. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  1182. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  1183. });
  1184. },
  1185. // 提交修改信息
  1186. changeSupervisionInfo() {
  1187. this.$refs.changeSupFrom.validate(valid => {
  1188. if (valid) {
  1189. this.$nextTick(() => {
  1190. this.buttonLoading = true;
  1191. if (this.$refs.uploadFile.submitUpload(this.changeSupervision.pblmId)) {
  1192. this.removeNewSupervision();
  1193. }
  1194. setTimeout(() => {
  1195. this.changeSupervisionLoading = true;
  1196. this.changeSupervision.gwComFiles = this.gwComFiles;
  1197. let data = this.changeSupervision;
  1198. updatelist(data).then(res => {
  1199. this.pblmId = res.data.pblmId;
  1200. this.gwComFiles = res.data.gwComFiles;
  1201. this.changeSupervisionLoading = false;
  1202. if (res.success) {
  1203. this.buttonLoading = false;
  1204. this.search();
  1205. this.successInfo();
  1206. this.addPicPanel = false;
  1207. this.changeSupervisionVisible = false;
  1208. } else {
  1209. this.failInfo();
  1210. }
  1211. });
  1212. }, 1000)
  1213. })
  1214. }
  1215. });
  1216. },
  1217. // 时间格式化
  1218. timestampToTime(row, column) {
  1219. var date = new Date(row.collTime);
  1220. var Y = date.getFullYear() + "-";
  1221. var M =
  1222. (date.getMonth() + 1 < 10
  1223. ? "0" + (date.getMonth() + 1)
  1224. : date.getMonth() + 1) + "-";
  1225. var D =
  1226. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  1227. var h =
  1228. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  1229. var m =
  1230. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  1231. return Y + M + D;
  1232. },
  1233. // 删除图片文件
  1234. removeFile(id, index) {
  1235. var _self = this;
  1236. this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
  1237. confirmButtonText: "确定",
  1238. cancelButtonText: "返回",
  1239. type: "warning"
  1240. }).then(
  1241. res => {
  1242. if (res === "confirm") {
  1243. deleteFileById(id, this.userId).then(res => {
  1244. if (res.success) {
  1245. this.fileListLength = 0;
  1246. this.fileList.forEach(item => {
  1247. if (
  1248. item.fileExt == "mp3" ||
  1249. item.fileExt == "MP3" ||
  1250. item.fileExt == "m4a"
  1251. ) {
  1252. this.audioArray.splice(index, 1);
  1253. } else if (
  1254. item.fileExt == "jpg" ||
  1255. item.fileExt == "JPG" ||
  1256. item.fileExt == "png" ||
  1257. item.fileExt == "PNG" ||
  1258. item.fileExt == "JPEG" ||
  1259. item.fileExt == "jpeg"
  1260. ) {
  1261. this.pictureArray.splice(index, 1);
  1262. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  1263. this.videoArray.splice(index, 1);
  1264. }
  1265. });
  1266. _self.changeSup(this.updateIdXiuGai);
  1267. } else {
  1268. this.failInfo();
  1269. }
  1270. });
  1271. }
  1272. },
  1273. res => {
  1274. console.log("返回");
  1275. }
  1276. );
  1277. },
  1278. changeSupervisionVisiblefalse() {
  1279. this.$nextTick(() => {
  1280. if (this.flash) {
  1281. this.flash = false;
  1282. this.search();
  1283. }
  1284. });
  1285. this.changeSupervisionVisible = false;
  1286. this.changeSupervision = {
  1287. dataStat: "",
  1288. nm: "",
  1289. endTime: "",
  1290. pblmId: "",
  1291. objId: "",
  1292. pType: "",
  1293. inspGroupId: "",
  1294. inspPblmCate: "",
  1295. inspPblmName: "",
  1296. inspPblmDesc: "",
  1297. pblmLong: "",
  1298. pblmLat: "",
  1299. pblmStat: "",
  1300. ifCasePblm: "",
  1301. inspPblmOrgName: "",
  1302. pblmPersName: "",
  1303. reviOpin: "",
  1304. reviConc: "",
  1305. reviOrgGuid: "",
  1306. collTime: "",
  1307. recPers: "",
  1308. note: "",
  1309. gwComFiles: [
  1310. {
  1311. id: "",
  1312. filePath: "",
  1313. bizId: ""
  1314. }
  1315. ]
  1316. };
  1317. // this.$refs.uploadFile.init();
  1318. this.addPicPanel = false;
  1319. },
  1320. addPic() {
  1321. this.addPicPanel = !this.addPicPanel;
  1322. },
  1323. getproblemSmallType() {
  1324. let result = [];
  1325. request.get('/dc/insp/pblms/getPblmType', {
  1326. params: {
  1327. type: 68,
  1328. pguid: '68000000000000000000000000000000'
  1329. }
  1330. }).then(res => {
  1331. if (res.success) {
  1332. res.data.forEach((ele) => {
  1333. let haveinspPblmsName = false;
  1334. result.forEach((inspPblm) => {
  1335. if (inspPblm['inspPblmsName'] == ele.inspPblmsName) {
  1336. //
  1337. let havechekPoint = false;
  1338. inspPblm['checkPoints'].forEach((chekPoint) => {
  1339. if (chekPoint['checkPointName'] == ele.checkPoint) {
  1340. havechekPoint = true;
  1341. }
  1342. });
  1343. if (!havechekPoint) {
  1344. let newCheckPoint = {};
  1345. newCheckPoint['checkPointName'] = ele.checkPoint;
  1346. newCheckPoint['sort2'] = ele.sort2;
  1347. newCheckPoint['guid'] = ele.guid;
  1348. inspPblm['checkPoints'].push(newCheckPoint);
  1349. }
  1350. haveinspPblmsName = true;
  1351. }
  1352. });
  1353. if (!haveinspPblmsName) {
  1354. let haveinspPblmsObj = {};
  1355. haveinspPblmsObj['inspPblmsName'] = ele.inspPblmsName;
  1356. haveinspPblmsObj['sort1'] = ele.sort1;
  1357. haveinspPblmsObj['checkPoints'] = [{
  1358. checkPointName: ele.checkPoint,
  1359. sort2: ele.sort2,
  1360. guid: ele.guid
  1361. }];
  1362. result.push(haveinspPblmsObj);
  1363. }
  1364. })
  1365. this.problemList = result;
  1366. console.log(this.problemList);
  1367. }
  1368. })
  1369. },
  1370. problemListChange: function (item) {
  1371. this.t1 = item;
  1372. this.wenTiLeiBie = item.inspPblmsName;
  1373. this.currentCheckPointList = item.checkPoints;
  1374. },
  1375. currentCheckPointListChange: function (item) {
  1376. this.jianChaXiangMu = item.checkPointName;
  1377. this.currentProblemDescList = item.pblmDescs;
  1378. },
  1379. currentProblemDescListChange: function (item) {
  1380. this.xiangqingmiaoshu = item.pblmDesc;
  1381. console.log(item);
  1382. },
  1383. fileUpErr(err, file, fileList) {
  1384. this.$message.error("上传出错,请修改文件!");
  1385. this.fileList = [];
  1386. },
  1387. fileSuccess(item) {
  1388. this.fileList.push(item.data);
  1389. console.log(this.fileList);
  1390. },
  1391. onChangeDialog() {
  1392. this.changeSupervisionVisible = true;
  1393. this.$refs.changeSupFrom.validate(valid => {
  1394. if (valid) {
  1395. this.changeSupervisionLoading = true;
  1396. this.changeSupervision.inspPblmsName = this.wenTiLeiBie
  1397. this.changeSupervision.checkPoint = this.jianChaXiangMu
  1398. this.changeSupervision.inspPblmName = this.wenTiLeiBie //后台只需要这一个字段和问题id inspPblmsName和checkPoint可不传
  1399. this.changeSupervision.inspPlbmType = this.t2.sort2;
  1400. this.changeSupervision.pblmsTypeId = this.t2.guid;
  1401. this.changeSupervision.gwComFiles = this.fileList;
  1402. let data = this.changeSupervision;
  1403. updatelist(data).then(res => {
  1404. this.pblmId = res.data.pblmId;
  1405. this.gwComFiles = res.data.gwComFiles;
  1406. if (res.success) {
  1407. if (this.$refs.uploadFile.submitUpload(data.pblmId)) {
  1408. this.removeNewSupervision();
  1409. this.successInfo();
  1410. this.addPicPanel = false;
  1411. this.changeSupervisionLoading = false;
  1412. }
  1413. } else {
  1414. _self.failInfo();
  1415. }
  1416. });
  1417. }
  1418. });
  1419. },
  1420. addFile(file, fileList) {
  1421. this.fileListLength = fileList.length;
  1422. },
  1423. UploadUrl: function () {
  1424. return `/pdcApi/file/insert?bizId=${this.changeSupervision.pblmId}`
  1425. },
  1426. beforeAvatarUpload(file) {
  1427. console.log(file);
  1428. },
  1429. //切换问题是否被督查简报调用
  1430. changeSfYy(row, val) {
  1431. this.$confirm('此问题将切换是否被督查简报引用, 是否继续?', '提示', {
  1432. confirmButtonText: '确定',
  1433. cancelButtonText: '取消',
  1434. type: 'warning'
  1435. }).then(() => {
  1436. if (val) {
  1437. request.post(`/dc/insp/pblm/update`, {
  1438. "pblmId": row,
  1439. "quote": 0
  1440. }).then(res => {
  1441. if (res.success) {
  1442. this.search();
  1443. }
  1444. })
  1445. } else {
  1446. request.post(`/dc/insp/pblm/update`, {
  1447. "pblmId": row,
  1448. "quote": 1
  1449. }).then(res => {
  1450. if (res.success) {
  1451. this.search();
  1452. }
  1453. })
  1454. }
  1455. }).catch(() => {
  1456. this.$message({
  1457. type: 'info',
  1458. message: '已取消切换'
  1459. });
  1460. });
  1461. },
  1462. treeNodeClickHandler(data) {
  1463. this.treeNodeArray = data;
  1464. },
  1465. changeYear(val) {
  1466. this.newYear = val;
  1467. this.search();
  1468. },
  1469. getAllTreeData(data) {
  1470. this.treeAllData = data;
  1471. },
  1472. closeEditDialog() {
  1473. this.changeSupervisionVisible = false
  1474. setTimeout(() => {
  1475. this.search()
  1476. }, 800)
  1477. }
  1478. },
  1479. watch: {
  1480. codeId: function () {
  1481. this.search();
  1482. },
  1483. showExpandSearchPanel: function (val) {
  1484. if (val) {
  1485. this.tableHeight = window.innerHeight - 390;
  1486. } else {
  1487. this.tableHeight = window.innerHeight - 291;
  1488. }
  1489. },
  1490. rowId(val) {
  1491. if (val) {
  1492. this.search();
  1493. }
  1494. }
  1495. },
  1496. };
  1497. </script>
  1498. <style rel="stylesheet/scss" lang="scss" scoped>
  1499. @import "./base.css";
  1500. @import url("/src/assets/iconfont/iconfont.css");
  1501. @import url("/src/assets/css/mixin.scss");
  1502. .upload-container {
  1503. width: 100%;
  1504. position: relative;
  1505. .image-uploader {
  1506. width: 35%;
  1507. float: left;
  1508. }
  1509. .image-preview {
  1510. width: 200px;
  1511. height: 200px;
  1512. position: relative;
  1513. border: 1px dashed #d9d9d9;
  1514. float: left;
  1515. // margin-left: 50px;
  1516. .image-preview-wrapper {
  1517. position: relative;
  1518. width: 100%;
  1519. height: 100%;
  1520. img {
  1521. width: 100%;
  1522. height: 100%;
  1523. }
  1524. }
  1525. .image-preview-action {
  1526. position: absolute;
  1527. width: 100%;
  1528. height: 100%;
  1529. left: 0;
  1530. top: 0;
  1531. cursor: default;
  1532. text-align: center;
  1533. color: #fff;
  1534. opacity: 0;
  1535. font-size: 20px;
  1536. background-color: rgba(0, 0, 0, 0.5);
  1537. transition: opacity 0.3s;
  1538. cursor: pointer;
  1539. text-align: center;
  1540. line-height: 200px;
  1541. .el-icon-delete {
  1542. font-size: 36px;
  1543. }
  1544. .el-icon-edit-outline {
  1545. font-size: 36px;
  1546. }
  1547. }
  1548. &:hover {
  1549. .image-preview-action {
  1550. opacity: 1;
  1551. }
  1552. }
  1553. }
  1554. .image-app-preview {
  1555. margin-bottom: 10px;
  1556. width: 40vh;
  1557. height: 180px;
  1558. position: relative;
  1559. border: 1px dashed #d9d9d9;
  1560. float: left;
  1561. // margin-left: 50px;
  1562. .app-fake-conver {
  1563. height: 44px;
  1564. position: absolute;
  1565. width: 100%; // background: rgba(0, 0, 0, .1);
  1566. text-align: center;
  1567. line-height: 64px;
  1568. color: #fff;
  1569. }
  1570. }
  1571. }
  1572. .bottom {
  1573. margin-top: 13px;
  1574. line-height: 12px;
  1575. }
  1576. .button {
  1577. padding: 0;
  1578. float: right;
  1579. }
  1580. .image {
  1581. width: 100%;
  1582. display: block;
  1583. }
  1584. .clearfix:before,
  1585. .clearfix:after {
  1586. display: table;
  1587. content: "";
  1588. }
  1589. .clearfix:after {
  1590. clear: both;
  1591. }
  1592. #wenTiContainer_sk .el-tree-node {
  1593. /* overflow: auto; */
  1594. }
  1595. #wenTiContainer_sk .el-tree-node > .el-tree-node__children {
  1596. overflow: auto;
  1597. }
  1598. .shuiku .el-date-editor.el-input {
  1599. min-width: 180px !important;
  1600. }
  1601. .shuiku .header {
  1602. padding: 0px 10px;
  1603. }
  1604. .shuiku .el-row {
  1605. margin-bottom: 5px;
  1606. }
  1607. .shuiku .content {
  1608. margin: 10px;
  1609. }
  1610. /* .search .el-table>>>.el-tooltip {
  1611. white-space: pre-wrap !important;
  1612. line-height: 30px;
  1613. font-size: 0;
  1614. } */
  1615. .shuiku .search > > > .el-table .el-button:nth-child(odd) {
  1616. margin-left: 0 !important;
  1617. }
  1618. .custom_dialog .el-dialog {
  1619. width: 60% !important;
  1620. }
  1621. .custom_dialog .scroll300 {
  1622. max-height: 60vh !important;
  1623. }
  1624. .scroll300 .el-form {
  1625. padding-top: 5px;
  1626. padding-right: 5px;
  1627. }
  1628. .shuiku .el-tag + .el-tag {
  1629. margin-left: 10px;
  1630. }
  1631. .shuiku .button-new-tag {
  1632. margin-left: 10px;
  1633. height: 28px;
  1634. line-height: 28px;
  1635. padding-top: 0;
  1636. padding-bottom: 0;
  1637. }
  1638. .shuiku .input-new-tag {
  1639. width: 90px;
  1640. margin-left: 10px;
  1641. vertical-align: bottom;
  1642. }
  1643. .inspPblmCate {
  1644. padding: 2px 10px;
  1645. border-radius: 10px;
  1646. color: #ffffff;
  1647. -webkit-border-radius: 10px;
  1648. -moz-border-radius: 10px;
  1649. border-radius: 10px;
  1650. }
  1651. #wenTiContainer_sk .el-select, #wenTiContainer_sk .el-input {
  1652. width: 140px !important;
  1653. }
  1654. </style>