Compare commits
4 Commits
6ddd4a92cb
...
master
Author | SHA1 | Date | |
---|---|---|---|
73f11746ca | |||
![]() |
5d3ea6728a | ||
![]() |
5709cc6822 | ||
e01151d244 |
@@ -87,7 +87,10 @@ export const importUserTemplate = () => {
|
||||
export const importUserTemplateStu = () => {
|
||||
return request.download({ url: '/system/user/get-import-template-stu' })
|
||||
}
|
||||
|
||||
// 下载教师导入模板
|
||||
export const importUserTemplateTeacher = () => {
|
||||
return request.download({ url: '/system/user/get-import-template-teacher' })
|
||||
}
|
||||
// 用户密码重置
|
||||
export const resetUserPassword = (id: number, password: string) => {
|
||||
const data = {
|
||||
|
@@ -53,7 +53,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const formLoading = ref(false) // 表单的加载中
|
||||
const uploadRef = ref()
|
||||
const importUrl =
|
||||
import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/system/student/import'
|
||||
import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/system/user/importTeacher'
|
||||
const uploadHeaders = ref() // 上传 Header 头
|
||||
const fileList = ref([]) // 文件列表
|
||||
const updateSupport = ref(0) // 是否更新已经存在的用户数据
|
||||
@@ -132,7 +132,7 @@ const handleExceed = (): void => {
|
||||
|
||||
/** 下载模板操作 */
|
||||
const importTemplate = async () => {
|
||||
const res = await UserApi.importUserTemplate()
|
||||
download.excel(res, '用户导入模版.xls')
|
||||
const res = await UserApi.importUserTemplateTeacher()
|
||||
download.excel(res, '教师导入模版.xls')
|
||||
}
|
||||
</script>
|
||||
|
@@ -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