【修改】试卷白名单参数
This commit is contained in:
@@ -346,6 +346,27 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -360,6 +381,25 @@ 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: {
|
||||
@@ -391,7 +431,8 @@ const form = ref({
|
||||
warn: '',
|
||||
isScore: '',
|
||||
isScoreDetail: '',
|
||||
isDelete: ''
|
||||
isDelete: '',
|
||||
whiteList: [] as WhiteItem[], // 明确类型
|
||||
})
|
||||
const tableData = ref([]) // 列表的数
|
||||
const showAdd = ref(false)
|
||||
|
@@ -346,6 +346,27 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -360,7 +381,25 @@ 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,
|
||||
@@ -391,7 +430,8 @@ const form = ref({
|
||||
warn: '',
|
||||
isScore: '',
|
||||
isScoreDetail: '',
|
||||
isDelete: ''
|
||||
isDelete: '',
|
||||
whiteList: [] as WhiteItem[], // 明确类型
|
||||
})
|
||||
const tableData = ref([]) // 列表的数
|
||||
const showAdd = ref(false)
|
||||
|
@@ -346,6 +346,27 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -360,7 +381,25 @@ 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,
|
||||
@@ -391,7 +430,8 @@ const form = ref({
|
||||
warn: '',
|
||||
isScore: '',
|
||||
isScoreDetail: '',
|
||||
isDelete: ''
|
||||
isDelete: '',
|
||||
whiteList: [] as WhiteItem[], // 明确类型
|
||||
})
|
||||
const tableData = ref([]) // 列表的数
|
||||
const showAdd = ref(false)
|
||||
|
@@ -346,6 +346,27 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -360,7 +381,25 @@ 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,
|
||||
@@ -391,7 +430,8 @@ const form = ref({
|
||||
warn: '',
|
||||
isScore: '',
|
||||
isScoreDetail: '',
|
||||
isDelete: ''
|
||||
isDelete: '',
|
||||
whiteList: [] as WhiteItem[], // 明确类型
|
||||
})
|
||||
const tableData = ref([]) // 列表的数
|
||||
const showAdd = ref(false)
|
||||
|
@@ -346,6 +346,27 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -360,7 +381,25 @@ 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,
|
||||
@@ -391,7 +430,8 @@ const form = ref({
|
||||
warn: '',
|
||||
isScore: '',
|
||||
isScoreDetail: '',
|
||||
isDelete: ''
|
||||
isDelete: '',
|
||||
whiteList: [] as WhiteItem[], // 明确类型
|
||||
})
|
||||
const tableData = ref([]) // 列表的数
|
||||
const showAdd = ref(false)
|
||||
|
@@ -346,6 +346,27 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -360,7 +381,25 @@ 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,
|
||||
@@ -391,7 +430,8 @@ const form = ref({
|
||||
warn: '',
|
||||
isScore: '',
|
||||
isScoreDetail: '',
|
||||
isDelete: ''
|
||||
isDelete: '',
|
||||
whiteList: [] as WhiteItem[], // 明确类型
|
||||
})
|
||||
const tableData = ref([]) // 列表的数
|
||||
const showAdd = ref(false)
|
||||
|
Reference in New Issue
Block a user