84dd9f05f9d8fc2a075a65c176ea03d43dab7eb8.svn-base 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. <template>
  2. <el-container class="monthReport">
  3. <el-card class="box-card">
  4. <h3 class="title_monthReport" style="font-size: 20px !important;font-weight: bold !important;color: black !important;">
  5. <el-date-picker
  6. v-model="year"
  7. type="monthrange"
  8. value-format="yyyy-MM"
  9. range-separator="至"
  10. start-placeholder="开始月份"
  11. end-placeholder="结束月份">
  12. </el-date-picker>
  13. 督查计划执行情况
  14. </h3>
  15. <el-form :inline="true" size="mini" class="demo-form-inline" label-width="120px">
  16. <el-form-item label="监督事项名称">
  17. <el-select v-model="objTypes" multiple collapse-tags placeholder="监督事项名称" clearable>
  18. <el-option
  19. v-for="item in dcTypeList"
  20. :key="item.code"
  21. :label="item.inspName"
  22. :value="item.inspType">
  23. </el-option>
  24. </el-select>
  25. </el-form-item>
  26. <el-form-item label="检查组次名称">
  27. <el-input v-model="searchForm.groupName" placeholder="检查组次名称" clearable></el-input>
  28. </el-form-item>
  29. <el-form-item label="检查区域">
  30. <el-input v-model="searchForm.chkArea" placeholder="检查区域" clearable></el-input>
  31. </el-form-item>
  32. <el-form-item label="检查项目">
  33. <el-input v-model="searchForm.objName" placeholder="检查项目" clearable></el-input>
  34. </el-form-item>
  35. <el-form-item>
  36. <el-button type="primary" size="mini" @click="searchBtn">督查计划执行情况查询</el-button>
  37. <!-- <el-button type="primary" size="mini" @click="chkMul" style="background:#2711ff;">查重</el-button>-->
  38. <el-button type="warning" size="mini" @click="oneDel">一键处理</el-button>
  39. <el-button type="warning" size="mini" @click="exportExcel">导出</el-button>
  40. </el-form-item>
  41. </el-form>
  42. <div>
  43. <el-table
  44. border
  45. ref="multipleTable"
  46. :height="tableHeight"
  47. :data="tableData"
  48. :row-style="rowClass"
  49. tooltip-effect="dark"
  50. style="width: 100%"
  51. v-loading="loading"
  52. @selection-change="handleSelectionSend">
  53. <el-table-column
  54. type="selection"
  55. width="55">
  56. </el-table-column>
  57. <el-table-column align="center" type="index" label="序号" min-width="50">
  58. <template slot-scope="scope">{{ (pageNum - 1) * pageSize + (scope.$index + 1) }}</template>
  59. </el-table-column>
  60. <el-table-column
  61. header-align="center"
  62. align="center"
  63. min-width="200"
  64. prop="GROUPNAME"
  65. label="检查组次名称"
  66. show-overflow-tooltip
  67. ></el-table-column>
  68. <el-table-column
  69. header-align="center"
  70. align="center"
  71. min-width="200"
  72. prop="OBJNAME"
  73. label="检查内容"
  74. show-overflow-tooltip
  75. ></el-table-column>
  76. <el-table-column
  77. header-align="center"
  78. align="center"
  79. min-width="200"
  80. prop=""
  81. label="检查时间"
  82. show-overflow-tooltip
  83. >
  84. <template slot-scope="scope">
  85. <span v-if="scope.row.STTM && scope.row.ENTM">{{scope.row.STTM+"~"+scope.row.ENTM}}</span>
  86. </template>
  87. </el-table-column>
  88. <el-table-column
  89. header-align="center"
  90. align="center"
  91. min-width="200"
  92. prop="CHKAREA"
  93. label="检查区域"
  94. show-overflow-tooltip
  95. ></el-table-column>
  96. <el-table-column
  97. header-align="center"
  98. align="center"
  99. min-width="200"
  100. prop="COUNT"
  101. label="项目数量"
  102. show-overflow-tooltip
  103. ></el-table-column>
  104. <el-table-column
  105. header-align="center"
  106. align="center"
  107. min-width="200"
  108. prop="CHKFORM"
  109. label="检查形式"
  110. :formatter="chkFormFormat"
  111. show-overflow-tooltip
  112. ></el-table-column>
  113. <el-table-column
  114. header-align="center"
  115. align="center"
  116. min-width="200"
  117. prop="LEADDEP"
  118. label="牵头单位"
  119. show-overflow-tooltip
  120. ></el-table-column>
  121. <el-table-column
  122. header-align="center"
  123. align="center"
  124. min-width="200"
  125. prop="PERSNAME"
  126. label="联络人"
  127. show-overflow-tooltip
  128. ></el-table-column>
  129. <el-table-column
  130. header-align="center"
  131. align="center"
  132. min-width="200"
  133. prop="MOBILENUMB"
  134. label="联系方式"
  135. show-overflow-tooltip
  136. ></el-table-column>
  137. <el-table-column
  138. header-align="center"
  139. align="center"
  140. min-width="200"
  141. prop="OBJNAMES"
  142. label="检查项目"
  143. show-overflow-tooltip
  144. ></el-table-column>
  145. <el-table-column
  146. header-align="center"
  147. align="center"
  148. v-if="isOne"
  149. min-width="200"
  150. prop="isR"
  151. label="是否重复"
  152. show-overflow-tooltip
  153. >
  154. <template slot-scope="scope">
  155. <span v-if="scope.row.isR" style="color:red;">是</span>
  156. <span v-else style="color:#4d9bff;">否</span>
  157. </template>
  158. </el-table-column>
  159. <!-- <el-table-column-->
  160. <!-- header-align="center"-->
  161. <!-- align="center"-->
  162. <!-- min-width="200"-->
  163. <!-- prop="isR"-->
  164. <!-- v-if="isOne"-->
  165. <!-- label="上报状态"-->
  166. <!-- show-overflow-tooltip-->
  167. <!-- >-->
  168. <!-- <template slot-scope="scope">-->
  169. <!-- <span v-if="scope.row.isR" style="color:red;">审核不通过</span>-->
  170. <!-- <span v-else style="color:#4d9bff;">审核通过</span>-->
  171. <!-- </template>-->
  172. <!-- </el-table-column>-->
  173. </el-table>
  174. </div>
  175. </el-card>
  176. </el-container>
  177. </template>
  178. <script>
  179. import {exportModel} from "@util/gw_exportModel";
  180. import request from '@util/gw_ajax_request'
  181. import receiver from "./receiver"
  182. export default {
  183. name: "",
  184. props: ["rowData"],
  185. data() {
  186. return {
  187. mulSelectionSend:[],
  188. curList:[],
  189. year:[new Date().getFullYear()+"-01",new Date().getFullYear()+"-"+((new Date().getMonth()+1)>9?(new Date().getMonth()+1):"0"+(new Date().getMonth()+1))],
  190. month:new Date().getMonth()+1,
  191. isOne:false,
  192. years:[new Date().getFullYear()-1,new Date().getFullYear(),new Date().getFullYear()+1],
  193. months:[1,2,3,4,5,6,7,8,9,10,11,12],
  194. dcTypeList:[],
  195. ptypeArr:[{label:'暗访',value:"0"},{label:'明查',value:"1"}],
  196. dialogT:"",
  197. monthDialogVisible:true,
  198. addDialogVisible:false,
  199. tableHeight:window.innerHeight-260,
  200. tableData:[],
  201. loading:false,
  202. pageNum:1,
  203. pageSize:10,
  204. total:0,
  205. objTypes:[],
  206. searchForm:{
  207. groupName:"",
  208. chkArea:"",
  209. objName:""
  210. },
  211. YM:"",
  212. orgIdDefault:"",
  213. addForm:{
  214. chkYearId:"",
  215. unitName:"",
  216. year:"",
  217. mnth:"",
  218. idx:"",
  219. pname:"",
  220. ptype:"",
  221. tm:"",
  222. prjSize:"",
  223. depSize:"",
  224. chkSize:"",
  225. leadSize:"",
  226. chkDaySize:"",
  227. feedBackSize:"",
  228. pblmSize:"",
  229. mendSize:"",
  230. mendCmpSize:"",
  231. mendCmpTatSize:"",
  232. mendCmpRatio:"",
  233. accuntDep:"",
  234. accuntText:"",
  235. acuntTm:"",
  236. accuntNote:""
  237. }
  238. }
  239. },
  240. components: {
  241. receiver
  242. },
  243. computed: {
  244. persId() {
  245. return localStorage.getItem("userid")
  246. ? localStorage.getItem("userid")
  247. : "1098101939614724096";
  248. },
  249. orgId() {
  250. return localStorage.getItem('currentOrgId') ? localStorage.getItem("currentOrgId") : "";
  251. },
  252. organCode() {
  253. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  254. },
  255. },
  256. created(){
  257. this.getTypes();
  258. },
  259. mounted() {
  260. this.initTableData();
  261. },
  262. methods: {
  263. isRe(arr,arr1){
  264. var flag = false;
  265. if(arr.CHKAREA && arr1.CHKAREA){
  266. var list = arr1.CHKAREA.split(",");
  267. for(var j = 0;j<list.length;j++){
  268. if (arr.CHKAREA.indexOf(list[j])>-1){
  269. flag = true;
  270. }
  271. }
  272. }
  273. return flag;
  274. },
  275. handleSelectionSend(val){
  276. this.mulSelectionSend = val;
  277. },
  278. rowClass({row, index}) {
  279. if(row.isR) {
  280. return { "background-color": "#ffb2df" }
  281. }
  282. },
  283. chkFormFormat(row, column, cellValue, index){
  284. return row.CHKFORM=="1"?"暗访":row.CHKFORM=="2"?"明察":row.CHKFORM=="3"?"书面":row.CHKFORM=="4"?"四不两直":"";
  285. },
  286. getTypes() {
  287. var _self = this;
  288. request.get(`/bis/insp/rel/org/insp/type/getInspTypeByOrgId/${this.orgId}`)
  289. .then(res => {
  290. if (res.success) {
  291. _self.dcTypeList = res.data;
  292. }
  293. })
  294. },
  295. closeDialog(){
  296. this.$emit('closeDialogMonth')
  297. },
  298. objFormat(row, column, cellValue, index){
  299. var name = "";
  300. this.dcTypeList.forEach((item)=>{
  301. if(parseInt(item.inspType)==row.OBJTYPE){
  302. name = item.inspName;
  303. }
  304. })
  305. return name;
  306. },
  307. formatDate(row, column, cellValue, index){
  308. var dateF = row[column.property];
  309. if(dateF){
  310. var date = new Date(dateF);
  311. return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):'0'+(date.getMonth()+1))+"-"+date.getDate();
  312. }
  313. return "";
  314. },
  315. async exportExcel() {
  316. this.searchForm.sttm = "";
  317. this.searchForm.entm = "";
  318. this.searchForm.persId = this.persId;
  319. this.searchForm.objTypes = this.objTypes.join(",");
  320. if(this.year && this.year.length>0){
  321. this.searchForm.sttm = this.year[0];
  322. this.searchForm.entm = this.year[1];
  323. }
  324. let url = "/pdcApi/bis/insp/mtprggd/export";
  325. let type = "POST";
  326. let exportName = "月计划统筹.xls"
  327. let result = await exportModel(type, url, exportName,JSON.stringify(this.searchForm));
  328. },
  329. deleteData(id){
  330. var _self = this;
  331. this.$confirm('确定删除该条数据吗, 是否继续?', '提示', {
  332. confirmButtonText: '确定',
  333. cancelButtonText: '取消',
  334. type: 'warning'
  335. }).then(() => {
  336. request.post('/bis/insp/mtprggd/delete/'+id).then(res=>{
  337. if(res.success){
  338. _self.initTableData();
  339. }else{
  340. _self.$message.warning(res.message);
  341. }
  342. })
  343. }).catch(() => {
  344. this.$message({
  345. type: 'info',
  346. message: '已取消删除'
  347. });
  348. });
  349. },
  350. edit(row){
  351. var obj = JSON.stringify(row);
  352. this.addDialogVisible = true;
  353. this.addForm = JSON.parse(obj);
  354. this.ym = this.addForm.year+"-"+this.addForm.mnth;
  355. this.dialogT = "编辑";
  356. },
  357. addSubmit(){
  358. if(!this.addForm.idx){
  359. this.$message.warning("请输入计划编号");
  360. return;
  361. }
  362. if(!this.addForm.unitName){
  363. this.$message.warning("请输入填报处室");
  364. return;
  365. }
  366. if(!this.ym){
  367. this.$message.warning("请选择年月");
  368. return;
  369. }
  370. if(!this.addForm.pname){
  371. this.$message.warning("请输入监督事项名称");
  372. return;
  373. }
  374. if(!this.addForm.ptype){
  375. this.$message.warning("请选择检查形式");
  376. return;
  377. }
  378. if(!this.addForm.tm){
  379. this.$message.warning("请选择开展时间");
  380. return;
  381. }
  382. if(!this.addForm.prjSize){
  383. this.$message.warning("请输入工程数量");
  384. return;
  385. }
  386. if(!this.addForm.depSize){
  387. this.$message.warning("请输入业务主体单位数量");
  388. return;
  389. }
  390. if(!this.addForm.chkSize){
  391. this.$message.warning("请输入检查组次");
  392. return;
  393. }
  394. if(!this.addForm.leadSize){
  395. this.$message.warning("请输入有厅领导带队的次数");
  396. return;
  397. }
  398. if(!this.addForm.chkDaySize){
  399. this.$message.warning("请输入监督检查工日");
  400. return;
  401. }
  402. if(!this.addForm.feedBackSize){
  403. this.$message.warning("请输入书面反馈意见份数");
  404. return;
  405. }
  406. if(!this.addForm.pblmSize){
  407. this.$message.warning("请输入发现问题数量");
  408. return;
  409. }
  410. if(!this.addForm.mendSize){
  411. this.$message.warning("请输入整改问题数量");
  412. return;
  413. }
  414. if(!this.addForm.mendCmpSize){
  415. this.$message.warning("请输入本月完成整改问题数量");
  416. return;
  417. }
  418. if(!this.addForm.mendCmpTatSize){
  419. this.$message.warning("请输入累计完成整改问题数量");
  420. return;
  421. }
  422. if(!this.addForm.mendCmpRatio){
  423. this.$message.warning("请输入问题累计整改率");
  424. return;
  425. }
  426. if(!this.addForm.accuntDep){
  427. this.$message.warning("请输入被追责单位/主体");
  428. return;
  429. }
  430. if(!this.addForm.accuntText){
  431. this.$message.warning("请输入追责事由");
  432. return;
  433. }
  434. if(!this.addForm.acuntTm){
  435. this.$message.warning("请选择追责时间");
  436. return;
  437. }
  438. if(!this.addForm.accuntNote){
  439. this.$message.warning("请输入追责情况");
  440. return;
  441. }
  442. this.addForm.chkYearId = this.rowData.id;
  443. this.ym = this.formatDate({ym:this.ym},{property:"ym"},null,null)
  444. this.addForm.year = this.ym.split("-")[0];
  445. this.addForm.mnth = this.ym.split("-")[1];
  446. var _self = this;
  447. request.post('/bis/insp/mtprggd/',this.addForm).then(res=>{
  448. if(res.success){
  449. _self.$message.success("保存成功");
  450. _self.addDialogVisible = false;
  451. _self.addForm = {};
  452. _self.ym = "";
  453. _self.initTableData();
  454. }else{
  455. _self.$message.warning(res.message);
  456. }
  457. })
  458. },
  459. selectOrgChange(data){
  460. this.addForm.unitName = data.name;
  461. },
  462. clearRecv(){
  463. this.addForm.unitName = "";
  464. },
  465. closeAddDialog(){
  466. this.addDialogVisible = false;
  467. },
  468. chkMul(){
  469. this.curList = [];
  470. if(this.mulSelectionSend && this.mulSelectionSend.length>0){
  471. this.loading = true;
  472. for(var i = 0;i<this.mulSelectionSend.length;i++){
  473. this.curList.push(this.mulSelectionSend[i].ID);
  474. }
  475. this.isOne = true;
  476. this.initTableData();
  477. this.loading = false;
  478. }else{
  479. this.$message.warning("请选择数据");
  480. }
  481. },
  482. initTableData(){
  483. this.searchForm.sttm = "";
  484. this.searchForm.entm = "";
  485. this.searchForm.persId = this.persId;
  486. this.searchForm.objTypes = this.objTypes.join(",");
  487. if(this.year && this.year.length>0){
  488. this.searchForm.sttm = this.year[0];
  489. this.searchForm.entm = this.year[1];
  490. }
  491. this.loading = true;
  492. var _self = this;
  493. request.post('/bis/insp/mtprggd/getMonthRefrom',this.searchForm).then(res=>{
  494. if(res.success){
  495. var list = res.data;
  496. if(_self.isOne){
  497. for(var i = 0;i<list.length;i++){
  498. if(_self.mulSelectionSend && _self.mulSelectionSend.length>0){
  499. if(_self.curList.indexOf(list[i].ID)>-1){
  500. var flag = false;
  501. for(var j = 0;j<_self.mulSelectionSend.length;j++){
  502. if((_self.isRe(list[i],_self.mulSelectionSend[j]) || _self.isRe(_self.mulSelectionSend[j],list[i])) &&
  503. list[i].ID!=_self.mulSelectionSend[j].ID && list[i].STTM && list[i].ENTM && _self.mulSelectionSend[j].STTM && _self.mulSelectionSend[j].ENTM &&
  504. ((list[i].STTM<=_self.mulSelectionSend[j].STTM && list[i].ENTM>=_self.mulSelectionSend[j].ENTM) || (list[i].STTM>=_self.mulSelectionSend[j].STTM && list[i].ENTM<=_self.mulSelectionSend[j].ENTM)
  505. || (list[i].STTM<=_self.mulSelectionSend[j].STTM && _self.mulSelectionSend[j].STTM<=list[i].ENTM)
  506. || (list[i].STTM<=_self.mulSelectionSend[j].ENTM && _self.mulSelectionSend[j].ENTM<=list[i].ENTM)
  507. || (list[i].STTM>=_self.mulSelectionSend[j].STTM && _self.mulSelectionSend[j].ENTM>=list[i].STTM)
  508. || (list[i].ENTM>=_self.mulSelectionSend[j].STTM && _self.mulSelectionSend[j].ENTM>=list[i].ENTM))){
  509. flag = true;
  510. }
  511. }
  512. if(flag){
  513. list[i].isR = true
  514. }else{
  515. list[i].isR = false
  516. }
  517. }
  518. }else{
  519. var flag = false;
  520. for(var j = 0;j<list.length;j++){
  521. if((this.isRe(list[i],list[j]) || this.isRe(list[j],list[i])) && list[i].ID!=list[j].ID &&
  522. list[i].STTM && list[i].ENTM && list[j].STTM && list[j].ENTM &&
  523. ((list[i].STTM<=list[j].STTM && list[i].ENTM>=list[j].ENTM) || (list[i].STTM>=list[j].STTM && list[i].ENTM<=list[j].ENTM)
  524. || (list[i].STTM<=list[j].STTM && list[j].STTM<=list[i].ENTM)
  525. || (list[i].STTM<=list[j].ENTM && list[j].ENTM<=list[i].ENTM)
  526. || (list[i].STTM>=list[j].STTM && list[j].ENTM>=list[i].STTM)
  527. || (list[i].ENTM>=list[j].STTM && list[j].ENTM>=list[i].ENTM))){
  528. flag = true;
  529. }
  530. }
  531. if(flag){
  532. list[i].isR = true
  533. }else{
  534. list[i].isR = false
  535. }
  536. }
  537. }
  538. }
  539. this.tableData = list;
  540. _self.loading = false;
  541. }else{
  542. _self.$message.warning(res.message)
  543. }
  544. })
  545. },
  546. handleCurrentChange(val){
  547. this.pageNum = val;
  548. this.initTableData();
  549. },
  550. searchBtn(){
  551. this.isOne = false;
  552. this.initTableData();
  553. },
  554. oneDel(){
  555. this.isOne = true;
  556. this.initTableData();
  557. },
  558. addBtn(){
  559. this.addForm = {};
  560. this.addDialogVisible = true;
  561. this.dialogT = "添加"
  562. }
  563. }
  564. }
  565. </script>
  566. <style lang="scss" scoped>
  567. .title_monthReport /deep/ .el-input__inner{
  568. border:0px;
  569. font-size: 20px !important;
  570. color:black;
  571. }
  572. .monthReport{
  573. width: 100%;
  574. height:100%;
  575. margin: 0;
  576. padding: 0;
  577. }
  578. .box-card{
  579. width: calc(100% - 60px);
  580. height:calc(100% - 20px);
  581. margin: 0 auto;
  582. margin-top: 10px;
  583. }
  584. .title_monthReport{
  585. text-align: center;
  586. padding: 10px;
  587. }
  588. .note_monthReport{
  589. width: 100%;
  590. background-color: rgba(255, 251, 230, 1);
  591. box-sizing: border-box;
  592. border-width: 1px;
  593. border-style: solid;
  594. border-color: rgba(255, 229, 143, 1);
  595. color: rgba(0, 0, 0, 0.447058823529412);
  596. font-size: 14px;
  597. padding: 10px;
  598. }
  599. .note_monthReport p:first-child{
  600. font-size: 16px !important;
  601. }
  602. .monthReport{
  603. .demo-form-inline{
  604. .el-form-item{
  605. margin-bottom: 5px;
  606. margin-top: 8px;
  607. }
  608. }
  609. }
  610. </style>