This commit is contained in:
Pengxiansen
2025-02-19 14:03:57 +08:00
parent 44b5722e44
commit 9af14d3396
6 changed files with 140 additions and 83 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 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" gutter="12"
style="padding-left: 20px; margin-right: 0px" style="padding-left: 20px; margin-right: 0px"
> >
<a-col> <!-- <a-col>
<a-form-item title="归属组织" style="min-width: 170px"> <a-form-item title="归属组织" style="min-width: 170px">
<div class="select in"> <div class="select in">
<OrgClass <OrgClass
@@ -45,7 +45,7 @@
></a-select> ></a-select>
</div> </div>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col> <a-col>
<a-form-item title="状态" style="width: 193px"> <a-form-item title="状态" style="width: 193px">
<div class="select in"> <div class="select in">
@@ -445,7 +445,7 @@ const tablecolumns = ref([
}[joinMethod]), }[joinMethod]),
}, },
{ {
title: "进度", title: "必修进度",
width: 100, width: 100,
align: "center", align: "center",
dataIndex: "progress", dataIndex: "progress",
@@ -455,6 +455,17 @@ const tablecolumns = ref([
<div class="text">{record.progress || 0}%</div> <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: "完成状态", title: "完成状态",
dataIndex: "completionStatus", dataIndex: "completionStatus",
@@ -512,7 +523,7 @@ function search() {
function exportTaskStu() { function exportTaskStu() {
window.open( window.open(
buildUrl( 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 tableParam.value
) )
); );

View File

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

View File

@@ -45,29 +45,27 @@
</div> </div>
<div class="handler"> <div class="handler">
<div class="item" v-for="(value, key) in TASK_TYPE" :key="key"> <div class="item" v-for="(value, key) in TASK_TYPE" :key="key">
<template v-if="value.type < 3"> <component
<component :ref="(el) => (courseRef['el' + key] = el)"
:ref="(el) => (courseRef['el' + key] = el)" v-model:taskList="listDatas"
v-model:taskList="listDatas" :is="value.component"
:is="value.component" :growId="growId"
:growId="growId" :id="growId"
:id="growId" :type="value.type"
:type="value.type" :activeKey="activeKey"
:activeKey="activeKey" :infoType="2"
:infoType="2" @dataListUp="dataListUp"
@dataListUp="dataListUp" @refresh="getListTask(1)"
@refresh="getListTask(1)" >
> <div class="itcon">
<div class="itcon"> <div class="img">
<div class="img"> <img :src="value.img" />
<img :src="value.img" />
</div>
<div class="text">{{ value.name }}</div>
</div> </div>
</component> <div class="text">{{ value.name }}</div>
<div></div> </div>
<div class="lin"></div> </component>
</template> <div></div>
<div class="lin"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -39,12 +39,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="btns"> <div class="btns">
<div class="btn btn3" @click="handleOut"> <div class="btn btn3" @click="handleOut">
<div class="search"></div> <div class="search"></div>
<div class="btnText">创建必修</div> <div class="btnText">创建必修</div>
</div> </div>
</div> --> </div>
<div class="grow_con"> <div class="grow_con">
<div class="grow_list"> <div class="grow_list">
<div class="grow_table"> <div class="grow_table">
@@ -109,6 +109,13 @@
修改记录 修改记录
</a-button> </a-button>
</a-menu-item> </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> </a-menu>
</template> </template>
</a-dropdown> </a-dropdown>
@@ -241,36 +248,44 @@
</div> </div>
<div class="bg_body_input"> <div class="bg_body_input">
<div style="display: flex"> <div style="display: flex">
<div <a-tooltip>
@click="template = 1" <template #title>建议少于16个学习任务时使用</template>
class="learnBgItem" <div
:style="{ @click="template = 1"
border: class="learnBgItem"
template === 1 :style="{
? '2px solid rgba(78, 166, 255, 1)' border:
: '1px solid #ccc', template == 1
}" ? '2px solid rgba(78, 166, 255, 1)'
> : '1px solid #ccc',
<img }"
class="im" >
src="../../assets/images/growthpath/path1.png" <img
/> class="im"
</div> src="../../assets/images/growthpath/path1.png"
<div />
@click="template = 2" </div>
class="learnBgItem" </a-tooltip>
:style="{
border: <a-tooltip>
template === 2 <template #title>建议多任务时使用</template>
? '2px solid rgba(78, 166, 255, 1)' <div
: '1px solid #ccc', slot="reference"
}" @click="template = 2"
> class="learnBgItem"
<img :style="{
class="im" border:
src="../../assets/images/growthpath/path2.png" template == 2
/> ? '2px solid rgba(78, 166, 255, 1)'
</div> : '1px solid #ccc',
}"
>
<img
class="im"
src="../../assets/images/growthpath/path2.png"
/>
</div>
</a-tooltip>
</div> </div>
</div> </div>
</div> </div>
@@ -389,6 +404,7 @@ import {
withdrawal, withdrawal,
updatePostInfomation, updatePostInfomation,
saveGrowth, saveGrowth,
delGrowth,
} from "@/api/growthpath"; } from "@/api/growthpath";
export default { export default {
name: "growthpath", 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([ const statusValues = ref([
{ value: true, label: "已发布" }, { value: true, label: "已发布" },
{ value: false, label: "未发布" }, { value: false, label: "未发布" },
@@ -600,7 +637,7 @@ export default {
//编辑 //编辑
const editPath = (record) => { const editPath = (record) => {
state.editId = record.id; state.editId = record.id;
state.statusPosts = record.stdPosition; state.statusPosts = record.stdPositionDesr;
state.statusOffices = record.qualsLevelDesr; state.statusOffices = record.qualsLevelDesr;
state.courseNum = record.electivesCompletedNum; state.courseNum = record.electivesCompletedNum;
state.elePublishedNum = record.elePublishedNum; state.elePublishedNum = record.elePublishedNum;
@@ -685,7 +722,7 @@ export default {
state.pathWays = ""; state.pathWays = "";
state.bg_check = false; state.bg_check = false;
state.editId = null; state.editId = null;
state.band = "" state.band = "";
}; };
// 创建路径 // 创建路径
// 管理 // 管理
@@ -738,6 +775,7 @@ export default {
withdraw, withdraw,
handleOut, handleOut,
releaseLearnPath, releaseLearnPath,
delData,
UpdateRecordRef, UpdateRecordRef,
matchRulesChange, matchRulesChange,
}; };

View File

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