mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 00:40:30 +08:00
4f79e10bd6
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
1 line
9.9 KiB
JavaScript
1 line
9.9 KiB
JavaScript
webpackJsonp([128],{"2wv4":function(e,t,a){"use strict";var s={data:function(){return{}},computed:{bg:function(){return this.statusColorList?this.statusColorList[this.value]:this.disabled?"#BCC0C5":this.fail?"#E4071E":this.complete?"green":"#3399ff"}},props:{color:String,disabled:Boolean,fail:Boolean,complete:Boolean,value:Number,type:{type:String,default:"status"},statusColorList:{type:Object,required:!1},statusTextList:{type:Object,required:!1}},methods:{renderStr:function(e){if(this.statusTextList)return this.statusTextList[e];switch(e){case"":break;default:return{1:"升级完成",2:"升级中",3:"暂停",4:"未执行",5:"升级失败",7:"升级中"}[e]||""}}}},n={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"status-wrp"},[t("span",{directives:[{name:"show",rawName:"v-show",value:6!=this.value,expression:"value != 6"}],staticClass:"status-point",style:{backgroundColor:this.bg}}),this._v(" "),t("span",[this._v(this._s(this.renderStr(this.value)))])])},staticRenderFns:[]};var r=a("VU/8")(s,n,!1,function(e){a("j89x")},"data-v-56951635",null);t.a=r.exports},"6jVY":function(e,t,a){var s=a("rQFs");"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);a("rjj0")("284cf6e5",s,!0)},IJAk:function(e,t,a){(e.exports=a("FZ+f")(!1)).push([e.i,"\n.status-wrp span[data-v-56951635] {\n vertical-align: middle;\n}\n.status-wrp .status-point[data-v-56951635] {\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: #3399ff;\n margin-right: 8px;\n}\n",""])},Xfjf:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("EEkg"),n=a("xT6B"),r=a("vMX1"),i=a("2wv4"),o={components:{searchPage:r.a,upgrade:i.a},data:function(){return{formateDate:n.a,searchForm:{rowsOfPage:10,currentPage:1,deviceTypeId:"",status:""},logoutDialog:!1,logoutTitle:"",engineTypes:[],statusList:[{label:"全部",value:""},{label:"未执行",value:"4"},{label:"升级中",value:"2"},{label:"暂停",value:"3"},{label:"升级完成",value:"1"},{label:"升级失败",value:"5"}],tableData:[],loading:!1,showEdit:!1,total:0,packageList:[{label:"增量",value:"1"},{label:"全量",value:"2"}],engineRecogTypes:[],tableLoading:!1}},created:function(){this.fetchData(),this.fetchTypeList(),this.fetchRecogTypeList()},methods:{searchData:function(){this.searchForm.currentPage=1,this.fetchData()},fetchData:function(){var e=this;this.tableLoading=!0,s.a.upgradeSearch(this.searchForm).then(function(t){setTimeout(function(){e.tableData=t.data,e.total=t.total,e.tableLoading=!1},500)}).catch(function(t){e.$message.error(t.message),e.tableLoading=!1})},edit:function(e,t){var a,n=this;a=2==t?"启动":3==t?"暂停":4==t?"完成升级":"此操作",this.$confirm("是否确定"+a+"?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){n.$set(e,"loading",!0),s.a.upgradeEdit(e.id,t).then(function(t){n.$set(e,"loading",!1),n.$message.success(t.message),n.fetchData()}).catch(function(t){n.$set(e,"loading",!1),n.$message.error(t.message),n.fetchData()})}).catch(function(){})},del:function(e){var t=this;this.$confirm("提示:版本删除后,无法恢复,请谨慎操作!","确认删除",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$set(e,"loading",!0),s.a.upgradeDel(e.id).then(function(a){t.$set(e,"loading",!1),t.fetchData(),t.$message.success(a.message)}).catch(function(a){t.$set(e,"loading",!1),t.$message.error(a.message),t.fetchData()})}).catch(function(){})},resetSearch:function(){this.searchForm={rowsOfPage:10,currentPage:1},this.fetchData()},handleSizeChange:function(e){this.searchForm.rowsOfPage=e,this.fetchData()},handleCurrentChange:function(e){this.searchForm.currentPage=e,this.fetchData()},fetchTypeList:function(){var e=this;s.a.typeList().then(function(t){e.engineTypes=t,e.engineTypes.unshift({label:"全部",value:""})}).catch(function(t){e.$message.error(t.message)})},fetchRecogTypeList:function(){var e=this;s.a.typeRecogList().then(function(t){e.engineRecogTypes=t}).catch(function(t){e.$message.error(t.message)})},transterRecogType:function(e){if(e){var t=e.split("#"),a=t.length>1?t[1]:"";return this.engineRecogTypes.some(function(e){if(e.value===a)return a=e.label,!0}),a}return""}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-card",{staticClass:"upadd-card",attrs:{shadow:"hover"}},[a("search-page",{attrs:{pageSize:e.searchForm.rowsOfPage,pageNum:e.searchForm.currentPage,total:e.total},on:{"update:pageSize":function(t){return e.$set(e.searchForm,"rowsOfPage",t)},"update:page-size":function(t){return e.$set(e.searchForm,"rowsOfPage",t)},"update:pageNum":function(t){return e.$set(e.searchForm,"currentPage",t)},"update:page-num":function(t){return e.$set(e.searchForm,"currentPage",t)},change:e.fetchData}},[a("el-form",{attrs:{inline:"","label-width":"70px"}},[a("el-form-item",{attrs:{label:"设备类型"}},[a("el-select",{model:{value:e.searchForm.deviceTypeId,callback:function(t){e.$set(e.searchForm,"deviceTypeId",t)},expression:"searchForm.deviceTypeId"}},e._l(e.engineTypes,function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"任务状态"}},[a("el-select",{model:{value:e.searchForm.status,callback:function(t){e.$set(e.searchForm,"status",t)},expression:"searchForm.status"}},e._l(e.statusList,function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.deviceLevelSearch],expression:"[$auth.deviceLevelSearch]"}],attrs:{type:"warning"},on:{click:e.searchData}},[e._v("查询")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.deviceLevelSearch],expression:"[$auth.deviceLevelSearch]"}],attrs:{type:"default"},on:{click:e.resetSearch}},[e._v("重置")]),e._v(" "),a("router-link",{attrs:{to:{name:"addPromotion"}}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.deviceLevelAdd],expression:"[$auth.deviceLevelAdd]"}],staticStyle:{"margin-left":"10px"},attrs:{type:"primary"}},[e._v("新建")])],1)],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{type:"index",width:"50",label:"序号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"升级任务名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"upgradeName",label:"升级文件","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("router-link",{attrs:{to:{name:"fileDetail",query:{id:t.row.upgradeId}}}},[a("el-button",{attrs:{type:"text"}},[e._v(e._s(t.row.upgradeName))])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"deviceTypeName",label:"设备类型"}}),e._v(" "),a("el-table-column",{attrs:{prop:"deviceTotal",label:"升级设备数(总数/已完成)","min-width":"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.deviceTotal+"/"+t.row.deviceDoneNum))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"supplierName",label:"设备完成数(成功/失败)","min-width":"130px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.deviceSuccessNum+"/"+t.row.deviceFailNum))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"任务开始时间","min-width":"120px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.createTime?e.formateDate(new Date(t.row.createTime),"yyyy-MM-dd hh:mm:ss"):"-"))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"endTime",label:"任务结束时间","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.endTime?e.formateDate(new Date(t.row.endTime),"yyyy-MM-dd hh:mm:ss"):"-"))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("upgrade",{attrs:{disabled:3==e.row.status||4==e.row.status,fail:"5"==e.row.status,complete:"1"==e.row.status,value:e.row.status}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"140"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.deviceLevelDetail],expression:"[$auth.deviceLevelDetail]"}],staticClass:"btn-border-right",attrs:{type:"text"},on:{click:function(a){return e.$router.push("/control/upgrade/detail?id="+t.row.id)}}},[e._v("详情")]),e._v(" "),4==t.row.status?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.deviceLevelEnable],expression:"[$auth.deviceLevelEnable]"}],staticClass:"btn-border-right",attrs:{loading:t.row.loading,type:"text"},on:{click:function(a){return e.edit(t.row,3)}}},[e._v("暂停")]):e._e(),e._v(" "),3==t.row.status?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.deviceLevelEnable],expression:"[$auth.deviceLevelEnable]"}],staticClass:"btn-border-right",attrs:{loading:t.row.loading,type:"text"},on:{click:function(a){return e.edit(t.row,2)}}},[e._v("启动")]):e._e(),e._v(" "),4==t.row.status?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.deviceLevelDelete],expression:"[$auth.deviceLevelDelete]"}],attrs:{loading:t.row.loading,type:"text"},on:{click:function(a){return e.del(t.row)}}},[e._v("删除")]):e._e()]}}])})],1)],1)],1)],1)},staticRenderFns:[]};var c=a("VU/8")(o,l,!1,function(e){a("6jVY")},"data-v-e075a10e",null);t.default=c.exports},j89x:function(e,t,a){var s=a("IJAk");"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);a("rjj0")("eb8f6474",s,!0)},rQFs:function(e,t,a){(e.exports=a("FZ+f")(!1)).push([e.i,"\n.upadd-card[data-v-e075a10e] {\n margin-bottom: 100px;\n padding-bottom: 18px;\n}\n",""])}}); |