mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
-- 查看
This commit is contained in:
@@ -29,6 +29,7 @@ export const studentProcess = (obj) => http.get('/admin/project/studentProcess',
|
|||||||
|
|
||||||
//是否优秀学员
|
//是否优秀学员
|
||||||
export const topStudent = (obj) => http.post('/admin/project/topStudent', obj)
|
export const topStudent = (obj) => http.post('/admin/project/topStudent', obj)
|
||||||
|
export const updateStudent = (obj) => http.post('/admin/student/updateStudent', obj)
|
||||||
|
|
||||||
//项目概览
|
//项目概览
|
||||||
export const overview = (obj) => http.get('/admin/project/overview', { params: obj })
|
export const overview = (obj) => http.get('/admin/project/overview', { params: obj })
|
||||||
|
|||||||
@@ -303,8 +303,8 @@ export default {
|
|||||||
};
|
};
|
||||||
const check = () => {
|
const check = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
projectId: 37,
|
projectId: props.projectId,
|
||||||
studentId: 3,
|
studentId: props.checkStuId,
|
||||||
};
|
};
|
||||||
studentProcess(obj).then((res) => {
|
studentProcess(obj).then((res) => {
|
||||||
console.log("查看了学员", res.data.data);
|
console.log("查看了学员", res.data.data);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<a-table :columns="tablecolumns" :data-source="tableData.list" :pagination="stuPagination"
|
<a-table :columns="tablecolumns" :data-source="tableData.list" :pagination="stuPagination"
|
||||||
:loading="tableData.loading" row-key="id" :row-selection="stuRowSelection">
|
:loading="tableData.loading" row-key="id" :row-selection="stuRowSelection">
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<div style="display:flex;justify-content: center;align-items: center;">
|
<!-- <div style="display:flex;justify-content: center;align-items: center;">-->
|
||||||
<!-- <div v-if="props.type == 1" @click="excellentStudent(record)"
|
<!-- <div v-if="props.type == 1" @click="excellentStudent(record)"
|
||||||
style="color: #4ea6ff; font-size: 14px; text-align: center;margin-left: 20px;cursor: pointer;">
|
style="color: #4ea6ff; font-size: 14px; text-align: center;margin-left: 20px;cursor: pointer;">
|
||||||
优秀学员
|
优秀学员
|
||||||
@@ -61,30 +61,18 @@
|
|||||||
style="color: #4ea6ff; font-size: 14px; text-align: center;margin-left: 20px;cursor: pointer;">
|
style="color: #4ea6ff; font-size: 14px; text-align: center;margin-left: 20px;cursor: pointer;">
|
||||||
调整
|
调整
|
||||||
</div> -->
|
</div> -->
|
||||||
|
<!-- </div>-->
|
||||||
<div @click="del(record.id)"
|
<a-row gutter="12">
|
||||||
style="color: #4ea6ff; font-size: 14px; text-align: center;margin-left: 20px;cursor: pointer;">
|
|
||||||
删除
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- <a-row gutter="12">
|
|
||||||
<a-col>
|
<a-col>
|
||||||
<slot name="extension" v-bind:data="{ record }"></slot>
|
<slot name="extension" v-bind:data="{ record }"></slot>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col>
|
<a-col>
|
||||||
<a-select style="width: 80px" value="更多">
|
<div @click="del(record.id)"
|
||||||
<a-select-option value="删除" label="删除">
|
style="color: #4ea6ff; font-size: 14px; text-align: center;margin-left: 20px;cursor: pointer;">
|
||||||
<div @click="del(record.id)">删除</div>
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
<div
|
|
||||||
@click="del(record.id)"
|
|
||||||
style="color: #4ea6ff; font-size: 14px; text-align: center"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row> -->
|
</a-row>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -155,6 +143,7 @@ import ChangeLevelModal from "./ChangeLevelModal.vue";
|
|||||||
import {message} from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
// import { topStudent } from "../../api/indexProjStu";
|
// import { topStudent } from "../../api/indexProjStu";
|
||||||
import SeeStu from "../../components/drawers/SeeStu";
|
import SeeStu from "../../components/drawers/SeeStu";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
id: String,
|
id: String,
|
||||||
@@ -179,6 +168,21 @@ const tablecolumns = ref([
|
|||||||
width: "8%",
|
width: "8%",
|
||||||
align: "left",
|
align: "left",
|
||||||
className: "h",
|
className: "h",
|
||||||
|
customRender: ({record: {studentName,topFlag}}) => (topFlag?<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="stydentName">{studentName}</span>
|
||||||
|
<div className="studentExcellent">
|
||||||
|
<img
|
||||||
|
className="studentExcellentImg"
|
||||||
|
src={require("../../assets/images/taskpage/excellent.png")}
|
||||||
|
/>
|
||||||
|
<span className="studentExcellentT">优秀</span>
|
||||||
|
</div>
|
||||||
|
</div>:<div>{studentName}</div>)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "工号",
|
title: "工号",
|
||||||
@@ -344,6 +348,7 @@ const canclestu1 = ref(false)
|
|||||||
function cancelyou() {
|
function cancelyou() {
|
||||||
canclestu.value = false;
|
canclestu.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 优秀学员-设置优秀学员
|
// 优秀学员-设置优秀学员
|
||||||
function closeModal1() {
|
function closeModal1() {
|
||||||
canclestu.value = false;
|
canclestu.value = false;
|
||||||
@@ -356,6 +361,7 @@ function closeModal1() {
|
|||||||
function cancelcanyou() {
|
function cancelcanyou() {
|
||||||
canclestu1.value = false;
|
canclestu1.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消优秀学员-取消优秀学员
|
// 取消优秀学员-取消优秀学员
|
||||||
function closeModal3() {
|
function closeModal3() {
|
||||||
canclestu1.value = false;
|
canclestu1.value = false;
|
||||||
@@ -381,7 +387,37 @@ const projectId = ref(null)
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style lang="scss">
|
||||||
|
.stydentName {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.studentExcellent {
|
||||||
|
width: 64px;
|
||||||
|
height: 24px;
|
||||||
|
border-radius: 2px;
|
||||||
|
border: 1px solid #ffb64e;
|
||||||
|
background-color: rgba(255, 182, 78, 0.1);
|
||||||
|
margin-left: 24px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.studentExcellentImg {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-left: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.studentExcellentT {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffb64e;
|
||||||
|
line-height: 17px;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.studentopea1 {
|
.studentopea1 {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
@@ -700,7 +700,24 @@
|
|||||||
:columns="stuColumns"
|
:columns="stuColumns"
|
||||||
:stage="stage"
|
:stage="stage"
|
||||||
:visable ="tabFlag"
|
:visable ="tabFlag"
|
||||||
></TableStudent>
|
>
|
||||||
|
<template #extension="{data:{record}}">
|
||||||
|
<div style="display:flex">
|
||||||
|
<div
|
||||||
|
@click="showStudent(record)"
|
||||||
|
style="color: #4ea6ff; font-size: 14px; text-align: center;margin-left: 20px;cursor: pointer;"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
@click="settingTopFlag(record)"
|
||||||
|
style="color: #4ea6ff; font-size: 14px; text-align: center;margin-left: 20px;cursor: pointer;"
|
||||||
|
>
|
||||||
|
{{record.topFlag?'取消优秀':'优秀学员'}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</TableStudent>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</div>
|
</div>
|
||||||
@@ -1275,7 +1292,7 @@
|
|||||||
:closable="close"
|
:closable="close"
|
||||||
wrapClassName="canclestu"
|
wrapClassName="canclestu"
|
||||||
centered="true"
|
centered="true"
|
||||||
@cancel="closeModal1"
|
@cancel="cancelyou"
|
||||||
>
|
>
|
||||||
<div class="delete">
|
<div class="delete">
|
||||||
<div class="del_header"></div>
|
<div class="del_header"></div>
|
||||||
@@ -1288,11 +1305,11 @@
|
|||||||
<span>您是否授予此学员优秀学员称号?</span>
|
<span>您是否授予此学员优秀学员称号?</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="del_btnbox">
|
<div class="del_btnbox">
|
||||||
<div class="del_btn btn1">
|
<div class="del_btn btn1" @click="cancelyou">
|
||||||
<div class="btnText" @click="cancelyou">取消</div>
|
<div class="btnText">取消</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="del_btn btn2">
|
<div class="del_btn btn2" @click="closeModal1">
|
||||||
<div class="btnText" @click="closeModal1">确定</div>
|
<div class="btnText">确定</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1320,11 +1337,11 @@
|
|||||||
<span>您是否取消此学员优学员称号?</span>
|
<span>您是否取消此学员优学员称号?</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="del_btnbox">
|
<div class="del_btnbox">
|
||||||
<div class="del_btn btn1">
|
<div class="del_btn btn1" @click="cancelcanyou">
|
||||||
<div class="btnText" @click="cancelcanyou">取消</div>
|
<div class="btnText">取消</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="del_btn btn2">
|
<div class="del_btn btn2" @click="closeModal3">
|
||||||
<div class="btnText" @click="closeModal3">确定</div>
|
<div class="btnText">确定</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1678,7 +1695,7 @@ import {
|
|||||||
getGroupList,
|
getGroupList,
|
||||||
deleteGroup,
|
deleteGroup,
|
||||||
editGroup,
|
editGroup,
|
||||||
topStudent,
|
topStudent, updateStudent,
|
||||||
} from "../../api/indexProjStu";
|
} from "../../api/indexProjStu";
|
||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import * as apitl from "../../api/index";
|
import * as apitl from "../../api/index";
|
||||||
@@ -1725,6 +1742,7 @@ export default {
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
editRecord:{},
|
||||||
tabFlag:true,
|
tabFlag:true,
|
||||||
stage: [],
|
stage: [],
|
||||||
stuColumns: [
|
stuColumns: [
|
||||||
@@ -2559,24 +2577,10 @@ export default {
|
|||||||
};
|
};
|
||||||
//点击确定授予优秀学员后
|
//点击确定授予优秀学员后
|
||||||
const closeModal1 = () => {
|
const closeModal1 = () => {
|
||||||
let obj = {
|
state.editRecord.topFlag = 1
|
||||||
projectId: state.projectId,
|
updateStudent(state.editRecord)
|
||||||
studentIds: state.changeGoods,
|
|
||||||
topFlag: 1,
|
|
||||||
};
|
|
||||||
topStudent(obj)
|
|
||||||
.then((res) => {
|
|
||||||
console.log(`优秀学员授予成功${res.data}`);
|
|
||||||
message.success("优秀学员称号授予成功");
|
|
||||||
|
|
||||||
getStu();
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(`优秀学员授予成功${err}`);
|
|
||||||
message.warning("优秀学员称号授予失败");
|
|
||||||
});
|
|
||||||
state.changeGoods = [];
|
|
||||||
state.canclestu = false;
|
state.canclestu = false;
|
||||||
|
message.success("优秀学员称号授予成功");
|
||||||
};
|
};
|
||||||
|
|
||||||
//点击取消授予优秀学员后
|
//点击取消授予优秀学员后
|
||||||
@@ -2589,24 +2593,10 @@ export default {
|
|||||||
};
|
};
|
||||||
//点击确定取消优秀学员称号
|
//点击确定取消优秀学员称号
|
||||||
const closeModal3 = () => {
|
const closeModal3 = () => {
|
||||||
let obj = {
|
state.editRecord.topFlag = 0
|
||||||
projectId: state.projectId,
|
updateStudent(state.editRecord)
|
||||||
studentIds: state.changeGoods,
|
|
||||||
topFlag: 0,
|
|
||||||
};
|
|
||||||
topStudent(obj)
|
|
||||||
.then((res) => {
|
|
||||||
console.log(`取消优秀学员称号成功${res}`);
|
|
||||||
message.success("优秀学员称号取消成功");
|
|
||||||
|
|
||||||
getStu();
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(`取消优秀学员称号失败${err}`);
|
|
||||||
message.warning("优秀学员称号取消失败");
|
|
||||||
});
|
|
||||||
state.changeGoods = [];
|
|
||||||
state.canclestu1 = false;
|
state.canclestu1 = false;
|
||||||
|
message.success("优秀学员称号取消成功");
|
||||||
};
|
};
|
||||||
//点击取消取消授予优秀学员后
|
//点击取消取消授予优秀学员后
|
||||||
const cancelcanyou = () => {
|
const cancelcanyou = () => {
|
||||||
@@ -4024,9 +4014,19 @@ export default {
|
|||||||
};
|
};
|
||||||
state.codeInfo = obj;
|
state.codeInfo = obj;
|
||||||
};
|
};
|
||||||
|
function settingTopFlag(record){
|
||||||
|
record.topFlag?(state.canclestu1 = true):(state.canclestu=true)
|
||||||
|
state.editRecord = record
|
||||||
|
}
|
||||||
|
function showStudent(record){
|
||||||
|
state.Seevisible = true
|
||||||
|
state.checkStuId = record.studentId
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
...toRefs(levelList),
|
...toRefs(levelList),
|
||||||
|
showStudent,
|
||||||
|
settingTopFlag,
|
||||||
totask,
|
totask,
|
||||||
tostudent,
|
tostudent,
|
||||||
showModal,
|
showModal,
|
||||||
|
|||||||
Reference in New Issue
Block a user