Commit 9fb6c8cc by zzrdark

1.增加批量配置模块和页面

parent 329175e5
...@@ -36,10 +36,10 @@ public class UploadDeviceChannelExcelDto implements Serializable { ...@@ -36,10 +36,10 @@ public class UploadDeviceChannelExcelDto implements Serializable {
/** /**
* 渠道号Ids * 渠道号Ids
*/ */
private List<Long> channelIds; private List<Long> channelNums;
@Data @Data
static class UploadDeviceChannelExcelInfoDto implements Serializable { public static class UploadDeviceChannelExcelInfoDto implements Serializable {
private String imei; private String imei;
private String iccid; private String iccid;
......
...@@ -64,6 +64,9 @@ public interface DeviceClient { ...@@ -64,6 +64,9 @@ public interface DeviceClient {
@PostMapping("/device/info/delete") @PostMapping("/device/info/delete")
void deleteDevice(@RequestBody List<Long> ids); void deleteDevice(@RequestBody List<Long> ids);
@PostMapping("/device/info/uploadDeivceChannelExcel")
void uploadDeivceChannelExcel(@RequestBody UploadDeviceChannelExcelDto dto);
@PostMapping("/device/devicechannel/list") @PostMapping("/device/devicechannel/list")
...@@ -99,6 +102,4 @@ public interface DeviceClient { ...@@ -99,6 +102,4 @@ public interface DeviceClient {
@PostMapping("/device/devicechannel/queryTotalStatisticsDeviceChannel") @PostMapping("/device/devicechannel/queryTotalStatisticsDeviceChannel")
List<DeviceChannelStatisticsDto> queryTotalStatisticsDeviceChannel(@RequestBody(required = false) List<Long> channelIds); List<DeviceChannelStatisticsDto> queryTotalStatisticsDeviceChannel(@RequestBody(required = false) List<Long> channelIds);
@PostMapping("/device/info/uploadDeivceChannelExcel")
void uploadDeivceChannelExcel(@RequestBody UploadDeviceChannelExcelDto dto);
} }
...@@ -314,6 +314,7 @@ public class DeviceController { ...@@ -314,6 +314,7 @@ public class DeviceController {
public R uploadDeivceChannelExcel(@RequestBody UploadDeviceChannelExcelVo vo){ public R uploadDeivceChannelExcel(@RequestBody UploadDeviceChannelExcelVo vo){
UploadDeviceChannelExcelDto dto = new UploadDeviceChannelExcelDto(); UploadDeviceChannelExcelDto dto = new UploadDeviceChannelExcelDto();
BeanUtils.copyProperties(vo,dto); BeanUtils.copyProperties(vo,dto);
deviceClient.uploadDeivceChannelExcel(dto);
return R.ok(); return R.ok();
} }
......
spring: spring:
profiles: profiles:
active: dev active: prod
application: application:
name: cneeds-server-datashow name: cneeds-server-datashow
server: server:
......
.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}
\ No newline at end of file
.excel-upload-input[data-v-bad043b2]{display:none;z-index:-9999}.drop[data-v-bad043b2]{border:2px dashed #bbb;width:600px;height:160px;line-height:160px;margin:0 auto;font-size:24px;border-radius:5px;text-align:center;color:#bbb;position:relative}
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-06ed166b"],{"0173":function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("el-container",[t("el-main",[t("el-form",{ref:"editChannel",attrs:{model:e.channel,rules:e.rules,"label-width":"80px"}},[t("el-form-item",{attrs:{prop:"seriesNum",label:"渠道号"}},[t("el-input",{model:{value:e.channel.channelNum,callback:function(n){e.$set(e.channel,"channelNum",n)},expression:"channel.channelNum"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"remark",label:"品牌描述:"}},[t("el-input",{model:{value:e.channel.brand,callback:function(n){e.$set(e.channel,"brand",n)},expression:"channel.brand"}})],1),e._v(" "),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("修改")]),e._v(" "),t("el-button",{on:{click:e.toDeviceChannelList}},[e._v("取消")])],1)],1)],1)],1)},i=[],c=(t("ac6a"),t("456d"),t("aa98")),r={channelNum:"渠道号",brand:"品牌描述"},u={data:function(){var e=function(e,n,t){0===n.length?t(new Error(r[e.field]+"必须填写")):t()};return{loading:!1,channel:{channelNum:"",brand:""},rules:{channelNum:[{validator:e}],brand:[{validator:e}]}}},mounted:function(){this.channel=this.$route.query.channel},methods:{setDefault:function(){this.$refs.editChannel.resetFields()},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.editChannel.validate((function(n,t){if(n)Object(c["k"])(e.channel).then((function(n){var t=n.msg;e.$notify({title:"操作成功",message:t,type:"success",duration:2e3}),e.loading=!1,e.setDefault(),e.toDeviceChannelList()})).catch((function(){e.loading=!1}));else{var a=t[Object.keys(t)[0]][0].message;e.$message({message:a,type:"error"}),e.loading=!1}})))},handleChange:function(e){var n=e.length;n-=1,this.dept.parentId=e[n]},toDeviceChannelList:function(){this.$router.push({path:"/configManagement/deviceChannel"})}}},o=u,d=t("2877"),l=Object(d["a"])(o,a,i,!1,null,"1c8c5750",null);n["default"]=l.exports},aa98:function(e,n,t){"use strict";t.d(n,"f",(function(){return i})),t.d(n,"g",(function(){return c})),t.d(n,"l",(function(){return r})),t.d(n,"b",(function(){return u})),t.d(n,"n",(function(){return o})),t.d(n,"j",(function(){return d})),t.d(n,"e",(function(){return l})),t.d(n,"a",(function(){return s})),t.d(n,"k",(function(){return h})),t.d(n,"h",(function(){return v})),t.d(n,"c",(function(){return f})),t.d(n,"d",(function(){return p})),t.d(n,"m",(function(){return m})),t.d(n,"i",(function(){return b}));t("55dd");var a=t("b775");function i(e){return Object(a["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function c(e){return Object(a["a"])({url:"/device/device/importDevice",method:"post",data:e})}function r(e){return Object(a["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function u(e){return Object(a["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function o(e){return Object(a["a"])({url:"/device/device/uploadDeivceChannelExcel",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function d(e){return Object(a["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function l(e){return Object(a["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function s(e){return Object(a["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function h(e){return Object(a["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function v(){return Object(a["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function f(e){return Object(a["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function p(e){return Object(a["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}function m(e){return Object(a["a"])({url:"/device/deviceChannel/updateSettingDeviceChannel",method:"post",data:{device:e}})}function b(e){return Object(a["a"])({url:"/device/deviceChannel/queryTotalStatisticsDeviceChannel",method:"post",data:{channelIds:e}})}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-06ed166b"],{"0173":function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("el-container",[t("el-main",[t("el-form",{ref:"editChannel",attrs:{model:e.channel,rules:e.rules,"label-width":"80px"}},[t("el-form-item",{attrs:{prop:"seriesNum",label:"渠道号"}},[t("el-input",{model:{value:e.channel.channelNum,callback:function(n){e.$set(e.channel,"channelNum",n)},expression:"channel.channelNum"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"remark",label:"品牌描述:"}},[t("el-input",{model:{value:e.channel.brand,callback:function(n){e.$set(e.channel,"brand",n)},expression:"channel.brand"}})],1),e._v(" "),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("修改")]),e._v(" "),t("el-button",{on:{click:e.toSeriesList}},[e._v("取消")])],1)],1)],1)],1)},i=[],r=(t("ac6a"),t("456d"),t("aa98")),c={channelNum:"渠道号",brand:"品牌描述"},u={data:function(){var e=function(e,n,t){0===n.length?t(new Error(c[e.field]+"必须填写")):t()};return{loading:!1,channel:{channelNum:"",brand:""},rules:{seriesNum:[{validator:e}],remark:[{validator:e}]}}},mounted:function(){this.channel=this.$route.query.channel},methods:{setDefault:function(){this.$refs.editSeries.resetFields()},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.editChannel.validate((function(n,t){if(n)Object(r["j"])(e.channel).then((function(n){var t=n.msg;e.$notify({title:"操作成功",message:t,type:"success",duration:2e3}),e.loading=!1,e.setDefault(),e.toSeriesList()})).catch((function(){e.loading=!1}));else{var a=t[Object.keys(t)[0]][0].message;e.$message({message:a,type:"error"}),e.loading=!1}})))},handleChange:function(e){var n=e.length;n-=1,this.dept.parentId=e[n]},toSeriesList:function(){this.$router.push({path:"/configManagement/deviceChannel"})}}},o=u,d=t("2877"),l=Object(d["a"])(o,a,i,!1,null,"7db5c585",null);n["default"]=l.exports},aa98:function(e,n,t){"use strict";t.d(n,"f",(function(){return i})),t.d(n,"g",(function(){return r})),t.d(n,"k",(function(){return c})),t.d(n,"b",(function(){return u})),t.d(n,"i",(function(){return o})),t.d(n,"e",(function(){return d})),t.d(n,"a",(function(){return l})),t.d(n,"j",(function(){return s})),t.d(n,"h",(function(){return h})),t.d(n,"c",(function(){return f})),t.d(n,"d",(function(){return v}));t("55dd");var a=t("b775");function i(e){return Object(a["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function r(e){return Object(a["a"])({url:"/device/device/importDevice",method:"post",data:e})}function c(e){return Object(a["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function u(e){return Object(a["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function o(e){return Object(a["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function d(e){return Object(a["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function l(e){return Object(a["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function h(){return Object(a["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function f(e){return Object(a["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function v(e){return Object(a["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1a86e192"],{"1c64":function(e,t,n){},"1cc6":function(e,t,n){"use strict";var i=n("1c64"),a=n.n(i);a.a},"333d":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[n("el-pagination",e._b({attrs:{background:e.background,"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},a=[];n("c5f6");Math.easeInOutQuad=function(e,t,n,i){return e/=i/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var o=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function r(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function c(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function l(e,t,n){var i=c(),a=e-i,l=20,u=0;t="undefined"===typeof t?500:t;var s=function e(){u+=l;var c=Math.easeInOutQuad(u,i,a,t);r(c),u<t?o(e):n&&"function"===typeof n&&n()};s()}var u={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:20},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&l(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&l(0,800)}}},s=u,d=(n("1cc6"),n("2877")),p=Object(d["a"])(s,i,a,!1,null,"f3b72548",null);t["a"]=p.exports},"8d41":function(e,t,n){},"99b8":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-header",[n("div",{staticStyle:{margin:"20px 0"}},[n("el-button",{on:{click:e.addPage}},[e._v("导入设备")]),e._v(" "),n("el-button",{on:{click:e.editSeriesPage}},[e._v("变更产品系列")]),e._v(" "),n("el-button",{on:{click:e.setChannelPage}},[e._v("适配配置")]),e._v(" "),n("el-button",{on:{click:e.deletePage}},[e._v("删除设备")])],1)]),e._v(" "),n("el-main",[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,staticStyle:{width:"100%"},attrs:{data:e.list,border:"",fit:"","highlight-current-row":"","default-sort":e.defaultSort},on:{"sort-change":e.sortChange,"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),n("el-table-column",{attrs:{label:"设备ID",prop:"deviceId",sortable:"custom",align:"center",width:"80"}}),e._v(" "),n("el-table-column",{attrs:{label:"产品系列",prop:"seriesNum",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"imei",prop:"imei",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"创建时间",prop:"createTime",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row.createTime;return[n("span",[e._v(e._s(e._f("timeFilter")(i)))])]}}])})],1),e._v(" "),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.listQuery.page,limit:e.listQuery.pageSize},on:{"update:page":function(t){return e.$set(e.listQuery,"page",t)},"update:limit":function(t){return e.$set(e.listQuery,"pageSize",t)},pagination:e.refresh}})],1)],1)},a=[],o=(n("ac6a"),n("333d")),r=n("c7a7"),c=n("ed08"),l=n("aa98"),u={components:{Pagination:o["a"]},directives:{waves:r["a"]},filters:{valueFilter:function(e){return e||"无"},timeFilter:function(e){return e?Object(c["d"])(e,"{y}-{m}-{d} {h}:{i}"):"无"}},data:function(){return{tableKey:0,listLoading:!0,listQuery:{pageSize:10},list:[],total:0,defaultSort:{},multipleSelection:[],device:{imei:""},deviceIds:[]}},created:function(){},mounted:function(){this.getList()},beforeRouteUpdate:function(e,t,n){if(e.path===t.path){var i=Object.assign({},e.query),a=Object.assign({},t.query);JSON.stringify(i)!==JSON.stringify(a)&&this.getList()}n()},methods:{handleSelectionChange:function(e){this.multipleSelection=e},sortChange:function(e){console.log("sortChange",e);var t=e.prop,n=e.order;this.sortBy(t,n)},sortBy:function(e,t){this.listQuery.sort="ascending"===t?"+".concat(e):"-".concat(e),this.handleFilter()},getList:function(){var e=this;this.listLoading=!0,Object(l["f"])(this.listQuery).then((function(t){var n=t.data,i=n.list,a=n.totalCount;e.list=i,e.total=a,e.listLoading=!1}))},addPage:function(){this.$router.push({path:"/deviceManagement/device/importDevice"})},editSeriesPage:function(){if(0!==this.multipleSelection.length){var e=[];this.multipleSelection.forEach((function(t){e.push(t.imei)})),this.$router.push({path:"/deviceManagement/device/editSeries",query:{imeis:e}})}else{var t="必须选一列";this.$message({message:t,type:"error"})}},setChannelPage:function(){if(0!==this.multipleSelection.length){var e=[];this.multipleSelection.forEach((function(t){e.push(t.imei)})),this.$router.push({path:"/deviceManagement/device/setChannelNum",query:{imeis:e}})}else{var t="必须选一列";this.$message({message:t,type:"error"})}},deletePage:function(){var e=this;if(0!==this.multipleSelection.length)this.multipleSelection.forEach((function(t){e.deviceIds.push(t.deviceId)})),Object(l["b"])(this.deviceIds).then((function(t){e.getList()})),this.deviceIds=[];else{var t="必须选一列";this.$message({message:t,type:"error"})}},refresh:function(){this.$router.push({path:"/deviceManagement/device",query:this.listQuery})},handleFilter:function(){console.log("handleFilter",this.listQuery),this.listQuery.page=1,this.refresh()}}},s=u,d=n("2877"),p=Object(d["a"])(s,i,a,!1,null,"12480eda",null);t["default"]=p.exports},aa98:function(e,t,n){"use strict";n.d(t,"f",(function(){return a})),n.d(t,"g",(function(){return o})),n.d(t,"k",(function(){return r})),n.d(t,"b",(function(){return c})),n.d(t,"i",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return s})),n.d(t,"j",(function(){return d})),n.d(t,"h",(function(){return p})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return f}));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}})}function o(e){return Object(i["a"])({url:"/device/device/importDevice",method:"post",data:e})}function r(e){return Object(i["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function l(e){return Object(i["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function u(e){return Object(i["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function s(e){return Object(i["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function d(e){return Object(i["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function p(){return Object(i["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function h(e){return Object(i["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function f(e){return Object(i["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}},c7a7:function(e,t,n){"use strict";n("8d41");var i="@@wavesContext";function a(e,t){function n(n){var i=Object.assign({},t.value),a=Object.assign({ele:e,type:"hit",color:"rgba(0, 0, 0, 0.15)"},i),o=a.ele;if(o){o.style.position="relative",o.style.overflow="hidden";var r=o.getBoundingClientRect(),c=o.querySelector(".waves-ripple");switch(c?c.className="waves-ripple":(c=document.createElement("span"),c.className="waves-ripple",c.style.height=c.style.width=Math.max(r.width,r.height)+"px",o.appendChild(c)),a.type){case"center":c.style.top=r.height/2-c.offsetHeight/2+"px",c.style.left=r.width/2-c.offsetWidth/2+"px";break;default:c.style.top=(n.pageY-r.top-c.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",c.style.left=(n.pageX-r.left-c.offsetWidth/2-document.documentElement.scrollLeft||document.body.scrollLeft)+"px"}return c.style.backgroundColor=a.color,c.className="waves-ripple z-active",!1}}return e[i]?e[i].removeHandle=n:e[i]={removeHandle:n},n}t["a"]={bind:function(e,t){e.addEventListener("click",a(e,t),!1)},update:function(e,t){e.removeEventListener("click",e[i].removeHandle,!1),e.addEventListener("click",a(e,t),!1)},unbind:function(e){e.removeEventListener("click",e[i].removeHandle,!1),e[i]=null,delete e[i]}}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-22e5f704"],{3304:function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("el-container",[t("el-main",[t("el-form",{ref:"addChannel",attrs:{model:e.channel,rules:e.rules,"label-width":"80px"}},[t("el-form-item",{attrs:{prop:"seriesNum",label:"渠道号"}},[t("el-input",{model:{value:e.channel.channelNum,callback:function(n){e.$set(e.channel,"channelNum",n)},expression:"channel.channelNum"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"remark",label:"品牌车型:"}},[t("el-input",{attrs:{placeholder:"奥迪-车系"},model:{value:e.channel.brand,callback:function(n){e.$set(e.channel,"brand",n)},expression:"channel.brand"}})],1),e._v(" "),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("添加")]),e._v(" "),t("el-button",{on:{click:e.toSeriesList}},[e._v("取消")])],1)],1)],1)],1)},r=[],i=(t("ac6a"),t("456d"),t("aa98")),c={channelNum:"渠道号",brand:"品牌车型"},o={data:function(){var e=function(e,n,t){0===n.length?t(new Error(c[e.field]+"必须填写")):t()};return{loading:!1,channel:{channelNum:"",brand:""},rules:{channelNum:[{validator:e}],brand:[{validator:e}]}}},mounted:function(){},methods:{setDefault:function(){this.$refs.addSeries.resetFields()},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.addChannel.validate((function(n,t){if(n)Object(i["a"])(e.channel).then((function(n){var t=n.msg;e.$notify({title:"操作成功",message:t,type:"success",duration:2e3}),e.loading=!1,e.setDefault(),e.toSeriesList()})).catch((function(){e.loading=!1}));else{var a=t[Object.keys(t)[0]][0].message;e.$message({message:a,type:"error"}),e.loading=!1}})))},toSeriesList:function(){this.$router.push({path:"/configManagement/deviceChannel"})}}},u=o,d=t("2877"),l=Object(d["a"])(u,a,r,!1,null,"5398e163",null);n["default"]=l.exports},aa98:function(e,n,t){"use strict";t.d(n,"f",(function(){return r})),t.d(n,"g",(function(){return i})),t.d(n,"k",(function(){return c})),t.d(n,"b",(function(){return o})),t.d(n,"i",(function(){return u})),t.d(n,"e",(function(){return d})),t.d(n,"a",(function(){return l})),t.d(n,"j",(function(){return s})),t.d(n,"h",(function(){return h})),t.d(n,"c",(function(){return f})),t.d(n,"d",(function(){return v}));t("55dd");var a=t("b775");function r(e){return Object(a["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function i(e){return Object(a["a"])({url:"/device/device/importDevice",method:"post",data:e})}function c(e){return Object(a["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function o(e){return Object(a["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function u(e){return Object(a["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function d(e){return Object(a["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function l(e){return Object(a["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function h(){return Object(a["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function f(e){return Object(a["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function v(e){return Object(a["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-22e5f704"],{3304:function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("el-container",[t("el-main",[t("el-form",{ref:"addChannel",attrs:{model:e.channel,rules:e.rules,"label-width":"80px"}},[t("el-form-item",{attrs:{prop:"seriesNum",label:"渠道号"}},[t("el-input",{model:{value:e.channel.channelNum,callback:function(n){e.$set(e.channel,"channelNum",n)},expression:"channel.channelNum"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"remark",label:"品牌车型:"}},[t("el-input",{attrs:{placeholder:"奥迪-车系"},model:{value:e.channel.brand,callback:function(n){e.$set(e.channel,"brand",n)},expression:"channel.brand"}})],1),e._v(" "),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("添加")]),e._v(" "),t("el-button",{on:{click:e.toSeriesList}},[e._v("取消")])],1)],1)],1)],1)},i=[],r=(t("ac6a"),t("456d"),t("aa98")),c={channelNum:"渠道号",brand:"品牌车型"},d={data:function(){var e=function(e,n,t){0===n.length?t(new Error(c[e.field]+"必须填写")):t()};return{loading:!1,channel:{channelNum:"",brand:""},rules:{channelNum:[{validator:e}],brand:[{validator:e}]}}},mounted:function(){},methods:{setDefault:function(){this.$refs.addSeries.resetFields()},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.addChannel.validate((function(n,t){if(n)Object(r["a"])(e.channel).then((function(n){var t=n.msg;e.$notify({title:"操作成功",message:t,type:"success",duration:2e3}),e.loading=!1,e.setDefault(),e.toSeriesList()})).catch((function(){e.loading=!1}));else{var a=t[Object.keys(t)[0]][0].message;e.$message({message:a,type:"error"}),e.loading=!1}})))},toSeriesList:function(){this.$router.push({path:"/configManagement/deviceChannel"})}}},o=d,u=t("2877"),l=Object(u["a"])(o,a,i,!1,null,"5398e163",null);n["default"]=l.exports},aa98:function(e,n,t){"use strict";t.d(n,"f",(function(){return i})),t.d(n,"g",(function(){return r})),t.d(n,"l",(function(){return c})),t.d(n,"b",(function(){return d})),t.d(n,"n",(function(){return o})),t.d(n,"j",(function(){return u})),t.d(n,"e",(function(){return l})),t.d(n,"a",(function(){return s})),t.d(n,"k",(function(){return h})),t.d(n,"h",(function(){return f})),t.d(n,"c",(function(){return v})),t.d(n,"d",(function(){return p})),t.d(n,"m",(function(){return m})),t.d(n,"i",(function(){return b}));t("55dd");var a=t("b775");function i(e){return Object(a["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function r(e){return Object(a["a"])({url:"/device/device/importDevice",method:"post",data:e})}function c(e){return Object(a["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function d(e){return Object(a["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function o(e){return Object(a["a"])({url:"/device/device/uploadDeivceChannelExcel",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function u(e){return Object(a["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function l(e){return Object(a["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function s(e){return Object(a["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function h(e){return Object(a["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function f(){return Object(a["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function v(e){return Object(a["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function p(e){return Object(a["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}function m(e){return Object(a["a"])({url:"/device/deviceChannel/updateSettingDeviceChannel",method:"post",data:{device:e}})}function b(e){return Object(a["a"])({url:"/device/deviceChannel/queryTotalStatisticsDeviceChannel",method:"post",data:{channelIds:e}})}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-25a34ff8"],{"1c64":function(e,t,n){},"1cc6":function(e,t,n){"use strict";var i=n("1c64"),a=n.n(i);a.a},"333d":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[n("el-pagination",e._b({attrs:{background:e.background,"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},a=[];n("c5f6");Math.easeInOutQuad=function(e,t,n,i){return e/=i/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function o(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function l(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function c(e,t,n){var i=l(),a=e-i,c=20,u=0;t="undefined"===typeof t?500:t;var s=function e(){u+=c;var l=Math.easeInOutQuad(u,i,a,t);o(l),u<t?r(e):n&&"function"===typeof n&&n()};s()}var u={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:20},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&c(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&c(0,800)}}},s=u,d=(n("1cc6"),n("2877")),p=Object(d["a"])(s,i,a,!1,null,"f3b72548",null);t["a"]=p.exports},"8d41":function(e,t,n){},aa98:function(e,t,n){"use strict";n.d(t,"f",(function(){return a})),n.d(t,"g",(function(){return r})),n.d(t,"k",(function(){return o})),n.d(t,"b",(function(){return l})),n.d(t,"i",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return s})),n.d(t,"j",(function(){return d})),n.d(t,"h",(function(){return p})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return f}));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}})}function r(e){return Object(i["a"])({url:"/device/device/importDevice",method:"post",data:e})}function o(e){return Object(i["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function l(e){return Object(i["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function c(e){return Object(i["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function u(e){return Object(i["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function s(e){return Object(i["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function d(e){return Object(i["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function p(){return Object(i["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function h(e){return Object(i["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function f(e){return Object(i["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}},b2dd: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-header",[n("div",{staticStyle:{margin:"20px 0"}},[n("el-button",{on:{click:e.setChannelPage}},[e._v("变更")]),e._v(" "),n("el-button",{on:{click:e.deletePage}},[e._v("删除")])],1)]),e._v(" "),n("el-main",[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,staticStyle:{width:"100%"},attrs:{data:e.list,border:"",fit:"","highlight-current-row":"","default-sort":e.defaultSort},on:{"sort-change":e.sortChange,"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),n("el-table-column",{attrs:{label:"设备ID",prop:"deviceId",sortable:"custom",align:"center",width:"80"}}),e._v(" "),n("el-table-column",{attrs:{label:"产品系列",prop:"seriesNum",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"imei",prop:"imei",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"规则",prop:"channelRules",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row.channelRules;return[n("span",[e._v(e._s(e._f("channelRulesFilter")(i)))])]}}])}),e._v(" "),n("el-table-column",{attrs:{label:"渠道号",prop:"channelNums",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"禁用提示文字",prop:"channelNumsMessage",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"创建时间",prop:"createTime",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row.createTime;return[n("span",[e._v(e._s(e._f("timeFilter")(i)))])]}}])})],1),e._v(" "),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.listQuery.page,limit:e.listQuery.pageSize},on:{"update:page":function(t){return e.$set(e.listQuery,"page",t)},"update:limit":function(t){return e.$set(e.listQuery,"pageSize",t)},pagination:e.refresh}})],1)],1)},a=[],r=(n("ac6a"),n("333d")),o=n("c7a7"),l=n("ed08"),c=n("aa98"),u={components:{Pagination:r["a"]},directives:{waves:o["a"]},filters:{valueFilter:function(e){return e||"无"},timeFilter:function(e){return e?Object(l["d"])(e,"{y}-{m}-{d} {h}:{i}"):"无"},channelRulesFilter:function(e){return 0===e?"白名单":"黑名单"}},data:function(){return{tableKey:0,listLoading:!0,listQuery:{pageSize:10},list:[],total:0,defaultSort:{},multipleSelection:[],device:{imei:""},deviceIds:[]}},created:function(){},mounted:function(){this.getList()},beforeRouteUpdate:function(e,t,n){if(e.path===t.path){var i=Object.assign({},e.query),a=Object.assign({},t.query);JSON.stringify(i)!==JSON.stringify(a)&&this.getList()}n()},methods:{handleSelectionChange:function(e){this.multipleSelection=e},sortChange:function(e){console.log("sortChange",e);var t=e.prop,n=e.order;this.sortBy(t,n)},sortBy:function(e,t){this.listQuery.sort="ascending"===t?"+".concat(e):"-".concat(e),this.handleFilter()},getList:function(){var e=this;this.listLoading=!0,Object(c["f"])(this.listQuery).then((function(t){var n=t.data,i=n.list,a=n.totalCount;e.list=i,e.total=a,e.listLoading=!1}))},setChannelPage:function(){if(0!==this.multipleSelection.length){var e=[];this.multipleSelection.forEach((function(t){e.push(t.imei)})),this.$router.push({path:"/deviceManagement/device/setChannelNum",query:{imeis:e}})}else{var t="必须选一列";this.$message({message:t,type:"error"})}},deletePage:function(){var e=this;if(0!==this.multipleSelection.length)if(this.multipleSelection.length>1){var t="不能多选";this.$message({message:t,type:"error"})}else Object(c["d"])(this.multipleSelection[0].deviceId).then((function(t){e.getList()}));else{var n="必须选一列";this.$message({message:n,type:"error"})}},refresh:function(){this.$router.push({path:"/deviceManagement/deviceChannel",query:this.listQuery})},handleFilter:function(){console.log("handleFilter",this.listQuery),this.listQuery.page=1,this.refresh()}}},s=u,d=n("2877"),p=Object(d["a"])(s,i,a,!1,null,"35c06a82",null);t["default"]=p.exports},c7a7:function(e,t,n){"use strict";n("8d41");var i="@@wavesContext";function a(e,t){function n(n){var i=Object.assign({},t.value),a=Object.assign({ele:e,type:"hit",color:"rgba(0, 0, 0, 0.15)"},i),r=a.ele;if(r){r.style.position="relative",r.style.overflow="hidden";var o=r.getBoundingClientRect(),l=r.querySelector(".waves-ripple");switch(l?l.className="waves-ripple":(l=document.createElement("span"),l.className="waves-ripple",l.style.height=l.style.width=Math.max(o.width,o.height)+"px",r.appendChild(l)),a.type){case"center":l.style.top=o.height/2-l.offsetHeight/2+"px",l.style.left=o.width/2-l.offsetWidth/2+"px";break;default:l.style.top=(n.pageY-o.top-l.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",l.style.left=(n.pageX-o.left-l.offsetWidth/2-document.documentElement.scrollLeft||document.body.scrollLeft)+"px"}return l.style.backgroundColor=a.color,l.className="waves-ripple z-active",!1}}return e[i]?e[i].removeHandle=n:e[i]={removeHandle:n},n}t["a"]={bind:function(e,t){e.addEventListener("click",a(e,t),!1)},update:function(e,t){e.removeEventListener("click",e[i].removeHandle,!1),e.addEventListener("click",a(e,t),!1)},unbind:function(e){e.removeEventListener("click",e[i].removeHandle,!1),e[i]=null,delete e[i]}}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-25a34ff8"],{"1c64":function(e,t,n){},"1cc6":function(e,t,n){"use strict";var i=n("1c64"),a=n.n(i);a.a},"333d":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[n("el-pagination",e._b({attrs:{background:e.background,"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},a=[];n("c5f6");Math.easeInOutQuad=function(e,t,n,i){return e/=i/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function o(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function l(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function c(e,t,n){var i=l(),a=e-i,c=20,u=0;t="undefined"===typeof t?500:t;var s=function e(){u+=c;var l=Math.easeInOutQuad(u,i,a,t);o(l),u<t?r(e):n&&"function"===typeof n&&n()};s()}var u={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:20},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},methods:{handleSizeChange:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&c(0,800)},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&c(0,800)}}},s=u,d=(n("1cc6"),n("2877")),p=Object(d["a"])(s,i,a,!1,null,"f3b72548",null);t["a"]=p.exports},"8d41":function(e,t,n){},aa98:function(e,t,n){"use strict";n.d(t,"f",(function(){return a})),n.d(t,"g",(function(){return r})),n.d(t,"l",(function(){return o})),n.d(t,"b",(function(){return l})),n.d(t,"n",(function(){return c})),n.d(t,"j",(function(){return u})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return p})),n.d(t,"h",(function(){return h})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return g})),n.d(t,"m",(function(){return m})),n.d(t,"i",(function(){return v}));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}})}function r(e){return Object(i["a"])({url:"/device/device/importDevice",method:"post",data:e})}function o(e){return Object(i["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function l(e){return Object(i["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function c(e){return Object(i["a"])({url:"/device/device/uploadDeivceChannelExcel",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function u(e){return Object(i["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function s(e){return Object(i["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function d(e){return Object(i["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function p(e){return Object(i["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function h(){return Object(i["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function f(e){return Object(i["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function g(e){return Object(i["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}function m(e){return Object(i["a"])({url:"/device/deviceChannel/updateSettingDeviceChannel",method:"post",data:{device:e}})}function v(e){return Object(i["a"])({url:"/device/deviceChannel/queryTotalStatisticsDeviceChannel",method:"post",data:{channelIds:e}})}},b2dd: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-header",[n("div",{staticStyle:{margin:"20px 0"}},[n("el-button",{on:{click:e.setChannelPage}},[e._v("变更")]),e._v(" "),n("el-button",{on:{click:e.deletePage}},[e._v("删除")])],1)]),e._v(" "),n("el-main",[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,staticStyle:{width:"100%"},attrs:{data:e.list,border:"",fit:"","highlight-current-row":"","default-sort":e.defaultSort},on:{"sort-change":e.sortChange,"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),n("el-table-column",{attrs:{label:"设备ID",prop:"deviceId",sortable:"custom",align:"center",width:"80"}}),e._v(" "),n("el-table-column",{attrs:{label:"产品系列",prop:"seriesNum",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"imei",prop:"imei",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"规则",prop:"channelRules",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row.channelRules;return[n("span",[e._v(e._s(e._f("channelRulesFilter")(i)))])]}}])}),e._v(" "),n("el-table-column",{attrs:{label:"渠道号",prop:"channelNums",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"禁用提示文字",prop:"channelNumsMessage",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"创建时间",prop:"createTime",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row.createTime;return[n("span",[e._v(e._s(e._f("timeFilter")(i)))])]}}])})],1),e._v(" "),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.listQuery.page,limit:e.listQuery.pageSize},on:{"update:page":function(t){return e.$set(e.listQuery,"page",t)},"update:limit":function(t){return e.$set(e.listQuery,"pageSize",t)},pagination:e.refresh}})],1)],1)},a=[],r=n("333d"),o=n("c7a7"),l=n("ed08"),c=n("aa98"),u={components:{Pagination:r["a"]},directives:{waves:o["a"]},filters:{valueFilter:function(e){return e||"无"},timeFilter:function(e){return e?Object(l["d"])(e,"{y}-{m}-{d} {h}:{i}"):"无"},channelRulesFilter:function(e){return 0===e?"白名单":"黑名单"}},data:function(){return{tableKey:0,listLoading:!0,listQuery:{pageSize:10},list:[],total:0,defaultSort:{},multipleSelection:[],device:{imei:""},deviceIds:[]}},created:function(){},mounted:function(){this.getList()},beforeRouteUpdate:function(e,t,n){if(e.path===t.path){var i=Object.assign({},e.query),a=Object.assign({},t.query);JSON.stringify(i)!==JSON.stringify(a)&&this.getList()}n()},methods:{handleSelectionChange:function(e){this.multipleSelection=e},sortChange:function(e){console.log("sortChange",e);var t=e.prop,n=e.order;this.sortBy(t,n)},sortBy:function(e,t){this.listQuery.sort="ascending"===t?"+".concat(e):"-".concat(e),this.handleFilter()},getList:function(){var e=this;this.listLoading=!0,Object(c["f"])(this.listQuery).then((function(t){var n=t.data,i=n.list,a=n.totalCount;e.list=i,e.total=a,e.listLoading=!1}))},setChannelPage:function(){if(0!==this.multipleSelection.length)if(this.multipleSelection.length>1){var e="不能多选";this.$message({message:e,type:"error"})}else{var t=this.multipleSelection[0];this.$router.push({path:"/deviceManagement/device/updateDeviceChannel",query:{device:t}}),console.log(t)}else{var n="必须选一列";this.$message({message:n,type:"error"})}},deletePage:function(){var e=this;if(0!==this.multipleSelection.length)if(this.multipleSelection.length>1){var t="不能多选";this.$message({message:t,type:"error"})}else Object(c["d"])(this.multipleSelection[0].deviceId).then((function(t){e.getList()}));else{var n="必须选一列";this.$message({message:n,type:"error"})}},refresh:function(){this.$router.push({path:"/deviceManagement/deviceChannel",query:this.listQuery})},handleFilter:function(){console.log("handleFilter",this.listQuery),this.listQuery.page=1,this.refresh()}}},s=u,d=n("2877"),p=Object(d["a"])(s,i,a,!1,null,"64678976",null);t["default"]=p.exports},c7a7:function(e,t,n){"use strict";n("8d41");var i="@@wavesContext";function a(e,t){function n(n){var i=Object.assign({},t.value),a=Object.assign({ele:e,type:"hit",color:"rgba(0, 0, 0, 0.15)"},i),r=a.ele;if(r){r.style.position="relative",r.style.overflow="hidden";var o=r.getBoundingClientRect(),l=r.querySelector(".waves-ripple");switch(l?l.className="waves-ripple":(l=document.createElement("span"),l.className="waves-ripple",l.style.height=l.style.width=Math.max(o.width,o.height)+"px",r.appendChild(l)),a.type){case"center":l.style.top=o.height/2-l.offsetHeight/2+"px",l.style.left=o.width/2-l.offsetWidth/2+"px";break;default:l.style.top=(n.pageY-o.top-l.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",l.style.left=(n.pageX-o.left-l.offsetWidth/2-document.documentElement.scrollLeft||document.body.scrollLeft)+"px"}return l.style.backgroundColor=a.color,l.className="waves-ripple z-active",!1}}return e[i]?e[i].removeHandle=n:e[i]={removeHandle:n},n}t["a"]={bind:function(e,t){e.addEventListener("click",a(e,t),!1)},update:function(e,t){e.removeEventListener("click",e[i].removeHandle,!1),e.addEventListener("click",a(e,t),!1)},unbind:function(e){e.removeEventListener("click",e[i].removeHandle,!1),e[i]=null,delete e[i]}}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5c585ee6"],{"3ac7":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-container",[n("el-main",[n("el-form",{ref:"setChannel",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.device.selectChannelNums},model:{value:e.device.channelNums,callback:function(t){e.$set(e.device,"channelNums",t)},expression:"device.channelNums"}}),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)},i=[],c=(n("456d"),n("ac6a"),n("96cf"),n("3b8d")),r=n("aa98"),s={channelNumsMessage:"终端提示文字",channelRules:"规则"},u={data:function(){var e=function(e,t,n){void 0===t||null===t||0===t.length?n(new Error(s[e.field]+"必须填写")):n()};return{loading:!1,device:{selectChannelNums:[],channelNums:[],channelNumsMessage:"",channelRules:"",imeis:[]},rules:{channelNumsMessage:[{validator:e}],channelRules:[{validator:e}]},selectSeriesOptions:[]}},mounted:function(){this.device.imeis=this.$route.query.imeis,this.getFormData(),this.getTransfer()},methods:{getFormData:function(){var e=Object(c["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),setDefault:function(){this.$refs.device=[]},getTransfer:function(){var e=this;Object(r["h"])().then((function(t){var n=t.data;n.forEach((function(t){e.device.selectChannelNums.push({key:t.channelId,label:t.channelNum})}))}))},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.setChannel.validate((function(t,n){if(t)Object(r["i"])(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 a=n[Object.keys(n)[0]][0].message;e.$message({message:a,type:"error"}),e.loading=!1}})))},toDeviceList:function(){this.$router.push({path:"/deviceManagement/device"})}}},l=u,o=n("2877"),d=Object(o["a"])(l,a,i,!1,null,"de43a3f8",null);t["default"]=d.exports},aa98:function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"g",(function(){return c})),n.d(t,"k",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"i",(function(){return u})),n.d(t,"e",(function(){return l})),n.d(t,"a",(function(){return o})),n.d(t,"j",(function(){return d})),n.d(t,"h",(function(){return h})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return f}));n("55dd");var a=n("b775");function i(e){return Object(a["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function c(e){return Object(a["a"])({url:"/device/device/importDevice",method:"post",data:e})}function r(e){return Object(a["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function u(e){return Object(a["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function l(e){return Object(a["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function o(e){return Object(a["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function d(e){return Object(a["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function h(){return Object(a["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function v(e){return Object(a["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function f(e){return Object(a["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5c585ee6"],{"3ac7":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-container",[n("el-main",[n("el-form",{ref:"setChannel",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.device.selectChannelNums},model:{value:e.device.channelNums,callback:function(t){e.$set(e.device,"channelNums",t)},expression:"device.channelNums"}}),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)},c=[],i=(n("456d"),n("ac6a"),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:{selectChannelNums:[],channelNums:[],channelNumsMessage:"",channelRules:"",imeis:[]},rules:{channelNumsMessage:[{validator:e}],channelRules:[{validator:e}]},selectSeriesOptions:[]}},mounted:function(){this.device.imeis=this.$route.query.imeis,this.getFormData(),this.getTransfer()},methods:{getFormData:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),setDefault:function(){this.$refs.device=[]},getTransfer:function(){var e=this;Object(r["h"])().then((function(t){var n=t.data;n.forEach((function(t){e.device.selectChannelNums.push({key:t.channelId,label:t.channelNum})}))}))},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.setChannel.validate((function(t,n){if(t)Object(r["j"])(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 a=n[Object.keys(n)[0]][0].message;e.$message({message:a,type:"error"}),e.loading=!1}})))},toDeviceList:function(){this.$router.push({path:"/deviceManagement/device"})}}},l=s,o=n("2877"),d=Object(o["a"])(l,a,c,!1,null,"de43a3f8",null);t["default"]=d.exports},aa98:function(e,t,n){"use strict";n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return i})),n.d(t,"l",(function(){return r})),n.d(t,"b",(function(){return u})),n.d(t,"n",(function(){return s})),n.d(t,"j",(function(){return l})),n.d(t,"e",(function(){return o})),n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return h})),n.d(t,"h",(function(){return v})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return m})),n.d(t,"m",(function(){return p})),n.d(t,"i",(function(){return b}));n("55dd");var a=n("b775");function c(e){return Object(a["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function i(e){return Object(a["a"])({url:"/device/device/importDevice",method:"post",data:e})}function r(e){return Object(a["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function u(e){return Object(a["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function s(e){return Object(a["a"])({url:"/device/device/uploadDeivceChannelExcel",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function l(e){return Object(a["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function o(e){return Object(a["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function d(e){return Object(a["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function h(e){return Object(a["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function v(){return Object(a["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function f(e){return Object(a["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function m(e){return Object(a["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}function p(e){return Object(a["a"])({url:"/device/deviceChannel/updateSettingDeviceChannel",method:"post",data:{device:e}})}function b(e){return Object(a["a"])({url:"/device/deviceChannel/queryTotalStatisticsDeviceChannel",method:"post",data:{channelIds:e}})}}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-723f6b88"],{"11c3":function(e,t,n){"use strict";n.r(t);var l=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-container",[n("el-header",[n("div",{staticStyle:{margin:"20px 0"}},[n("el-button",{on:{click:e.setChannelPage}},[e._v("变更")]),e._v(" "),n("el-button",{on:{click:e.deletePage}},[e._v("删除")]),e._v(" "),n("el-select",{attrs:{placeholder:"请选择渠道号",multiple:"multiple"},model:{value:e.selectChannelValue,callback:function(t){e.selectChannelValue=t},expression:"selectChannelValue"}},e._l(e.selectChannel,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),e._v(" "),n("el-button",{on:{click:e.getList}},[e._v("确定")])],1)]),e._v(" "),n("el-main",[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,staticStyle:{width:"100%"},attrs:{data:e.list,border:"",fit:"","highlight-current-row":"","default-sort":e.defaultSort},on:{"sort-change":e.sortChange,"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),n("el-table-column",{attrs:{label:"渠道号",prop:"channelNum",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"禁用提示文字",prop:"channelNumsMessage",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"渠道号规则",prop:"channelRules",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var l=t.row.channelRules;return[n("span",[e._v(e._s(e._f("channelRulesFilter")(l)))])]}}])}),e._v(" "),n("el-table-column",{attrs:{label:"所属客户",prop:"deptName",width:"150",align:"center"}}),e._v(" "),n("el-table-column",{attrs:{label:"关联设备数量",prop:"channelNumsMessage",width:"150",align:"center"}})],1)],1)],1)},i=[],a=(n("ac6a"),n("c7a7")),c=n("ed08"),r=n("aa98"),o={components:{},directives:{waves:a["a"]},filters:{valueFilter:function(e){return e||"无"},timeFilter:function(e){return e?Object(c["d"])(e,"{y}-{m}-{d} {h}:{i}"):"无"},channelRulesFilter:function(e){return 0===e?"白名单":"黑名单"}},data:function(){return{selectChannel:[],selectChannelValue:"",tableKey:0,listLoading:!0,listQuery:{pageSize:10},list:[],total:0,defaultSort:{},multipleSelection:[],device:{imei:""},deviceIds:[]}},mounted:function(){this.getList(),this.getSelectChannel()},beforeRouteUpdate:function(e,t,n){if(e.path===t.path){var l=Object.assign({},e.query),i=Object.assign({},t.query);JSON.stringify(l)!==JSON.stringify(i)&&this.getList()}n()},methods:{handleSelectionChange:function(e){this.multipleSelection=e},sortChange:function(e){console.log("sortChange",e);var t=e.prop,n=e.order;this.sortBy(t,n)},sortBy:function(e,t){this.listQuery.sort="ascending"===t?"+".concat(e):"-".concat(e),this.handleFilter()},getSelectChannel:function(){var e=this;Object(r["h"])().then((function(t){var n=t.data;n.forEach((function(t){e.selectChannel.push({value:t.channelId,label:t.channelNum})}))}))},getList:function(){var e=this;this.listLoading=!0,console.log(this.selectChannelValue),Object(r["i"])(this.selectChannelValue).then((function(t){e.list=t.data,e.listLoading=!1}))},setChannelPage:function(){if(0!==this.multipleSelection.length)if(this.multipleSelection.length>1){var e="不能多选";this.$message({message:e,type:"error"})}else{var t=this.multipleSelection[0];this.$router.push({path:"/deviceManagement/device/updateDeviceChannel",query:{device:t}}),console.log(t)}else{var n="必须选一列";this.$message({message:n,type:"error"})}},deletePage:function(){var e=this;if(0!==this.multipleSelection.length)if(this.multipleSelection.length>1){var t="不能多选";this.$message({message:t,type:"error"})}else Object(r["d"])(this.multipleSelection[0].deviceId).then((function(t){e.getList()}));else{var n="必须选一列";this.$message({message:n,type:"error"})}},refresh:function(){this.$router.push({path:"/deviceManagement/deviceChannel",query:this.listQuery})},handleFilter:function(){console.log("handleFilter",this.listQuery),this.listQuery.page=1,this.refresh()}}},s=o,u=n("2877"),d=Object(u["a"])(s,l,i,!1,null,"0a34bc1c",null);t["default"]=d.exports},"8d41":function(e,t,n){},aa98:function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"l",(function(){return c})),n.d(t,"b",(function(){return r})),n.d(t,"n",(function(){return o})),n.d(t,"j",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return h})),n.d(t,"h",(function(){return p})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return f})),n.d(t,"m",(function(){return g})),n.d(t,"i",(function(){return m}));n("55dd");var l=n("b775");function i(e){return Object(l["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function a(e){return Object(l["a"])({url:"/device/device/importDevice",method:"post",data:e})}function c(e){return Object(l["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function r(e){return Object(l["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function o(e){return Object(l["a"])({url:"/device/device/uploadDeivceChannelExcel",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function s(e){return Object(l["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function u(e){return Object(l["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function d(e){return Object(l["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function h(e){return Object(l["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function p(){return Object(l["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function v(e){return Object(l["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function f(e){return Object(l["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}function g(e){return Object(l["a"])({url:"/device/deviceChannel/updateSettingDeviceChannel",method:"post",data:{device:e}})}function m(e){return Object(l["a"])({url:"/device/deviceChannel/queryTotalStatisticsDeviceChannel",method:"post",data:{channelIds:e}})}},c7a7:function(e,t,n){"use strict";n("8d41");var l="@@wavesContext";function i(e,t){function n(n){var l=Object.assign({},t.value),i=Object.assign({ele:e,type:"hit",color:"rgba(0, 0, 0, 0.15)"},l),a=i.ele;if(a){a.style.position="relative",a.style.overflow="hidden";var c=a.getBoundingClientRect(),r=a.querySelector(".waves-ripple");switch(r?r.className="waves-ripple":(r=document.createElement("span"),r.className="waves-ripple",r.style.height=r.style.width=Math.max(c.width,c.height)+"px",a.appendChild(r)),i.type){case"center":r.style.top=c.height/2-r.offsetHeight/2+"px",r.style.left=c.width/2-r.offsetWidth/2+"px";break;default:r.style.top=(n.pageY-c.top-r.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",r.style.left=(n.pageX-c.left-r.offsetWidth/2-document.documentElement.scrollLeft||document.body.scrollLeft)+"px"}return r.style.backgroundColor=i.color,r.className="waves-ripple z-active",!1}}return e[l]?e[l].removeHandle=n:e[l]={removeHandle:n},n}t["a"]={bind:function(e,t){e.addEventListener("click",i(e,t),!1)},update:function(e,t){e.removeEventListener("click",e[l].removeHandle,!1),e.addEventListener("click",i(e,t),!1)},unbind:function(e){e.removeEventListener("click",e[l].removeHandle,!1),e[l]=null,delete e[l]}}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7395e3e5"],{aa98:function(e,n,t){"use strict";t.d(n,"f",(function(){return c})),t.d(n,"g",(function(){return i})),t.d(n,"l",(function(){return r})),t.d(n,"b",(function(){return s})),t.d(n,"n",(function(){return u})),t.d(n,"j",(function(){return l})),t.d(n,"e",(function(){return d})),t.d(n,"a",(function(){return o})),t.d(n,"k",(function(){return h})),t.d(n,"h",(function(){return v})),t.d(n,"c",(function(){return f})),t.d(n,"d",(function(){return p})),t.d(n,"m",(function(){return m})),t.d(n,"i",(function(){return g}));t("55dd");var a=t("b775");function c(e){return Object(a["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function i(e){return Object(a["a"])({url:"/device/device/importDevice",method:"post",data:e})}function r(e){return Object(a["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function u(e){return Object(a["a"])({url:"/device/device/uploadDeivceChannelExcel",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function l(e){return Object(a["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function d(e){return Object(a["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function o(e){return Object(a["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function h(e){return Object(a["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function v(){return Object(a["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function f(e){return Object(a["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function p(e){return Object(a["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}function m(e){return Object(a["a"])({url:"/device/deviceChannel/updateSettingDeviceChannel",method:"post",data:{device:e}})}function g(e){return Object(a["a"])({url:"/device/deviceChannel/queryTotalStatisticsDeviceChannel",method:"post",data:{channelIds:e}})}},c10e:function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("el-container",[t("el-main",[t("el-form",{ref:"update",attrs:{model:e.device,rules:e.rules,"label-width":"80px"}},[t("el-form-item",{attrs:{prop:"channelNumsMessage",label:"终端提示文字"}},[t("el-input",{model:{value:e.device.channelNumsMessage,callback:function(n){e.$set(e.device,"channelNumsMessage",n)},expression:"device.channelNumsMessage"}})],1),e._v(" "),t("el-form-item",{attrs:{prop:"channelRules",label:"规则"}},[t("el-select",{attrs:{placeholder:"选择"},model:{value:e.device.channelRules,callback:function(n){e.$set(e.device,"channelRules",n)},expression:"device.channelRules"}},[t("el-option",{attrs:{label:"白名单",value:"0"}}),e._v(" "),t("el-option",{attrs:{label:"黑名单",value:"1"}})],1)],1),e._v(" "),t("el-transfer",{attrs:{data:e.device.selectChannelNums},model:{value:e.device.channelIds,callback:function(n){e.$set(e.device,"channelIds",n)},expression:"device.channelIds"}}),e._v(" "),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("修改")]),e._v(" "),t("el-button",{on:{click:e.toDeviceList}},[e._v("取消")])],1)],1)],1)],1)},c=[],i=(t("456d"),t("ac6a"),t("28a5"),t("96cf"),t("3b8d")),r=t("aa98"),s={channelNumsMessage:"终端提示文字",channelRules:"规则"},u={data:function(){var e=function(e,n,t){void 0===n||null===n||0===n.length?t(new Error(s[e.field]+"必须填写")):t()};return{loading:!1,device:{selectChannelNums:[],channelIds:[],channelNumsMessage:"",channelRules:"",imeis:[]},rules:{channelNumsMessage:[{validator:e}],channelRules:[{validator:e}]},selectSeriesOptions:[]}},mounted:function(){this.deviceT=this.$route.query.device,this.getTransfer()},methods:{selectChannelNums:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(n){var t,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.device.channelRules=this.deviceT.channelRules,this.device.channelNumsMessage=this.deviceT.channelNumsMessage,t=this.deviceT.channelNums.split(","),t.forEach((function(e){n.channelNum===e&&a.device.channelIds.push(n.channelId)}));case 4:case"end":return e.stop()}}),e,this)})));function n(n){return e.apply(this,arguments)}return n}(),setDefault:function(){this.$refs.device=[]},getTransfer:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(){var n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:Object(r["h"])().then((function(e){var t=e.data;t.forEach((function(e){n.device.selectChannelNums.push({key:e.channelId,label:e.channelNum}),n.selectChannelNums(e)}))}));case 1:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}(),onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.update.validate((function(n,t){if(n)Object(r["m"])(e.device).then((function(n){var t=n.msg;e.$notify({title:"操作成功",message:t,type:"success",duration:2e3}),e.setDefault(),e.toDeviceList(),e.loading=!1})).catch((function(){e.loading=!1}));else{var a=t[Object.keys(t)[0]][0].message;e.$message({message:a,type:"error"}),e.loading=!1}})))},toDeviceList:function(){this.$router.push({path:"/deviceManagement/deviceChannel"})}}},l=u,d=t("2877"),o=Object(d["a"])(l,a,c,!1,null,"8d63709c",null);n["default"]=o.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-77a4bbf0"],{"7d09":function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return o}));n("55dd");var i=n("b775");function r(e){return Object(i["a"])({url:"/device/series/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function a(e){return Object(i["a"])({url:"/device/series/add",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/device/series/edit",method:"post",data:e})}function s(e){return Object(i["a"])({url:"/device/series/delete",method:"post",data:{ids:e}})}function o(){return Object(i["a"])({url:"/device/series/listAll",method:"post"})}},aa98:function(e,t,n){"use strict";n.d(t,"f",(function(){return r})),n.d(t,"g",(function(){return a})),n.d(t,"l",(function(){return c})),n.d(t,"b",(function(){return s})),n.d(t,"n",(function(){return o})),n.d(t,"j",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"a",(function(){return l})),n.d(t,"k",(function(){return p})),n.d(t,"h",(function(){return v})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"m",(function(){return m})),n.d(t,"i",(function(){return b}));n("55dd");var i=n("b775");function r(e){return Object(i["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function a(e){return Object(i["a"])({url:"/device/device/importDevice",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function s(e){return Object(i["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function o(e){return Object(i["a"])({url:"/device/device/uploadDeivceChannelExcel",method:"post",data:e,headers:{"Content-Type":"application/json;charset=UTF-8"}})}function u(e){return Object(i["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function d(e){return Object(i["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function l(e){return Object(i["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function p(e){return Object(i["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function v(){return Object(i["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function f(e){return Object(i["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function h(e){return Object(i["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}function m(e){return Object(i["a"])({url:"/device/deviceChannel/updateSettingDeviceChannel",method:"post",data:{device:e}})}function b(e){return Object(i["a"])({url:"/device/deviceChannel/queryTotalStatisticsDeviceChannel",method:"post",data:{channelIds:e}})}},f24d: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:"importDevice",attrs:{model:e.device,rules:e.rules,"label-width":"80px"}},[n("el-form-item",{attrs:{prop:"deptId",label:"所属部门"}},[n("el-cascader",{attrs:{"expand-trigger":"hover",options:e.options,"show-all-levels":!1,"change-on-select":""},on:{change:e.handleChange},model:{value:e.selectDeptParents,callback:function(t){e.selectDeptParents=t},expression:"selectDeptParents"}})],1),e._v(" "),n("el-form-item",{attrs:{prop:"seriesId",label:"所属系列"}},[n("el-select",{attrs:{placeholder:"请选择"},model:{value:e.device.seriesId,callback:function(t){e.$set(e.device,"seriesId",t)},expression:"device.seriesId"}},e._l(e.selectSeriesOptions,(function(e){return n("el-option",{key:e.seriesId,attrs:{label:e.seriesNum,value:e.seriesId}})})),1)],1),e._v(" "),e._l(e.device.imeis,(function(t,i){return n("el-form-item",{key:i,attrs:{label:"第"+(i+1)+"个imei: ",prop:"imeis."+i+".value","label-width":"20"}},[n("el-row",[n("el-col",{attrs:{span:14}},[n("el-input",{model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"imei.value"}})],1),e._v(" "),n("el-col",{attrs:{span:5}},[n("el-button",{on:{click:function(n){return n.preventDefault(),e.removeImeis(t)}}},[e._v("\n 删除\n ")])],1)],1)],1)})),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.addImeis}},[e._v("新增imei")]),e._v(" "),n("el-button",{on:{click:e.toDeviceList}},[e._v("取消")])],1)],2)],1)],1)},r=[],a=(n("456d"),n("ac6a"),n("96cf"),n("3b8d")),c=n("fe05"),s=n("7d09"),o=n("aa98"),u={deptId:"部门Id",seriesId:"系列号",imeis:"imeis"},d={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:{deptIdList:[],seriesIdList:[],imeis:[{value:""}]},rules:{deptId:[{validator:e}],seriesId:[{validator:e}]},options:[],selectSeriesOptions:[],selectDeptParents:[],defaultProps:{children:"children",label:"label"}}},mounted:function(){this.getFormData()},methods:{getFormData:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.selectDeptParent();case 2:return e.next=4,this.selectSeries();case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),setDefault:function(){this.$refs.device=[]},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.importDevice.validate((function(t,n){if(t){var i=e.device.imeis;e.device.imeis=[],i.forEach((function(t){e.device.imeis.push(t.value)})),Object(o["g"])(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(t){console.log(t),e.loading=!1}))}else{var r=n[Object.keys(n)[0]][0].message;e.$message({message:r,type:"error"}),e.loading=!1}})))},toDeviceList:function(){this.$router.push({path:"/deviceManagement/device"})},selectSeries:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(s["d"])().then((function(e){var n=e.data;t.selectSeriesOptions=n}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),selectDeptParent:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(c["e"])().then((function(e){var n=e.data;t.options=n}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),handleChange:function(e){var t=e.length;t-=1,this.device.deptId=e[t]},addImeis:function(){this.device.imeis.push({value:""})},removeImeis:function(e){var t=this.device.imeis.indexOf(e);-1!==t&&this.device.imeis.splice(t,1)}}},l=d,p=n("2877"),v=Object(p["a"])(l,i,r,!1,null,"78d0fb6c",null);t["default"]=v.exports},fe05:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return c})),n.d(t,"a",(function(){return s})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return u}));n("55dd");var i=n("b775");function r(e){return Object(i["a"])({url:"/sys/dept/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function a(){return Object(i["a"])({url:"/sys/dept/listAll",method:"post"})}function c(){return Object(i["a"])({url:"/sys/dept/listAllTree",method:"post"})}function s(e){return Object(i["a"])({url:"/sys/dept/add",method:"post",data:e})}function o(e){return Object(i["a"])({url:"/sys/dept/edit",method:"post",data:e})}function u(e){return Object(i["a"])({url:"/sys/dept/delete",method:"post",data:{ids:e}})}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-77a4bbf0"],{"7d09":function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return o}));n("55dd");var i=n("b775");function r(e){return Object(i["a"])({url:"/device/series/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function a(e){return Object(i["a"])({url:"/device/series/add",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/device/series/edit",method:"post",data:e})}function s(e){return Object(i["a"])({url:"/device/series/delete",method:"post",data:{ids:e}})}function o(){return Object(i["a"])({url:"/device/series/listAll",method:"post"})}},aa98:function(e,t,n){"use strict";n.d(t,"f",(function(){return r})),n.d(t,"g",(function(){return a})),n.d(t,"k",(function(){return c})),n.d(t,"b",(function(){return s})),n.d(t,"i",(function(){return o})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"j",(function(){return l})),n.d(t,"h",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return v}));n("55dd");var i=n("b775");function r(e){return Object(i["a"])({url:"/device/device/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function a(e){return Object(i["a"])({url:"/device/device/importDevice",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/device/device/updateDeviceSeriesBatch",method:"post",data:e})}function s(e){return Object(i["a"])({url:"/device/device/delete",method:"post",data:{ids:e}})}function o(e){return Object(i["a"])({url:"/device/device/saveChannel",method:"post",data:e})}function u(e){return Object(i["a"])({url:"/device/deviceChannel/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function d(e){return Object(i["a"])({url:"/device/deviceChannel/add",method:"post",data:e})}function l(e){return Object(i["a"])({url:"/device/deviceChannel/edit",method:"post",data:e})}function p(){return Object(i["a"])({url:"/device/deviceChannel/queryDeviceChannelAll",method:"post"})}function f(e){return Object(i["a"])({url:"/device/deviceChannel/delete",method:"post",data:{ids:e}})}function v(e){return Object(i["a"])({url:"/device/deviceChannel/deleteSettingDeviceChannel",method:"post",data:{deviceId:e}})}},f24d: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:"importDevice",attrs:{model:e.device,rules:e.rules,"label-width":"80px"}},[n("el-form-item",{attrs:{prop:"deptId",label:"所属部门"}},[n("el-cascader",{attrs:{"expand-trigger":"hover",options:e.options,"show-all-levels":!1,"change-on-select":""},on:{change:e.handleChange},model:{value:e.selectDeptParents,callback:function(t){e.selectDeptParents=t},expression:"selectDeptParents"}})],1),e._v(" "),n("el-form-item",{attrs:{prop:"seriesId",label:"所属系列"}},[n("el-select",{attrs:{placeholder:"请选择"},model:{value:e.device.seriesId,callback:function(t){e.$set(e.device,"seriesId",t)},expression:"device.seriesId"}},e._l(e.selectSeriesOptions,(function(e){return n("el-option",{key:e.seriesId,attrs:{label:e.seriesNum,value:e.seriesId}})})),1)],1),e._v(" "),e._l(e.device.imeis,(function(t,i){return n("el-form-item",{key:i,attrs:{label:"第"+(i+1)+"个imei: ",prop:"imeis."+i+".value","label-width":"20"}},[n("el-row",[n("el-col",{attrs:{span:14}},[n("el-input",{model:{value:t.value,callback:function(n){e.$set(t,"value",n)},expression:"imei.value"}})],1),e._v(" "),n("el-col",{attrs:{span:5}},[n("el-button",{on:{click:function(n){return n.preventDefault(),e.removeImeis(t)}}},[e._v("\n 删除\n ")])],1)],1)],1)})),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.addImeis}},[e._v("新增imei")]),e._v(" "),n("el-button",{on:{click:e.toDeviceList}},[e._v("取消")])],1)],2)],1)],1)},r=[],a=(n("456d"),n("ac6a"),n("96cf"),n("3b8d")),c=n("fe05"),s=n("7d09"),o=n("aa98"),u={deptId:"部门Id",seriesId:"系列号",imeis:"imeis"},d={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:{deptIdList:[],seriesIdList:[],imeis:[{value:""}]},rules:{deptId:[{validator:e}],seriesId:[{validator:e}]},options:[],selectSeriesOptions:[],selectDeptParents:[],defaultProps:{children:"children",label:"label"}}},mounted:function(){this.getFormData()},methods:{getFormData:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.selectDeptParent();case 2:return e.next=4,this.selectSeries();case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),setDefault:function(){this.$refs.device=[]},onSubmit:function(){var e=this;this.loading||(this.loading=!0,this.$refs.importDevice.validate((function(t,n){if(t){var i=e.device.imeis;e.device.imeis=[],i.forEach((function(t){e.device.imeis.push(t.value)})),Object(o["g"])(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(t){console.log(t),e.loading=!1}))}else{var r=n[Object.keys(n)[0]][0].message;e.$message({message:r,type:"error"}),e.loading=!1}})))},toDeviceList:function(){this.$router.push({path:"/deviceManagement/device"})},selectSeries:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(s["d"])().then((function(e){var n=e.data;t.selectSeriesOptions=n}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),selectDeptParent:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(c["e"])().then((function(e){var n=e.data;t.options=n}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),handleChange:function(e){var t=e.length;t-=1,this.device.deptId=e[t]},addImeis:function(){this.device.imeis.push({value:""})},removeImeis:function(e){var t=this.device.imeis.indexOf(e);-1!==t&&this.device.imeis.splice(t,1)}}},l=d,p=n("2877"),f=Object(p["a"])(l,i,r,!1,null,"78d0fb6c",null);t["default"]=f.exports},fe05:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return c})),n.d(t,"a",(function(){return s})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return u}));n("55dd");var i=n("b775");function r(e){return Object(i["a"])({url:"/sys/dept/list",method:"post",params:{page:e.page,pageSize:e.pageSize,sort:e.sort}})}function a(){return Object(i["a"])({url:"/sys/dept/listAll",method:"post"})}function c(){return Object(i["a"])({url:"/sys/dept/listAllTree",method:"post"})}function s(e){return Object(i["a"])({url:"/sys/dept/add",method:"post",data:e})}function o(e){return Object(i["a"])({url:"/sys/dept/edit",method:"post",data:e})}function u(e){return Object(i["a"])({url:"/sys/dept/delete",method:"post",data:{ids:e}})}}}]);
\ No newline at end of file
...@@ -270,7 +270,52 @@ public class DeviceInfoController { ...@@ -270,7 +270,52 @@ public class DeviceInfoController {
} }
@RequestMapping("/uploadDeivceChannelExcel") @RequestMapping("/uploadDeivceChannelExcel")
@Transactional(rollbackFor = Exception.class)
public void uploadDeivceChannelExcel(@RequestBody UploadDeviceChannelExcelDto dto){ public void uploadDeivceChannelExcel(@RequestBody UploadDeviceChannelExcelDto dto){
Set<String> imeiSet = new HashSet<>();
List<DeviceInfoEntity> list = new LinkedList<>();
List<DeviceInfoChannelEntity> deviceInfoChannelEntityList = new LinkedList<>();
dto.getInfos().forEach(info -> {
DeviceInfoEntity deviceInfoEntity = new DeviceInfoEntity();
if (info.getImei() != null) {
deviceInfoEntity.setImei(info.getImei());
// 用来统一查询所有deviceId
imeiSet.add(info.getImei());
// 可有可无iccid
if (info.getIccid() != null) {
deviceInfoEntity.setIccid(info.getIccid());
}
deviceInfoEntity.setCreateTime(new Date());
deviceInfoEntity.setChannelNumsMessage(dto.getChannelNumsMessage());
deviceInfoEntity.setChannelRules(dto.getChannelRules());
deviceInfoEntity.setDeptId(dto.getDeptId());
deviceInfoEntity.setSeriesId(dto.getSeriesId());
}
list.add(deviceInfoEntity);
});
// 先新增设备数据 以及 渠道部分数据
deviceInfoService.saveBatch(list);
// 查询新增加的设备号
List<DeviceInfoEntity> deviceInfoEntities = deviceInfoService.queryDeviceByImeis(new LinkedList<>(imeiSet));
// 增加渠道号
deviceInfoEntities.forEach(deviceInfoEntity -> {
dto.getChannelNums().forEach(channelId -> {
DeviceInfoChannelEntity deviceInfoChannelEntity = new DeviceInfoChannelEntity();
deviceInfoChannelEntity.setDeviceId(deviceInfoEntity.getDeviceId());
deviceInfoChannelEntity.setChannelId(channelId);
deviceInfoChannelEntityList.add(deviceInfoChannelEntity);
});
});
deviceInfoChannelService.saveBatch(deviceInfoChannelEntityList);
} }
} }
spring: spring:
profiles: profiles:
active: dev active: prod
application: application:
name: cneeds-server-device name: cneeds-server-device
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment