Merge pull request '【修改】试卷白名单参数' (#4) from hyc into master

Reviewed-on: #4
This commit is contained in:
hyc
2025-10-19 23:07:18 +08:00
6 changed files with 247 additions and 6 deletions

View File

@@ -347,6 +347,27 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<!-- 软件白名单 -->
<div style="margin-top: 20px" >
<h4>软件白名单</h4>
<el-input
v-model="newWhiteItem"
placeholder="请输入允许的软件名称"
style="width: 300px; margin-right: 10px"
/>
<el-button type="success" @click="addWhiteItem" class="block" @blur.capture="handleFormChange">添加</el-button>
<el-table :data="form.whiteList" style="width: 100%; margin-top: 10px">
<el-table-column prop="name" label="软件名称" align="center" />
<el-table-column label="操作" align="center" width="100px">
<template #default="scope">
<el-button type="primary" link @click="removeWhiteItem(scope.row)">
<Icon icon="ep:delete" />删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@@ -360,6 +381,25 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue' import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app' import * as AppApi from '@/api/exam/app'
import { time } from 'console' 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({ const props = defineProps({
taskId: { taskId: {
@@ -391,7 +431,8 @@ const form = ref({
warn: '', warn: '',
isScore: '', isScore: '',
isScoreDetail: '', isScoreDetail: '',
isDelete: '' isDelete: '',
whiteList: [] as WhiteItem[], // 明确类型
}) })
const tableData = ref([]) // 列表的数 const tableData = ref([]) // 列表的数
const showAdd = ref(false) const showAdd = ref(false)

View File

@@ -346,6 +346,27 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
<!-- 软件白名单 -->
<div style="margin-top: 20px" >
<h4>软件白名单</h4>
<el-input
v-model="newWhiteItem"
placeholder="请输入允许的软件名称"
style="width: 300px; margin-right: 10px"
/>
<el-button type="success" @click="addWhiteItem" class="block" @blur.capture="handleFormChange">添加</el-button>
<el-table :data="form.whiteList" style="width: 100%; margin-top: 10px">
<el-table-column prop="name" label="软件名称" align="center" />
<el-table-column label="操作" align="center" width="100px">
<template #default="scope">
<el-button type="primary" link @click="removeWhiteItem(scope.row)">
<Icon icon="ep:delete" />删除
</el-button>
</template>
</el-table-column>
</el-table>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@@ -360,7 +381,25 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue' import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app' import * as AppApi from '@/api/exam/app'
import { time } from 'console' 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({ const props = defineProps({
taskId: { taskId: {
type: String, type: String,
@@ -391,7 +430,8 @@ const form = ref({
warn: '', warn: '',
isScore: '', isScore: '',
isScoreDetail: '', isScoreDetail: '',
isDelete: '' isDelete: '',
whiteList: [] as WhiteItem[], // 明确类型
}) })
const tableData = ref([]) // 列表的数 const tableData = ref([]) // 列表的数
const showAdd = ref(false) const showAdd = ref(false)

View File

@@ -346,6 +346,27 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
<!-- 软件白名单 -->
<div style="margin-top: 20px" >
<h4>软件白名单</h4>
<el-input
v-model="newWhiteItem"
placeholder="请输入允许的软件名称"
style="width: 300px; margin-right: 10px"
/>
<el-button type="success" @click="addWhiteItem" class="block" @blur.capture="handleFormChange">添加</el-button>
<el-table :data="form.whiteList" style="width: 100%; margin-top: 10px">
<el-table-column prop="name" label="软件名称" align="center" />
<el-table-column label="操作" align="center" width="100px">
<template #default="scope">
<el-button type="primary" link @click="removeWhiteItem(scope.row)">
<Icon icon="ep:delete" />删除
</el-button>
</template>
</el-table-column>
</el-table>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@@ -360,7 +381,25 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue' import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app' import * as AppApi from '@/api/exam/app'
import { time } from 'console' 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({ const props = defineProps({
taskId: { taskId: {
type: String, type: String,
@@ -391,7 +430,8 @@ const form = ref({
warn: '', warn: '',
isScore: '', isScore: '',
isScoreDetail: '', isScoreDetail: '',
isDelete: '' isDelete: '',
whiteList: [] as WhiteItem[], // 明确类型
}) })
const tableData = ref([]) // 列表的数 const tableData = ref([]) // 列表的数
const showAdd = ref(false) const showAdd = ref(false)

View File

@@ -347,6 +347,27 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<!-- 软件白名单 -->
<div style="margin-top: 20px" >
<h4>软件白名单</h4>
<el-input
v-model="newWhiteItem"
placeholder="请输入允许的软件名称"
style="width: 300px; margin-right: 10px"
/>
<el-button type="success" @click="addWhiteItem" class="block" @blur.capture="handleFormChange">添加</el-button>
<el-table :data="form.whiteList" style="width: 100%; margin-top: 10px">
<el-table-column prop="name" label="软件名称" align="center" />
<el-table-column label="操作" align="center" width="100px">
<template #default="scope">
<el-button type="primary" link @click="removeWhiteItem(scope.row)">
<Icon icon="ep:delete" />删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@@ -360,7 +381,25 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue' import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app' import * as AppApi from '@/api/exam/app'
import { time } from 'console' 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({ const props = defineProps({
taskId: { taskId: {
type: String, type: String,
@@ -391,7 +430,8 @@ const form = ref({
warn: '', warn: '',
isScore: '', isScore: '',
isScoreDetail: '', isScoreDetail: '',
isDelete: '' isDelete: '',
whiteList: [] as WhiteItem[], // 明确类型
}) })
const tableData = ref([]) // 列表的数 const tableData = ref([]) // 列表的数
const showAdd = ref(false) const showAdd = ref(false)

View File

@@ -347,6 +347,27 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<!-- 软件白名单 -->
<div style="margin-top: 20px" >
<h4>软件白名单</h4>
<el-input
v-model="newWhiteItem"
placeholder="请输入允许的软件名称"
style="width: 300px; margin-right: 10px"
/>
<el-button type="success" @click="addWhiteItem" class="block" @blur.capture="handleFormChange">添加</el-button>
<el-table :data="form.whiteList" style="width: 100%; margin-top: 10px">
<el-table-column prop="name" label="软件名称" align="center" />
<el-table-column label="操作" align="center" width="100px">
<template #default="scope">
<el-button type="primary" link @click="removeWhiteItem(scope.row)">
<Icon icon="ep:delete" />删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@@ -360,7 +381,25 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue' import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app' import * as AppApi from '@/api/exam/app'
import { time } from 'console' 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({ const props = defineProps({
taskId: { taskId: {
type: String, type: String,
@@ -391,7 +430,8 @@ const form = ref({
warn: '', warn: '',
isScore: '', isScore: '',
isScoreDetail: '', isScoreDetail: '',
isDelete: '' isDelete: '',
whiteList: [] as WhiteItem[], // 明确类型
}) })
const tableData = ref([]) // 列表的数 const tableData = ref([]) // 列表的数
const showAdd = ref(false) const showAdd = ref(false)

View File

@@ -347,6 +347,27 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<!-- 软件白名单 -->
<div style="margin-top: 20px" >
<h4>软件白名单</h4>
<el-input
v-model="newWhiteItem"
placeholder="请输入允许的软件名称"
style="width: 300px; margin-right: 10px"
/>
<el-button type="success" @click="addWhiteItem" class="block" @blur.capture="handleFormChange">添加</el-button>
<el-table :data="form.whiteList" style="width: 100%; margin-top: 10px">
<el-table-column prop="name" label="软件名称" align="center" />
<el-table-column label="操作" align="center" width="100px">
<template #default="scope">
<el-button type="primary" link @click="removeWhiteItem(scope.row)">
<Icon icon="ep:delete" />删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@@ -360,7 +381,25 @@ import { CommonStatusEnum } from '@/utils/constants'
import AppAdd from './components/app-add.vue' import AppAdd from './components/app-add.vue'
import * as AppApi from '@/api/exam/app' import * as AppApi from '@/api/exam/app'
import { time } from 'console' 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({ const props = defineProps({
taskId: { taskId: {
type: String, type: String,
@@ -391,7 +430,8 @@ const form = ref({
warn: '', warn: '',
isScore: '', isScore: '',
isScoreDetail: '', isScoreDetail: '',
isDelete: '' isDelete: '',
whiteList: [] as WhiteItem[], // 明确类型
}) })
const tableData = ref([]) // 列表的数 const tableData = ref([]) // 列表的数
const showAdd = ref(false) const showAdd = ref(false)