0016c458db1dba9e5e16273b36c407b0f0e7b4e3.svn-base 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132
  1. <!-- -->
  2. <template>
  3. <div>
  4. <!-- 查询展示 -->
  5. <div class="search" style="margin-top:10px;height:49vh">
  6. <el-table
  7. border
  8. :height="tableHeight"
  9. ref="multipleTable"
  10. :data="searchResult"
  11. tooltip-effect="dark"
  12. style="width: 100%"
  13. >
  14. <el-table-column align="center" type="index" label="序号" min-width="25" fixed>
  15. <template slot-scope="scope">{{ (currentPage - 1) * pageSize + (scope.$index + 1) }}</template>
  16. </el-table-column>
  17. <el-table-column
  18. header-align="center"
  19. align="center"
  20. min-width="55"
  21. prop="inspPblmCate"
  22. label="程度"
  23. fixed
  24. >
  25. <template slot-scope="scope">
  26. <p style="color:#27C19F;" v-if="scope.row.inspPblmCate == 0">一般</p>
  27. <p style="color:#E6A23C;" v-if="scope.row.inspPblmCate == 1">较重</p>
  28. <p style="color:#F56C6C;" v-if="scope.row.inspPblmCate == 2">严重</p>
  29. <p style="color:#F56C6C;" v-if="scope.row.inspPblmCate == 3">特别严重</p>
  30. </template>
  31. </el-table-column>
  32. <el-table-column
  33. header-align="center"
  34. align="center"
  35. min-width="60"
  36. prop="province"
  37. label="省" v-if="isXj"
  38. show-overflow-tooltip
  39. ></el-table-column>
  40. <el-table-column
  41. header-align="center"
  42. align="center"
  43. min-width="60"
  44. prop="city"
  45. :label="ownAdName"
  46. show-overflow-tooltip
  47. ></el-table-column>
  48. <el-table-column
  49. header-align="center"
  50. align="center"
  51. min-width="60"
  52. prop="country"
  53. label="县"
  54. v-if="isXj"
  55. show-overflow-tooltip
  56. ></el-table-column>
  57. <el-table-column
  58. header-align="center"
  59. align="center"
  60. min-width="100"
  61. prop="nm"
  62. label="督查水闸名称"
  63. show-overflow-tooltip
  64. ></el-table-column>
  65. <el-table-column
  66. header-align="center"
  67. align="center"
  68. min-width="140"
  69. prop="inspPblmsName"
  70. label="问题类别"
  71. show-overflow-tooltip
  72. ></el-table-column>
  73. <el-table-column
  74. header-align="center"
  75. align="center"
  76. min-width="230"
  77. prop="checkPoint"
  78. label="检查项目"
  79. show-overflow-tooltip
  80. ></el-table-column>
  81. <!-- <el-table-column
  82. header-align="center"
  83. align="center"
  84. min-width="60"
  85. prop="ifCasePblm"
  86. label="典型"
  87. >
  88. <template slot-scope="scope">
  89. <p v-if="scope.row.ifCasePblm == 1">是</p>
  90. <p v-if="scope.row.ifCasePblm == 0">否</p>
  91. </template>
  92. </el-table-column>-->
  93. <el-table-column
  94. header-align="center"
  95. align="center"
  96. min-width="60"
  97. prop="persName"
  98. label="上报人"
  99. ></el-table-column>
  100. <el-table-column
  101. header-align="center"
  102. align="center"
  103. min-width="80"
  104. show-overflow-tooltip
  105. prop="orgNm"
  106. label="所在组"
  107. ></el-table-column>
  108. <el-table-column
  109. prop="collTime"
  110. label="上报时间"
  111. :formatter="timestampToTime"
  112. sortable
  113. align="center"
  114. min-width="100"
  115. show-overflow-tooltip
  116. ></el-table-column>
  117. <el-table-column
  118. align="center"
  119. prop
  120. min-width="130"
  121. label="操作"
  122. fixed="right"
  123. >
  124. <template slot-scope="scope">
  125. <el-button icon="el-icon-view" title="查看详情"type="text" @click="showDetails(scope.row.pblmId)"></el-button>
  126. <el-button v-if="ownPriv('manage')" icon="el-icon-edit" type="text" title="修改问题" @click="changeSup(scope.row.pblmId)"></el-button>
  127. <el-button v-if="ownPriv('manage')"
  128. icon="el-icon-delete"
  129. type="text"
  130. title="删除问题" @click="removeSuperviseOne(scope.row.pblmId)"
  131. ></el-button>
  132. </template>
  133. </el-table-column>
  134. </el-table>
  135. <!-- 分页 -->
  136. <div class="paginationWarpper">
  137. <el-pagination
  138. class="paginationCenter"
  139. background
  140. @size-change="handleSizeChange"
  141. @current-change="search"
  142. :current-page.sync="currentPage"
  143. :page-sizes="[10, 20, 50, 100]"
  144. :page-size="pageSize"
  145. layout="total, sizes, prev, pager, next, jumper"
  146. :total="total"
  147. ></el-pagination>
  148. </div>
  149. </div>
  150. <!-- 详情弹框 -->
  151. <el-dialog
  152. class="outerDialog custom_dialog"
  153. title="问题详情"
  154. :visible.sync="supervisionDetailsVisible"
  155. v-if="supervisionDetailsVisible"
  156. :append-to-body="true"
  157. >
  158. <supervision-details ref="xianqing" :problemId="currentProblemId" :objType="6"></supervision-details>
  159. <span slot="footer">
  160. <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
  161. </span>
  162. </el-dialog>
  163. <el-dialog
  164. width="60%"
  165. :append-to-body="true"
  166. class="outerDialog custom_dialog"
  167. title="修改督查问题"
  168. :close-on-click-modal="false"
  169. :visible.sync="changeSupervisionVisible"
  170. >
  171. <div class="scroll300">
  172. <div
  173. style="width:49%;overflow-y:auto;max-height:48vh;float:left;border:1px solid #d5d5ff;margin-right:5px;"
  174. >
  175. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">基本信息</p>
  176. <el-form
  177. ref="changeSupFrom"
  178. :model="changeSupervision"
  179. label-width="120px"
  180. >
  181. <el-form-item label="水库名称" prop="nm">
  182. <el-input v-model="changeSupervision.nm" clearable :disabled="true"></el-input>
  183. </el-form-item>
  184. <el-form-item label="问题类别" prop="inspPblmsName">
  185. <el-input v-model="changeSupervision.inspPblmsName" clearable :disabled="true"></el-input>
  186. </el-form-item>
  187. <el-form-item label="检查项目" prop="checkPoint">
  188. <el-input v-model="changeSupervision.checkPoint" clearable :disabled="true"></el-input>
  189. </el-form-item>
  190. <el-form-item label="问题描述" prop="pblmDesc">
  191. <el-input :autosize="{ minRows: 4, maxRows: 6}" type="textarea" v-model="changeSupervision.pblmDesc" clearable :disabled="true"></el-input>
  192. </el-form-item>
  193. <el-form-item label="详细描述" prop="inspPblmDesc">
  194. <el-input
  195. type="textarea"
  196. :rows="2"
  197. v-model="changeSupervision.inspPblmDesc"
  198. clearable
  199. ></el-input>
  200. </el-form-item>
  201. <el-form-item label="是否为典型问题:">
  202. <el-select v-model="changeSupervision.ifCasePblm" clearable placeholder="请选择">
  203. <el-option
  204. v-for="item in supervision"
  205. :key="item.value"
  206. :label="item.label"
  207. :value="item.value"
  208. ></el-option>
  209. </el-select>
  210. </el-form-item>
  211. <el-form-item label="严重程度:">
  212. <el-select v-model="changeSupervision.inspPblmCate" clearable placeholder="请选择">
  213. <el-option
  214. v-for="item in supervisionState"
  215. :key="item.value"
  216. :label="item.label"
  217. :value="item.value"
  218. ></el-option>
  219. </el-select>
  220. <!-- <el-radio v-model="changeSupervision.inspPblmCate" label="0">一般</el-radio>
  221. <el-radio v-model="changeSupervision.inspPblmCate" label="1">较重</el-radio>
  222. <el-radio v-model="changeSupervision.inspPblmCate" label="2">严重</el-radio>-->
  223. </el-form-item>
  224. <el-form-item label="备注" prop="note">
  225. <el-input
  226. type="textarea"
  227. :rows="2"
  228. v-model.trim="changeSupervision.note"
  229. clearable
  230. ></el-input>
  231. <!-- <el-input resize="none" type="input" :rows="3" placeholder="请输入" v-model.trim="changeSupervision.pblmPersName"></el-input> -->
  232. </el-form-item>
  233. <el-form-item label="上报人" prop="persName">
  234. <el-input
  235. resize="none"
  236. disabled
  237. type="input"
  238. :rows="3"
  239. placeholder="请输入"
  240. v-model.trim="changeSupervision.persName"
  241. ></el-input>
  242. </el-form-item>
  243. <el-form-item label="采集时间" prop="collTime">
  244. <el-date-picker v-model="changeSupervision.collTime" disabled type="date"></el-date-picker>
  245. </el-form-item>
  246. </el-form>
  247. </div>
  248. <div
  249. style="width: 49%;float: left;border: 1px solid rgb(213, 213, 255);margin-right: 5px;overflow-y: auto;max-height: 48vh;"
  250. >
  251. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  252. <el-tabs style="margin:0px 5px">
  253. <el-tab-pane :label="picturetabName">
  254. <!-- <el-table border :data="pictureArray" style="width: 100%;margin: 0 auto;">
  255. <el-table-column header-align="center" align="center" label="图片">
  256. <template slot-scope="scope">
  257. <img style="width:35%;" :src="`${hostUrl}/${scope.row.filePath}`" alt>
  258. </template>
  259. </el-table-column>
  260. <el-table-column header-align="center" align="center" label="操作">
  261. <template slot-scope="scope">
  262. <el-button size="mini" @click="removeFile(scope.row.id,scope.$index)" type="danger">删除</el-button>
  263. </template>
  264. </el-table-column>
  265. </el-table>-->
  266. <el-row style="text-align:right;">
  267. <el-button :v-if="!addPicPanel?addPicPanel:addPicPanel"
  268. size="mini"
  269. type="text"
  270. :icon="!addPicPanel?'el-icon-circle-plus-outline':'el-icon-circle-close-outline'"
  271. @click="addPic"
  272. >{{!addPicPanel?"添加":"取消"}}</el-button>
  273. </el-row>
  274. <el-row v-if="addPicPanel">
  275. <upload ref="uploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload>
  276. </el-row>
  277. <el-row>
  278. <div style="overflow-y:auto;overflow-x:hidden;max-height:30vh;padding:10px;">
  279. <div class="upload-container" id="imgView">
  280. <div
  281. v-for="(item, index) in pictureArray"
  282. :key="item"
  283. class="image-preview image-app-preview"
  284. >
  285. <div class="image-preview-wrapper">
  286. <img :src="`${hostUrl}/${item.filePath}`">
  287. <div class="image-preview-action">
  288. <i @click="removeFile(item.id)" class="el-icon-delete"></i>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. </div>
  294. </el-row>
  295. </el-tab-pane>
  296. <el-tab-pane :label="audiotabName">
  297. <el-table border :data="audioArray" style="width: 100%;margin: 0 auto;">
  298. <el-table-column header-align="center" align="center" label="音频">
  299. <template slot-scope="scope">
  300. <elaudio
  301. style="margin-left:15%;width:100px;height:30px;"
  302. :theUrl="`${hostUrl}/${scope.row.filePath}`"
  303. ></elaudio>
  304. <!-- <span>{{scope.row.fileTitle}}</span> -->
  305. </template>
  306. </el-table-column>
  307. <el-table-column header-align="center" align="center" label="操作">
  308. <template slot-scope="scope">
  309. <el-button
  310. size="mini"
  311. @click="removeFile(scope.row.id,scope.$index)"
  312. type="danger"
  313. >删除</el-button>
  314. </template>
  315. </el-table-column>
  316. </el-table>
  317. </el-tab-pane>
  318. <el-tab-pane :label="videotabName">
  319. <el-table border :data="videoArray" style="width: 100%;margin: 0 auto;">
  320. <el-table-column header-align="center" align="center" label="视频">
  321. <template slot-scope="scope">
  322. <!-- <span>{{scope.row.fileTitle}}</span> -->
  323. <video-player
  324. class="vjs-custom-skin"
  325. ref="videoPlayer"
  326. :options="scope.row"
  327. :playsinline="true"
  328. ></video-player>
  329. </template>
  330. </el-table-column>
  331. <el-table-column header-align="center" align="center" label="操作">
  332. <template slot-scope="scope">
  333. <el-button
  334. size="mini"
  335. @click="removeFile(scope.row.id,scope.$index)"
  336. type="danger"
  337. >删除</el-button>
  338. </template>
  339. </el-table-column>
  340. </el-table>
  341. </el-tab-pane>
  342. <el-tab-pane :label="filetabName">
  343. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  344. <el-table-column header-align="center" align="center" label="文档">
  345. <template slot-scope="scope">
  346. <p>
  347. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
  348. {{scope.row.fileName}}
  349. </a>
  350. </p>
  351. </template>
  352. </el-table-column>
  353. <el-table-column header-align="center" align="center" label="操作">
  354. <template slot-scope="scope">
  355. <el-button
  356. size="mini"
  357. @click="removeFile(scope.row.id,scope.$index)"
  358. type="danger"
  359. >删除</el-button>
  360. </template>
  361. </el-table-column>
  362. </el-table>
  363. </el-tab-pane>
  364. </el-tabs>
  365. </div>
  366. <!-- <upload ref="changeUploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload> -->
  367. </div>
  368. <span slot="footer">
  369. <el-button
  370. type="primary"
  371. @click="changeSupervisionInfo"
  372. >保存</el-button>
  373. <el-button @click="changeSupervisionVisiblefalse">取消</el-button>
  374. </span>
  375. </el-dialog>
  376. <!-- 删除的弹窗 -->
  377. <el-dialog class="deleteDialog" title="问题删除描述" :visible.sync="problemDeleteVisible" :append-to-body="true">
  378. <Problem-delete
  379. ref="deleteMiaoShu"
  380. :deleteProblemId="deleteId"
  381. @deleteSuccess="deleteSuccess"
  382. ></Problem-delete>
  383. <span slot="footer">
  384. <el-button @click="problemDeleteVisible = false">返回</el-button>
  385. </span>
  386. </el-dialog>
  387. </div>
  388. </template>
  389. <script>
  390. //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  391. //例如:import 《组件名称》 from '《组件路径》';
  392. import {
  393. findPageInfoShuiKu,
  394. getShuiKuWenTi,
  395. getXSKProblemNewExport,
  396. findPageInfo,
  397. getSzwtTable,
  398. removeSupervise,
  399. showDetailsXq,
  400. submitUpload,
  401. creatSupervise,
  402. getSupervisdByID,
  403. deleteFileById,
  404. updatelist,
  405. getEngId,
  406. } from "../../api/duChaAPI.js";
  407. import request from "../../utils/gw_ajax_request.js";
  408. import { hostUrl } from "@util/global_variable.js";
  409. import elaudio from "../../widgets/elAudioShort.vue";
  410. import inuptWithDuChaTreeNode from "../../widgets/inuptWithDuChaTreeNode.vue";
  411. import inputWidthDuChaNodes from "../../widgets/inputWithDuChaNodes.vue";
  412. import inputWidthDuChaShuiKu from "../../widgets/inputWith_sk.vue";
  413. import Viewer from 'viewerjs';
  414. import 'viewerjs/dist/viewer.css';
  415. export default {
  416. //import引入的组件需要注入到对象中才能使用
  417. components: {
  418. //详情页
  419. supervisionDetails: resolve => {
  420. require(["../duChaWenTi/supervisionDetails_shuiku.vue"], resolve);
  421. },
  422. upload: resolve => {
  423. require(["../../widgets/uploadFile.vue"], resolve);
  424. },
  425. // 删除描述页
  426. ProblemDelete: resolve => {
  427. require(["../duChaWenTi/problemDelete.vue"], resolve);
  428. },
  429. elaudio: elaudio,
  430. inuptWithDuChaTreeNode: inuptWithDuChaTreeNode,
  431. inputWidthDuChaNodes: inputWidthDuChaNodes,
  432. inputWidthDuChaShuiKu: inputWidthDuChaShuiKu,
  433. },
  434. props: ["activedName","currentResCode"],
  435. data() {
  436. //这里存放数据
  437. return {
  438. tableHeight: window.innerHeight - 450,
  439. supervisionState: [
  440. {
  441. value: "0",
  442. label: "一般"
  443. },
  444. {
  445. value: "1",
  446. label: "较重"
  447. },
  448. {
  449. value: "2",
  450. label: "严重"
  451. },
  452. {
  453. value: "3",
  454. label: "特别严重"
  455. }
  456. ],
  457. supervision: [
  458. {
  459. value: "1",
  460. label: "是"
  461. },
  462. {
  463. value: "0",
  464. label: "否"
  465. }
  466. ],
  467. updateIdXiuGai: "",
  468. pblmId: "",
  469. addPicPanel: false,
  470. supervisionDetailsVisible:false,
  471. currentProblemId: "",
  472. currentPage: 1, // 页码
  473. pageSize: 20,
  474. loading: false,
  475. total: 0, // 总数
  476. searchResult: [], // 结果
  477. userId: localStorage.getItem("userid"),
  478. pictureArray: [],
  479. audioArray: [],
  480. videoArray: [],
  481. fileArray:[],
  482. audiotabName: "",
  483. videotabName: "",
  484. picturetabName: "",
  485. filetabName: "",
  486. deleteId: "",
  487. playerOptions: {
  488. height: "120",
  489. autoplay: true,
  490. muted: true,
  491. language: "en",
  492. playbackRates: [0.7, 1.0, 1.5, 2.0],
  493. sources: [
  494. {
  495. type: "video/mp4",
  496. // mp4
  497. src: "http://vjs.zencdn.net/v/oceans.mp4"
  498. // webm
  499. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  500. },
  501. {
  502. type: "video/mp4",
  503. // mp4
  504. src: "http://vjs.zencdn.net/v/oceans.mp4"
  505. // webm
  506. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  507. },
  508. {
  509. type: "video/mp4",
  510. // mp4
  511. src: "http://vjs.zencdn.net/v/oceans.mp4"
  512. // webm
  513. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  514. },
  515. {
  516. type: "video/mp4",
  517. // mp4
  518. src: "http://vjs.zencdn.net/v/oceans.mp4"
  519. // webm
  520. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  521. }
  522. ]
  523. },
  524. changeSupervisionVisible: false,
  525. changeSupervisionLoading: false,
  526. changeSupervision: {
  527. nm: "",
  528. presId: localStorage.getItem("userid"),
  529. endTime: "",
  530. pblmId: "",
  531. objId: "",
  532. objType: "",
  533. inspGroupId: "",
  534. inspPblmName: "",
  535. inspPblmDesc: "",
  536. pblmLong: "",
  537. pblmLat: "",
  538. pblmStat: "",
  539. ifCasePblm: "",
  540. inspPblmOrgName: "",
  541. pblmPersName: "",
  542. inspPblmCate: "",
  543. reviOpin: "",
  544. reviConc: "",
  545. reviOrgGuid: "",
  546. collTime: "",
  547. recPers: "",
  548. gwComFiles: [
  549. {
  550. id: "",
  551. filePath: "",
  552. bizId: ""
  553. }
  554. ]
  555. },
  556. // 文件弹框
  557. fileList: [], // 当前文件列表
  558. flash: false,
  559. // 督查类型
  560. supervisionTypeList: [
  561. {
  562. value: "1",
  563. label: "小水库"
  564. }
  565. ],
  566. leibie: [],
  567. // 查询
  568. value6: [],
  569. findParams: {
  570. hasVedio:"",
  571. adCode: "",
  572. pblmStat: "",
  573. inspPblmCate: "",
  574. ifCasePblm: "",
  575. nm: "",
  576. rsName: "",
  577. adFullName: "",
  578. startTime: "",
  579. endTime: "",
  580. objType: 1,
  581. inspPblmName: "",
  582. persId: localStorage.getItem("userid")
  583. },
  584. currentPage: 1, // 页码
  585. pageSize: 20, // 条数
  586. loading: false,
  587. total: 0, // 总数
  588. searchResult: [], // 结果
  589. crId: "", // 当前督查id
  590. // 督查详情
  591. userid: localStorage.getItem("userid"),
  592. supervisionDetailsVisible: false,
  593. problemDeleteVisible: false,
  594. supervisionDetails: {},
  595. pblmId: "",
  596. gwComFiles: [],
  597. pblscr: "",
  598. pblscrList: [
  599. {
  600. lable: "我的问题",
  601. value: localStorage.getItem("userid")
  602. }
  603. ],
  604. pblscrGroup: ""
  605. };
  606. },
  607. //监听属性 类似于data概念
  608. computed: {
  609. hostUrl(){
  610. return hostUrl
  611. }
  612. },
  613. //监控data中的数据变化
  614. watch: {
  615. activedName() {
  616. this.search();
  617. },
  618. currentResCode(oldValue,newValue){
  619. this.currentResCode = newValue;
  620. this.search();
  621. }
  622. },
  623. //方法集合
  624. methods: {
  625. handleSizeChange(pageSize) {
  626. this.pageSize = pageSize;
  627. this.search();
  628. },
  629. // 查询
  630. search() {
  631. this.loading = true;
  632. let _self = this;
  633. let data = {};
  634. data["gateName"] = "";
  635. data["inspPblmName"] = "";
  636. data["objType"] = 6;
  637. data["persId"] = _self.userId;
  638. data["pageNum"] = _self.currentPage;
  639. data["recPers"] = _self.userId;
  640. data["pageSize"] = _self.pageSize;
  641. data["villType"] = "7";
  642. data["codes"] = _self.currentResCode;
  643. getSzwtTable(data).then(res => {
  644. _self.loading = false;
  645. if (res.success) {
  646. _self.searchResult = res.data.list;
  647. _self.total = res.data.total;
  648. } else {
  649. }
  650. });
  651. },
  652. timestampToTime(row, column) {
  653. var date = new Date(row.collTime);
  654. var Y = date.getFullYear() + "-";
  655. var M =
  656. (date.getMonth() + 1 < 10
  657. ? "0" + (date.getMonth() + 1)
  658. : date.getMonth() + 1) + "-";
  659. var D =
  660. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  661. var h =
  662. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  663. var m =
  664. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  665. return Y + M + D + h + m;
  666. },
  667. // 详情弹框
  668. showDetails(id) {
  669. this.currentProblemId = id;
  670. this.supervisionDetailsVisible = true;
  671. },
  672. // 修改弹窗显示
  673. changeSup(id) {
  674. this.pictureArray = [];
  675. this.audioArray = [];
  676. this.videoArray = [];
  677. this.fileArray = [];
  678. this.updateIdXiuGai = id;
  679. var _this = this;
  680. showDetailsXq(this.updateIdXiuGai).then(res => {
  681. // if(this.usersId==)
  682. this.changeSupervision = res.data;
  683. this.changeSupervisionVisible = true;
  684. res.data.gwComFiles.forEach(item => {
  685. if (
  686. item.fileExt == "mp3" ||
  687. item.fileExt == "MP3" ||
  688. item.fileExt == "m4a"
  689. ) {
  690. this.audioArray.push(item);
  691. } else if (
  692. item.fileExt == "jpg" ||
  693. item.fileExt == "JPG" ||
  694. item.fileExt == "png" ||
  695. item.fileExt == "PNG" ||
  696. item.fileExt == "JPEG" ||
  697. item.fileExt == "jpeg"
  698. ) {
  699. this.pictureArray.push(item);
  700. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  701. this.videoArray.push({
  702. id: item.id,
  703. bizId: item.bizId,
  704. width: "130",
  705. height: "130",
  706. autoplay: false,
  707. muted: true,
  708. language: "en",
  709. playbackRates: [0.7, 1.0, 1.5, 2.0],
  710. sources: [
  711. {
  712. type: "video/mp4",
  713. // mp4
  714. src:`${this.hostUrl}/${item.filePath}`,
  715. // webm
  716. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  717. }
  718. ]
  719. });
  720. }else{
  721. this.fileArray.push(item);
  722. }
  723. });
  724. _this.$nextTick(function(){
  725. var ViewerDom = document.getElementById('imgView');
  726. var viewer = new Viewer(ViewerDom, {})
  727. });
  728. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  729. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  730. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  731. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  732. });
  733. },
  734. // 提交修改信息
  735. changeSupervisionInfo() {
  736. this.changeSupervisionVisible = true;
  737. this.$refs.changeSupFrom.validate(valid => {
  738. if (valid) {
  739. this.changeSupervisionLoading = true;
  740. let data = this.changeSupervision;
  741. updatelist(data).then(res => {
  742. this.pblmId = res.data.pblmId;
  743. this.gwComFiles = res.data.gwComFiles;
  744. if (res.success) {
  745. this.removeNewSupervision();
  746. this.successInfo();
  747. if (this.$refs.uploadFile.submitUpload(data.pblmId)) {
  748. this.removeNewSupervision();
  749. this.successInfo();
  750. this.addPicPanel = false;
  751. this.changeSupervisionLoading = false;
  752. }
  753. } else {
  754. this.failInfo();
  755. }
  756. });
  757. }
  758. });
  759. },
  760. removeNewSupervision(arg) {
  761. if (arg) {
  762. console.log(arg);
  763. var args = this.gwComFiles.concat(arg);
  764. this.updatefilelist(args);
  765. }
  766. this.search();
  767. this.gwComFiles = [];
  768. this.newSupervisionVisible = false;
  769. this.changeSupervisionVisible = false;
  770. this.newSupervision = {
  771. id: "",
  772. checkPoint: "",
  773. presId: localStorage.getItem("userid"),
  774. dataStat: "",
  775. nm: "",
  776. endTime: "",
  777. pblmId: "",
  778. objId: "",
  779. objType: "",
  780. inspGroupId: "",
  781. inspPblmCate: "",
  782. inspPblmName: "",
  783. inspPblmDesc: "",
  784. pblmLong: "",
  785. pblmLat: "",
  786. pblmStat: "",
  787. ifCasePblm: "",
  788. inspPblmOrgName: "",
  789. pblmPersName: "",
  790. inspPblmCate: "",
  791. reviOpin: "",
  792. reviConc: "",
  793. reviOrgGuid: "",
  794. collTime: "",
  795. recPers: "",
  796. note: ""
  797. };
  798. // this.$refs.uploadFile.init();
  799. },
  800. // 删除图片文件
  801. removeFile(id, index) {
  802. // this.updateIdXiuGai = this.updateIdXiuGai;
  803. var _self = this;
  804. this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
  805. confirmButtonText: "确定",
  806. cancelButtonText: "返回",
  807. type: "warning"
  808. }).then(
  809. res => {
  810. if (res === "confirm") {
  811. deleteFileById(id, this.userId).then(res => {
  812. if (res.success) {
  813. // this.changeSupervision.gwComFiles.splice(index, 1);
  814. this.changeSupervision.gwComFiles.forEach(item => {
  815. if (
  816. item.fileExt == "mp3" ||
  817. item.fileExt == "MP3" ||
  818. item.fileExt == "m4a"
  819. ) {
  820. this.audiotabName.splice(index, 1);
  821. } else if (
  822. item.fileExt == "jpg" ||
  823. item.fileExt == "JPG" ||
  824. item.fileExt == "png" ||
  825. item.fileExt == "PNG" ||
  826. item.fileExt == "JPEG" ||
  827. item.fileExt == "jpeg"
  828. ) {
  829. this.pictureArray.splice(index, 1);
  830. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  831. this.videoArray.splice(index, 1);
  832. }
  833. });
  834. _self.changeSup(this.updateIdXiuGai);
  835. } else {
  836. this.failInfo();
  837. }
  838. });
  839. }
  840. },
  841. res => {
  842. console.log("返回");
  843. }
  844. );
  845. },
  846. // 操作成功反馈
  847. successInfo() {
  848. this.$message({
  849. type: "success",
  850. message: "操作成功!"
  851. });
  852. },
  853. // 操作失败反馈
  854. failInfo(val) {
  855. this.$message.error(val);
  856. },
  857. // 清空选择
  858. toggleSelection(rows) {
  859. this.$refs.multipleTable.clearSelection();
  860. },
  861. // 已选择项
  862. handleSelectionChange(val) {
  863. this.multipleSelection = val;
  864. },
  865. // 文件上传
  866. submitUpload() {
  867. this.$refs.upload.submit();
  868. },
  869. handleRemove(file, fileList) {
  870. console.log(file, fileList);
  871. },
  872. handlePreview(file) {
  873. console.log(file);
  874. },
  875. addPic() {
  876. this.addPicPanel = !this.addPicPanel;
  877. },
  878. // 删除弹窗
  879. removeSuperviseOne(id) {
  880. this.deleteId = id;
  881. this.problemDeleteVisible = true;
  882. },
  883. deleteSuccess() {
  884. this.problemDeleteVisible = false;
  885. this.search();
  886. },
  887. changeSupervisionVisiblefalse() {
  888. this.$nextTick(() => {
  889. if (this.flash) {
  890. this.flash = false;
  891. this.search();
  892. }
  893. });
  894. this.changeSupervisionVisible = false;
  895. this.changeSupervision = {
  896. dataStat: "",
  897. nm: "",
  898. endTime: "",
  899. pblmId: "",
  900. objId: "",
  901. objType: "",
  902. inspGroupId: "",
  903. inspPblmCate: "",
  904. inspPblmName: "",
  905. inspPblmDesc: "",
  906. pblmLong: "",
  907. pblmLat: "",
  908. pblmStat: "",
  909. ifCasePblm: "",
  910. inspPblmOrgName: "",
  911. pblmPersName: "",
  912. inspPblmCate: "",
  913. reviOpin: "",
  914. reviConc: "",
  915. reviOrgGuid: "",
  916. collTime: "",
  917. recPers: "",
  918. note: "",
  919. gwComFiles: [
  920. {
  921. id: "",
  922. filePath: "",
  923. bizId: ""
  924. }
  925. ]
  926. };
  927. this.$refs.uploadFile.init();
  928. this.addPicPanel = false;
  929. },
  930. },
  931. //生命周期 - 创建完成(可以访问当前this实例)
  932. created() {
  933. this.addPicPanel = false;
  934. if (this.userId) {
  935. console.log("已经登录");
  936. this.search();
  937. } else {
  938. this.$router.push("/login");
  939. }
  940. },
  941. //生命周期 - 挂载完成(可以访问DOM元素)
  942. mounted() {
  943. this.search();
  944. },
  945. beforeCreate() {}, //生命周期 - 创建之前
  946. beforeMount() {}, //生命周期 - 挂载之前
  947. beforeUpdate() {}, //生命周期 - 更新之前
  948. updated() {}, //生命周期 - 更新之后
  949. beforeDestroy() {}, //生命周期 - 销毁之前
  950. destroyed() {}, //生命周期 - 销毁完成
  951. activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
  952. };
  953. </script>
  954. <style rel="stylesheet/scss" lang="scss" scoped>
  955. @import "../duChaWenTi/base.css";
  956. @import url("/src/assets/iconfont/iconfont.css");
  957. @import url("/src/assets/css/mixin.scss");
  958. .upload-container {
  959. width: 100%;
  960. position: relative;
  961. .image-uploader {
  962. width: 35%;
  963. float: left;
  964. }
  965. .image-preview {
  966. width: 200px;
  967. height: 200px;
  968. position: relative;
  969. border: 1px dashed #d9d9d9;
  970. float: left;
  971. // margin-left: 50px;
  972. .image-preview-wrapper {
  973. position: relative;
  974. width: 100%;
  975. height: 100%;
  976. img {
  977. width: 100%;
  978. height: 100%;
  979. }
  980. }
  981. .image-preview-action {
  982. position: absolute;
  983. width: 100%;
  984. height: 30px;
  985. left: 0;
  986. bottom: 0;
  987. cursor: default;
  988. text-align: center;
  989. color: #fff;
  990. opacity: 0;
  991. font-size: 20px;
  992. background-color: rgba(0, 0, 0, 0.5);
  993. transition: opacity 0.3s;
  994. cursor: pointer;
  995. text-align: center;
  996. line-height: 30px;
  997. .el-icon-delete {
  998. font-size: 24px;
  999. }
  1000. }
  1001. &:hover {
  1002. .image-preview-action {
  1003. opacity: 1;
  1004. }
  1005. }
  1006. }
  1007. .image-app-preview {
  1008. margin-bottom: 10px;
  1009. width: 40vh;
  1010. height: 180px;
  1011. position: relative;
  1012. border: 1px dashed #d9d9d9;
  1013. float: left;
  1014. // margin-left: 50px;
  1015. .app-fake-conver {
  1016. height: 44px;
  1017. position: absolute;
  1018. width: 100%; // background: rgba(0, 0, 0, .1);
  1019. text-align: center;
  1020. line-height: 64px;
  1021. color: #fff;
  1022. }
  1023. }
  1024. }
  1025. .bottom {
  1026. margin-top: 13px;
  1027. line-height: 12px;
  1028. }
  1029. .button {
  1030. padding: 0;
  1031. float: right;
  1032. }
  1033. .image {
  1034. width: 100%;
  1035. display: block;
  1036. }
  1037. .clearfix:before,
  1038. .clearfix:after {
  1039. display: table;
  1040. content: "";
  1041. }
  1042. .clearfix:after {
  1043. clear: both;
  1044. }
  1045. #wenTiContainer_sk .el-tree-node {
  1046. /* overflow: auto; */
  1047. }
  1048. #wenTiContainer_sk .el-tree-node > .el-tree-node__children {
  1049. overflow: auto;
  1050. }
  1051. .shuiku .el-date-editor.el-input {
  1052. min-width: 180px !important;
  1053. }
  1054. .shuiku .header {
  1055. padding: 0px 10px;
  1056. }
  1057. .shuiku .el-row {
  1058. margin-bottom: 5px;
  1059. }
  1060. .shuiku .content {
  1061. margin: 10px;
  1062. }
  1063. /* .search .el-table>>>.el-tooltip {
  1064. white-space: pre-wrap !important;
  1065. line-height: 30px;
  1066. font-size: 0;
  1067. } */
  1068. .shuiku .search >>> .el-table .el-button:nth-child(odd) {
  1069. margin-left: 0 !important;
  1070. }
  1071. .custom_dialog .el-dialog {
  1072. width: 60% !important;
  1073. }
  1074. .custom_dialog .scroll300 {
  1075. max-height: 60vh !important;
  1076. }
  1077. .shuiku .el-tag + .el-tag {
  1078. margin-left: 10px;
  1079. }
  1080. .shuiku .button-new-tag {
  1081. margin-left: 10px;
  1082. height: 28px;
  1083. line-height: 28px;
  1084. padding-top: 0;
  1085. padding-bottom: 0;
  1086. }
  1087. .shuiku .input-new-tag {
  1088. width: 90px;
  1089. margin-left: 10px;
  1090. vertical-align: bottom;
  1091. }
  1092. </style>