mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
提交专业力必修
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
<div class="growthpath">
|
||||
<div class="filterItems">
|
||||
<div class="select multi" style="min-width: 264px; height: 40px">
|
||||
<PostSelectNew v-model:value="statusPost">
|
||||
</PostSelectNew>
|
||||
<PostSelectNew v-model:value="statusPost"> </PostSelectNew>
|
||||
</div>
|
||||
<div class="select multi" style="min-width: 181px; height: 40px">
|
||||
<!-- <RankSelect
|
||||
@@ -11,13 +10,6 @@
|
||||
></RankSelect> -->
|
||||
<OfficeSelect v-model:value="statusOffice" :searchData="statusPost" />
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-input
|
||||
style="width: 181px; height: 40px; border-radius: 8px"
|
||||
v-model:value="nameOrUserNo"
|
||||
placeholder="请输入创建人姓名/工号"
|
||||
/>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
v-model:value="statusValue"
|
||||
@@ -70,29 +62,17 @@
|
||||
>管理</a-button
|
||||
>
|
||||
<DropDown v-if="record?.permissions?.includes('17')" value="授权">
|
||||
<OwnerTableModelStudent
|
||||
:types="[15, 16, 17]"
|
||||
:id="record.id"
|
||||
:type="17"
|
||||
>归属权</OwnerTableModelStudent
|
||||
<TableModelStudent :id="record.id" :type="17"
|
||||
>归属权</TableModelStudent
|
||||
>
|
||||
<CommonStudent
|
||||
:type="15"
|
||||
:selectStu="true"
|
||||
:id="record.id"
|
||||
title="查看权"
|
||||
>查看权</CommonStudent
|
||||
<TableModelStudent :id="record.id" :type="15"
|
||||
>查看权</TableModelStudent
|
||||
>
|
||||
<CommonStudent
|
||||
:type="16"
|
||||
:id="record.id"
|
||||
:selectStu="true"
|
||||
title="管理权"
|
||||
>管理权</CommonStudent
|
||||
<TableModelStudent :id="record.id" :type="16"
|
||||
>管理权</TableModelStudent
|
||||
>
|
||||
</DropDown>
|
||||
<a-dropdown
|
||||
v-if="checkGrowthPer(record.permissions)"
|
||||
:getPopupContainer="(triggerNode) => triggerNode.parentNode"
|
||||
:trigger="['click']"
|
||||
>
|
||||
@@ -102,7 +82,12 @@
|
||||
</a>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" v-if="record.isPublished">
|
||||
<a-menu-item
|
||||
key="1"
|
||||
v-if="
|
||||
record.isPublished && checkGrowthPer(record.permissions)
|
||||
"
|
||||
>
|
||||
<a-button type="link" @click="withdraw(record)">
|
||||
撤回
|
||||
</a-button>
|
||||
@@ -142,7 +127,7 @@
|
||||
v-model:visible="bg_check"
|
||||
:footer="null"
|
||||
closable="false"
|
||||
style="margin-top: 400px"
|
||||
style="margin-top: 350px"
|
||||
@cancel="of_exit"
|
||||
>
|
||||
<div
|
||||
@@ -218,7 +203,7 @@
|
||||
</div>
|
||||
<div class="bg_body_bt">
|
||||
<div class="bg_body_bttext">
|
||||
<span>完成选修</span>
|
||||
<span>完成选修数量</span>
|
||||
</div>
|
||||
<div class="bg_body_input">
|
||||
<a-input-number
|
||||
@@ -244,15 +229,15 @@
|
||||
<div class="bg_body_input">
|
||||
<a-radio-group v-model:value="matchRules">
|
||||
<div style="display: flex">
|
||||
<a-radio :value="1" style="margin-bottom: 15px"
|
||||
<a-radio value="1" style="margin-bottom: 15px"
|
||||
>自动匹配学员</a-radio
|
||||
><br />
|
||||
<a-radio :value="2">不自动匹配学员</a-radio>
|
||||
<a-radio value="2">不自动匹配学员</a-radio>
|
||||
</div>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="bg_body_bt" style="align-items: flex-start">
|
||||
<div class="bg_body_bt" style="align-items: flex-start">
|
||||
<div class="bg_body_bttext">
|
||||
<div class="bg_body_btimg">
|
||||
<img
|
||||
@@ -263,13 +248,16 @@
|
||||
<span>选择模板</span>
|
||||
</div>
|
||||
<div class="bg_body_input">
|
||||
<a-radio-group v-model:value="matchRules">
|
||||
<a-radio :value="1" style="margin-bottom: 15px">路径图</a-radio
|
||||
><br />
|
||||
<a-radio :value="2">任务列表</a-radio>
|
||||
<a-radio-group v-model:value="template">
|
||||
<div style="display: flex">
|
||||
<a-radio :value="1" style="margin-bottom: 15px"
|
||||
>路径图</a-radio
|
||||
><br />
|
||||
<a-radio :value="2">任务列表</a-radio>
|
||||
</div>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="bg_body_bt" style="align-items: flex-start">
|
||||
<div class="bg_body_bttext">
|
||||
<span>说明</span>
|
||||
@@ -306,7 +294,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<UpdateRecord v-model:Avisible="Avisible" />
|
||||
<UpdateRecord ref="UpdateRecordRef" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -322,18 +310,13 @@ import OfficeSelect from "@/components/growthpath/OfficeSelect";
|
||||
import { checkGrowthPer } from "@/utils/utils";
|
||||
import DropDown from "@/components/growthpath/GrowthDropDown";
|
||||
import CommonStudent from "@/components/growthpath/GrowthCommonStudent";
|
||||
import OwnerTableModelStudent from "@/components/growthpath/GrowthOwnerTable";
|
||||
import TableModelStudent from "@/components/growthpath/GrowthTableModel";
|
||||
import UpdateRecord from "@/components/growthpath/UpdateRecord";
|
||||
import { useStore } from "vuex";
|
||||
import {
|
||||
listData,
|
||||
addEdit,
|
||||
getEditData,
|
||||
handleGrowth,
|
||||
getPublishInfo,
|
||||
getCopyData,
|
||||
copyCreate,
|
||||
published,
|
||||
withdrawal,
|
||||
updatePostInfomation,
|
||||
} from "@/api/growthpath";
|
||||
export default {
|
||||
@@ -345,7 +328,7 @@ export default {
|
||||
RankSelect,
|
||||
DropDown,
|
||||
CommonStudent,
|
||||
OwnerTableModelStudent,
|
||||
TableModelStudent,
|
||||
UpdateRecord,
|
||||
OfficeSelect,
|
||||
},
|
||||
@@ -360,7 +343,6 @@ export default {
|
||||
const state = reactive({
|
||||
band: null,
|
||||
statusOffices: null,
|
||||
Avisible: false,
|
||||
bg_check: false,
|
||||
statusPostCreate: [],
|
||||
statusRankCreate: [],
|
||||
@@ -368,14 +350,14 @@ export default {
|
||||
matStudens: "",
|
||||
pathWays: "",
|
||||
statusPost: null,
|
||||
matchRules: "1",
|
||||
template: "1",
|
||||
statusPostMaps: [],
|
||||
statusPosts: null,
|
||||
statusPostsIds: null,
|
||||
editId: null,
|
||||
statusPostList: null,
|
||||
statusRank: [],
|
||||
statusOffice: null,
|
||||
nameOrUserNo: null,
|
||||
statusRanks: [],
|
||||
rankList: [],
|
||||
bandLists: [],
|
||||
@@ -408,8 +390,8 @@ export default {
|
||||
});
|
||||
};
|
||||
const statusValues = ref([
|
||||
{ value: "1", label: "已发布" },
|
||||
{ value: "0", label: "未发布" },
|
||||
{ value: true, label: "已发布" },
|
||||
{ value: false, label: "未发布" },
|
||||
]);
|
||||
const columns = ref([
|
||||
{
|
||||
@@ -464,17 +446,23 @@ export default {
|
||||
let params = {
|
||||
pageNum: state.pageNum,
|
||||
pageSize: state.pageSize,
|
||||
stdPosition: state.statusOffice,
|
||||
isPublished: state.statusValue,
|
||||
positionIdList: state.statusPostMaps.map((item) => item.id), //岗位
|
||||
bandIdList: state.statusRank, //职级
|
||||
qualsLevelCode: state.statusPost,
|
||||
};
|
||||
console.log(store);
|
||||
// 判断当前用户是否是专业力必修角色管理员,如果不是查询列表时需传入员工工号
|
||||
let find = store.state.userInfo.roleList.find(
|
||||
(item) => item.roleCode === "admin-growth"
|
||||
);
|
||||
if (!find) {
|
||||
params.username = store.state.userInfo.userNo;
|
||||
}
|
||||
await listData(params).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
// 临时权限
|
||||
state.dataList = res.data.data.records.map((item) => {
|
||||
item.permissions = "15,16,17";
|
||||
return item;
|
||||
});
|
||||
state.dataList = res.data.data.records;
|
||||
state.total = res.data.data.total;
|
||||
state.loadingList = false;
|
||||
}
|
||||
@@ -486,7 +474,6 @@ export default {
|
||||
};
|
||||
const resetList = () => {
|
||||
state.statusValue = null;
|
||||
state.statusPostMaps = [];
|
||||
state.statusPost = null;
|
||||
state.statusRank = [];
|
||||
state.pageNum = 1;
|
||||
@@ -506,6 +493,7 @@ export default {
|
||||
state.courseNum = record.electivesCompletedNum;
|
||||
state.pathWays = record.description;
|
||||
state.band = record.bandCodes;
|
||||
state.matchRules = record.matchRules;
|
||||
state.bg_check = true;
|
||||
};
|
||||
// 确定
|
||||
@@ -521,16 +509,19 @@ export default {
|
||||
qualsLevelCode: state.statusOffices,
|
||||
electivesCompletedNum: state.courseNum,
|
||||
description: state.pathWays,
|
||||
matchRules: state.matchRules,
|
||||
id: state.editId ? state.editId : null,
|
||||
template: state.template,
|
||||
};
|
||||
updatePostInfomation(params)
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
if (res.data.data.flag == 1) {
|
||||
if (state.matchRules == 1) {
|
||||
message.warning("自动匹配学员为异步添加,请稍后手动刷新学员");
|
||||
}
|
||||
message.success("保存成功");
|
||||
listDatas()
|
||||
state.bg_check = false;
|
||||
listDatas();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -539,7 +530,6 @@ export default {
|
||||
// of_exit()
|
||||
};
|
||||
const of_exit = () => {
|
||||
state.statusPostsIds = null;
|
||||
state.statusPosts = null;
|
||||
state.statusOffices = null;
|
||||
state.statusPostList = null;
|
||||
@@ -548,7 +538,7 @@ export default {
|
||||
state.bandLists = [];
|
||||
state.organCreateName = null;
|
||||
state.courseNum = "";
|
||||
state.matchRules = ''
|
||||
state.matchRules = "1";
|
||||
state.pathWays = "";
|
||||
state.bg_check = false;
|
||||
state.editId = null;
|
||||
@@ -570,10 +560,7 @@ export default {
|
||||
content: "确定撤回?",
|
||||
contentTwo: "撤回后学员进度保留,发布后可继续学习",
|
||||
ok: () => {
|
||||
handleGrowth({
|
||||
growId: record.id,
|
||||
type: 0,
|
||||
}).then((res) => {
|
||||
withdrawal(record.id).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
message.success("撤回成功");
|
||||
listDatas();
|
||||
@@ -582,9 +569,11 @@ export default {
|
||||
},
|
||||
});
|
||||
};
|
||||
// 查看修改记录
|
||||
const UpdateRecordRef = ref(null);
|
||||
const updateList = (record) => {
|
||||
console.log(record, "record");
|
||||
state.Avisible = true;
|
||||
UpdateRecordRef.value.open(record);
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
@@ -603,6 +592,7 @@ export default {
|
||||
updateList,
|
||||
withdraw,
|
||||
releaseLearnPath,
|
||||
UpdateRecordRef,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user