Files
starRiverProperty/frontend-source/decompiled/cwos-portal/static/js/214.b44dc60388736cee9dc6.js
T
反编译工作区 4f79e10bd6 chore: cleanup stray nested directories in frontend-source
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
2026-04-29 13:07:40 +08:00

1 line
14 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
webpackJsonp([214],{QFST:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("hMZn"),s=(a.n(n),a("SBIS")),i=(a.n(s),a("mtWM")),r=(a.n(i),a("mw3O")),l=(a.n(r),a("0isy")),o=(a.n(l),a("zL8q")),c=(a.n(o),a("IxIs")),d=a("J849"),u=(a.n(d),a("/63W")),p=a("Iy39"),g=a.n(p),v=a("YO+z"),h=a.n(v),f=Object(c.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"details"}},[a("el-card",{directives:[{name:"show",rawName:"v-show",value:1==e.activeIndex,expression:"activeIndex == 1"}],staticClass:"box-card"},[a("el-row",{staticClass:"row-bg"},[a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("固件ID"+e._s(e.detailInfo.id))]),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("固件名称:"+e._s(e.detailInfo.name))]),e._v(" "),1==e.detailInfo.packageType?[a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("固件状态:"+e._s(e.detailInfo.checkStatus))])]:e._e(),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("固件版本号:"+e._s(e.detailInfo.currentVersion))]),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("固件模块:"+e._s(e.detailInfo.versionTypeName))]),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("所属设备类型:"+e._s(e.detailInfo.deviceTypeName))]),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("签名算法:"+e._s(e.detailInfo.signType))]),e._v(" "),0===e.detailInfo.packageType?a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("待升级版本号:"+e._s(e.detailInfo.previousVersion))]):e._e(),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("升级内容描述:"+e._s(e.detailInfo.remark))])],2)],1),e._v(" "),a("el-card",{directives:[{name:"show",rawName:"v-show",value:2==e.activeIndex,expression:"activeIndex == 2"}],staticClass:"box-card"},[a("el-row",{staticClass:"row-bg"},[a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("固件ID"+e._s(e.detailInfo.id))]),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("固件名称:"+e._s(e.detailInfo.name))]),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("固件模块:"+e._s(e.detailInfo.versionTypeName))]),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("固件版本号:"+e._s(e.detailInfo.currentVersion))]),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("所属设备类型:"+e._s(e.detailInfo.deviceTypeName))]),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("签名算法:"+e._s(e.detailInfo.signType))]),e._v(" "),a("el-col",{staticClass:"word-break",attrs:{span:8}},[e._v("升级内容描述:"+e._s(e.detailInfo.remark))]),e._v(" "),e.verificationTime&&"-"!=e.verificationTime?[a("el-col",{staticClass:"word-break",attrs:{span:12}},[a("span",[e._v("验证时间:"+e._s(e.verificationTime))]),e._v(" "),a("span",{staticClass:"ml10 blue cursor",on:{click:e.updateEndTime}},[e._v("修改时间")])])]:e._e()],2)],1),e._v(" "),a("el-card",{staticClass:"box-card mt10"},[a("el-menu",{staticClass:"el-menu-demo",attrs:{"default-active":e.activeIndex,mode:"horizontal"},on:{select:e.handleSelect}},[a("el-menu-item",{attrs:{index:"1"}},[e._v("批次管理")]),e._v(" "),a("el-menu-item",{attrs:{index:"2"}},[e._v("固件验证")])],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:1==e.activeIndex,expression:"activeIndex == 1"}],staticClass:"mt15"},[a("el-table",{ref:"multipleTable",staticClass:"table",attrs:{data:e.tableData1,"header-cell-class-name":"table-header"}},[a("el-table-column",{attrs:{prop:"id",label:"批次ID",width:"300",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"result",label:"升级成果(成功设备数/目标设备总数)",width:"270",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"upgradeRangeType",label:"升级范围",width:"300",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(1==t.row.upgradeRangeType?"具体设备":"设备范围"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"dateLimit",label:"升级时间",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e._f("formatDateLimit")(t.row.dateLimit)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"timeLimit",label:"升级时间段",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"statusMsg",label:"升级状态",width:"150",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleCheck(e.tableData1[t.$index].id,e.detailInfo.id)}}},[e._v("查看")]),e._v(" "),"升级中"==e.tableData1[t.$index].statusMsg||"未执行"==e.tableData1[t.$index].statusMsg?a("el-button",{staticClass:"red",attrs:{type:"text"},on:{click:function(a){return e.editBatchItem(e.tableData1[t.$index].id,3)}}},[e._v("暂停")]):e._e(),e._v(" "),"暂停"==e.tableData1[t.$index].statusMsg?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.editBatchItem(e.tableData1[t.$index].id,4)}}},[e._v("继续")]):e._e(),e._v(" "),"升级完成"!=e.tableData1[t.$index].statusMsg&&"升级中"!=e.tableData1[t.$index].statusMsg&&"已取消"!=e.tableData1[t.$index].statusMsg?a("el-button",{staticClass:"red",attrs:{type:"text"},on:{click:function(a){return e.handleDelete(t.$index,t.row)}}},[e._v("取消")]):e._e()]}}])})],1),e._v(" "),a("div",[a("el-pagination",{attrs:{background:"",layout:"total, prev, pager, next","current-page":e.query.pageIndex[e.activeIndex-1],"page-size":e.query.pageSize[e.activeIndex-1],total:e.pageTotal[e.activeIndex-1]},on:{"current-change":e.handlePageChange}})],1)],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:2==e.activeIndex,expression:"activeIndex == 2"}]},[a("el-row",{staticClass:"row-bg mt15 mb15",attrs:{type:"flex"}},[a("el-col",{attrs:{span:24}},[e._v("验证结果:"+e._s(e.detailInfo.checkStatus))])],1),e._v(" "),a("el-table",{ref:"multipleTable",staticClass:"table",attrs:{data:e.tableData2,"header-cell-class-name":"table-header"}},[a("el-table-column",{attrs:{prop:"deviceCode",label:"设备编码",width:"100",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"deviceName",label:"设备名称",width:"150",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"businessName",label:"所属渠道商",width:"150",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"areaAddr",label:"安装区域",width:"250",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"升级状态",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[null==e.tableData2[t.$index].percents?a("span",[e._v(e._s(e.tableData2[t.$index].statusMsg))]):e._e(),e._v(" "),null!=e.tableData2[t.$index].percents?a("el-progress",{attrs:{percentage:Number(e.tableData2[t.$index].percents)}}):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"errorMsg",label:"失败原因",width:"200",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"lastUpdateTime",label:"状态更新时间",align:"center"}})],1),e._v(" "),a("div",[a("el-pagination",{attrs:{background:"",layout:"total, prev, pager, next","current-page":e.query.pageIndex[e.activeIndex-1],"page-size":e.query.pageSize[e.activeIndex-1],total:e.pageTotal[e.activeIndex-1]},on:{"current-change":e.handlePageChange}})],1)],1)],1),e._v(" "),a("div",{attrs:{id:"endTimeModal"}},[a("el-dialog",{attrs:{title:"修改结束时间",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[a("el-form",[a("el-form-item",{attrs:{label:"结束时间","label-width":"80px"}},[a("el-date-picker",{attrs:{format:"yyyy/MM/dd","value-format":"yyyy/MM/dd",type:"date",placeholder:"选择日期"},model:{value:e.endDate,callback:function(t){e.endDate=t},expression:"endDate"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogFormVisible=!1,e.endDate=""}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.sureUpdateEndDate(e.endDate)}}},[e._v("确 定")])],1)],1)],1)],1)},staticRenderFns:[]},void 0,{data:function(){return{dialogFormVisible:!1,endDate:"",detailInfo:{},activeIndex:"1",query:{address:"",name:"",pageIndex:[1,1],pageSize:[10,10]},pageTotal:[0,0],tableData1:[],tableData2:[],verificationTime:""}},created:function(){},mounted:function(){this.getDetailInfo()},filters:{formatDateLimit:function(e){var t=e,a=t.split("~");return a[0]=a[0]||Object(u.a)("YYYY/MM/DD",g()()),a[1]=a[1]||"不限",a.join(" ~ ")}},methods:{updateEndTime:function(e){this.dialogFormVisible=!0,this.endDate=this.verificationTime.split("~")[1]},sureUpdateEndDate:function(e){var t,a=this,n=this.verificationTime.split("~")[0];""!==e?Date.parse(new Date(n))>Date.parse(new Date(e))||Date.parse(new Date(n))==Date.parse(new Date(e))?this.$message.error("开始时间不能大于或等于结束时间"):(t=n+"~"+e,function(e){var t={url:"/ota/device/upgrade/conf/extend",headers:{"Content-Type":"application/json;charset=UTF-8"},data:e};return c.b.post(t)}({id:this.detailInfo.checkUpgradeConfId,timeLimit:"00:00~00:00",dateLimit:t}).then(function(e){a.dialogFormVisible=!1,a.endDate="",a.getDetailInfo()}).catch(function(e){})):this.$message.error("结束时间不能为空!")},getVerificationTime:function(){var e,t,a=this;null!=this.detailInfo.checkUpgradeConfId&&this.detailInfo.checkUpgradeConfId&&(e={id:this.detailInfo.checkUpgradeConfId},t={url:"/ota/device/upgrade/conf/gets",headers:{"Content-Type":"application/json;charset=UTF-8"},data:e},c.b.post(t)).then(function(e){a.verificationTime=null==e.data.dateLimit?"-":e.data.dateLimit}).catch(function(e){})},getDetailInfo:function(){var e,t,a=this;(e={id:this.$route.query.id},t={url:"/ota/device/upgrade/gets",headers:{"Content-Type":"application/json;charset=UTF-8"},data:e},c.b.post(t)).then(function(e){a.detailInfo=e.data||{},a.detailInfo.checkStatus=a.checkStatusFillter(a.detailInfo.checkStatus),a.getBatch(),a.getAuthentication(),a.getVerificationTime()}).catch(function(e){})},checkStatusFillter:function(e){switch(e){case"1":return"未上架";case"2":return"验证中";case"3":return"验证完成(已上架) ";case"4":return"已下架";case"9":return"验证失败"}},getBatch:function(){var e,t,a=this;null!=this.detailInfo.checkUpgradeConfId&&(e={upgradeId:this.detailInfo.id,currentPage:this.query.pageIndex[0],rowsOfPage:10},t={url:"/ota/device/upgrade/conf/page",headers:{"Content-Type":"application/json;charset=UTF-8"},data:e},c.b.post(t)).then(function(e){var t;e.data.datas.length>0&&h()(t=e.data.datas).call(t,function(e){e.createTime=a.getTime(e.createTime,"long"),e.result=e.deviceSuccessNum+" / "+e.deviceTotal,e.status=a.batchStatusFillter(e.status)}),a.tableData1=e.data.datas,a.pageTotal[0]=e.data.totalRows}).catch(function(e){})},batchStatusFillter:function(e){switch(e){case 1:return"升级完成";case 2:return"升级中";case 3:return"暂停";case 4:return"未执行";case 5:return"升级失败";case 6:return"任务回滚"}},getAuthentication:function(){var e,t,a=this;null!=this.detailInfo.checkUpgradeConfId&&this.detailInfo.checkUpgradeConfId&&(e={upgradeConfId:this.detailInfo.checkUpgradeConfId},t={url:"/ota/device/upgrade/revert/page",headers:{"Content-Type":"application/json;charset=UTF-8"},data:e},c.b.post(t)).then(function(e){var t;e.data.datas.length>0&&h()(t=e.data.datas).call(t,function(e){e.status=a.upgradeStatusFillter(e.status),e.address=null==e.address?"-":e.address,e.errorMsg=null==e.errorMsg?"-":e.errorMsg,e.lastUpdateTime=a.getTime(Number(e.lastUpdateTime),"long")}),a.tableData2=e.data.datas,a.pageTotal[1]=e.data.totalRows}).catch(function(e){})},upgradeStatusFillter:function(e){switch(e){case 1:return"成功";case 2:return"执行中";case 3:return"队列中";case 4:return"升级失败"}},handleSelect:function(e,t){this.activeIndex=e,2==this.activeIndex?null!=this.detailInfo.checkUpgradeConfId&&this.detailInfo.checkUpgradeConfId&&this.getDetailInfo():this.getBatch()},handlePageChange:function(e){2==this.activeIndex?(this.query.pageIndex[1]=e,this.getAuthentication()):(this.query.pageIndex[0]=e,this.getBatch())},handleCheck:function(e,t){this.$router.push({path:"/details/view",query:{id:e,detailId:t,checkUpgradeConfId:this.detailInfo.checkUpgradeConfId}})},handleDelete:function(e){var t=this;this.$confirm("此操作取消此项数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){(function(e){var t={url:"/ota/device/upgrade/conf/edit",headers:{"Content-Type":"application/json;charset=UTF-8"},data:e};return c.b.post(t)})({id:t.tableData1[e].id,status:8}).then(function(e){t.getBatch(),e.success?t.$message({type:"success",message:"取消成功!"}):t.$message({message:e.message})}).catch(function(e){})}).catch(function(){})},editBatchItem:function(e,t){var a=this;(function(e){var t={url:"/ota/device/upgrade/conf/edit",headers:{"Content-Type":"application/json;charset=UTF-8"},data:e};return c.b.post(t)})({id:e,status:t}).then(function(e){a.getBatch()}).catch(function(e){})},getTime:function(e,t){var a="";return"long"==t?(a=new Date(e)).getFullYear()+"-"+(a.getMonth()+1<10?"0"+(a.getMonth()+1):a.getMonth()+1)+"-"+(a.getDate()<10?"0"+a.getDate():a.getDate())+" "+(a.getHours()<10?"0"+a.getHours():a.getHours())+":"+(a.getMinutes()<10?"0"+a.getMinutes():a.getMinutes())+":"+(a.getSeconds()<10?"0"+a.getSeconds():a.getSeconds()):"short"==t?(a=new Date(e)).getFullYear()+"-"+(a.getMonth()+1<10?"0"+(a.getMonth()+1):a.getMonth()+1)+"-"+(a.getDate()<10?"0"+a.getDate():a.getDate()):"time"==t?((a=new Date(e)).getHours()<10?"0"+a.getHours():a.getHours())+":"+(a.getMinutes()<10?"0"+a.getMinutes():a.getMinutes()):"day"==t?((a=new Date(e)).getMonth()+1<10?"0"+(a.getMonth()+1):a.getMonth()+1)+"-"+(a.getDate()<10?"0"+a.getDate():a.getDate())+" "+(a.getHours()<10?"0"+a.getHours():a.getHours())+":"+(a.getMinutes()<10?"0"+a.getMinutes():a.getMinutes()):void 0}}},"data-v-e4408002",!1,void 0,!1,void 0,void 0,void 0);t.default=f}});