update:
1. update release-version
This commit is contained in:
@@ -49,15 +49,25 @@ export const update = (row) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const applyStatus = (id) => {
|
export const getDetailList = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/common/release-version/applyStatus',
|
url: '/common/release-version/detail-list',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
id,
|
...params,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const fillUrl = (id, value) => {
|
||||||
|
return request({
|
||||||
|
url: '/common/release-version/publish',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
id: id,
|
||||||
|
downloadUrl: value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,25 +24,39 @@
|
|||||||
|
|
||||||
<template #menu="{ row }">
|
<template #menu="{ row }">
|
||||||
<el-button type="text"
|
<el-button type="text"
|
||||||
icon="el-icon-circle-check"
|
icon="el-icon-data-analysis"
|
||||||
@click.stop="openVersionDetail(row)">
|
@click.stop="handleDetailList(row)">
|
||||||
上 架
|
详 情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
|
<el-drawer :title="`[${appTypeText}] [${versionName}] 发布详情`" v-model="detailListVisible" :direction="direction"
|
||||||
|
append-to-body
|
||||||
|
:before-close="handleDetailListClose" size="50%">
|
||||||
|
<basic-container>
|
||||||
|
<avue-crud :option="optionDetailList"
|
||||||
|
:data="dataDetailList"
|
||||||
|
v-model="formDetailList"
|
||||||
|
:table-loading="loadingDetailList"
|
||||||
|
ref="crudDetailList"
|
||||||
|
@refresh-change="refreshChangeDetailList"
|
||||||
|
@on-load="onLoadDetailList">
|
||||||
|
<template #menu="{ row }">
|
||||||
|
<el-button type="text"
|
||||||
|
icon="el-icon-circle-check"
|
||||||
|
v-if="row.status === 1"
|
||||||
|
@click="handleUrl(row)">上 架
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
</basic-container>
|
||||||
|
</el-drawer>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {add, fillUrl, getDetail, getDetailList, getList, remove, update,} from '@/api/common/commonReleaseversion';
|
||||||
getList,
|
|
||||||
getDetail,
|
|
||||||
add,
|
|
||||||
update,
|
|
||||||
remove,
|
|
||||||
applyStatus
|
|
||||||
} from '@/api/common/commonReleaseversion';
|
|
||||||
import option from "@/option/common/commonReleaseversion";
|
import option from "@/option/common/commonReleaseversion";
|
||||||
import {mapGetters} from "vuex";
|
import {mapGetters} from "vuex";
|
||||||
import {exportBlob} from "@/api/common";
|
import {exportBlob} from "@/api/common";
|
||||||
@@ -51,10 +65,13 @@ import {
|
|||||||
import {dateNow} from "@/utils/date";
|
import {dateNow} from "@/utils/date";
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
form: {},
|
||||||
|
formDetailList: {},
|
||||||
query: {},
|
query: {},
|
||||||
search: {},
|
search: {},
|
||||||
loading: true,
|
loading: true,
|
||||||
@@ -68,6 +85,74 @@ import {
|
|||||||
data: [],
|
data: [],
|
||||||
versionCode: "",
|
versionCode: "",
|
||||||
direction: "rtl",
|
direction: "rtl",
|
||||||
|
detailListVisible: false,
|
||||||
|
versionName: "",
|
||||||
|
appType: "",
|
||||||
|
appTypeText: "",
|
||||||
|
dataDetailList: [],
|
||||||
|
loadingDetailList: true,
|
||||||
|
optionDetailList: {
|
||||||
|
height: 'auto',
|
||||||
|
calcHeight: 30,
|
||||||
|
tip: false,
|
||||||
|
searchShow: true,
|
||||||
|
searchMenuSpan: 6,
|
||||||
|
border: true,
|
||||||
|
index: true,
|
||||||
|
viewBtn: false,
|
||||||
|
addBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
selection: false,
|
||||||
|
dialogClickModal: false,
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: "主键",
|
||||||
|
prop: "id",
|
||||||
|
type: "input",
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "渠道标识",
|
||||||
|
prop: "channelCode",
|
||||||
|
type: "radio",
|
||||||
|
dicUrl: '/blade-system/dict/dictionary?code=release_version_channel_code',
|
||||||
|
props: {
|
||||||
|
label: 'dictValue',
|
||||||
|
value: 'dictKey',
|
||||||
|
},
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "更新地址",
|
||||||
|
prop: "downloadUrl",
|
||||||
|
type: "input",
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
overHidden: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "状态",
|
||||||
|
prop: "status",
|
||||||
|
type: "radio",
|
||||||
|
dicUrl: '/blade-system/dict/dictionary?code=release_version_status',
|
||||||
|
props: {
|
||||||
|
label: 'dictValue',
|
||||||
|
value: 'dictKey',
|
||||||
|
},
|
||||||
|
dataType: 'number',
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -86,7 +171,7 @@ import {
|
|||||||
ids.push(ele.id);
|
ids.push(ele.id);
|
||||||
});
|
});
|
||||||
return ids.join(",");
|
return ids.join(",");
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
rowSave(row, done, loading) {
|
rowSave(row, done, loading) {
|
||||||
@@ -132,6 +217,62 @@ import {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleDetailList(row) {
|
||||||
|
this.detailListVisible = true;
|
||||||
|
this.versionName = row.versionName;
|
||||||
|
this.appType = row.appType;
|
||||||
|
this.appTypeText = row.appType === "1" ? "亿茶一路" : "硒茶商汇";
|
||||||
|
this.onLoadDetailList();
|
||||||
|
},
|
||||||
|
onLoadDetailList() {
|
||||||
|
this.loadingDetailList = true;
|
||||||
|
|
||||||
|
let values = {
|
||||||
|
versionName: this.versionName,
|
||||||
|
appType: this.appType,
|
||||||
|
};
|
||||||
|
getDetailList(Object.assign(values)).then(res => {
|
||||||
|
this.dataDetailList = res.data.data;
|
||||||
|
this.loadingDetailList = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDetailListClose(hide) {
|
||||||
|
hide();
|
||||||
|
},
|
||||||
|
handleUrl(row) {
|
||||||
|
let defaultUrl = '';
|
||||||
|
if (this.appType === 1 && row.channelCode === 'pgyer'){
|
||||||
|
defaultUrl = 'https://www.pgyer.com/yichayilu';
|
||||||
|
}
|
||||||
|
if (this.appType === 2 && row.channelCode === 'pgyer'){
|
||||||
|
defaultUrl = 'https://www.pgyer.com/xichashanghui';
|
||||||
|
}
|
||||||
|
this.$prompt('请输入更新链接', '更新链接', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
inputPlaceholder: '请输入更新链接',
|
||||||
|
inputValue: defaultUrl,
|
||||||
|
}).then(({ value }) => {
|
||||||
|
if (value.trim() === '') {
|
||||||
|
this.$message.warning('更新链接不能为空');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fillUrl(row.id, value)
|
||||||
|
.then(()=>{
|
||||||
|
this.$message.success('上架成功');
|
||||||
|
this.onLoadDetailList();
|
||||||
|
})
|
||||||
|
.catch((error)=>{
|
||||||
|
console.error('fillUrl failed:', error);
|
||||||
|
this.$message.error('上架失败,请重试');
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.info('已取消输入');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
refreshChangeDetailList() {
|
||||||
|
this.onLoadDetailList();
|
||||||
|
},
|
||||||
handleDelete() {
|
handleDelete() {
|
||||||
if (this.selectionList.length === 0) {
|
if (this.selectionList.length === 0) {
|
||||||
this.$message.warning("请选择至少一条数据");
|
this.$message.warning("请选择至少一条数据");
|
||||||
@@ -156,10 +297,8 @@ import {
|
|||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
let downloadUrl = `/common/release-version/commonReleaseversion/export-commonReleaseversion?${this.website.tokenHeader}=${getToken()}`;
|
let downloadUrl = `/common/release-version/commonReleaseversion/export-commonReleaseversion?${this.website.tokenHeader}=${getToken()}`;
|
||||||
const {
|
const {} = this.query;
|
||||||
} = this.query;
|
let values = {};
|
||||||
let values = {
|
|
||||||
};
|
|
||||||
this.$confirm("是否导出数据?", "提示", {
|
this.$confirm("是否导出数据?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
@@ -209,11 +348,9 @@ import {
|
|||||||
onLoad(page, params = {}) {
|
onLoad(page, params = {}) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
||||||
const {
|
const {} = this.query;
|
||||||
} = this.query;
|
|
||||||
|
|
||||||
let values = {
|
let values = {};
|
||||||
};
|
|
||||||
|
|
||||||
getList(page.currentPage, page.pageSize, values).then(res => {
|
getList(page.currentPage, page.pageSize, values).then(res => {
|
||||||
const data = res.data.data;
|
const data = res.data.data;
|
||||||
@@ -223,9 +360,6 @@ import {
|
|||||||
this.selectionClear();
|
this.selectionClear();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
openVersionDetail(row){
|
|
||||||
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -304,14 +304,18 @@ import {getList, getDetail, add, update, remove, confirmPayment, fillExpress} fr
|
|||||||
// inputErrorMessage: '快递单号格式不正确'
|
// inputErrorMessage: '快递单号格式不正确'
|
||||||
}).then(({ value }) => {
|
}).then(({ value }) => {
|
||||||
fillExpress(row.id, value)
|
fillExpress(row.id, value)
|
||||||
// 用户点击“确定”
|
.then(()=>{
|
||||||
|
this.$message.success('单号录入成功');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.catch((error)=>{
|
||||||
|
console.error('fillUrl failed:', error);
|
||||||
|
this.$message.error('单号录入失败,请重试');
|
||||||
|
});
|
||||||
console.log('用户输入:', value);
|
console.log('用户输入:', value);
|
||||||
// 在这里处理你的逻辑,比如调用 API
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户点击“取消”或关闭弹窗
|
|
||||||
this.$message.info('已取消输入');
|
this.$message.info('已取消输入');
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
beforeOpen(done, type) {
|
beforeOpen(done, type) {
|
||||||
if (["edit", "view"].includes(type)) {
|
if (["edit", "view"].includes(type)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user