mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
--fix 权限名单
This commit is contained in:
398
src/App.vue
398
src/App.vue
@@ -1,27 +1,27 @@
|
||||
<template>
|
||||
<div id="container" v-if="!isLogin">
|
||||
<nav-top />
|
||||
<div style="display: flex">
|
||||
<nav-left />
|
||||
<div style="flex: 1; display: flex; flex-direction: column; width: 0">
|
||||
<open-pages />
|
||||
<bread-crumb />
|
||||
<main>
|
||||
<a-config-provider :locale="zhCN">
|
||||
<router-view />
|
||||
</a-config-provider>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container" v-if="isLogin">
|
||||
<router-view />
|
||||
</div>
|
||||
<div id="container" v-if="!isLogin">
|
||||
<nav-top/>
|
||||
<div style="display: flex">
|
||||
<nav-left/>
|
||||
<div style="flex: 1; display: flex; flex-direction: column; width: 0">
|
||||
<open-pages/>
|
||||
<bread-crumb/>
|
||||
<main>
|
||||
<a-config-provider :locale="zhCN">
|
||||
<router-view/>
|
||||
</a-config-provider>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container" v-if="isLogin">
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { computed, defineComponent, ref, onMounted } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useStore, createStore } from "vuex";
|
||||
import {computed, defineComponent, ref, onMounted} from "vue";
|
||||
import {useRouter, useRoute} from "vue-router";
|
||||
import {useStore, createStore} from "vuex";
|
||||
import NavLeft from "@/components/NavLeft";
|
||||
import NavTop from "@/components/NavTop";
|
||||
import OpenPages from "@/components/OpenPages";
|
||||
@@ -32,118 +32,118 @@ import * as api1 from "@/api/index1";
|
||||
import * as api2 from "@/api/index";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
NavLeft,
|
||||
NavTop,
|
||||
OpenPages,
|
||||
BreadCrumb,
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
// console.log("router", router.getRoutes(), route);
|
||||
console.log("版本2.1.6------------");
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
// watch(
|
||||
// () => route.path,
|
||||
// () => {
|
||||
// route.path === "/login" && (isLogin.value = true);
|
||||
// }
|
||||
// );
|
||||
const currentRouteName = computed(() => route.name);
|
||||
components: {
|
||||
NavLeft,
|
||||
NavTop,
|
||||
OpenPages,
|
||||
BreadCrumb,
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
// console.log("router", router.getRoutes(), route);
|
||||
console.log("版本2.1.6------------");
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
// watch(
|
||||
// () => route.path,
|
||||
// () => {
|
||||
// route.path === "/login" && (isLogin.value = true);
|
||||
// }
|
||||
// );
|
||||
const currentRouteName = computed(() => route.name);
|
||||
|
||||
function init() {
|
||||
console.log(store);
|
||||
getUserInfo();
|
||||
initDict("faceclassPic");
|
||||
initDict("faceclassClass");
|
||||
initDict("faceclassScene");
|
||||
initDict("projectLevel");
|
||||
initDict("projectSys");
|
||||
initDict("pathmapPic");
|
||||
initDict("projectClass");
|
||||
initDict("projectPic");
|
||||
initDict("sysType");
|
||||
getMemberInfo();
|
||||
getOrgTree();
|
||||
}
|
||||
function init() {
|
||||
console.log(store);
|
||||
getUserInfo();
|
||||
initDict("faceclassPic");
|
||||
initDict("faceclassClass");
|
||||
initDict("faceclassScene");
|
||||
initDict("projectLevel");
|
||||
initDict("projectSys");
|
||||
initDict("pathmapPic");
|
||||
initDict("projectClass");
|
||||
initDict("projectPic");
|
||||
initDict("sysType");
|
||||
getMemberInfo();
|
||||
getOrgTree();
|
||||
}
|
||||
|
||||
// 监听关闭浏览器
|
||||
let time1 = ref(0);
|
||||
let time2 = ref(0);
|
||||
// 监听关闭浏览器
|
||||
let time1 = ref(0);
|
||||
let time2 = ref(0);
|
||||
|
||||
//添加监听事件
|
||||
function beforeunloadHandler() {
|
||||
time1.value = new Date().getTime();
|
||||
// e.returnValue = '关闭提示';
|
||||
}
|
||||
//添加监听事件
|
||||
function beforeunloadHandler() {
|
||||
time1.value = new Date().getTime();
|
||||
// e.returnValue = '关闭提示';
|
||||
}
|
||||
|
||||
function unloadHandler() {
|
||||
time2.value = new Date().getTime() - time1.value;
|
||||
if(time2.value<=5){
|
||||
store.replaceState(createStore({state: {openpages:null}}).state);
|
||||
localStorage.removeItem("openpages");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onMounted(()=>{
|
||||
window.addEventListener('beforeunload', e => beforeunloadHandler(e));
|
||||
window.addEventListener('unload', e => unloadHandler(e));
|
||||
})
|
||||
function unloadHandler() {
|
||||
time2.value = new Date().getTime() - time1.value;
|
||||
if (time2.value <= 5) {
|
||||
store.replaceState(createStore({state: {openpages: null}}).state);
|
||||
localStorage.removeItem("openpages");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function getMemberInfo() {
|
||||
const list = localStorage.getItem("memberInitInfo");
|
||||
if (list) {
|
||||
store.commit("SET_MEMBER_INFO", JSON.parse(list));
|
||||
return;
|
||||
}
|
||||
const memberInitInfo = await api1
|
||||
.getMemberInfo({ keyWord: "", pageNo: 1, pageSize: 10 })
|
||||
.then((res) => res.data.data.rows);
|
||||
store.commit("SET_MEMBER_INFO", memberInitInfo);
|
||||
localStorage.setItem("memberInitInfo", JSON.stringify(memberInitInfo));
|
||||
}
|
||||
onMounted(() => {
|
||||
window.addEventListener('beforeunload', e => beforeunloadHandler(e));
|
||||
window.addEventListener('unload', e => unloadHandler(e));
|
||||
})
|
||||
|
||||
async function getUserInfo() {
|
||||
const userInfo = await api2.userInfo();
|
||||
store.commit("SET_USER", userInfo.data.data);
|
||||
}
|
||||
|
||||
async function initDict(key, localStory = false) {
|
||||
let list;
|
||||
if (localStory) {
|
||||
list = localStorage.getItem(key);
|
||||
if (list) {
|
||||
store.commit("SET_DICT", { key, data: JSON.parse(list) });
|
||||
return;
|
||||
}
|
||||
}
|
||||
list = await getDictList(key);
|
||||
localStory && localStorage.setItem(key, JSON.stringify(list));
|
||||
store.commit("SET_DICT", { key, data: list });
|
||||
}
|
||||
async function getMemberInfo() {
|
||||
const list = localStorage.getItem("memberInitInfo");
|
||||
if (list) {
|
||||
store.commit("SET_MEMBER_INFO", JSON.parse(list));
|
||||
return;
|
||||
}
|
||||
const memberInitInfo = await api1
|
||||
.getMemberInfo({keyWord: "", pageNo: 1, pageSize: 10})
|
||||
.then((res) => res.data.data.rows);
|
||||
store.commit("SET_MEMBER_INFO", memberInitInfo);
|
||||
localStorage.setItem("memberInitInfo", JSON.stringify(memberInitInfo));
|
||||
}
|
||||
|
||||
const getDictList = (param) => api1.getDictTree({setCode: param,}).then((res) => res.data.data);
|
||||
//获取组织树
|
||||
const getOrgTree = () => {
|
||||
api.getOrgTreeInfo().then((res) => {
|
||||
store.commit("getOrgtreeList", res.data.data);
|
||||
});
|
||||
};
|
||||
init();
|
||||
return {
|
||||
isLogin,
|
||||
routes,
|
||||
name: currentRouteName,
|
||||
zhCN,
|
||||
};
|
||||
}
|
||||
async function getUserInfo() {
|
||||
const userInfo = await api2.userInfo();
|
||||
store.commit("SET_USER", userInfo.data.data);
|
||||
}
|
||||
|
||||
async function initDict(key, localStory = false) {
|
||||
let list;
|
||||
if (localStory) {
|
||||
list = localStorage.getItem(key);
|
||||
if (list) {
|
||||
store.commit("SET_DICT", {key, data: JSON.parse(list)});
|
||||
return;
|
||||
}
|
||||
}
|
||||
list = await getDictList(key);
|
||||
localStory && localStorage.setItem(key, JSON.stringify(list));
|
||||
store.commit("SET_DICT", {key, data: list});
|
||||
}
|
||||
|
||||
const getDictList = (param) => api1.getDictTree({setCode: param,}).then((res) => res.data.data);
|
||||
//获取组织树
|
||||
const getOrgTree = () => {
|
||||
api.getOrgTreeInfo().then((res) => {
|
||||
store.commit("getOrgtreeList", res.data.data);
|
||||
});
|
||||
};
|
||||
init();
|
||||
return {
|
||||
isLogin,
|
||||
routes,
|
||||
name: currentRouteName,
|
||||
zhCN,
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@@ -170,89 +170,89 @@ export default defineComponent({
|
||||
//}
|
||||
|
||||
#app {
|
||||
// font-family: MicrosoftYaHei, Microsoft YaHei, Avenir, Helvetica, Arial,
|
||||
// sans-serif;
|
||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
|
||||
Microsoft YaHei, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #2c3e50;
|
||||
height: 100%;
|
||||
// font-family: MicrosoftYaHei, Microsoft YaHei, Avenir, Helvetica, Arial,
|
||||
// sans-serif;
|
||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
|
||||
Microsoft YaHei, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #2c3e50;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
min-width: 1000px;
|
||||
min-height: 100%;
|
||||
background-color: rgba(245, 247, 250, 1);
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
min-width: 1000px;
|
||||
min-height: 100%;
|
||||
background-color: rgba(245, 247, 250, 1);
|
||||
|
||||
main {
|
||||
height: 0;
|
||||
flex: 1 1 auto;
|
||||
// flex-shrink: 0;
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
// display: flex;
|
||||
// flex: 1 1 auto;
|
||||
width: calc(100% - 40px);
|
||||
// margin-bottom: 20px;
|
||||
margin: 0px 20px 20px 20px;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.07);
|
||||
}
|
||||
main {
|
||||
height: 0;
|
||||
flex: 1 1 auto;
|
||||
// flex-shrink: 0;
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
// display: flex;
|
||||
// flex: 1 1 auto;
|
||||
width: calc(100% - 40px);
|
||||
// margin-bottom: 20px;
|
||||
margin: 0px 20px 20px 20px;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.07);
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.white {
|
||||
background: #fff;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
|
||||
.cus-input {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.cus-input {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.cus-select {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.cus-select {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
// @media screen and (max-width: 1366px) {
|
||||
// .cmMain {
|
||||
// width: 750px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1367px) and (max-width: 1680px) {
|
||||
// .cmMain {
|
||||
// width: 1010px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1681px) and (max-width: 1920px) {
|
||||
// .cmMain {
|
||||
// width: 1270px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1921px) {
|
||||
// .cmMain {
|
||||
// width: 1270px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (max-width: 1366px) {
|
||||
// .cmMain {
|
||||
// width: 750px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1367px) and (max-width: 1680px) {
|
||||
// .cmMain {
|
||||
// width: 1010px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1681px) and (max-width: 1920px) {
|
||||
// .cmMain {
|
||||
// width: 1270px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1921px) {
|
||||
// .cmMain {
|
||||
// width: 1270px;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
</style>
|
||||
20
src/components/common/DropDown.vue
Normal file
20
src/components/common/DropDown.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div className="tableSelect" style="margin-left: 0">
|
||||
<a-select :value="value" dropdownClassName="tabledropdown">
|
||||
<template :key="index" v-for="(item, index) in $slots.default()">
|
||||
<a-select-option v-if="item.children!=='v-if'" :value="index">
|
||||
<component :is="item"></component>
|
||||
</a-select-option>
|
||||
</template>
|
||||
</a-select>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {defineProps} from "vue";
|
||||
defineProps({
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="drawerMain" id="ProjCheckship" style="">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员",4: "查看权",5: "管理权"}[type] || title }}
|
||||
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员"}[type] || title }}
|
||||
</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
@@ -288,32 +288,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<div @click="openDrawer">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<a-button @click="openDrawer" type="link"><slot></slot></a-button>
|
||||
</div>
|
||||
<!--
|
||||
<a-modal
|
||||
v-model:visible="stageVisible"
|
||||
width="1000px"
|
||||
title="选择阶段"
|
||||
@ok="handleStageOk"
|
||||
>
|
||||
<div>
|
||||
{{ type === 1 ? "选择阶段" : "" }}
|
||||
<a-select
|
||||
style="width: 150px"
|
||||
:placeholder="type === 1 ? '选择阶段' : '选择关卡'"
|
||||
v-model:value="selectsData.stageId"
|
||||
className="cus-select"
|
||||
>
|
||||
<a-select-option v-for="(item, i) in stageIds" :key="i" :value="item.id"
|
||||
>{{ item.name || "默认" }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-modal>
|
||||
-->
|
||||
<a-modal
|
||||
:style="{padding: 0,position: relative,right: '-20%'}"
|
||||
:closable="true"
|
||||
|
||||
@@ -74,9 +74,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<div @click="openDrawer">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<a-button @click="openDrawer" type="link"><slot></slot></a-button>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
||||
@@ -315,41 +315,23 @@
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space :size="0">
|
||||
<a-space>
|
||||
<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 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>
|
||||
<DropDown value="授权">
|
||||
<OwnerTableModelStudent :types="[10,11,12]" :id="record.offcourseId">权限名单</OwnerTableModelStudent>
|
||||
<CommonStudent :type="10" :id="record.offcourseId" title="查看权">查看权</CommonStudent>
|
||||
<CommonStudent :type="11" :id="record.offcourseId" title="管理权">管理权</CommonStudent>
|
||||
</DropDown>
|
||||
<DropDown value="更多">
|
||||
<a-button @click="() => handleCopy(record, String(record.courseform))" type="link">复制</a-button>
|
||||
<a-button @click="() => handleRejectExit(record, String(record.courseform))" type="link">撤回</a-button>
|
||||
<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-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除</a-button>
|
||||
</DropDown>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@@ -1128,161 +1110,6 @@
|
||||
</template>
|
||||
</TableStudent>
|
||||
</div>
|
||||
<div class="tableBox" style="margin-top: 20px">
|
||||
<!-- <a-table-->
|
||||
<!-- :columns="columns7"-->
|
||||
<!-- :data-source="tableData7"-->
|
||||
<!-- :loading="tableDataTotal3 === -1 ? true : false"-->
|
||||
<!-- :scroll="{ x: 800 }"-->
|
||||
<!-- expandRowByClick="true"-->
|
||||
<!-- @expand="expandTable"-->
|
||||
<!-- :pagination="false"-->
|
||||
<!-- :row-selection="{-->
|
||||
<!-- selectedRowKeys: selectedRowKeys7,-->
|
||||
<!-- onChange: onSelectChange7,-->
|
||||
<!-- }"-->
|
||||
<!-- >-->
|
||||
<!-- <template #bodyCell="{ record, column }">-->
|
||||
<!-- <!– 操作1 –>-->
|
||||
<!-- <template-->
|
||||
<!-- v-if="-->
|
||||
<!-- (String(record.applyStatus) === '0' ||-->
|
||||
<!-- record.status === '待审核') &&-->
|
||||
<!-- column.key === 'overstatus'-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- <span class="table-operation">-</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template-->
|
||||
<!-- v-if="-->
|
||||
<!-- (String(record.applyStatus) === '-1' ||-->
|
||||
<!-- record.status === '已拒绝') &&-->
|
||||
<!-- column.key === 'overstatus'-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- <span class="table-operation">-</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template-->
|
||||
<!-- v-if="-->
|
||||
<!-- (String(record.applyStatus) === '1' ||-->
|
||||
<!-- record.status === '已通过') &&-->
|
||||
<!-- column.key === 'overstatus'-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- <span class="table-operation">-->
|
||||
<!-- <a-->
|
||||
<!-- @click="-->
|
||||
<!-- () => {-->
|
||||
<!-- handlJoinStu(record);-->
|
||||
<!-- }-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- 成绩录入-->
|
||||
<!-- </a>-->
|
||||
<!-- <a-->
|
||||
<!-- @click="-->
|
||||
<!-- () => {-->
|
||||
<!-- handleOverStu(record);-->
|
||||
<!-- }-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- 结业-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <!– 操作2 –>-->
|
||||
<!-- <template-->
|
||||
<!-- v-if="-->
|
||||
<!-- (String(record.applyStatus) === '0' ||-->
|
||||
<!-- record.status === '待审核') &&-->
|
||||
<!-- column.key === 'operation'-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- <span class="table-operation">-->
|
||||
<!-- <a-->
|
||||
<!-- @click="-->
|
||||
<!-- () => {-->
|
||||
<!-- handleSucessStu(record);-->
|
||||
<!-- }-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- 通过-->
|
||||
<!-- </a>-->
|
||||
<!-- <a-->
|
||||
<!-- @click="-->
|
||||
<!-- () => {-->
|
||||
<!-- handleRejectStu(record);-->
|
||||
<!-- }-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- 拒绝-->
|
||||
<!-- </a>-->
|
||||
<!-- <a-->
|
||||
<!-- @click="-->
|
||||
<!-- () => {-->
|
||||
<!-- handleDeleteStu(record);-->
|
||||
<!-- }-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- 删除-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template-->
|
||||
<!-- v-if="-->
|
||||
<!-- (String(record.applyStatus) === '1' ||-->
|
||||
<!-- record.status === '已通过') &&-->
|
||||
<!-- column.key === 'operation'-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- <span class="table-operation">-->
|
||||
<!-- <a-->
|
||||
<!-- @click="-->
|
||||
<!-- () => {-->
|
||||
<!-- handleDeleteStu(record);-->
|
||||
<!-- }-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- 删除-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template-->
|
||||
<!-- v-if="-->
|
||||
<!-- (String(record.applyStatus) === '-1' ||-->
|
||||
<!-- record.status === '已拒绝') &&-->
|
||||
<!-- column.key === 'operation'-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- <span class="table-operation">-->
|
||||
<!-- <a-->
|
||||
<!-- @click="-->
|
||||
<!-- () => {-->
|
||||
<!-- handleDeleteStu(record);-->
|
||||
<!-- }-->
|
||||
<!-- "-->
|
||||
<!-- >-->
|
||||
<!-- 删除-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </template>-->
|
||||
<!-- </a-table>-->
|
||||
<!-- <div class="tableBox" style="margin-top: 50px">-->
|
||||
<!-- <div class="pa">-->
|
||||
<!-- <a-pagination-->
|
||||
<!-- :showSizeChanger="false"-->
|
||||
<!-- showQuickJumper="true"-->
|
||||
<!-- hideOnSinglePage="true"-->
|
||||
<!-- :pageSize="pageSize3"-->
|
||||
<!-- :current="currentPage3"-->
|
||||
<!-- :total="tableDataTotal3"-->
|
||||
<!-- class="pagination"-->
|
||||
<!-- @change="handelChangePage3"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1660,7 +1487,7 @@ 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 OwnerTableModelStudent from "@/components/student/OwnerTableModelStudent";
|
||||
// import StuAdd from "../../components/drawers/StuAdd";
|
||||
// import OwnPower from "../../components/drawers/OwnPower.vue";
|
||||
// import Corpowerlist from "../../components/drawers/CorPowerlist.vue";
|
||||
@@ -1716,6 +1543,7 @@ import TableStudent from "@/components/student/TableStudent";
|
||||
import FJUpload from "@/components/common/FJUpload";
|
||||
import { updateStudent } from "@/api/indexProjStu";
|
||||
import { useStore } from "vuex";
|
||||
import DropDown from "@/components/common/DropDown";
|
||||
|
||||
//列表表格
|
||||
const columns1 = [
|
||||
@@ -2279,7 +2107,8 @@ export default defineComponent({
|
||||
// OwnPower,
|
||||
// Corpowerlist,
|
||||
CommonStudent,
|
||||
TableModelStudent,
|
||||
DropDown,
|
||||
OwnerTableModelStudent,
|
||||
SeeModal,
|
||||
CourseModal,
|
||||
FJUpload,
|
||||
|
||||
@@ -96,12 +96,35 @@
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:loading="tableLoading"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ x: 1550 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
/>
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space>
|
||||
<a-button v-if="record.state==='草稿'" @click="showPub(record)" type="link">发布</a-button>
|
||||
<a-button v-if="record.state==='草稿'" @click="getLearnPathInfo(record.id)" type="link">编辑</a-button>
|
||||
<a-button v-if="record.state==='已发布'" @click="getLearnPathInfo(record.id)" type="link">编辑</a-button>
|
||||
<a-button @click="manage(record.id)" type="link">管理</a-button>
|
||||
<DropDown value="授权">
|
||||
<OwnerTableModelStudent :types="[7,8,9]" :id="record.id" :type="9">权限名单</OwnerTableModelStudent>
|
||||
<CommonStudent :type="7" :id="record.id" title="查看权">查看权</CommonStudent>
|
||||
<CommonStudent :type="8" :id="record.id" title="管理权">管理权</CommonStudent>
|
||||
</DropDown>
|
||||
<DropDown value="更多">
|
||||
<a-button @click="showCopyModal(record.id)" type="link">复制</a-button>
|
||||
<a-button @click="showDeleteModal(record.id)" type="link" danger>删除</a-button>
|
||||
<a-button v-if="record.state==='已发布'" @click="showBackModal(record.id)" type="link">撤回</a-button>
|
||||
<a-button v-if="record.state==='已发布'" @click="showStopModal(record.id)" type="link">结束</a-button>
|
||||
<a-button v-if="record.state==='已结束'" @click="showStartModal(record.id)" type="link">启用</a-button>
|
||||
</DropDown>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<div class="pa">
|
||||
@@ -706,26 +729,27 @@ import { useStore } from "vuex";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import NameInput from "@/components/project/NameInput";
|
||||
import {validateName} from "@/api/index1";
|
||||
import DropDown from "@/components/common/DropDown";
|
||||
|
||||
|
||||
export default {
|
||||
name: "learningPath",
|
||||
components: {
|
||||
// OwnerShip,
|
||||
// PowerList,
|
||||
// QueryRight,
|
||||
// ManageRight,
|
||||
ProjOwnerShip,
|
||||
OrgClass,
|
||||
NameInput,
|
||||
ProjPowerList,
|
||||
ProjCheckShip,
|
||||
CommonStudent,
|
||||
OwnerTableModelStudent,
|
||||
DropDown
|
||||
},
|
||||
|
||||
setup() {
|
||||
const store = useStore();
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
tableLoading: false,
|
||||
out: false,
|
||||
out1: false,
|
||||
number: null,
|
||||
@@ -948,7 +972,8 @@ export default {
|
||||
state.routeStudentsNum = null;
|
||||
};
|
||||
//显示复制窗口
|
||||
const showCopyModal = () => {
|
||||
const showCopyModal = (id) => {
|
||||
state.copyPathId = id;
|
||||
state.copyModal = true;
|
||||
};
|
||||
//关闭复制窗口
|
||||
@@ -981,7 +1006,8 @@ export default {
|
||||
};
|
||||
|
||||
//显示结束窗口
|
||||
const showStopModal = () => {
|
||||
const showStopModal = (id) => {
|
||||
state.stopPathId = id;
|
||||
state.stopModal = true;
|
||||
};
|
||||
//关闭结束窗口
|
||||
@@ -1013,7 +1039,8 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
const showDeleteModal = () => {
|
||||
const showDeleteModal = (id) => {
|
||||
state.deletePathId = id;
|
||||
state.deleteModal = true;
|
||||
};
|
||||
const closeDeleteModal = () => {
|
||||
@@ -1160,265 +1187,12 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
className: "h",
|
||||
dataIndex: "opacation",
|
||||
key: "opacation",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
align: "right",
|
||||
fixed: "right",
|
||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
customRender: (text) => {
|
||||
// console.log(text);
|
||||
return (
|
||||
<div class="operation">
|
||||
<div class="nSelect">
|
||||
{text.record.state === "草稿" ? (
|
||||
<div class="fb">
|
||||
<div
|
||||
style="cursor:pointer"
|
||||
class="jc"
|
||||
onClick={() => {
|
||||
// console.log("text.record.", text.record);
|
||||
showPub(text.record);
|
||||
}}
|
||||
>
|
||||
发布
|
||||
</div>
|
||||
<div
|
||||
class="jc"
|
||||
onClick={() => {
|
||||
// console.log("text.record", text.record);
|
||||
|
||||
getLearnPathInfo(text.record.id);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
{text.record.state === "已发布" ? (
|
||||
<div class="fb">
|
||||
<div
|
||||
class="jc"
|
||||
onClick={() => {
|
||||
// state.out1 = true;
|
||||
// state.pathName = text.record.manager;
|
||||
// // state.pathBg = "";
|
||||
// // state.organizationSelectName = null;
|
||||
// // state.organizationSelectId = null;
|
||||
// state.pathIntro = text.record.remark;
|
||||
// state.editPathId = text.record.id;
|
||||
}}
|
||||
></div>
|
||||
</div>
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
{
|
||||
// text.record.state === "未发布" ? (
|
||||
// <div class="fb">
|
||||
// <div
|
||||
// style="cursor:pointer"
|
||||
// class="jc"
|
||||
// onClick={() => {
|
||||
// showCopyModal();
|
||||
// }}
|
||||
// >
|
||||
// 复制
|
||||
// </div>
|
||||
// </div>
|
||||
// ) : (
|
||||
// <div></div>
|
||||
// )
|
||||
}
|
||||
</div>
|
||||
<div class="tableSelect">
|
||||
<div
|
||||
class="g1"
|
||||
onClick={() => {
|
||||
router.push({
|
||||
path: "/leveladd",
|
||||
});
|
||||
storage.set("routerId", text.record.id);
|
||||
}}
|
||||
>
|
||||
管理
|
||||
</div>
|
||||
{
|
||||
<a-select
|
||||
style="width: 50px;margin-top:2px;margin-left:25px"
|
||||
value="授权"
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option value="权限名单" label="权限名单">
|
||||
<OwnerTableModelStudent types={[7,8,9]} id={text.record.id} type={9}>权限名单</OwnerTableModelStudent>
|
||||
</a-select-option>
|
||||
<a-select-option value="查看权" label="查看权">
|
||||
<CommonStudent type={7} id={text.record.id}>查看权</CommonStudent>
|
||||
</a-select-option>
|
||||
<a-select-option value="管理权" label="管理权">
|
||||
<CommonStudent type={8} id={text.record.id}>管理权</CommonStudent>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
}
|
||||
</div>
|
||||
<div class="tableSelect">
|
||||
{text.record.state === "草稿" ? (
|
||||
<a-select
|
||||
style="width: 50px;margin-top:2px;margin-right:20px;"
|
||||
value="更多"
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option
|
||||
value="复制"
|
||||
label="复制"
|
||||
style="padding-left:35px"
|
||||
>
|
||||
<div
|
||||
onClick={() => {
|
||||
state.copyPathId = text.record.id;
|
||||
showCopyModal();
|
||||
}}
|
||||
>
|
||||
复制
|
||||
</div>
|
||||
</a-select-option>
|
||||
|
||||
<a-select-option
|
||||
value="删除"
|
||||
label="删除"
|
||||
style="padding-left:35px"
|
||||
>
|
||||
<div
|
||||
onClick={() => {
|
||||
state.deletePathId = text.record.id;
|
||||
// console.log("text.record", text.record);
|
||||
showDeleteModal();
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
{text.record.state === "已发布" ? (
|
||||
<div>
|
||||
<a-select
|
||||
style="width: 50px;margin-top:2px;margin-right:20px;"
|
||||
value="更多"
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option
|
||||
value="复制"
|
||||
label="复制"
|
||||
style="padding-left:35px"
|
||||
>
|
||||
<div
|
||||
onClick={() => {
|
||||
state.copyPathId = text.record.id;
|
||||
showCopyModal();
|
||||
}}
|
||||
>
|
||||
复制
|
||||
</div>
|
||||
</a-select-option>
|
||||
|
||||
<a-select-option
|
||||
value="撤回"
|
||||
label="撤回"
|
||||
style="padding-left:35px"
|
||||
>
|
||||
<div
|
||||
onClick={() => {
|
||||
showBackModal(text.record.id);
|
||||
}}
|
||||
>
|
||||
撤回
|
||||
</div>
|
||||
</a-select-option>
|
||||
<a-select-option
|
||||
value="结束"
|
||||
label="结束"
|
||||
style="padding-left:35px"
|
||||
>
|
||||
<div
|
||||
onClick={() => {
|
||||
state.stopPathId = text.record.id;
|
||||
showStopModal();
|
||||
}}
|
||||
>
|
||||
结束
|
||||
</div>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
{text.record.state === "已结束" ? (
|
||||
<div>
|
||||
<a-select
|
||||
style="width: 50px;margin-top:2px;margin-right:20px;"
|
||||
value="更多"
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option
|
||||
value="复制"
|
||||
label="复制"
|
||||
style="padding-left:35px"
|
||||
>
|
||||
<div
|
||||
onClick={() => {
|
||||
state.copyPathId = text.record.id;
|
||||
showCopyModal();
|
||||
}}
|
||||
>
|
||||
复制
|
||||
</div>
|
||||
</a-select-option>
|
||||
{/**
|
||||
<a-select-option
|
||||
value="启用"
|
||||
label="启用"
|
||||
style="padding-left:35px"
|
||||
>
|
||||
<div
|
||||
onClick={() => {
|
||||
showStartModal();
|
||||
}}
|
||||
>
|
||||
启用
|
||||
</div>
|
||||
</a-select-option>
|
||||
*/}
|
||||
|
||||
<a-select-option
|
||||
value="删除"
|
||||
label="删除"
|
||||
style="padding-left:35px"
|
||||
>
|
||||
<div
|
||||
onClick={() => {
|
||||
state.deletePathId = text.record.id;
|
||||
showDeleteModal();
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
scopedSlots: { customRender: "action" }
|
||||
},
|
||||
];
|
||||
return columns;
|
||||
@@ -1506,6 +1280,7 @@ export default {
|
||||
|
||||
//获取学习路径列表
|
||||
const getLearnPath = () => {
|
||||
state.tableLoading = true
|
||||
let obj = {
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
@@ -1532,6 +1307,7 @@ export default {
|
||||
}
|
||||
getTableDate(arr);
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
state.tableLoading = false
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -1569,45 +1345,6 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
//获取路径图详细信息
|
||||
const getLearnPathInfo = (id) => {
|
||||
// console.log("编辑学习路径图id", id);
|
||||
//获取学习路径详情
|
||||
api
|
||||
.getRouterDetail(id)
|
||||
.then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
console.log("获取学习路径详情成功", res.data.data);
|
||||
let detail = res.data.data.routerInfo;
|
||||
state.pathName = detail.name;
|
||||
state.pathBg = detail.picUrl;
|
||||
state.pathBgId = "";
|
||||
state.organizationSelectName = detail.organizationName;
|
||||
state.organizationSelectId = detail.organizationId;
|
||||
state.pathIntro = detail.remark;
|
||||
state.editPathId = id;
|
||||
let arr = imgData.value;
|
||||
arr.forEach((item) => {
|
||||
if (item.dictValue === state.pathBg) {
|
||||
state.pathBgId = item.dictCode;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//for (let i = 0; i < arr.length; i++) {
|
||||
// console.log("arr[i].dictValue", arr[i].dictValue, state.pathBg);
|
||||
// if (arr[i].dictValue === state.pathBg) {
|
||||
// state.pathBgId = arr[i].dictCode;
|
||||
|
||||
// }
|
||||
// }
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取详情失败", err);
|
||||
});
|
||||
state.out1 = true;
|
||||
};
|
||||
//编辑学习路径图
|
||||
const editLearnPath = async () => {
|
||||
if (!state.pathName) {
|
||||
@@ -1809,10 +1546,17 @@ export default {
|
||||
});
|
||||
}
|
||||
);
|
||||
function manage(id){
|
||||
router.push({
|
||||
path: "/leveladd",
|
||||
});
|
||||
storage.set("routerId", id);
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
imgData,
|
||||
manage,
|
||||
selectProjectName,
|
||||
expandTable,
|
||||
handleOut,
|
||||
@@ -2755,6 +2499,10 @@ export default {
|
||||
// position: absolute;
|
||||
// bottom: -40px;
|
||||
}
|
||||
th {
|
||||
background-color: #eff4fc !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
}
|
||||
|
||||
.operation {
|
||||
|
||||
@@ -91,7 +91,35 @@
|
||||
:scroll="{ x: 700 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space align="start">
|
||||
<a-button v-if="record.status===0 || record.status===2 || record.status===-5" @click="handleEdit(record)" type="link">编辑</a-button>
|
||||
<a-button v-if="record.type===1" @click="createSub(record)" type="link">创建子项目</a-button>
|
||||
<a-button v-if="record.type===2" @click="createClass(record)" type="link">创建班级</a-button>
|
||||
<a-button v-if="record.status===0 && record.type===3" @click="showReviewModal(record.projectId)" type="link">提交审核</a-button>
|
||||
<a-button v-if="record.status===1 && record.type===3" @click="showRecallReviewModal(record.projectId)" type="link">撤回审核</a-button>
|
||||
<a-button v-if="record.status===2 && record.type===3" @click="push(record)" type="link">发布</a-button>
|
||||
<a-button v-if="record.status===3 && record.type===3" @click="showBackModal(record.projectId)" type="link">撤回发布</a-button>
|
||||
<a-button v-if="record.status===3 && record.type===3" @click="manage(record)" type="link">管理</a-button>
|
||||
<DropDown value="授权">
|
||||
<OwnerTableModelStudent :types="[4,5,6]" :id="record.projectId" :type="6">权限名单</OwnerTableModelStudent>
|
||||
<CommonStudent :type="4" :id="record.projectId" title="查看权">查看权</CommonStudent>
|
||||
<CommonStudent :type="5" :id="record.projectId" title="管理权">管理权</CommonStudent>
|
||||
</DropDown>
|
||||
<DropDown value="更多">
|
||||
<a-button @click="showCopyModal(record.projectId)" type="link">复制</a-button>
|
||||
<a-button v-if="record.status!==3" @click="showDeleteModal(record.projectId)" type="link" danger>删除</a-button>
|
||||
<a-button v-if="record.status===3" @click="showStartModal(record.projectId)" type="link">存为模版</a-button>
|
||||
<a-button v-if="record.status===3 && record.type===3" @click="showStopModal(record.projectId)" type="link">结束</a-button>
|
||||
<a-button v-if="record.status===-1 && record.type===3" @click="showBackFinashModal(record.projectId)" type="link">撤回</a-button>
|
||||
<a-button v-if="record.status!==3 && record.type===3" @click="baseInfo(record)" type="link">基础信息</a-button>
|
||||
</DropDown>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
<div class="tableBox">
|
||||
<div class="pa">
|
||||
@@ -837,7 +865,8 @@ import * as moment from "moment";
|
||||
import NameInput from "@/components/project/NameInput";
|
||||
import { validateName } from "@/api/index1";
|
||||
import CommonStudent from "@/components/student/CommonStudent";
|
||||
import TableModelStudent from "@/components/student/TableModelStudent";
|
||||
import OwnerTableModelStudent from "@/components/student/OwnerTableModelStudent";
|
||||
import DropDown from "@/components/common/DropDown";
|
||||
|
||||
export default {
|
||||
name: "projectManage",
|
||||
@@ -847,10 +876,11 @@ export default {
|
||||
ProjCheckShip,
|
||||
NameInput,
|
||||
ProjectManager,
|
||||
// ProjectClass,
|
||||
OrgClass,
|
||||
TrainClass,
|
||||
// ProjManageShip
|
||||
CommonStudent,
|
||||
OwnerTableModelStudent,
|
||||
DropDown,
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
@@ -1397,265 +1427,9 @@ export default {
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
width: 300,
|
||||
align: "center",
|
||||
align: "right",
|
||||
fixed: "right",
|
||||
customRender: (value) => {
|
||||
// console.log("value", value.record.type, value.record.status);
|
||||
return (
|
||||
<div className="operation">
|
||||
{value.record.status === 0 ||
|
||||
value.record.status === 2 ||
|
||||
value.record.status === -5 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
if (value.record.type === 1 || value.record.type === 2) {
|
||||
state.doublepro = true;
|
||||
state.projectInfo = value.record;
|
||||
} else {
|
||||
console.log(value.record);
|
||||
router.push({
|
||||
path: "/projectadd",
|
||||
query: {
|
||||
projectId: value.record.projectId,
|
||||
parentId: value.record.parentId,
|
||||
parentName: value.record.parentName,
|
||||
},
|
||||
});
|
||||
}
|
||||
}}
|
||||
style="cursor:pointer;"
|
||||
className="operation1"
|
||||
>
|
||||
编辑
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.status === 0 && value.record.type === 3 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
showReviewModal(value.record.projectId);
|
||||
}}
|
||||
style="cursor:pointer"
|
||||
class="operation3"
|
||||
>
|
||||
提交审核
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.status === 1 && value.record.type === 3 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
showRecallReviewModal(value.record.projectId);
|
||||
}}
|
||||
style="cursor:pointer"
|
||||
class="operation3"
|
||||
>
|
||||
撤回审核
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.status === 2 && value.record.type === 3 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
let time =
|
||||
value.record.beginTime + "-" + value.record.endTime;
|
||||
let obj = {
|
||||
projectId: value.record.projectId,
|
||||
name: value.record.name,
|
||||
time: time,
|
||||
};
|
||||
showProjectPub(obj);
|
||||
}}
|
||||
style="cursor:pointer"
|
||||
class="operation3"
|
||||
>
|
||||
发布
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.status === 3 && value.record.type === 3 ? (
|
||||
<div
|
||||
onClick={() => {
|
||||
router.push({
|
||||
path: "/taskpage",
|
||||
query: { projectId: value.record.projectId },
|
||||
});
|
||||
storage.set("projectId", value.record.projectId);
|
||||
}}
|
||||
>
|
||||
管理
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.status === 3 && value.record.type === 3 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
showBackModal(value.record.projectId);
|
||||
}}
|
||||
style="cursor:pointer; margin-left: 21px; width:70px;"
|
||||
class="operation3"
|
||||
>
|
||||
撤回发布
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{
|
||||
<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"
|
||||
style="cursor: pointer"
|
||||
onClick={() => {
|
||||
state.projectInfo = {
|
||||
parentName: value.record.name,
|
||||
parentId: value.record.projectId,
|
||||
name: "",
|
||||
sourceBelongId: value.record.sourceBelongId,
|
||||
sourceBelongName: value.record.sourceBelongName,
|
||||
manager: value.record.manager,
|
||||
managerId: value.record.managerId,
|
||||
systemId: value.record.systemId,
|
||||
type: 2,
|
||||
};
|
||||
state.estabish = true;
|
||||
}}
|
||||
>
|
||||
创建子项目
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.type === 2 ? (
|
||||
<span
|
||||
className="operation3"
|
||||
style="cursor: pointer"
|
||||
onClick={() => {
|
||||
router.push({
|
||||
path: "/projectadd",
|
||||
query: {
|
||||
parentId: value.record.projectId,
|
||||
parentName:
|
||||
value.record.parentName + "——" + value.record.name,
|
||||
ptojectType: 3,
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
创建班级
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
<div className="tableSelect">
|
||||
<a-select
|
||||
style="width: 50px"
|
||||
value="更多"
|
||||
// options={state.projectNameList}
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option value="复制" label="复制">
|
||||
<div
|
||||
onClick={() => {
|
||||
showCopyModal(value.record.projectId);
|
||||
}}
|
||||
>
|
||||
复制
|
||||
</div>
|
||||
</a-select-option>
|
||||
{value.record.status !== 3 ? (
|
||||
<a-select-option value="删除" label="删除">
|
||||
<div
|
||||
onClick={() => {
|
||||
showDeleteModal(value.record.projectId);
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
</a-select-option>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.type === 3 ? (
|
||||
<a-select-option value="存为模版" label="存为模版">
|
||||
<div
|
||||
onClick={() => {
|
||||
showStartModal(value.record.projectId);
|
||||
}}
|
||||
>
|
||||
存为模版
|
||||
</div>
|
||||
</a-select-option>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.status === 3 && value.record.type === 3 ? (
|
||||
<a-select-option value="结束" label="结束">
|
||||
<div
|
||||
onClick={() => {
|
||||
showStopModal(value.record.projectId);
|
||||
}}
|
||||
>
|
||||
结束
|
||||
</div>
|
||||
</a-select-option>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
|
||||
{value.record.status === -1 && value.record.type === 3 ? (
|
||||
<a-select-option value="撤回" label="撤回">
|
||||
<div
|
||||
onClick={() => {
|
||||
showBackFinashModal(value.record.projectId);
|
||||
}}
|
||||
>
|
||||
撤回
|
||||
</div>
|
||||
</a-select-option>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.status !== 3 && value.record.type === 3 ? (
|
||||
<a-select-option value="基础信息" label="基础信息">
|
||||
<div
|
||||
onClick={() => {
|
||||
router.push({
|
||||
path: "/taskpage",
|
||||
query: { projectId: value.record.projectId },
|
||||
});
|
||||
storage.set("projectId", value.record.projectId);
|
||||
}}
|
||||
>
|
||||
基础信息
|
||||
</div>
|
||||
</a-select-option>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
scopedSlots: {customRender: "action"}
|
||||
},
|
||||
]);
|
||||
const getTableDate = () => {
|
||||
@@ -1699,6 +1473,21 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
function handleEdit(record){
|
||||
if (record.type === 1 || record.type === 2) {
|
||||
state.doublepro = true;
|
||||
state.projectInfo = record;
|
||||
} else {
|
||||
router.push({
|
||||
path: "/projectadd",
|
||||
query: {
|
||||
projectId: record.projectId,
|
||||
parentId: record.parentId,
|
||||
parentName: record.parentName,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getTableDate();
|
||||
// 翻页
|
||||
@@ -1789,10 +1578,65 @@ export default {
|
||||
state.projectInfo.sourceBelongName = t;
|
||||
state.projectInfo.sourceBelongFullName = orgName;
|
||||
}
|
||||
function push(record){
|
||||
showProjectPub({
|
||||
projectId: record.projectId,
|
||||
name: record.name,
|
||||
time: record.beginTime + "-" + record.endTime,
|
||||
});
|
||||
}
|
||||
function manage(record){
|
||||
router.push({
|
||||
path: "/taskpage",
|
||||
query: { projectId: record.projectId },
|
||||
});
|
||||
storage.set("projectId", record.projectId);
|
||||
}
|
||||
|
||||
function createSub(record){
|
||||
state.projectInfo = {
|
||||
parentName: record.name,
|
||||
parentId: record.projectId,
|
||||
name: "",
|
||||
sourceBelongId: record.sourceBelongId,
|
||||
sourceBelongName: record.sourceBelongName,
|
||||
manager: record.manager,
|
||||
managerId: record.managerId,
|
||||
systemId: record.systemId,
|
||||
type: 2,
|
||||
};
|
||||
state.estabish = true;
|
||||
}
|
||||
|
||||
function createClass(record){
|
||||
router.push({
|
||||
path: "/projectadd",
|
||||
query: {
|
||||
parentId: record.projectId,
|
||||
parentName: record.parentName + "——" + record.name,
|
||||
ptojectType: 3,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function baseInfo(record){
|
||||
router.push({
|
||||
path: "/taskpage",
|
||||
query: { projectId: record.projectId },
|
||||
});
|
||||
storage.set("projectId", record.projectId);
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
dayjs,
|
||||
handleEdit,
|
||||
baseInfo,
|
||||
createClass,
|
||||
createSub,
|
||||
manage,
|
||||
push,
|
||||
moment,
|
||||
managerChange,
|
||||
reFinashedProject,
|
||||
@@ -2046,6 +1890,10 @@ export default {
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: #eff4fc;
|
||||
}
|
||||
th {
|
||||
background-color: #eff4fc !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
}
|
||||
|
||||
.tableBox {
|
||||
|
||||
Reference in New Issue
Block a user