14a552dc88e679aaae80ddf67d168614bdb0dd2e.svn-base 90 KB

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