--fix 权限名单

This commit is contained in:
yuping
2023-01-31 01:45:35 +08:00
parent e00206c8ef
commit 000db01834
11 changed files with 647 additions and 960 deletions

View File

@@ -309,628 +309,48 @@
<a-table
:columns="columns1"
:data-source="tableData1"
:loading="tableDataTotal1 === -1 ? true : false"
:loading="tableDataTotal1 === -1"
:scroll="{ x: 600 }"
expandRowByClick="true"
@expand="expandTable"
:pagination="false"
>
<template #bodyCell="{ record, column }">
<template
v-if="
(String(record.status) === '0' || record.status === '未提交') &&
column.key === 'operation'
"
>
<div
style="margin-right: 24px"
:class="[
String(record.courseform) === '1'
? 'disabled operation'
: 'operation',
]"
>
<div class="fb">
<div
class="jc"
@click="
() => {
handleEdit(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
编辑
</div>
<div
class="jc"
@click="
() => {
handleCopy(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
复制
</div>
<!-- 2022-12-10注释 后面放开 -->
<!-- <a-dropdown>
<template #overlay>
<a-menu>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showPrower(record);
}
"
>
权限名单
</a-menu-item>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showOwnPrower(record);
}
"
>
归属权
</a-menu-item>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showViewPrower(record);
}
"
>查看权</a-menu-item
>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showManagePrower(record);
}
"
>管理权</a-menu-item
>
</a-menu>
</template>
<a>
授权
<down-outlined />
</a>
</a-dropdown> -->
<div
class="jc"
@click="
() => {
handleDelete(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
删除
</div>
<template v-if="column.key === 'operation'">
<a-space :size="0">
<a-button v-if="record.status===0 || record.status===-1 || !record.kkty" @click="() => handleEdit(record, String(record.courseform))" type="link">编辑</a-button>
<a-button block v-if="record.status===2" @click="() => handleStart(record, String(record.courseform))" type="link">开课</a-button>
<a-button v-if="record.status===2" @click="() => handleLook(record, String(record.courseform))" type="link">查看</a-button>
<a-button v-if="record.status===2" @click="() => handleGuan22(record, String(record.courseform))" type="link">管理</a-button>
<div className="tableSelect" style="margin-left: 0">
<a-select value="授权" dropdownClassName="tabledropdown">
<a-select-option value="权限名单" label="权限名单">
<TableModelStudent :types="[10,11,12]" :id="record.offcourseId">权限名单</TableModelStudent>
</a-select-option>
<a-select-option value="查看权" label="查看权">
<CommonStudent :type="10" :id="record.offcourseId">查看权</CommonStudent>
</a-select-option>
<a-select-option value="管理权" label="管理权">
<CommonStudent :type="11" :id="record.offcourseId">管理权</CommonStudent>
</a-select-option>
</a-select>
</div>
</div>
</template>
<template
v-if="
(String(record.status) === '1' || record.status === '待审核') &&
column.key === 'operation'
"
>
<div
style="margin-right: 24px"
:class="[
String(record.courseform) === '1'
? 'disabled operation'
: 'operation',
]"
>
<div class="fb">
<div
class="jc"
@click="
() => {
handleRejectExit(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
撤回
</div>
<div
class="jc"
@click="
() => {
handleCopy(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
复制
</div>
<!-- 2022-12-10注释 后面放开 -->
<!-- <a-dropdown>
<template #overlay>
<a-menu>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showPrower(record);
}
"
>
权限名单
</a-menu-item>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showOwnPrower(record);
}
"
>
归属权
</a-menu-item>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showViewPrower(record);
}
"
>查看权</a-menu-item
>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showManagePrower(record);
}
"
>管理权</a-menu-item
>
</a-menu>
</template>
<a>
授权
<down-outlined />
</a>
</a-dropdown> -->
<div className="tableSelect">
<a-select value="更多" dropdownClassName="tabledropdown">
<a-select-option value="复制" label="复制">
<a-button @click="() => handleCopy(record, String(record.courseform))" type="link">复制</a-button>
</a-select-option>
<a-select-option v-if="record.status===1" value="撤回" label="撤回">
<a-button @click="() => handleRejectExit(record, String(record.courseform))" type="link">撤回</a-button>
</a-select-option>
<a-select-option v-if="record.status===2" value="停用" label="停用">
<a-button v-if="record.status===2 && record.kkty" @click="() => handleStop(record, String(record.courseform))" type="link">停用</a-button>
<a-button v-if="record.status===2 && !record.kkty" @click="() => handleOpen(record, String(record.courseform))" type="link">启用</a-button>
</a-select-option>
<a-select-option value="删除" label="删除">
<a-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除</a-button>
</a-select-option>
</a-select>
</div>
</div>
</template>
<template
v-if="
(String(record.status) === '2' || record.status === '已审核') &&
String(record.kkty) === '1' &&
column.key === 'operation'
"
>
<div
style="margin-right: 24px"
:class="[
String(record.courseform) === '1'
? 'disabled operation'
: 'operation',
]"
>
<div class="fb">
<div
class="jc"
@click="
() => {
handleStart(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
开课
</div>
<div
class="jc"
@click="
() => {
handleLook(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
查看
</div>
<!-- 2022-12-11注释 后面放开 -->
<div
class="jc"
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
if (String(record.courseform) === ('1' || '线上')) {
om_1 = true;
ft_1 = false;
} else if (
String(record.courseform) === ('2' || '面授')
) {
om_1 = true;
ft_1 = true;
}
handleGuan22(record);
}
"
style="display: inline-block; margin-left: 20px"
>
管理
</div>
<div
class="jc"
@click="
() => {
handleCopy(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
复制
</div>
<!-- 2022-12-10注释 后面放开 -->
<!-- <a-dropdown>
<template #overlay>
<a-menu>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showPrower(record);
}
"
>
权限名单
</a-menu-item>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showOwnPrower(record);
}
"
>
归属权
</a-menu-item>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showViewPrower(record);
}
"
>查看权</a-menu-item
>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showManagePrower(record);
}
"
>管理权</a-menu-item
>
</a-menu>
</template>
<a>
授权
<down-outlined />
</a>
</a-dropdown> -->
<div
class="jc"
@click="
() => {
handleStop(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
停用
</div>
</div>
</div>
</template>
<template
v-if="
(String(record.status) === '2' || record.status === '已审核') &&
String(record.kkty) === '0' &&
column.key === 'operation'
"
>
<div
style="margin-right: 24px"
:class="[
String(record.courseform) === '1'
? 'disabled operation'
: 'operation',
]"
>
<div class="fb">
<div
class="jc"
@click="
() => {
handleStart(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
开课
</div>
<div
class="jc"
@click="
() => {
handleEdit(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
编辑
</div>
<!-- 2022-12-10注释 后面放开 -->
<div
class="jc"
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
if (String(record.courseform) === ('1' || '线上')) {
om_1 = true;
ft_1 = false;
} else if (
String(record.courseform) === ('2' || '面授')
) {
om_1 = true;
ft_1 = true;
}
handleGuan22(record);
}
"
style="display: inline-block; margin-left: 20px"
>
管理
</div>
<div
class="jc"
@click="
() => {
handleCopy(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
复制
</div>
<!-- 2022-12-10注释 后面放开 -->
<!-- <a-dropdown>
<template #overlay>
<a-menu>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showPrower(record);
}
"
>
权限名单
</a-menu-item>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showOwnPrower(record);
}
"
>
归属权
</a-menu-item>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showViewPrower(record);
}
"
>查看权</a-menu-item
>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showManagePrower(record);
}
"
>管理权</a-menu-item
>
</a-menu>
</template>
<a>
授权
<down-outlined />
</a>
</a-dropdown> -->
<div
class="jc"
@click="
() => {
handleOpen(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
启用
</div>
<div
class="jc"
@click="
() => {
handleDelete(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
删除
</div>
</div>
</div>
</template>
<template
v-if="
(String(record.status) === '-1' ||
record.status === '审核未通过') &&
column.key === 'operation'
"
>
<div
style="margin-right: 24px"
:class="[
String(record.courseform) === '1'
? 'disabled operation'
: 'operation',
]"
>
<div class="fb">
<div
class="jc"
@click="
() => {
handleEdit(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
编辑
</div>
<div
class="jc"
@click="
() => {
handleCopy(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
复制
</div>
<!-- 2022-12-10注释 后面放开 -->
<!-- <a-dropdown>
<template #overlay>
<a-menu>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showPrower(record);
}
"
>
权限名单
</a-menu-item>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showOwnPrower(record);
}
"
>
归属权
</a-menu-item>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showViewPrower(record);
}
"
>查看权</a-menu-item
>
<a-menu-item
@click="
() => {
if (String(record.courseform) === '1') {
return;
}
showManagePrower(record);
}
"
>管理权</a-menu-item
>
</a-menu>
</template>
<a>
授权
<down-outlined />
</a>
</a-dropdown> -->
<div
class="jc"
@click="
() => {
handleDelete(record, String(record.courseform));
}
"
style="display: inline-block; margin-left: 20px"
>
删除
</div>
</div>
</div>
</a-space>
</template>
</template>
</a-table>
@@ -1702,65 +1122,9 @@
:isgetStudent="isgetStudent"
>
<template #extension="{ data: { record } }">
<div style="display: flex">
<div
v-if="record.source === 4 && record.status === 1"
@click="
() => {
record.status = 0;
auditStudent(record);
}
"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
审核通过
</div>
<div
v-if="record.source === 4 && record.status === 1"
@click="
() => {
record.status = 2;
auditStudent(record);
}
"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
拒绝
</div>
<div
v-if="
record.source === 4 &&
(record.status === 0 || record.status === 2)
"
@click="
() => {
record.status = 1;
auditStudent(record);
}
"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
撤回
</div>
</div>
<a-button v-if="record.source === 4 && record.status === 1" @click="() => {record.status = 0;auditStudent(record);}" type="link">审核通过</a-button>
<a-button v-if="record.source === 4 && record.status === 1" @click="() => {record.status = 2;auditStudent(record);}" type="link">拒绝</a-button>
<a-button v-if="record.source === 4 && (record.status === 0 || record.status === 2)" @click="() => {record.status = 1;auditStudent(record);}" type="link">撤回</a-button>
</template>
</TableStudent>
</div>
@@ -2295,6 +1659,8 @@ import * as api from "../../api/indexInvist.js";
import * as apis from "../../api/indexTaskManage";
import { message } from "ant-design-vue";
import { useRouter, useRoute } from "vue-router";
import CommonStudent from "@/components/student/CommonStudent";
import TableModelStudent from "@/components/student/TableModelStudent";
// import StuAdd from "../../components/drawers/StuAdd";
// import OwnPower from "../../components/drawers/OwnPower.vue";
// import Corpowerlist from "../../components/drawers/CorPowerlist.vue";
@@ -2525,8 +1891,7 @@ const columns1 = [
},
{
title: "操作",
width: 315,
className: "h",
width: 370,
dataIndex: "operation",
key: "operation",
fixed: "right",
@@ -2913,7 +2278,8 @@ export default defineComponent({
components: {
// OwnPower,
// Corpowerlist,
CommonStudent,
TableModelStudent,
SeeModal,
CourseModal,
FJUpload,
@@ -8093,24 +7459,24 @@ export default defineComponent({
margin-bottom: 20px;
}
// .tableSelect {
// position: relative;
// .hoverList {
// display: none;
// }
// &:hover {
// .hoverList {
// display: block;
// position: absolute;
// top: 20px;
// left: -20px;
// background: #fff;
// box-sizing: border-box;
// // padding: 20px;
// color: #000000;
// }
// }
// }
.tableSelect {
position: relative;
.hoverList {
display: none;
}
&:hover {
.hoverList {
display: block;
position: absolute;
top: 20px;
left: -20px;
background: #fff;
box-sizing: border-box;
// padding: 20px;
color: #000000;
}
}
}
// ::v-deep .w-e-toolbar {
// .w-e-bar-item {