(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7395e3e5"],{aa98:function(e,t,n){"use strict";n.d(t,"o",(function(){return a})),n.d(t,"l",(function(){return c})),n.d(t,"n",(function(){return r})),n.d(t,"m",(function(){return u})),n.d(t,"p",(function(){return s})),n.d(t,"x",(function(){return d})),n.d(t,"g",(function(){return o})),n.d(t,"A",(function(){return l})),n.d(t,"B",(function(){return h})),n.d(t,"C",(function(){return v})),n.d(t,"u",(function(){return p})),n.d(t,"s",(function(){return f})),n.d(t,"e",(function(){return m})),n.d(t,"b",(function(){return g})),n.d(t,"w",(function(){return b})),n.d(t,"r",(function(){return j})),n.d(t,"h",(function(){return O})),n.d(t,"j",(function(){return C})),n.d(t,"z",(function(){return S})),n.d(t,"t",(function(){return y})),n.d(t,"k",(function(){return I})),n.d(t,"d",(function(){return T})),n.d(t,"a",(function(){return D})),n.d(t,"v",(function(){return N})),n.d(t,"f",(function(){return R})),n.d(t,"q",(function(){return k})),n.d(t,"c",(function(){return z})),n.d(t,"y",(function(){return w})),n.d(t,"i",(function(){return x}));n("55dd");var i=n("b775");function a(e){return Object(i["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort,seriesId:e.seriesId,imei:e.imei}})}function c(e){return Object(i["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort,seriesId:e.seriesId,imei:e.imei}})}function r(e){return Object(i["a"])({url:"/device/deviceInfo/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort,seriesId:e.seriesId,imei:e.imei}})}function u(e){return Object(i["a"])({url:"/device/deviceInfoExport/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function s(e){return Object(i["a"])({url:"/device/device/importDevice",method:"post",data:e})}function d(e){return Object(i["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function o(e){return Object(i["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function l(e){return Object(i["a"])({url:"/device/device/uploadDeivceChannelExcel",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function h(e){return Object(i["a"])({url:"/device/device/uploadDeivceExcel",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function v(e){return Object(i["a"])({url:"/device/deviceInfoExport/uploadDeviceInfoExport",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function p(e){return Object(i["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function f(e){return Object(i["a"])({url:"/device/device/queryDeviceChannelSetting",method:"post",data:e})}function m(e){return Object(i["a"])({url:"/device/channel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort,channelNum:e.channelNum}})}function g(e){return Object(i["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function b(e){return Object(i["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function j(){return Object(i["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function O(e){return Object(i["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function C(e){return Object(i["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}function S(e){return Object(i["a"])({url:"/device/deviceChannel/updateSettingDeviceChannel",method:"post",data:e})}function y(e){return Object(i["a"])({url:"/device/deviceChannel/queryTotalStatisticsDeviceChannel",method:"post",data:{channelIds:e}})}function I(e){return Object(i["a"])({url:"/device/deviceChannel/deleteStatisticsDeviceChannel",method:"post",data:e})}function T(e){return Object(i["a"])({url:"/device/deviceCarType/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function D(e){return Object(i["a"])({url:"/device/deviceCarType/add",method:"post",data:e})}function N(e){return Object(i["a"])({url:"/device/deviceCarType/edit",method:"post",data:e})}function R(e){return Object(i["a"])({url:"/device/deviceCarType/delete",method:"post",data:{ids:e}})}function k(e){return Object(i["a"])({url:"/device/deviceLinkProtocols/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function z(e){return Object(i["a"])({url:"/device/deviceLinkProtocols/add",method:"post",data:e})}function w(e){return Object(i["a"])({url:"/device/deviceLinkProtocols/edit",method:"post",data:e})}function x(e){return Object(i["a"])({url:"/device/deviceLinkProtocols/delete",method:"post",data:{ids:e}})}},c10e:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-container",[n("el-main",[n("el-form",{ref:"update",attrs:{model:e.device,rules:e.rules,"label-width":"80px"}},[n("el-form-item",{attrs:{prop:"channelNumsMessage",label:"终端提示文字"}},[n("el-input",{model:{value:e.device.channelNumsMessage,callback:function(t){e.$set(e.device,"channelNumsMessage",t)},expression:"device.channelNumsMessage"}})],1),e._v(" "),n("el-form-item",{attrs:{prop:"channelRules",label:"规则"}},[n("el-select",{attrs:{placeholder:"选择"},model:{value:e.device.channelRules,callback:function(t){e.$set(e.device,"channelRules",t)},expression:"device.channelRules"}},[n("el-option",{attrs:{label:"白名单",value:"0"}}),e._v(" "),n("el-option",{attrs:{label:"黑名单",value:"1"}})],1)],1),e._v(" "),n("el-transfer",{attrs:{data:e.selectChannelNumsData,titles:e.transferTitle},model:{value:e.device.channelIds,callback:function(t){e.$set(e.device,"channelIds",t)},expression:"device.channelIds"}}),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("修改")]),e._v(" "),n("el-button",{on:{click:e.toDeviceList}},[e._v("取消")])],1)],1)],1)],1)},a=[],c=(n("456d"),n("6762"),n("2fdb"),n("ac6a"),n("28a5"),n("96cf"),n("3b8d")),r=n("aa98"),u={channelNumsMessage:"终端提示文字",channelRules:"规则"},s={data:function(){var e=function(e,t,n){void 0===t||null===t||0===t.length?n(new Error(u[e.field]+"必须填写")):n()};return{loading:!1,device:{channelIds:[],channelNumsMessage:"",channelRules:"",imeis:[]},rules:{channelNumsMessage:[{validator:e}],channelRules:[{validator:e}]},selectSeriesOptions:[],transferTitle:["渠道号列表","已选择"],selectChannelNumsData:[]}},mounted:function(){this.deviceT=this.$route.query.device,this.getTransfer()},methods:{selectChannelNums:function(){var e=Object(c["a"])(regeneratorRuntime.mark((function e(t){var n,i=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:1===this.deviceT.channelRules?this.device.channelRules="黑名单":0===this.deviceT.channelRules&&(this.device.channelRules="白名单"),this.device.channelNumsMessage=this.deviceT.channelNumsMessage,this.device.deviceId=this.deviceT.deviceId,n=this.deviceT.channelNums.split(","),n.forEach((function(e){t.channelNum.includes(e)&&i.device.channelIds.push(t.channelId)}));case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),setDefault:function(){this.$refs.device=[]},getTransfer:function(){var e=Object(c["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:Object(r["r"])().then((function(e){var n=e.data;n.forEach((function(e){t.selectChannelNumsData.push({key:e.channelId,label:e.channelNum+"_"+e.brand}),t.selectChannelNums(e)}))}));case 1:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.update.validate((function(t,n){if(t)"黑名单"===e.device.channelRules?e.device.channelRules=1:"白名单"===e.device.channelRules&&(e.device.channelRules=0),Object(r["z"])(e.device).then((function(t){var n=t.msg;e.$notify({title:"操作成功",message:n,type:"success",duration:2e3}),e.setDefault(),e.toDeviceList(),e.loading=!1})).catch((function(){e.loading=!1}));else{var i=n[Object.keys(n)[0]][0].message;e.$message({message:i,type:"error"}),e.loading=!1}})))},toDeviceList:function(){this.$router.push({path:"/deviceManagement/deviceChannel"})}}},d=s,o=n("2877"),l=Object(o["a"])(d,i,a,!1,null,"1999b0f0",null);t["default"]=l.exports}}]);