提交 6cdd6daa authored 作者: xiejiang's avatar xiejiang

fix: 修复表格以及新增版本更新

上级 ce0c069f
...@@ -2,18 +2,14 @@ ...@@ -2,18 +2,14 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-05 10:14:56 * @Date: 2024-11-05 10:14:56
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 16:07:40 * @LastEditTime: 2024-12-10 16:21:35
* @Description: * @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
<template> <template>
<div> <t-config-provider :global-config="globalConfig">
<t-config-provider :global-config="globalConfig"> <router-view></router-view>
<router-view></router-view> </t-config-provider>
</t-config-provider>
<!-- <UpdataVersion ref="updataVersionRef" /> -->
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhanyoulin<zhanyoulin456@163.com> * @Author: zhanyoulin<zhanyoulin456@163.com>
* @Date: 2023-06-25 09:01:18 * @Date: 2023-06-25 09:01:18
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-05 16:18:02 * @LastEditTime: 2024-12-10 18:00:50
* @Description: * @Description:
*/ */
import axios, { AxiosInstance, AxiosError, AxiosRequestConfig, InternalAxiosRequestConfig, AxiosResponse } from 'axios' import axios, { AxiosInstance, AxiosError, AxiosRequestConfig, InternalAxiosRequestConfig, AxiosResponse } from 'axios'
...@@ -38,6 +38,21 @@ const config = { ...@@ -38,6 +38,21 @@ const config = {
class RequestHttp { class RequestHttp {
service: AxiosInstance service: AxiosInstance
/**
* @description 显示错误消息的方法
* @param msg 错误消息
*/
private showMessage(msg: string) {
if (!this.isMessageShown) {
this.isMessageShown = true
MessagePlugin.error(msg)
setTimeout(() => {
this.isMessageShown = false
}, 2000)
}
}
private isMessageShown: boolean = false // 添加一个标志来跟踪是否已经显示了消息
public constructor(config: AxiosRequestConfig) { public constructor(config: AxiosRequestConfig) {
// instantiation // instantiation
this.service = axios.create(config) this.service = axios.create(config)
...@@ -54,7 +69,9 @@ class RequestHttp { ...@@ -54,7 +69,9 @@ class RequestHttp {
// 当前请求不需要显示 loading,在 api 服务中通过指定的第三个参数: { noLoading: true } 来控制 // 当前请求不需要显示 loading,在 api 服务中通过指定的第三个参数: { noLoading: true } 来控制
// config.noLoading || showFullScreenLoading() // config.noLoading || showFullScreenLoading()
if (config.headers && typeof config.headers.set === 'function') { if (config.headers && typeof config.headers.set === 'function') {
config.headers.set('menuId', authStore.activeMenuId) const activeMenu = authStore.activeMenuId || localStorage.getItem('activeMenuId')
config.headers.set('menuId', activeMenu)
// config.headers.set('menuSign', authStore.menuSign) // config.headers.set('menuSign', authStore.menuSign)
config.headers.set('client', 'platform') config.headers.set('client', 'platform')
config.headers.set('device', getDeviceType()) config.headers.set('device', getDeviceType())
...@@ -83,12 +100,12 @@ class RequestHttp { ...@@ -83,12 +100,12 @@ class RequestHttp {
if (data.code == ResultEnum.OVERDUE) { if (data.code == ResultEnum.OVERDUE) {
userStore.setToken('') userStore.setToken('')
router.replace(LOGIN_URL) router.replace(LOGIN_URL)
MessagePlugin.error(data.msg) this.showMessage(data.msg)
return Promise.reject(data) return Promise.reject(data)
} }
// 全局错误信息拦截(防止下载文件的时候返回数据流,没有 code 直接报错) // 全局错误信息拦截(防止下载文件的时候返回数据流,没有 code 直接报错)
if (data.code && data.code !== ResultEnum.SUCCESS) { if (data.code && data.code !== ResultEnum.SUCCESS) {
MessagePlugin.error(data.msg) this.showMessage(data.msg)
return Promise.reject(data) return Promise.reject(data)
} }
// 成功请求(在页面上除非特殊情况,否则不用处理失败逻辑) // 成功请求(在页面上除非特殊情况,否则不用处理失败逻辑)
...@@ -98,8 +115,8 @@ class RequestHttp { ...@@ -98,8 +115,8 @@ class RequestHttp {
const { response } = error const { response } = error
tryHideFullScreenLoading() tryHideFullScreenLoading()
// 请求超时 && 网络错误单独判断,没有 response // 请求超时 && 网络错误单独判断,没有 response
if (error.message.indexOf('timeout') !== -1) MessagePlugin.error('请求超时!请您稍后重试') if (error.message.indexOf('timeout') !== -1) this.showMessage('请求超时!请您稍后重试')
if (error.message.indexOf('Network Error') !== -1) MessagePlugin.error('网络错误!请您稍后重试') if (error.message.indexOf('Network Error') !== -1) this.showMessage('网络错误!请您稍后重试')
// 根据服务器响应的错误状态码,做不同的处理 // 根据服务器响应的错误状态码,做不同的处理
if (response) checkStatus(response.status) if (response) checkStatus(response.status)
// 服务器结果都没有返回(可能服务器错误可能客户端断网),断网处理:可以跳转到断网页面 // 服务器结果都没有返回(可能服务器错误可能客户端断网),断网处理:可以跳转到断网页面
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-12-05 09:20:12 * @Date: 2024-12-05 09:20:12
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-09 17:52:26 * @LastEditTime: 2024-12-10 17:08:56
* @Description: * @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
*/ */
...@@ -35,7 +35,7 @@ export interface ResVersion extends KeyAny { ...@@ -35,7 +35,7 @@ export interface ResVersion extends KeyAny {
platformType?: number // 终端类型*【1:平台端(后台);2:机构端;3:】 [必填] platformType?: number // 终端类型*【1:平台端(后台);2:机构端;3:】 [必填]
platformVersionLogs?: any[] // 平台端版本日志 [必填] platformVersionLogs?: any[] // 平台端版本日志 [必填]
remark?: string // 备注 [必填] remark?: string // 备注 [必填]
versionId?: number // 版本id [必填] versionId?: string // 版本id [必填]
updateTime?: string // 更新时间 [必填] updateTime?: string // 更新时间 [必填]
updateUserId?: number // 更新人id [必填] updateUserId?: number // 更新人id [必填]
version?: string // 版本号 [必填] version?: string // 版本号 [必填]
......
/*
* @Author: xiejiang
* @Date: 2024-12-08 09:25:34
* @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 17:53:42
* @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
*/
import http from '@/api' import http from '@/api'
import { ReqVersionPage, ResVersionPage, ResVersion, ReqVersion } from '@/api/interface/version/index' import { ReqVersionPage, ResVersionPage, ResVersion, ReqVersion } from '@/api/interface/version/index'
...@@ -78,6 +86,6 @@ export const postVersionRemove = (data: { ids: string[] }) => { ...@@ -78,6 +86,6 @@ export const postVersionRemove = (data: { ids: string[] }) => {
* @param status 版本状态*【1:开发中;2:已发布;3:已下线】 [必填] * @param status 版本状态*【1:开发中;2:已发布;3:已下线】 [必填]
* @param versionId 版本id* [必填] * @param versionId 版本id* [必填]
*/ */
export const postVersionEditStatus = (data: { status: number; versionId: number }) => { export const postVersionEditStatus = (data: { status: number; versionId: string }) => {
return http.post(api.postVersionEditStatus, data) return http.post(api.postVersionEditStatus, data)
} }
...@@ -107,6 +107,7 @@ const isShowFilterResult = computed(() => filterData.value.find((v: filterItemPr ...@@ -107,6 +107,7 @@ const isShowFilterResult = computed(() => filterData.value.find((v: filterItemPr
const filterResultClose = (item: filterItemProp) => { const filterResultClose = (item: filterItemProp) => {
item.str = '' item.str = ''
} }
// 清空 // 清空
const handleClear = () => { const handleClear = () => {
filterData.value.flatMap((item: filterItemProp) => { filterData.value.flatMap((item: filterItemProp) => {
...@@ -172,16 +173,16 @@ watch( ...@@ -172,16 +173,16 @@ watch(
} }
) )
watch( // watch(
() => filterData, // () => filterData,
() => { // () => {
handleFilterSearch() // handleFilterSearch()
}, // },
{ // {
deep: true, // deep: true,
immediate: true // immediate: true
} // }
) // )
defineExpose<DynamicType>({ defineExpose<DynamicType>({
resetFilterConditions resetFilterConditions
......
...@@ -2,32 +2,35 @@ ...@@ -2,32 +2,35 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-12-10 15:36:04 * @Date: 2024-12-10 15:36:04
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 16:00:23 * @LastEditTime: 2024-12-10 17:51:30
* @Description: 更新版本弹窗 * @Description: 更新版本弹窗
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
<template> <template>
<Dialog <Dialog
:dialog-visible="isShowPuzzleVcode" :dialog-visible="visible"
width="640px" width="640px"
class="upadte-dialog"
:close-on-overlay-click="false" :close-on-overlay-click="false"
@close="isShowPuzzleVcode = false" @close="visible = false"
> >
<template #body> <template #body>
<main class="updata-main"> <main class="updata-main px-[32px] py-[16px]">
<div class="flex items-center"> <div class="flex items-center mb-[16px]">
<span>业务分支:</span> <span class="min-w-[80px]">业务分支:</span>
<span>{{ state.platformType == 1 ? '平台端' : '机构端' }}</span> <span class="text-[var(--td-font-gray-1)]">{{ state?.platformType == 1 ? '平台端' : '机构端' }}</span>
</div> </div>
<div class="flex items-center"> <div class="flex items-center mb-[16px]">
<span>版本号:</span> <span class="min-w-[80px]">版本号:</span>
<span>{{ state.version }}</span> <span class="text-[var(--td-font-gray-1)]">{{ state?.version }}</span>
</div> </div>
<div class="flex items-center"> <div class="flex">
<span>更新说明:</span> <span class="min-w-[80px]">更新说明:</span>
<div class="content-div" v-html="state.description"></div> <div class="content-div text-[var(--td-font-gray-1)]" v-html="state?.description"></div>
</div>
<div class="flex justify-center">
<t-button class="mt-[60px] w-[250px]" @click="handleConfirm" shape="round">更新至最新版本</t-button>
</div> </div>
<t-button class="mt-[60px] h-[48px] w-full text-[16px]" type="submit" shape="round">更新至最新版本</t-button>
</main> </main>
</template> </template>
</Dialog> </Dialog>
...@@ -35,17 +38,69 @@ ...@@ -35,17 +38,69 @@
<script setup lang="ts" name="upadta-version"> <script setup lang="ts" name="upadta-version">
import { ResVersion } from '@/api/interface/version/index' import { ResVersion } from '@/api/interface/version/index'
const isShowPuzzleVcode = ref(false) import { postSaveUserClient } from '@/api/modules/menu/index'
const state = reactive<ResVersion>({})
const open = (data: ResVersion) => {
isShowPuzzleVcode.value = true
state.value = data
}
defineExpose({ const props = withDefaults(defineProps<{ dialogVisible: boolean; state: ResVersion | null }>(), {
open dialogVisible: false,
state: null
}) })
const visible = ref(false)
watch(
() => props.dialogVisible,
val => {
console.log(val)
visible.value = val
},
{ immediate: true }
)
const handleConfirm = () => {
postSaveUserClient({ versionId: props.state?.versionId as string }).finally(() => {
visible.value = false
})
window.location.reload()
}
</script> </script>
<style lang="less" scoped></style> <style lang="less">
.content-div {
max-height: 400px;
overflow: auto;
* {
padding: 0;
margin: 0;
}
}
.upadte-dialog {
.t-dialog {
border: none;
}
.t-dialog--default {
padding: 0 !important;
}
.t-dialog__header {
height: 187px;
background: url('@/assets/images/update.png');
background-size: 100% 100%;
position: relative;
.t-dialog__close {
color: var(--td-white);
position: absolute;
right: 24px;
top: 24px;
}
.t-dialog__close:hover {
background: none;
}
}
}
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-08 10:41:05 * @LastEditTime: 2024-12-10 16:47:46
* @Description: * @Description:
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -17,10 +17,12 @@ ...@@ -17,10 +17,12 @@
</t-aside> </t-aside>
<Main class="content-main" :style="tabWidth" /> <Main class="content-main" :style="tabWidth" />
</t-layout> </t-layout>
<UpdateVersion :dialog-visible="dialogVisible" :state="userInfo?.clientLastVersion || null" />
</t-layout> </t-layout>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useUserStore } from '@/stores/modules/user'
import { useGlobalStore } from '@/stores/modules/global' import { useGlobalStore } from '@/stores/modules/global'
import Header from '@/layouts/components/Header/index.vue' import Header from '@/layouts/components/Header/index.vue'
import Main from '@/layouts/components/Main/index.vue' import Main from '@/layouts/components/Main/index.vue'
...@@ -28,6 +30,31 @@ import MenuSearch from '@/layouts/components/Menu/MenuSearch.vue' ...@@ -28,6 +30,31 @@ import MenuSearch from '@/layouts/components/Menu/MenuSearch.vue'
import Menu from '@/layouts/components/Menu/index.vue' import Menu from '@/layouts/components/Menu/index.vue'
// import MiddleBtn from '@/layouts/components/MiddleBtn/index.vue' // import MiddleBtn from '@/layouts/components/MiddleBtn/index.vue'
const userStore = useUserStore()
const userInfo = computed(() => userStore.userInfo)
const dialogVisible = ref(false)
watch(
userInfo,
val => {
if (!val) return
if (val?.needUpd) {
dialogVisible.value = true
}
},
{
deep: true
}
)
onMounted(() => {
// 获取用户信息
if (userInfo.value?.needUpd) {
dialogVisible.value = true
}
})
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
const isCollapse = computed(() => globalStore.isCollapse) const isCollapse = computed(() => globalStore.isCollapse)
const tabWidth = isCollapse.value ? 'width: calc(100% - 52px)' : 'width: calc(100% - 208px)' const tabWidth = isCollapse.value ? 'width: calc(100% - 52px)' : 'width: calc(100% - 208px)'
......
...@@ -118,6 +118,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -118,6 +118,7 @@ router.beforeEach(async (to, from, next) => {
const activeMenuId = findMenuByName(authStore.authMenuListGet, to.name as string)?.menuId ?? '' const activeMenuId = findMenuByName(authStore.authMenuListGet, to.name as string)?.menuId ?? ''
if (activeMenuId) { if (activeMenuId) {
authStore.setActiveMenuId(activeMenuId) authStore.setActiveMenuId(activeMenuId)
localStorage.setItem('activeMenuId', activeMenuId)
} }
next() next()
......
...@@ -33,6 +33,7 @@ const customerRouter: RouteRecordRaw[] = [ ...@@ -33,6 +33,7 @@ const customerRouter: RouteRecordRaw[] = [
title: '添加机构', title: '添加机构',
access: 'institution', access: 'institution',
noTopTag: true, noTopTag: true,
affix: false,
activeMenu: 'institution', activeMenu: 'institution',
hideFooter: true hideFooter: true
} }
...@@ -45,6 +46,7 @@ const customerRouter: RouteRecordRaw[] = [ ...@@ -45,6 +46,7 @@ const customerRouter: RouteRecordRaw[] = [
title: '机构详情', title: '机构详情',
access: 'institution', access: 'institution',
noTopTag: true, noTopTag: true,
affix: false,
activeMenu: 'institution', activeMenu: 'institution',
hideFooter: true hideFooter: true
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-28 15:00:25 * @Date: 2024-11-28 15:00:25
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-05 09:45:29 * @LastEditTime: 2024-12-10 17:44:56
* @Description: 系统配置 * @Description: 系统配置
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
*/ */
...@@ -34,6 +34,7 @@ const sysConfigRouter: RouteRecordRaw[] = [ ...@@ -34,6 +34,7 @@ const sysConfigRouter: RouteRecordRaw[] = [
title: '管理子集', title: '管理子集',
access: 'dictionary', access: 'dictionary',
noTopTag: true, noTopTag: true,
affix: false,
activeMenu: 'dictionary', activeMenu: 'dictionary',
hideFooter: true hideFooter: true
} }
......
...@@ -34,6 +34,7 @@ const sysPermissionsRouter: RouteRecordRaw[] = [ ...@@ -34,6 +34,7 @@ const sysPermissionsRouter: RouteRecordRaw[] = [
title: '用户详情', title: '用户详情',
access: 'users', access: 'users',
noTopTag: true, noTopTag: true,
affix: false,
activeMenu: 'users', activeMenu: 'users',
hideFooter: true hideFooter: true
} }
...@@ -55,6 +56,7 @@ const sysPermissionsRouter: RouteRecordRaw[] = [ ...@@ -55,6 +56,7 @@ const sysPermissionsRouter: RouteRecordRaw[] = [
title: '角色详情', title: '角色详情',
access: 'role', access: 'role',
noTopTag: true, noTopTag: true,
affix: false,
activeMenu: 'role', activeMenu: 'role',
hideFooter: true hideFooter: true
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhanyoulin<zhanyoulin456@163.com> * @Author: zhanyoulin<zhanyoulin456@163.com>
* @Date: 2023-06-13 09:41:17 * @Date: 2023-06-13 09:41:17
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-03 09:48:57 * @LastEditTime: 2024-12-10 17:13:53
* @Description: * @Description:
*/ */
...@@ -25,6 +25,7 @@ export interface UserInfo { ...@@ -25,6 +25,7 @@ export interface UserInfo {
loginInfo: { loginInfo: {
device: string device: string
ip: string ip: string
loginIp?: string
location?: string location?: string
loginAddress?: string loginAddress?: string
time: string time: string
......
...@@ -80,6 +80,7 @@ onMounted(() => { ...@@ -80,6 +80,7 @@ onMounted(() => {
} }
]) ])
getDictData() getDictData()
getData()
}) })
// 加载状态 // 加载状态
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-05 10:14:56 * @Date: 2024-11-05 10:14:56
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-08 14:49:30 * @LastEditTime: 2024-12-10 17:13:32
* @Description: 首页 * @Description: 首页
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div></div> <div></div>
</div> --> </div> -->
<div class="home-avatar flex items-center justify-center"> <div class="home-avatar flex items-center justify-center">
<div> <div class="text-center">
<p class="text-20 bold">{{ userInfo && userInfo.userName }},您好!</p> <p class="text-20 bold">{{ userInfo && userInfo.userName }},您好!</p>
<p class="text-14">欢迎使用智慧教育平台</p> <p class="text-14">欢迎使用智慧教育平台</p>
</div> </div>
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
</p> </p>
<p> <p>
<span>上次登录:</span> <span>上次登录:</span>
<span class="max-w-[calc(100%-90px)]" <span class="max-w-[calc(100%-90px)] text-right"
>{{ userInfo?.loginInfo.loginAddress || '-' }}{{ userInfo?.loginInfo.time || '-' }}{{ >{{ userInfo?.loginInfo.loginAddress || '-' }}{{ userInfo?.loginInfo.loginIp || '-' }}{{
userInfo?.loginInfo.device || '-' userInfo?.loginInfo.time || '-'
}}</span }}{{ userInfo?.loginInfo.device || '-' }}</span
> >
</p> </p>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 15:04:00 * @LastEditTime: 2024-12-10 17:52:47
* @Description: 系统字典 * @Description: 系统字典
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -81,6 +81,7 @@ onMounted(() => { ...@@ -81,6 +81,7 @@ onMounted(() => {
title: '系统字典' title: '系统字典'
} }
]) ])
getData()
}) })
const dictionaryEditRef = ref() const dictionaryEditRef = ref()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 15:19:33 * @LastEditTime: 2024-12-10 17:52:38
* @Description: 菜单管理 * @Description: 菜单管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -112,6 +112,7 @@ onMounted(() => { ...@@ -112,6 +112,7 @@ onMounted(() => {
title: '菜单管理' title: '菜单管理'
} }
]) ])
getData()
GetAllMenuGroup() GetAllMenuGroup()
}) })
// 搜索参数类型 // 搜索参数类型
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 11:40:24 * @LastEditTime: 2024-12-10 17:21:10
* @Description: 菜单管理-新增编辑菜单 * @Description: 菜单管理-新增编辑菜单
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -81,7 +81,7 @@ const formRef = useTemplateRef<FormInstanceFunctions>('formRef') ...@@ -81,7 +81,7 @@ const formRef = useTemplateRef<FormInstanceFunctions>('formRef')
const formData = reactive<ReqMenuEdit>({ const formData = reactive<ReqMenuEdit>({
htmlPlatform: '', htmlPlatform: '',
icon: '', icon: '',
isButton: '1', isButton: 0,
menuId: '', menuId: '',
menuLevel: 1, menuLevel: 1,
menuName: '', menuName: '',
...@@ -164,7 +164,7 @@ const close = () => { ...@@ -164,7 +164,7 @@ const close = () => {
drawerVisible.value = false drawerVisible.value = false
formRef.value?.reset() formRef.value?.reset()
formData.menuLevel = 1 formData.menuLevel = 1
formData.isButton = 1 formData.isButton = 0
formData.menuId = '' formData.menuId = ''
} }
...@@ -179,6 +179,11 @@ const getLevelMenu = () => { ...@@ -179,6 +179,11 @@ const getLevelMenu = () => {
} }
// 菜单层级变化 // 菜单层级变化
const changeMenuLevel = () => { const changeMenuLevel = () => {
if (formData.menuLevel === 3) {
formData.isButton = 1
} else {
formData.isButton = 0
}
getLevelMenu() getLevelMenu()
} }
......
<template> <template>
<Drawer :drawer-visible="drawerVisible" width="480" title="操作日志" :footer="false" @close="close"> <Drawer :drawer-visible="drawerVisible" width="640" title="操作日志" :footer="false" @close="close">
<SearchWithButton <SearchWithButton
:loading="loading" :loading="loading"
placeholder="操作人姓名" placeholder="操作人姓名"
...@@ -38,7 +38,6 @@ const tableData = ref<ResMenu[]>([]) ...@@ -38,7 +38,6 @@ const tableData = ref<ResMenu[]>([])
const pagination = ref<PaginationProps>({ const pagination = ref<PaginationProps>({
current: 1, current: 1,
pageSize: 10, pageSize: 10,
size: 'small',
total: 0 total: 0
}) })
// 表格columns配置 // 表格columns配置
...@@ -51,7 +50,7 @@ const columns: PrimaryTableCol[] = [ ...@@ -51,7 +50,7 @@ const columns: PrimaryTableCol[] = [
width: 270, width: 270,
cell: (h, { row }: { row: any }) => { cell: (h, { row }: { row: any }) => {
return ( return (
<div class='text-[var(--td-brand-color)]'> <div>
<p>操作:{operateTypeTxt(row.operateType)}</p> <p>操作:{operateTypeTxt(row.operateType)}</p>
<p>菜单名称:{row.menuName}</p> <p>菜单名称:{row.menuName}</p>
<p>路由名称:{row.router}</p> <p>路由名称:{row.router}</p>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-11 09:38:40 * @Date: 2024-11-11 09:38:40
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 15:20:00 * @LastEditTime: 2024-12-10 17:53:27
* @Description: 版本管理 * @Description: 版本管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -96,7 +96,7 @@ onMounted(() => { ...@@ -96,7 +96,7 @@ onMounted(() => {
title: '版本管理' title: '版本管理'
} }
]) ])
// getData() getData()
}) })
// 搜索参数类型 // 搜索参数类型
const filterConditions = ref<filterItemProp[]>([ const filterConditions = ref<filterItemProp[]>([
...@@ -198,7 +198,7 @@ const handleStatus = (row: ResVersion, status: number) => { ...@@ -198,7 +198,7 @@ const handleStatus = (row: ResVersion, status: number) => {
// 请求成功后,销毁弹框 // 请求成功后,销毁弹框
dialog.update({ confirmBtn: { content: '确定', loading: true } }) dialog.update({ confirmBtn: { content: '确定', loading: true } })
postVersionEditStatus({ postVersionEditStatus({
versionId: row?.versionId as number, versionId: row?.versionId as string,
status: status == 6 ? 3 : 2 status: status == 6 ? 3 : 2
}) })
.then(() => { .then(() => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-28 15:01:02 * @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 15:20:22 * @LastEditTime: 2024-12-10 17:52:13
* @Description: 角色管理 * @Description: 角色管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -76,7 +76,7 @@ onMounted(() => { ...@@ -76,7 +76,7 @@ onMounted(() => {
name: 'role' name: 'role'
} }
]) ])
// getData() getData()
}) })
// 加载状态 // 加载状态
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: xiejiang * @Author: xiejiang
* @Date: 2024-11-28 15:01:02 * @Date: 2024-11-28 15:01:02
* @LastEditors: xiejiang * @LastEditors: xiejiang
* @LastEditTime: 2024-12-10 15:25:28 * @LastEditTime: 2024-12-10 17:52:05
* @Description: 用户管理 * @Description: 用户管理
* Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved. * Copyright(c)2024 by 好老师教育科技有限公司 All right Reserved.
--> -->
...@@ -78,7 +78,7 @@ onMounted(() => { ...@@ -78,7 +78,7 @@ onMounted(() => {
title: '用户管理' title: '用户管理'
} }
]) ])
// getData() getData()
}) })
// 加载状态 // 加载状态
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论