分页参数,接口返回字段对接修改

This commit is contained in:
cuiyouliang 2025-06-09 17:18:07 +08:00
parent 37cd2134a4
commit bef4c36d90
8 changed files with 40 additions and 139 deletions

View File

@ -6,7 +6,7 @@
<script> <script>
export default { export default {
props: ['radioData', 'size', 'value', 'showAll', 'filter'], props: ['radioData', 'radioList', 'size', 'value', 'showAll', 'filter'],
emits: ['change', 'input'], emits: ['change', 'input'],
data() { data() {
return { return {
@ -24,9 +24,13 @@ export default {
} }
}, },
async created() { async created() {
if (this.radioData) { if (this.radioList && this.radioList.length > 0) {
const resDic = await this.getDictionaryByKey(this.radioData); this.dictList = this.radioList;
this.dictList = resDic; } else {
if (this.radioData) {
const resDic = await this.getDictionaryByKey(this.radioData);
this.dictList = resDic;
}
} }
}, },
methods: { methods: {

View File

@ -95,46 +95,6 @@ export const constantRoutes: RouteRecordRaw[] = [
meta: { title: '个人中心', icon: 'user' } meta: { title: '个人中心', icon: 'user' }
} }
] ]
},
// 新迁移的菜单,开发阶段暂时放在固定菜单内,后续迁移到权限菜单里
// 内容中心
{
path: '/content-center',
component: Layout,
// hidden: true,
// permissions: ['system:role:edit'],
children: [
// 视频管理
{
path: 'video-manage',
component: () => import('@/views/contentManage/video/index.vue'),
name: 'Video',
meta: { title: '视频管理', icon: '', noCache: true }
}
// 评论和点赞
// {
// path: 'comments',
// component: () => import('@/views/contentManage/video/index.vue'),
// name: 'Comments',
// meta: { title: '评论与点赞', icon: '', noCache: true }
// },
// // 粉丝与关注
// {
// path: 'fans',
// component: () => import('@/views/contentManage/video/index.vue'),
// name: 'Fans',
// meta: { title: '粉丝与关注', icon: '', noCache: true }
// },
// // 云点播
// {
// path: 'cloud',
// component: () => import('@/views/contentManage/video/index.vue'),
// name: 'Cloud',
// meta: { title: '云点播', icon: '', noCache: true }
// }
]
} }
]; ];
@ -255,13 +215,13 @@ export const dynamicRoutes: RouteRecordRaw[] = [
] ]
}, },
{ {
path: '/contentManage', path: '/videoManage',
component: Layout, component: Layout,
// hidden: true, hidden: true,
// permissions: ['system:user:edit'], permissions: ['system:user:edit'],
children: [ children: [
{ {
path: 'videodetails', path: 'detail',
component: () => import('@/views/contentManage/videodetails/index.vue'), component: () => import('@/views/contentManage/videodetails/index.vue'),
name: 'Videodetails', name: 'Videodetails',
meta: { title: '视频详情', icon: 'dashboard', affix: true } meta: { title: '视频详情', icon: 'dashboard', affix: true }

View File

@ -58,6 +58,8 @@ export const usePermissionStore = defineStore('permission', () => {
asyncRoutes.forEach((route) => { asyncRoutes.forEach((route) => {
router.addRoute(route); router.addRoute(route);
}); });
console.info('1111111111111111', asyncRoutes);
console.info('222222222222222222', router);
setRoutes(rewriteRoutes); setRoutes(rewriteRoutes);
setSidebarRouters(constantRoutes.concat(sidebarRoutes)); setSidebarRouters(constantRoutes.concat(sidebarRoutes));
setDefaultRoutes(sidebarRoutes); setDefaultRoutes(sidebarRoutes);

View File

@ -91,6 +91,7 @@
<script setup name="Tree" lang="ts"> <script setup name="Tree" lang="ts">
import { listTree, getTree, delTree, addTree, updateTree } from '@/api/demo/tree'; import { listTree, getTree, delTree, addTree, updateTree } from '@/api/demo/tree';
import { TreeVO, TreeQuery, TreeForm } from '@/api/demo/tree/types'; import { TreeVO, TreeQuery, TreeForm } from '@/api/demo/tree/types';
type TreeOption = { type TreeOption = {

View File

@ -114,8 +114,8 @@ export default {
this.loading = true; this.loading = true;
return new Promise((resolve) => return new Promise((resolve) =>
getOmsOrder(id).then((res) => { getOmsOrder(id).then((res) => {
const { productInfo, addressInfo } = res; const { productInfo, addressInfo } = res.data;
this.orderDetail = res; this.orderDetail = res.data;
this.products = productInfo; this.products = productInfo;
this.addressInfo = addressInfo; this.addressInfo = addressInfo;
if (this.orderDetail.orderStatus <= 3) { if (this.orderDetail.orderStatus <= 3) {

View File

@ -3,6 +3,8 @@
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="default" class="ry_form">
<el-form-item label="订单状态" prop="status"> <el-form-item label="订单状态" prop="status">
<DictRadio <DictRadio
v-if="orderStatusMap.length > 0"
:radioList="orderStatusMap"
v-model="queryParams.status" v-model="queryParams.status"
radioData="oms_order_status" radioData="oms_order_status"
size="small" size="small"
@ -43,8 +45,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="omsOrderList" border @selection-change="handleSelectionChange" cell-class-name="my-cell"> <el-table v-loading="loading" :data="omsOrderList" border cell-class-name="my-cell">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="收件信息" prop="receiverName" width="280"> <el-table-column label="收件信息" prop="receiverName" width="280">
<template v-slot="scope"> <template v-slot="scope">
<div> <div>
@ -192,7 +193,7 @@
</el-dialog> </el-dialog>
<!-- 日志 --> <!-- 日志 -->
<el-dialog :title="logObj.title" v-model="logObj.open" width="500px" append-to-body> <el-dialog :title="logObj.title" v-model="logObj.open" width="500px" append-to-body>
<el-timeline> <el-timeline v-if="logObj.logList.length">
<el-timeline-item v-for="item in logObj.logList" placement="top" :timestamp="parseTime(item.createTime, '')"> <el-timeline-item v-for="item in logObj.logList" placement="top" :timestamp="parseTime(item.createTime, '')">
<el-card> <el-card>
<h4>{{ getLogEvent(item.orderStatus) }}</h4> <h4>{{ getLogEvent(item.orderStatus) }}</h4>
@ -203,6 +204,7 @@
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
<el-empty v-else description="暂无日志数据!" />
</el-dialog> </el-dialog>
<el-dialog title="修改收件信息" v-model="modifyReceiverInfo.open" width="500px" append-to-body :close-on-click-modal="false"> <el-dialog title="修改收件信息" v-model="modifyReceiverInfo.open" width="500px" append-to-body :close-on-click-modal="false">
@ -234,8 +236,6 @@
import { import {
addOmsOrder, addOmsOrder,
deliverProduct, deliverProduct,
delOmsOrder,
exportOmsOrder,
getDecryptPhone, getDecryptPhone,
listOmsOrder, listOmsOrder,
saveMerchantNote, saveMerchantNote,
@ -269,14 +269,7 @@ export default {
pickerOptions: { pickerOptions: {
shortcuts: dateUtil.getTimeShort2() shortcuts: dateUtil.getTimeShort2()
}, },
// orderStatusMap: [],
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
// //
showSearch: true, showSearch: true,
// //
@ -359,8 +352,10 @@ export default {
} }
} }
}, },
mounted() { async mounted() {
this.show = true; this.show = true;
const orderStatusMap = await this.getDictionaryByKey('oms_order_status');
this.orderStatusMap = orderStatusMap;
const { phone, status, today } = this.$route.query; const { phone, status, today } = this.$route.query;
if (phone) { if (phone) {
this.queryParams.userPhone = phone; this.queryParams.userPhone = phone;
@ -458,12 +453,6 @@ export default {
this.resetForm('queryForm'); this.resetForm('queryForm');
this.handleQuery(); this.handleQuery();
}, },
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
@ -480,8 +469,11 @@ export default {
}, },
handleWatch(row) { handleWatch(row) {
getDecryptPhone(row.id).then((response) => { getDecryptPhone(row.id).then((response) => {
row.receiverPhone = response; const { data } = response;
row.decrypt = true; if (data) {
row.receiverPhone = data;
row.decrypt = true;
}
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -504,35 +496,6 @@ export default {
} }
}); });
}, },
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除订单表编号为"' + ids + '"的数据项?')
.then(function () {
return delOmsOrder(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess('删除成功');
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$modal
.confirm('是否确认导出所有订单表数据项?')
.then(() => {
this.exportLoading = true;
return exportOmsOrder(queryParams);
})
.then((response) => {
this.$download.download(response);
this.exportLoading = false;
})
.catch(() => {});
},
//change //change
handleChange(value) { handleChange(value) {
if (!value) { if (!value) {
@ -556,20 +519,10 @@ export default {
} }
}, },
getOrderStatusText(status) { getOrderStatusText(status) {
switch (status) { const { label = '' } = this.orderStatusMap.find((item) => {
case 0: return item.value == status;
return '待付款'; });
case 1: return label || '未知';
return '待发货';
case 2:
return '已发货';
case 3:
return '已完成';
case 4:
return '已关闭';
case 5:
return '无效订单';
}
}, },
getLogEvent(status) { getLogEvent(status) {
switch (status) { switch (status) {
@ -587,26 +540,6 @@ export default {
return '无效订单'; return '无效订单';
} }
}, },
getPayTypeTag(type) {
switch (type) {
case 0:
return 'info';
case 1:
return 'primary';
case 2:
return 'success';
}
},
getPayTypeText(type) {
switch (type) {
case 0:
return '未支付';
case 1:
return '支付宝';
case 2:
return '微信';
}
},
goDetail(row) { goDetail(row) {
const id = row.id; const id = row.id;
this.$router.push({ path: '/order/detail', query: { id } }); this.$router.push({ path: '/order/detail', query: { id } });
@ -670,7 +603,8 @@ export default {
showLog(orderId) { showLog(orderId) {
this.logObj.loading = true; this.logObj.loading = true;
viewLog(orderId).then((response) => { viewLog(orderId).then((response) => {
this.logObj.logList = response; const { data = [] } = response;
this.logObj.logList = data || [];
this.logObj.open = true; this.logObj.open = true;
this.logObj.loading = false; this.logObj.loading = false;
}); });

View File

@ -419,7 +419,7 @@ export default {
}, },
showStatistics(memberId) { showStatistics(memberId) {
this.$router.push({ this.$router.push({
path: '/contentManaged/videodetails', path: '/videoManage/detail',
query: { query: {
memberId: memberId memberId: memberId
} }

View File

@ -24,8 +24,8 @@ export default defineConfig(({ mode, command }) => {
open: true, open: true,
proxy: { proxy: {
[env.VITE_APP_BASE_API]: { [env.VITE_APP_BASE_API]: {
// target: 'http://192.168.1.13:8080', target: 'http://192.168.1.13:8080',
target: 'http://192.168.1.250:8080', // target: 'http://192.168.1.250:8080',
// target: 'http://111.62.22.190:8080', // 测试环境 // target: 'http://111.62.22.190:8080', // 测试环境
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,