diff --git a/.env.development b/.env.development index 0e57671..c60de5b 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,10 @@ +### + # @Author: riverQiu + # @Date: 2023-08-16 22:04:23 + # @LastEditors: riverQiu + # @LastEditTime: 2023-08-18 23:22:27 + # @Description: +### # 页面标题 VUE_APP_TITLE = 莳松管理系统 @@ -7,5 +14,7 @@ ENV = 'development' # 莳松管理系统/开发环境 VUE_APP_BASE_API = '/dev-api' +JWL_API = '' + # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/api/question.js b/src/api/question.js new file mode 100644 index 0000000..1611ba5 --- /dev/null +++ b/src/api/question.js @@ -0,0 +1,26 @@ +/* + * @Author: riverQiu + * @Date: 2023-08-17 20:30:56 + * @LastEditors: riverQiu + * @LastEditTime: 2023-08-19 00:26:04 + * @Description: + */ +import request from '@/utils/request'; + +// 获取首页统计信息 +export function searchQuestion(param) { + return request({ + url: '/driver-api/tdQuestion/duima/list', + method: 'get', + params: param + }); +} + +export function updateQuestion(data) { + return request({ + url: '/driver-api/tdQuestion/duima/update', + method: 'put', + data: data + }); +} + diff --git a/src/permission.js b/src/permission.js index c25eba8..1841aea 100644 --- a/src/permission.js +++ b/src/permission.js @@ -16,7 +16,7 @@ NProgress.configure({ showSpinner: false }); -const whiteList = ['/login', '/auth-redirect', '/bind', '/register']; +const whiteList = ['/login', '/auth-redirect', '/bind', '/register', '/question']; router.beforeEach((to, from, next) => { NProgress.start(); diff --git a/src/router/index.js b/src/router/index.js index ce60396..df2777f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -30,170 +30,175 @@ import Layout from '@/layout'; // 公共路由 export const constantRoutes = [{ - path: '/redirect', - component: Layout, - hidden: true, - children: [{ - path: '/redirect/:path(.*)', - component: () => import('@/views/redirect') - }] - }, - { - path: '/login', - component: () => import('@/views/login'), - hidden: true - }, - { - path: '/register', - component: () => import('@/views/register'), - hidden: true - }, - { - path: '/404', - component: () => import('@/views/error/404'), - hidden: true - }, - { - path: '/401', - component: () => import('@/views/error/401'), - hidden: true - }, - { - path: '', - component: Layout, - redirect: 'index', - children: [{ - path: 'index', - component: () => import('@/views/index'), - name: 'Index', - meta: { - title: '首页', - icon: 'dashboard', - affix: true - } - }] - }, - // { - // path: '/demo', - // component: Layout, - // redirect: 'noredirect', - // meta: { - // title: 'Demo', - // icon: 'xx' - // }, - // children: [{ - // path: '/base-page', - // component: () => import('@/views/demo/basePage/index'), - // name: 'BasePage', - // meta: { - // title: 'BasePage', - // icon: 'xx' - // } - // }, - // { - // path: '/base-components', - // component: () => import('@/views/demo/baseComponents/index'), - // name: 'BaseComponents', - // meta: { - // title: 'BaseComponents', - // icon: 'xx' - // } - // } - // ] - // }, - { - path: '/user', - component: Layout, - hidden: true, - redirect: 'noredirect', - children: [{ - path: 'profile', - component: () => import('@/views/system/user/profile/index'), - name: 'Profile', - meta: { - title: '个人中心', - icon: 'user' - } - }] - } + path: '/redirect', + component: Layout, + hidden: true, + children: [{ + path: '/redirect/:path(.*)', + component: () => import('@/views/redirect') + }] +}, +{ + path: '/login', + component: () => import('@/views/login'), + hidden: true +}, +{ + path: '/register', + component: () => import('@/views/register'), + hidden: true +}, +{ + path: '/question', + component: () => import('@/views/question'), + hidden: true +}, +{ + path: '/404', + component: () => import('@/views/error/404'), + hidden: true +}, +{ + path: '/401', + component: () => import('@/views/error/401'), + hidden: true +}, +{ + path: '', + component: Layout, + redirect: 'index', + children: [{ + path: 'index', + component: () => import('@/views/index'), + name: 'Index', + meta: { + title: '首页', + icon: 'dashboard', + affix: true + } + }] +}, +// { +// path: '/demo', +// component: Layout, +// redirect: 'noredirect', +// meta: { +// title: 'Demo', +// icon: 'xx' +// }, +// children: [{ +// path: '/base-page', +// component: () => import('@/views/demo/basePage/index'), +// name: 'BasePage', +// meta: { +// title: 'BasePage', +// icon: 'xx' +// } +// }, +// { +// path: '/base-components', +// component: () => import('@/views/demo/baseComponents/index'), +// name: 'BaseComponents', +// meta: { +// title: 'BaseComponents', +// icon: 'xx' +// } +// } +// ] +// }, +{ + path: '/user', + component: Layout, + hidden: true, + redirect: 'noredirect', + children: [{ + path: 'profile', + component: () => import('@/views/system/user/profile/index'), + name: 'Profile', + meta: { + title: '个人中心', + icon: 'user' + } + }] +} ]; // 动态路由,基于用户权限动态去加载 export const dynamicRoutes = [{ - path: '/system/user-auth', - component: Layout, - hidden: true, - permissions: ['system:user:edit'], - children: [{ - path: 'role/:userId(\\d+)', - component: () => import('@/views/system/user/authRole'), - name: 'AuthRole', - meta: { - title: '分配角色', - activeMenu: '/system/user' - } - }] - }, - { - path: '/system/role-auth', - component: Layout, - hidden: true, - permissions: ['system:role:edit'], - children: [{ - path: 'user/:roleId(\\d+)', - component: () => import('@/views/system/role/authUser'), - name: 'AuthUser', - meta: { - title: '分配用户', - activeMenu: '/system/role' - } - }] - }, - { - path: '/system/dict-data', - component: Layout, - hidden: true, - permissions: ['system:dict:list'], - children: [{ - path: 'index/:dictId(\\d+)', - component: () => import('@/views/system/dict/data'), - name: 'Data', - meta: { - title: '字典数据', - activeMenu: '/system/dict' - } - }] - }, - { - path: '/monitor/job-log', - component: Layout, - hidden: true, - permissions: ['monitor:job:list'], - children: [{ - path: 'index', - component: () => import('@/views/monitor/job/log'), - name: 'JobLog', - meta: { - title: '调度日志', - activeMenu: '/monitor/job' - } - }] - }, - { - path: '/zs/clue-form', - component: Layout, - hidden: true, - permissions: ['zs:clue:add', 'zs:clue:edit'], - children: [{ - path: 'index/:clueId(\\d+)', - component: () => import('@/views/zs/clue/ClueForm'), - name: 'ClueForm', - meta: { - title: '线索详情', - activeMenu: '/zs/clue' - } - }] - } + path: '/system/user-auth', + component: Layout, + hidden: true, + permissions: ['system:user:edit'], + children: [{ + path: 'role/:userId(\\d+)', + component: () => import('@/views/system/user/authRole'), + name: 'AuthRole', + meta: { + title: '分配角色', + activeMenu: '/system/user' + } + }] +}, +{ + path: '/system/role-auth', + component: Layout, + hidden: true, + permissions: ['system:role:edit'], + children: [{ + path: 'user/:roleId(\\d+)', + component: () => import('@/views/system/role/authUser'), + name: 'AuthUser', + meta: { + title: '分配用户', + activeMenu: '/system/role' + } + }] +}, +{ + path: '/system/dict-data', + component: Layout, + hidden: true, + permissions: ['system:dict:list'], + children: [{ + path: 'index/:dictId(\\d+)', + component: () => import('@/views/system/dict/data'), + name: 'Data', + meta: { + title: '字典数据', + activeMenu: '/system/dict' + } + }] +}, +{ + path: '/monitor/job-log', + component: Layout, + hidden: true, + permissions: ['monitor:job:list'], + children: [{ + path: 'index', + component: () => import('@/views/monitor/job/log'), + name: 'JobLog', + meta: { + title: '调度日志', + activeMenu: '/monitor/job' + } + }] +}, +{ + path: '/zs/clue-form', + component: Layout, + hidden: true, + permissions: ['zs:clue:add', 'zs:clue:edit'], + children: [{ + path: 'index/:clueId(\\d+)', + component: () => import('@/views/zs/clue/ClueForm'), + name: 'ClueForm', + meta: { + title: '线索详情', + activeMenu: '/zs/clue' + } + }] +} ]; // 防止连续点击多次路由报错 diff --git a/src/views/question/components/QuestionForm.vue b/src/views/question/components/QuestionForm.vue new file mode 100644 index 0000000..dfb682c --- /dev/null +++ b/src/views/question/components/QuestionForm.vue @@ -0,0 +1,174 @@ + + + diff --git a/src/views/question/index.vue b/src/views/question/index.vue new file mode 100644 index 0000000..7560308 --- /dev/null +++ b/src/views/question/index.vue @@ -0,0 +1,101 @@ + + + diff --git a/vue.config.js b/vue.config.js index ef4d489..c08cd90 100644 --- a/vue.config.js +++ b/vue.config.js @@ -33,15 +33,24 @@ module.exports = { port: port, open: true, proxy: { + [process.env.VUE_APP_BASE_API + '/driver-api']: { + // target: `https://xueche.ahduima.com/duima/`, + target: `http://localhost:8888/driver-api/`, + changeOrigin: true, + pathRewrite: { + ['^' + process.env.VUE_APP_BASE_API + '/driver-api']: '' + } + }, // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - // target: `https://xueche.ahduima.com/duima/`, - target: `http://localhost:8086`, + target: `https://xueche.ahduima.com/duima/`, + // target: `http://localhost:8086`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '' } } + }, disableHostCheck: true },