You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2 lines
18 KiB

  1. webpackJsonp([14],{"0xDb":function(e,t,r){"use strict";function a(e,t){if(0===arguments.length)return null;var r=t||"{y}-{m}-{d} {h}:{i}:{s}",a=void 0;"object"===(void 0===e?"undefined":s()(e))?a=e:(10===(""+e).length&&(e=1e3*parseInt(e)),a=new Date(e));var i={y:a.getFullYear(),m:a.getMonth()+1,d:a.getDate(),h:a.getHours(),i:a.getMinutes(),s:a.getSeconds(),a:a.getDay()};return r.replace(/{(y|m|d|h|i|s|a)+}/g,function(e,t){var r=i[t];return"a"===t?["一","二","三","四","五","六","日"][r-1]:(e.length>0&&r<10&&(r="0"+r),r||0)})}t.a=a;var i=r("pFYg"),s=r.n(i)},"8Qlq":function(e,t,r){"use strict";function a(e){r("h1w1")}Object.defineProperty(t,"__esModule",{value:!0});var i=r("qy3q"),s=r("R4XF"),n=r("VU/8"),l=a,o=n(i.a,s.a,l,null,null);t.default=o.exports},BO1k:function(e,t,r){e.exports={default:r("fxRn"),__esModule:!0}},J1EU:function(e,t,r){t=e.exports=r("FZ+f")(!0),t.push([e.i,".steps{margin:10px auto 30px 0}.stepcss{float:right;margin:20px 100px}.zylist{width:95%}","",{version:3,sources:["D:/projects/gitLab/wxpos/posadmin/src/views/ota/configure/add.vue"],names:[],mappings:"AACA,OACI,uBAA2B,CAC9B,AACD,SACI,YAAa,AACb,iBAAmB,CACtB,AACD,QACI,SAAW,CACd",file:"add.vue",sourcesContent:["\n.steps {\n margin: 10px auto 30px 0px;\n}\n.stepcss {\n float: right;\n margin: 20px 100px;\n}\n.zylist {\n width: 95%;\n}\n"],sourceRoot:""}])},R4XF:function(e,t,r){"use strict";var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-steps",{staticClass:"steps",attrs:{space:400,active:e.active,"align-center":"","finish-status":"success",simple:""}},[r("el-step",{attrs:{title:"上传配置文件"}}),e._v(" "),r("el-step",{attrs:{title:"选择设备"}}),e._v(" "),r("el-step",{attrs:{title:"输入策略名称"}})],1),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:1==e.active,expression:"active==1"}]},[r("el-form",{staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"上传文件"}},[r("el-upload",{attrs:{action:e.updata.url,"show-file-list":!1,"on-success":e.handleAvatarSuccess,"on-error":e.handleAvatarSuccess,"before-upload":e.beforeAvatarUpload,data:e.updata.data}},[r("el-button",{attrs:{plain:"",type:"primary"}},[e._v("点击上传")])],1),e._v(" "),r("el-tag",{attrs:{type:"danger"}},[e._v("只能上传pem/cert/csv/txt文件,文件传输过程中请勿操作页面。\n ")])],1)],1),e._v(" "),r("el-table",{attrs:{data:e.req.strategyList,"element-loading-text":"拼命加载中",border:"",fit:"","highlight-current-row":"",size:"mini"}},[r("el-table-column",{attrs:{label:"配置文件名称",align:"center",prop:"configFileName",width:"250px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.configFileName)+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"配置文件编码",align:"center",prop:"configFileCode",width:"250px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.configFileCode))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"配置文件下载路径",align:"center",prop:"configUrl"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text",size:"mini",title:t.row.configUrl},on:{click:function(r){e.openUrl(t.row.configUrl)}}},[e._v(e._s(t.row.configUrl)+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{"class-name":"status-col",label:"操作",align:"center",width:"65px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text"},on:{click:function(r){e.delCof(t.$index)}}},[e._v("删除")])]}}])})],1),e._v(" "),r("div",{staticClass:"stepcss"},[r("el-button",{attrs:{type:"success"},on:{click:function(t){e.nextStep(2)}}},[e._v("下一步")])],1)],1),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:2==e.active,expression:"active==2"}]},[r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.listQuery,size:"mini"}},[r("el-form-item",{attrs:{label:"序列号"}},[r("el-input",{attrs:{placeholder:"序列号",name:"serialNo"},model:{value:e.listQuery.serialNo,callback:function(t){e.$set(e.listQuery,"serialNo",t)},expression:"listQuery.serialNo"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"MAC"}},[r("el-input",{attrs:{placeholder:"MAC",name:"macAddr"},model:{value:e.listQuery.macAddr,callback:function(t){e.$set(e.listQuery,"macAddr",t)},expression:"listQuery.macAddr"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"设备名称",prop:"alias"}},[r("el-input",{attrs:{placeholder:"设备名称",name:"alias"},model:{value:e.listQuery.alias,callback:function(t){e.$set(e.listQuery,"alias","string"==typeof t?t.trim():t)},expression:"listQuery.alias"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"版本号"}},[r("el-input",{attrs:{placeholder:"版本号",name:"curVersion"},model:{value:e.listQuery.curVersion,callback:function(t){e.$set(e.listQuery,"curVersion",t)},expression:"listQuery.curVersion"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"区域"}},[r("el-input",{attrs:{placeholder:"区域",name:"region"},model:{value:e.listQuery.region,callback:function(t){e.$set(e.listQuery,"region",t)},expression:"listQuery.region"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"部门"}},[r("el-input",{attrs:{placeholder:"部门",name:"department"},model:{value:e.listQuery.department,callback:function(t){e.$set(e.listQuery,"department",t)},expression:"listQuery.department"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"客户"}},[r("el-input",{attrs:{placeholder:"客户",name:"customer"},model:{value:e.listQuery.customer,callback:function(t){e.$set(e.listQuery,"customer",t)},expression:"listQuery.customer"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"厂商"}},[r("el-input",{attrs:{placeholder:"厂商",name:"manufacturer"},model:{value:e.listQuery.manufacturer,callback:function(t){e.$set(e.listQuery,"manufacturer",t)},expression:"listQuery.manufacturer"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"设备"}},[r("el-input",{attrs:{placeholder:"设备",name:"deviceType"},model:{value:e.listQuery.deviceType,callback:function(t){e.$set(e.listQuery,"deviceType",t)},expression:"listQuery.deviceType"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"型号"}},[r("el-input",{attrs:{placeholder:"型号",name:"deviceModel"},model:{value:e.listQuery.deviceModel,callback:function(t){e.$set(e.listQuery,"deviceModel",t)},expression:"listQuery.deviceModel"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"门店",align:"center",prop:"shopId"}},[r("el-select",{attrs:{placeholder:"所属门店",clearable:""},model:{value:e.listQuery.shopId,callback:function(t){e.$set(e.listQuery,"shopId",t)},expression:"listQuery.shopId"}},e._l(e.storeList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.getota}},[e._v("查询")])],1)],1),e._v(" "),r("el-dialog",{attrs:{visible:e.otadialogTableVisible,"custom-class":"zylist",title:"设备选择",width:"90%"},on:{"update:visible":function(t){e.otadialogTableVisible=t}}},[r("el-table",{directives:[{name:"loading",rawName:"v-loading.body",value:e.listLoading,expression:"listLoading",modifiers:{body:!0}}],attrs:{data:e.selectotaList,"element-loading-text":"拼命加载中",border:"",fit:"",size:"mini"},on:{"selection-change":e.otaListChange}},[r("el-table-column",{attrs:{type:"selection",width:"55",selectable:e.otaChofilter}}),e._v(" "),r("el-table-column",{attrs:{label:"序列号",align:"center",prop:"serialNo"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.serialNo))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"MAC地址",align:"center",prop:"macAddr"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.macAddr)+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"厂商",prop:"serialNo"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.manufacturer)+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"deviceType",label:"设备"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.deviceType))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"deviceModel",label:"型号"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.deviceModel))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"curVersion",label:"版本号"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.curVersion))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"region",label:"区域"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.region))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"customer",label:"客户"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.customer))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"department",label:"部门"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.department))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"设备名称",align:"center",prop:"alias"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.alias)+"\n ")]}}])})],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:e.otaListsub}},[e._v("确定")]),e._v(" "),r("el-button",{on:{click:function(t){e.otadialogTableVisible=!1}}},[e._v("取消")])],1)],1),e._v(" "),r("el-table",{attrs:{data:e.subotaList,border:"",fit:"","highlight-current-row":"",size:"mini"}},[r("el-table-column",{attrs:{label:"序列号",align:"center",prop:"serialNo"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.serialNo))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"MAC地址",align:"center",prop:"macAddr"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.macAddr)+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"厂商",prop:"serialNo"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.manufacturer)+"\n ")]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"deviceType",label:"设备"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.deviceType))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"deviceModel",label:"型号"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.deviceModel))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"curVersion",label:"版本号"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.curVersion))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"region",label:"区域"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.region))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"customer",label:"客户"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.customer))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"department",label:"部门"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.department))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"设备名称",align:"center",prop:"alias"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.alias)+"\n ")]}}])})],1),e._v(" "),r("div",{staticClass:"stepcss"},[r("el-button",{attrs:{type:"success"},on:{click:function(t){e.active=1}}},[e._v("上一步")]),e._v(" "),r("el-button",{attrs:{type:"success"},on:{click:function(t){e.nextStep(3)}}},[e._v("下一步")])],1)],1),e._v(" "),r("div",{directives:[{name:"show",rawName:"v-show",value:3==e.active,expression:"active==3"}]},[r("el-form",{ref:"req",staticClass:"demo-form-inline",staticStyle:{"margin-left":"200px"},attrs:{inline:!0,model:e.req,rules:e.rules}},[r("el-form-item",{attrs:{label:"策略名称",prop:"strategyName"}},[r("el-input",{attrs:{placeholder:"策略名称"},model:{value:e.req.strategyName,callback:function(t){e.$set(e.req,"strategyName",t)},expression:"req.strategyName"}})],1)],1),e._v(" "),r("div",{staticClass:"stepcss"},[r("el-button",{attrs:{type:"success"},on:{click:function(t){e.active=2}}},[e._v("上一步")]),e._v(" "),r("el-button",{attrs:{type:"success"},on:{click:e.subadd}},[e._v("提交")])],1)],1)],1)},i=[],s={render:a,staticRenderFns:i};t.a=s},V8q2:function(e,t,r){"use strict";function a(e){return r.i(p.a)({url:"/unionService/AliOSS/signature",method:"post",params:{dir:e},withCredentials:!1})}function i(){return r.i(p.a)({url:"/unionService/AliOSS/mediaResource/oss/url",method:"get"})}function s(){return r.i(p.a)({url:"/unionService/AliOSS/upgradePackage/oss/url",method:"get"})}function n(){return r.i(p.a)({url:"/unionService/AliOSS/deviceConfig/oss/url",method:"get"})}function l(){return r.i(p.a)({url:"/unionService/AliOSS/store/logo/oss/url",method:"get"})}function o(){return r.i(p.a)({url:"/unionService/AliOSS/trade/oss/url",method:"get"})}function u(){return r.i(p.a)({url:"/unionService/AliOSS/goods/oss/url",method:"get"})}function c(){return r.i(p.a)({url:"/unionService/AliOSS/apk/oss/url",method:"get"})}function d(e){return r.i(p.a)({url:"/service-org/Region/getCitys?parentId="+e,method:"get"})}t.a=a,t.g=i,t.d=s,t.e=n,t.h=l,t.i=o,t.b=u,t.f=c,t.c=d;var p=r("Vo7i")},fxRn:function(e,t,r){r("+tPU"),r("zQR9"),e.exports=r("g8Ux")},g45I:function(e,t,r){"use strict";function a(e){return r.i(u.a)({url:"/service-org/shop/list",method:"get",params:e})}function i(e){return r.i(u.a)({url:"/unionService/shop/shop",method:"post",data:e})}function s(e){return r.i(u.a)({url:"/service-org/shop/detail?shopId="+e,method:"get"})}function n(e){return r.i(u.a)({url:"/unionService/shop/shop",method:"put",data:e})}function l(e){return r.i(u.a)({url:"/unionService/device/store",method:"put",data:e})}function o(e){return r.i(u.a)({url:"/service-org/shop/delete?shopId="+e,method:"DELETE"})}t.a=a,t.f=i,t.b=s,t.c=n,t.d=l,t.e=o;var u=r("Vo7i")},g8Ux:function(e,t,r){var a=r("77Pl"),i=r("3fs2");e.exports=r("FeBl").getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return a(t.call(e))}},h1w1:function(e,t,r){var a=r("J1EU");"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);r("rjj0")("34779b18",a,!0)},lJq3:function(e,t,r){"use strict";function a(e){return r.i(o.a)({url:"/service-device/devices",method:"post",data:e})}function i(e){return r.i(o.a)({url:"/unionService/device",method:"post",data:e})}function s(e){return r.i(o.a)({url:"/unionService/device",method:"put",data:e})}function n(e){return r.i(o.a)({url:"/unionService/device/batch",method:"post",data:e})}function l(e){return r.i(o.a)({url:"/unionService/device/status",method:"put",data:e})}t.a=a,t.e=i,t.d=s,t.c=n,t.b=l;var o=r("Vo7i")},m0zh:function(e,t,r){"use strict";function a(e){return r.i(n.a)({url:"/service-device/configStrategyGroups",method:"post",data:e})}function i(e){return r.i(n.a)({url:"/service-device/configStrategyGroup",method:"post",data:e})}function s(e){return r.i(n.a)({url:"/service-device/configStrategy/"+e,method:"get"})}t.a=a,t.c=i,t.b=s;var n=r("Vo7i")},qy3q:function(e,t,r){"use strict";var a=r("BO1k"),i=r.n(a),s=r("V8q2"),n=r("lJq3"),l=r("m0zh"),o=(r("0xDb"),r("g45I"));t.a={created:function(){var e=this;r.i(s.a)("codeLib").then(function(t){e.updata.data.policy=t.result.policy,e.updata.data.OSSAccessKeyId=t.result.accessid,e.updata.data.success_action_status="200",e.updata.data.signature=t.result.signature,e.updata.url=t.result.host}),r.i(s.e)().then(function(t){e.ruleForm.mediaUrl=t.result.codeLibURL4OSS}),r.i(o.a)({org:this.$store.getters.orgId}).then(function(t){e.storeList=t.result.rows})},watch:{"listQuery.shopId":function(){this.listQuery.shopId?this.listQuery.storeIds=[this.listQuery.shopId]:this.listQuery.storeIds=[]}},data:function(){return{storeList:[],ruleForm:{mediaUrl:""},updata:{url:"",data:{}},listQuery:{organizationId:this.$store.getters.orgId,shopId:"",storeIds:[],serialNo:"",macAddr:"",curVersion:"",region:"",customer:"",department:"",manufacturer:"",deviceType:"",deviceModel:"",status:"0",isPage:!1},req:{strategyName:"",strategyList:[],deviceList:[]},rules:{strategyName:[{required:!0,message:"请输入策略名称",trigger:"blur"}]},selectversionList:[],subversionList:[],selectotaList:[],cacheotaList:[],subotaList:[],listLoading:!0,statusList:{0:"可用",1:"删除",2:"停用"},otadialogTableVisible:!1,active:1,temp:null}},methods:{delCof:function(e){var t=this;this.$confirm("确定要删除吗?","",{type:"warning",center:!0}).then(function(){t.req.strategyList.splice(e,1)}).catch(function(){})},handleAvatarSuccess:function(e,t){this.req.strategyList.push({configFileName:t.name,configFileCode:"m_"+t.uid,configUrl:this.ruleForm.mediaUrl+"m_"+t.uid+"."+t.name.split(".").splice(-1)[0]})},beforeAvatarUpload:function(e){var t=!1,r=e.name.split(".").splice(-1)[0],a=["pem","cert","csv","txt"];for(var i in a)if(r==a[i]){t=!0;break}return t?this.updata.data.key="codeLib/m_"+e.uid+"."+r:this.$message.error("上传文件类型错误"),t},getota:function(){var e=this;this.listLoading=!0,this.selectotaList=[],r.i(n.a)(this.listQuery).then(function(t){e.selectotaList=t.result.rows,e.listLoading=!1}),this.otadialogTableVisible=!0},otaListChange:function(e){this.cacheotaList=e},otaListsub:function(){var e=this.subotaList;this.cacheotaList.forEach(function(t){e.push(t)}),this.otadialogTableVisible=!1},otaChofilter:function(e,t){var r=!0,a=!0,s=!1,n=void 0;try{for(var l,o=i()(this.subotaList);!(a=(l=o.next()).done);a=!0){if(l.value.id==e.id){r=!1;break}}}catch(e){s=!0,n=e}finally{try{!a&&o.return&&o.return()}finally{if(s)throw n}}return r},nextStep:function(e){return 2==e&&this.req.strategyList.length<1?(this.$message.error("请上传配置文件"),!1):3==e&&this.subotaList.length<1?(this.$message.error("请选择设备"),!1):void(this.active=e)},subadd:function(){var e=this;this.$refs.req.validate(function(t){if(!t)return console.log("error submit!!"),!1;e.req.deviceList=e.subotaList,r.i(l.c)(e.req).then(function(t){var r=e.$router;e.$message({message:"添加成功",type:"success",duration:1e3,onClose:function(){r.push({path:"index"})}})})})},openUrl:function(e){window.open(e)}}}}});
  2. //# sourceMappingURL=14.0ba10752f7572880e5d0.js.map