|
@@ -17,12 +17,13 @@
|
|
|
@refresh-change="refreshChange"
|
|
|
@on-load="onLoad">
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
- <el-button type="text" size="small" icon="el-icon-upload2" @click.stop="handleAdd(scope.row,scope.index)">升级</el-button>
|
|
|
+ <el-button type="text" size="small" icon="el-icon-upload2" @click.stop="handleAdd(scope.row,scope.index)">升级
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
|
|
|
<!-- 升级 -->
|
|
|
- <el-dialog title="App升级" :visible.sync="dialogUpload" append-to-body center >
|
|
|
+ <el-dialog class="app-upload-dialog" title="App升级" :visible.sync="dialogUpload" append-to-body center>
|
|
|
<avue-crud :option="option1"
|
|
|
:table-loading="loadingDeail"
|
|
|
:data="dataDetail"
|
|
@@ -39,30 +40,16 @@
|
|
|
@refresh-change="refreshChangeDetail"
|
|
|
@on-load="onLoadDetail">
|
|
|
|
|
|
- <div slot-scope="{}" slot="fileUrlForm" style="display: inline-block;width: 100%;">
|
|
|
-
|
|
|
- <!-- <el-input style="width: 60%; display: inline-block" v-model="form.fileUrl"></el-input> -->
|
|
|
- <el-input v-model="form.fileUrl" />
|
|
|
- <el-upload
|
|
|
- style="width: 100%; display: inline-block;margin-top: 5px;"
|
|
|
- action="/api/blade-resource/oss/endpoint/put-file3"
|
|
|
- :on-remove="handleRemove"
|
|
|
- :limit="1"
|
|
|
- :headers=headers
|
|
|
- :on-exceed="handleExceed"
|
|
|
- :on-success="handleSuccess"
|
|
|
- :file-list="fileList"
|
|
|
- >
|
|
|
- <el-button size="small" type="primary" style="display: inline-block">上传</el-button>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- </el-upload>
|
|
|
-
|
|
|
-
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
+ <div slot-scope="{}" slot="fileUrlForm" style="display: inline-block;width: 100%;">
|
|
|
+ <el-input v-model="form.fileUrl">
|
|
|
+ <el-upload slot="append" action="/api/blade-resource/oss/endpoint/put-file3" accept=".apk,.wgt" :disabled="isLoading"
|
|
|
+ :on-remove="handleRemove" :limit="1" :headers='headers' :show-file-list="false"
|
|
|
+ :on-exceed="handleExceed" :on-success="handleSuccess" :on-progress="handleProgress" :on-error="handleError"
|
|
|
+ >
|
|
|
+ <el-button size="small" type="primary" :loading="isLoading" style="display: inline-block">上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
</avue-crud>
|
|
|
</el-dialog>
|
|
|
</basic-container>
|
|
@@ -80,8 +67,6 @@ import {
|
|
|
removeDetail
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
} from "@/api/system/app";
|
|
|
import {getDetail as packageDetail} from "@/api/system/tenantpackage";
|
|
|
import {mapGetters} from "vuex";
|
|
@@ -107,7 +92,7 @@ export default {
|
|
|
currentPage: 1,
|
|
|
total: 0
|
|
|
},
|
|
|
- pageDetail:{
|
|
|
+ pageDetail: {
|
|
|
pageSize: 10,
|
|
|
currentPage: 1,
|
|
|
total: 0
|
|
@@ -161,37 +146,33 @@ export default {
|
|
|
span: 24,
|
|
|
minRows: 2,
|
|
|
type: "textarea",
|
|
|
- // hide: true,
|
|
|
+ hide: true,
|
|
|
},
|
|
|
{
|
|
|
label: "更新时间",
|
|
|
prop: "updateTime",
|
|
|
span: 24,
|
|
|
type: "time",
|
|
|
- display:false ,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入更新时间",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ display: false
|
|
|
},
|
|
|
]
|
|
|
},
|
|
|
data: [],
|
|
|
- dataDetail:[],
|
|
|
- loadingDeail:false,
|
|
|
+ dataDetail: [],
|
|
|
+ loadingDeail: false,
|
|
|
settingForm: {},
|
|
|
dialogUpload: false,
|
|
|
+ isLoading: false,
|
|
|
option1: {
|
|
|
height: '100%',
|
|
|
calcHeight: 30,
|
|
|
tip: false,
|
|
|
- searchShow: false,
|
|
|
+ searchShow: true,
|
|
|
searchMenuSpan: 6,
|
|
|
border: true,
|
|
|
index: true,
|
|
|
- selection: false,
|
|
|
- viewBtn: false,
|
|
|
+ selection: true,
|
|
|
+ viewBtn: true,
|
|
|
dialogWidth: 600,
|
|
|
dialogClickModal: false,
|
|
|
column: [
|
|
@@ -210,6 +191,7 @@ export default {
|
|
|
prop: "softwareType",
|
|
|
type: "radio",
|
|
|
span: 24,
|
|
|
+ search: true,
|
|
|
dicData: [
|
|
|
{
|
|
|
label: "安卓",
|
|
@@ -236,6 +218,7 @@ export default {
|
|
|
prop: "fileType",
|
|
|
type: "radio",
|
|
|
span: 24,
|
|
|
+ search: true,
|
|
|
dicData: [
|
|
|
{
|
|
|
label: "完整安装包",
|
|
@@ -279,16 +262,12 @@ export default {
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
},
|
|
|
- {
|
|
|
- label: "文件大小",
|
|
|
- prop: "fileSize",
|
|
|
- span: 24,
|
|
|
- },
|
|
|
{
|
|
|
label: "强制更新",
|
|
|
prop: "constraintUpdate",
|
|
|
type: "radio",
|
|
|
span: 24,
|
|
|
+ search: true,
|
|
|
dicData: [
|
|
|
{
|
|
|
label: "是",
|
|
@@ -308,9 +287,16 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "更新时间",
|
|
|
+ prop: "updateDate",
|
|
|
+ span: 24,
|
|
|
+ type: "time",
|
|
|
+ display: false
|
|
|
+ },
|
|
|
]
|
|
|
},
|
|
|
- versionId:'',
|
|
|
+ versionId: '',
|
|
|
headers: {},
|
|
|
};
|
|
|
},
|
|
@@ -370,7 +356,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
rowSaveDetail(row, done, loading) {
|
|
|
- row.versionId=this.versionId
|
|
|
+ row.versionId = this.versionId
|
|
|
addDetail(row).then(() => {
|
|
|
this.onLoadDetail(this.pageDetail);
|
|
|
this.$message({
|
|
@@ -396,7 +382,7 @@ export default {
|
|
|
loading();
|
|
|
});
|
|
|
},
|
|
|
- rowUpdateDetail(row, index, done, loading){
|
|
|
+ rowUpdateDetail(row, index, done, loading) {
|
|
|
updateDetail(row).then(() => {
|
|
|
this.onLoadDetail(this.pageDetail);
|
|
|
this.$message({
|
|
@@ -546,7 +532,7 @@ export default {
|
|
|
currentChange(currentPage) {
|
|
|
this.page.currentPage = currentPage;
|
|
|
},
|
|
|
- currentChangeDetail(currentPage){
|
|
|
+ currentChangeDetail(currentPage) {
|
|
|
this.pageDetail.currentPage = currentPage;
|
|
|
},
|
|
|
sizeChange(pageSize) {
|
|
@@ -555,7 +541,7 @@ export default {
|
|
|
refreshChange() {
|
|
|
this.onLoad(this.page, this.query);
|
|
|
},
|
|
|
- refreshChangeDetail(){
|
|
|
+ refreshChangeDetail() {
|
|
|
this.onLoadDetail(this.pageDetail);
|
|
|
},
|
|
|
onLoad(page, params = {}) {
|
|
@@ -569,41 +555,55 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleAdd(row, index) {
|
|
|
- this.dialogUpload = true;
|
|
|
- this.versionId=row.id
|
|
|
- this.onLoadDetail(this.pageDetail)
|
|
|
- this.setHeaders()
|
|
|
+ this.dialogUpload = true;
|
|
|
+ this.versionId = row.id
|
|
|
+ this.onLoadDetail(this.pageDetail)
|
|
|
+ this.setHeaders()
|
|
|
},
|
|
|
- onLoadDetail(page){
|
|
|
+ onLoadDetail(page) {
|
|
|
this.loadingDeail = true;
|
|
|
- getDetailList(page.currentPage, page.pageSize,this.versionId).then(res => {
|
|
|
- const data = res.data.data;
|
|
|
- this.pageDetail.total = data.total;
|
|
|
- this.dataDetail = data.records;
|
|
|
- this.loadingDeail = false;
|
|
|
- });
|
|
|
+ getDetailList(page.currentPage, page.pageSize, this.versionId).then(res => {
|
|
|
+ const data = res.data.data;
|
|
|
+ this.pageDetail.total = data.total;
|
|
|
+ this.dataDetail = data.records;
|
|
|
+ this.loadingDeail = false;
|
|
|
+ });
|
|
|
},
|
|
|
handleRemove(file) {
|
|
|
this.form.fileUrl = '';
|
|
|
this.form.fileSize = '';
|
|
|
-
|
|
|
},
|
|
|
handleExceed() {
|
|
|
this.$message.warning(`当前限制选择 1 个文件,请先移除后,再次上传`);
|
|
|
},
|
|
|
handleSuccess(res) {
|
|
|
- console.log(res.data.link,'res.data.link');
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "上传成功!"
|
|
|
+ });
|
|
|
this.form.fileUrl = res.data.link;
|
|
|
- this.form.fileSize=res.data.fileSize
|
|
|
+ this.form.fileSize = res.data.fileSize
|
|
|
+ this.isLoading = false
|
|
|
+ },
|
|
|
+ handleError() {
|
|
|
+ this.isLoading = false
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: "上传失败!"
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleProgress() {
|
|
|
+ this.isLoading = true
|
|
|
},
|
|
|
},
|
|
|
-
|
|
|
created() {
|
|
|
this.setHeaders()
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
};
|
|
|
</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+.el-dialog__wrapper.app-upload-dialog .el-dialog {
|
|
|
+ width: 80%;
|
|
|
+}
|
|
|
+</style>
|