--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

1
src/api/apis.js Normal file
View File

@@ -0,0 +1 @@
export const STUDENT_LIST = '/admin/student/getStudent'

View File

@@ -1,4 +1,4 @@
import {reactive, ref, toRefs, watch} from "vue";
import {isRef, reactive, ref, toRefs, unref, watch, watchEffect} from "vue";
import {getCookieForName, throttle} from "@/api/method";
import JSONBigInt from 'json-bigint';
@@ -22,7 +22,7 @@ export function useBoeApiPage(_url, params = {}, config = {
function fetch() {
state.loading = true
return request(_url, params).then(r => {
return boeRequest(_url, params).then(r => {
state.data = config.result(r)
state.totalPage = config.totalPage(r)
state.total = config.total(r)
@@ -62,7 +62,7 @@ export function useBoeApi(_url, params = {}, config = {
function fetch() {
state.loading = true
return request(_url, params).then(r => {
return boeRequest(_url, params).then(r => {
state.data = config.result(r)
state.loading = false
})
@@ -95,7 +95,7 @@ export function useBoeUserListPage(_url, params = {}, init = true) {
state.loading = false
return
}
return request(_url, params).then(r => {
return boeRequest(_url, params).then(r => {
state.data = params.page === 1 ? r.result.userInfoList : [...state.data, ...r.result.userInfoList]
state.totalPage = r.result.totalPage
state.total = r.result.totalElement
@@ -110,31 +110,48 @@ export function useBoeUserListPage(_url, params = {}, init = true) {
};
}
export function usePage(_url, params = {}, init = true) {
export function usePage(_url, params, init = true) {
const state = reactive({
data: [],
total:1,
current:1,
pages:1,
loading: false
})
watch(params, () => {
fetch()
})
if (isRef(params)) {
watch(params, () => {
fetch()
})
}
function reset(){
state.data = []
state.loading = false
}
function fetch() {
state.loading = true
return request(_url, params).then(r => {
console.log('fetch')
console.log(r)
state.data = r.result
return request(unref(_url), unref(params)).then(r => {
state.data = r.data.records
state.current = r.data.current
state.pages = r.data.pages
state.total = r.data.total
state.loading = false
})
}
init && fetch()
if (isRef(_url)) {
watchEffect(fetch)
} else {
init && fetch()
}
return {
...toRefs(state),
fetch,
reset,
};
}
@@ -163,7 +180,7 @@ export function useRequest(_url, params = {}, init = true) {
};
}
export async function request(_url, params) {
export async function boeRequest(_url, params) {
const s = _url.split(' ')
let url = s[0]
const method = s[1]?.toLowerCase() || 'get'
@@ -193,23 +210,34 @@ export async function request(_url, params) {
}).then(res => {
return JSONBigIntStr.parse(res)
})
// return axios({
// url,
// method,
// headers: {
// token: getCookie('token'),
// ...method !== 'get' ? {'Content-Type': 'application/json'} : {}
// },
// baseURL: '',
// ...method !== 'get' ? {data: JSON.stringify(body)} : {}
// }).then(resp => {
// return resp.data
// }).then(response => {
// console.log(response)
// return response
// }).catch(e => {
// console.log(2222)
// console.log(e)
// // router.push({path: '/login'})
// })
}
export async function request(_url, params) {
const s = _url.split(' ')
let url = s[0]
const method = s[1]?.toLowerCase() || 'get'
if (method === 'get') {
let paramsArray = [];
if (params) {
Object.keys(params).forEach(key => paramsArray.push(key + '=' + params[key]))
if (url.search(/\?/) === -1) {
url += '?' + paramsArray.join('&')
} else {
url += '&' + paramsArray.join('&')
}
}
}
const body = method !== 'get' ? params || {} : {}
return fetch(process.env.VUE_APP_BASE_API + url, {
method,
headers: {
token: getCookieForName('token'),
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
},
...method !== 'get' ? {body: JSON.stringify(body)} : {}
}).then(res => {
return res.text()
}).then(res => {
return JSONBigIntStr.parse(res)
})
}

View File

@@ -28,7 +28,7 @@
</template>
<script setup>
import { defineEmits, defineProps, ref, watch } from "vue";
import { request, useBoeApi } from "@/api/request";
import {boeRequest, request, useBoeApi} from "@/api/request";
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
const props = defineProps({
@@ -62,7 +62,7 @@ watch(props, () => {
});
function onLoadData(treeNode) {
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
return boeRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
options.value = [...options.value];

View File

@@ -11,7 +11,7 @@
<div class="drawerMain" id="ProjCheckship" style="">
<div class="header">
<div class="headerTitle">
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员"}[type] || "" }}
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员",4: "查看权",5: "管理权"}[type] || "" }}
</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
@@ -406,7 +406,7 @@
</template>
<script setup>
import {computed, defineEmits, defineProps, ref, watch} from "vue";
import {request, useBoeApi, useBoeApiPage} from "@/api/request";
import {boeRequest, useBoeApi, useBoeApiPage} from "@/api/request";
import {
AUDIENCE_LIST,
ORG_CHILD_LIST,
@@ -616,7 +616,7 @@ const closeDrawer = () => {
};
function onLoadData(treeNode) {
return request(ORG_CHILD_LIST, {keyword: "", orgId: treeNode.id}).then(
return boeRequest(ORG_CHILD_LIST, {keyword: "", orgId: treeNode.id}).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
treeData.value = [...treeData.value];
@@ -625,7 +625,7 @@ function onLoadData(treeNode) {
}
function onLoadOrgData(treeNode) {
return request(ORG_CHILD_LIST, {keyword: "", orgId: treeNode.id}).then(
return boeRequest(ORG_CHILD_LIST, {keyword: "", orgId: treeNode.id}).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
treeOrgData.value = [...treeOrgData.value];

View File

@@ -0,0 +1,460 @@
<template>
<div class="CommonStudent">
<a-drawer
:visible="visiable"
class="drawerStyle ProjCheckship"
placement="right"
width="40%"
>
<div class="drawerMain" id="ProjCheckship" style="">
<div class="header">
<div class="headerTitle">
权限名单
</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
</div>
<div class="TableStudent">
<a-row
type="flex"
gutter="12"
style="padding-left: 20px; margin-right: 0px"
>
<a-col>
<a-form-item title="姓名:">
<a-input
class="cus-input"
v-model:value="searchParams.studentName"
placeholder="请输入姓名"
/>
</a-form-item>
</a-col>
<a-col>
<a-button
class="cus-btn"
style="background: #4ea6ff; color: #fff; width: 100px"
@click="searchStu"
>
<template #icon><img style="margin-right: 10px" src="../../assets/images/courseManage/search0.png"/>
</template>
搜索
</a-button>
</a-col>
<a-col :span="2">
<a-button class="cus-btn white" style="width: 100px" @click="reset">
<template #icon><img style="margin-right: 10px" src="../../assets/images/leveladd/reset.png"/>
</template>
重置
</a-button>
</a-col>
</a-row>
<div style="margin-top: 20px">
<a-table
:columns="columns"
:data-source="studentList"
:pagination="stuPagination"
:loading="loading"
row-key="id"
>
<template #action="{ record }">
<a-space :size="2">
<slot name="extension" v-bind:data="{ record }"></slot>
<a-button @click="del(record.id)" type="link" danger>删除</a-button>
</a-space>
</template>
</a-table>
</div>
</div>
<div class="btnn">
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">确定</button>
</div>
</div>
</a-drawer>
<div @click="openDrawer">
<slot></slot>
</div>
</div>
</template>
<script setup>
import {computed, createVNode, defineProps, ref, watch} from "vue";
import {usePage} from "@/api/request";
import {STUDENT_LIST} from "@/api/apis";
import {delStudentList} from "@/api/index1";
import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
import {Modal} from "ant-design-vue";
const props = defineProps({
type: Number,
id: String,
stage: {
type: Array,
default: () => [],
},
types: {
type: Array,
default: () => [],
},
});
const visiable = ref(false);
const initParams = {
studentName: "",
page: 1,
pageSize: 10,
type: props.type || '',
types: props.types,
pid: props.id || '',
}
const searchParams = ref(initParams)
const columns = ref([
{
title: "姓名",
dataIndex: "studentName",
key: "studentName",
width: 30,
align: "center",
ellipsis: true,
},
{
title: "工号",
dataIndex: "studentUserNo",
key: "studentUserNo",
width: 50,
align: "center",
ellipsis: true,
},
{
title: "部门",
dataIndex: "studentDepartName",
key: "studentDepartName",
width: 80,
align: "center",
ellipsis: true,
},
{
title: "权限",
dataIndex: "type",
key: "type",
width: 30,
align: "center",
customRender: ({record: {type}}) => ({4: "查看权", 5: "管理权", 6: "归属权"}[type]),
},
{
title: "操作",
dataIndex: "operation",
key: "operation",
width: 50,
align: "center",
slots: {customRender: "action"},
},
])
const {data: studentList, fetch: searchStu, total, loading} = usePage(STUDENT_LIST, searchParams.value)
const stuPagination = computed(() => ({
total: total,
showSizeChanger: false,
current: searchParams.value.page,
pageSize: searchParams.value.pageSize,
onChange: changePagination,
}));
const openDrawer = () => {
visiable.value = true;
};
const changePagination = (page) => {
searchParams.value.page = page;
searchStu();
};
function del(id) {
Modal.confirm({
title: () => '确定删除?',
icon: () => createVNode(ExclamationCircleOutlined),
content: () => '数据删除后不可恢复!',
okText: () => '确定',
okType: 'danger',
cancelText: () => '取消',
onOk() {
id && delStudentList({ids: [id]}).then(() => searchStu())
},
});
}
const closeDrawer = () => {
visiable.value = false;
};
function reset(){
searchParams.value = initParams
searchStu()
}
watch(visiable, () => {
visiable.value && searchStu()
searchParams.value = initParams
});
</script>
<style lang="scss">
.cus-btn {
width: 100%;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16px;
border: 1px solid #4ea6ff;
border-radius: 8px;
background: #4ea6ff;
cursor: pointer;
color: #fff;
}
.white {
background: #fff;
color: #4ea6ff;
}
.cus-input {
height: 40px;
border-radius: 8px;
}
.cus-select {
height: 40px;
border-radius: 8px;
}
.CommonStudent {
.ant-btn-primary {
background-color: #4ea6ff !important;
}
.cus-select {
height: 40px;
border-radius: 8px;
}
.tableBox .ant-table-row .ant-table-cell {
height: 48px;
font-size: 14px;
font-weight: 400;
color: #4f5156;
line-height: 29px;
padding: 0px;
}
.tableBox .ant-table-thead tr th {
font-size: 14px;
}
.ant-tabs-tabpane {
height: 100%;
}
.ant-tabs {
overflow: visible;
}
.right1 {
border-left: 1px solid #f2f6fe;
margin-left: 20px;
.onerow {
display: flex;
justify-content: space-between;
align-items: center;
margin-right: 40px;
flex-wrap: wrap;
width: 100%;
.onleft {
display: flex;
text-align: center;
.already {
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 500;
margin-left: 32px;
white-space: nowrap;
// margin-bottom: 20px;
}
.count {
color: #4ea6ff;
font-size: 16px;
margin: 0 6px;
}
.peo {
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 500;
}
}
.clbox {
margin-right: 50px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
width: 104px;
height: 32px;
border-radius: 4px;
background: #4ea6ff;
.colose {
width: 16px;
height: 16px;
// border-radius: 8px;
// background: #ffffff;
// position: relative;
background-image: url(../../assets/images/basicinfo/ch.png);
background-size: 100%;
margin-right: 4px;
}
.allclear {
color: rgba(255, 255, 255, 1);
font-size: 14px;
}
}
}
.selecteds {
display: flex;
flex-wrap: wrap;
margin-left: 32px;
.person {
width: 100%;
margin-top: 20px;
border-top: 1px solid #f2f6fe;
}
.chose {
width: 64px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.ch {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
.ifsw {
display: flex;
align-items: end;
justify-content: center;
color: #4ea6ff;
}
.sw {
display: flex;
align-items: center;
justify-content: center;
text-align: justify;
color: #4ea6ff;
margin-top: 23px;
margin-left: 10px;
}
.dept {
width: 100%;
margin-top: 30px;
border-top: 1px solid #f2f6fe;
}
.chose1 {
//width: 90px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ch1 {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
.group {
width: 100%;
margin-top: 30px;
border-top: 1px solid #f2f6fe;
}
.chose2 {
//width: 120px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ch2 {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
}
}
}
</style>

View File

@@ -214,50 +214,13 @@
调整
</div> -->
<!-- </div>-->
<a-row gutter="12">
<a-col>
<slot name="extension" v-bind:data="{ record }"></slot>
</a-col>
<!-- 新加 换组 通过 拒绝
<a-col v-if="type === 1">
<div
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 10px;
cursor: pointer;
"
>
换组
</div>
</a-col>
-->
<a-col v-if="type === 3 && record.status!==0">
<div
style=" color: #4ea6ff; font-size: 14px;text-align: center; margin-left: 10px; cursor: pointer; "
@click="updateStatus(0, record.id)"
>
通过
</div>
</a-col>
<a-col v-if="type === 3 && record.status!==0">
<div
style=" color: #4ea6ff;font-size: 14px;text-align: center; margin-left: 10px;cursor: pointer; "
@click="updateStatus(2, record.id)"
>
拒绝
</div>
</a-col>
<a-col>
<div
@click="del(record.id)"
style=" color: #4ea6ff;font-size: 14px;text-align: center; margin-left: 10px; cursor: pointer;"
>
删除
</div>
</a-col>
</a-row>
<a-space :size="2">
<slot name="extension" v-bind:data="{ record }"></slot>
<a-button v-if="type === 1" @click="updateStatus(0, record.id)" type="link">换组</a-button>
<a-button v-if="type === 3 && record.status!==0" @click="updateStatus(0, record.id)" type="link">通过</a-button>
<a-button v-if="type === 3 && record.status!==0" @click="updateStatus(2, record.id)" type="link">拒绝</a-button>
<a-button @click="del(record.id)" type="link" danger>删除</a-button>
</a-space>
</template>
</a-table>
</div>
@@ -366,11 +329,11 @@
/>
</template>
<script setup>
import { computed, defineProps, onMounted, ref, watch } from "vue";
import {computed, createVNode, defineProps, onMounted, ref, watch} from "vue";
import { delStudentList, getStuPage, batchUpdateStatus } from "@/api/index1";
import CommonStudent from "@/components/student/CommonStudent";
import ChangeLevelModal from "./ChangeLevelModal.vue";
import { message } from "ant-design-vue";
import {message, Modal} from "ant-design-vue";
// import { topStudent } from "../../api/indexProjStu";
import SeeStu from "../../components/drawers/SeeStu";
import EScore from "../drawers/ExportScore.vue";
@@ -378,6 +341,8 @@ import OrgClass from "@/components/project/OrgClass";
import ExportHomeWork from "../Modals/ExportHomeWork.vue";
import * as api from "../../api/index1";
import ImpStu from "../drawers/AddLevelImportStu";
import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
const props = defineProps({
type: Number,
id: String,
@@ -599,12 +564,17 @@ function bathDel() {
}
function del(id) {
id &&
delStudentList({
ids: [id],
}).then(() => {
getStuList();
});
Modal.confirm({
title: () => '确定删除?',
icon: () => createVNode(ExclamationCircleOutlined),
content: () => '数据删除后不可恢复!',
okText: () => '确定',
okType: 'danger',
cancelText: () => '取消',
onOk() {
id && delStudentList({ids: [id]}).then(() => getStuList())
},
});
}
function submitCall(flag) {

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 {

View File

@@ -690,26 +690,24 @@
<script>
import { reactive, toRefs, onMounted, watch, computed } from "vue";
import { useRouter } from "vue-router";
// import OwnerShip from "../../components/drawers/Ownership";
// import PowerList from "../../components/drawers/PowerList";
// import QueryRight from "../../components/drawers/QueryRight";
import CommonStudent from "@/components/student/CommonStudent";
import TableModelStudent from "@/components/student/TableModelStudent";
import ProjOwnerShip from "../../components/drawers/ProjectOwn";
import ProjPowerList from "../../components/drawers/ProjPowerList";
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
// import ManageRight from "../../components/drawers/ManageRight";
import * as api from "../../api/index1";
import * as apiStu from "../../api/index";
import { message } from "ant-design-vue";
import {
commonData,
changeOwnership,
// setCookie
} from "../../api/method";
import { storage } from "../../api/storage";
} from "@/api/method";
import { storage } from "@/api/storage";
import { useStore } from "vuex";
import OrgClass from "@/components/project/OrgClass";
import NameInput from "@/components/project/NameInput";
import {validateName} from "../../api/index1";
import {validateName} from "@/api/index1";
export default {
name: "learningPath",
@@ -1249,51 +1247,23 @@ export default {
>
管理
</div>
{/**
// <!-- 2022-12-10注释 后面放开 -->
<a-select
{
<a-select
style="width: 50px;margin-top:2px;margin-left:25px"
value="授权"
dropdownClassName="tabledropdown"
>
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showPower(text.record.id);
}}
>
权限名单
</div>
</a-select-option>
<a-select-option value="归属权" label="归属权">
<div
onClick={() => {
showOwner(text.record.id);
}}
>
归属权
</div>
<TableModelStudent types={[7,8,9]} id={text.record.id}>权限名单</TableModelStudent>
</a-select-option>
<a-select-option value="查看权" label="查看权">
<div
onClick={() => {
showQuery(text.record.id);
}}
>
查看权
</div>
<CommonStudent type={7} id={text.record.id}>查看权</CommonStudent>
</a-select-option>
<a-select-option value="管理权" label="管理权">
<div
onClick={() => {
showManage(text.record.id);
}}
>
管理权
</div>
<CommonStudent type={8} id={text.record.id}>管理权</CommonStudent>
</a-select-option>
</a-select>
*/}
}
</div>
<div class="tableSelect">
{text.record.state === "草稿" ? (

View File

@@ -523,32 +523,8 @@
:columns="tableDataFunc()"
>
<template #extension="{ data: { record } }">
<div style="display: flex">
<div
@click="showStudent(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
查看
</div>
<div
@click="setLevels(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
调整
</div>
</div>
<a-button type="link" @click="showStudent(record)">查看</a-button>
<a-button type="link" @click="setLevels(record)">调整</a-button>
</template>
</TableStudent>
<TableStudent
@@ -559,32 +535,8 @@
:columns="tableDataFunc()"
>
<template #extension="{ data: { record } }">
<div style="display: flex">
<div
@click="showStudent(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
查看
</div>
<div
@click="setLevels(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
调整
</div>
</div>
<a-button type="link" @click="showStudent(record)">查看</a-button>
<a-button type="link" @click="setLevels(record)">调整</a-button>
</template>
</TableStudent>
</a-tab-pane>

View File

@@ -830,7 +830,6 @@ import * as api from "../../api/index";
import * as api1 from "../../api/index1";
import { storage } from "../../api/storage";
import ProjectManager from "@/components/project/ProjectManagerNew";
// import ProjectClass from "@/components/project/ProjectClass";
import TrainClass from "@/components/project/TrainClass";
import OrgClass from "@/components/project/OrgClass";
import dayjs from "dayjs";
@@ -838,7 +837,8 @@ import * as moment from "moment";
import { changeOwnership } from "@/api/method";
import NameInput from "@/components/project/NameInput";
import { validateName } from "@/api/index1";
//import { toDate } from "../../api/method";
import CommonStudent from "@/components/student/CommonStudent";
import TableModelStudent from "@/components/student/TableModelStudent";
export default {
name: "projectManage",
@@ -1510,57 +1510,21 @@ export default {
) : (
""
)}
{/**
//<!-- 2022-12-10注释 后面放开 -->
<div className="tableSelect">
<a-select
style="width: 50px"
value="授权"
// options={state.projectNameList}
dropdownClassName="tabledropdown"
>
<a-select-option value="权限名单" label="权限名单">
<div
onClick={() => {
showProjPrower(value.record.projectId);
}}
>
权限名单
</div>
</a-select-option>
<a-select-option value="归属权" label="归属权">
<div
onClick={() => {
console.log("点击了111");
showProjOwner(value.record.projectId);
}}
>
归属权
</div>
</a-select-option>
<a-select-option value="查看权" label="查看权">
<div
onClick={() => {
console.log("点击了111");
showProjCheck(value.record.projectId);
}}
>
查看权
</div>
</a-select-option>
<a-select-option value="管理权" label="管理权">
<div
onClick={() => {
showProjManage(value.record.projectId);
}}
>
管理权
</div>
</a-select-option>
</a-select>
</div>
*/}
{
<div className="tableSelect">
<a-select style="width: 50px;" value="授权" dropdownClassName="tabledropdown">
<a-select-option value="权限名单" label="权限名单">
<TableModelStudent types={[4,5,6]} id={value.record.projectId}>权限名单</TableModelStudent>
</a-select-option>
<a-select-option value="查看权" label="查看权">
<CommonStudent type={4} id={value.record.projectId}>查看权</CommonStudent>
</a-select-option>
<a-select-option value="管理权" label="管理权">
<CommonStudent type={5} id={value.record.projectId}>管理权</CommonStudent>
</a-select-option>
</a-select>
</div>
}
{value.record.type === 1 ? (
<span
className="operation3"

View File

@@ -701,32 +701,8 @@
:visable="tabFlag"
>
<template #extension="{ data: { record } }">
<div style="display: flex">
<div
@click="showStudent(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
查看
</div>
<div
@click="settingTopFlag(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
{{ record.topFlag ? "取消优秀" : "优秀学员" }}
</div>
</div>
<a-button @click="showStudent(record)" type="link">查看</a-button>
<a-button @click="settingTopFlag(record)" type="link">{{ record.topFlag ? "取消优秀" : "优秀学员" }}</a-button>
</template>
</TableStudent>
</a-tab-pane>