e2bfa531199bc234af32273b0abc00b1d7869195.svn-base 87 KB

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