e0da4be068f4bafea8d7f16744ba1259a6a9e600.svn-base 71 KB

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