mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 19:06:45 +08:00
左侧列表权限受控,修改备注
This commit is contained in:
@@ -80,3 +80,5 @@ export const getProjectCount = (projectId) => http.get('/admin/project/projectCo
|
|||||||
export const login = (obj) => http.post('/admin/CheckUser/userLogin', obj)
|
export const login = (obj) => http.post('/admin/CheckUser/userLogin', obj)
|
||||||
export const userInfo = () => http.get('/admin/CheckUser/userInfo')
|
export const userInfo = () => http.get('/admin/CheckUser/userInfo')
|
||||||
|
|
||||||
|
//修改备注
|
||||||
|
export const editStudent = (obj) => http.post('/admin/student/editStudent', obj)
|
||||||
@@ -573,7 +573,7 @@
|
|||||||
<router-link to="/employeelearning">员工学习数据</router-link>
|
<router-link to="/employeelearning">员工学习数据</router-link>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-sub-menu>
|
</a-sub-menu>
|
||||||
<a-menu-item key="sub17-4">
|
<a-menu-item key="sub17-4" v-if="checkMenu('trainingnewmanager')||getReportOrgs()">
|
||||||
<span
|
<span
|
||||||
:class="{
|
:class="{
|
||||||
circleActive: selectedKeys[0] === 'sub17-4' ? true : false,
|
circleActive: selectedKeys[0] === 'sub17-4' ? true : false,
|
||||||
@@ -1175,7 +1175,6 @@ export default {
|
|||||||
const getClientHeight = () => {
|
const getClientHeight = () => {
|
||||||
state.screenHeight = document.body.clientHeight;
|
state.screenHeight = document.body.clientHeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// console.log("11111", 1);
|
// console.log("11111", 1);
|
||||||
window.addEventListener("resize", getClientHeight, false);
|
window.addEventListener("resize", getClientHeight, false);
|
||||||
|
|||||||
@@ -441,6 +441,10 @@ const props = defineProps({
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
|
remarksTrue: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { loading: stuAsyncLoading, start } = useAsyncStu(props.id, props.type, getStuList);
|
const { loading: stuAsyncLoading, start } = useAsyncStu(props.id, props.type, getStuList);
|
||||||
|
|||||||
@@ -18,6 +18,18 @@ export function downLoadZip(str, filename) {
|
|||||||
resolveBlob(res, mimeMap.zip,filename)
|
resolveBlob(res, mimeMap.zip,filename)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const baseUrlManage = process.env.VUE_APP_BASE_API
|
||||||
|
export function downLoadZipManage(str, filename) {
|
||||||
|
var url = baseUrlManage + str
|
||||||
|
axios({
|
||||||
|
method: 'get',
|
||||||
|
url: url,
|
||||||
|
responseType: 'blob',
|
||||||
|
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
|
||||||
|
}).then(res => {
|
||||||
|
resolveBlob(res, mimeMap.xlsx,filename)
|
||||||
|
})
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 解析blob响应内容并下载
|
* 解析blob响应内容并下载
|
||||||
* @param {*} res blob响应内容
|
* @param {*} res blob响应内容
|
||||||
|
|||||||
@@ -827,6 +827,7 @@
|
|||||||
:stage="stage"
|
:stage="stage"
|
||||||
:visable="tabFlag"
|
:visable="tabFlag"
|
||||||
:groupList="groupList"
|
:groupList="groupList"
|
||||||
|
:remarksTrue="remarksTrue"
|
||||||
>
|
>
|
||||||
<template #extension="{ data: { record } }">
|
<template #extension="{ data: { record } }">
|
||||||
<a-button @click="showStudent(record)" type="link"
|
<a-button @click="showStudent(record)" type="link"
|
||||||
@@ -2645,9 +2646,9 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
customRender: ({ record }) => (
|
customRender: ({ record }) => (
|
||||||
<div>
|
<div>
|
||||||
{record.finishTaskNum == 0
|
{record.status == 0
|
||||||
? "未开始"
|
? "未开始"
|
||||||
: record.finishTaskNum == record.totalTaskNum
|
: record.status == 1
|
||||||
? "已完成"
|
? "已完成"
|
||||||
: "进行中"}
|
: "进行中"}
|
||||||
</div>
|
</div>
|
||||||
@@ -2664,8 +2665,8 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "备注",
|
title: "备注",
|
||||||
dataIndex: "lastLearnTime",
|
dataIndex: "batch",
|
||||||
key: "lastLearnTime",
|
key: "batch",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
className: "h",
|
className: "h",
|
||||||
@@ -3090,6 +3091,8 @@ export default {
|
|||||||
modal1Visible: false, // 证书预览
|
modal1Visible: false, // 证书预览
|
||||||
changegroupV: false, //换组弹窗
|
changegroupV: false, //换组弹窗
|
||||||
remarks: '',
|
remarks: '',
|
||||||
|
remarksId: '',
|
||||||
|
remarksTrue: false,
|
||||||
showRemarks: false, //修改备注
|
showRemarks: false, //修改备注
|
||||||
checkgroupStuId: null, //换组id
|
checkgroupStuId: null, //换组id
|
||||||
ImpoterGroupLeaderV: false, //导入小组长抽屉
|
ImpoterGroupLeaderV: false, //导入小组长抽屉
|
||||||
@@ -3449,12 +3452,21 @@ export default {
|
|||||||
};
|
};
|
||||||
//修改备注
|
//修改备注
|
||||||
const modifyRemarks = (record) => {
|
const modifyRemarks = (record) => {
|
||||||
|
state.remarksId = record.id
|
||||||
state.showRemarks = true;
|
state.showRemarks = true;
|
||||||
}
|
}
|
||||||
const of_remarks = () => {
|
const of_remarks = () => {
|
||||||
|
state.remarksTrue = false;
|
||||||
state.showRemarks = false;
|
state.showRemarks = false;
|
||||||
}
|
}
|
||||||
const RemarksUpdata = () => {
|
const RemarksUpdata = () => {
|
||||||
|
apitl.editStudent({
|
||||||
|
id: state.remarksId,
|
||||||
|
batch: state.remarks
|
||||||
|
}).then(res=>{
|
||||||
|
console.log(res,'res')
|
||||||
|
state.remarksTrue = true;
|
||||||
|
})
|
||||||
of_remarks()
|
of_remarks()
|
||||||
}
|
}
|
||||||
const showModal2 = (item, isEdit) => {
|
const showModal2 = (item, isEdit) => {
|
||||||
|
|||||||
@@ -12,15 +12,16 @@
|
|||||||
import { computed,onMounted,ref } from "vue";
|
import { computed,onMounted,ref } from "vue";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import { reportOrgs } from "@/api/indexProject";
|
import { reportOrgs } from "@/api/indexProject";
|
||||||
|
import {downLoadZipManage} from "@/utils/zipdownload";
|
||||||
const downReport = () => {
|
const downReport = () => {
|
||||||
console.log('下载报表')
|
console.log('下载报表')
|
||||||
if(uploadAdmin('training-admin')){
|
if(uploadAdmin('training-admin')){
|
||||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/project/report/data`)
|
downLoadZipManage(`/admin/project/report/data`,'新任管理者培训数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(adminType?.value.length>0){
|
if(adminType?.value.length>0){
|
||||||
let orgs = adminType.value.join(',')
|
let orgs = adminType.value.join(',')
|
||||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/project/report/data?orgs=${orgs}`)
|
downLoadZipManage(`/admin/project/report/data?orgs=${orgs}`,'新任管理者培训数据')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const userInfo = computed(() => store.state.userInfo);
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
@@ -31,6 +32,7 @@ import { reportOrgs } from "@/api/indexProject";
|
|||||||
const adminType = ref()
|
const adminType = ref()
|
||||||
const getReportOrgs = () => {
|
const getReportOrgs = () => {
|
||||||
reportOrgs({workNum: userInfo.value.userNo}).then((res) => {
|
reportOrgs({workNum: userInfo.value.userNo}).then((res) => {
|
||||||
|
console.log(res,'res')
|
||||||
adminType.value = res.data
|
adminType.value = res.data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user