parent
75e69a41f0
commit
488c44ca9b
@ -0,0 +1,169 @@
|
||||
import { resolve } from 'path'
|
||||
import { loadEnv } from 'vite'
|
||||
import type { UserConfig, ConfigEnv } from 'vite'
|
||||
import Vue from '@vitejs/plugin-vue'
|
||||
import VueJsx from '@vitejs/plugin-vue-jsx'
|
||||
import progress from 'vite-plugin-progress'
|
||||
// import EslintPlugin from 'vite-plugin-eslint'
|
||||
import { ViteEjsPlugin } from "vite-plugin-ejs"
|
||||
import PurgeIcons from 'vite-plugin-purge-icons'
|
||||
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite"
|
||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||
import { createStyleImportPlugin, ElementPlusResolve } from 'vite-plugin-style-import'
|
||||
import UnoCSS from 'unocss/vite'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
const root = process.cwd()
|
||||
|
||||
function pathResolve(dir: string) {
|
||||
return resolve(root, '.', dir)
|
||||
}
|
||||
|
||||
export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||
let env = {} as any
|
||||
const isBuild = command === 'build'
|
||||
if (!isBuild) {
|
||||
env = loadEnv((process.argv[3] === '--mode' ? process.argv[4] : process.argv[3]), root)
|
||||
} else {
|
||||
env = loadEnv(mode, root)
|
||||
}
|
||||
return {
|
||||
base: env.VITE_BASE_PATH,
|
||||
plugins: [
|
||||
Vue({
|
||||
script: {
|
||||
// 开启defineModel
|
||||
defineModel: true
|
||||
}
|
||||
}),
|
||||
VueJsx(),
|
||||
progress(),
|
||||
createStyleImportPlugin({
|
||||
resolves: [ElementPlusResolve()],
|
||||
libs: [{
|
||||
libraryName: 'element-plus',
|
||||
esModule: true,
|
||||
resolveStyle: (name) => {
|
||||
if (name === 'click-outside') {
|
||||
return ''
|
||||
}
|
||||
return `element-plus/es/components/${name.replace(/^el-/, '')}/style/css`
|
||||
}
|
||||
}]
|
||||
}),
|
||||
// EslintPlugin({
|
||||
// cache: false,
|
||||
// include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件
|
||||
// }),
|
||||
VueI18nPlugin({
|
||||
runtimeOnly: true,
|
||||
compositionOnly: true,
|
||||
include: [resolve(__dirname, 'src/locales/**')]
|
||||
}),
|
||||
createSvgIconsPlugin({
|
||||
iconDirs: [pathResolve('src/assets/svgs')],
|
||||
symbolId: 'icon-[dir]-[name]',
|
||||
svgoOptions: true
|
||||
}),
|
||||
PurgeIcons(),
|
||||
ViteEjsPlugin({
|
||||
title: env.VITE_APP_TITLE
|
||||
}),
|
||||
UnoCSS(),
|
||||
// sveltekit(),
|
||||
],
|
||||
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
less: {
|
||||
additionalData: '@import "./src/styles/variables.module.less";',
|
||||
javascriptEnabled: true
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.less', '.css'],
|
||||
alias: [
|
||||
{
|
||||
find: 'vue-i18n',
|
||||
replacement: 'vue-i18n/dist/vue-i18n.cjs.js'
|
||||
},
|
||||
{
|
||||
find: /\@\//,
|
||||
replacement: `${pathResolve('src')}/`
|
||||
}
|
||||
]
|
||||
},
|
||||
build: {
|
||||
minify: 'terser',
|
||||
outDir: env.VITE_OUT_DIR || 'dist',
|
||||
sourcemap: env.VITE_SOURCEMAP === 'true' ? 'inline' : false,
|
||||
// brotliSize: false,
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_debugger: env.VITE_DROP_DEBUGGER === 'true',
|
||||
drop_console: env.VITE_DROP_CONSOLE === 'true'
|
||||
}
|
||||
}
|
||||
},
|
||||
server: {
|
||||
port: 4000,
|
||||
proxy: {
|
||||
// 选项写法
|
||||
'/api': {
|
||||
//target: 'http://214.129.16.68:8088/rdvs',
|
||||
// target: 'http://172.16.87.111:8083/ordb',
|
||||
target: 'http://localhost:8082/srdb',
|
||||
// target: 'http://172.16.87.114:8095/ordb',
|
||||
// target: 'http://172.16.87.111:8080/portal',
|
||||
// target: 'http://localhost:8082/portal',
|
||||
// target: 'http://192.168.183.136:8082/portal',
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, '')
|
||||
},
|
||||
'/pro': {
|
||||
//target: 'http://214.129.16.68:8088/rdvs',
|
||||
// target: 'http://172.16.87.111:8083/ordb',
|
||||
target: 'http://localhost:8082/srdb',
|
||||
// target: 'http://172.16.87.114:8095/ordb',
|
||||
// target: 'http://172.16.87.111:8080/portal',
|
||||
// target: 'http://localhost:8082/portal',
|
||||
// target: 'http://172.20.10.4:8082/portal',
|
||||
// target: 'http://192.168.183.136:8082/portal',
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/pro/, '')
|
||||
},
|
||||
'/dev': {
|
||||
target: 'http://172.16.87.114:8095/ordb',
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/dev/, '')
|
||||
},
|
||||
},
|
||||
hmr: {
|
||||
overlay: false
|
||||
},
|
||||
host: '0.0.0.0'
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'vue',
|
||||
'vue-router',
|
||||
'vue-types',
|
||||
'element-plus/es/locale/lang/zh-cn',
|
||||
'element-plus/es/locale/lang/en',
|
||||
'@iconify/iconify',
|
||||
'@vueuse/core',
|
||||
'axios',
|
||||
'qs',
|
||||
'echarts',
|
||||
'echarts-wordcloud',
|
||||
'qrcode',
|
||||
'@wangeditor/editor',
|
||||
'@wangeditor/editor-for-vue',
|
||||
'vue-json-pretty',
|
||||
'@zxcvbn-ts/core',
|
||||
'dayjs'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
|
||||
|
||||
const modules = import.meta.glob('./**/*.ts', {
|
||||
import: 'default',
|
||||
eager: true
|
||||
})
|
||||
|
||||
const mockModules: any[] = []
|
||||
Object.keys(modules).forEach(async (key) => {
|
||||
if (key.includes('_')) {
|
||||
return
|
||||
}
|
||||
mockModules.push(...(modules[key] as any))
|
||||
})
|
||||
|
||||
export function setupProdMockServer() {
|
||||
createProdMockServer(mockModules)
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
import config from '@/config/axios/config'
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
|
||||
const { code } = config
|
||||
|
||||
const timeout = 1000
|
||||
|
||||
export default [
|
||||
// 分析页统计接口
|
||||
{
|
||||
url: '/analysis/total',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
users: 102400,
|
||||
messages: 81212,
|
||||
moneys: 9280,
|
||||
shoppings: 13600
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 用户来源
|
||||
{
|
||||
url: '/analysis/userAccessSource',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: [
|
||||
{ value: 1000, name: 'analysis.directAccess' },
|
||||
{ value: 310, name: 'analysis.mailMarketing' },
|
||||
{ value: 234, name: 'analysis.allianceAdvertising' },
|
||||
{ value: 135, name: 'analysis.videoAdvertising' },
|
||||
{ value: 1548, name: 'analysis.searchEngines' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
// 每周用户活跃量
|
||||
{
|
||||
url: '/analysis/weeklyUserActivity',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: [
|
||||
{ value: 13253, name: 'analysis.monday' },
|
||||
{ value: 34235, name: 'analysis.tuesday' },
|
||||
{ value: 26321, name: 'analysis.wednesday' },
|
||||
{ value: 12340, name: 'analysis.thursday' },
|
||||
{ value: 24643, name: 'analysis.friday' },
|
||||
{ value: 1322, name: 'analysis.saturday' },
|
||||
{ value: 1324, name: 'analysis.sunday' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
// 每月销售额
|
||||
{
|
||||
url: '/analysis/monthlySales',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: [
|
||||
{ estimate: 100, actual: 120, name: 'analysis.january' },
|
||||
{ estimate: 120, actual: 82, name: 'analysis.february' },
|
||||
{ estimate: 161, actual: 91, name: 'analysis.march' },
|
||||
{ estimate: 134, actual: 154, name: 'analysis.april' },
|
||||
{ estimate: 105, actual: 162, name: 'analysis.may' },
|
||||
{ estimate: 160, actual: 140, name: 'analysis.june' },
|
||||
{ estimate: 165, actual: 145, name: 'analysis.july' },
|
||||
{ estimate: 114, actual: 250, name: 'analysis.august' },
|
||||
{ estimate: 163, actual: 134, name: 'analysis.september' },
|
||||
{ estimate: 185, actual: 56, name: 'analysis.october' },
|
||||
{ estimate: 118, actual: 99, name: 'analysis.november' },
|
||||
{ estimate: 123, actual: 123, name: 'analysis.december' }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
] as MockMethod[]
|
@ -1,205 +0,0 @@
|
||||
import config from '@/config/axios/config'
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
import { toAnyString } from '@/utils'
|
||||
import Mock from 'mockjs'
|
||||
|
||||
const { code } = config
|
||||
|
||||
const departmentList: any = []
|
||||
|
||||
const citys = ['厦门总公司', '北京分公司', '上海分公司', '福州分公司', '深圳分公司', '杭州分公司']
|
||||
|
||||
for (let i = 0; i < 5; i++) {
|
||||
departmentList.push({
|
||||
// 部门名称
|
||||
departmentName: citys[i],
|
||||
id: toAnyString(),
|
||||
createTime: '@datetime',
|
||||
// 状态
|
||||
status: Mock.Random.integer(0, 1),
|
||||
// 备注
|
||||
remark: '@cword(10, 15)',
|
||||
children: [
|
||||
{
|
||||
// 部门名称
|
||||
departmentName: '研发部',
|
||||
createTime: '@datetime',
|
||||
// 状态
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: toAnyString(),
|
||||
remark: '@cword(10, 15)'
|
||||
},
|
||||
{
|
||||
// 部门名称
|
||||
departmentName: '产品部',
|
||||
createTime: '@datetime',
|
||||
// 状态
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: toAnyString(),
|
||||
remark: '@cword(10, 15)'
|
||||
},
|
||||
{
|
||||
// 部门名称
|
||||
departmentName: '运营部',
|
||||
createTime: '@datetime',
|
||||
// 状态
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: toAnyString(),
|
||||
remark: '@cword(10, 15)'
|
||||
},
|
||||
{
|
||||
// 部门名称
|
||||
departmentName: '市场部',
|
||||
createTime: '@datetime',
|
||||
// 状态
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: toAnyString(),
|
||||
remark: '@cword(10, 15)'
|
||||
},
|
||||
{
|
||||
// 部门名称
|
||||
departmentName: '销售部',
|
||||
createTime: '@datetime',
|
||||
// 状态
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: toAnyString(),
|
||||
remark: '@cword(10, 15)'
|
||||
},
|
||||
{
|
||||
// 部门名称
|
||||
departmentName: '客服部',
|
||||
createTime: '@datetime',
|
||||
// 状态
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: toAnyString(),
|
||||
remark: '@cword(10, 15)'
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
export default [
|
||||
// 列表接口
|
||||
{
|
||||
url: '/department/list',
|
||||
method: 'get',
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
list: departmentList
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
url: '/department/table/list',
|
||||
method: 'get',
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
list: departmentList,
|
||||
total: 5
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
url: '/department/users',
|
||||
method: 'get',
|
||||
timeout: 1000,
|
||||
response: ({ query }) => {
|
||||
const { pageSize } = query
|
||||
// 根据pageSize来创建数据
|
||||
const mockList: any = []
|
||||
for (let i = 0; i < pageSize; i++) {
|
||||
mockList.push(
|
||||
Mock.mock({
|
||||
// 用户名
|
||||
username: '@cname',
|
||||
// 账号
|
||||
account: '@first',
|
||||
// 邮箱
|
||||
email: '@EMAIL',
|
||||
// 创建时间
|
||||
createTime: '@datetime',
|
||||
// 角色
|
||||
role: '@first',
|
||||
// 用户id
|
||||
id: toAnyString()
|
||||
})
|
||||
)
|
||||
}
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
total: 100,
|
||||
list: mockList
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 保存接口
|
||||
{
|
||||
url: '/department/user/save',
|
||||
method: 'post',
|
||||
timeout: 1000,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 删除接口
|
||||
{
|
||||
url: '/department/user/delete',
|
||||
method: 'post',
|
||||
response: ({ body }) => {
|
||||
const ids = body.ids
|
||||
if (!ids) {
|
||||
return {
|
||||
code: 500,
|
||||
message: '请选择需要删除的数据'
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 保存接口
|
||||
{
|
||||
url: '/department/save',
|
||||
method: 'post',
|
||||
timeout: 1000,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 删除接口
|
||||
{
|
||||
url: '/department/delete',
|
||||
method: 'post',
|
||||
response: ({ body }) => {
|
||||
const ids = body.ids
|
||||
if (!ids) {
|
||||
return {
|
||||
code: 500,
|
||||
message: '请选择需要删除的数据'
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
] as MockMethod[]
|
@ -1,63 +0,0 @@
|
||||
import config from '@/config/axios/config'
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
|
||||
const { code } = config
|
||||
|
||||
const timeout = 1000
|
||||
|
||||
const dictObj: Recordable = {
|
||||
importance: [
|
||||
{
|
||||
value: 0,
|
||||
label: 'tableDemo.commonly'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: 'tableDemo.good'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 'tableDemo.important'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default [
|
||||
// 字典接口
|
||||
{
|
||||
url: '/dict/list',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: dictObj
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取某个字典
|
||||
{
|
||||
url: '/dict/one',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
label: 'test1',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: 'test2',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: 'test3',
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
] as MockMethod[]
|
@ -1,265 +0,0 @@
|
||||
import config from '@/config/axios/config'
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
import Mock from 'mockjs'
|
||||
|
||||
const { code } = config
|
||||
|
||||
const timeout = 1000
|
||||
|
||||
export default [
|
||||
// 列表接口
|
||||
{
|
||||
url: '/menu/list',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
path: '/dashboard',
|
||||
component: '#',
|
||||
redirect: '/dashboard/analysis',
|
||||
name: 'Dashboard',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 1,
|
||||
title: '首页',
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'ant-design:dashboard-filled',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'analysis',
|
||||
component: 'views/Dashboard/Analysis',
|
||||
name: 'Analysis',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 2,
|
||||
title: '分析页',
|
||||
meta: {
|
||||
title: '分析页',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'workplace',
|
||||
component: 'views/Dashboard/Workplace',
|
||||
name: 'Workplace',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 3,
|
||||
title: '工作台',
|
||||
meta: {
|
||||
title: '工作台',
|
||||
noCache: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/external-link',
|
||||
component: '#',
|
||||
title: '文档',
|
||||
meta: {
|
||||
title: '文档',
|
||||
icon: 'clarity:document-solid'
|
||||
},
|
||||
name: 'ExternalLink',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 4,
|
||||
children: [
|
||||
{
|
||||
path: 'https://element-plus-admin-doc.cn/',
|
||||
name: 'DocumentLink',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 5,
|
||||
title: '文档',
|
||||
meta: {
|
||||
title: '文档'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/level',
|
||||
component: '#',
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
name: 'Level',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 6,
|
||||
title: '菜单',
|
||||
meta: {
|
||||
title: '菜单',
|
||||
icon: 'carbon:skill-level-advanced'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1',
|
||||
name: 'Menu1',
|
||||
component: '##',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 7,
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
title: '菜单1',
|
||||
meta: {
|
||||
title: '菜单1'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-1',
|
||||
name: 'Menu11',
|
||||
component: '##',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 8,
|
||||
redirect: '/level/menu1/menu1-1/menu1-1-1',
|
||||
title: '菜单1-1',
|
||||
meta: {
|
||||
title: '菜单1-1',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-1-1',
|
||||
name: 'Menu111',
|
||||
component: 'views/Level/Menu111',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 9,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
title: '菜单1-1-1',
|
||||
meta: {
|
||||
title: '菜单1-1-1'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'menu1-2',
|
||||
name: 'Menu12',
|
||||
component: 'views/Level/Menu12',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 10,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
title: '菜单1-2',
|
||||
meta: {
|
||||
title: '菜单1-2'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'menu2',
|
||||
name: 'Menu2Demo',
|
||||
component: 'views/Level/Menu2',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 11,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
title: '菜单2',
|
||||
meta: {
|
||||
title: '菜单2'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/example',
|
||||
component: '#',
|
||||
redirect: '/example/example-dialog',
|
||||
name: 'Example',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 12,
|
||||
title: '综合示例',
|
||||
meta: {
|
||||
title: '综合示例',
|
||||
icon: 'ep:management',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'example-dialog',
|
||||
component: 'views/Example/Dialog/ExampleDialog',
|
||||
name: 'ExampleDialog',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 13,
|
||||
title: '综合示例-弹窗',
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
meta: {
|
||||
title: '综合示例-弹窗',
|
||||
permission: ['edit', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-page',
|
||||
component: 'views/Example/Page/ExamplePage',
|
||||
name: 'ExamplePage',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 14,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
title: '综合示例-页面',
|
||||
meta: {
|
||||
title: '综合示例-页面',
|
||||
permission: ['edit', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-add',
|
||||
component: 'views/Example/Page/ExampleAdd',
|
||||
name: 'ExampleAdd',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 15,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
title: '综合示例-新增',
|
||||
meta: {
|
||||
title: '综合示例-新增',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example/example-page',
|
||||
permission: ['delete', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-edit',
|
||||
component: 'views/Example/Page/ExampleEdit',
|
||||
name: 'ExampleEdit',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 16,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
title: '综合示例-编辑',
|
||||
meta: {
|
||||
title: '综合示例-编辑',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example/example-page',
|
||||
permission: ['delete', 'add']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'example-detail',
|
||||
component: 'views/Example/Page/ExampleDetail',
|
||||
name: 'ExampleDetail',
|
||||
status: Mock.Random.integer(0, 1),
|
||||
id: 17,
|
||||
permission: ['edit', 'add', 'delete'],
|
||||
title: '综合示例-详情',
|
||||
meta: {
|
||||
title: '综合示例-详情',
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
showMainRoute: true,
|
||||
activeMenu: '/example/example-page',
|
||||
permission: ['delete', 'edit']
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
] as MockMethod[]
|
@ -1,64 +0,0 @@
|
||||
import config from '@/config/axios/config'
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
|
||||
const timeout = 600000
|
||||
|
||||
const { code } = config
|
||||
|
||||
export default [
|
||||
{
|
||||
url: '/request/1',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: 'request-1'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
url: '/request/2',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: 'request-2'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
url: '/request/3',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: 'request-3'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
url: '/request/4',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: 'request-4'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
url: '/request/5',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: 'request-5'
|
||||
}
|
||||
}
|
||||
}
|
||||
] as MockMethod[]
|
File diff suppressed because it is too large
Load Diff
@ -1,256 +0,0 @@
|
||||
import config from '@/config/axios/config'
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
import { toAnyString } from '@/utils'
|
||||
import Mock from 'mockjs'
|
||||
|
||||
const { code } = config
|
||||
|
||||
const timeout = 1000
|
||||
|
||||
const count = 100
|
||||
|
||||
const baseContent =
|
||||
'<p>I am testing data, I am testing data.</p><p><img src="https://wpimg.wallstcn.com/4c69009c-0fd4-4153-b112-6cb53d1cf943"></p>'
|
||||
|
||||
interface ListProps {
|
||||
id: string
|
||||
author: string
|
||||
title: string
|
||||
content: string
|
||||
importance: number
|
||||
display_time: string
|
||||
pageviews: number
|
||||
image_uri: string
|
||||
}
|
||||
|
||||
interface TreeListProps {
|
||||
id: string
|
||||
author: string
|
||||
title: string
|
||||
content: string
|
||||
importance: number
|
||||
display_time: string
|
||||
pageviews: number
|
||||
children: TreeListProps[]
|
||||
}
|
||||
|
||||
let List: ListProps[] = []
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
List.push(
|
||||
Mock.mock({
|
||||
id: toAnyString(),
|
||||
// timestamp: +Mock.Random.date('T'),
|
||||
author: '@first',
|
||||
title: '@title(5, 10)',
|
||||
content: baseContent,
|
||||
importance: '@integer(1, 3)',
|
||||
display_time: '@datetime',
|
||||
pageviews: '@integer(100, 500)',
|
||||
image_uri: Mock.Random.image('@integer(100, 500)x@integer(100, 500)')
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
const treeList: TreeListProps[] = []
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
treeList.push(
|
||||
Mock.mock({
|
||||
id: toAnyString(),
|
||||
// timestamp: +Mock.Random.date('T'),
|
||||
author: '@first',
|
||||
title: '@title(5, 10)',
|
||||
content: baseContent,
|
||||
importance: '@integer(1, 3)',
|
||||
display_time: '@datetime',
|
||||
pageviews: '@integer(300, 5000)',
|
||||
children: [
|
||||
{
|
||||
id: toAnyString(),
|
||||
// timestamp: +Mock.Random.date('T'),
|
||||
author: '@first',
|
||||
title: '@title(5, 10)',
|
||||
content: baseContent,
|
||||
importance: '@integer(1, 3)',
|
||||
display_time: '@datetime',
|
||||
pageviews: '@integer(300, 5000)',
|
||||
children: [
|
||||
{
|
||||
id: toAnyString(),
|
||||
// timestamp: +Mock.Random.date('T'),
|
||||
author: '@first',
|
||||
title: '@title(5, 10)',
|
||||
content: baseContent,
|
||||
importance: '@integer(1, 3)',
|
||||
display_time: '@datetime',
|
||||
pageviews: '@integer(300, 5000)'
|
||||
},
|
||||
{
|
||||
id: toAnyString(),
|
||||
// timestamp: +Mock.Random.date('T'),
|
||||
author: '@first',
|
||||
title: '@title(5, 10)',
|
||||
content: baseContent,
|
||||
importance: '@integer(1, 3)',
|
||||
display_time: '@datetime',
|
||||
pageviews: '@integer(300, 5000)'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: toAnyString(),
|
||||
// timestamp: +Mock.Random.date('T'),
|
||||
author: '@first',
|
||||
title: '@title(5, 10)',
|
||||
content: baseContent,
|
||||
importance: '@integer(1, 3)',
|
||||
display_time: '@datetime',
|
||||
pageviews: '@integer(300, 5000)'
|
||||
},
|
||||
{
|
||||
id: toAnyString(),
|
||||
// timestamp: +Mock.Random.date('T'),
|
||||
author: '@first',
|
||||
title: '@title(5, 10)',
|
||||
content: baseContent,
|
||||
importance: '@integer(1, 3)',
|
||||
display_time: '@datetime',
|
||||
pageviews: '@integer(300, 5000)'
|
||||
},
|
||||
{
|
||||
id: toAnyString(),
|
||||
// timestamp: +Mock.Random.date('T'),
|
||||
author: '@first',
|
||||
title: '@title(5, 10)',
|
||||
content: baseContent,
|
||||
importance: '@integer(1, 3)',
|
||||
display_time: '@datetime',
|
||||
pageviews: '@integer(300, 5000)'
|
||||
}
|
||||
]
|
||||
// image_uri
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
export default [
|
||||
// 树形列表接口
|
||||
{
|
||||
url: '/example/treeList',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: ({ query }) => {
|
||||
const { title, pageIndex, pageSize } = query
|
||||
const mockList = treeList.filter((item) => {
|
||||
if (title && item.title.indexOf(title) < 0) return false
|
||||
return true
|
||||
})
|
||||
const pageList = mockList.filter(
|
||||
(_, index) => index < pageSize * pageIndex && index >= pageSize * (pageIndex - 1)
|
||||
)
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
total: mockList.length,
|
||||
list: pageList
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 列表接口
|
||||
{
|
||||
url: '/example/list',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: ({ query }) => {
|
||||
const { title, pageIndex, pageSize } = query
|
||||
const mockList = List.filter((item) => {
|
||||
if (title && item.title.indexOf(title) < 0) return false
|
||||
return true
|
||||
})
|
||||
const pageList = mockList.filter(
|
||||
(_, index) => index < pageSize * pageIndex && index >= pageSize * (pageIndex - 1)
|
||||
)
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
total: mockList.length,
|
||||
list: pageList
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 保存接口
|
||||
{
|
||||
url: '/example/save',
|
||||
method: 'post',
|
||||
timeout,
|
||||
response: ({ body }) => {
|
||||
if (!body.id) {
|
||||
List = [
|
||||
Object.assign(body, {
|
||||
id: toAnyString()
|
||||
})
|
||||
].concat(List)
|
||||
return {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
} else {
|
||||
List.map((item) => {
|
||||
if (item.id === body.id) {
|
||||
for (const key in item) {
|
||||
item[key] = body[key]
|
||||
}
|
||||
}
|
||||
})
|
||||
return {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 详情接口
|
||||
{
|
||||
url: '/example/detail',
|
||||
method: 'get',
|
||||
response: ({ query }) => {
|
||||
const { id } = query
|
||||
for (const example of List) {
|
||||
if (example.id === id) {
|
||||
return {
|
||||
code: code,
|
||||
data: example
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 删除接口
|
||||
{
|
||||
url: '/example/delete',
|
||||
method: 'post',
|
||||
response: ({ body }) => {
|
||||
const ids = body.ids
|
||||
if (!ids) {
|
||||
return {
|
||||
code: 500,
|
||||
message: '请选择需要删除的数据'
|
||||
}
|
||||
} else {
|
||||
let i = List.length
|
||||
while (i--) {
|
||||
if (ids.indexOf(List[i].id) !== -1) {
|
||||
List.splice(i, 1)
|
||||
}
|
||||
}
|
||||
return {
|
||||
code: code,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
] as MockMethod[]
|
@ -1,135 +0,0 @@
|
||||
import config from '@/config/axios/config'
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
|
||||
const { code } = config
|
||||
|
||||
const timeout = 1000
|
||||
|
||||
const List: {
|
||||
username: string
|
||||
password: string
|
||||
role: string
|
||||
roleId: string
|
||||
permissions: string | string[]
|
||||
}[] = [
|
||||
{
|
||||
username: 'admin',
|
||||
password: 'o9%2B2oAvFf9DHDj1yBTJHhw%3D%3D',
|
||||
role: 'admin',
|
||||
roleId: '1',
|
||||
permissions: ['*.*.*']
|
||||
},
|
||||
{
|
||||
username: 'test',
|
||||
password: 'test',
|
||||
role: 'test',
|
||||
roleId: '2',
|
||||
permissions: ['example:dialog:create', 'example:dialog:delete']
|
||||
}
|
||||
]
|
||||
|
||||
export default [
|
||||
// 列表接口
|
||||
{
|
||||
url: '/user/list',
|
||||
method: 'get',
|
||||
response: ({ query }) => {
|
||||
const { username, pageIndex, pageSize } = query
|
||||
|
||||
const mockList = List.filter((item) => {
|
||||
if (username && item.username.indexOf(username) < 0) return false
|
||||
return true
|
||||
})
|
||||
const pageList = mockList.filter(
|
||||
(_, index) => index < pageSize * pageIndex && index >= pageSize * (pageIndex - 1)
|
||||
)
|
||||
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
total: mockList.length,
|
||||
list: pageList
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 登录接口
|
||||
{
|
||||
url: '/user/login',
|
||||
method: 'post',
|
||||
timeout,
|
||||
response: ({ body }) => {
|
||||
const data = body
|
||||
let hasUser = false
|
||||
for (const user of List) {
|
||||
if (user.username === data.username && user.password === data.password) {
|
||||
hasUser = true
|
||||
return {
|
||||
code: code,
|
||||
data: user
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!hasUser) {
|
||||
return {
|
||||
code: 500,
|
||||
message: '账号或密码错误'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
url: '/mobile/login',
|
||||
method: 'post',
|
||||
timeout,
|
||||
response: ({ body }) => {
|
||||
debugger
|
||||
const data = body
|
||||
let hasUser = false
|
||||
for (const user of List) {
|
||||
if (user.username === data.username && user.password === data.password) {
|
||||
hasUser = true
|
||||
return {
|
||||
code: code,
|
||||
data: user
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
code: 1
|
||||
}
|
||||
}
|
||||
if (!hasUser) {
|
||||
return {
|
||||
code: 500,
|
||||
message: '账号或密码错误'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 退出接口
|
||||
{
|
||||
url: '/user/loginOut',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
url: '/mobile/logout',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: null
|
||||
}
|
||||
}
|
||||
}
|
||||
] as MockMethod[]
|
@ -1,172 +0,0 @@
|
||||
import config from '@/config/axios/config'
|
||||
import { MockMethod } from 'vite-plugin-mock'
|
||||
|
||||
const { code } = config
|
||||
|
||||
const timeout = 1000
|
||||
|
||||
export default [
|
||||
// 获取统计
|
||||
{
|
||||
url: '/workplace/total',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: {
|
||||
project: 40,
|
||||
access: 2340,
|
||||
todo: 10
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取项目
|
||||
{
|
||||
url: '/workplace/project',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
name: 'Github',
|
||||
icon: 'akar-icons:github-fill',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Vue',
|
||||
icon: 'logos:vue',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Angular',
|
||||
icon: 'logos:angular-icon',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'React',
|
||||
icon: 'logos:react',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Webpack',
|
||||
icon: 'logos:webpack',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
name: 'Vite',
|
||||
icon: 'vscode-icons:file-type-vite',
|
||||
message: 'workplace.introduction',
|
||||
personal: 'Archer',
|
||||
time: new Date()
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取动态
|
||||
{
|
||||
url: '/workplace/dynamic',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
},
|
||||
{
|
||||
keys: ['workplace.push', 'Github'],
|
||||
time: new Date()
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取团队信息
|
||||
{
|
||||
url: '/workplace/team',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: [
|
||||
{
|
||||
name: 'Github',
|
||||
icon: 'akar-icons:github-fill'
|
||||
},
|
||||
{
|
||||
name: 'Vue',
|
||||
icon: 'logos:vue'
|
||||
},
|
||||
{
|
||||
name: 'Angular',
|
||||
icon: 'logos:angular-icon'
|
||||
},
|
||||
{
|
||||
name: 'React',
|
||||
icon: 'logos:react'
|
||||
},
|
||||
{
|
||||
name: 'Webpack',
|
||||
icon: 'logos:webpack'
|
||||
},
|
||||
{
|
||||
name: 'Vite',
|
||||
icon: 'vscode-icons:file-type-vite'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取指数
|
||||
{
|
||||
url: '/workplace/radar',
|
||||
method: 'get',
|
||||
timeout,
|
||||
response: () => {
|
||||
return {
|
||||
code: code,
|
||||
data: [
|
||||
{ name: 'workplace.quote', max: 65, personal: 42, team: 50 },
|
||||
{ name: 'workplace.contribution', max: 160, personal: 30, team: 140 },
|
||||
{ name: 'workplace.hot', max: 300, personal: 20, team: 28 },
|
||||
{ name: 'workplace.yield', max: 130, personal: 35, team: 35 },
|
||||
{ name: 'workplace.follow', max: 100, personal: 80, team: 90 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
] as MockMethod[]
|
@ -1,3 +0,0 @@
|
||||
import CaseManageInfo from './CaseManageInfo.vue'
|
||||
|
||||
export { CaseManageInfo }
|
@ -1,3 +0,0 @@
|
||||
import customerRateInfo from "./customerRateInfo.vue"
|
||||
|
||||
export {customerRateInfo}
|
@ -1,3 +0,0 @@
|
||||
import scoreAdjustment from './scoreAdjustment.vue'
|
||||
|
||||
export { scoreAdjustment }
|
@ -1,3 +0,0 @@
|
||||
import LargScaleOriginTable from './LargScaleOriginTable.vue'
|
||||
|
||||
export { LargScaleOriginTable }
|
@ -1,52 +0,0 @@
|
||||
<script setup lang="tsx">
|
||||
import { ContentWrap } from '@/components/ContentWrap';
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import {reactive} from 'vue'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
const { formRegister } = useForm()
|
||||
|
||||
const rules = reactive({
|
||||
|
||||
})
|
||||
|
||||
const props = defineProps({
|
||||
title:propTypes.string.def(""),
|
||||
branchName:propTypes.string.def(""),
|
||||
formSchema:propTypes.object.def({})
|
||||
})
|
||||
|
||||
const systemUse = reactive({
|
||||
title:props.title,
|
||||
branchName:props.branchName,
|
||||
formSchema:props.formSchema
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<ContentWrap class="ContentWrap">
|
||||
<h3 v-if="systemUse.title">{{ systemUse.title }}</h3>
|
||||
<p v-if="systemUse.branchName">{{ systemUse.branchName }}</p>
|
||||
<Form :rules="rules" @register="formRegister" :schema="systemUse.formSchema" />
|
||||
</ContentWrap>
|
||||
|
||||
</template>
|
||||
<style scoped>
|
||||
.ContentWrap{
|
||||
/* background-color: #d5f0f5; */
|
||||
min-width:1120px;
|
||||
}
|
||||
h3{
|
||||
color:rgb(3, 87, 143);
|
||||
text-align:center;
|
||||
}
|
||||
p{
|
||||
font-size:18px;
|
||||
color:rgb(3, 87, 143);
|
||||
border-bottom:1px solid #eee;
|
||||
}
|
||||
|
||||
</style>
|
@ -1,3 +0,0 @@
|
||||
import customerInfoTable from './customerInfoTable.vue'
|
||||
|
||||
export { customerInfoTable }
|
@ -1,231 +0,0 @@
|
||||
<script setup lang="tsx">
|
||||
// 可疑案例处理
|
||||
import { reactive, ref, unref } from 'vue'
|
||||
import {
|
||||
getTransactionInfoListApi,
|
||||
delTransactionInfoListApi,
|
||||
} from '@/api/amld/TransactionInfo/TransactionInfo'
|
||||
import { TableData } from '@/api/amld/SuspiciousCaseDeal/SuspiciousCaseDeal/types'
|
||||
import { useTable } from '@/hooks/web/useTable'
|
||||
import { Table, TableColumn } from '@/components/Table'
|
||||
import { ElButton, ElLink, ElLoading, ElPopconfirm, ElMessage } from 'element-plus'
|
||||
import { Search } from '@/components/Search'
|
||||
import { FormSchema } from '@/components/Form'
|
||||
import { ContentWrap } from '@/components/ContentWrap'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { getWidth } from '@/utils';
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
const { push } = useRouter()
|
||||
const { t } = useI18n()
|
||||
|
||||
const props = defineProps({
|
||||
searchStatus:propTypes.bool.def(true),//搜索的搜索框是否显示
|
||||
tableColumns:propTypes.array.def([]),
|
||||
dataList:propTypes.array.def([]),
|
||||
SearchSchema:propTypes.array.def([]),
|
||||
});
|
||||
|
||||
let systemUse = reactive({
|
||||
SearchSchema:props.SearchSchema,
|
||||
|
||||
})
|
||||
|
||||
const ids = ref<string[]>([])
|
||||
const searchParams = ref({})
|
||||
const { tableRegister, tableState, tableMethods } = useTable({
|
||||
fetchDataApi: async () => {
|
||||
const { currentPage, pageSize } = tableState
|
||||
const res = await getTransactionInfoListApi({
|
||||
pageIndex: unref(currentPage),
|
||||
pageSize: unref(pageSize),
|
||||
...unref(searchParams)
|
||||
})
|
||||
return {
|
||||
list: res.body.list,
|
||||
total: res.body.total
|
||||
}
|
||||
},
|
||||
fetchDelApi: async () => {
|
||||
const res = await delTransactionInfoListApi(unref(ids));
|
||||
return !!res;
|
||||
},
|
||||
})
|
||||
const { loading, dataList, total, currentPage, pageSize } = tableState
|
||||
const { getList, getElTableExpose, delList, refresh } = tableMethods
|
||||
|
||||
// const searchSchema = reactive<FormSchema[]>([
|
||||
// {
|
||||
// field: 'attribute10',
|
||||
// label: '校验状态',
|
||||
// componentProps: {},
|
||||
// component: 'Select'
|
||||
// }
|
||||
// ])
|
||||
|
||||
|
||||
|
||||
const tableColumns = reactive<TableColumn[]>([
|
||||
{
|
||||
field: 'selection',
|
||||
type: 'selection',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
field: 'custCode',
|
||||
label: '客户号'
|
||||
},
|
||||
{
|
||||
field: 'custName',
|
||||
label: '客户名称'
|
||||
},
|
||||
{
|
||||
field: 'tranOrganname',
|
||||
label: '交易机构'
|
||||
},
|
||||
{
|
||||
field: 'tranAcct',
|
||||
label: '交易账户'
|
||||
},
|
||||
{
|
||||
field: 'tranType',
|
||||
label: '交易方式'
|
||||
},
|
||||
{
|
||||
field: 'tranTime',
|
||||
label: '交易时间'
|
||||
},
|
||||
{
|
||||
field: 'currencyCode',
|
||||
label: '币种'
|
||||
},
|
||||
{
|
||||
field: 'amount',
|
||||
label: '交易金额'
|
||||
},
|
||||
{
|
||||
field: 'sendcode',
|
||||
label: '资金收付标志'
|
||||
},
|
||||
{
|
||||
field: 'oppOrganname',
|
||||
label: '对方机构'
|
||||
},
|
||||
{
|
||||
field: 'oppName',
|
||||
label: '对手姓名'
|
||||
},
|
||||
{
|
||||
field: 'oppAcctt',
|
||||
label: '交易对手账号'
|
||||
},
|
||||
{
|
||||
field: 'attribute1',
|
||||
label: '校验状态'
|
||||
},
|
||||
{
|
||||
field: 'oplasttime',
|
||||
label: '操作人'
|
||||
},
|
||||
{
|
||||
field: 'opuser',
|
||||
label: '操作时间'
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
label: t('tableDemo.action'),
|
||||
width: 160,
|
||||
fixed: 'right',
|
||||
slots: {
|
||||
default: (data: any) => {
|
||||
return (
|
||||
<>
|
||||
<ElLink type="primary" underline={false} onClick={() => action("/caseManageT/transicationInfoAddRecord",data.row, 'edit')}>
|
||||
{t('tableDemo.edit')}
|
||||
</ElLink>
|
||||
<ElPopconfirm
|
||||
title={t('common.delTableMsg')}
|
||||
width={200}
|
||||
v-slots={{
|
||||
reference: () => {
|
||||
return (
|
||||
<>
|
||||
<ElLink type="primary" underline={false}>
|
||||
{t('tableDemo.del')}
|
||||
</ElLink>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}}
|
||||
onConfirm={() => delData(data.row)}
|
||||
></ElPopconfirm>
|
||||
<ElLink type="primary" underline={false} onClick={() => action("/caseManageT/transicationInfoAddRecord",data.row, 'detail')}>
|
||||
{t('tableDemo.detail')}
|
||||
</ElLink>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
].map(item => ({ minWidth: item.label ? getWidth(item.label) : 120, ...item }) as TableColumn))
|
||||
|
||||
|
||||
/**单行查询**/
|
||||
const action = async (path: string, row: TableData, type: string) => {
|
||||
push(path);
|
||||
|
||||
}
|
||||
const disabled = ref(true)
|
||||
|
||||
const onSelectionChange = (selection: TableData[]) => {
|
||||
disabled.value = selection.length === 0
|
||||
}
|
||||
|
||||
const setSearchParams = (data: any) => {
|
||||
searchParams.value = data
|
||||
getList()
|
||||
}
|
||||
// 添加流水
|
||||
const AddFlowWater = ()=>{
|
||||
|
||||
}
|
||||
//明细下载
|
||||
const downLoadDetail = () =>{
|
||||
|
||||
}
|
||||
//批量校验检查
|
||||
const batchCheck = ()=>{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<Search :schema="systemUse.SearchSchema" @reset="setSearchParams" @search="setSearchParams" v-if="props.searchStatus" />
|
||||
<Table
|
||||
:columns="props.tableColumns"
|
||||
v-model:pageSize="pageSize"
|
||||
v-model:currentPage="currentPage"
|
||||
default-expand-all
|
||||
node-key="pkid"
|
||||
:data="props.dataList"
|
||||
:loading="loading"
|
||||
:pagination="{
|
||||
total
|
||||
}"
|
||||
@selection-change="onSelectionChange"
|
||||
@register="tableRegister"
|
||||
@refresh="refresh"
|
||||
>
|
||||
<!-- <template #buttons v-if="props.searchStatus">
|
||||
<ElButton type="primary" @click="AddFlowWater">添加流水</ElButton>
|
||||
<ElButton type="primary" @click="downLoadDetail">明细下载</ElButton>
|
||||
<ElButton type="primary" @click="batchCheck">批量校验检查</ElButton>
|
||||
</template> -->
|
||||
</Table>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
|
@ -1,3 +0,0 @@
|
||||
import identificationTable from './identificationTable.vue'
|
||||
|
||||
export { identificationTable }
|
@ -1,571 +0,0 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
import type { App } from 'vue'
|
||||
import { Layout } from '@/utils/routerHelper'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
export const constantRouterMap: AppRouteRecordRaw[] = [
|
||||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/dashboard/analysis',
|
||||
name: 'Root',
|
||||
meta: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/dashboard',
|
||||
component: Layout,
|
||||
redirect: '/dashboard/analysis',
|
||||
name: 'Dashboard',
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'ant-design:dashboard-filled',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'analysis',
|
||||
component: () => import('@/views/Dashboard/Analysis.vue'),
|
||||
name: 'Analysis',
|
||||
meta: {
|
||||
title: '分析页',
|
||||
noCache: true,
|
||||
affix: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
name: 'Redirect',
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
name: 'Redirect',
|
||||
component: () => import('@/views/Redirect/Redirect.vue'),
|
||||
meta: {}
|
||||
}
|
||||
],
|
||||
meta: {
|
||||
hidden: true,
|
||||
noTagsView: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/Login/Login.vue'),
|
||||
name: 'Login',
|
||||
meta: {
|
||||
hidden: true,
|
||||
title: t('router.login'),
|
||||
noTagsView: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/Error/404.vue'),
|
||||
name: 'NoFind',
|
||||
meta: {
|
||||
hidden: true,
|
||||
title: '404',
|
||||
noTagsView: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
export const asyncRouterMap: AppRouteRecordRaw[] = [
|
||||
{
|
||||
path: '/dashboard',
|
||||
component: Layout,
|
||||
redirect: '/dashboard/analysis',
|
||||
name: 'Dashboard',
|
||||
meta: {
|
||||
title: t('router.dashboard'),
|
||||
icon: 'ant-design:dashboard-filled',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'analysis',
|
||||
component: () => import('@/views/Dashboard/Analysis.vue'),
|
||||
name: 'Analysis',
|
||||
meta: {
|
||||
title: t('router.analysis'),
|
||||
noCache: true,
|
||||
affix: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/data-manage',
|
||||
component: Layout,
|
||||
redirect: '/data-manage/data-source-manage',
|
||||
name: 'DataManage',
|
||||
menuId: 'DataManage',
|
||||
meta: {
|
||||
title: '数据管理',
|
||||
icon: 'tdesign:data-base',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'data-model-manage',
|
||||
component: () => import('@/views/DataManage/DataModelManage/DataModelManage.vue'),
|
||||
name: 'DataModelManage',
|
||||
menuId: 'DataManage/DataModelManage',
|
||||
meta: {
|
||||
title: '数据模型管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'data-set-manage',
|
||||
component: () => import('@/views/DataManage/DataSetManage/DataSetManage.vue'),
|
||||
name: 'DataSetManage',
|
||||
menuId: 'DataManage/DataSetManage',
|
||||
meta: {
|
||||
title: '数据集管理'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/data-review',
|
||||
component: Layout,
|
||||
redirect: '/data-review/data-review-detail-rule',
|
||||
name: 'DataReview',
|
||||
menuId: 'DataReview',
|
||||
meta: {
|
||||
title: t('router.dataReview'),
|
||||
icon: 'tdesign:data-checked',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'data-review-detail-rule',
|
||||
component: () => import('@/views/srdb/SrdbKxqRule/SrdbKxqRule.vue'),
|
||||
name: 'SrdbKxqRule',
|
||||
menuId: 'DataReview/SrdbKxqRule',
|
||||
meta: {
|
||||
title: '规则配置'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'data-review-detail-rule',
|
||||
component: () => import('@/views/DataReview/DataReviewDetailRule/DataReviewDetailRule.vue'),
|
||||
name: 'DataReviewDetailRule',
|
||||
menuId: 'DataReview/DataReviewDetailRule',
|
||||
meta: {
|
||||
title: '明细规则配置'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'data-review-detail-rule-config/:id',
|
||||
component: () =>
|
||||
import('@/views/DataReview/DataReviewDetailRuleConfig/DataReviewDetailRuleConfig.vue'),
|
||||
name: 'DataReviewDetailRuleConfig',
|
||||
menuId: 'DataReview/DataReviewDetailRuleConfig',
|
||||
meta: {
|
||||
hidden: true,
|
||||
title: '规则配置',
|
||||
canTo: true,
|
||||
activeMenu: '/data-review/data-review-detail-rule'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'data-review-detail',
|
||||
component: () => import('@/views/DataReview/DataReviewDetail.vue'),
|
||||
name: 'DataReviewDetail',
|
||||
menuId: 'DataReview/DataReviewDetail',
|
||||
meta: {
|
||||
title: t('router.dataReviewDetail')
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'data-review-detail-result',
|
||||
component: () => import('@/views/DataReview/DataReviewDetailResult.vue'),
|
||||
name: 'DataReviewDetailResult',
|
||||
menuId: 'DataReview/DataReviewDetailResult',
|
||||
meta: {
|
||||
title: t('router.dataReviewDetailResult')
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/report-manage',
|
||||
component: Layout,
|
||||
redirect: '/report-manage/report-build-file',
|
||||
name: 'ReportManage',
|
||||
menuId: 'ReportManage',
|
||||
meta: {
|
||||
title: t('router.ReportManage'),
|
||||
icon: 'ep:document',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'report-build-file',
|
||||
component: () => import('@/views/Template/ReportBuildFile/ReportBuildFile.vue'),
|
||||
name: 'ReportBuildFile',
|
||||
menuId: 'ReportManage/ReportBuildFile',
|
||||
meta: {
|
||||
title: t('router.ReportBuildFile')
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'report-file-push',
|
||||
component: () => import('@/views/Template/ReportFIlePush/ReportFilePush.vue'),
|
||||
name: 'ReportFilePush',
|
||||
menuId: 'ReportManage/ReportFilePush',
|
||||
meta: {
|
||||
title: t('router.ReportFilePush')
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'report-temp-config',
|
||||
component: () => import('@/views/Template/ReportTempConfig/ReportTempConfig.vue'),
|
||||
name: 'ReportTempConfig',
|
||||
menuId: 'ReportManage/ReportTempConfig',
|
||||
meta: {
|
||||
title: t('router.ReportTempConfig')
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'temp-submit-manage',
|
||||
component: () => import('@/views/Template/TempSubmitManage/TempSubmitManage.vue'),
|
||||
name: 'TempSubmitManage',
|
||||
menuId: 'ReportManage/TempSubmitManage',
|
||||
meta: {
|
||||
title: t('router.TempSubmitManage')
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/trusted-zone',
|
||||
component: Layout,
|
||||
redirect: '/trusted-zone/database-table-query',
|
||||
name: 'trustedZone',
|
||||
menuId: 'trustedZone',
|
||||
meta: {
|
||||
title: '可信区管理',
|
||||
icon: 'tdesign:view-module',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'database-table-query',
|
||||
component: () =>
|
||||
import('@/views/TrustedZoneManage/DatabaseTableQuery/DatabaseTableQuery.vue'),
|
||||
name: 'DatabaseTableQuery',
|
||||
menuId: 'trustedZone/DatabaseTableQuery',
|
||||
meta: {
|
||||
title: '库表信息查询'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'field-info-query',
|
||||
component: () => import('@/views/TrustedZoneManage/FieldInfoQuery/FieldInfoQuery.vue'),
|
||||
name: 'FieldInfoQuery',
|
||||
menuId: 'trustedZone/FieldInfoQuery',
|
||||
meta: {
|
||||
title: '字段信息查询'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'ledger-info-query',
|
||||
component: () => import('@/views/TrustedZoneManage/LedgerInfoQuery/LedgerInfoQuery.vue'),
|
||||
name: 'LedgerInfoQuery',
|
||||
menuId: 'trustedZone/LedgerInfoQuery',
|
||||
meta: {
|
||||
title: '台账信息查询'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'action-log-query',
|
||||
component: () => import('@/views/TrustedZoneManage/ActionLogQuery/ActionLogQuery.vue'),
|
||||
name: 'ActionLogQuery',
|
||||
menuId: 'trustedZone/ActionLogQuery',
|
||||
meta: {
|
||||
title: '操作日志查询'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/multipleQuery',
|
||||
component: Layout,
|
||||
redirect: '/multipleQuery/serviceLog',
|
||||
name: 'multipleQuery',
|
||||
menuId: 'multipleQuery',
|
||||
meta: {
|
||||
title: '综合查询',
|
||||
icon: 'ep:data-analysis',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'serviceLog',
|
||||
component: () => import('@/views/MultipleQuery/ServiceLog/ServiceLog.vue'),
|
||||
name: 'ServiceLog',
|
||||
menuId: 'multipleQuery/ServiceLog',
|
||||
meta: {
|
||||
title: t('router.servicelogqueryprototype')
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'submit-data-query',
|
||||
component: () => import('@/views/MultipleQuery/SubmitDataQuery/SubmitDataQuery.vue'),
|
||||
name: 'SubmitDataQuery',
|
||||
menuId: 'multipleQuery/SubmitDataQuery',
|
||||
meta: {
|
||||
title: '报送数据查询'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/amld',
|
||||
component: Layout,
|
||||
name: 'Amld',
|
||||
menuId: 'Amld',
|
||||
meta: {
|
||||
title: '数据补录',
|
||||
icon: 'eos-icons:role-binding',
|
||||
alwaysShow: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'amlRuleCust',
|
||||
component: () => import('@/views/amld/AmlRuleCust/AmlRuleCust.vue'),
|
||||
name: 'AmlRuleCust',
|
||||
menuId: 'amld/AmlRuleCust',
|
||||
meta: {
|
||||
title: '客户信息补录'
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/job',
|
||||
component: Layout,
|
||||
redirect: '/job/rep-job',
|
||||
name: 'Job',
|
||||
menuId: 'Job',
|
||||
meta: {
|
||||
title: '作业管理',
|
||||
icon: 'tdesign:task-setting',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'rep-job',
|
||||
component: () => import('@/views/job/RepJob/RepJob.vue'),
|
||||
name: 'RepJob',
|
||||
menuId: 'job/RepJob',
|
||||
meta: {
|
||||
title: '作业配置'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'JobMonitor',
|
||||
component: () => import('@/views/job/RepTask/RepTask.vue'),
|
||||
name: 'JobMonitor',
|
||||
menuId: 'job/JobMonitor',
|
||||
meta: {
|
||||
title: '作业监控'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/system',
|
||||
component: Layout,
|
||||
redirect: '/system/sys-menu',
|
||||
name: 'System',
|
||||
menuId: 'System',
|
||||
meta: {
|
||||
title: '系统管理',
|
||||
icon: 'eos-icons:role-binding',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'rep-data-source',
|
||||
component: () => import('@/views/param/RepDataSource/RepDataSource.vue'),
|
||||
name: 'RepDataSource',
|
||||
menuId: 'param/RepDataSource',
|
||||
meta: {
|
||||
title: '数据源管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'sys-login-log',
|
||||
component: () => import('@/views/system/SysLoginLog/SysLoginLog.vue'),
|
||||
name: 'SysLoginLog',
|
||||
menuId: 'system/SysLoginLog',
|
||||
meta: {
|
||||
title: '登陆日志查询'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
path: 'sys-menu',
|
||||
component: () => import('@/views/system/SysMenu/SysMenu.vue'),
|
||||
name: 'SysMenu',
|
||||
menuId: 'system/SysMenu',
|
||||
meta: {
|
||||
title: '菜单管理'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
path: 'sys-role',
|
||||
component: () => import('@/views/system/SysRole/SysRole.vue'),
|
||||
name: 'SysRole',
|
||||
menuId: 'system/SysRole',
|
||||
meta: {
|
||||
title: '角色管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'sys-user',
|
||||
component: () => import('@/views/system/SysUser/SysUser.vue'),
|
||||
name: 'SysUser',
|
||||
menuId: 'system/SysUser',
|
||||
meta: {
|
||||
title: '用户管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'sys-organ',
|
||||
component: () => import('@/views/param/SysOrgan/SysOrgan.vue'),
|
||||
name: 'SysOrgan',
|
||||
menuId: 'param/SysOrgan',
|
||||
meta: {
|
||||
title: '机构管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'amlRuleCust',
|
||||
component: () => import('@/views/amld/AmlRuleCust/AmlRuleCust.vue'),
|
||||
name: 'AmlRuleCust',
|
||||
menuId: 'system/AmlRuleCust',
|
||||
meta: {
|
||||
title: '客户信息补录'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'sys-role',
|
||||
component: () => import('@/views/system/SysRole/SysRole.vue'),
|
||||
name: 'SysRole',
|
||||
menuId: 'system/SysRole',
|
||||
meta: {
|
||||
title: '角色管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'sys-user',
|
||||
component: () => import('@/views/system/SysUser/SysUser.vue'),
|
||||
name: 'SysUser',
|
||||
menuId: 'system/SysUser',
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'sys-organ',
|
||||
component: () => import('@/views/param/SysOrgan/SysOrgan.vue'),
|
||||
name: 'SysOrgan',
|
||||
menuId: 'param/SysOrgan',
|
||||
meta: {
|
||||
title: '机构管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'sys-organ-tree',
|
||||
component: () => import('@/views/param/SysOrganTree/SysOrganTree.vue'),
|
||||
name: 'SysOrganTree',
|
||||
menuId: 'param/SysOrganTree',
|
||||
meta: {
|
||||
title: '机构树管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'sys-org-tree-detail/:id',
|
||||
component: () => import('@/views/param/SysOrgTreeDetail/SysOrgTreeDetail.vue'),
|
||||
name: 'SysOrgTreeDetail',
|
||||
menuId: 'param/SysOrgTreeDetail',
|
||||
meta: {
|
||||
title: '机构树管理',
|
||||
hidden: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/csck',
|
||||
component: Layout,
|
||||
redirect: '/csck/rep-job',
|
||||
name: 'csck',
|
||||
menuId: 'csck',
|
||||
meta: {
|
||||
title: '跨系统校验',
|
||||
icon: 'tdesign:task-setting',
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'CsckBusinessSystem',
|
||||
component: () => import('@/views/csck/CsckBusinessSystem/CsckBusinessSystem.vue'),
|
||||
name: 'CsckBusinessSystem',
|
||||
menuId: 'csck/CsckBusinessSystem',
|
||||
meta: {
|
||||
title: '业务系统管理',
|
||||
hidden: false
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'CsckBusinessSystem1',
|
||||
component: () => import('@/views/csck/CsckBusinessSystem/CsckBusinessSystem1.vue'),
|
||||
name: 'CsckBusinessSystem1',
|
||||
menuId: 'csck/CsckBusinessSystem1',
|
||||
meta: {
|
||||
title: '业务系统管理1',
|
||||
hidden: false
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
strict: true,
|
||||
routes: constantRouterMap as RouteRecordRaw[],
|
||||
scrollBehavior: () => ({ left: 0, top: 0 })
|
||||
})
|
||||
|
||||
export const resetRouter = (): void => {
|
||||
const resetWhiteNameList = ['Redirect', 'Login', 'NoFind', 'Root']
|
||||
router.getRoutes().forEach((route) => {
|
||||
const { name } = route
|
||||
if (name && !resetWhiteNameList.includes(name as string)) {
|
||||
router.hasRoute(name) && router.removeRoute(name)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const setupRouter = (app: App<Element>) => {
|
||||
app.use(router)
|
||||
}
|
||||
|
||||
export default router
|
File diff suppressed because it is too large
Load Diff
@ -1,143 +0,0 @@
|
||||
|
||||
import { createRouter, createWebHashHistory } from 'vue-router';
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
import type { App } from 'vue';
|
||||
import { Layout } from '@/utils/routerHelper';
|
||||
import { useI18n } from '@/hooks/web/useI18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
export const constantRouterMap: AppRouteRecordRaw[] = [
|
||||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/dashboard/home',
|
||||
name: 'Root',
|
||||
meta: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/dashboard',
|
||||
component: Layout,
|
||||
redirect: '/dashboard/home',
|
||||
name: 'Dashboard',
|
||||
menuId: 'Dashboard',
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'ant-design:home-outlined',
|
||||
hidden: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: () => import('@/views/csck/CsckWorkFlow/CsckWorkFlow.vue'),
|
||||
name: 'Home',
|
||||
menuId: 'Home',
|
||||
meta: {
|
||||
title: '待办任务',
|
||||
affix: true,
|
||||
hidden: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
name: 'Redirect',
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
name: 'Redirect',
|
||||
component: () => import('@/views/Redirect/Redirect.vue'),
|
||||
meta: {},
|
||||
},
|
||||
],
|
||||
meta: {
|
||||
hidden: true,
|
||||
noTagsView: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/Login/Login.vue'),
|
||||
name: 'Login',
|
||||
meta: {
|
||||
hidden: true,
|
||||
title: t('router.login'),
|
||||
noTagsView: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/thirdPlatLogin',
|
||||
component: () => import('@/views/Login/thirdPlatLogin.vue'),
|
||||
name: 'thirdPlatLogin',
|
||||
meta: {
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/Error/404.vue'),
|
||||
name: 'NoFind',
|
||||
meta: {
|
||||
hidden: true,
|
||||
title: '404',
|
||||
noTagsView: true,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
path: '/RepJob',
|
||||
component: () => import('@/views/job/RepJob/RepJob.vue'),
|
||||
name: 'RepJob',
|
||||
meta: {
|
||||
title: '作业配置',
|
||||
hidden:true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/JobMonitor',
|
||||
component: () => import('@/views/job/RepTask/RepTask.vue'),
|
||||
name: 'JobMonitor',
|
||||
meta: {
|
||||
title: '任务监控',
|
||||
hidden:true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/RepScheduleJob',
|
||||
component: () => import('@/views/job/RepScheduleJob/RepScheduleJob.vue'),
|
||||
name: 'RepScheduleJob',
|
||||
meta: {
|
||||
title: '定时任务列表',
|
||||
hidden:true
|
||||
},
|
||||
}
|
||||
];
|
||||
|
||||
export const asyncRouterMap: AppRouteRecordRaw[] = [];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
strict: true,
|
||||
routes: constantRouterMap as RouteRecordRaw[],
|
||||
scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||
});
|
||||
|
||||
export const resetRouter = (): void => {
|
||||
const resetWhiteNameList = ['Redirect', 'Login', 'NoFind', 'Root'];
|
||||
router.getRoutes().forEach(route => {
|
||||
const { name } = route;
|
||||
if (name && !resetWhiteNameList.includes(name as string)) {
|
||||
router.hasRoute(name) && router.removeRoute(name);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const setupRouter = (app: App<Element>) => {
|
||||
app.use(router);
|
||||
};
|
||||
|
||||
export default router;
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue