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

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

View File

@ -95,46 +95,6 @@ export const constantRoutes: RouteRecordRaw[] = [
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,
// hidden: true,
// permissions: ['system:user:edit'],
hidden: true,
permissions: ['system:user:edit'],
children: [
{
path: 'videodetails',
path: 'detail',
component: () => import('@/views/contentManage/videodetails/index.vue'),
name: 'Videodetails',
meta: { title: '视频详情', icon: 'dashboard', affix: true }

View File

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

View File

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

View File

@ -114,8 +114,8 @@ export default {
this.loading = true;
return new Promise((resolve) =>
getOmsOrder(id).then((res) => {
const { productInfo, addressInfo } = res;
this.orderDetail = res;
const { productInfo, addressInfo } = res.data;
this.orderDetail = res.data;
this.products = productInfo;
this.addressInfo = addressInfo;
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-item label="订单状态" prop="status">
<DictRadio
v-if="orderStatusMap.length > 0"
:radioList="orderStatusMap"
v-model="queryParams.status"
radioData="oms_order_status"
size="small"
@ -43,8 +45,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="omsOrderList" border @selection-change="handleSelectionChange" cell-class-name="my-cell">
<el-table-column type="selection" width="55" align="center" />
<el-table v-loading="loading" :data="omsOrderList" border cell-class-name="my-cell">
<el-table-column label="收件信息" prop="receiverName" width="280">
<template v-slot="scope">
<div>
@ -192,7 +193,7 @@
</el-dialog>
<!-- 日志 -->
<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-card>
<h4>{{ getLogEvent(item.orderStatus) }}</h4>
@ -203,6 +204,7 @@
</el-card>
</el-timeline-item>
</el-timeline>
<el-empty v-else description="暂无日志数据!" />
</el-dialog>
<el-dialog title="修改收件信息" v-model="modifyReceiverInfo.open" width="500px" append-to-body :close-on-click-modal="false">
@ -234,8 +236,6 @@
import {
addOmsOrder,
deliverProduct,
delOmsOrder,
exportOmsOrder,
getDecryptPhone,
listOmsOrder,
saveMerchantNote,
@ -269,14 +269,7 @@ export default {
pickerOptions: {
shortcuts: dateUtil.getTimeShort2()
},
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
orderStatusMap: [],
//
showSearch: true,
//
@ -359,8 +352,10 @@ export default {
}
}
},
mounted() {
async mounted() {
this.show = true;
const orderStatusMap = await this.getDictionaryByKey('oms_order_status');
this.orderStatusMap = orderStatusMap;
const { phone, status, today } = this.$route.query;
if (phone) {
this.queryParams.userPhone = phone;
@ -458,12 +453,6 @@ export default {
this.resetForm('queryForm');
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
@ -480,8 +469,11 @@ export default {
},
handleWatch(row) {
getDecryptPhone(row.id).then((response) => {
row.receiverPhone = response;
row.decrypt = true;
const { data } = response;
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
handleChange(value) {
if (!value) {
@ -556,20 +519,10 @@ export default {
}
},
getOrderStatusText(status) {
switch (status) {
case 0:
return '待付款';
case 1:
return '待发货';
case 2:
return '已发货';
case 3:
return '已完成';
case 4:
return '已关闭';
case 5:
return '无效订单';
}
const { label = '' } = this.orderStatusMap.find((item) => {
return item.value == status;
});
return label || '未知';
},
getLogEvent(status) {
switch (status) {
@ -587,26 +540,6 @@ export default {
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) {
const id = row.id;
this.$router.push({ path: '/order/detail', query: { id } });
@ -670,7 +603,8 @@ export default {
showLog(orderId) {
this.logObj.loading = true;
viewLog(orderId).then((response) => {
this.logObj.logList = response;
const { data = [] } = response;
this.logObj.logList = data || [];
this.logObj.open = true;
this.logObj.loading = false;
});

View File

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

View File

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