Your Name
2022-10-25 df7046445cfdb39857f9fe1dc747ab04a61c860e
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-56df"],{V8mL:function(e,a,t){},cydO:function(e,a,t){"use strict";var n=t("V8mL");t.n(n).a},icW2:function(e,a,t){"use strict";t.r(a);var n=t("cLjf"),s=t.n(n),r=t("hDQ3"),l=t.n(r),i=t("8AG7"),o=t("XC6K"),c={name:"index",components:{approveBasicDialog:i.default},data:function(){return{tableData:{approveBasicData:[],total:0,loading:!1,params:{pageIndex:1,pageSize:10,searchParams:{ruleStandType:null,title:null}}},ruleStandTypeList:[{id:1,name:"可燃气体"},{id:3,name:"有毒有害气体"},{id:2,name:"氧气"}],typeList:[{id:1,name:"大于"},{id:2,name:"等于"},{id:4,name:"大于等于"}],typeTwoList:[{id:3,name:"小于"},{id:2,name:"等于"},{id:5,name:"小于等于"}],deleteList:{ids:[]}}},created:function(){this.getInspectionTask()},methods:{getInspectionTask:function(){var e=this;return l()(s.a.mark(function a(){var t;return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Object(o.a)().getApproveBasicList(e.tableData.params);case 2:"200"===(t=a.sent).data.code?(e.tableData.approveBasicData=t.data.data,e.tableData.total=t.data.total):e.$message({type:"warning",message:t.data.msg});case 4:case"end":return a.stop()}},a,e)}))()},parseNumber:function(e,a){return"标准类型"===a?this.ruleStandTypeList.find(function(a){return a.id===e}).name:"最高值"===a?this.typeTwoList.find(function(a){return a.id==e}).name:this.typeList.find(function(a){return a.id==e}).name},handleSelectionChange:function(e){this.deleteList.ids=e.map(function(e){return e.ruleStandId})},openApproveBasicDialog:function(e,a){this.$refs.approveBasicDialogRef.showApproveBasicDialog(e,a)},deleteApproveBasic:function(e){var a=this;this.$confirm("此操作将永久删除该任务:“"+e.title+"”,是否继续?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(l()(s.a.mark(function t(){var n;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(o.a)().deleteApproveBasic({ids:[e.ruleStandId]});case 2:if("200"!==(n=t.sent).data.code){t.next=10;break}return a.deleteList.ids=[],a.$message({type:"success",duration:2e3,message:"删除成功"}),t.next=8,a.getInspectionTask();case 8:t.next=11;break;case 10:a.$message({type:"warning",message:n.data.msg});case 11:case"end":return t.stop()}},t,a)}))).catch(function(){})},deleteMoreApproveBasic:function(){var e=this;this.$confirm("此操作将永久删除这些标准项,是否继续?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(l()(s.a.mark(function a(){var t;return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Object(o.a)().deleteApproveBasic(e.deleteList);case 2:if("200"!==(t=a.sent).data.code){a.next=9;break}return e.$message({type:"success",duration:2e3,message:"删除成功"}),a.next=7,e.getInspectionTask();case 7:a.next=10;break;case 9:e.$message({type:"warning",message:t.data.msg});case 10:case"end":return a.stop()}},a,e)}))).catch(function(){})},onHandleSizeChange:function(e){this.tableData.params.pageSize=e,this.getInspectionTask()},onHandleCurrentChange:function(e){this.tableData.params.pageIndex=e,this.getInspectionTask()},reset:function(){this.tableData.params={pageIndex:1,pageSize:10,searchParams:{ruleStandType:null,title:null}}}}},p=(t("cydO"),t("ZrdR")),u=Object(p.a)(c,function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"home-container"},[t("div",{staticStyle:{height:"100%"}},[t("el-row",{staticClass:"homeCard"},[t("div",{staticClass:"basic-line"},[t("span",[e._v("标准类型:")]),e._v(" "),t("el-select",{staticClass:"input-box",attrs:{clearable:"",filterable:"",placeholder:"标准类型"},model:{value:e.tableData.params.searchParams.ruleStandType,callback:function(a){e.$set(e.tableData.params.searchParams,"ruleStandType",a)},expression:"tableData.params.searchParams.ruleStandType"}},e._l(e.ruleStandTypeList,function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),t("div",{staticClass:"basic-line"},[t("span",[e._v("标题:")]),e._v(" "),t("el-input",{staticClass:"input-box",attrs:{clearable:"",filterable:"",placeholder:"标题"},model:{value:e.tableData.params.searchParams.title,callback:function(a){e.$set(e.tableData.params.searchParams,"title","string"==typeof a?a.trim():a)},expression:"tableData.params.searchParams.title"}})],1),e._v(" "),t("div",{staticStyle:{"padding-bottom":"10px"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.getInspectionTask}},[e._v("查询")]),e._v(" "),t("el-button",{attrs:{plain:""},on:{click:e.reset}},[e._v("重置")])],1)]),e._v(" "),t("div",{staticClass:"homeCard"},[t("div",{staticClass:"main-card"},[t("el-row",{staticClass:"cardTop"},[t("el-col",{staticClass:"mainCardBtn",attrs:{span:24}},[t("el-button",{attrs:{type:"primary",size:"default"},on:{click:function(a){e.openApproveBasicDialog("新增",{})}}},[e._v("新建")]),e._v(" "),t("el-button",{attrs:{type:"danger",size:"default",plain:""},on:{click:e.deleteMoreApproveBasic}},[e._v("批量删除")])],1)],1),e._v(" "),t("el-table",{ref:"multipleTableRef",staticStyle:{width:"100%"},attrs:{data:e.tableData.approveBasicData,height:"calc(100% - 100px)","header-cell-style":{background:"#fafafa"}},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),t("el-table-column",{attrs:{property:"title",label:"标题"}}),e._v(" "),t("el-table-column",{attrs:{property:"ruleStandType",label:"标准类型"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v("\n                                "+e._s(e.parseNumber(a.row.ruleStandType,"标准类型"))+"\n                            ")])]}}])}),e._v(" "),t("el-table-column",{attrs:{property:"minVal",label:"最低值"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v("\n                                "+e._s(e.parseNumber(a.row.minValMatchPattern,"最低值"))+"\n                            ")]),e._v(" "),t("span",[e._v("\n                                "+e._s(a.row.minVal)+"\n                            ")])]}}])}),e._v(" "),t("el-table-column",{attrs:{property:"maxVal",label:"最高值"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v("\n                                "+e._s(e.parseNumber(a.row.maxValMatchPattern,"最高值"))+"\n                            ")]),e._v(" "),t("span",[e._v("\n                                "+e._s(a.row.maxVal)+"\n                            ")])]}}])}),e._v(" "),t("el-table-column",{attrs:{property:"info",label:"描述"}}),e._v(" "),t("el-table-column",{attrs:{prop:"createUname",label:"创建人","show-overflow-tooltip":""}}),e._v(" "),t("el-table-column",{attrs:{prop:"gmtCreate",label:"创建时间","show-overflow-tooltip":""}}),e._v(" "),t("el-table-column",{attrs:{prop:"modifiedUname",label:"最后修改人","show-overflow-tooltip":""}}),e._v(" "),t("el-table-column",{attrs:{prop:"gmtModified",label:"最后修改时间","show-overflow-tooltip":""}}),e._v(" "),t("el-table-column",{attrs:{fixed:"right",label:"操作",align:"center",width:"300"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{link:"",type:"text",size:"small"},on:{click:function(t){e.openApproveBasicDialog("查看",a.row)}}},[e._v("查看")]),e._v(" "),t("el-button",{attrs:{link:"",type:"text",size:"small"},on:{click:function(t){e.openApproveBasicDialog("修改",a.row)}}},[e._v("修改")]),e._v(" "),t("el-button",{staticStyle:{color:"red"},attrs:{link:"",type:"text",size:"small"},on:{click:function(t){e.deleteApproveBasic(a.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),t("el-pagination",{staticClass:"page-position",attrs:{"pager-count":5,"page-sizes":[10,20,30],background:"",layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.onHandleSizeChange,"current-change":e.onHandleCurrentChange},model:{value:e.tableData.params.pageSize,callback:function(a){e.$set(e.tableData.params,"pageSize",a)},expression:"tableData.params.pageSize"}})],1)])],1),e._v(" "),t("approve-basic-dialog",{ref:"approveBasicDialogRef",on:{refreshApproveBasic:e.getInspectionTask}})],1)},[],!1,null,"0c3c1518",null);u.options.__file="index.vue";a.default=u.exports}}]);