mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
feat:合并
This commit is contained in:
@@ -83,39 +83,132 @@
|
||||
</div>
|
||||
<!-- 搜索框及按钮 -->
|
||||
<!-- 表格 -->
|
||||
<div style="padding:10px 35px">
|
||||
<div style="padding: 10px 35px">
|
||||
<a-table
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
style="border: 1px solid #f2f6fe;"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
:loading="tableLoading"
|
||||
@expand="expandTable"
|
||||
:scroll="{x:'max-content'}"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
:pagination="false"
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space>
|
||||
<a-button v-if="(record.status===0 || record.status===2 || record.status===-5) && checkPer(record.permissions)" @click="handleEdit(record)" type="link">编辑</a-button>
|
||||
<a-button v-if="record.type===1 && checkPer(record.permissions)" @click="createSub(record)" type="link">创建子项目</a-button>
|
||||
<a-button v-if="record.type===2 && checkPer(record.permissions)" @click="createClass(record)" type="link">创建班级</a-button>
|
||||
<a-button v-if="record.status===0 && record.type===3 && checkPer(record.permissions)" @click="showReviewModal(record.id)" type="link">提交审核</a-button>
|
||||
<a-button v-if="record.status===1 && record.type===3 && checkPer(record.permissions)" @click="showRecallReviewModal(record.id)" type="link">撤回审核</a-button>
|
||||
<a-button v-if="record.status===2 && record.type===3 && checkPer(record.permissions)" @click="push(record)" type="link">发布</a-button>
|
||||
<a-button v-if="record.status===3 && record.type===3 && checkPer(record.permissions)" @click="showBackModal(record.id)" type="link">撤回发布</a-button>
|
||||
<a-button v-if="record.type===3" @click="baseInfo(record)" type="link">管理</a-button>
|
||||
<DropDown v-if="checkPer(record.permissions)" 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>
|
||||
<a-button
|
||||
v-if="
|
||||
(record.status === 0 ||
|
||||
record.status === 2 ||
|
||||
record.status === -5) &&
|
||||
checkPer(record.permissions)
|
||||
"
|
||||
@click="handleEdit(record)"
|
||||
type="link"
|
||||
>编辑</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.type === 1 && checkPer(record.permissions)"
|
||||
@click="createSub(record)"
|
||||
type="link"
|
||||
>创建子项目</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.type === 2 && checkPer(record.permissions)"
|
||||
@click="createClass(record)"
|
||||
type="link"
|
||||
>创建班级</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="
|
||||
record.status === 0 &&
|
||||
record.type === 3 &&
|
||||
checkPer(record.permissions)
|
||||
"
|
||||
@click="showReviewModal(record.id)"
|
||||
type="link"
|
||||
>提交审核</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="
|
||||
record.status === 1 &&
|
||||
record.type === 3 &&
|
||||
checkPer(record.permissions)
|
||||
"
|
||||
@click="showRecallReviewModal(record.id)"
|
||||
type="link"
|
||||
>撤回审核</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="
|
||||
record.status === 2 &&
|
||||
record.type === 3 &&
|
||||
checkPer(record.permissions)
|
||||
"
|
||||
@click="push(record)"
|
||||
type="link"
|
||||
>发布</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="
|
||||
record.status === 3 &&
|
||||
record.type === 3 &&
|
||||
checkPer(record.permissions)
|
||||
"
|
||||
@click="showBackModal(record.id)"
|
||||
type="link"
|
||||
>撤回发布</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.type === 3"
|
||||
@click="baseInfo(record)"
|
||||
type="link"
|
||||
>管理</a-button
|
||||
>
|
||||
<DropDown v-if="checkPer(record.permissions)" 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 v-if="checkPer(record.permissions)" value="更多">
|
||||
<a-button @click="showCopyModal(record.id)" type="link">复制</a-button>
|
||||
<a-button v-if="record.status!==3" @click="showDeleteModal(record.id)" type="link" danger>删除</a-button>
|
||||
<a-button v-if="record.status===3" @click="showStartModal(record.id)" type="link">存为模版</a-button>
|
||||
<a-button v-if="record.status===3 && record.type===3" @click="showStopModal(record.id)" type="link">结束</a-button>
|
||||
<a-button v-if="record.status!==-1 && record.type===3" @click="showBackFinashModal(record.projectId)" type="link">撤回</a-button>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="更多">
|
||||
<a-button @click="showCopyModal(record.id)" type="link"
|
||||
>复制</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.status !== 3"
|
||||
@click="showDeleteModal(record.id)"
|
||||
type="link"
|
||||
danger
|
||||
>删除</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.status === 3"
|
||||
@click="showStartModal(record.id)"
|
||||
type="link"
|
||||
>存为模版</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.status === 3 && record.type === 3"
|
||||
@click="showStopModal(record.id)"
|
||||
type="link"
|
||||
>结束</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.status !== -1 && record.type === 3"
|
||||
@click="showBackFinashModal(record.projectId)"
|
||||
type="link"
|
||||
>撤回</a-button
|
||||
>
|
||||
</DropDown>
|
||||
</a-space>
|
||||
</template>
|
||||
@@ -867,7 +960,7 @@ import { validateName } from "@/api/index1";
|
||||
import CommonStudent from "@/components/student/CommonStudent";
|
||||
import OwnerTableModelStudent from "@/components/student/OwnerTableModelStudent";
|
||||
import DropDown from "@/components/common/DropDown";
|
||||
import {checkPer} from "@/utils/utils";
|
||||
import { checkPer } from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
name: "projectManage",
|
||||
@@ -1428,7 +1521,7 @@ export default {
|
||||
align: "right",
|
||||
fixed: "right",
|
||||
width: 300,
|
||||
scopedSlots: {customRender: "action"}
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
]);
|
||||
const getTableDate = () => {
|
||||
@@ -1472,7 +1565,7 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
function handleEdit(record){
|
||||
function handleEdit(record) {
|
||||
if (record.type === 1 || record.type === 2) {
|
||||
state.doublepro = true;
|
||||
state.projectInfo = record;
|
||||
@@ -1577,14 +1670,14 @@ export default {
|
||||
state.projectInfo.sourceBelongName = t;
|
||||
state.projectInfo.sourceBelongFullName = orgName;
|
||||
}
|
||||
function push(record){
|
||||
function push(record) {
|
||||
showProjectPub({
|
||||
projectId: record.projectId,
|
||||
name: record.name,
|
||||
time: record.beginTime + "-" + record.endTime,
|
||||
});
|
||||
}
|
||||
function manage(record){
|
||||
function manage(record) {
|
||||
router.push({
|
||||
path: "/taskpage",
|
||||
query: { projectId: record.projectId },
|
||||
@@ -1592,7 +1685,7 @@ export default {
|
||||
storage.set("projectId", record.projectId);
|
||||
}
|
||||
|
||||
function createSub(record){
|
||||
function createSub(record) {
|
||||
state.projectInfo = {
|
||||
parentName: record.name,
|
||||
parentId: record.id,
|
||||
@@ -1607,25 +1700,24 @@ export default {
|
||||
state.estabish = true;
|
||||
}
|
||||
|
||||
function createClass(record){
|
||||
function createClass(record) {
|
||||
router.push({
|
||||
path: "/projectadd",
|
||||
query: {
|
||||
parentId: record.id,
|
||||
parentName: record.parentName + "——" + record.name,
|
||||
ptojectType: 3,
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function baseInfo(record){
|
||||
router.push({
|
||||
path: "/taskpage",
|
||||
query: { projectId: record.id },
|
||||
});
|
||||
storage.set("projectId", record.projectId);
|
||||
}
|
||||
|
||||
function baseInfo(record) {
|
||||
router.push({
|
||||
path: "/taskpage",
|
||||
query: { projectId: record.id },
|
||||
});
|
||||
storage.set("projectId", record.projectId);
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
@@ -1692,7 +1784,7 @@ export default {
|
||||
copyProject,
|
||||
closeReminderModal,
|
||||
okReminderModal,
|
||||
checkPer
|
||||
checkPer,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user