From 55383cf501cf8809db65883aede38b997fac18d6 Mon Sep 17 00:00:00 2001
From: sjl <1716605279@qq.com>
Date: Wed, 20 Nov 2024 15:13:50 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/directives/modules/auth.ts | 2 +
.../src/layouts/components/Footer/index.vue | 4 +-
frontend/src/routers/index.ts | 1 +
frontend/src/views/analyse/index.vue | 13 -----
.../resource/components/resourcePopup.vue | 2 +
.../src/views/authority/resource/index.vue | 4 +-
.../authority/role/components/rolePopup.vue | 2 +
.../role/components/roleResourcePopup.vue | 13 +++--
.../user/components/passWordPopup.vue | 2 +
.../authority/user/components/userPopup.vue | 2 +
frontend/src/views/authority/user/index.vue | 4 +-
frontend/src/views/home/index.vue | 7 ++-
frontend/src/views/home/tabs/model.vue | 4 +-
.../machine/device/components/devicePopup.vue | 2 +
.../src/views/machine/testScript/index.vue | 6 +--
.../src/views/plan/singlePlanList/index.vue | 2 +-
.../dictData/components/dataPopup.vue | 2 +
.../dictionary/dictPq/components/pqPopup.vue | 2 +
.../dictTree/components/treePopup.vue | 2 +
.../dictType/components/typePopup.vue | 2 +
.../views/system/versionRegister/index.vue | 52 +++++++++----------
21 files changed, 74 insertions(+), 56 deletions(-)
delete mode 100644 frontend/src/views/analyse/index.vue
diff --git a/frontend/src/directives/modules/auth.ts b/frontend/src/directives/modules/auth.ts
index 8745f7b..3872e4b 100644
--- a/frontend/src/directives/modules/auth.ts
+++ b/frontend/src/directives/modules/auth.ts
@@ -10,6 +10,8 @@ const auth: Directive = {
const { value } = binding
const authStore = useAuthStore()
const currentPageRoles = authStore.authButtonListGet[authStore.routeName] ?? []
+ console.log('1234',authStore.routeName)
+ console.log('123',currentPageRoles)
if (value instanceof Array && value.length) {
const hasPermission = value.every(item => currentPageRoles.includes(item))
if (!hasPermission) el.remove()
diff --git a/frontend/src/layouts/components/Footer/index.vue b/frontend/src/layouts/components/Footer/index.vue
index 6467635..a76ca37 100644
--- a/frontend/src/layouts/components/Footer/index.vue
+++ b/frontend/src/layouts/components/Footer/index.vue
@@ -24,8 +24,8 @@
数字式模块
- 对比式模块比对式模块
diff --git a/frontend/src/routers/index.ts b/frontend/src/routers/index.ts
index b57af3a..eb3a989 100644
--- a/frontend/src/routers/index.ts
+++ b/frontend/src/routers/index.ts
@@ -69,6 +69,7 @@ router.beforeEach(async (to, from, next) => {
await initDynamicRouter()
return next({ ...to, replace: true })
}
+ console.log(to)
// 7.存储 routerName 做按钮权限筛选
authStore.setRouteName(to.name as string)
diff --git a/frontend/src/views/analyse/index.vue b/frontend/src/views/analyse/index.vue
deleted file mode 100644
index 8e8347f..0000000
--- a/frontend/src/views/analyse/index.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/frontend/src/views/authority/resource/components/resourcePopup.vue b/frontend/src/views/authority/resource/components/resourcePopup.vue
index d70780b..2a48c80 100644
--- a/frontend/src/views/authority/resource/components/resourcePopup.vue
+++ b/frontend/src/views/authority/resource/components/resourcePopup.vue
@@ -192,6 +192,8 @@ const displayPid = computed({
// 打开弹窗,可能是新增,也可能是编辑
const open = async (sign: string, data: Function.ResFunction) => {
+ // 重置表单
+ dialogFormRef.value?.resetFields()
const response = await getFunctionListNoButton()
functionList.value = response.data as unknown as Function.ResFunction[]
titleType.value = sign
diff --git a/frontend/src/views/authority/resource/index.vue b/frontend/src/views/authority/resource/index.vue
index 0fe1e6d..8161315 100644
--- a/frontend/src/views/authority/resource/index.vue
+++ b/frontend/src/views/authority/resource/index.vue
@@ -53,7 +53,7 @@
{
prop: 'code',
label: '编码',
- minWidth: 100,
+ minWidth: 120,
},
{
prop: 'type',
@@ -75,7 +75,7 @@
{
prop: 'icon',
label: '图标',
- minWidth: 100,
+ minWidth: 80,
render: scope => {
const customIcons: { [key: string]: any } = Icons
const iconKey = scope.row.icon; //
diff --git a/frontend/src/views/authority/role/components/rolePopup.vue b/frontend/src/views/authority/role/components/rolePopup.vue
index 95f061b..86ee722 100644
--- a/frontend/src/views/authority/role/components/rolePopup.vue
+++ b/frontend/src/views/authority/role/components/rolePopup.vue
@@ -133,6 +133,8 @@ const close = () => {
// 打开弹窗,可能是新增,也可能是编辑
const open = async (sign: string, data: Role.RoleBO) => {
+ // 重置表单
+ dialogFormRef.value?.resetFields()
titleType.value = sign
dialogVisible.value = true
diff --git a/frontend/src/views/authority/role/components/roleResourcePopup.vue b/frontend/src/views/authority/role/components/roleResourcePopup.vue
index 2605152..74fc1f6 100644
--- a/frontend/src/views/authority/role/components/roleResourcePopup.vue
+++ b/frontend/src/views/authority/role/components/roleResourcePopup.vue
@@ -98,15 +98,20 @@ const close = () => {
dialogFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
if (formContent.value.id) {
- // 获取勾选的节点 ID
+ // 获取半选中的节点 ID
+ const halfCheckedKeys = treeRef.value?.getHalfCheckedKeys() || [];
+ // 获取全选中的节点 ID
const checkedKeys = treeRef.value?.getCheckedKeys() || [];
-
+ // 将两个数组合并
+ const allCheckedKeys = [...halfCheckedKeys, ...checkedKeys];
+
// 将 checkedKeys 转换为字符串数组
- const checkedKeysAsString: string[] = checkedKeys.map(key => String(key));
+ const checkedKeysAsString: string[] = allCheckedKeys.map(key => String(key));
// 假设 RoleFunctionId 是一个对象,且需要 id 属性
const roleFunctionIdObject: Role.RoleFunctionId = {
id: checkedKeysAsString
};
+
const result = await assignFunction(formContent.value,roleFunctionIdObject);
if(result.code != 'A0000'){
ElMessage.error({ message: result.message})
@@ -128,6 +133,8 @@ const close = () => {
// 打开弹窗,可能是新增,也可能是编辑
const open = async (sign: string, data: Role.RoleBO, AllFunction: Function.ResFunction[]) => {
+ // 重置表单
+ dialogFormRef.value?.resetFields()
// 重置树状结构
functionList.value = []
checkedKeysRef.value = []
diff --git a/frontend/src/views/authority/user/components/passWordPopup.vue b/frontend/src/views/authority/user/components/passWordPopup.vue
index 90cbda3..0dff840 100644
--- a/frontend/src/views/authority/user/components/passWordPopup.vue
+++ b/frontend/src/views/authority/user/components/passWordPopup.vue
@@ -121,6 +121,8 @@ const rules: Ref>> = ref({
// 打开弹窗是编辑
const open = async ( data: User.ResPassWordUser) => {
+ // 重置表单
+ dialogFormRef.value?.resetFields()
dialogVisible.value = true
if (data.id) {
formContent.value = { ...data }
diff --git a/frontend/src/views/authority/user/components/userPopup.vue b/frontend/src/views/authority/user/components/userPopup.vue
index 29959db..3804a81 100644
--- a/frontend/src/views/authority/user/components/userPopup.vue
+++ b/frontend/src/views/authority/user/components/userPopup.vue
@@ -151,6 +151,8 @@
// 打开弹窗,可能是新增,也可能是编辑
const open = async (sign: string, data: User.ResUser,roleParams: Role.RoleBO[]) => {
+ // 重置表单
+ dialogFormRef.value?.resetFields()
// 获取角色列表
roleList.value = roleParams
titleType.value = sign
diff --git a/frontend/src/views/authority/user/index.vue b/frontend/src/views/authority/user/index.vue
index 8092689..56bdddb 100644
--- a/frontend/src/views/authority/user/index.vue
+++ b/frontend/src/views/authority/user/index.vue
@@ -8,8 +8,8 @@
- 新增
- 新增
+
批量删除
diff --git a/frontend/src/views/home/index.vue b/frontend/src/views/home/index.vue
index 93a4ec4..f0b30bb 100644
--- a/frontend/src/views/home/index.vue
+++ b/frontend/src/views/home/index.vue
@@ -45,19 +45,22 @@ const router = useRouter();
const modeList = [
{
name: "模拟式模式",
+ code:"模拟式",
subName: "未启用模拟式检测计划",
img: "/src/assets/images/dashboard/1.svg",
isActive: true,
},
{
name: "数字式模式",
+ code:"数字式",
subName: "启用数字检测计划",
img: "/src/assets/images/dashboard/2.svg",
isActive: false,
},
{
- name: "对比式模式",
- subName: "启用对比式检测计划",
+ name: "比对式模式",
+ code:"比对式",
+ subName: "启用比对式检测计划",
img: "/src/assets/images/dashboard/3.svg",
isActive: false,
},
diff --git a/frontend/src/views/home/tabs/model.vue b/frontend/src/views/home/tabs/model.vue
index 782936d..8b98dc7 100644
--- a/frontend/src/views/home/tabs/model.vue
+++ b/frontend/src/views/home/tabs/model.vue
@@ -52,8 +52,8 @@ const modeList = [
isActive: false,
},
{
- name: "对比式模块",
- subName: "启用对比式检测计划",
+ name: "比对式模块",
+ subName: "启用比对式检测计划",
img: "/src/assets/images/dashboard/3.svg",
isActive: false,
},
diff --git a/frontend/src/views/machine/device/components/devicePopup.vue b/frontend/src/views/machine/device/components/devicePopup.vue
index 0a101f4..302019d 100644
--- a/frontend/src/views/machine/device/components/devicePopup.vue
+++ b/frontend/src/views/machine/device/components/devicePopup.vue
@@ -395,6 +395,8 @@ const disabledDate = (time: Date) => {
// 打开弹窗,可能是新增,也可能是编辑
const open = (sign: string, data: Device.ResPqDev) => {
+ // 重置表单
+ dialogFormRef.value?.resetFields()
titleType.value = sign
dialogVisible.value = true
diff --git a/frontend/src/views/machine/testScript/index.vue b/frontend/src/views/machine/testScript/index.vue
index 2275fd0..ce3b88f 100644
--- a/frontend/src/views/machine/testScript/index.vue
+++ b/frontend/src/views/machine/testScript/index.vue
@@ -8,8 +8,8 @@
- 新增
- 新增
+
批量删除
@@ -18,7 +18,7 @@
编辑
删除
- 升级
+ 升级
diff --git a/frontend/src/views/plan/singlePlanList/index.vue b/frontend/src/views/plan/singlePlanList/index.vue
index 17bd2d0..224b303 100644
--- a/frontend/src/views/plan/singlePlanList/index.vue
+++ b/frontend/src/views/plan/singlePlanList/index.vue
@@ -274,7 +274,7 @@ const columns = reactive[]>([
return scope.row.checkMode == 0
? "模拟式"
: scope.row.checkMode == 1
- ? "对比式"
+ ? "比对式"
: scope.row.checkMode == 2
? "数字式"
: scope.row.checkMode;
diff --git a/frontend/src/views/system/dictionary/dictData/components/dataPopup.vue b/frontend/src/views/system/dictionary/dictData/components/dataPopup.vue
index 9bba5b7..14a118b 100644
--- a/frontend/src/views/system/dictionary/dictData/components/dataPopup.vue
+++ b/frontend/src/views/system/dictionary/dictData/components/dataPopup.vue
@@ -96,6 +96,8 @@ const close = () => {
dialogFormRef.value?.resetFields()
}
const open = (sign: string, typeId: string, name: string, data: Dict.ResDictData) => {
+ // 重置表单
+ dialogFormRef.value?.resetFields()
resetFormContent()
titleType.value = sign
diff --git a/frontend/src/views/system/dictionary/dictPq/components/pqPopup.vue b/frontend/src/views/system/dictionary/dictPq/components/pqPopup.vue
index 962df62..3bf79cf 100644
--- a/frontend/src/views/system/dictionary/dictPq/components/pqPopup.vue
+++ b/frontend/src/views/system/dictionary/dictPq/components/pqPopup.vue
@@ -245,6 +245,8 @@
// 打开弹窗,可能是新增,也可能是编辑
const open = (sign: string, data: Dict.ResDictPq) => {
+ // 重置表单
+ dialogFormRef.value?.resetFields()
titleType.value = sign
dialogVisible.value = true
selectedStatMethods.value = data.statMethod ? data.statMethod.split(',') : []
diff --git a/frontend/src/views/system/dictionary/dictTree/components/treePopup.vue b/frontend/src/views/system/dictionary/dictTree/components/treePopup.vue
index 42491ab..13f8751 100644
--- a/frontend/src/views/system/dictionary/dictTree/components/treePopup.vue
+++ b/frontend/src/views/system/dictionary/dictTree/components/treePopup.vue
@@ -117,6 +117,8 @@
// 打开弹窗,可能是新增,也可能是编辑
const open = (sign: string, data: Dict.ResDictTree) => {
+ // 重置表单
+ dialogFormRef.value?.resetFields()
titleType.value = sign
dialogVisible.value = true
if (data.id) {
diff --git a/frontend/src/views/system/dictionary/dictType/components/typePopup.vue b/frontend/src/views/system/dictionary/dictType/components/typePopup.vue
index 1941bc8..6635ffb 100644
--- a/frontend/src/views/system/dictionary/dictType/components/typePopup.vue
+++ b/frontend/src/views/system/dictionary/dictType/components/typePopup.vue
@@ -124,6 +124,8 @@ const save = () => {
// 打开弹窗,可能是新增,也可能是编辑
const open = (sign: string, data: Dict.ResDictType) => {
+ // 重置表单
+ dialogFormRef.value?.resetFields()
titleType.value = sign
dialogVisible.value = true
if (data.id) {
diff --git a/frontend/src/views/system/versionRegister/index.vue b/frontend/src/views/system/versionRegister/index.vue
index 99c39be..c763cae 100644
--- a/frontend/src/views/system/versionRegister/index.vue
+++ b/frontend/src/views/system/versionRegister/index.vue
@@ -1,23 +1,23 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -30,20 +30,20 @@