1 |
- webpackJsonp([85],{V72a:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={name:"customerWarning",data:function(){return{loading:!1,page:1,pages:0,total:0,page_size:20,tableData:[],height:"",dialogLoading:!1,dialogTableVisible:!1,warningNum:"",rule_id:"",ruleTitle:""}},created:function(){this.init(1)},methods:{edit:function(t){this.ruleTitle=t.rule,this.rule_id=t.rule_id,this.warningNum=t.setval,this.dialogTableVisible=!0},save:function(){var t=this;""!=this.warningNum?(this.dialogLoading=!0,this.$axios.post(this.URL.BASEURL+this.URL.warn_ruleConfOperate,{rule_id:this.rule_id,set_val:this.warningNum,sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():""}).then(function(e){(e=e.data)&&0==e.errno?(t.init(),t.dialogTableVisible=!1):4002!=e.errno&&t.$message({message:e.err,type:"warning"}),t.dialogLoading=!1}).catch(function(){t.dialogLoading=!1})):this.$message({message:"请输入预警人数",type:"warning"})},init:function(t){var e=this;this.page=t||this.page,this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.warn_ruleConfList,{params:{sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():""}}).then(function(t){t=t.data;e.loading=!1,t&&0==t.errno?e.tableData=t.rst:4002!=t.errno&&e.$message({message:t.err,type:"warning"})}).catch(function(t){e.loading=!1})},handleCurrentChange:function(t){this.init(t)}}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[i("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{height:"calc(100vh - 70px)",data:t.tableData,"tooltip-effect":"dark"}},[i("el-table-column",{attrs:{prop:"rule",label:"预警","show-overflow-tooltip":"",align:"center"}}),t._v(" "),i("el-table-column",{attrs:{label:"预警人数",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.setval||0==e.row.setval?e.row.setval+"人":"-")+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",{staticClass:"flex",staticStyle:{"justify-content":"center"}},[i("div",{staticClass:"c-00B38A pointer",staticStyle:{margin:"0 6px"},on:{click:function(i){return t.edit(e.row)}}},[t._v("编辑")])])]}}])})],1),t._v(" "),i("el-dialog",{staticClass:"dialogCon_permission",attrs:{title:t.ruleTitle,visible:t.dialogTableVisible,"append-to-body":!0,width:"500px"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[i("div",{staticClass:"dialogCon"},[i("div",{staticClass:"itemBox",staticStyle:{"margin-top":"0"}},[i("div",{staticClass:"name"},[i("em",[t._v("*")]),t._v("预警人数:")]),t._v(" "),i("div",{staticClass:"ipt"},[i("el-input",{attrs:{size:"small",type:"number",placeholder:"请输入预警人数"},model:{value:t.warningNum,callback:function(e){t.warningNum=e},expression:"warningNum"}})],1)])]),t._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{size:"mini"},on:{click:function(e){t.dialogTableVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){return t.save()}}},[t._v("保存")])],1)])],1)},staticRenderFns:[]};var s=i("VU/8")(a,n,!1,function(t){i("VbCx")},"data-v-6dd4cec0",null);e.default=s.exports},VbCx:function(t,e){}});
|