Files
starRiverProperty/frontend-source/decompiled/cwos-portal/static/js/212.aaa8d8dd241d4d6b0abb.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
10 KiB
JavaScript

webpackJsonp([212],{"tA+1":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Mnsi"),l=a.n(n),i=a("gPdZ"),r=a.n(i),s=a("hMZn"),c=(a.n(s),a("SBIS")),o=(a.n(c),a("mtWM")),u=(a.n(o),a("mw3O")),d=(a.n(u),a("0isy")),p=(a.n(d),a("zL8q")),v=(a.n(p),a("IxIs")),h=a("P0B7"),y=a("J849"),f=(a.n(y),a("/63W")),_=Object(v.a)({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{attrs:{shadow:"hover"}},[a("div",{staticClass:"handle-box"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.query}},[a("el-form-item",{attrs:{label:"设备类型:"}},[a("el-cascader",{staticClass:"handle-select cascader-width",attrs:{placeholder:"请选择","show-all-levels":!1,props:{value:"id",label:"name"},options:e.allTreeList,clearable:""},model:{value:e.query.deviceTypeId,callback:function(t){e.$set(e.query,"deviceTypeId",t)},expression:"query.deviceTypeId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"升级类型:"}},[a("el-select",{staticClass:"handle-select mr10",attrs:{label:"",placeholder:"请选择"},model:{value:e.query.packageType,callback:function(t){e.$set(e.query,"packageType",t)},expression:"query.packageType"}},[a("el-option",{key:"",attrs:{label:"全部",value:""}}),e._v(" "),a("el-option",{key:"2",attrs:{label:"全量",value:"1"}}),e._v(" "),a("el-option",{key:"1",attrs:{label:"差异",value:"0"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"固件模块:"}},[a("el-select",{staticClass:"handle-select mr10",attrs:{label:"",placeholder:"请选择"},model:{value:e.query.versionType,callback:function(t){e.$set(e.query,"versionType",t)},expression:"query.versionType"}},[a("el-option",{key:"",attrs:{label:"全部",value:""}}),e._v(" "),a("el-option",{attrs:{label:"应用程序",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"模型文件",value:"2"}}),e._v(" "),a("el-option",{attrs:{label:"配置文件",value:"3"}}),e._v(" "),a("el-option",{attrs:{label:"其他文件",value:"4"}}),e._v(" "),a("el-option",{attrs:{label:"系统固件",value:"5"}}),e._v(" "),a("el-option",{attrs:{label:"模组固件",value:"6"}}),e._v(" "),a("el-option",{attrs:{label:"安全芯片固件",value:"7"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"固件名称:"}},[a("el-input",{attrs:{placeholder:"请输入固件名称"},model:{value:e.query.name,callback:function(t){e.$set(e.query,"name",t)},expression:"query.name"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v("查询")]),e._v(" "),a("el-button",{attrs:{type:"default"},on:{click:e.reset}},[e._v("重置")])],1),e._v(" "),a("br"),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.add}},[e._v("新增固件")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.clickQueryDevice}},[e._v("设备查询")])],1)],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",staticClass:"table",attrs:{data:e.tableData,size:"mini","header-cell-class-name":"table-header"},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{prop:"deviceTypeName",label:"所属设备类型"}}),e._v(" "),a("el-table-column",{attrs:{prop:"versionTypeName",label:"固件模块"}}),e._v(" "),a("el-table-column",{attrs:{prop:"packageType",label:"升级类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.packageTypeList[t.row.packageType])+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"固件名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"currentVersion",label:"固件版本号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"添加时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.format("",new Date(t.row.createTime)))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"固件状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[2==t.row.checkStatus?a("div",[a("span",{staticClass:"status-circle doing"}),e._v(" "),a("span",[e._v("验证中")])]):e._e(),e._v(" "),1==t.row.checkStatus?a("div",[a("span",{staticClass:"status-circle disable"}),e._v(" "),a("span",[e._v("未上架")])]):e._e(),e._v(" "),3==t.row.checkStatus?a("div",[a("span",{staticClass:"status-circle success"}),e._v(" "),a("span",[e._v("已上架")])]):e._e(),e._v(" "),4==t.row.checkStatus?a("div",[a("span",{staticClass:"status-circle disable"}),e._v(" "),a("span",[e._v("已下架")])]):e._e(),e._v(" "),9==t.row.checkStatus?a("div",[a("span",{staticClass:"status-circle error"}),e._v(" "),a("span",[e._v("验证失败")])]):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"240",align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.checkStatus||9==t.row.checkStatus?a("div",[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleVerifyAll(t.$index,t.row)}}},[e._v("验证固件")]),e._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handelView(t.$index,t.row)}}},[e._v("查看")]),e._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleEdit(t.$index,t.row)}}},[e._v("编辑")]),e._v(" "),a("el-button",{staticClass:"red",attrs:{type:"text"},on:{click:function(a){return e.handleDelete(t.$index,t.row)}}},[e._v("删除")])],1):e._e(),e._v(" "),2==t.row.checkStatus?a("div",[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handelView(t.$index,t.row)}}},[e._v("查看")])],1):e._e(),e._v(" "),3==t.row.checkStatus?a("div",[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleUpdate(t.$index,t.row)}}},[e._v("批量升级")]),e._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handelView(t.$index,t.row)}}},[e._v("查看")]),e._v(" "),a("el-button",{staticClass:"red",attrs:{type:"text"},on:{click:function(a){return e.handleCancel(t.$index,t.row)}}},[e._v("下架")])],1):e._e(),e._v(" "),4==t.row.checkStatus?a("div",[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleAvailable(t.$index,t.row)}}},[e._v("上架")]),e._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handelView(t.$index,t.row)}}},[e._v("查看")]),e._v(" "),a("el-button",{staticClass:"red",attrs:{type:"text"},on:{click:function(a){return e.handleDelete(t.$index,t.row)}}},[e._v("删除")])],1):e._e()]}}])})],1),e._v(" "),a("div",{staticClass:"pagination"},[a("el-pagination",{attrs:{"page-sizes":[10,20,30,40],"current-page":e.query.currentPage,"page-size":e.query.rowsOfPage,total:e.pageTotal,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.handleSizeChange,"current-change":e.handlePageChange}})],1)],1)],1)},staticRenderFns:[]},void 0,{name:"basetable",data:function(){return{format:f.a,allTreeList:[],query:{packageType:"",versionType:"",deviceTypeId:[],serviceCode:"",serviceCodeName:"",name:"",currentPage:1,rowsOfPage:10},loading:!1,tableData:[],packageTypeList:{0:"差异",1:"全量"},versionTypeList:{1:"应用程序",2:"模型文件",3:"配置文件",4:"其他文件"},statusList:{1:"未上架",2:"验证中",3:"验证完成(已上架)",4:"已下架",9:"验证失败"},multipleSelection:[],delList:[],editVisible:!1,pageTotal:0,form:{},idx:-1,id:-1}},created:function(){this.getData(),this.deviceTypeAlltree()},methods:{clickQueryDevice:function(){this.$router.push({path:"/ota/device/list"})},add:function(){this.$router.push({path:"/add",query:{}})},reset:function(){for(var e in this.query)Object.prototype.hasOwnProperty.call(this.query,e)&&"currentPage"!=e&&"rowsOfPage"!=e&&(this.query[e]="");this.query.deviceTypeId=[],this.query.currentPage=1,this.getData()},handelView:function(e){this.$router.push({path:"/details",query:{type:0,id:this.tableData[e].id}})},handleEdit:function(e,t){this.$router.push({path:"/add",query:{id:t.id}})},handleVerifyAll:function(e,t){this.$router.push({path:"/verification",query:{type:0==t.packageType?1:0,id:t.id}})},handleVerifySingle:function(e,t){this.$router.push({path:"/verification",query:{type:1,id:t.id}})},handleUpdate:function(e,t){this.$router.push({path:"/ota-upgrade",query:{type:0==t.packageType?3:2,id:t.id}})},deviceTypeAlltree:function(){var e=this;h.a.deviceTypeAlltree({}).then(function(t){0==t.code&&(e.allTreeList=t.data)})},getData:function(){var e=this;this.loading=!0;var t=JSON.parse(r()(this.query));t.deviceTypeId=t.deviceTypeId.length?t.deviceTypeId[1]:"",h.a.deviceUpgradePage(t).then(function(t){e.loading=!1,0==t.code&&(e.tableData=t.data.datas,e.pageTotal=t.data.totalRows||0,e.query.currentPage=t.data.currentPage,e.query.rowsOfPage=t.data.pageSize)})},handleSearch:function(){this.$set(this.query,"currentPage",1),this.getData()},handleDelete:function(e,t){var a=this;this.$confirm("确定要删除吗?","提示",{type:"warning"}).then(function(){h.a.deviceUpgradeDelete({ids:[t.id]}).then(function(e){0==e.code&&(a.getData(),a.$message.success(e.message||"删除成功"))}).catch(function(e){})}).catch(function(){})},handleAvailable:function(e,t){var a=this;this.$confirm("是否确认,上架该固件?","提示",{type:"warning"}).then(function(){h.a.deviceUpgradeAvailable({ids:[t.id]}).then(function(e){0==e.code&&(a.getData(),a.$message.success(e.message||"上架成功"))}).catch(function(e){})}).catch(function(){})},handleCancel:function(e,t){var a=this;this.$confirm("是否确认,下架该固件?","提示",{type:"warning"}).then(function(){h.a.deviceUpgradeRemove({ids:[t.id]}).then(function(e){0==e.code&&(a.getData(),a.$message.success(e.message||"下架成功"))}).catch(function(e){})}).catch(function(){})},handleSelectionChange:function(e){this.multipleSelection=e},delAllSelection:function(){var e,t=this.multipleSelection.length,a="";this.delList=l()(e=this.delList).call(e,this.multipleSelection);for(var n=0;n<t;n++)a+=this.multipleSelection[n].name+" ";this.$message.error("删除了".concat(a)),this.multipleSelection=[]},handlePageChange:function(e){this.query.currentPage=e,this.getData()},handleSizeChange:function(e){this.query.rowsOfPage=e,this.query.currentPage=1,this.getData()}}},"data-v-71e40591",!1,void 0,!1,void 0,void 0,void 0);t.default=_}});