5fedcce1dfb4966bf401cc72a11936daeb140a1f.svn-base 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  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": "008",//发文类型 '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": "008",
  431. "sndOrgId":localStorage.getItem('currentOrgId')
  432. },
  433. //问责编辑
  434. wenzeForm:{ // 单位 非必须
  435. "year":"", //年度
  436. "sndType": "008",
  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. this.tongZhiForm.sndType = "008"
  684. },
  685. editorRow(row) {
  686. this.PcData = row;
  687. this.titleText = '编辑';
  688. this.zgButton = false;
  689. this.fileListPiCi = [];
  690. this.ifFileList = true;
  691. request.get(`/bis/insp/rect/province/${row.id}`)
  692. .then(res => {
  693. if (res.success) {
  694. this.$nextTick(()=>{
  695. this.tongZhiForm = res.data;
  696. this.tongZhiForm.crrtTm = dateFormat(res.data.crrtTm, "yyyy-MM-dd");
  697. this.dialogFormEditorVisible = true;
  698. if(res.data.fileName && res.data.filePath && res.data.id){
  699. this.ifFileList = false;
  700. this.fileListPiCi.push(
  701. Object.assign({},
  702. {'name':res.data.fileName},
  703. {'url':res.data.filePath},
  704. {'id':res.data.id},
  705. {'fileId':res.data.fileId}
  706. )
  707. );
  708. }
  709. })
  710. } else {
  711. this.$message.warning(res.message);
  712. }
  713. })
  714. .catch(err => {
  715. console.log(err);
  716. })
  717. },
  718. //问责通知
  719. addPblmRow(row){
  720. this.RowId = row.id;
  721. this.rectId = row.rectOrgId;
  722. this.objType = row.sndType;
  723. this.addPblmDialog = true;
  724. },
  725. deleteRow(row) {
  726. this.$confirm('确定要删除该数据, 是否继续?', '提示', {
  727. confirmButtonText: '确定',
  728. cancelButtonText: '取消',
  729. type: 'warning'
  730. }).then(() => {
  731. request.post(`/bis/insp/rect/province/delete/${row.id}`)
  732. .then(res => {
  733. if (res.success) {
  734. this.$message.success("删除成功");
  735. this.getNoticeList();
  736. } else {
  737. this.$message.warning(res.message);
  738. }
  739. })
  740. .catch(err => {
  741. console.log(err);
  742. })
  743. }).catch(() => {
  744. this.$message({
  745. type: 'info',
  746. message: '已取消删除'
  747. });
  748. });
  749. },
  750. xiaFaClick(row) {
  751. this.$confirm('下发后通知内容无法更改?', '提示', {
  752. confirmButtonText: '确定',
  753. cancelButtonText: '取消',
  754. type: 'warning'
  755. }).then(() => {
  756. let obj = {
  757. "id": row.id,
  758. "persId": this.persId,
  759. "state": "1"
  760. }
  761. request.post(`/bis/insp/rect/province/update`, obj)
  762. .then(res => {
  763. if (res.success) {
  764. this.$message.success("下发成功");
  765. this.getNoticeList();
  766. } else {
  767. this.$message.warning(res.message);
  768. }
  769. })
  770. }).catch(() => {
  771. this.$message({
  772. type: 'info',
  773. message: '已取消下发'
  774. });
  775. });
  776. },
  777. //通知List
  778. getNoticeList() {
  779. let obj = this.addForm;
  780. request.post(`/bis/insp/rect/province/findList`, obj)
  781. .then(res => {
  782. if (res.success) {
  783. this.tableData = res.data;
  784. }
  785. })
  786. .catch(err => {
  787. console.log(err);
  788. })
  789. },
  790. // 通知保存
  791. tongZhiSave(formName) {
  792. if (this.titleText == '新建') {
  793. this.$refs[formName].validate((valid) => {
  794. if (valid) {
  795. let obj = this.tongZhiForm;
  796. obj.persId = localStorage.getItem("userid");
  797. if(this.pidList && this.pidList.length>0){
  798. this.pidList.forEach((item)=>{
  799. if(obj.rectOrgId==item.orgId){
  800. obj.rectOrgName = item.orgNm
  801. }
  802. })
  803. }
  804. request.post('/bis/insp/rect/province/add', obj).then((res) => {
  805. if (res.success) {
  806. this.tongZhiRowId = res.data.id;
  807. this.$nextTick(function () {
  808. if (this.$refs.uploadFile.submitUpload(res.data.id)) {
  809. this.removeNewSupervision();
  810. this.$message.success('新建通知成功');
  811. }
  812. })
  813. } else {
  814. this.$message.warning(res.message);
  815. }
  816. })
  817. } else {
  818. console.log('error submit!!');
  819. return false;
  820. }
  821. });
  822. } else if (this.titleText == '编辑') {
  823. this.$refs[formName].validate((valid) => {
  824. if (valid) {
  825. let obj = this.tongZhiForm;
  826. obj.persId = localStorage.getItem("userid");
  827. request.post('/bis/insp/rect/province/update', obj).then((res) => {
  828. if (res.success) {
  829. this.tongZhiRowId = res.data.id;
  830. this.$nextTick(() => {
  831. if (this.$refs.uploadFile.submitUpload(res.data.id)) {
  832. this.removeNewSupervision();
  833. this.$message.success('编辑通知成功');
  834. }
  835. })
  836. } else {
  837. this.$message.warning(res.message);
  838. }
  839. })
  840. } else {
  841. console.log('error submit!!');
  842. return false;
  843. }
  844. });
  845. }
  846. },
  847. searchClick() {
  848. this.$nextTick(() => {
  849. this.getPblmList();
  850. })
  851. },
  852. // dialog通知弹窗关闭
  853. closeDialog(){
  854. this.getNoticeList();
  855. },
  856. removeNewSupervision(arg) {
  857. if(arg){
  858. console.log(arg);
  859. let data = arg[arg.length - 1];
  860. this.uploadAfter(data);
  861. }
  862. },
  863. // 文件预览
  864. rowPreview(row){
  865. window.open(`${hostUrl}${row.filePath}`, "_blank");
  866. },
  867. //批次预览
  868. toPreview(row) {
  869. window.open(`${hostUrl}${row.url}`, "_blank");
  870. },
  871. //删除批次附件
  872. deleteFiles(row) {
  873. this.$confirm('确定删除该附件吗?', '提示', {
  874. confirmButtonText: '确定',
  875. cancelButtonText: '取消',
  876. type: 'warning'
  877. }).then(() => {
  878. request.post(`/bis/insp/rect/province/setFileNull/${row.fileId}`).then(res => {
  879. if (res.success) {
  880. this.fileListPiCi = [];
  881. this.ifFileList = true;
  882. this.$message.success('附件删除成功');
  883. }
  884. })
  885. }).catch(() => {
  886. })
  887. },
  888. //删除下发附件
  889. deleteFile(rowId){
  890. request.post(`/tac/pblm/rect/org/setFileNull/${rowId}`)
  891. .then(res =>{
  892. if(res.success){
  893. this.$message({
  894. type: 'success',
  895. message: '删除成功'
  896. })
  897. this.getYiShengYiDanList();
  898. }else{
  899. this.$message.warning(res.message);
  900. }
  901. })
  902. },
  903. //文件删除
  904. rowDelete(row){
  905. return this.$confirm(`确定移除 ${row.fileName}?`).then(() => {
  906. if(row.fileId){
  907. request.post(`/file/${row.fileId}`).then((res) => {
  908. if (res.success) {
  909. this.deleteFile(row.id);
  910. } else {
  911. this.$alert("删除失败!", '提示', {
  912. confirmButtonText: '确定',
  913. type: 'warning'
  914. })
  915. }
  916. })
  917. }else{
  918. this.$message.warning('fileId不能为空');
  919. }
  920. }).catch(() => {
  921. this.$message({
  922. type: 'info',
  923. message: '已取消删除'
  924. });
  925. });
  926. }
  927. ,
  928. //通知查询
  929. searchNotice(){
  930. this.getNoticeList();
  931. },
  932. select_handler_province() {
  933. this.$nextTick(() => {
  934. this.tongZhiForm.rectOrgName = this.$refs.selectProvince.selectedLabel;
  935. });
  936. },
  937. typesListFy(row){
  938. if(row){
  939. this.typesList.forEach(ele => {
  940. if (ele.code == row) {
  941. row = ele.name;
  942. }
  943. });
  944. return row;
  945. }else{
  946. return '';
  947. }
  948. },
  949. // 通知表格里附件预览
  950. previewAttachment(row){
  951. window.open(`${hostUrl}${row.filePath}`, "_blank");
  952. },
  953. closeDialogAddPblm(){
  954. this.addPblmDialog = false;
  955. },
  956. //问题查看
  957. toViewRow(row){
  958. this.currentProblemId = row.pblmId;
  959. this.supervisionDetailsVisible = true;
  960. },
  961. //问责建议
  962. wzJyClick(row){
  963. this.dialogFormVisible = true;
  964. this.$nextTick(() => {
  965. let iframe = document.getElementById("iframeEle");
  966. iframe.src = this.tableSrc + row.id;
  967. })
  968. }
  969. },
  970. watch: {
  971. // 'addForm': {
  972. // deep: true,
  973. // handler: function () {
  974. // this.getNoticeList();
  975. // }
  976. // }
  977. }
  978. }
  979. </script>
  980. <style lang="scss">
  981. .rectify_reform{
  982. .inspPblmCate{
  983. padding: 2px 10px;
  984. color: #fff;
  985. -webkit-border-radius: 10px;
  986. -moz-border-radius: 10px;
  987. border-radius: 10px;
  988. }
  989. .notice_title{
  990. .el-input--mini .el-input__inner,.el-select-dropdown__list{
  991. width: 8vw;
  992. }
  993. }
  994. .wenze_title{
  995. .el-input--mini .el-input__inner,.el-select-dropdown__list{
  996. width: 6vw;
  997. }
  998. }
  999. .rowClassP{
  1000. span {
  1001. color: #3399ff;
  1002. margin-left: 15px;
  1003. cursor: pointer;
  1004. }
  1005. span:first-child{
  1006. cursor: default;
  1007. margin-left: 0;
  1008. color: rgb(51, 51, 51);
  1009. }
  1010. span:last-child{
  1011. color: red;
  1012. }
  1013. }
  1014. }
  1015. </style>