8db9781a9a5124a1d15149c297053779c842033f.svn-base 64 KB

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