c5dc5ba073a8a5f91957fc9fc587f0c8299d1d2b.svn-base 65 KB

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