From b7425c51cf74c8bda4bce594a53ff7385cc193ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A6=8D=E6=B4=81?= <16391855+wang-yanjie1218@user.noreply.gitee.com> Date: Thu, 8 Jan 2026 14:50:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86PC=E7=AB=AF=E5=92=8C=E5=85=BD?= =?UTF-8?q?=E5=8C=BBPC=E7=AB=AF=E6=A0=B9=E6=8D=AE=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chenhai-ui/src/api/vet/qualification.js | 18 + chenhai-ui/src/layout/components/Navbar.vue | 43 +- chenhai-ui/src/permission.js | 14 +- chenhai-ui/src/router/index.js | 31 +- chenhai-ui/src/store/modules/user.js | 10 +- chenhai-ui/src/views/gld.vue | 18 + chenhai-ui/src/views/index.vue | 1499 ++++------------- chenhai-ui/src/views/indexGld.vue | 1107 +----------- chenhai-ui/src/views/login.vue | 7 +- chenhai-ui/src/views/loginGld.vue | 20 +- chenhai-ui/src/views/syd.vue | 206 +++ chenhai-ui/src/views/vet/article/index.vue | 156 +- .../src/views/vet/certificate/index.vue | 2 +- chenhai-ui/src/views/vet/info/index.vue | 2 +- .../src/views/vet/notification/index.vue | 2 +- chenhai-ui/src/views/vet/review/index.vue | 2 +- 16 files changed, 778 insertions(+), 2359 deletions(-) create mode 100644 chenhai-ui/src/views/gld.vue create mode 100644 chenhai-ui/src/views/syd.vue diff --git a/chenhai-ui/src/api/vet/qualification.js b/chenhai-ui/src/api/vet/qualification.js index 0060522..c54050e 100644 --- a/chenhai-ui/src/api/vet/qualification.js +++ b/chenhai-ui/src/api/vet/qualification.js @@ -1,5 +1,23 @@ import request from '@/utils/request' +// 兽医资质提交审核 +export function submitAuditQualification(qualificationId) { + return request({ + url: '/vet/qualification/submitAudit/' + qualificationId, + method: 'post', + data: data + }) +} + +// 审核 +export function auditQualification(data) { + return request({ + url: ' /vet/qualification/audit', + method: 'post', + data: data + }) +} + // 查询兽医资质列表 export function listQualification(query) { return request({ diff --git a/chenhai-ui/src/layout/components/Navbar.vue b/chenhai-ui/src/layout/components/Navbar.vue index 8271da4..ab991bc 100644 --- a/chenhai-ui/src/layout/components/Navbar.vue +++ b/chenhai-ui/src/layout/components/Navbar.vue @@ -9,24 +9,24 @@
- +
@@ -81,7 +81,7 @@ export default { 'sidebar', 'avatar', 'device', - 'nickName' + 'nickName', ]), setting: { get() { @@ -99,6 +99,11 @@ export default { } } }, + + created() { + console.log(111,this.$store.state.user.roles[0]) + }, + methods: { toggleSideBar() { this.$store.dispatch('app/toggleSideBar') @@ -112,10 +117,16 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { + const userRole = this.$store.state.user.roles[0]; this.$store.dispatch('LogOut').then(() => { - location.href = '/index' + if (userRole === 'vetnotshenhe') { + location.href = '/login'; + } else { + location.href = '/loginGld'; + } + }).catch(() => { }) - }).catch(() => {}) + }) } } } diff --git a/chenhai-ui/src/permission.js b/chenhai-ui/src/permission.js index 17c6a0f..7ca0de4 100644 --- a/chenhai-ui/src/permission.js +++ b/chenhai-ui/src/permission.js @@ -20,14 +20,14 @@ router.beforeEach((to, from, next) => { if (getToken()) { to.meta.title && store.dispatch('settings/setTitle', to.meta.title) /* has token*/ - if (to.path === '/login') { - next({ path: '/' }) + if (to.path === '/login' || to.path === '/loginGld') { + next({ path: '/index' }) NProgress.done() } - else if (to.path === '/loginGld') { - next({ path: '/indexGld' }) - NProgress.done() - } else if (isWhiteList(to.path)) { + // else if (to.path === '/loginGld') { + // next({ path: '/indexGld' }) + // NProgress.done() + else if (isWhiteList(to.path)) { next() } else { if (store.getters.roles.length === 0) { @@ -43,7 +43,7 @@ router.beforeEach((to, from, next) => { }).catch(err => { store.dispatch('LogOut').then(() => { Message.error(err) - next({ path: '/' }) + next({path: '/'}) }) }) } else { diff --git a/chenhai-ui/src/router/index.js b/chenhai-ui/src/router/index.js index 21ebcec..587fbea 100644 --- a/chenhai-ui/src/router/index.js +++ b/chenhai-ui/src/router/index.js @@ -69,7 +69,7 @@ export const constantRoutes = [ component: () => import('@/views/error/401'), hidden: true }, - // 管理员首页 + // 首页 { path: '/', component: Layout, @@ -79,25 +79,24 @@ export const constantRoutes = [ path: 'indexGld', component: () => import('@/views/indexGld'), name: 'IndexGld', - meta: { title: '管理员首页', icon: 'dashboard', affix: true } + meta: { title: '首页', icon: 'dashboard', affix: true, requiresAuth: true} } ] }, // 兽医首页 - { - path: '', - component: Layout, - redirect: 'index', - children: [ - { - path: 'index', - component: () => import('@/views/index'), - name: 'Index', - meta: { title: '兽医首页', icon: 'dashboard', affix: true } - } - ] - }, - + // { + // path: '/', + // component: Layout, + // redirect: 'index', + // children: [ + // { + // path: 'index', + // component: () => import('@/views/index'), + // name: 'Index', + // meta: { title: '兽医首页', icon: 'dashboard', affix: true} + // } + // ] + // }, { path: '/user', component: Layout, diff --git a/chenhai-ui/src/store/modules/user.js b/chenhai-ui/src/store/modules/user.js index b3b3638..99156f7 100644 --- a/chenhai-ui/src/store/modules/user.js +++ b/chenhai-ui/src/store/modules/user.js @@ -94,11 +94,11 @@ const user = { commit('SET_NICK_NAME', user.nickName) commit('SET_AVATAR', avatar) /* 初始密码提示 */ - if(res.isDefaultModifyPwd) { - MessageBox.confirm('您的密码还是初始密码,请修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { - router.push({ name: 'Profile', params: { activeTab: 'resetPwd' } }) - }).catch(() => {}) - } + // if(res.isDefaultModifyPwd) { + // MessageBox.confirm('您的密码还是初始密码,请修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { + // router.push({ name: 'Profile', params: { activeTab: 'resetPwd' } }) + // }).catch(() => {}) + // } /* 过期密码提示 */ if(!res.isDefaultModifyPwd && res.isPasswordExpired) { MessageBox.confirm('您的密码已过期,请尽快修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { diff --git a/chenhai-ui/src/views/gld.vue b/chenhai-ui/src/views/gld.vue new file mode 100644 index 0000000..6f7adf1 --- /dev/null +++ b/chenhai-ui/src/views/gld.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/chenhai-ui/src/views/index.vue b/chenhai-ui/src/views/index.vue index 5de70b5..6f41464 100644 --- a/chenhai-ui/src/views/index.vue +++ b/chenhai-ui/src/views/index.vue @@ -1,1173 +1,386 @@ + }, + methods: { + // 加载经营范围选项 + loadScopeOptions() { + this.$axios.get('/vet/qualification/scope/options') + .then(res => { + this.scopeOptions = res.data + }) + }, - + + + diff --git a/chenhai-ui/src/views/indexGld.vue b/chenhai-ui/src/views/indexGld.vue index 65a41f5..cc141ab 100644 --- a/chenhai-ui/src/views/indexGld.vue +++ b/chenhai-ui/src/views/indexGld.vue @@ -1,1108 +1,33 @@ diff --git a/chenhai-ui/src/views/login.vue b/chenhai-ui/src/views/login.vue index 8192549..8385b97 100644 --- a/chenhai-ui/src/views/login.vue +++ b/chenhai-ui/src/views/login.vue @@ -31,7 +31,7 @@
- + { - this.$router.push({path: this.redirect || "/"}).catch(() => { + this.$router.push({path: this.redirect || "/indexGld"}).catch(() => { }) }).catch(() => { this.loginloading = false diff --git a/chenhai-ui/src/views/loginGld.vue b/chenhai-ui/src/views/loginGld.vue index aa81ca9..10aa47a 100644 --- a/chenhai-ui/src/views/loginGld.vue +++ b/chenhai-ui/src/views/loginGld.vue @@ -15,7 +15,7 @@

"与牧同行"管理端

- +
一站通登・筑牢账号防线
@@ -164,9 +164,9 @@ export default { // }) // }, getCookie() { - const username = Cookies.get("username ") - const password = Cookies.get("password") - const rememberMe = Cookies.get('rememberMe') + const username = Cookies.get("gld_username") + const password = Cookies.get("gld_password") + const rememberMe = Cookies.get('gld_rememberMe') this.loginForm = { username : username === undefined ? this.loginForm.username : username , password: password === undefined ? this.loginForm.password : decrypt(password), @@ -178,13 +178,13 @@ export default { if (valid) { this.loading = true if (this.loginForm.rememberMe) { - Cookies.set("username", this.loginForm.username , { expires: 30 }) - Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 }) - Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 }) + Cookies.set("gld_username", this.loginForm.username , { expires: 30 }) + Cookies.set("gld_password", encrypt(this.loginForm.password), { expires: 30 }) + Cookies.set('gld_rememberMe', this.loginForm.rememberMe, { expires: 30 }) } else { - Cookies.remove("username") - Cookies.remove("password") - Cookies.remove('rememberMe') + Cookies.remove("gld_username") + Cookies.remove("gld_password") + Cookies.remove('gld_rememberMe') } this.$store.dispatch("LoginGld", this.loginForm).then(() => { this.$router.push({ path: this.redirect || '/indexGld' }).catch(()=>{}) diff --git a/chenhai-ui/src/views/syd.vue b/chenhai-ui/src/views/syd.vue new file mode 100644 index 0000000..c6e2b7b --- /dev/null +++ b/chenhai-ui/src/views/syd.vue @@ -0,0 +1,206 @@ + + + + + + + diff --git a/chenhai-ui/src/views/vet/article/index.vue b/chenhai-ui/src/views/vet/article/index.vue index 78bfe0b..0b58074 100644 --- a/chenhai-ui/src/views/vet/article/index.vue +++ b/chenhai-ui/src/views/vet/article/index.vue @@ -9,46 +9,46 @@ @keyup.enter.native="handleQuery" /> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -161,11 +161,11 @@ - - - - - + + + + + @@ -178,21 +178,25 @@ {{ parseTime(scope.row.publishTime, '{y}-{m}-{d}') }} - + @@ -224,21 +228,21 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -456,3 +460,27 @@ export default { } } + + + + diff --git a/chenhai-ui/src/views/vet/certificate/index.vue b/chenhai-ui/src/views/vet/certificate/index.vue index d2db1de..c321c7d 100644 --- a/chenhai-ui/src/views/vet/certificate/index.vue +++ b/chenhai-ui/src/views/vet/certificate/index.vue @@ -149,7 +149,7 @@ {{ parseTime(scope.row.lastRemindTime, '{y}-{m}-{d}') }} - + - + - +