From e225586dbc5e861822883293cd4d040858e252b7 Mon Sep 17 00:00:00 2001
From: huababa1 <2037205722@qq.com>
Date: Tue, 21 Oct 2025 11:33:40 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E7=99=BD?=
=?UTF-8?q?=E5=90=8D=E5=8D=95=E5=8F=82=E6=95=B0=E7=A7=BB=E5=88=B0=E7=B3=BB?=
=?UTF-8?q?=E7=BB=9F=E7=AE=A1=E7=90=86=E4=B8=8B=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/whiteList/index.ts | 30 +++++
src/views/system/role/index.vue | 3 -
src/views/system/tenant/index.vue | 2 +-
src/views/system/white/index.vue | 125 ++++++++++++++++++
.../exam/components/steps/step3/index.vue | 43 +-----
.../components/steps/step3/index.vue | 42 +-----
.../module/components/steps/step3/index.vue | 42 +-----
.../random/components/steps/step3/index.vue | 42 +-----
.../sprint/components/steps/step3/index.vue | 42 +-----
.../trans/components/steps/step3/index.vue | 43 +-----
10 files changed, 162 insertions(+), 252 deletions(-)
create mode 100644 src/api/system/whiteList/index.ts
create mode 100644 src/views/system/white/index.vue
diff --git a/src/api/system/whiteList/index.ts b/src/api/system/whiteList/index.ts
new file mode 100644
index 0000000..a515a69
--- /dev/null
+++ b/src/api/system/whiteList/index.ts
@@ -0,0 +1,30 @@
+import request from '@/config/axios'
+export interface WhiteVO {
+ name: string
+
+}
+
+// 获取白名单列表
+export const getAppWhiteListCenter = (params:WhiteVO) => {
+ return request.get({ url: '/exam/white/getAppWhiteListCenter',params })
+}
+
+// 新增
+export const addAppWhite = (data) => {
+ return request.post({ url: '/exam/white/addAppWhite', data })
+}
+
+// 修改
+export const updateAppWhite = (data) => {
+ return request.put({ url: '/exam/white/updateAppWhite', data })
+}
+
+// 删除
+export const delWhite = (id) => {
+ return request.delete({ url: `/exam/white/delWhite/${id}` })
+}
+
+// 获取详情
+export const getWhite = (id) => {
+ return request.get({ url: '/exam/white/getWhite', params: { id } })
+}
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index abfee01..90ce241 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -110,7 +110,6 @@
-->
-
+
中心服务器
diff --git a/src/views/system/white/index.vue b/src/views/system/white/index.vue
new file mode 100644
index 0000000..b8f881d
--- /dev/null
+++ b/src/views/system/white/index.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+ 搜索
+
+
+ 重置
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
\ No newline at end of file
diff --git a/src/views/task/exam/components/steps/step3/index.vue b/src/views/task/exam/components/steps/step3/index.vue
index f897ca8..3d42899 100644
--- a/src/views/task/exam/components/steps/step3/index.vue
+++ b/src/views/task/exam/components/steps/step3/index.vue
@@ -347,27 +347,6 @@
-
-
-
软件白名单
-
- 添加
-
-
-
-
-
-
- 删除
-
-
-
-
-
@@ -381,25 +360,6 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app'
import { time } from 'console'
-// 白名单数据
-interface WhiteItem {
- name: string;
-}
-const newWhiteItem = ref('')
-
-const addWhiteItem = () => {
- const name = newWhiteItem.value.trim()
- if (!name) return
- if (form.value.whiteList.some(item => item.name === name)) return // 防止重复
- form.value.whiteList.push({ name })
- newWhiteItem.value = ''
- handleFormChange();
-}
-
-const removeWhiteItem = (row) => {
- form.value.whiteList = form.value.whiteList.filter(item => item.name !== row.name)
- handleFormChange();
-}
const props = defineProps({
taskId: {
@@ -431,8 +391,7 @@ const form = ref({
warn: '',
isScore: '',
isScoreDetail: '',
- isDelete: '',
- whiteList: [] as WhiteItem[], // 明确类型
+ isDelete: ''
})
const tableData = ref([]) // 列表的数
const showAdd = ref(false)
diff --git a/src/views/task/selftrans/collegeexam/components/steps/step3/index.vue b/src/views/task/selftrans/collegeexam/components/steps/step3/index.vue
index ef4d05b..3d42899 100644
--- a/src/views/task/selftrans/collegeexam/components/steps/step3/index.vue
+++ b/src/views/task/selftrans/collegeexam/components/steps/step3/index.vue
@@ -346,27 +346,6 @@
-
-
-
-
软件白名单
-
- 添加
-
-
-
-
-
-
- 删除
-
-
-
-
@@ -381,25 +360,7 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app'
import { time } from 'console'
-// 白名单数据
-interface WhiteItem {
- name: string;
-}
-const newWhiteItem = ref('')
-const addWhiteItem = () => {
- const name = newWhiteItem.value.trim()
- if (!name) return
- if (form.value.whiteList.some(item => item.name === name)) return // 防止重复
- form.value.whiteList.push({ name })
- newWhiteItem.value = ''
- handleFormChange();
-}
-
-const removeWhiteItem = (row) => {
- form.value.whiteList = form.value.whiteList.filter(item => item.name !== row.name)
- handleFormChange();
-}
const props = defineProps({
taskId: {
type: String,
@@ -430,8 +391,7 @@ const form = ref({
warn: '',
isScore: '',
isScoreDetail: '',
- isDelete: '',
- whiteList: [] as WhiteItem[], // 明确类型
+ isDelete: ''
})
const tableData = ref([]) // 列表的数
const showAdd = ref(false)
diff --git a/src/views/task/selftrans/module/components/steps/step3/index.vue b/src/views/task/selftrans/module/components/steps/step3/index.vue
index ef4d05b..3d42899 100644
--- a/src/views/task/selftrans/module/components/steps/step3/index.vue
+++ b/src/views/task/selftrans/module/components/steps/step3/index.vue
@@ -346,27 +346,6 @@
-
-
-
-
软件白名单
-
- 添加
-
-
-
-
-
-
- 删除
-
-
-
-
@@ -381,25 +360,7 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app'
import { time } from 'console'
-// 白名单数据
-interface WhiteItem {
- name: string;
-}
-const newWhiteItem = ref('')
-const addWhiteItem = () => {
- const name = newWhiteItem.value.trim()
- if (!name) return
- if (form.value.whiteList.some(item => item.name === name)) return // 防止重复
- form.value.whiteList.push({ name })
- newWhiteItem.value = ''
- handleFormChange();
-}
-
-const removeWhiteItem = (row) => {
- form.value.whiteList = form.value.whiteList.filter(item => item.name !== row.name)
- handleFormChange();
-}
const props = defineProps({
taskId: {
type: String,
@@ -430,8 +391,7 @@ const form = ref({
warn: '',
isScore: '',
isScoreDetail: '',
- isDelete: '',
- whiteList: [] as WhiteItem[], // 明确类型
+ isDelete: ''
})
const tableData = ref([]) // 列表的数
const showAdd = ref(false)
diff --git a/src/views/task/selftrans/random/components/steps/step3/index.vue b/src/views/task/selftrans/random/components/steps/step3/index.vue
index 782c0ae..3d42899 100644
--- a/src/views/task/selftrans/random/components/steps/step3/index.vue
+++ b/src/views/task/selftrans/random/components/steps/step3/index.vue
@@ -347,27 +347,6 @@
-
-
-
软件白名单
-
- 添加
-
-
-
-
-
-
- 删除
-
-
-
-
-
@@ -381,25 +360,7 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app'
import { time } from 'console'
-// 白名单数据
-interface WhiteItem {
- name: string;
-}
-const newWhiteItem = ref('')
-const addWhiteItem = () => {
- const name = newWhiteItem.value.trim()
- if (!name) return
- if (form.value.whiteList.some(item => item.name === name)) return // 防止重复
- form.value.whiteList.push({ name })
- newWhiteItem.value = ''
- handleFormChange();
-}
-
-const removeWhiteItem = (row) => {
- form.value.whiteList = form.value.whiteList.filter(item => item.name !== row.name)
- handleFormChange();
-}
const props = defineProps({
taskId: {
type: String,
@@ -430,8 +391,7 @@ const form = ref({
warn: '',
isScore: '',
isScoreDetail: '',
- isDelete: '',
- whiteList: [] as WhiteItem[], // 明确类型
+ isDelete: ''
})
const tableData = ref([]) // 列表的数
const showAdd = ref(false)
diff --git a/src/views/task/sprint/components/steps/step3/index.vue b/src/views/task/sprint/components/steps/step3/index.vue
index def62eb..3d42899 100644
--- a/src/views/task/sprint/components/steps/step3/index.vue
+++ b/src/views/task/sprint/components/steps/step3/index.vue
@@ -347,27 +347,6 @@
-
-
-
软件白名单
-
- 添加
-
-
-
-
-
-
- 删除
-
-
-
-
-
@@ -381,25 +360,7 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app'
import { time } from 'console'
-// 白名单数据
-interface WhiteItem {
- name: string;
-}
-const newWhiteItem = ref('')
-const addWhiteItem = () => {
- const name = newWhiteItem.value.trim()
- if (!name) return
- if (form.value.whiteList.some(item => item.name === name)) return // 防止重复
- form.value.whiteList.push({ name })
- newWhiteItem.value = ''
- handleFormChange();
-}
-
-const removeWhiteItem = (row) => {
- form.value.whiteList = form.value.whiteList.filter(item => item.name !== row.name)
- handleFormChange();
-}
const props = defineProps({
taskId: {
type: String,
@@ -430,8 +391,7 @@ const form = ref({
warn: '',
isScore: '',
isScoreDetail: '',
- isDelete: '',
- whiteList: [] as WhiteItem[], // 明确类型
+ isDelete: ''
})
const tableData = ref([]) // 列表的数
const showAdd = ref(false)
diff --git a/src/views/task/trans/components/steps/step3/index.vue b/src/views/task/trans/components/steps/step3/index.vue
index 782c0ae..eaaa673 100644
--- a/src/views/task/trans/components/steps/step3/index.vue
+++ b/src/views/task/trans/components/steps/step3/index.vue
@@ -347,27 +347,6 @@
-
-
-
软件白名单
-
- 添加
-
-
-
-
-
-
- 删除
-
-
-
-
-
@@ -381,25 +360,6 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app'
import { time } from 'console'
-// 白名单数据
-interface WhiteItem {
- name: string;
-}
-const newWhiteItem = ref('')
-
-const addWhiteItem = () => {
- const name = newWhiteItem.value.trim()
- if (!name) return
- if (form.value.whiteList.some(item => item.name === name)) return // 防止重复
- form.value.whiteList.push({ name })
- newWhiteItem.value = ''
- handleFormChange();
-}
-
-const removeWhiteItem = (row) => {
- form.value.whiteList = form.value.whiteList.filter(item => item.name !== row.name)
- handleFormChange();
-}
const props = defineProps({
taskId: {
type: String,
@@ -430,8 +390,7 @@ const form = ref({
warn: '',
isScore: '',
isScoreDetail: '',
- isDelete: '',
- whiteList: [] as WhiteItem[], // 明确类型
+ isDelete: ''
})
const tableData = ref([]) // 列表的数
const showAdd = ref(false)