From af6be7dcfb79a50ced1122af489e28c5ea50d352 Mon Sep 17 00:00:00 2001 From: 15820893422 <1978476055@qq.com> Date: Mon, 24 Jun 2024 17:43:49 +0800 Subject: [PATCH] edit --- admin/src/api/qa.js | 38 +++++++++++++ admin/src/layout/components/Navbar.vue | 78 ++++++++++++++++++++++++-- admin/vue.config.js | 6 +- 3 files changed, 114 insertions(+), 8 deletions(-) create mode 100644 admin/src/api/qa.js diff --git a/admin/src/api/qa.js b/admin/src/api/qa.js new file mode 100644 index 00000000..bf84351e --- /dev/null +++ b/admin/src/api/qa.js @@ -0,0 +1,38 @@ +import request from '@/utils/request' + +export function login(data) { + return request({ + url: '/admin/login', + method: 'post', + data + }) +} + +// 获取城市列表 +export function getCityList() { + return request({ + url: '/admin/city/getCityList', + method: 'get' + }) +} + +// 获取子集列表 +export function getQaList(city_id) { + return request({ + url: '/admin/qa/getQaList', + method: 'get', + params: { + city_id + } + }) +} +// 获取qa详情 +export function getQaDetail(city_id) { + return request({ + url: 'admin/qa/getQaDetail', + method: 'get', + params: { + city_id + } + }) +} diff --git a/admin/src/layout/components/Navbar.vue b/admin/src/layout/components/Navbar.vue index da025fe8..36d004d0 100644 --- a/admin/src/layout/components/Navbar.vue +++ b/admin/src/layout/components/Navbar.vue @@ -8,14 +8,16 @@ - +
+ QA常见问题 +
排班{{ $store.getters.name }}
@@ -116,7 +118,28 @@ 确 定 - + +
+ 关 闭 + 返 回 +
+ + {{ item.city_name }} + +
+
+
{{ QaInfo.title }}
+
{{ QaInfo.content }}
+
+
+
@@ -130,8 +153,10 @@ import Search from '@/components/HeaderSearch' import { color } from 'echarts/lib/export' import sidebar from '@/layout/components/Sidebar/index.vue' import avatar from 'element-ui/packages/avatar' - +import { getCityList, getQaList, getQaDetail } from '@/api/qa' +import clickoutside from 'element-ui/src/utils/clickoutside' export default { + directives: { clickoutside }, components: { Breadcrumb, Hamburger, @@ -157,17 +182,24 @@ export default { data() { return { workstatus: false, + drawer: false, showAvatar: false, dialogPWD: false, dialogWorks: false, centerDialogVisible: false, imageUrl: false, + QaShow: true, os: [], + getCityList: [], times: [], form: { oldpwd: '', pwd: '' }, + QaInfo: { + title: '', + content: '' + }, rules: { oldpwd: [ { required: true, message: '请输入旧密码', trigger: 'blur' }, @@ -182,12 +214,32 @@ export default { }, created() { this.getworkstatus() + getCityList().then(res => { + this.getCityList = res.data + }) }, methods: { color, toggleSideBar() { this.$store.dispatch('app/toggleSideBar') }, + handleClose() { + this.drawer = false + this.QaShow = true + }, + getQaDetail(id) { + getQaDetail(id).then(res => { + this.QaInfo = res.data + if (!this.QaInfo) { + return this.$message({ + message: '暂无QA问题', + type: 'warning', + duration: 1500 + }) + } + this.QaShow = false + }) + }, async logout() { await this.$store.dispatch('user/logout') this.$router.push(`/login?redirect=${this.$route.fullPath}`) @@ -264,6 +316,22 @@ export default {