801b81de5f0d7a32b940fa2f65448d8d739b0346.svn-base 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959
  1. <template>
  2. <el-container class="monthReport">
  3. <!-- <el-dialog title="监督检查实施情况月报" width="90%" :visible.sync="monthDialogVisible" modal-append-to-body append-to-body :before-close="closeDialog">-->
  4. <el-card class="box-card" :style="{'height': cardHeight + 'px','overflow-y':'auto'}">
  5. <h2 class="title_monthReport">监督检查实施情况月报</h2>
  6. <el-form :inline="true" size="mini" class="demo-form-inline" label-width="120px">
  7. <el-form-item label="是否计划内" >
  8. <el-select v-model="searchForm.isPlanned" placeholder="是否计划内" clearable>
  9. <el-option label="是" value="1"></el-option>
  10. <el-option label="否" value="2"></el-option>
  11. </el-select>
  12. </el-form-item>
  13. <el-form-item label="检查事项名称" label-width="120px">
  14. <el-input v-model="searchForm.chkName" placeholder="检查事项名称" clearable></el-input>
  15. </el-form-item>
  16. <el-form-item label="年月">
  17. <el-date-picker
  18. v-model="searchForm.chkMonth"
  19. type="month"
  20. value-format="yyyy-MM"
  21. format="yyyy-MM"
  22. placeholder="选择月">
  23. </el-date-picker>
  24. </el-form-item>
  25. <!-- <el-form-item label="开展时间">-->
  26. <!-- <el-date-picker-->
  27. <!-- v-model="dateRange"-->
  28. <!-- type="daterange"-->
  29. <!-- format="yyyy-MM-dd"-->
  30. <!-- clearable-->
  31. <!-- value-format="yyyy-MM-dd"-->
  32. <!-- range-separator="至"-->
  33. <!-- start-placeholder="开始日期"-->
  34. <!-- end-placeholder="结束日期">-->
  35. <!-- </el-date-picker>-->
  36. <!-- </el-form-item>-->
  37. <!-- <el-form-item label="处室、单位">-->
  38. <!-- <el-input v-model="searchForm.leadDep" placeholder="处室、单位" clearable></el-input>-->
  39. <!-- </el-form-item>-->
  40. <el-form-item label="检查形式">
  41. <el-select v-model="searchForm.chkForm" placeholder="检查形式" clearable>
  42. <el-option v-for="item in chkFormArr" :label="item.label" :value="item.value"></el-option>
  43. </el-select>
  44. <el-button type="primary" size="mini" @click="searchBtn" style="margin-left: 10px;">查询</el-button>
  45. </el-form-item>
  46. <el-form-item style="float:right;">
  47. <el-button type="primary" size="mini" @click="addBtn" v-if="ownPriv('manage')">添加</el-button>
  48. <el-button type="primary" size="mini" @click="exportExcel">导出</el-button>
  49. <el-button type="primary" size="mini" @click="exportNextExcel">导出下月计划</el-button>
  50. </el-form-item>
  51. </el-form>
  52. <div>
  53. <el-table
  54. border
  55. ref="table"
  56. :height="tableHeight"
  57. show-summary
  58. :summary-method="getSummaries"
  59. :data="tableData"
  60. tooltip-effect="dark"
  61. style="width: 100%"
  62. v-loading="loading">
  63. <el-table-column align="center" type="index" label="序号" width="80">
  64. <template slot-scope="scope">{{ (pageNum - 1) * pageSize + (scope.$index + 1) }}</template>
  65. </el-table-column>
  66. <el-table-column
  67. header-align="center"
  68. align="center"
  69. width="100"
  70. label="是否计划内"
  71. show-overflow-tooltip>
  72. <template slot-scope="scope">
  73. {{scope.row.isPlanned=='1'?'是':'否'}}
  74. </template>
  75. </el-table-column>
  76. <el-table-column
  77. header-align="center"
  78. align="center"
  79. width="200"
  80. prop="chkName"
  81. label="检查事项名称"
  82. show-overflow-tooltip
  83. >
  84. <template slot-scope="scope">
  85. {{scope.row.isPlanned=='1'?scope.row.chkName: scope.row.unplannedChkNm}}
  86. </template>
  87. </el-table-column>
  88. <el-table-column
  89. header-align="center"
  90. align="center"
  91. width="80"
  92. prop="chkMnth"
  93. :formatter="formatDateMonth"
  94. label="年月"
  95. show-overflow-tooltip
  96. ></el-table-column>
  97. <el-table-column
  98. header-align="center"
  99. align="center"
  100. min-width="120"
  101. prop="leadDep"
  102. label="处室、单位"
  103. show-overflow-tooltip
  104. ></el-table-column>
  105. <el-table-column
  106. header-align="center"
  107. align="center"
  108. prop="chkNote"
  109. min-width="180"
  110. label="当月监督检查开展情况"
  111. show-overflow-tooltip
  112. ></el-table-column>
  113. <el-table-column
  114. header-align="center"
  115. align="center"
  116. min-width="80"
  117. prop="chkFormNm"
  118. label="检查形式"
  119. show-overflow-tooltip
  120. ></el-table-column>
  121. <el-table-column
  122. header-align="center"
  123. align="center"
  124. width="80"
  125. prop="chkGroup"
  126. label="检查组次"
  127. show-overflow-tooltip
  128. ></el-table-column>
  129. <el-table-column
  130. header-align="center"
  131. align="center"
  132. prop="chkPers"
  133. width="80"
  134. label="检查人次"
  135. show-overflow-tooltip
  136. ></el-table-column>
  137. <el-table-column
  138. header-align="center"
  139. align="center"
  140. width="80"
  141. prop="chkPblm"
  142. label="检查发现问题数"
  143. show-overflow-tooltip
  144. ></el-table-column>
  145. <el-table-column
  146. header-align="center"
  147. align="center"
  148. width="100"
  149. prop="chkLeder"
  150. label="厅领导参加检查人次"
  151. show-overflow-tooltip
  152. ></el-table-column>
  153. <el-table-column
  154. header-align="center"
  155. align="center"
  156. width="80"
  157. prop="trainNum"
  158. label="当月培训期次"
  159. show-overflow-tooltip
  160. ></el-table-column>
  161. <el-table-column
  162. header-align="center"
  163. align="center"
  164. width="80"
  165. prop="trainPers"
  166. label="参加培训人数"
  167. show-overflow-tooltip
  168. ></el-table-column>
  169. <el-table-column
  170. header-align="center"
  171. align="center"
  172. min-width="120"
  173. prop="nextSttm"
  174. :formatter="formatDate"
  175. label="下一月开始时间"
  176. show-overflow-tooltip
  177. ></el-table-column>
  178. <el-table-column
  179. header-align="center"
  180. align="center"
  181. min-width="120"
  182. prop="nextEntm"
  183. :formatter="formatDate"
  184. label="下一月结束时间"
  185. show-overflow-tooltip
  186. ></el-table-column>
  187. <el-table-column
  188. header-align="center"
  189. align="center"
  190. min-width="200"
  191. prop="addvnm"
  192. label="检查地点"
  193. show-overflow-tooltip
  194. ></el-table-column>
  195. <el-table-column
  196. header-align="center"
  197. align="center"
  198. prop="isFinish"
  199. width="100"
  200. :formatter="isFFormat"
  201. label="年度监督检查完成情况"
  202. show-overflow-tooltip
  203. ></el-table-column>
  204. <el-table-column
  205. align="center"
  206. min-width="260"
  207. v-if="ownPriv('manage')"
  208. label="操作"
  209. fixed="right">
  210. <template slot-scope="scope">
  211. <!-- <el-button type="success" size="mini" @click.stop="lookOver(scope.row)">查看</el-button>-->
  212. <el-button type="success" size="mini" @click.stop="edit(scope.row)">编辑</el-button>
  213. <el-button type="danger" size="mini" @click.stop="deleteData(scope.row.id)">删除</el-button>
  214. </template>
  215. </el-table-column>
  216. </el-table>
  217. </div>
  218. </el-card>
  219. <el-dialog
  220. class="outerDialog custom_dialog"
  221. :title="dialogT+'监督检查实施情况月报'"
  222. width="45%"
  223. modal-append-to-body
  224. append-to-body
  225. @close="closeAddDialog"
  226. v-if="addDialogVisible"
  227. :visible.sync="addDialogVisible">
  228. <div style="width: 100%;height:100%;">
  229. <el-form ref="addForm" label-width="200px">
  230. <el-form-item label="是否计划内" required>
  231. <el-select v-model="addForm.isPlanned" placeholder="是否计划内">
  232. <el-option label="是" value="1"></el-option>
  233. <el-option label="否" value="2"></el-option>
  234. </el-select>
  235. </el-form-item>
  236. <el-form-item label="年度" required v-if="addForm.isPlanned=='1'">
  237. <el-date-picker
  238. v-model="chkYear"
  239. type="year"
  240. @change="changeDate"
  241. format="yyyy"
  242. value-format="yyyy"
  243. placeholder="选择年度">
  244. </el-date-picker>
  245. </el-form-item>
  246. <el-form-item label="检查事项名称" required v-if="addForm.isPlanned=='1'">
  247. <el-select
  248. filterable
  249. v-model="addForm.chkYearId"
  250. @change="getYearList"
  251. placeholder="请选择检查事项">
  252. <el-option
  253. v-for="item in yearPlanDepList"
  254. :key="item.id"
  255. :label="item.chkName"
  256. :value="item.id">
  257. </el-option>
  258. </el-select>
  259. </el-form-item>
  260. <el-form-item label="检查内容" v-if="addForm.isPlanned=='1'">
  261. <el-input type="textarea" v-model="objParent.chkContent" placeholder="请输入检查内容"></el-input>
  262. </el-form-item>
  263. <el-form-item label="计划外开展名称" required v-if="addForm.isPlanned=='2'">
  264. <el-input type="text" v-model="addForm.unplannedChkNm" clearable placeholder="请输入计划外开展名称" style="width: 70%"></el-input>
  265. </el-form-item>
  266. <el-form-item label="年月" required>
  267. <el-date-picker
  268. v-model="addForm.chkMnth"
  269. type="month"
  270. fotmat="yyyy-MM"
  271. placeholder="选择年月">
  272. </el-date-picker>
  273. </el-form-item>
  274. <el-form-item label="处室、单位" required>
  275. <el-input type="text" v-model="addForm.leadDep" clearable placeholder="请输入处室、单位" style="width: 70%"></el-input>
  276. </el-form-item>
  277. <!-- <el-form-item label="名称" required>-->
  278. <!-- <el-select v-model="objTypeList" multiple collapse-tags placeholder="名称" clearable style="width: 70%">-->
  279. <!-- <el-option-->
  280. <!-- v-for="item in dcTypeList"-->
  281. <!-- :key="item.code"-->
  282. <!-- :label="item.inspName"-->
  283. <!-- :value="item.inspType">-->
  284. <!-- </el-option>-->
  285. <!-- </el-select>-->
  286. <!-- </el-form-item>-->
  287. <el-form-item label="当月监督检查开展情况">
  288. <el-input type="textarea" v-model="addForm.chkNote" placeholder="请输入当月监督检查开展情况" clearable style="width: 70%"></el-input>
  289. </el-form-item>
  290. <el-form-item label="检查形式">
  291. <el-select v-model="addForm.chkForm" placeholder="请选择检查形式" clearable style="width: 70%">
  292. <el-option v-for="item in chkFormArr" :label="item.label" :value="item.value"></el-option>
  293. </el-select>
  294. </el-form-item>
  295. <el-form-item label="检查组次">
  296. <el-input-number v-model="addForm.chkGroup" placeholder="请输入检查组次" clearable style="width: 70%"></el-input-number>
  297. </el-form-item>
  298. <el-form-item label="检查人次">
  299. <el-input-number v-model="addForm.chkPers" placeholder="请输入检查人次" clearable style="width: 70%"></el-input-number>
  300. </el-form-item>
  301. <el-form-item label="检查发现问题数">
  302. <el-input-number v-model="addForm.chkPblm" placeholder="请输入检查发现问题数" clearable style="width: 70%"></el-input-number>
  303. </el-form-item>
  304. <el-form-item label="厅领导参加检查人次">
  305. <el-input-number v-model="addForm.chkLeder" placeholder="请输入厅领导参加检查人次" clearable style="width: 70%"></el-input-number>
  306. </el-form-item>
  307. <el-form-item label="当月培训期次">
  308. <el-input-number v-model="addForm.trainNum" placeholder="请输入当月培训期次" clearable style="width: 70%"></el-input-number>
  309. </el-form-item>
  310. <el-form-item label="参加培训人数">
  311. <el-input-number v-model="addForm.trainPers" placeholder="请输入参加培训人数" clearable style="width: 70%"></el-input-number>
  312. </el-form-item>
  313. <el-form-item label="下月计划时间">
  314. <el-date-picker
  315. v-model="dateRange1"
  316. style="width: 70%"
  317. type="daterange"
  318. format="yyyy-MM-dd"
  319. clearable
  320. range-separator="至"
  321. start-placeholder="下月开始日期"
  322. end-placeholder="下月结束日期">
  323. </el-date-picker>
  324. </el-form-item>
  325. <el-form-item label="下月检查区域">
  326. <addvSelectMul key="city" ref="city" @changeAddv="changeAddv" :isCity="true"></addvSelectMul>
  327. </el-form-item>
  328. <!-- <el-form-item label="下一月计划">-->
  329. <!-- <el-input type="textarea" v-model="addForm.nextPlan" placeholder="请输入下一月计划" clearable style="width: 70%"></el-input>-->
  330. <!-- </el-form-item>-->
  331. <el-form-item label="年度监督检查完成情况">
  332. <el-radio-group v-model="addForm.isFinish">
  333. <el-radio label="1">完成</el-radio>
  334. <el-radio label="0">否</el-radio>
  335. </el-radio-group>
  336. </el-form-item>
  337. <el-form-item label="备注">
  338. <el-input type="textarea" v-model="addForm.note" placeholder="请输入备注" clearable style="width: 70%"></el-input>
  339. </el-form-item>
  340. <el-form-item style="text-align: center">
  341. <el-button type="primary" @click="addSubmit" style="margin-bottom: 30px;">确定</el-button>
  342. </el-form-item>
  343. </el-form>
  344. </div>
  345. </el-dialog>
  346. <el-dialog
  347. class="outerDialog custom_dialog"
  348. :title="'监督进度月报详细'"
  349. width="40%"
  350. modal-append-to-body
  351. append-to-body
  352. @close="closeDetailDialog"
  353. v-if="detailDialogVisible"
  354. :visible.sync="detailDialogVisible">
  355. <div style="width: 100%;height:100%;overflow: auto;">
  356. <table>
  357. <tr><td>监督检查事项</td><td>{{detailObj.objTypeNm}}</td></tr>
  358. <tr><td>组织处室(单位)</td><td>{{detailObj.leadDep}}</td></tr>
  359. <tr><td>开展方式</td><td>{{detailObj.chkFormNm}}</td></tr>
  360. <tr><td>计划开展时间</td><td>{{detailObj.tm}}</td></tr>
  361. <tr><td>检查组次</td><td>{{detailObj.chkGroup}}</td></tr>
  362. <tr><td>检查人次</td><td>{{detailObj.chkPers}}</td></tr>
  363. <tr><td>厅领导参加检查人次</td><td>{{detailObj.chkLeder}}</td></tr>
  364. <tr><td>监督检查开展情况</td><td>{{detailObj.chkNote}}</td></tr>
  365. <tr><td>检查发现问题数</td><td>{{detailObj.chkPblm}}</td></tr>
  366. <tr><td>当月培训期次</td><td>{{detailObj.trainNum}}</td></tr>
  367. <tr><td>参加培训人数</td><td>{{detailObj.trainPers}}</td></tr>
  368. <tr><td>是否完成年度计划</td><td>{{detailObj.isFinish=='1'?'是':'否'}}</td></tr>
  369. <tr v-if="detailObj.isFinish==='0'"><td>下一月计划</td><td>{{detailObj.nextPlan}}</td></tr>
  370. <tr><td>备注</td><td>{{detailObj.note}}</td></tr>
  371. </table>
  372. </div>
  373. </el-dialog>
  374. <!-- </el-dialog>-->
  375. </el-container>
  376. </template>
  377. <script>
  378. import {exportModel} from "@util/gw_exportModel";
  379. import request from '@util/gw_ajax_request'
  380. import receiver from "./receiver"
  381. import addvSelectMul from "../../../widgets/addvSelectMulNew.vue"
  382. export default {
  383. name: "",
  384. props: [],
  385. data() {
  386. return {
  387. detailObj:{},
  388. chkFormArr:[{
  389. label:"暗访",
  390. value:"1"
  391. },{
  392. label:"明查",
  393. value:"2"
  394. },{
  395. label:"书面",
  396. value:"3"
  397. },{
  398. label:"四不两直",
  399. value:"4"
  400. },{
  401. label:"明查暗访相结合",
  402. value:"5"
  403. }],
  404. objTypeParam:[],
  405. objTypeList:[],
  406. chkFormParam:[],
  407. chkFormList:[],
  408. cardHeight: window.innerHeight - 130,
  409. dcTypeList:[],
  410. detailDialogVisible:false,
  411. dateRange:[],
  412. dateRange1:[],
  413. dialogT:"",
  414. monthDialogVisible:true,
  415. addDialogVisible:false,
  416. tableHeight:window.innerHeight-300,
  417. tableData:[],
  418. loading:false,
  419. pageNum:1,
  420. pageSize:10,
  421. total:0,
  422. searchForm:{
  423. isPlanned:"",
  424. chkYearId:"",
  425. sttm:"",
  426. entm:"",
  427. leadDep:"",
  428. chkName:"",
  429. chkForm:"",
  430. chkMnth: ""
  431. },
  432. YM:"",
  433. orgIdDefault:"",
  434. addForm:{
  435. unplannedChkNm:"",
  436. isPlanned:"",
  437. chkYearId:"",
  438. objType:"",
  439. leadDep:"",
  440. sttm:"",
  441. entm:"",
  442. chkForm:"",
  443. chkMnth:"",
  444. chkNote:"",
  445. chkGroup:"",
  446. chkPers:"",
  447. chkPblm:"",
  448. chkLeder:"",
  449. trainNum:"",
  450. trainPers:"",
  451. nextPlan:"",
  452. note:"",
  453. isFinish:"",
  454. chkName:"",
  455. nextSttm:"",
  456. nextEntm:"",
  457. addvnm:"",
  458. addvcd:""
  459. },
  460. chkYear:"",
  461. yearPlanDepList:[],
  462. objParent:{}
  463. }
  464. },
  465. filters:{
  466. ChkForm(val){
  467. return val=="1"?"暗访":val=="2"?"明察":val=="3"?"书面":val=="4"?"四不两直":"";
  468. }
  469. },
  470. components: {
  471. receiver,
  472. addvSelectMul
  473. },
  474. computed: {
  475. persId() {
  476. return localStorage.getItem("userid")
  477. ? localStorage.getItem("userid")
  478. : "1098101939614724096";
  479. },
  480. orgId() {
  481. return localStorage.getItem('currentOrgId') ? localStorage.getItem("currentOrgId") : "";
  482. },
  483. organCode() {
  484. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  485. },
  486. },
  487. created(){
  488. // this.getTypes();
  489. },
  490. mounted() {
  491. this.initTableData();
  492. },
  493. methods: {
  494. getYearList(){
  495. var _self = this;
  496. this.objParent = {};
  497. request.get(`/bis/insp/plan/year/${this.addForm.chkYearId}`).then(res=>{
  498. if(res.success){
  499. _self.objParent = res.data;
  500. }
  501. })
  502. },
  503. changeDate(){
  504. this.getYearPlanByDep();
  505. },
  506. changeAddv(obj){
  507. if(obj.adCodes){
  508. this.addForm.addvnm = obj.adNames;
  509. this.addForm.addvcd = obj.adCodes;
  510. }else{
  511. this.addForm.addvcd = "";
  512. }
  513. },
  514. getYearPlanByDep(){
  515. this.yearPlanDepList = [];
  516. request.post(`/bis/insp/plan/year/findList`,{state:"1",chkYear:this.chkYear}).then(res=>{
  517. if(res.success){
  518. if(res.data && res.data.length>0){
  519. this.yearPlanDepList = res.data;
  520. }
  521. }
  522. })
  523. },
  524. getTypes() {
  525. var _self = this;
  526. request.get(`/bis/insp/rel/org/insp/type/getInspTypeByOrgId/${this.orgId}`)
  527. .then(res => {
  528. if (res.success) {
  529. _self.dcTypeList = res.data;
  530. }
  531. })
  532. },
  533. getSummaries(param) {
  534. const { columns, data } = param;
  535. const sums = [];
  536. columns.forEach((column, index) => {
  537. if (index === 0) {
  538. sums[index] = '总计';
  539. return;
  540. }
  541. const values = data.map(item => Number(item[column.property]));
  542. if (column.property=='chkPers' || column.property=='chkPblm' || column.property=='chkLeder' || column.property=='trainNum' || column.property=='chkGroup' || column.property=='trainPers') {
  543. sums[index] = values.reduce((prev, curr) => {
  544. const value = Number(curr);
  545. if (!isNaN(value)) {
  546. return prev + curr;
  547. } else {
  548. return prev;
  549. }
  550. }, 0);
  551. sums[index] += '';
  552. } else {
  553. sums[index] = '';
  554. }
  555. });
  556. return sums;
  557. },
  558. closeDetailDialog(){
  559. this.detailDialogVisible = false;
  560. },
  561. lookOver(obj){
  562. this.detailObj = obj;
  563. var tm = "";
  564. if(this.detailObj.sttm){
  565. tm = this.formatDate(this.detailObj,{property:"sttm"},null,null)
  566. }
  567. if(this.detailObj.entm){
  568. tm += "~"+this.formatDate(this.detailObj,{property:"entm"},null,null)
  569. }
  570. this.detailObj.tm = tm;
  571. this.detailDialogVisible = true;
  572. },
  573. closeDialog(){
  574. this.$emit('closeDialogMonth')
  575. },
  576. formatDate(row, column, cellValue, index){
  577. var dateF = row[column.property];
  578. if(dateF){
  579. var date = new Date(dateF);
  580. return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):'0'+(date.getMonth()+1))+"-"+(date.getDate()>9?date.getDate():"0"+date.getDate());
  581. }
  582. return "";
  583. },
  584. formatDateMonth(row, column, cellValue, index){
  585. var dateF = row[column.property];
  586. if(dateF){
  587. var date = new Date(dateF);
  588. return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):'0'+(date.getMonth()+1));
  589. }
  590. return "";
  591. },
  592. formatDateRang(row, column, cellValue, index){
  593. var tm = "";
  594. if(row.sttm){
  595. tm = this.formatDate(row,{property:"sttm"},null,null)
  596. }
  597. if(row.entm){
  598. tm += "~"+this.formatDate(row,{property:"entm"},null,null)
  599. }
  600. return tm;
  601. },
  602. chkFormFormat(row, column, cellValue, index){
  603. var labelList = "";
  604. this.chkFormArr.forEach((item)=>{
  605. // row.chkForm.split(",").forEach((item1)=>{
  606. if(item.value==row.chkForm){
  607. labelList = item.label;
  608. }
  609. // })
  610. })
  611. return labelList;
  612. },
  613. isFFormat(row, column, cellValue, index){
  614. return row.isFinish=="1"?"完成":row.isFinish=="0"?"否":"";
  615. },
  616. objTypeF(row, column, cellValue, index){
  617. var labelList = [];
  618. this.dcTypeList.forEach((item)=>{
  619. row.objType.split(",").forEach((item1)=>{
  620. if(item.inspType==item1){
  621. labelList.push(item.inspName);
  622. }
  623. })
  624. })
  625. return labelList.join(",");
  626. },
  627. async exportExcel() {
  628. this.searchForm.persId = this.persId;
  629. // if(this.objTypeParam && this.objTypeParam.length>0){
  630. // this.searchForm.objType = this.objTypeParam.join(",");
  631. // }else{
  632. // this.searchForm.objType = "";
  633. // }
  634. // if(this.chkFormParam && this.chkFormParam.length>0){
  635. // this.searchForm.chkForm = this.chkFormParam.join(",");
  636. // }else{
  637. // this.searchForm.chkForm = "";
  638. // }
  639. // if(this.dateRange&&this.dateRange.length>1&&this.dateRange[0]!=''&&this.dateRange[1]!=''){
  640. // this.searchForm.sttm = this.dateRange[0];
  641. // this.searchForm.entm = this.dateRange[1];
  642. // }else{
  643. // this.searchForm.sttm = "";
  644. // this.searchForm.entm = "";
  645. // }
  646. let url = "/pdcApi/bis/insp/plan/year/prg/export";
  647. let type = "POST";
  648. let exportName = "监督检查实施情况月报.xls"
  649. let result = await exportModel(type, url, exportName,JSON.stringify(this.searchForm));
  650. },
  651. async exportNextExcel() {
  652. this.searchForm.persId = this.persId;
  653. // if(this.objTypeParam && this.objTypeParam.length>0){
  654. // this.searchForm.objType = this.objTypeParam.join(",");
  655. // }else{
  656. // this.searchForm.objType = "";
  657. // }
  658. // if(this.chkFormParam && this.chkFormParam.length>0){
  659. // this.searchForm.chkForm = this.chkFormParam.join(",");
  660. // }else{
  661. // this.searchForm.chkForm = "";
  662. // }
  663. // if(this.dateRange&&this.dateRange.length>1&&this.dateRange[0]!=''&&this.dateRange[1]!=''){
  664. // this.searchForm.sttm = this.dateRange[0];
  665. // this.searchForm.entm = this.dateRange[1];
  666. // }else{
  667. // this.searchForm.sttm = "";
  668. // this.searchForm.entm = "";
  669. // }
  670. let url = "/pdcApi/bis/insp/plan/year/prg/export1";
  671. let type = "POST";
  672. let exportName = "下月计划.xls"
  673. let result = await exportModel(type, url, exportName,JSON.stringify(this.searchForm));
  674. },
  675. deleteData(id){
  676. var _self = this;
  677. this.$confirm('确定删除该条数据吗, 是否继续?', '提示', {
  678. confirmButtonText: '确定',
  679. cancelButtonText: '取消',
  680. type: 'warning'
  681. }).then(() => {
  682. request.post('/bis/insp/plan/year/prg/delete/'+id).then(res=>{
  683. if(res.success){
  684. _self.initTableData();
  685. }else{
  686. _self.$message.warning(res.message);
  687. }
  688. })
  689. }).catch(() => {
  690. this.$message({
  691. type: 'info',
  692. message: '已取消删除'
  693. });
  694. });
  695. },
  696. edit(row){
  697. this.chkYear = row.chkYear;
  698. this.getYearPlanByDep();
  699. this.getYearList();
  700. var obj = JSON.stringify(row);
  701. this.addDialogVisible = true;
  702. this.addForm = JSON.parse(obj);
  703. // this.objTypeList = this.addForm.objType?this.addForm.objType.split(","):[];
  704. // this.chkFormList = this.addForm.chkForm?this.addForm.chkForm.split(","):[];
  705. this.dateRange1 = [this.addForm.nextSttm,this.addForm.nextEntm];
  706. this.dialogT = "编辑";
  707. this.$nextTick(()=>{
  708. this.$refs.city.setCheck(row.addvcd?row.addvcd.split(","):[],row.addvnm?row.addvnm.split(","):[]);
  709. })
  710. },
  711. addSubmit(){
  712. if(!this.addForm.isPlanned){
  713. this.$message.warning("请选择是否在计划内");
  714. return;
  715. }
  716. if(this.addForm.isPlanned=='1'){
  717. if(!this.chkYear){
  718. this.$message.warning("请选择年度");
  719. return;
  720. }
  721. if(!this.addForm.chkYearId){
  722. this.$message.warning("请选择检查计划事项");
  723. return;
  724. }
  725. }
  726. if(this.addForm.isPlanned=='2'){
  727. if(!this.addForm.unplannedChkNm){
  728. this.$message.warning("请选择计划外开展名称");
  729. return;
  730. }
  731. }
  732. if(!this.addForm.chkMnth){
  733. this.$message.warning("请选择年月");
  734. return;
  735. }
  736. if(!this.addForm.leadDep){
  737. this.$message.warning("请输入处室、单位");
  738. return;
  739. }
  740. // if(!this.addForm.chkNote){
  741. // this.$message.warning("请输入当月监督检查开展情况");
  742. // return;
  743. // }
  744. // if(!this.addForm.chkForm){
  745. // this.$message.warning("请选择检查形式");
  746. // return;
  747. // }
  748. // if(!this.addForm.chkGroup){
  749. // this.$message.warning("请输入检查组次");
  750. // return;
  751. // }
  752. // if(!this.addForm.chkPers){
  753. // this.$message.warning("请输入检查人次");
  754. // return;
  755. // }
  756. // if(!this.addForm.chkPblm){
  757. // this.$message.warning("请输入检查发现问题数");
  758. // return;
  759. // }
  760. // if(!this.addForm.chkLeder){
  761. // this.$message.warning("请输入厅领导参加检查人次");
  762. // return;
  763. // }
  764. // if(!this.addForm.trainNum){
  765. // this.$message.warning("请输入当月培训期次");
  766. // return;
  767. // }
  768. // if(!this.addForm.trainPers){
  769. // this.$message.warning("请输入参加培训人数");
  770. // return;
  771. // }
  772. // if(!this.dateRange1 || this.dateRange1==0){
  773. // this.$message.warning("请选择下月起止时间");
  774. // return;
  775. // }else{
  776. if(this.dateRange1 && this.dateRange1.length>0){
  777. this.addForm.nextSttm = this.dateRange1[0];
  778. this.addForm.nextEntm = this.dateRange1[1];
  779. }
  780. // }
  781. // if(!this.addForm.addvcd){
  782. // this.$message.warning("请选择检查地点");
  783. // return;
  784. // }
  785. // if(!this.addForm.isFinish){
  786. // this.$message.warning("请选择年度监督检查完成情况");
  787. // return;
  788. // }
  789. // this.addForm.sttm = this.dateRange1[0];
  790. // this.addForm.entm = this.dateRange1[1];
  791. // this.addForm.objType = this.objTypeList.join(",");
  792. // this.addForm.chkForm = this.chkFormList.join(",");
  793. var labelList = "";
  794. this.chkFormArr.forEach((item)=>{
  795. // this.chkFormList.forEach((item1)=>{
  796. if(item.value==this.addForm.chkForm){
  797. this.addForm.chkFormNm = item.label;
  798. }
  799. // })
  800. })
  801. // this.addForm.chkFormNm = labelList;
  802. // labelList = [];
  803. // this.dcTypeList.forEach((item)=>{
  804. // this.objTypeList.forEach((item1)=>{
  805. // if(item.inspType==item1){
  806. // labelList.push(item.inspName);
  807. // }
  808. // })
  809. // })
  810. // this.addForm.objTypeNm = labelList.join(",");
  811. if(this.addForm.isPlanned=="1"){
  812. this.yearPlanDepList.forEach((item)=>{
  813. if(item.id==this.addForm.chkYearId){
  814. this.addForm.chkName = item.chkName;
  815. }
  816. })
  817. this.addForm.unplannedChkNm = "";
  818. }else{
  819. this.addForm.chkYearId = "";
  820. this.addForm.chkName = "";
  821. }
  822. var _self = this;
  823. request.post('/bis/insp/plan/year/prg/',this.addForm).then(res=>{
  824. if(res.success){
  825. _self.$message.success("保存成功");
  826. _self.addDialogVisible = false;
  827. _self.addForm = {};
  828. _self.objTypeList = [];
  829. _self.chkFormList = [];
  830. _self.dateRange1 = [];
  831. _self.initTableData();
  832. }else{
  833. _self.$message.warning(res.message);
  834. }
  835. })
  836. },
  837. selectOrgChange(data){
  838. this.addForm.unitName = data.name;
  839. },
  840. clearRecv(){
  841. this.addForm.unitName = "";
  842. },
  843. closeAddDialog(){
  844. this.addDialogVisible = false;
  845. },
  846. initTableData(){
  847. this.searchForm.persId = this.persId;
  848. // if(this.objTypeParam && this.objTypeParam.length>0){
  849. // this.searchForm.objType = this.objTypeParam.join(",");
  850. // }else{
  851. // this.searchForm.objType = "";
  852. // }
  853. // if(this.chkFormParam && this.chkFormParam.length>0){
  854. // this.searchForm.chkForm = this.chkFormParam.join(",");
  855. // }else{
  856. // this.searchForm.chkForm = "";
  857. // }
  858. // if(this.dateRange&&this.dateRange.length>1&&this.dateRange[0]!=''&&this.dateRange[1]!=''){
  859. // this.searchForm.sttm = this.dateRange[0];
  860. // this.searchForm.entm = this.dateRange[1];
  861. // }else{
  862. // this.searchForm.sttm = "";
  863. // this.searchForm.entm = "";
  864. // }
  865. this.loading = true;
  866. var _self = this;
  867. request.post(`/bis/insp/plan/year/prg/findPageList`,this.searchForm).then(res=>{
  868. if(res.success){
  869. _self.tableData = res.data;
  870. _self.loading = false;
  871. _self.$nextTick(()=>{
  872. _self.$refs.table.doLayout();
  873. })
  874. }else{
  875. _self.$message.warning(res.message)
  876. }
  877. })
  878. },
  879. handleCurrentChange(val){
  880. this.pageNum = val;
  881. this.initTableData();
  882. },
  883. searchBtn(){
  884. this.initTableData();
  885. },
  886. addBtn(){
  887. this.addForm = {isFinish: "1"};
  888. this.objTypeList = [];
  889. this.chkFormList = [];
  890. this.dateRange1 = [];
  891. this.addDialogVisible = true;
  892. this.dialogT = "添加"
  893. }
  894. }
  895. }
  896. </script>
  897. <style lang="scss" scoped>
  898. .monthReport >>>.el-dialog{
  899. margin-top: 10vh !important;
  900. }
  901. table{
  902. width: 100%;
  903. height:100%;
  904. border-collapse: collapse;
  905. margin-bottom: 30px;
  906. }
  907. table tr td{
  908. border:1px solid #cecece;
  909. height:35px;
  910. text-indent: 15px;
  911. padding-right: 15px;
  912. }
  913. table tr td:first-child{
  914. background: #f2f1f1;
  915. width: 260px;
  916. text-align: right;
  917. }
  918. .monthReport{
  919. width: 100%;
  920. height:90%;
  921. margin: 0;
  922. padding: 0;
  923. }
  924. .box-card{
  925. width: calc(100% - 60px);
  926. height:calc(100% - 20px);
  927. margin: 0 auto;
  928. margin-top: 10px;
  929. }
  930. .title_monthReport{
  931. text-align: center;
  932. padding: 10px;
  933. }
  934. .note_monthReport{
  935. width: 100%;
  936. background-color: rgba(255, 251, 230, 1);
  937. box-sizing: border-box;
  938. border-width: 1px;
  939. border-style: solid;
  940. border-color: rgba(255, 229, 143, 1);
  941. color: rgba(0, 0, 0, 0.447058823529412);
  942. font-size: 14px;
  943. padding: 10px;
  944. }
  945. .note_monthReport p:first-child{
  946. font-size: 16px !important;
  947. }
  948. .monthReport{
  949. .demo-form-inline{
  950. .el-form-item{
  951. margin-bottom: 5px;
  952. margin-top: 8px;
  953. }
  954. }
  955. }
  956. </style>