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) => {
|
||||
return request({
|
||||
url: '/common/release-version/list',
|
||||
url: '/common/release-version/page',
|
||||
method: 'get',
|
||||
params: {
|
||||
...params,
|
||||
@@ -34,7 +34,7 @@ export const remove = (ids) => {
|
||||
|
||||
export const add = (row) => {
|
||||
return request({
|
||||
url: '/common/release-version/submit',
|
||||
url: '/common/release-version/save',
|
||||
method: 'post',
|
||||
data: row
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export default {
|
||||
height:'auto',
|
||||
height: 'auto',
|
||||
calcHeight: 30,
|
||||
tip: false,
|
||||
searchShow: true,
|
||||
@@ -9,31 +9,10 @@ export default {
|
||||
viewBtn: false,
|
||||
delBtn: false,
|
||||
addBtn: true,
|
||||
editBtn: true,
|
||||
editBtn: false,
|
||||
selection: false,
|
||||
dialogClickModal: false,
|
||||
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: "应用类型",
|
||||
prop: "appType",
|
||||
@@ -44,36 +23,11 @@ export default {
|
||||
value: 'dictKey',
|
||||
},
|
||||
dataType: 'number',
|
||||
value : 1,
|
||||
value: 1,
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
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: "是否强制更新",
|
||||
label: "强制更新",
|
||||
prop: "isForceUpdate",
|
||||
type: 'radio',
|
||||
dicUrl: '/blade-system/dict/dictionary?code=app_yes_no',
|
||||
@@ -82,101 +36,100 @@ export default {
|
||||
value: 'dictKey',
|
||||
},
|
||||
dataType: 'number',
|
||||
value : 0,
|
||||
value: 0,
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: "下载地址",
|
||||
prop: "downloadUrl",
|
||||
label: "版本号",
|
||||
prop: "versionName",
|
||||
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,
|
||||
},
|
||||
{
|
||||
label: "更新日志内容",
|
||||
prop: "updateContent",
|
||||
type: "textarea",
|
||||
label: "下载包",
|
||||
prop: "downloadUrl",
|
||||
type: "upload",
|
||||
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",
|
||||
type: "input",
|
||||
overHidden: true,
|
||||
value: "https://privacy.yicha1lu.com/",
|
||||
placeholder: "请输入隐私政策链接",
|
||||
},
|
||||
{
|
||||
label: "用户协议地址",
|
||||
label: "用户协议",
|
||||
prop: "userAgreementUrl",
|
||||
type: "input",
|
||||
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",
|
||||
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",
|
||||
overHidden: true,
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
label: "创建人ID",
|
||||
prop: "createUser",
|
||||
type: "input",
|
||||
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,
|
||||
pattern: /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/,
|
||||
message: '版本号格式必须为 x.y.z(例如:1.2.3),每段为非负整数,且不能有前导零',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -20,27 +20,16 @@
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad">
|
||||
<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 #menu="{ row }">
|
||||
<el-button type="text"
|
||||
icon="el-icon-circle-check"
|
||||
@click.stop="toggleStatus(row)"> {{ row.status === 1 ? '下架' : '上架' }}
|
||||
@click.stop="openVersionDetail(row)">
|
||||
上 架
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
</template>
|
||||
@@ -76,7 +65,9 @@ import {
|
||||
},
|
||||
selectionList: [],
|
||||
option: option,
|
||||
data: []
|
||||
data: [],
|
||||
versionCode : "",
|
||||
direction : "rtl",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -232,27 +223,9 @@ import {
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user