c1d7b0f2b93509abc47078e4a61ecbfce52aee6b.svn-base 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  1. <template>
  2. <el-container class="rectify_reform">
  3. <el-main>
  4. <el-card class="box-card" :style="{'height': cardHeight + 'px','overflow-y':'auto'}">
  5. <!--20191226bytanghy-->
  6. <el-row :gutter="20" type="flex" justify="start" class="notice_title">
  7. <el-col :span="16">
  8. <el-form :inline="true" size="mini" class="demo-form-inline" label-width="80px">
  9. <el-form-item label="行政区">
  10. <el-select
  11. v-model="addForm.rectOrgId"
  12. clearable
  13. collapse-tags ref="selectProvince" @change="select_handler_province">
  14. <el-option
  15. v-for="item in pidList"
  16. :key="item.orgId"
  17. :label="item.orgNm"
  18. :value="item.orgId">
  19. </el-option>
  20. </el-select>
  21. </el-form-item>
  22. <el-form-item label="选择年度">
  23. <el-select
  24. v-model="addForm.year"
  25. clearable
  26. collapse-tags>
  27. <el-option
  28. v-for="item in yearList"
  29. :key="item.id"
  30. :label="item.year"
  31. :value="item.year">
  32. </el-option>
  33. </el-select>
  34. </el-form-item>
  35. <el-form-item label="督查类型">
  36. <el-select
  37. v-model="addForm.sndType "
  38. clearable
  39. collapse-tags>
  40. <el-option
  41. v-for="item in typesList"
  42. :key="item.code"
  43. :label="item.name"
  44. :value="item.code">
  45. </el-option>
  46. </el-select>
  47. </el-form-item>
  48. <el-form-item label="下发状态">
  49. <el-select
  50. v-model="addForm.state"
  51. clearable
  52. collapse-tags>
  53. <el-option label="已下发" value="1"></el-option>
  54. <el-option label="未下发" value="0"></el-option>
  55. <el-option label="已反馈" value="2"></el-option>
  56. <el-option label="审核通过" value="3"></el-option>
  57. <el-option label="驳回" value="4"></el-option>
  58. </el-select>
  59. </el-form-item>
  60. </el-form>
  61. </el-col>
  62. <el-col :span="8" style="text-align: end;">
  63. <el-button type="primary" @click="searchNotice">查询</el-button>
  64. <el-button type="primary" @click="addZgTz">新建问责通知</el-button>
  65. <!--<el-button type="primary" @click="addZgTz">导出Excel</el-button>-->
  66. <!--<el-button type="primary" @click="addZgTz">批量导入</el-button>-->
  67. </el-col>
  68. </el-row>
  69. <div>
  70. <el-table
  71. border
  72. ref="multipleTable"
  73. :height="tableHeight"
  74. :data="tableData"
  75. tooltip-effect="dark"
  76. style="width: 100%"
  77. >
  78. <el-table-column align="center" type="index" label="序号" min-width="25">
  79. <template slot-scope="scope">{{ (pageNum - 1) * pageSize + (scope.$index + 1) }}</template>
  80. </el-table-column>
  81. <el-table-column
  82. header-align="center"
  83. align="center"
  84. min-width="150"
  85. prop="sndTitle"
  86. label="通知标题"
  87. show-overflow-tooltip
  88. ></el-table-column>
  89. <el-table-column
  90. header-align="center"
  91. align="center"
  92. min-width="150"
  93. prop="sndType"
  94. label="督查类型"
  95. show-overflow-tooltip
  96. >
  97. <template slot-scope="scope">
  98. {{typesListFy(scope.row.sndType)}}
  99. </template>
  100. </el-table-column>
  101. <el-table-column
  102. header-align="center"
  103. align="center"
  104. min-width="200"
  105. prop="sndNub"
  106. label="文号"
  107. show-overflow-tooltip
  108. ></el-table-column>
  109. <el-table-column
  110. header-align="center"
  111. align="center"
  112. min-width="100"
  113. prop="rectOrgName"
  114. label="接收地区"
  115. show-overflow-tooltip
  116. ></el-table-column>
  117. <el-table-column
  118. header-align="center"
  119. align="center"
  120. min-width="100"
  121. prop="crrtTm"
  122. label="整改截止时间"
  123. show-overflow-tooltip
  124. >
  125. <template slot-scope="scope">
  126. <span>{{formatDate(scope.row.crrtTm)}}</span>
  127. </template>
  128. </el-table-column>
  129. <el-table-column
  130. header-align="center"
  131. align="center"
  132. min-width="100"
  133. prop="note"
  134. label="备注"
  135. show-overflow-tooltip
  136. ></el-table-column>
  137. <el-table-column
  138. header-align="center"
  139. align="center"
  140. min-width="160"
  141. prop="fileName"
  142. label="附件"
  143. show-overflow-tooltip
  144. >
  145. <template slot-scope="scope">
  146. <el-button type="text" size="mini" @click="previewAttachment(scope.row)">{{scope.row.fileName}}</el-button>
  147. </template>
  148. </el-table-column>
  149. <el-table-column
  150. header-align="center"
  151. align="center"
  152. min-width="100"
  153. prop="pjctSize"
  154. label="工程"
  155. ></el-table-column>
  156. <el-table-column
  157. header-align="center"
  158. align="center"
  159. min-width="100"
  160. prop="pblmSize"
  161. label="问题数"
  162. ></el-table-column>
  163. <el-table-column
  164. header-align="center"
  165. align="center"
  166. min-width="100"
  167. prop="rectTm"
  168. label="下发时间"
  169. show-overflow-tooltip
  170. >
  171. <template slot-scope="scope">
  172. <span v-if="scope.row.rectTm">{{formatDate(scope.row.rectTm)}}</span>
  173. </template>
  174. </el-table-column>
  175. <el-table-column
  176. align="center"
  177. min-width="350"
  178. label="操作"
  179. fixed="right"
  180. >
  181. <template slot-scope="scope">
  182. <span v-if="Number(scope.row.state) > 0">
  183. <el-button type="success" size="mini" @click="lookOver(scope.row)">查看</el-button>
  184. <el-button type="danger" size="mini" @click="deleteRow(scope.row)">删除</el-button>
  185. </span>
  186. <span v-if="scope.row.state == '0'">
  187. <el-button type="primary" size="mini" @click="editorRow(scope.row)">编辑</el-button>
  188. <el-button type="primary" size="mini" @click="wzJyClick(scope.row)">问责建议</el-button>
  189. <el-button type="primary" size="mini" @click="xiaFaClick(scope.row)">下发</el-button>
  190. </span>
  191. </template>
  192. </el-table-column>
  193. </el-table>
  194. <!--<el-pagination-->
  195. <!--style="margin: 10px auto"-->
  196. <!--background-->
  197. <!--:pager-count="5"-->
  198. <!--:current-page="pageNum"-->
  199. <!--:page-size="pageSize"-->
  200. <!--:page-sizes="[10, 20, 30, 40, 50, 100]"-->
  201. <!--layout="sizes, total, prev, pager, next"-->
  202. <!--:total="tableData.length"-->
  203. <!--@current-change="handleCurrentChange"-->
  204. <!--@size-change="handleSizeChange"-->
  205. <!--&gt;</el-pagination>-->
  206. </div>
  207. </el-card>
  208. <el-dialog :title="titleText + '问责通知'" :visible.sync="dialogFormEditorVisible" :close-on-click-modal="false" width="50%" @close="closeDialog">
  209. <el-form :model="tongZhiForm" ref="tongZhiForm" :label-width="formLabelWidth" :rules="TzRules" v-if="dialogFormEditorVisible">
  210. <el-row :gutter="20" type="flex" justify="start">
  211. <el-col :span="12">
  212. <el-form-item label="督查类型" prop="sndType">
  213. <el-select v-model="tongZhiForm.sndType" placeholder="请选择督查类型" :disabled="zgButton" clearable>
  214. <el-option
  215. v-for="item in typesList"
  216. :key="item.code"
  217. :label="item.name"
  218. :value="item.code">
  219. </el-option>
  220. </el-select>
  221. </el-form-item>
  222. </el-col>
  223. </el-row>
  224. <el-row :gutter="20" type="flex" justify="start">
  225. <el-col :span="12">
  226. <el-form-item label="通知标题" prop="sndTitle">
  227. <el-input v-model="tongZhiForm.sndTitle" placeholder="请输入通知标题" :disabled="zgButton"></el-input>
  228. </el-form-item>
  229. </el-col>
  230. <el-col :span="12">
  231. <el-form-item label="文号" prop="sndNub">
  232. <el-input v-model="tongZhiForm.sndNub" placeholder="请输入文号" :disabled="zgButton"></el-input>
  233. </el-form-item>
  234. <!--<el-form-item label="整改截止时间" prop="crrtTm">-->
  235. <!--<el-date-picker-->
  236. <!--v-model="tongZhiForm.crrtTm"-->
  237. <!--type="date"-->
  238. <!--value-format="yyyy-MM-dd"-->
  239. <!--placeholder="选择整改截止时间" :disabled="zgButton">-->
  240. <!--</el-date-picker>-->
  241. <!--</el-form-item>-->
  242. </el-col>
  243. </el-row>
  244. <el-row :gutter="20" type="flex" justify="start">
  245. <!--<el-col :span="12">-->
  246. <!--</el-col>-->
  247. <el-col :span="12">
  248. <el-form-item label="接收单位" prop="rectOrgId">
  249. <el-select v-model="tongZhiForm.rectOrgId" placeholder="请选择接收单位" :disabled="zgButton">
  250. <el-option
  251. v-for="item in pidList"
  252. :key="item.orgId"
  253. :label="item.orgNm"
  254. :value="item.orgId">
  255. </el-option>
  256. </el-select>
  257. </el-form-item>
  258. </el-col>
  259. </el-row>
  260. <el-form-item label="备注">
  261. <el-input type="textarea" rows="6" v-model="tongZhiForm.note" clearable placeholder="请输入备注" :disabled="zgButton"></el-input>
  262. </el-form-item>
  263. <el-form-item label="附件">
  264. <div v-show="ifFileList">
  265. <upload
  266. ref="uploadFile"
  267. :url="`/pdcApi/file/insert?bizId=`"
  268. accept=".doc,.docx,.pdf"
  269. @uploadOver="removeNewSupervision"
  270. ></upload>
  271. </div>
  272. <div v-show="!ifFileList">
  273. <el-table
  274. :data="fileListPiCi"
  275. style="width: 100%">
  276. <el-table-column
  277. prop="name"
  278. label="附件名称"
  279. min-width="200">
  280. </el-table-column>
  281. <el-table-column
  282. label="操作"
  283. min-width="150">
  284. <template slot-scope="scope">
  285. <el-button @click="deleteFiles(scope.row)" type="text" size="small" :disabled="zgButton">删除
  286. </el-button>
  287. <el-button type="text" size="small" @click="toPreview(scope.row)">预览</el-button>
  288. </template>
  289. </el-table-column>
  290. </el-table>
  291. </div>
  292. </el-form-item>
  293. </el-form>
  294. <div style="text-align: end;">
  295. <el-button type="primary" @click="tongZhiSave('tongZhiForm')" :disabled="zgButton">保 存</el-button>
  296. </div>
  297. <div v-if="titleText =='查看'">
  298. <el-divider></el-divider>
  299. <el-row :gutter="20" type="flex" style="margin-bottom: 10px;">
  300. <el-col :span="20">
  301. <h3>问责建议</h3>
  302. <!--<el-form :inline="true" size="mini" class="demo-form-inline">-->
  303. <!--<el-form-item label="工程">-->
  304. <!--<el-input v-model="editorForm.name" clearable placeholder="请输入工程" style="width: 8vw"></el-input>-->
  305. <!--</el-form-item>-->
  306. <!--<el-form-item label="问题类别">-->
  307. <!--<el-input v-model="editorForm.inspPblmName" clearable placeholder="请输入问题类别" style="width: 8vw"></el-input>-->
  308. <!--</el-form-item>-->
  309. <!--<el-form-item label="严重程度">-->
  310. <!--<el-select v-model="editorForm.inspPblmCate" clearable placeholder="请选择">-->
  311. <!--<el-option-->
  312. <!--v-for="item in supervisionState"-->
  313. <!--:key="item.value"-->
  314. <!--:label="item.label"-->
  315. <!--:value="item.value"-->
  316. <!--&gt;</el-option>-->
  317. <!--</el-select>-->
  318. <!--</el-form-item>-->
  319. <!--&lt;!&ndash;<el-form-item label="是否典型">&ndash;&gt;-->
  320. <!--&lt;!&ndash;<el-select v-model="editorForm.state" clearable style="width: 8vw">&ndash;&gt;-->
  321. <!--&lt;!&ndash;<el-option label="未下发" value="0"></el-option>&ndash;&gt;-->
  322. <!--&lt;!&ndash;<el-option label="已下发" value="1"></el-option>&ndash;&gt;-->
  323. <!--&lt;!&ndash;<el-option label="已反馈" value="2"></el-option>&ndash;&gt;-->
  324. <!--&lt;!&ndash;</el-select>&ndash;&gt;-->
  325. <!--&lt;!&ndash;</el-form-item>&ndash;&gt;-->
  326. <!--</el-form>-->
  327. </el-col>
  328. <el-col :span="2" :offset=2 style="text-align: end;">
  329. <el-button @click="searchClick" type="success">导出</el-button>
  330. </el-col>
  331. </el-row>
  332. <div class="dialog-body" style="width: 100%;height: 40vh;">
  333. <iframe
  334. v-show="iframeState"
  335. id="iframeEleView"
  336. :src="tableSrc"
  337. frameborder="0"
  338. width="100%"
  339. height="100%"
  340. style="overflow: auto"
  341. ></iframe>
  342. </div>
  343. </div>
  344. </el-dialog>
  345. <!--问责建议-->
  346. <el-dialog title="问责建议" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="50%">
  347. <div class="dialog-body" style="width: 100%;height: 50vh;">
  348. <iframe
  349. v-show="iframeState"
  350. id="iframeEle"
  351. :src="tableSrc"
  352. frameborder="0"
  353. width="100%"
  354. height="100%"
  355. style="overflow: auto"
  356. ></iframe>
  357. </div>
  358. </el-dialog>
  359. </el-main>
  360. <addPblm v-if="addPblmDialog" @closeDialog="closeDialogAddPblm" :RowId="RowId" :supervisionState="supervisionState" :objType="objType" :rectId="rectId"></addPblm>
  361. <!-- 详情弹框 -->
  362. <el-dialog
  363. class="outerDialog custom_dialog"
  364. title="问题详情"
  365. width="60%"
  366. :visible.sync="supervisionDetailsVisible"
  367. v-if="supervisionDetailsVisible"
  368. >
  369. <supervision-details ref="xianqing" :problemId="currentProblemId" :objType="objType"></supervision-details>
  370. <span slot="footer">
  371. <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
  372. </span>
  373. </el-dialog>
  374. </el-container>
  375. </template>
  376. <script>
  377. import request from '@util/gw_ajax_request'
  378. import {dateFormat} from '@util/gw_date';
  379. import {hostUrl} from '@util/global_variable.js'
  380. import addPblm from './addPblm'
  381. export default {
  382. name: "rectificationNotice",
  383. props: [],
  384. data() {
  385. return {
  386. cardHeight: window.innerHeight - 120,
  387. currentPage: 1,
  388. tableData: [],
  389. tableHeight: window.innerHeight - 220,
  390. tableHeight1: window.innerHeight * .2,
  391. loading: false,
  392. pageSize: 20,
  393. pageNum: 1,
  394. dialogFaTitle: "",
  395. formLabelWidth: '120px',
  396. tongZhiForm:{
  397. "sndType": "",//发文类型 '1','小型水库', '2','人饮工程', '3','水毁工程', '4','工程建设', '5','地下水', '7','运行管理', '6','水闸', '9','特定飞检', '10','其他填报', '11','淤地坝', '12','取水口','13','重要水源地', '14','分水及管控', '15','节水管理与评价', '16','用水单位抽查'
  398. "sndTitle": "", //通知标题
  399. "sndNub": "", //通知文号
  400. "rectOrgId": "", //接收单位ID
  401. "rectOrgName": "", //接收单位名称
  402. // "crrtTm": "", //整改截止时间
  403. "note": "", //备注
  404. "persId": "" //插入人ID
  405. },
  406. curStatus: '编辑',
  407. zgButton: false,
  408. zgfkDialog: false,
  409. ifMinistriesAgencies: false,
  410. groupId: '',
  411. addvcd: '',
  412. treeDataLists: [],
  413. defaultExpanded: [],
  414. defaultProps: {
  415. children: 'children',
  416. label: 'pnm'
  417. },
  418. distributeState: false, //false 未下发 true 已下发
  419. dialogFormVisible: false, //上传文件弹窗
  420. dialogFormEditorVisible: false,
  421. gwComFileList: [],
  422. yiShengyiDanList: [],
  423. PblmList:[],
  424. year: '',
  425. province: '',
  426. addForm: {
  427. "state":"", // 状态 0 未下发 1 已下发 2 已反馈 3审核通过 4 驳回 ,
  428. "rectOrgId":"", // 单位 非必须
  429. "year":"", //年度
  430. "sndType": "",
  431. "sndOrgId":localStorage.getItem('currentOrgId')
  432. },
  433. //问责编辑
  434. wenzeForm:{ // 单位 非必须
  435. "year":"", //年度
  436. "sndType": "",
  437. "state": ""
  438. },
  439. editorForm: {
  440. "rectId":null,
  441. "name": null,
  442. "inspPblmName": null,//问题类别
  443. "inspPblmCate": null,//严重程度
  444. },
  445. yearList: [],
  446. pidList: [],
  447. sfType: [
  448. {
  449. label: '是',
  450. value: "1"
  451. },
  452. {
  453. label: '否',
  454. value: "2"
  455. }
  456. ],
  457. titleText: '新建',
  458. header: {
  459. 'persId': localStorage.getItem('userid'),
  460. 'accessToken': localStorage.getItem('accessToken')
  461. },
  462. fileList: [],
  463. provincesList: [],
  464. url: null,
  465. yiShengyiDanRowId: null,
  466. yearBatchSelect: false,
  467. ifFileList: true,
  468. fileListPiCi:[],
  469. PcData: null,
  470. typesList: [],
  471. tongZhiRowId: null,
  472. supervisionState: [
  473. {
  474. value: "0",
  475. label: "一般"
  476. },
  477. {
  478. value: "1",
  479. label: "较重"
  480. },
  481. {
  482. value: "2",
  483. label: "严重"
  484. },
  485. {
  486. value: "3",
  487. label: "特别严重"
  488. }
  489. ],
  490. supervision: [
  491. {
  492. value: "1",
  493. label: "是"
  494. },
  495. {
  496. value: "0",
  497. label: "否"
  498. }
  499. ],
  500. addPblmDialog: false,
  501. RowId: null,
  502. rectId: null,
  503. objType: null,
  504. supervisionDetailsVisible: false,
  505. currentProblemId: null,
  506. TzRules:{
  507. sndType:[{ required: true, message: '督查类型不能为空'}],
  508. sndTitle: [{ required: true, message: '通知标题不能为空'}],
  509. // crrtTm: [{ required: true, message: '整改截止时间不能为空'}],
  510. sndNub: [{ required: true, message: '文号不能为空'}],
  511. rectOrgId: [{ required: true, message: '接收单位不能为空'}],
  512. },
  513. tableSrc: "pageofficePath/dc/pageoffice/zgwz/show?id=",
  514. iframeState: true,
  515. // http://10.1.102.140:9002/dc/pageoffice/zgwz/show?id=bb2562f77de94ab5aa116f5df2141b80
  516. }
  517. },
  518. components: {
  519. upload: resolve => {
  520. require(["@widget/uploadFile.vue"], resolve);
  521. },
  522. addPblm,
  523. //详情页
  524. supervisionDetails: resolve => {
  525. require(["./supervisionDetails.vue"], resolve);
  526. }
  527. },
  528. computed: {
  529. persId() {
  530. return localStorage.getItem("userid")
  531. ? localStorage.getItem("userid")
  532. : "1098101939614724096";
  533. }
  534. },
  535. mounted() {
  536. this.$nextTick(() => {
  537. this.getYear();
  538. this.getByPid();
  539. this.getTypes();
  540. this.getNoticeList();
  541. })
  542. },
  543. methods: {
  544. getYear(){
  545. request.get(`/tac/pblm/rect/getYear/${this.persId}`)
  546. .then(res =>{
  547. if(res.success){
  548. this.yearList = res.data;
  549. }
  550. })
  551. .catch(err =>{
  552. console.log(err);
  553. })
  554. },
  555. getByPid(){
  556. request.get(`/dc/bis/insp/org/getByPid?pid=${localStorage.getItem('currentOrgId')}`)
  557. .then(res =>{
  558. if(res.success){
  559. this.pidList = res.data;
  560. }
  561. })
  562. .catch(err =>{
  563. console.log(err);
  564. })
  565. },
  566. getTypes(){
  567. request.post(`/att/insp/type/getTypes`,{})
  568. .then(res =>{
  569. if(res.success){
  570. this.typesList = res.data;
  571. }
  572. })
  573. },
  574. //-----------------------------------
  575. formatDate(timestamp) {
  576. return timestamp ? dateFormat(timestamp, 'yyyy-MM-dd') : "";
  577. },
  578. changeYear(item) {
  579. let _self = this;
  580. request.get(`tac/pblm/rect/getBatchByYearPersId/${_self.persId}/${item}`)
  581. .then(res =>{
  582. _self.pcList = res.data;
  583. })
  584. .catch(err =>{
  585. console.log(err);
  586. })
  587. if (item == "" || item == undefined) {
  588. _self.pcList = null;
  589. _self.addForm.batch = "";
  590. }
  591. },
  592. lookOver(row) {
  593. this.titleText = "查看";
  594. this.ifFileList = false;
  595. this.RowId = row.id;
  596. this.objType = row.sndType;
  597. this.getPblmList();
  598. request.get(`/bis/insp/rect/province/${row.id}`)
  599. .then(res => {
  600. if (res.success) {
  601. this.tongZhiForm = res.data;
  602. this.tongZhiForm.crrtTm = dateFormat(res.data.crrtTm, "yyyy-MM-dd");
  603. this.dialogFormEditorVisible = true;
  604. this.$nextTick(() => {
  605. let iframe = document.getElementById("iframeEleView");
  606. iframe.src = this.tableSrc + res.data.id;
  607. })
  608. if(res.data.fileName && res.data.filePath && res.data.id){
  609. this.ifFileList = false;
  610. this.fileListPiCi = [];
  611. this.fileListPiCi.push(
  612. Object.assign({},
  613. {'name':res.data.fileName},
  614. {'url':res.data.filePath},
  615. {'id':res.data.id},
  616. {'fileId':res.data.fileId}
  617. )
  618. );
  619. }
  620. this.zgButton = true;
  621. } else {
  622. this.$message.warning(res.message);
  623. }
  624. })
  625. .catch(err => {
  626. console.log(err);
  627. })
  628. },
  629. uploadAfter(data){
  630. let obj = {
  631. "id": this.tongZhiRowId,//数据ID
  632. "fileId": data.id,//附件ID
  633. "fileName": data.fileName,//附件名称
  634. "filePath": data.filePath
  635. }
  636. request.post(`/bis/insp/rect/province/update`,obj)
  637. .then(res =>{
  638. if(res.success){
  639. this.dialogFormVisible = false;
  640. this.$message.success('上传成功');
  641. this.getNoticeList();
  642. }
  643. })
  644. .catch(err =>{
  645. })
  646. },
  647. //获取当前督查对象下问题List
  648. getPblmList() {
  649. let obj = {
  650. "rectId": this.RowId,//通知ID 必须
  651. "name": this.editorForm.name,//工程名称 非必传
  652. "inspPblmName": this.editorForm.inspPblmName,
  653. "inspPblmCate": this.editorForm.inspPblmCate
  654. }
  655. request.post(`/bis/insp/rect/pblm/province/findList`, obj)
  656. .then(res => {
  657. if (res.success) {
  658. this.$nextTick(() => {
  659. this.PblmList = res.data;
  660. this.provincesList = res.data;
  661. })
  662. } else {
  663. this.$message.warning(res.message);
  664. }
  665. })
  666. .catch(err => {
  667. console.log(err);
  668. })
  669. },
  670. addZgTz() {
  671. this.titleText = '新建';
  672. this.zgButton = false;
  673. this.yearBatchSelect = false;
  674. this.dialogFormEditorVisible = true;
  675. this.fileListPiCi = [];
  676. this.ifFileList = true;
  677. for (let obj in this.editorForm) {
  678. this.editorForm[obj] = '';
  679. }
  680. for (let obj in this.tongZhiForm) {
  681. this.tongZhiForm[obj] = '';
  682. }
  683. },
  684. editorRow(row) {
  685. this.PcData = row;
  686. this.titleText = '编辑';
  687. this.zgButton = false;
  688. this.fileListPiCi = [];
  689. this.ifFileList = true;
  690. request.get(`/bis/insp/rect/province/${row.id}`)
  691. .then(res => {
  692. if (res.success) {
  693. this.$nextTick(()=>{
  694. this.tongZhiForm = res.data;
  695. this.tongZhiForm.crrtTm = dateFormat(res.data.crrtTm, "yyyy-MM-dd");
  696. this.dialogFormEditorVisible = true;
  697. if(res.data.fileName && res.data.filePath && res.data.id){
  698. this.ifFileList = false;
  699. this.fileListPiCi.push(
  700. Object.assign({},
  701. {'name':res.data.fileName},
  702. {'url':res.data.filePath},
  703. {'id':res.data.id},
  704. {'fileId':res.data.fileId}
  705. )
  706. );
  707. }
  708. })
  709. } else {
  710. this.$message.warning(res.message);
  711. }
  712. })
  713. .catch(err => {
  714. console.log(err);
  715. })
  716. },
  717. //问责通知
  718. addPblmRow(row){
  719. this.RowId = row.id;
  720. this.rectId = row.rectOrgId;
  721. this.objType = row.sndType;
  722. this.addPblmDialog = true;
  723. },
  724. deleteRow(row) {
  725. this.$confirm('确定要删除该数据, 是否继续?', '提示', {
  726. confirmButtonText: '确定',
  727. cancelButtonText: '取消',
  728. type: 'warning'
  729. }).then(() => {
  730. request.post(`/bis/insp/rect/province/delete/${row.id}`)
  731. .then(res => {
  732. if (res.success) {
  733. this.$message.success("删除成功");
  734. this.getNoticeList();
  735. } else {
  736. this.$message.warning(res.message);
  737. }
  738. })
  739. .catch(err => {
  740. console.log(err);
  741. })
  742. }).catch(() => {
  743. this.$message({
  744. type: 'info',
  745. message: '已取消删除'
  746. });
  747. });
  748. },
  749. xiaFaClick(row) {
  750. this.$confirm('下发后通知内容无法更改?', '提示', {
  751. confirmButtonText: '确定',
  752. cancelButtonText: '取消',
  753. type: 'warning'
  754. }).then(() => {
  755. let obj = {
  756. "id": row.id,
  757. "persId": this.persId,
  758. "state": "1"
  759. }
  760. request.post(`/bis/insp/rect/province/update`, obj)
  761. .then(res => {
  762. if (res.success) {
  763. this.$message.success("下发成功");
  764. this.getNoticeList();
  765. } else {
  766. this.$message.warning(res.message);
  767. }
  768. })
  769. }).catch(() => {
  770. this.$message({
  771. type: 'info',
  772. message: '已取消下发'
  773. });
  774. });
  775. },
  776. //通知List
  777. getNoticeList() {
  778. let obj = this.addForm;
  779. request.post(`/bis/insp/rect/province/findList`, obj)
  780. .then(res => {
  781. if (res.success) {
  782. this.tableData = res.data;
  783. }
  784. })
  785. .catch(err => {
  786. console.log(err);
  787. })
  788. },
  789. // 通知保存
  790. tongZhiSave(formName) {
  791. if (this.titleText == '新建') {
  792. this.$refs[formName].validate((valid) => {
  793. if (valid) {
  794. let obj = this.tongZhiForm;
  795. obj.persId = localStorage.getItem("userid");
  796. request.post('/bis/insp/rect/province/add', obj).then((res) => {
  797. if (res.success) {
  798. this.tongZhiRowId = res.data.id;
  799. this.$nextTick(function () {
  800. if (this.$refs.uploadFile.submitUpload(res.data.id)) {
  801. this.removeNewSupervision();
  802. this.$message.success('新建通知成功');
  803. }
  804. })
  805. } else {
  806. this.$message.warning(res.message);
  807. }
  808. })
  809. } else {
  810. console.log('error submit!!');
  811. return false;
  812. }
  813. });
  814. } else if (this.titleText == '编辑') {
  815. this.$refs[formName].validate((valid) => {
  816. if (valid) {
  817. let obj = this.tongZhiForm;
  818. obj.persId = localStorage.getItem("userid");
  819. request.post('/bis/insp/rect/province/update', obj).then((res) => {
  820. if (res.success) {
  821. this.tongZhiRowId = res.data.id;
  822. this.$nextTick(() => {
  823. if (this.$refs.uploadFile.submitUpload(res.data.id)) {
  824. this.removeNewSupervision();
  825. this.$message.success('编辑通知成功');
  826. }
  827. })
  828. } else {
  829. this.$message.warning(res.message);
  830. }
  831. })
  832. } else {
  833. console.log('error submit!!');
  834. return false;
  835. }
  836. });
  837. }
  838. },
  839. searchClick() {
  840. this.$nextTick(() => {
  841. this.getPblmList();
  842. })
  843. },
  844. // dialog通知弹窗关闭
  845. closeDialog(){
  846. this.getNoticeList();
  847. },
  848. removeNewSupervision(arg) {
  849. if(arg){
  850. console.log(arg);
  851. let data = arg[arg.length - 1];
  852. this.uploadAfter(data);
  853. }
  854. },
  855. // 文件预览
  856. rowPreview(row){
  857. window.open(`${hostUrl}${row.filePath}`, "_blank");
  858. },
  859. //批次预览
  860. toPreview(row) {
  861. window.open(`${hostUrl}${row.url}`, "_blank");
  862. },
  863. //删除批次附件
  864. deleteFiles(row) {
  865. this.$confirm('确定删除该附件吗?', '提示', {
  866. confirmButtonText: '确定',
  867. cancelButtonText: '取消',
  868. type: 'warning'
  869. }).then(() => {
  870. request.post(`/bis/insp/rect/province/setFileNull/${row.fileId}`).then(res => {
  871. if (res.success) {
  872. this.fileListPiCi = [];
  873. this.ifFileList = true;
  874. this.$message.success('附件删除成功');
  875. }
  876. })
  877. }).catch(() => {
  878. })
  879. },
  880. //删除下发附件
  881. deleteFile(rowId){
  882. request.post(`/tac/pblm/rect/org/setFileNull/${rowId}`)
  883. .then(res =>{
  884. if(res.success){
  885. this.$message({
  886. type: 'success',
  887. message: '删除成功'
  888. })
  889. this.getYiShengYiDanList();
  890. }else{
  891. this.$message.warning(res.message);
  892. }
  893. })
  894. },
  895. //文件删除
  896. rowDelete(row){
  897. return this.$confirm(`确定移除 ${row.fileName}?`).then(() => {
  898. if(row.fileId){
  899. request.post(`/file/${row.fileId}`).then((res) => {
  900. if (res.success) {
  901. this.deleteFile(row.id);
  902. } else {
  903. this.$alert("删除失败!", '提示', {
  904. confirmButtonText: '确定',
  905. type: 'warning'
  906. })
  907. }
  908. })
  909. }else{
  910. this.$message.warning('fileId不能为空');
  911. }
  912. }).catch(() => {
  913. this.$message({
  914. type: 'info',
  915. message: '已取消删除'
  916. });
  917. });
  918. }
  919. ,
  920. //通知查询
  921. searchNotice(){
  922. this.getNoticeList();
  923. },
  924. select_handler_province() {
  925. this.$nextTick(() => {
  926. this.tongZhiForm.rectOrgName = this.$refs.selectProvince.selectedLabel;
  927. });
  928. },
  929. typesListFy(row){
  930. if(row){
  931. this.typesList.forEach(ele => {
  932. if (ele.code == row) {
  933. row = ele.name;
  934. }
  935. });
  936. return row;
  937. }else{
  938. return '';
  939. }
  940. },
  941. // 通知表格里附件预览
  942. previewAttachment(row){
  943. window.open(`${hostUrl}${row.filePath}`, "_blank");
  944. },
  945. closeDialogAddPblm(){
  946. this.addPblmDialog = false;
  947. },
  948. //问题查看
  949. toViewRow(row){
  950. this.currentProblemId = row.pblmId;
  951. this.supervisionDetailsVisible = true;
  952. },
  953. //问责建议
  954. wzJyClick(row){
  955. this.dialogFormVisible = true;
  956. this.$nextTick(() => {
  957. let iframe = document.getElementById("iframeEle");
  958. iframe.src = this.tableSrc + row.id;
  959. })
  960. }
  961. },
  962. watch: {
  963. // 'addForm': {
  964. // deep: true,
  965. // handler: function () {
  966. // this.getNoticeList();
  967. // }
  968. // }
  969. }
  970. }
  971. </script>
  972. <style lang="scss">
  973. .rectify_reform{
  974. .inspPblmCate{
  975. padding: 2px 10px;
  976. color: #fff;
  977. -webkit-border-radius: 10px;
  978. -moz-border-radius: 10px;
  979. border-radius: 10px;
  980. }
  981. .notice_title{
  982. .el-input--mini .el-input__inner,.el-select-dropdown__list{
  983. width: 8vw;
  984. }
  985. }
  986. .wenze_title{
  987. .el-input--mini .el-input__inner,.el-select-dropdown__list{
  988. width: 6vw;
  989. }
  990. }
  991. .rowClassP{
  992. span {
  993. color: #3399ff;
  994. margin-left: 15px;
  995. cursor: pointer;
  996. }
  997. span:first-child{
  998. cursor: default;
  999. margin-left: 0;
  1000. color: rgb(51, 51, 51);
  1001. }
  1002. span:last-child{
  1003. color: red;
  1004. }
  1005. }
  1006. }
  1007. </style>