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