完善功能
This commit is contained in:
@ -5,8 +5,7 @@ const config = {
|
|||||||
// 开发环境使用相对路径(通过代理),生产环境使用完整URL
|
// 开发环境使用相对路径(通过代理),生产环境使用完整URL
|
||||||
baseUrl: import.meta.env.DEV
|
baseUrl: import.meta.env.DEV
|
||||||
? '/'
|
? '/'
|
||||||
: `${import.meta.env.VITE_APP_BASE_URL || 'https://test1.stnav.com'}/`, //请求接口域名
|
: `${import.meta.env.VITE_APP_BASE_URL}/`, //请求接口域名
|
||||||
// : `${import.meta.env.VITE_APP_BASE_URL || 'https://76458.com'}/`, //请求接口域名
|
|
||||||
urlPrefix: 'adminapi', //请求默认前缀
|
urlPrefix: 'adminapi', //请求默认前缀
|
||||||
timeout: 10 * 1000 //请求超时时长
|
timeout: 10 * 1000 //请求超时时长
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,15 +91,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="姓名" prop="nickname" show-overflow-tooltip width="100" />
|
<el-table-column label="姓名" prop="nickname" show-overflow-tooltip />
|
||||||
<el-table-column label="昵称" prop="name" show-overflow-tooltip width="100" />
|
<el-table-column label="昵称" prop="name" show-overflow-tooltip />
|
||||||
<el-table-column label="茶艺师等级" prop="level">
|
<el-table-column label="状态" prop="state">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<dict-value :options="dictData.state" :value="row.state" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="茶艺师等级" prop="level" width="140">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.level" :value="row.level" />
|
<dict-value :options="dictData.level" :value="row.level" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所属城市" prop="city_name" show-overflow-tooltip />
|
<el-table-column label="所属城市" prop="city_name" show-overflow-tooltip width="120" />
|
||||||
<el-table-column label="服务" prop="server_type" width="200">
|
<el-table-column label="服务" prop="server_type" width="260">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="flex flex-col gap-1.5 text-sm">
|
<div class="flex flex-col gap-1.5 text-sm">
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
@ -121,7 +126,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="账户" prop="user_money" width="200">
|
<el-table-column label="账户" prop="user_money" width="260">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="flex flex-col gap-1.5 text-sm">
|
<div class="flex flex-col gap-1.5 text-sm">
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
@ -143,12 +148,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" prop="state">
|
<el-table-column label="操作" width="160" fixed="right">
|
||||||
<template #default="{ row }">
|
|
||||||
<dict-value :options="dictData.state" :value="row.state" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['teamaster_user/edit']" type="primary" link @click="handleEdit(row)">
|
<el-button v-perms="['teamaster_user/edit']" type="primary" link @click="handleEdit(row)">
|
||||||
编辑
|
编辑
|
||||||
|
|||||||
139
vite.config.ts
139
vite.config.ts
@ -6,7 +6,7 @@ import AutoImport from 'unplugin-auto-import/vite'
|
|||||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||||
import Components from 'unplugin-vue-components/vite'
|
import Components from 'unplugin-vue-components/vite'
|
||||||
import { fileURLToPath, URL } from 'url'
|
import { fileURLToPath, URL } from 'url'
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig, loadEnv } from 'vite'
|
||||||
import { createStyleImportPlugin, ElementPlusResolve } from 'vite-plugin-style-import'
|
import { createStyleImportPlugin, ElementPlusResolve } from 'vite-plugin-style-import'
|
||||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||||
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
||||||
@ -36,78 +36,83 @@ function getElementPlusStylePaths() {
|
|||||||
return stylePaths
|
return stylePaths
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(({ mode }) => {
|
||||||
base: '/admin/',
|
const env = loadEnv(mode, process.cwd())
|
||||||
server: {
|
const targetUrl = env.VITE_APP_BASE_URL || 'https://test1.stnav.com'
|
||||||
host: '0.0.0.0',
|
|
||||||
port: 5174, // 修改端口号,如有需要可调整
|
return {
|
||||||
hmr: true,
|
base: '/parten/',
|
||||||
open: true,
|
server: {
|
||||||
proxy: {
|
host: '0.0.0.0',
|
||||||
'/adminapi': {
|
port: 5175, // 修改端口号,如有需要可调整
|
||||||
target: 'https://test1.stnav.com',
|
hmr: true,
|
||||||
// target: 'https://76458.com',
|
open: true,
|
||||||
changeOrigin: true,
|
proxy: {
|
||||||
secure: true,
|
'/adminapi/': {
|
||||||
rewrite: (path) => path
|
target: targetUrl,
|
||||||
|
// target: 'https://76458.com',
|
||||||
|
changeOrigin: true,
|
||||||
|
secure: true,
|
||||||
|
rewrite: (path) => path
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
plugins: [
|
||||||
plugins: [
|
vue(),
|
||||||
vue(),
|
vueJsx(),
|
||||||
vueJsx(),
|
AutoImport({
|
||||||
AutoImport({
|
imports: ['vue', 'vue-router'],
|
||||||
imports: ['vue', 'vue-router'],
|
resolvers: [ElementPlusResolver()],
|
||||||
resolvers: [ElementPlusResolver()],
|
eslintrc: {
|
||||||
eslintrc: {
|
enabled: true
|
||||||
enabled: true
|
}
|
||||||
|
}),
|
||||||
|
Components({
|
||||||
|
directoryAsNamespace: true,
|
||||||
|
resolvers: [ElementPlusResolver()]
|
||||||
|
}),
|
||||||
|
createStyleImportPlugin({
|
||||||
|
resolves: [ElementPlusResolve()]
|
||||||
|
}),
|
||||||
|
createSvgIconsPlugin({
|
||||||
|
// 配置路劲在你的src里的svg存放文件
|
||||||
|
iconDirs: [fileURLToPath(new URL('./src/assets/icons', import.meta.url))],
|
||||||
|
symbolId: 'local-icon-[dir]-[name]'
|
||||||
|
}),
|
||||||
|
vueSetupExtend()
|
||||||
|
],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
}
|
}
|
||||||
}),
|
},
|
||||||
Components({
|
css: {
|
||||||
directoryAsNamespace: true,
|
preprocessorOptions: {
|
||||||
resolvers: [ElementPlusResolver()]
|
scss: {
|
||||||
}),
|
api: 'modern-compiler'
|
||||||
createStyleImportPlugin({
|
}
|
||||||
resolves: [ElementPlusResolve()]
|
|
||||||
}),
|
|
||||||
createSvgIconsPlugin({
|
|
||||||
// 配置路劲在你的src里的svg存放文件
|
|
||||||
iconDirs: [fileURLToPath(new URL('./src/assets/icons', import.meta.url))],
|
|
||||||
symbolId: 'local-icon-[dir]-[name]'
|
|
||||||
}),
|
|
||||||
vueSetupExtend()
|
|
||||||
],
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
||||||
}
|
|
||||||
},
|
|
||||||
css: {
|
|
||||||
preprocessorOptions: {
|
|
||||||
scss: {
|
|
||||||
api: 'modern-compiler'
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
optimizeDeps: {
|
||||||
optimizeDeps: {
|
// 确保不重复包含这些依赖
|
||||||
// 确保不重复包含这些依赖
|
include: ['@wangeditor/editor-for-vue', 'vue-echarts', ...getElementPlusStylePaths()]
|
||||||
include: ['@wangeditor/editor-for-vue', 'vue-echarts', ...getElementPlusStylePaths()]
|
},
|
||||||
},
|
build: {
|
||||||
build: {
|
rollupOptions: {
|
||||||
rollupOptions: {
|
output: {
|
||||||
output: {
|
manualChunks(id) {
|
||||||
manualChunks(id) {
|
if (id.includes('node_modules')) {
|
||||||
if (id.includes('node_modules')) {
|
return id.toString().split('node_modules/')[1].split('/')[0].toString()
|
||||||
return id.toString().split('node_modules/')[1].split('/')[0].toString()
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
define: {
|
||||||
|
__VUE_PROD_DEVTOOLS__: false,
|
||||||
|
__VUE_OPTIONS_API__: true,
|
||||||
|
__VUE_PROD_HYDRATION__: true,
|
||||||
|
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
||||||
}
|
}
|
||||||
},
|
|
||||||
define: {
|
|
||||||
__VUE_PROD_DEVTOOLS__: false,
|
|
||||||
__VUE_OPTIONS_API__: true,
|
|
||||||
__VUE_PROD_HYDRATION__: true,
|
|
||||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user