Merge remote-tracking branch 'yx/compulsory_professional_skills_test' into master_1202

This commit is contained in:
joshen
2025-02-19 14:57:59 +08:00
6 changed files with 117 additions and 58 deletions

View File

@@ -95,3 +95,9 @@ export const saveGrowth = (data) => http.post('/professional/compulsory/saveGrow
// 催促学习
export const batchSendMessage = (data) => http.post('/professional/urgeLearning/batchSendMessage', data)
// 删除手动添加的专业力必修
export const delGrowth = (growthId) => http.get('/professional/compulsory/delGrowth/' + growthId)
// 删除手动添加的专业力必修
export const markComplete = (obj) => http.get('/professional/allocation/markComplete', { params: obj })

View File

@@ -5,7 +5,7 @@
gutter="12"
style="padding-left: 20px; margin-right: 0px"
>
<a-col>
<!-- <a-col>
<a-form-item title="归属组织" style="min-width: 170px">
<div class="select in">
<OrgClass
@@ -45,7 +45,7 @@
></a-select>
</div>
</a-form-item>
</a-col>
</a-col> -->
<a-col>
<a-form-item title="状态" style="width: 193px">
<div class="select in">
@@ -445,7 +445,7 @@ const tablecolumns = ref([
}[joinMethod]),
},
{
title: "进度",
title: "必修进度",
width: 100,
align: "center",
dataIndex: "progress",
@@ -455,6 +455,17 @@ const tablecolumns = ref([
<div class="text">{record.progress || 0}%</div>
),
},
{
title: "选修进度",
width: 100,
align: "center",
dataIndex: "electivepProgress",
key: "electivepProgress",
className: "h",
customRender: ({ record }) => (
<div class="text">{record.electivepProgress || 0}%</div>
),
},
{
title: "完成状态",
dataIndex: "completionStatus",
@@ -512,7 +523,7 @@ function search() {
function exportTaskStu() {
window.open(
buildUrl(
`${process.env.VUE_APP_BOE_API_URL}${process.env.VUE_APP_BASE_API_GROWTH}/professional/allocation/export`,
`${process.env.VUE_APP_BOE_API_URL}${process.env.VUE_APP_BASE_API_GROWTH || ''}/professional/allocation/export`,
tableParam.value
)
);

View File

@@ -146,7 +146,7 @@
<script>
import { reactive, toRefs, watch, ref } from "vue";
import { getGrowStudentDetail } from "@/api/growthpath";
import { getGrowStudentDetail, markComplete } from "@/api/growthpath";
import { message } from "ant-design-vue";
import { TASK_TYPE } from "@/utils/constGrown";
import { checkGrowthPer } from "@/utils/utils";
@@ -233,10 +233,15 @@ export default {
slots: { customRender: "action" },
},
]);
const formData = ref()
const openDrawer = (row) => {
state.seevisible = true;
formData.value = row
getData();
};
const getData = () => {
state.loading = true;
getGrowStudentDetail({ id: row.id })
getGrowStudentDetail({ id: formData.value.id })
.then((res) => {
state.loading = false;
state.info = res.data.data;
@@ -250,11 +255,20 @@ export default {
state.seevisible = false;
};
const setPermissions = (row) => {
markComplete({ id: row.id }).then((res) => {
getData();
message.success("操作成功");
});
};
return {
...toRefs(state),
closeDrawer,
openDrawer,
setPermissions,
columns,
getData,
formData,
checkGrowthPer,
};
},

View File

@@ -45,7 +45,7 @@
</div>
<div class="handler">
<div class="item" v-for="(value, key) in TASK_TYPE" :key="key">
<template v-if="value.type < 3">
<template v-if="key < 3">
<component
:ref="(el) => (courseRef['el' + key] = el)"
v-model:taskList="listDatas"

View File

@@ -109,6 +109,13 @@
修改记录
</a-button>
</a-menu-item>
<template v-if="record.dataSource === '2'">
<a-menu-item key="4">
<a-button type="link" @click="delData(record)">
删除
</a-button>
</a-menu-item>
</template>
</a-menu>
</template>
</a-dropdown>
@@ -241,36 +248,44 @@
</div>
<div class="bg_body_input">
<div style="display: flex">
<div
@click="template = 1"
class="learnBgItem"
:style="{
border:
template === 1
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #ccc',
}"
>
<img
class="im"
src="../../assets/images/growthpath/path1.png"
/>
</div>
<div
@click="template = 2"
class="learnBgItem"
:style="{
border:
template === 2
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #ccc',
}"
>
<img
class="im"
src="../../assets/images/growthpath/path2.png"
/>
</div>
<a-tooltip>
<template #title>建议少于16个学习任务时使用</template>
<div
@click="template = 1"
class="learnBgItem"
:style="{
border:
template == 1
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #ccc',
}"
>
<img
class="im"
src="../../assets/images/growthpath/path1.png"
/>
</div>
</a-tooltip>
<a-tooltip>
<template #title>建议多任务时使用</template>
<div
slot="reference"
@click="template = 2"
class="learnBgItem"
:style="{
border:
template == 2
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #ccc',
}"
>
<img
class="im"
src="../../assets/images/growthpath/path2.png"
/>
</div>
</a-tooltip>
</div>
</div>
</div>
@@ -389,6 +404,7 @@ import {
withdrawal,
updatePostInfomation,
saveGrowth,
delGrowth,
} from "@/api/growthpath";
export default {
name: "growthpath",
@@ -484,6 +500,27 @@ export default {
},
});
};
// 删除手动添加的专业力必修
const delData = (item) => {
dialog({
content: "是否删除该条数据?",
ok: () => {
delGrowth(item.id)
.then((res) => {
if (res.data.code == 200) {
message.success("删除成功");
listDatas();
} else {
message.error(err.data.msg);
}
})
.catch((err) => {
message.error(err.data.msg);
});
},
});
};
const statusValues = ref([
{ value: true, label: "已发布" },
{ value: false, label: "未发布" },
@@ -600,7 +637,7 @@ export default {
//编辑
const editPath = (record) => {
state.editId = record.id;
state.statusPosts = record.stdPosition;
state.statusPosts = record.stdPositionDesr;
state.statusOffices = record.qualsLevelDesr;
state.courseNum = record.electivesCompletedNum;
state.elePublishedNum = record.elePublishedNum;
@@ -685,7 +722,7 @@ export default {
state.pathWays = "";
state.bg_check = false;
state.editId = null;
state.band = ""
state.band = "";
};
// 创建路径
// 管理
@@ -738,6 +775,7 @@ export default {
withdraw,
handleOut,
releaseLearnPath,
delData,
UpdateRecordRef,
matchRulesChange,
};

View File

@@ -118,14 +118,14 @@
<div class="stagepro" v-for="item of overviewData2">
<template v-if="TASK_TYPE[item.taskType]">
<a-progress
type="dashboard"
gapDegree="0"
:percent="fixDoublePer(item.completedRate || 0)"
:width="140"
/>
<div class="protext">
{{ TASK_TYPE[item.taskType].name }}课程完成率
</div>
type="dashboard"
gapDegree="0"
:percent="fixDoublePer(item.completedRate || 0)"
:width="140"
/>
<div class="protext">
{{ TASK_TYPE[item.taskType].name }}课程完成率
</div>
</template>
</div>
<!-- 条形统计 -->
@@ -231,16 +231,6 @@
/>
<div style="margin-left: 5px">是否按顺序学习</div>
</div> -->
<!-- <div>
<a-tabs
v-model:activeKey="courseType"
size="large"
@change="getListTask"
>
<a-tab-pane key="1" tab="必修"></a-tab-pane>
<a-tab-pane key="2" tab="选修"></a-tab-pane>
</a-tabs>
</div> -->
</div>
<!-- 无数据显示快速创建 -->
<div v-if="!listTaskData.length" style="margin-top: 20px">
@@ -1281,7 +1271,7 @@ export default {
const sortSwitchChange = () => {
openOrCloseSortSwitch(state.routerId).then((res) => {
message.success("操作成功");
getListTask()
getListTask();
});
};
return {