update:
1. update release-version interface
This commit is contained in:
@@ -2,7 +2,7 @@ import request from '@/axios';
|
|||||||
|
|
||||||
export const getList = (current, size, params) => {
|
export const getList = (current, size, params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/common/release-version/list',
|
url: '/common/release-version/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...params,
|
||||||
@@ -34,7 +34,7 @@ export const remove = (ids) => {
|
|||||||
|
|
||||||
export const add = (row) => {
|
export const add = (row) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/common/release-version/submit',
|
url: '/common/release-version/save',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: row
|
data: row
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,31 +9,10 @@ export default {
|
|||||||
viewBtn: false,
|
viewBtn: false,
|
||||||
delBtn: false,
|
delBtn: false,
|
||||||
addBtn: true,
|
addBtn: true,
|
||||||
editBtn: true,
|
editBtn: false,
|
||||||
selection: false,
|
selection: false,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
column: [
|
column: [
|
||||||
{
|
|
||||||
label: "主键ID",
|
|
||||||
prop: "id",
|
|
||||||
type: "input",
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
hide: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "内部版本号",
|
|
||||||
prop: "versionCode",
|
|
||||||
type: "input",
|
|
||||||
overHidden: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "版本显示名称",
|
|
||||||
prop: "versionName",
|
|
||||||
type: "input",
|
|
||||||
overHidden: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: "应用类型",
|
label: "应用类型",
|
||||||
prop: "appType",
|
prop: "appType",
|
||||||
@@ -48,32 +27,7 @@ export default {
|
|||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "渠道标识",
|
label: "强制更新",
|
||||||
prop: "channelCode",
|
|
||||||
type: 'select',
|
|
||||||
dicUrl: '/blade-system/dict/dictionary?code=release_version_channel_code',
|
|
||||||
props: {
|
|
||||||
label: 'dictValue',
|
|
||||||
value: 'dictKey',
|
|
||||||
},
|
|
||||||
dataType: 'string',
|
|
||||||
overHidden: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "包类型",
|
|
||||||
prop: "packageType",
|
|
||||||
type: 'radio',
|
|
||||||
dicUrl: '/blade-system/dict/dictionary?code=release_version_pack_type',
|
|
||||||
props: {
|
|
||||||
label: 'dictValue',
|
|
||||||
value: 'dictKey',
|
|
||||||
},
|
|
||||||
dataType: 'number',
|
|
||||||
value : 1,
|
|
||||||
overHidden: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "是否强制更新",
|
|
||||||
prop: "isForceUpdate",
|
prop: "isForceUpdate",
|
||||||
type: 'radio',
|
type: 'radio',
|
||||||
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
|
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
|
||||||
@@ -86,97 +40,96 @@ export default {
|
|||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "下载地址",
|
label: "版本号",
|
||||||
prop: "downloadUrl",
|
prop: "versionName",
|
||||||
type: "input",
|
type: "input",
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入版本号',
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/,
|
||||||
|
message: '版本号格式必须为 x.y.z(例如:1.2.3),每段为非负整数,且不能有前导零',
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "更新日志内容",
|
label: "下载包",
|
||||||
prop: "updateContent",
|
prop: "downloadUrl",
|
||||||
type: "textarea",
|
type: "upload",
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
|
required: true,
|
||||||
|
dataType: 'string',
|
||||||
|
rules: [{required: true, message: '请上传APK', trigger: 'blur'}],
|
||||||
|
multiple: false,
|
||||||
|
action: "/blade-resource/oss/endpoint/put-file",
|
||||||
|
accept: ".apk",
|
||||||
|
fileSize: 200 * 1024,
|
||||||
|
tip: "只能上传 APK 文件,且不超过 200MB",
|
||||||
|
propsHttp: {
|
||||||
|
res: 'data',
|
||||||
|
url: 'link'
|
||||||
|
},
|
||||||
|
span: 24,
|
||||||
|
hide: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "隐私协议地址",
|
label: "隐私政策",
|
||||||
prop: "privacyAgreementUrl",
|
prop: "privacyAgreementUrl",
|
||||||
type: "input",
|
type: "input",
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
|
value: "https://privacy.yicha1lu.com/",
|
||||||
|
placeholder: "请输入隐私政策链接",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "用户协议地址",
|
label: "用户协议",
|
||||||
prop: "userAgreementUrl",
|
prop: "userAgreementUrl",
|
||||||
type: "input",
|
type: "input",
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
|
value: "https://terms.yicha1lu.com/",
|
||||||
|
placeholder: "请输入用户协议链接",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "调度链接",
|
label: "更新内容",
|
||||||
|
prop: "updateContent",
|
||||||
|
type: "textarea",
|
||||||
|
rules: [{required: true, message: '请填写更新内容', trigger: 'blur'}],
|
||||||
|
overHidden: true,
|
||||||
|
dataType: 'string',
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "差量更新",
|
||||||
prop: "dispatchUrl",
|
prop: "dispatchUrl",
|
||||||
|
type: "upload",
|
||||||
|
dataType: 'string',
|
||||||
|
overHidden: true,
|
||||||
|
multiple: false,
|
||||||
|
action: "/blade-resource/oss/endpoint/put-file",
|
||||||
|
accept: ".apk",
|
||||||
|
fileSize: 200 * 1024,
|
||||||
|
tip: "只能上传 APK 文件,且不超过 200MB",
|
||||||
|
propsHttp: {
|
||||||
|
res: 'data',
|
||||||
|
url: 'link'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "差量版本",
|
||||||
|
prop: "dispatchTargetVersion",
|
||||||
type: "input",
|
type: "input",
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
rules: [
|
||||||
{
|
{
|
||||||
label: "创建人ID",
|
pattern: /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/,
|
||||||
prop: "createUser",
|
message: '版本号格式必须为 x.y.z(例如:1.2.3),每段为非负整数,且不能有前导零',
|
||||||
type: "input",
|
trigger: 'blur'
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
hide: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "创建部门ID",
|
|
||||||
prop: "createDept",
|
|
||||||
type: "input",
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
hide: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "创建时间",
|
|
||||||
prop: "createTime",
|
|
||||||
type: "input",
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
hide: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "更新人ID",
|
|
||||||
prop: "updateUser",
|
|
||||||
type: "input",
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
hide: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "更新时间",
|
|
||||||
prop: "updateTime",
|
|
||||||
type: "input",
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
hide: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "上架状态: 0-未上架/下架, 1-已上架",
|
|
||||||
prop: "status",
|
|
||||||
type: "input",
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
hide: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "逻辑删除标识",
|
|
||||||
prop: "isDeleted",
|
|
||||||
type: "input",
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
hide: true,
|
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,27 +20,16 @@
|
|||||||
@refresh-change="refreshChange"
|
@refresh-change="refreshChange"
|
||||||
@on-load="onLoad">
|
@on-load="onLoad">
|
||||||
<template #menu-left>
|
<template #menu-left>
|
||||||
<!-- <el-button type="danger"-->
|
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- v-if="permission.commonReleaseversion_delete"-->
|
|
||||||
<!-- @click="handleDelete">删 除-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- <el-button type="warning"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- icon="el-icon-download"-->
|
|
||||||
<!-- @click="handleExport">导 出-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #menu="{ row }">
|
<template #menu="{ row }">
|
||||||
<el-button type="text"
|
<el-button type="text"
|
||||||
icon="el-icon-circle-check"
|
icon="el-icon-circle-check"
|
||||||
@click.stop="toggleStatus(row)"> {{ row.status === 1 ? '下架' : '上架' }}
|
@click.stop="openVersionDetail(row)">
|
||||||
|
上 架
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
@@ -76,7 +65,9 @@ import {
|
|||||||
},
|
},
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
option: option,
|
option: option,
|
||||||
data: []
|
data: [],
|
||||||
|
versionCode : "",
|
||||||
|
direction : "rtl",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -232,27 +223,9 @@ import {
|
|||||||
this.selectionClear();
|
this.selectionClear();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
openVersionDetail(row){
|
||||||
|
|
||||||
toggleStatus(row){
|
|
||||||
let status = row.status === 1 ? '下架' : '上架';
|
|
||||||
|
|
||||||
this.$confirm("确定将此版本" + status + "吗?", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
return applyStatus(row.id);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.onLoad(this.page);
|
|
||||||
this.$message({
|
|
||||||
type: "success",
|
|
||||||
message: "操作成功!"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user