fa2ed3a70419c464df36739131a5882a7fed9d4b.svn-base 37 KB

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