update
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
"axios": "^1.8.4",
|
"axios": "^1.8.4",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"pinia": "^3.0.2",
|
"pinia": "^3.0.2",
|
||||||
"pinia-plugin-persistedstate": "^4.2.0",
|
"pinia-plugin-persistedstate": "^4.2.0",
|
||||||
"plyr": "^3.7.8",
|
"plyr": "^3.7.8",
|
||||||
|
|||||||
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@@ -20,6 +20,9 @@ importers:
|
|||||||
dayjs:
|
dayjs:
|
||||||
specifier: ^1.11.13
|
specifier: ^1.11.13
|
||||||
version: 1.11.13
|
version: 1.11.13
|
||||||
|
lodash:
|
||||||
|
specifier: ^4.17.21
|
||||||
|
version: 4.17.21
|
||||||
pinia:
|
pinia:
|
||||||
specifier: ^3.0.2
|
specifier: ^3.0.2
|
||||||
version: 3.0.2(vue@3.5.13)
|
version: 3.0.2(vue@3.5.13)
|
||||||
@@ -1914,6 +1917,9 @@ packages:
|
|||||||
lodash.debounce@4.0.8:
|
lodash.debounce@4.0.8:
|
||||||
resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}
|
resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}
|
||||||
|
|
||||||
|
lodash@4.17.21:
|
||||||
|
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
|
||||||
|
|
||||||
lru-cache@10.4.3:
|
lru-cache@10.4.3:
|
||||||
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
|
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
|
||||||
|
|
||||||
@@ -4593,6 +4599,8 @@ snapshots:
|
|||||||
|
|
||||||
lodash.debounce@4.0.8: {}
|
lodash.debounce@4.0.8: {}
|
||||||
|
|
||||||
|
lodash@4.17.21: {}
|
||||||
|
|
||||||
lru-cache@10.4.3: {}
|
lru-cache@10.4.3: {}
|
||||||
|
|
||||||
lru-cache@5.1.1:
|
lru-cache@5.1.1:
|
||||||
|
|||||||
12
src/App.vue
12
src/App.vue
@@ -1,4 +1,14 @@
|
|||||||
<script setup></script>
|
<script setup>
|
||||||
|
import {onMounted} from "vue";
|
||||||
|
import {toPath} from "./utils/index.js";
|
||||||
|
import {useSystemStore} from "./pinia/SystemStore/index.js";
|
||||||
|
|
||||||
|
const SystemStore = useSystemStore();
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
toPath(SystemStore.NOW_ROUTER, SystemStore.NOW_ROUTER_QUERY);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<a-config-provider>
|
<a-config-provider>
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import UploadButton from "../upload/UploadButton.vue";
|
import UploadButton from "../upload/UploadButton.vue";
|
||||||
import XImage from "../XImage/Index.vue";
|
import XImage from "../XImage/Index.vue";
|
||||||
import {reactive} from "vue";
|
import {reactive, useTemplateRef} from "vue";
|
||||||
import Api from "../../api";
|
import Api from "../../api";
|
||||||
import {Message} from "@arco-design/web-vue";
|
import {Message} from "@arco-design/web-vue";
|
||||||
import useTableQuery from "../../hooks/useTableQuery.js";
|
import useTableQuery from "../../hooks/useTableQuery.js";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import {throttle} from "lodash";
|
||||||
|
|
||||||
|
const ChatBoxRef = useTemplateRef('ChatBox');
|
||||||
const {task} = defineProps({
|
const {task} = defineProps({
|
||||||
task: {
|
task: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -29,7 +31,11 @@ const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
|||||||
parameter: po,
|
parameter: po,
|
||||||
api: Api.merchant.getExchangeLog,
|
api: Api.merchant.getExchangeLog,
|
||||||
callback: (data) => {
|
callback: (data) => {
|
||||||
Object.assign(vo, data);
|
if (data.rows.length === 0) {
|
||||||
|
} else {
|
||||||
|
vo.total = data.total;
|
||||||
|
vo.rows.push(...data.rows);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -43,10 +49,21 @@ const send = async () => {
|
|||||||
form.images.length = 0;
|
form.images.length = 0;
|
||||||
await fetchData();
|
await fetchData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleScroll = ({target}) => {
|
||||||
|
const {scrollTop, clientHeight, scrollHeight} = target;
|
||||||
|
if (scrollTop + clientHeight >= scrollHeight - 10 && !loading.value) {
|
||||||
|
throttle(() => {
|
||||||
|
pagination.current++;
|
||||||
|
}, 500)();
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="size-full flex flex-col gap-[30px]">
|
<div
|
||||||
|
@scroll="handleScroll"
|
||||||
|
class="size-full flex flex-col gap-[30px] max-h-[600px] overflow-auto">
|
||||||
<div :class="['flex gap-[18px]', v.right === 0 ? 'chat-right' : 'chat-left']" v-for="v in vo.rows">
|
<div :class="['flex gap-[18px]', v.right === 0 ? 'chat-right' : 'chat-left']" v-for="v in vo.rows">
|
||||||
<a-image :src="v.people.avatar" class="rounded-[50%] overflow-hidden" width="64px"
|
<a-image :src="v.people.avatar" class="rounded-[50%] overflow-hidden" width="64px"
|
||||||
height="64px"></a-image>
|
height="64px"></a-image>
|
||||||
@@ -66,6 +83,9 @@ const send = async () => {
|
|||||||
</x-image>
|
</x-image>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="msg-state text-[14px] text-[#1D2129] mt-[4px]">
|
||||||
|
已读
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -119,6 +139,26 @@ const send = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.msg-state {
|
||||||
|
@apply flex items-center gap-[8px];
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
@apply block size-[14px] rounded-[50%];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.read {
|
||||||
|
&::before {
|
||||||
|
@apply bg-[rgb(var(--arcoblue-6))];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.unRead {
|
||||||
|
&::before {
|
||||||
|
@apply bg-[rgb(var(--orange-6))];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.chat-left {
|
.chat-left {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ function useTableQuery({
|
|||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
const pagination = reactive({
|
const pagination = reactive({
|
||||||
page: 1,
|
current: 1,
|
||||||
pageSize: 20,
|
pageSize: 9,
|
||||||
total: 0
|
total: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,11 @@ const columns = [
|
|||||||
title: '时间',
|
title: '时间',
|
||||||
dataIndex: 'createtime',
|
dataIndex: 'createtime',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '审核状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
slotName: 'status',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
@@ -110,7 +115,6 @@ const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
|||||||
api: Api.admin.getExchangeLog,
|
api: Api.admin.getExchangeLog,
|
||||||
callback: (data) => {
|
callback: (data) => {
|
||||||
Object.assign(vo, data);
|
Object.assign(vo, data);
|
||||||
console.log(vo);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -176,6 +180,12 @@ const refuseExchangeAll = async () => {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:status="{record}">
|
||||||
|
<a-tag v-if="record.status === 0" color="cyan">{{ record.status_text }}</a-tag>
|
||||||
|
<a-tag v-if="record.status === 1" color="green">{{ record.status_text }}</a-tag>
|
||||||
|
<a-tag v-if="record.status === -1" color="red">{{ record.status_text }}</a-tag>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-slot:action="{record}">
|
<template v-slot:action="{record}">
|
||||||
<div class="flex items-center gap-[20px]">
|
<div class="flex items-center gap-[20px]">
|
||||||
<a-link @click="passExchange(record.id)" :hoverable="false" status="success">通过</a-link>
|
<a-link @click="passExchange(record.id)" :hoverable="false" status="success">通过</a-link>
|
||||||
|
|||||||
@@ -45,6 +45,11 @@ const columns = [
|
|||||||
title: '时间',
|
title: '时间',
|
||||||
dataIndex: 'createtime',
|
dataIndex: 'createtime',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '审核状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
slotName: 'status',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
@@ -198,6 +203,12 @@ const refuseExchangeAll = async () => {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:status="{record}">
|
||||||
|
<a-tag v-if="record.status === 0" color="cyan">{{ record.status_text }}</a-tag>
|
||||||
|
<a-tag v-if="record.status === 1" color="green">{{ record.status_text }}</a-tag>
|
||||||
|
<a-tag v-if="record.status === -1" color="red">{{ record.status_text }}</a-tag>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-slot:action="{record}">
|
<template v-slot:action="{record}">
|
||||||
<div class="flex items-center gap-[20px]">
|
<div class="flex items-center gap-[20px]">
|
||||||
<a-link @click="passExchange(record.id)" :hoverable="false" status="success">通过</a-link>
|
<a-link @click="passExchange(record.id)" :hoverable="false" status="success">通过</a-link>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import Filter from "../../../../components/Filter/index.vue";
|
import Filter from "../../../../components/Filter/index.vue";
|
||||||
import {reactive, computed} from "vue";
|
import {computed, reactive} from "vue";
|
||||||
import useTableQuery from "../../../../hooks/useTableQuery.js";
|
import useTableQuery from "../../../../hooks/useTableQuery.js";
|
||||||
import Api from "../../../../api/index.js";
|
import Api from "../../../../api/index.js";
|
||||||
import LookBackfillModal from "./components/look-backfill-modal.vue";
|
import LookBackfillModal from "./components/look-backfill-modal.vue";
|
||||||
@@ -103,7 +103,6 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
|||||||
api: Api.system.getData,
|
api: Api.system.getData,
|
||||||
callback: (data) => {
|
callback: (data) => {
|
||||||
Object.assign(vo, data);
|
Object.assign(vo, data);
|
||||||
console.log(vo);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {defineStore} from "pinia";
|
import {defineStore} from "pinia";
|
||||||
import {ref} from "vue";
|
import {reactive, ref} from "vue";
|
||||||
import router from "../../router/index.js";
|
import router from "../../router/index.js";
|
||||||
import generateRouter from "../../router/generateRouter.js";
|
import generateRouter from "../../router/generateRouter.js";
|
||||||
import Api from "../../api/index.js";
|
import Api from "../../api/index.js";
|
||||||
@@ -7,6 +7,8 @@ import Api from "../../api/index.js";
|
|||||||
export const useSystemStore = defineStore("SystemStore", () => {
|
export const useSystemStore = defineStore("SystemStore", () => {
|
||||||
const isRoot = ref(false);
|
const isRoot = ref(false);
|
||||||
const RoutesTemp = ref([]);
|
const RoutesTemp = ref([]);
|
||||||
|
const NOW_ROUTER = ref(null);
|
||||||
|
const NOW_ROUTER_QUERY = reactive({});
|
||||||
|
|
||||||
const installRoute = async () => {
|
const installRoute = async () => {
|
||||||
const routes = generateRouter(RoutesTemp.value);
|
const routes = generateRouter(RoutesTemp.value);
|
||||||
@@ -56,6 +58,8 @@ export const useSystemStore = defineStore("SystemStore", () => {
|
|||||||
return {
|
return {
|
||||||
isRoot,
|
isRoot,
|
||||||
RoutesTemp,
|
RoutesTemp,
|
||||||
|
NOW_ROUTER,
|
||||||
|
NOW_ROUTER_QUERY,
|
||||||
setRouter,
|
setRouter,
|
||||||
installRoute,
|
installRoute,
|
||||||
clearRouter,
|
clearRouter,
|
||||||
@@ -67,6 +71,6 @@ export const useSystemStore = defineStore("SystemStore", () => {
|
|||||||
afterHydrate: (val) => {
|
afterHydrate: (val) => {
|
||||||
val.store.installRoute && val.store.installRoute();
|
val.store.installRoute && val.store.installRoute();
|
||||||
},
|
},
|
||||||
pick: ['RoutesTemp']
|
pick: ['RoutesTemp', 'NOW_ROUTER', 'NOW_ROUTER_QUERY'],
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {createRouter, createWebHashHistory} from 'vue-router';
|
import {createRouter, createWebHistory} from 'vue-router';
|
||||||
import routes from "./routes.js";
|
import routes from "./routes.js";
|
||||||
import {useUserStore} from "../pinia/UserStore/index.js";
|
import {useUserStore} from "../pinia/UserStore/index.js";
|
||||||
import {useSystemStore} from "../pinia/SystemStore/index.js";
|
import {useSystemStore} from "../pinia/SystemStore/index.js";
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(),
|
history: createWebHistory(),
|
||||||
routes,
|
routes,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -15,6 +15,8 @@ router.beforeEach((to, from, next) => {
|
|||||||
if (!isLogin && !to.path.includes('loginSYS')) {
|
if (!isLogin && !to.path.includes('loginSYS')) {
|
||||||
next({path: '/loginSYS'});
|
next({path: '/loginSYS'});
|
||||||
} else {
|
} else {
|
||||||
|
SystemStore.NOW_ROUTER = to.path;
|
||||||
|
Object.assign(SystemStore.NOW_ROUTER_QUERY, to.query);
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import routesMap from "./routes-map.js";
|
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
|
|||||||
Reference in New Issue
Block a user