mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 05:16:45 +08:00
--fix 权限名单
This commit is contained in:
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="drawerMain" id="ProjCheckship" style="">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">
|
<div class="headerTitle">
|
||||||
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员",4: "查看权",5: "管理权"}[type] || title }}
|
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员"}[type] || title }}
|
||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
style="width: 29px; height: 29px; cursor: pointer"
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
@@ -288,32 +288,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<div @click="openDrawer">
|
<a-button @click="openDrawer" type="link"><slot></slot></a-button>
|
||||||
<slot></slot>
|
|
||||||
</div>
|
</div>
|
||||||
</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
|
<a-modal
|
||||||
:style="{padding: 0,position: relative,right: '-20%'}"
|
:style="{padding: 0,position: relative,right: '-20%'}"
|
||||||
:closable="true"
|
:closable="true"
|
||||||
|
|||||||
@@ -74,9 +74,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<div @click="openDrawer">
|
<a-button @click="openDrawer" type="link"><slot></slot></a-button>
|
||||||
<slot></slot>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|||||||
@@ -315,41 +315,23 @@
|
|||||||
>
|
>
|
||||||
<template #bodyCell="{ record, column }">
|
<template #bodyCell="{ record, column }">
|
||||||
<template v-if="column.key === 'operation'">
|
<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 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 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="() => 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>
|
<a-button v-if="record.status===2" @click="() => handleGuan22(record, String(record.courseform))" type="link">管理</a-button>
|
||||||
<div className="tableSelect" style="margin-left: 0">
|
<DropDown value="授权">
|
||||||
<a-select value="授权" dropdownClassName="tabledropdown">
|
<OwnerTableModelStudent :types="[10,11,12]" :id="record.offcourseId">权限名单</OwnerTableModelStudent>
|
||||||
<a-select-option value="权限名单" label="权限名单">
|
<CommonStudent :type="10" :id="record.offcourseId" title="查看权">查看权</CommonStudent>
|
||||||
<TableModelStudent :types="[10,11,12]" :id="record.offcourseId">权限名单</TableModelStudent>
|
<CommonStudent :type="11" :id="record.offcourseId" title="管理权">管理权</CommonStudent>
|
||||||
</a-select-option>
|
</DropDown>
|
||||||
<a-select-option value="查看权" label="查看权">
|
<DropDown value="更多">
|
||||||
<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-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-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="() => 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 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-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除</a-button>
|
||||||
</a-select-option>
|
</DropDown>
|
||||||
</a-select>
|
|
||||||
</div>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -1128,161 +1110,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</TableStudent>
|
</TableStudent>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1660,7 +1487,7 @@ import * as apis from "../../api/indexTaskManage";
|
|||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import CommonStudent from "@/components/student/CommonStudent";
|
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 StuAdd from "../../components/drawers/StuAdd";
|
||||||
// import OwnPower from "../../components/drawers/OwnPower.vue";
|
// import OwnPower from "../../components/drawers/OwnPower.vue";
|
||||||
// import Corpowerlist from "../../components/drawers/CorPowerlist.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 FJUpload from "@/components/common/FJUpload";
|
||||||
import { updateStudent } from "@/api/indexProjStu";
|
import { updateStudent } from "@/api/indexProjStu";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
|
import DropDown from "@/components/common/DropDown";
|
||||||
|
|
||||||
//列表表格
|
//列表表格
|
||||||
const columns1 = [
|
const columns1 = [
|
||||||
@@ -2279,7 +2107,8 @@ export default defineComponent({
|
|||||||
// OwnPower,
|
// OwnPower,
|
||||||
// Corpowerlist,
|
// Corpowerlist,
|
||||||
CommonStudent,
|
CommonStudent,
|
||||||
TableModelStudent,
|
DropDown,
|
||||||
|
OwnerTableModelStudent,
|
||||||
SeeModal,
|
SeeModal,
|
||||||
CourseModal,
|
CourseModal,
|
||||||
FJUpload,
|
FJUpload,
|
||||||
|
|||||||
@@ -96,12 +96,35 @@
|
|||||||
style="border: 1px solid #f2f6fe"
|
style="border: 1px solid #f2f6fe"
|
||||||
:columns="tableDataFunc()"
|
:columns="tableDataFunc()"
|
||||||
:data-source="tableData"
|
:data-source="tableData"
|
||||||
:loading="tableDataTotal === -1 ? true : false"
|
:loading="tableLoading"
|
||||||
expandRowByClick="true"
|
expandRowByClick="true"
|
||||||
:scroll="{ x: 1550 }"
|
:scroll="{ x: 1550 }"
|
||||||
@expand="expandTable"
|
@expand="expandTable"
|
||||||
:pagination="false"
|
: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>
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
<div class="pa">
|
<div class="pa">
|
||||||
@@ -706,26 +729,27 @@ import { useStore } from "vuex";
|
|||||||
import OrgClass from "@/components/project/OrgClass";
|
import OrgClass from "@/components/project/OrgClass";
|
||||||
import NameInput from "@/components/project/NameInput";
|
import NameInput from "@/components/project/NameInput";
|
||||||
import {validateName} from "@/api/index1";
|
import {validateName} from "@/api/index1";
|
||||||
|
import DropDown from "@/components/common/DropDown";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "learningPath",
|
name: "learningPath",
|
||||||
components: {
|
components: {
|
||||||
// OwnerShip,
|
|
||||||
// PowerList,
|
|
||||||
// QueryRight,
|
|
||||||
// ManageRight,
|
|
||||||
ProjOwnerShip,
|
ProjOwnerShip,
|
||||||
OrgClass,
|
OrgClass,
|
||||||
NameInput,
|
NameInput,
|
||||||
ProjPowerList,
|
ProjPowerList,
|
||||||
ProjCheckShip,
|
ProjCheckShip,
|
||||||
|
CommonStudent,
|
||||||
|
OwnerTableModelStudent,
|
||||||
|
DropDown
|
||||||
},
|
},
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
tableLoading: false,
|
||||||
out: false,
|
out: false,
|
||||||
out1: false,
|
out1: false,
|
||||||
number: null,
|
number: null,
|
||||||
@@ -948,7 +972,8 @@ export default {
|
|||||||
state.routeStudentsNum = null;
|
state.routeStudentsNum = null;
|
||||||
};
|
};
|
||||||
//显示复制窗口
|
//显示复制窗口
|
||||||
const showCopyModal = () => {
|
const showCopyModal = (id) => {
|
||||||
|
state.copyPathId = id;
|
||||||
state.copyModal = true;
|
state.copyModal = true;
|
||||||
};
|
};
|
||||||
//关闭复制窗口
|
//关闭复制窗口
|
||||||
@@ -981,7 +1006,8 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//显示结束窗口
|
//显示结束窗口
|
||||||
const showStopModal = () => {
|
const showStopModal = (id) => {
|
||||||
|
state.stopPathId = id;
|
||||||
state.stopModal = true;
|
state.stopModal = true;
|
||||||
};
|
};
|
||||||
//关闭结束窗口
|
//关闭结束窗口
|
||||||
@@ -1013,7 +1039,8 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const showDeleteModal = () => {
|
const showDeleteModal = (id) => {
|
||||||
|
state.deletePathId = id;
|
||||||
state.deleteModal = true;
|
state.deleteModal = true;
|
||||||
};
|
};
|
||||||
const closeDeleteModal = () => {
|
const closeDeleteModal = () => {
|
||||||
@@ -1160,265 +1187,12 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
className: "h",
|
dataIndex: "operation",
|
||||||
dataIndex: "opacation",
|
key: "operation",
|
||||||
key: "opacation",
|
|
||||||
width: "20%",
|
width: "20%",
|
||||||
align: "center",
|
align: "right",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
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>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
return columns;
|
return columns;
|
||||||
@@ -1506,6 +1280,7 @@ export default {
|
|||||||
|
|
||||||
//获取学习路径列表
|
//获取学习路径列表
|
||||||
const getLearnPath = () => {
|
const getLearnPath = () => {
|
||||||
|
state.tableLoading = true
|
||||||
let obj = {
|
let obj = {
|
||||||
pageNo: state.currentPage,
|
pageNo: state.currentPage,
|
||||||
pageSize: state.pageSize,
|
pageSize: state.pageSize,
|
||||||
@@ -1532,6 +1307,7 @@ export default {
|
|||||||
}
|
}
|
||||||
getTableDate(arr);
|
getTableDate(arr);
|
||||||
state.tableDataTotal = Number(res.data.data.total);
|
state.tableDataTotal = Number(res.data.data.total);
|
||||||
|
state.tableLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.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 () => {
|
const editLearnPath = async () => {
|
||||||
if (!state.pathName) {
|
if (!state.pathName) {
|
||||||
@@ -1809,10 +1546,17 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
function manage(id){
|
||||||
|
router.push({
|
||||||
|
path: "/leveladd",
|
||||||
|
});
|
||||||
|
storage.set("routerId", id);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
imgData,
|
imgData,
|
||||||
|
manage,
|
||||||
selectProjectName,
|
selectProjectName,
|
||||||
expandTable,
|
expandTable,
|
||||||
handleOut,
|
handleOut,
|
||||||
@@ -2755,6 +2499,10 @@ export default {
|
|||||||
// position: absolute;
|
// position: absolute;
|
||||||
// bottom: -40px;
|
// bottom: -40px;
|
||||||
}
|
}
|
||||||
|
th {
|
||||||
|
background-color: #eff4fc !important;
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.operation {
|
.operation {
|
||||||
|
|||||||
@@ -91,7 +91,35 @@
|
|||||||
:scroll="{ x: 700 }"
|
:scroll="{ x: 700 }"
|
||||||
@expand="expandTable"
|
@expand="expandTable"
|
||||||
:pagination="false"
|
: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>
|
</a-table>
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
<div class="pa">
|
<div class="pa">
|
||||||
@@ -837,7 +865,8 @@ import * as moment from "moment";
|
|||||||
import NameInput from "@/components/project/NameInput";
|
import NameInput from "@/components/project/NameInput";
|
||||||
import { validateName } from "@/api/index1";
|
import { validateName } from "@/api/index1";
|
||||||
import CommonStudent from "@/components/student/CommonStudent";
|
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 {
|
export default {
|
||||||
name: "projectManage",
|
name: "projectManage",
|
||||||
@@ -847,10 +876,11 @@ export default {
|
|||||||
ProjCheckShip,
|
ProjCheckShip,
|
||||||
NameInput,
|
NameInput,
|
||||||
ProjectManager,
|
ProjectManager,
|
||||||
// ProjectClass,
|
|
||||||
OrgClass,
|
OrgClass,
|
||||||
TrainClass,
|
TrainClass,
|
||||||
// ProjManageShip
|
CommonStudent,
|
||||||
|
OwnerTableModelStudent,
|
||||||
|
DropDown,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@@ -1397,265 +1427,9 @@ export default {
|
|||||||
dataIndex: "operation",
|
dataIndex: "operation",
|
||||||
key: "operation",
|
key: "operation",
|
||||||
width: 300,
|
width: 300,
|
||||||
align: "center",
|
align: "right",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
customRender: (value) => {
|
scopedSlots: {customRender: "action"}
|
||||||
// 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>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const getTableDate = () => {
|
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();
|
getTableDate();
|
||||||
// 翻页
|
// 翻页
|
||||||
@@ -1789,10 +1578,65 @@ export default {
|
|||||||
state.projectInfo.sourceBelongName = t;
|
state.projectInfo.sourceBelongName = t;
|
||||||
state.projectInfo.sourceBelongFullName = orgName;
|
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 {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
dayjs,
|
dayjs,
|
||||||
|
handleEdit,
|
||||||
|
baseInfo,
|
||||||
|
createClass,
|
||||||
|
createSub,
|
||||||
|
manage,
|
||||||
|
push,
|
||||||
moment,
|
moment,
|
||||||
managerChange,
|
managerChange,
|
||||||
reFinashedProject,
|
reFinashedProject,
|
||||||
@@ -2046,6 +1890,10 @@ export default {
|
|||||||
.ant-table-thead > tr > th {
|
.ant-table-thead > tr > th {
|
||||||
background-color: #eff4fc;
|
background-color: #eff4fc;
|
||||||
}
|
}
|
||||||
|
th {
|
||||||
|
background-color: #eff4fc !important;
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableBox {
|
.tableBox {
|
||||||
|
|||||||
Reference in New Issue
Block a user