Files
wysite/hc-pos.sqygj.cn/static/js/chunk-711c36ba.337cc4f0.js

1 line
13 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-711c36ba"],{"0b37":function(e,t,r){"use strict";function a(e,t){var r,a,n,i;try{r=e.toString().split(".")[1].length}catch(l){r=0}try{a=t.toString().split(".")[1].length}catch(l){a=0}if(i=Math.abs(r-a),n=Math.pow(10,Math.max(r,a)),i>0){var s=Math.pow(10,i);r>a?(e=Number(e.toString().replace(".","")),t=Number(t.toString().replace(".",""))*s):(e=Number(e.toString().replace(".",""))*s,t=Number(t.toString().replace(".","")))}else e=Number(e.toString().replace(".","")),t=Number(t.toString().replace(".",""));return(e+t)/n}function n(e,t){var r,a,n=0,i=0;try{n=e.toString().split(".")[1].length}catch(s){}try{i=t.toString().split(".")[1].length}catch(s){}return r=Number(e.toString().replace(".","")),a=Number(t.toString().replace(".","")),r/a*Math.pow(10,i-n)}function i(e,t){var r=0,a=e.toString(),n=t.toString();try{r+=a.split(".")[1].length}catch(i){}try{r+=n.split(".")[1].length}catch(i){}return Number(a.replace(".",""))*Number(n.replace(".",""))/Math.pow(10,r)}function s(e,t){var r,a,n,i;try{r=e.toString().split(".")[1].length}catch(s){r=0}try{a=t.toString().split(".")[1].length}catch(s){a=0}return n=Math.pow(10,Math.max(r,a)),i=r>=a?r:a,(Math.round(e*n-t*n)/n).toFixed(i)}function l(e,t){if(0==e&&(e=0),/[^[\-|0-9][0-9]*]/.test(e))return"0";if(null==e||""===e)return"";e=e.toString().replace(/^(-\d*)$/,"$1."),e=e.toString().replace(/^(\d*)$/,"$1."),e=(e+"00").replace(/(\d*\.\d\d)\d*/,"$1"),e=e.replace(".",",");var r=/(\d)(\d{3},)/;while(r.test(e))e=e.replace(r,"$1,$2");if(e=e.replace(/,(\d\d)$/,".$1"),0===t||void 0===t){var a=e.split(".");"00"==a[1]&&(e=a[0])}return e}function o(e,t){e=e.toString();var r=e.indexOf(".");return e=-1!==r?e.substring(0,t+r+1):e.substring(0),parseFloat(e).toFixed(t)}function u(e){var t=Object.prototype.toString.call(e).slice(8,-1);return"Null"===t?"Null":"Undefined"===t?"Undefined":t}function c(e){var t,r=u(e);if("Object"===r)t={};else{if("Array"!==r)return e;t=[]}for(var a in e){var n=e[a];u(n),t[a]=c(n)}return t}r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return s})),r.d(t,"g",(function(){return l})),r.d(t,"f",(function(){return o})),r.d(t,"e",(function(){return c}))},6396:function(e,t,r){"use strict";Math.easeInOutQuad=function(e,t,r,a){return e/=a/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};(function(){window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame})()},aa9e:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container "},[r("div",{ref:"box",staticClass:"searchStys transition_dom"},[r("el-form",{ref:"query",attrs:{model:e.query}},[r("div",{ref:"form_box",staticClass:"searchBar"},[r("div",{staticClass:"searchInput"},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:6}},[r("el-form-item",{attrs:{prop:"ruleName"}},[r("el-input",{attrs:{clearable:"",placeholder:"请输入预警名称"},model:{value:e.query.ruleName,callback:function(t){e.$set(e.query,"ruleName",t)},expression:"query.ruleName"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:6}},[r("el-form-item",{attrs:{prop:"type"}},[r("el-select",{attrs:{placeholder:"选择预警类别",clearable:""},model:{value:e.query.type,callback:function(t){e.$set(e.query,"type",t)},expression:"query.type"}},e._l(e.waringCategory,(function(e,t){return r("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:6}},[r("el-form-item",{attrs:{prop:"status"}},[r("el-select",{attrs:{placeholder:"选择预警状态",clearable:""},model:{value:e.query.status,callback:function(t){e.$set(e.query,"status",t)},expression:"query.status"}},e._l(e.statusList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1)],1),e._v(" "),r("div",{staticClass:"searchBtn"},[r("el-form-item",[r("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],on:{click:function(t){return e.resetForm("query")}}},[e._v("重置")]),e._v(" "),r("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary"},on:{click:e.onSearch}},[e._v("查询")])],1)],1)])])],1),e._v(" "),r("el-card",{staticClass:"box-card",attrs:{shadow:"never"}},[r("div",{staticClass:"planLst",attrs:{slot:"header"},slot:"header"},[r("span",{staticClass:"planTitle"},[e._v("预警规则列表")])]),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{border:"","header-cell-style":e.headClass,data:e.listData,"row-key":"qrUuid"}},[r("el-table-column",{attrs:{label:"#",fixed:"",align:"center",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.$index+(e.query.pageNumber-1)*e.query.pageSize+1)+" ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"预警名称","show-overflow-tooltip":"",prop:"ruleName"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"预警类别","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.getCategoryType(t.row.type)))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"黄灯预警指标M%)","show-overflow-tooltip":"",prop:"yellowLight"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.yellowLight))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"红灯预警指标N%","show-overflow-tooltip":"",prop:"redLight"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.redLight))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"状态","show-overflow-tooltip":"",prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(1===t.row.status?"未启用":"已启用"))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"130"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],class:1===t.row.status?"status-warning":"status-danger",attrs:{type:"text"},on:{click:function(r){return e.updataStatus(t.row)}}},[e._v(e._s(1===t.row.status?"启用":"禁用"))]),e._v(" "),r("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"text"},on:{click:function(r){return e.editDetail(t.row)}}},[e._v("编辑")])]}}])})],1),e._v(" "),r("div",{staticClass:"paginations"},[r("el-pagination",{attrs:{background:"","current-page":e.query.pageNumber,"page-sizes":[10,30,50,100,200],"page-size":e.query.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"update:currentPage":function(t){return e.$set(e.query,"pageNumber",t)},"update:current-page":function(t){return e.$set(e.query,"pageNumber",t)},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1),e._v(" "),r("el-dialog",{staticClass:"dialogHead",attrs:{title:e.title,visible:e.partyVisible,"show-close":!0,"close-on-press-escape":!1,"close-on-click-modal":!1,"destroy-on-close":"",width:"30%"},on:{"update:visible":function(t){e.partyVisible=t}}},[r("el-form",{ref:"infoList",attrs:{model:e.infoList,rules:e.rules,"label-width":"120px"}},[r("el-form-item",{attrs:{label:"预警名称",prop:"ruleName"}},[r("el-input",{attrs:{disabled:"",placeholder:"预警名称"},model:{value:e.infoList.ruleName,callback:function(t){e.$set(e.infoList,"ruleName",t)},expression:"infoList.ruleName"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"预警类别",prop:"type"}},[r("el-select",{attrs:{placeholder:"选择预警类别",clearable:""},model:{value:e.infoList.type,callback:function(t){e.$set(e.infoList,"type",t)},expression:"infoList.type"}},e._l(e.waringCategory,(function(e,t){return r("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"黄灯预警指标",prop:"yellowLight"}},[r("el-input",{attrs:{clearable:"",placeholder:"黄灯预警指标",maxlength:"6"},on:{input:function(t){return e.priceInput(t,"yellowLight")}},model:{value:e.infoList.yellowLight,callback:function(t){e.$set(e.infoList,"yellowLight",t)},expression:"infoList.yellowLight"}},[r("template",{slot:"append"},[e._v("%")])],2)],1),e._v(" "),r("el-form-item",{attrs:{label:"红灯预警指标",prop:"redLight"}},[r("el-input",{attrs:{clearable:"",placeholder:"黄灯预警指标",maxlength:"6"},on:{input:function(t){return e.priceInput(t,"redLight")}},model:{value:e.infoList.redLight,callback:function(t){e.$set(e.infoList,"redLight",t)},expression:"infoList.redLight"}},[r("template",{slot:"append"},[e._v("%")])],2)],1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],on:{click:function(t){e.partyVisible=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary",disabled:e.btnloading},on:{click:function(t){return e.submitParty("infoList")}}},[e._v("确 定")])],1)],1)],1)},n=[],i=r("333d"),s=r("7f76"),l=r("0b37"),o={components:{Pagination:i["a"]},data:function(){return{rules:{type:[{required:!0,message:"请选择预警类别",trigger:"change"}],yellowLight:[{required:!0,message:"请填写黄灯预警指标",trigger:"blur"}],redLight:[{required:!0,message:"请填写红灯预警指标",trigger:"blur"}]},partyVisible:!1,listData:[],listLoading:!1,total:0,title:"编辑预警规则",infoList:{ruleName:"",type:"",yellowLight:"",redLight:""},query:{pageNumber:1,pageSize:10,ruleName:"",type:"",status:"",projectUuid:""},btnloading:!1,waringCategory:[{value:1,label:"财务预警"},{value:2,label:"人资预警"},{value:3,label:"工单预警"},{value:4,label:"综合预警"},{value:5,label:"设备预警"},{value:6,label:"车厂预警"},{value:7,label:"能源预警"}],statusList:[{value:1,label:"未启用"},{value:2,label:"已启用"}]}},mounted:function(){},created:function(){this.getList(),this.headClass()},methods:{closeVisible:function(){this.$refs.infoList.resetFields()},getList:function(){var e=this;this.query.projectUuid=this.$store.state.community_uuid,""===this.query.ruleName&&delete this.query.ruleName,""===this.query.status&&delete this.query.status,""===this.query.type&&delete this.query.type,Object(s["W"])(this.query).then((function(t){e.listData=t.data.records,e.total=t.data.rowsCount}))},submitParty:function(e){var t=this;this.infoList.projectUuid=this.$store.state.community_uuid,this.infoList.operatorId=this.$store.state.user.userInfo.id,this.infoList.operatorName=this.$store.state.user.userInfo.memberName,this.btnloading=!0,this.$refs[e].validate((function(e){if(!e)return t.btnloading=!1,!1;t.updataInfo()}))},updataInfo:function(){var e=this,t=this.infoList;Object(s["X"])(t).then((function(t){0===t.code?(e.$message({message:"编辑成功",type:"success"}),e.partyVisible=!1,e.getList()):e.$message({message:"编辑失败",type:"error"}),e.btnloading=!1})).catch((function(t){e.btnloading=!1,e.$message({message:"编辑失败",type:"error"})}))},onSearch:function(){this.query.pageNumber=1,this.getList()},resetForm:function(e){this.$refs[e].resetFields(),this.query.pageNumber=1,this.getList()},editDetail:function(e){var t=Object(l["e"])(e);this.infoList=Object.assign(t,{}),this.partyVisible=!0},handleSizeChange:function(e){this.query.pageSize=e,this.getList()},headClass:function(){return"text-align:center;background:#FAFAFA;"},handleCurrentChange:function(e){this.query.pageNumber=e,this.getList()},formatTableNum3:function(e){return Object(l["g"])(100*e,0)},updataStatus:function(e){var t=this;this.$confirm("确定修改该数据状态吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0}).then((function(){var r={id:e.id,status:1===e.status?2:1,operatorId:t.$store.state.user.userInfo.id,operatorName:t.$store.state.user.userInfo.memberName};Object(s["X"])(r).then((function(e){0===e.code?(t.$message({message:"修改状态成功",type:"success"}),2===r.status&&t.updataStatisicRes()):t.$message({message:"修改状态失败",type:"error"}),t.getList()})).catch((function(e){t.$message({message:"修改状态失败",type:"error"})}))}))},updataStatisicRes:function(){Object(s["nb"])().then((function(e){e.code}))},getCategoryType:function(e){if(null!=e&&""!=e&&void 0!=e){var t=this.waringCategory.filter((function(t){return t.value===e}));return t.length>0?t[0].label:"-"}return"-"},priceInput:function(e,t){e=e.replace(/[^\d\.]/g,""),e=e.replace(/^\./g,""),e=e.replace(/^0\d[0-9]*/g,""),e=e.replace(/\.{2,}/g,"."),e=e.replace(".","$#$").replace(/\./g,"").replace("$#$","."),e=e.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),this.infoList[t]=e}}},u=o,c=(r("fe29"),r("829d")),p=Object(c["a"])(u,a,n,!1,null,"2fc1865c",null);t["default"]=p.exports},ee18:function(e,t,r){},fe29:function(e,t,r){"use strict";r("ee18")}}]);