1 line
42 KiB
JavaScript
1 line
42 KiB
JavaScript
|
webpackJsonp([18],{BpBn:function(e,t){},CNVo:function(e,t){},JI3j:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("d7EF"),i=a.n(s),r=a("//Fk"),n=a.n(r),l=a("BO1k"),o=a.n(l),c=a("GKmE"),h=a("3MlD"),d="/apis/hl/ahgl/xcjc/pageList",p="/apis/hl/ahgl/xcjc/unAudit",u={components:{DialogChooseSingleUser:h.a},name:"repair_index_all",data:function(){return{advanceQueryDialogVisible:!1,formData:{},depOptions:[],selectDeptId:[],total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10,type:0},repairTime:"",typeList:[],levels:[],statusList:[{name:"待处理",value:0},{name:"待审批",value:1},{name:"已完成",value:2}],getUserList:[],resultList:[],depts:[],btnDelDisabled:!0,btnOtherDisabled:!0,rowIds:[],tableData:[],dialogVisible:!1,pictLoading:!1,chooseUserVisible:!1}},created:function(){var e=this;document.onkeydown=function(t){"Enter"===t.key&&e.search()}},mounted:function(){this.getList(),this.initData()},methods:{unpass:function(){var e=this,t=this.rowIds;if(!(t.length>0&&t.map(function(e){if("已完成"!==e.rwzt)return!1})))return this.$message({type:"warning",message:"没选择数据/选择的数据中包含未完成的数据"}),!1;var a=[];t.forEach(function(e){a.push(e.id)}),this.$api.yxkAPI.yxkPost(p,a).then(function(t){0==t.code&&e.getList()})},clearEngineer:function(){this.selectDeptId=""},moreSearch:function(){this.advanceQueryDialogVisible=!0},save:function(){for(var e in this.formData)this.search_data[e]=this.formData[e];this.search_data.pageno=1,this.$nextTick(function(){this.advanceQueryDialogVisible=!1,this.getList()})},clear:function(){for(var e in this.formData)this.formData[e]="";this.selectDeptId="",this.$forceUpdate()},sortChange:function(e){var t={column:e.column,prop:e.prop,order:e.order},a="ascending"==t.order?"asc":"desc";this.$set(this.search_data,"sort",t.prop),this.$set(this.search_data,"order",a),this.getList()},treeFindPath:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var s=!0,i=!1,r=void 0;try{for(var n,l=o()(e);!(s=(n=l.next()).done);s=!0){var c=n.value;if(a.push(c.id),t(c))return a;if(c.children){var h=this.treeFindPath(c.children,t,a);if(h.length)return h}a.pop()}}catch(e){i=!0,r=e}finally{try{!s&&l.return&&l.return()}finally{if(i)throw r}}return[]},setDeptList:function(e){var t=!0,a=!1,s=void 0;try{for(var i,r=o()(e);!(t=(i=r.next()).done);t=!0){var n=i.value;n.hasChildren?this.setDeptList(n.children):n.children=void 0}}catch(e){a=!0,s=e}finally{try{!t&&r.return&&r.return()}finally{if(a)throw s}}},handleChange:function(e){this.search_data.deptIdQuery=e.length>=1?e[e.length-1]:"",this.selectDeptId=e},clickRow:function(e){this.$refs.tb.toggleRowSelection(e)},initData:function(){var e=this;n.a.all([this.$api.commonAPI.getUsers(),this.$api.dictAPI.getDictsByType("task_type"),this.$api.dictAPI.getDictsByType("cj"),this.$api.dictAPI.getDictsByType("task_status"),this.$api.dictAPI.getDictsByType("acceptance_result"),this.$api.commonAPI.getDeptsTree()]).then(function(t){var a=i()(t,6),s=a[0],r=a[1],n=a[2],l=a[3],o=a[4],c=a[5];0===s.code&&(e.getUserList=s.datas),0===r.code&&(e.typeList=r.datas),0===n.code&&(e.levels=n.datas),l.code,0===o.code&&(e.resultList=o.datas),0===c.code&&(e.depOptions=c.data.children,e.setDeptList(e.depOptions))}).catch(function(e){console.log(e)})},getList:function(){var e=this;this.repairTime?(this.search_data.startTime=Object(c.b)(this.repairTime[0]),this.search_data.endTime=Object(c.b)(this.repairTime[1])):(this.search_data.startTime="",this.search_data.endTime=""),this.pictLoading=!0,this.$api.yxkAPI.yxkPost(d,this.search_data).then(function(t){e.pictLoading=!1,t.data?(e.total=t.data.total,e.tableData=t.data.records?t.data.records:[]):(e.total=0,e.tableData=[])}).catch(function(e){console.log(e)})},search:function(){this.search_data.pageno=1,this.getList()},handleCurrentChange:function(e){this.search_data.pageno=e,this.getList()},handleSizeChange:function(e){this.search_data.pagesize=e,this.getList()},add:function(){this.$router.push({path:"/wwbx/add",query:{s:this.$route.path,t:Date.
|