This commit is contained in:
Li xia 2025-01-09 09:36:08 +08:00
parent 6e46c063b9
commit f45bdcdde6
9 changed files with 43 additions and 48 deletions

BIN
test_client/dist.zip Normal file

Binary file not shown.

View File

@ -96,8 +96,6 @@ export const asyncRoutes = [
}
]
},
// youpei 是只针对地坪项目新建的菜单
{
path: '/youpei',
@ -175,7 +173,7 @@ export const asyncRoutes = [
component: Layout,
redirect: '/Qmanage/question',
name: 'Qmanage',
meta: { title: '题库管理', icon: 'table' },
meta: { title: '题库管理', icon: 'table', perms: ['qmanage'] },
children: [
{
path: 'subject',
@ -216,7 +214,7 @@ export const asyncRoutes = [
component: Layout,
redirect: '/sjmanage/workscope',
name: 'Sjmanage',
meta: { title: '出卷管理', icon: 'component', perms: [] },
meta: { title: '出卷管理', icon: 'component', perms: ['workscope'] },
children: [
{
path: 'testrule',
@ -285,7 +283,7 @@ export const asyncRoutes = [
component: Layout,
redirect: '/exammanage/index',
name: 'Exammanage',
meta: { title: '考证管理', icon: 'component' },
meta: { title: '考证管理', icon: 'component', perms: ['exammanage'] },
children: [
{
path: 'index',
@ -306,7 +304,7 @@ export const asyncRoutes = [
component: Layout,
redirect: '/threshold/source',
name: 'Threshold',
meta: { title: '阈值库', icon: 'component', perms: ['threshold_view']},
meta: { title: '阈值库', icon: 'component', perms: ['threshold_view'] },
children: [
{
path: 'source',
@ -364,7 +362,7 @@ export const asyncRoutes = [
component: Layout,
redirect: '/system/admin',
name: 'System',
meta: { title: '系统管理', icon: 'tree', perms: [] },
meta: { title: '系统管理', icon: 'tree', perms: ['system_admin'] },
children: [
{
path: 'banner',
@ -404,14 +402,14 @@ export const asyncRoutes = [
component: Layout,
redirect: '/changepassword',
name: 'ChangePW',
meta: { title: '修改密码', icon: 'tree' },
meta: { title: '修改密码', icon: 'tree', perms: ['change_password'] },
hidden: true,
children: [
{
path: '',
name: 'ChangePassword',
component: () => import('@/views/system/changepassword'),
meta: { title: '修改密码', noCache: true, icon: '' },
meta: { title: '修改密码', noCache: true, icon: '', perms: ['change_password'] },
hidden: true
}
]

View File

@ -49,11 +49,11 @@ const actions = {
generateRoutes({ commit }, perms) {
return new Promise(resolve => {
let accessedRoutes
if (perms.includes('admin')) {
accessedRoutes = asyncRoutes || []
} else {
// if (perms.includes('admin')) {
// accessedRoutes = asyncRoutes || []
// } else {
accessedRoutes = filterAsyncRoutes(asyncRoutes, perms)
}
// }
commit('SET_ROUTES', accessedRoutes)
resolve(accessedRoutes)
})

View File

@ -1,6 +1,7 @@
<template>
<div class="app-container">
<div style="margin-top:10px">
<!--
<el-select
v-model="listQuery.is_pass"
placeholder="是否通过"
@ -30,7 +31,7 @@
:label="item.label"
:value="item.value"
/>
</el-select>
</el-select> -->
<el-date-picker
v-model="value"
type="daterange"

View File

@ -346,20 +346,7 @@
<el-input v-model="consumer.ID_number1" placeholder="身份证号" />
</el-form-item>
<el-form-item label="头像" prop="avatar">
<el-upload
class="avatar-uploader"
:action="upUrl"
accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
:headers="upHeaders"
>
<img v-if="consumer.avatar" :src="consumer.avatar" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon" />
</el-upload>
</el-form-item>
</el-form>
<div style="text-align:right;">
<el-button type="danger" @click="dialogVisible=false">取消</el-button>
@ -537,16 +524,7 @@ export default {
},
methods: {
checkPermission,
handleAvatarSuccess(res, file) {
this.consumer.avatar = res.data.path
},
beforeAvatarUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 2
if (!isLt2M) {
this.$message.error('上传图片大小不能超过 2MB!')
}
return isLt2M
},
handleUploadSuccess(res, file) {
if (res.code == 200) {
const loading = this.$loading({ text: '正在导入中...' })

View File

@ -279,11 +279,11 @@ this.$confirm("确认删除该考试记录吗?将丢失数据!", "警告", {
}else{
this.listQuery.ordering = '-' + val.prop
}
this.getList()
},
}
};
</script>

View File

@ -1,6 +1,6 @@
<template>
<el-container>
<el-header>
<el-header style="height: 90px;">
<div style="margin-top: 10px;">
<el-input
v-model="listQuery.search"
@ -18,16 +18,17 @@
@click="resetFilter"
>刷新重置</el-button>
</div>
<div style="margin-top:10px">
<div style="margin-top: 10px;" >
<el-button type="primary" icon="el-icon-plus" @click="handleCreate('文档')">文档</el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate('视频')">视频</el-button>
</div>
</el-header>
<el-main>
<el-table
v-loading="listLoading"
:data="materialList.results"
style="width: 100%;margin-top:30px;"
style="width: 100%;"
border
max-height="600"
>

View File

@ -28,7 +28,7 @@
<el-input v-model="Form.elink" style="width: 80%" />
</el-form-item>
<el-form-item v-show="is_show" label="内容" prop="content">
<el-form-item label="内容" prop="content">
<tinymce v-model="Form.content" :height="400" width="80%" />
</el-form-item>
<el-form-item>

View File

@ -37,14 +37,12 @@
type="primary"
size="small"
icon="el-icon-edit"
:disabled="!checkPermission(['article_update'])"
@click="handleEdit(scope)"
/>
<el-button
type="danger"
size="small"
icon="el-icon-delete"
:disabled="!checkPermission(['article_delete'])"
@click="handleDelete(scope)"
/>
</template>
@ -117,8 +115,7 @@
type="danger"
size="small"
icon="el-icon-delete"
:disabled="!checkPermission(['article_delete'])"
@click="handleDelete(scope)"
@click="handleDelete2(scope)"
/>
</template>
</el-table-column>
@ -333,6 +330,26 @@ export default {
}
})
},
handleDelete2(scope) {
this.$confirm('确认删数据吗?将丢失数据!', '警告', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'error'
})
.then(async() => {
await deleteChildcomany(scope.row.id)
this.getList2()
this.getList()
this.$message({
type: 'success',
message: '成功删除!'
})
})
// eslint-disable-next-line handle-callback-err
.catch(err => {
// console.error(err);
})
},
}
}