2fdea5a430db7e31429bde2a453d0c0e912012fc.svn-base 71 KB

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