parent
2a77606996
commit
80f67c751a
|
@ -72,5 +72,4 @@
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
|
@ -21,7 +21,8 @@ import {
|
||||||
TabPane,
|
TabPane,
|
||||||
Upload,
|
Upload,
|
||||||
Loading,
|
Loading,
|
||||||
Message
|
Message,
|
||||||
|
Alert
|
||||||
} from 'element-ui';
|
} from 'element-ui';
|
||||||
|
|
||||||
Vue.use(Input);
|
Vue.use(Input);
|
||||||
|
@ -40,7 +41,7 @@ Vue.use(DatePicker);
|
||||||
Vue.use(Tabs);
|
Vue.use(Tabs);
|
||||||
Vue.use(TabPane);
|
Vue.use(TabPane);
|
||||||
Vue.use(Upload);
|
Vue.use(Upload);
|
||||||
|
Vue.use(Alert);
|
||||||
Vue.use(Loading.directive);
|
Vue.use(Loading.directive);
|
||||||
|
|
||||||
Vue.prototype.$loading = Loading.service;
|
Vue.prototype.$loading = Loading.service;
|
||||||
|
|
|
@ -367,7 +367,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%;">
|
<div style="width: 100%;">
|
||||||
<!-- multiple 暂时去除多文件上传功能 -->
|
<!-- multiple 暂时去除多文件上传功能 -->
|
||||||
<el-upload class="upload-demo" drag action="/uploadFireWare" accept=".bin" :limit="1"
|
<el-upload ref="upload" class="upload-demo" drag action="/uploadFireWare" accept=".bin" :limit="1"
|
||||||
:on-progress="beginUpload" :on-success="uploadSuccessFinish" :on-error="uploadErrorFinish"
|
:on-progress="beginUpload" :on-success="uploadSuccessFinish" :on-error="uploadErrorFinish"
|
||||||
v-loading="uploadLoading" element-loading-text="上传中...">
|
v-loading="uploadLoading" element-loading-text="上传中...">
|
||||||
<i class="el-icon-upload"></i>
|
<i class="el-icon-upload"></i>
|
||||||
|
@ -376,7 +376,10 @@
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-top: 0px;">
|
||||||
|
<el-alert title="固件上传失败,请重试." type="error" show-icon v-show="uploadAlertShow">
|
||||||
|
</el-alert>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-dialog title="修改密码" width="30%" center :visible.sync="pwdModelShow" top="35vh">
|
<el-dialog title="修改密码" width="30%" center :visible.sync="pwdModelShow" top="35vh">
|
||||||
|
@ -686,7 +689,10 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
//默认选中的菜单
|
//默认选中的菜单
|
||||||
selectMenuName: '系统设置'
|
selectMenuName: '系统设置',
|
||||||
|
|
||||||
|
//上传文件提示框
|
||||||
|
uploadAlertShow: false
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -703,7 +709,8 @@
|
||||||
index: 0
|
index: 0
|
||||||
}, null);
|
}, null);
|
||||||
} else if (name == '固件升级') {
|
} else if (name == '固件升级') {
|
||||||
this.querySysFrom();
|
this.$refs['upload'].clearFiles();
|
||||||
|
this.uploadAlertShow = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -918,7 +925,7 @@
|
||||||
}
|
}
|
||||||
const loading = this.$loading({
|
const loading = this.$loading({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: '查询中...',
|
text: '保存中...',
|
||||||
spinner: 'el-icon-loading',
|
spinner: 'el-icon-loading',
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
});
|
});
|
||||||
|
@ -1066,10 +1073,7 @@
|
||||||
* 登出
|
* 登出
|
||||||
*/
|
*/
|
||||||
loginOut: function() {
|
loginOut: function() {
|
||||||
|
|
||||||
|
|
||||||
this.logoutSys();
|
this.logoutSys();
|
||||||
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'home'
|
name: 'home'
|
||||||
});
|
});
|
||||||
|
@ -1088,6 +1092,8 @@
|
||||||
*/
|
*/
|
||||||
beginUpload: function() {
|
beginUpload: function() {
|
||||||
this.uploadLoading = true;
|
this.uploadLoading = true;
|
||||||
|
//开始上传时,关闭提示框
|
||||||
|
_this.uploadAlertShow = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1101,20 +1107,25 @@
|
||||||
//成功
|
//成功
|
||||||
if (response.result == 'success') {
|
if (response.result == 'success') {
|
||||||
_this.$message.success('上传成功,稍后重启。');
|
_this.$message.success('上传成功,稍后重启。');
|
||||||
|
_this.uploadAlertShow = false;
|
||||||
} else {
|
} else {
|
||||||
_this.$message.error(response.message);
|
_this.$message.error(response.message);
|
||||||
|
_this.$refs['upload'].clearFiles();
|
||||||
|
_this.uploadAlertShow = true;
|
||||||
}
|
}
|
||||||
// setTimeout(function() {
|
// setTimeout(function() {
|
||||||
// _this.uploadLoading = false;
|
// _this.uploadLoading = false;
|
||||||
// }, 5000);
|
// }, 5000);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传失败处
|
* 上传失败处
|
||||||
*/
|
*/
|
||||||
uploadErrorFinish: function() {
|
uploadErrorFinish: function() {
|
||||||
this.uploadLoading = false;
|
this.uploadLoading = false;
|
||||||
this.$message.error('上传失败,请重启设备后重试。');
|
this.$message.error('上传失败,请重启设备后重试。');
|
||||||
|
this.uploadAlertShow = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue