mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-06 17:36:44 +08:00
回退
This commit is contained in:
@@ -374,9 +374,7 @@ export function usePage(_url, params, init = true,listing = false) {
|
|||||||
state.totalPage = r.data.total/10 || 1;
|
state.totalPage = r.data.total/10 || 1;
|
||||||
state.total = r.data.total;
|
state.total = r.data.total;
|
||||||
state.loading = false;
|
state.loading = false;
|
||||||
}).catch(err => {
|
});
|
||||||
state.loading = false;
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init && fetch();
|
init && fetch();
|
||||||
@@ -500,9 +498,6 @@ export async function request(_url, params) {
|
|||||||
if (res.code === 0 || res.code === 200) {
|
if (res.code === 0 || res.code === 200) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
if (res.code === 4 ){
|
|
||||||
return Promise.reject(res);
|
|
||||||
}
|
|
||||||
if (res.code === 1000 || res.code === 1002) {
|
if (res.code === 1000 || res.code === 1002) {
|
||||||
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
|
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
|
||||||
localStorage.removeItem('refreshPage')
|
localStorage.removeItem('refreshPage')
|
||||||
|
|||||||
@@ -487,19 +487,17 @@ const columns = ref([
|
|||||||
key: "teacher",
|
key: "teacher",
|
||||||
width: "20%",
|
width: "20%",
|
||||||
align: "center",
|
align: "center",
|
||||||
ellipsis: true,
|
|
||||||
customRender: ({ record }) => {
|
customRender: ({ record }) => {
|
||||||
// const teachers = record.offteachers;
|
const teachers = record.offteachers;
|
||||||
// return teachers.map((teacher, index) => {
|
return teachers.map((teacher, index) => {
|
||||||
// // 如果需要显示为列表形式
|
// 如果需要显示为列表形式
|
||||||
// return (
|
return (
|
||||||
// <div key={index}>
|
<div key={index}>
|
||||||
// {teacher.teacherName}
|
{teacher.teacherName}
|
||||||
// {index !== teachers.length - 1 && ', '}
|
{index !== teachers.length - 1 && ', '}
|
||||||
// </div>
|
</div>
|
||||||
// );
|
);
|
||||||
// });
|
});
|
||||||
return record.offteachers.map(item=>item.teacherName).join(',')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
tableDataTotal: 0,
|
tableDataTotal: 0,
|
||||||
projectName: null,
|
projectName: undefined,
|
||||||
projectNameListNot: [
|
projectNameListNot: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@@ -377,7 +377,7 @@ export default {
|
|||||||
ctx.emit("update:Tvisible", false);
|
ctx.emit("update:Tvisible", false);
|
||||||
state.currentPage = 1;
|
state.currentPage = 1;
|
||||||
state.name = "";
|
state.name = "";
|
||||||
state.projectName = null;
|
state.projectName = undefined;
|
||||||
state.tabledata = [];
|
state.tabledata = [];
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bol) => {
|
const afterVisibleChange = (bol) => {
|
||||||
@@ -389,9 +389,6 @@ export default {
|
|||||||
};
|
};
|
||||||
const selectProjectName = (value) => {
|
const selectProjectName = (value) => {
|
||||||
state.projectName = value;
|
state.projectName = value;
|
||||||
if(value === undefined){
|
|
||||||
state.projectName = null;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
//催促
|
//催促
|
||||||
const godie = () => {
|
const godie = () => {
|
||||||
@@ -518,7 +515,7 @@ export default {
|
|||||||
state.tableDataTotalLoading = true;
|
state.tableDataTotalLoading = true;
|
||||||
state.currentPage = 1;
|
state.currentPage = 1;
|
||||||
state.name = "";
|
state.name = "";
|
||||||
state.projectName = null;
|
state.projectName = "";
|
||||||
getData();
|
getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
tableDataTotal: 0,
|
tableDataTotal: 0,
|
||||||
projectName: null,
|
projectName: undefined,
|
||||||
projectNameListNot: [
|
projectNameListNot: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@@ -384,7 +384,7 @@ export default {
|
|||||||
ctx.emit("update:CommonModelVisible", false);
|
ctx.emit("update:CommonModelVisible", false);
|
||||||
state.currentPage = 1;
|
state.currentPage = 1;
|
||||||
state.name = "";
|
state.name = "";
|
||||||
state.projectName = null;
|
state.projectName = undefined;
|
||||||
state.tabledata = [];
|
state.tabledata = [];
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bol) => {
|
const afterVisibleChange = (bol) => {
|
||||||
@@ -396,9 +396,6 @@ export default {
|
|||||||
};
|
};
|
||||||
const selectProjectName = (value) => {
|
const selectProjectName = (value) => {
|
||||||
state.projectName = value;
|
state.projectName = value;
|
||||||
if(value === undefined){
|
|
||||||
state.projectName = null;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
//催促
|
//催促
|
||||||
const godie = () => {
|
const godie = () => {
|
||||||
@@ -526,7 +523,7 @@ export default {
|
|||||||
state.tableDataTotalLoading = true;
|
state.tableDataTotalLoading = true;
|
||||||
state.currentPage = 1;
|
state.currentPage = 1;
|
||||||
state.name = "";
|
state.name = "";
|
||||||
state.projectName = null;
|
state.projectName = undefined;
|
||||||
getData();
|
getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -442,10 +442,6 @@ export default {
|
|||||||
|
|
||||||
{/* 导出数据 */ }
|
{/* 导出数据 */ }
|
||||||
function exportData() {
|
function exportData() {
|
||||||
if(state.tabledata.length==0){
|
|
||||||
message.error("没有数据可以导出");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.chapterId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&type=${1}`)
|
// window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.chapterId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&type=${1}`)
|
||||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?currentStageId=${props.datasource.chapterId}&type=${1}&pid=${props.datasource.routerId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&taskType=${props.datasource.type}`)
|
window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?currentStageId=${props.datasource.chapterId}&type=${1}&pid=${props.datasource.routerId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&taskType=${props.datasource.type}`)
|
||||||
|
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
<template>
|
|
||||||
<a-select
|
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
|
||||||
return triggerNode.parentNode || document.body;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-model:value="numValue"
|
|
||||||
style="width: 100%;"
|
|
||||||
placeholder="请选择项目编号"
|
|
||||||
:options="options"
|
|
||||||
showSearch
|
|
||||||
allowClear
|
|
||||||
@change="handleChange"
|
|
||||||
>
|
|
||||||
</a-select>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import {computed, defineEmits, defineProps, onMounted, ref, watch} from 'vue';
|
|
||||||
import { useStore } from "vuex";
|
|
||||||
const props = defineProps({
|
|
||||||
value: String,
|
|
||||||
label: String,
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['update:value','update:label'])
|
|
||||||
const store = useStore();
|
|
||||||
const numValue = ref(props.value||null)
|
|
||||||
const handleChange = (value,option)=>{
|
|
||||||
emit('update:value',value || '')
|
|
||||||
emit('update:label',option?.label || '')
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
|
||||||
// console.log(store.state.project_number,'store.state.project_number')
|
|
||||||
});
|
|
||||||
const options = computed(()=>store.state.project_number.map(e => {
|
|
||||||
return{
|
|
||||||
value: e.value,
|
|
||||||
label: e.name
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
::v-deep .ant-select-selector{
|
|
||||||
border-radius: 8px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -91,11 +91,6 @@
|
|||||||
导出
|
导出
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col>
|
|
||||||
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff; width: 150px" @click="exportStudy">
|
|
||||||
导出详细学习记录
|
|
||||||
</a-button>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
</a-row>
|
||||||
<div style="margin-top: 20px">
|
<div style="margin-top: 20px">
|
||||||
<a-table
|
<a-table
|
||||||
@@ -126,8 +121,7 @@ import dialog from "@/utils/dialog";
|
|||||||
import {ONLINE_COURSE_DEL} from "@/api/ThirdApi";
|
import {ONLINE_COURSE_DEL} from "@/api/ThirdApi";
|
||||||
import {useStore} from "vuex";
|
import {useStore} from "vuex";
|
||||||
import {useAsyncStu, useResetRef} from "@/utils/useCommon";
|
import {useAsyncStu, useResetRef} from "@/utils/useCommon";
|
||||||
import {downLoadXlsx} from "@/utils/zipdownload";
|
|
||||||
import {message} from "ant-design-vue";
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
permissions: {
|
permissions: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -329,12 +323,7 @@ function reset() {
|
|||||||
function exportStu() {
|
function exportStu() {
|
||||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudent?type=3&&thirdType=8&pid=${searchParams.value.pid}`);
|
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudent?type=3&&thirdType=8&pid=${searchParams.value.pid}`);
|
||||||
}
|
}
|
||||||
function exportStudy() {
|
|
||||||
if(studentList.value.length == 0){
|
|
||||||
return message.warning('暂无可导出的学习记录')
|
|
||||||
}
|
|
||||||
downLoadXlsx(`${process.env.VUE_APP_BASE_API}/admin/student/exportOnlineStudentDetail?type=4&&thirdType=8&pid=${searchParams.value.pid}`,'在线课学员学习记录')
|
|
||||||
}
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
searchStu,
|
searchStu,
|
||||||
loading,
|
loading,
|
||||||
|
|||||||
@@ -131,6 +131,5 @@ async function init() {
|
|||||||
initDict("course_pic"); //课程封面
|
initDict("course_pic"); //课程封面
|
||||||
initDict("job_type"); //岗位
|
initDict("job_type"); //岗位
|
||||||
initDict("band"); //band
|
initDict("band"); //band
|
||||||
initDict("examine_cover") //讲师认证封面图
|
initDict("examine_cover")
|
||||||
initDict("project_number") //项目编号
|
|
||||||
}
|
}
|
||||||
@@ -5,16 +5,7 @@ const mimeMap = {
|
|||||||
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
zip: 'application/zip'
|
zip: 'application/zip'
|
||||||
}
|
}
|
||||||
export function downLoadXlsx(str, filename) {
|
|
||||||
axios({
|
|
||||||
method: 'get',
|
|
||||||
url: str,
|
|
||||||
responseType: 'blob',
|
|
||||||
headers: { 'Authorization': 'Bearer ' + getCookieForName("token") }
|
|
||||||
}).then(res => {
|
|
||||||
resolveBlob(res, mimeMap.xlsx,filename)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const baseUrl = process.env.VUE_APP_ACT_API
|
const baseUrl = process.env.VUE_APP_ACT_API
|
||||||
export function downLoadZip(str, filename) {
|
export function downLoadZip(str, filename) {
|
||||||
var url = baseUrl + str
|
var url = baseUrl + str
|
||||||
|
|||||||
@@ -1993,17 +1993,16 @@ const columns6 = [
|
|||||||
align: "center",
|
align: "center",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
customRender: ({ record }) => {
|
customRender: ({ record }) => {
|
||||||
// const teachers = record.offteachers;
|
const teachers = record.offteachers;
|
||||||
// return teachers.map((teacher, index) => {
|
return teachers.map((teacher, index) => {
|
||||||
// // 如果需要显示为列表形式
|
// 如果需要显示为列表形式
|
||||||
// return (
|
return (
|
||||||
// <div key={index}>
|
<div key={index}>
|
||||||
// {teacher.teacherName}
|
{teacher.teacherName}
|
||||||
// {index !== teachers.length - 1 && ', '}
|
{index !== teachers.length - 1 && ', '}
|
||||||
// </div>
|
</div>
|
||||||
// );
|
);
|
||||||
// });
|
});
|
||||||
return record.offteachers.map(item=>item.teacherName).join(',')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -147,13 +147,6 @@
|
|||||||
<a-radio :style="radioStyle" :value="0">否</a-radio>
|
<a-radio :style="radioStyle" :value="0">否</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="num" v-if="projectInfo.boeFlag === 1">
|
|
||||||
<div class="num_text">项目编号:</div>
|
|
||||||
<div class="num_input">
|
|
||||||
<!-- <a-input style="border-radius: 8px;" show-count allowClear maxlength="30" v-model:value="projectInfo.numValue" placeholder="请输入项目编号" /> -->
|
|
||||||
<ProjectNumber v-model:value="projectInfo.numValue" v-model:label="projectInfo.numLabel"></ProjectNumber>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="name name2">
|
<div class="name name2">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
@@ -276,7 +269,7 @@ import * as api2 from "../../api/indexAudit";
|
|||||||
import {validateName} from "@/api/index1";
|
import {validateName} from "@/api/index1";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import {scrollLoad} from "@/api/method";
|
import {scrollLoad} from "@/api/method";
|
||||||
import ProjectNumber from "@/components/project/ProjectNumber";
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
components: {
|
components: {
|
||||||
@@ -286,7 +279,6 @@ export default {
|
|||||||
TrainClass,
|
TrainClass,
|
||||||
NameInput,
|
NameInput,
|
||||||
OrgClass,
|
OrgClass,
|
||||||
ProjectNumber
|
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
@@ -342,12 +334,6 @@ export default {
|
|||||||
state.projectInfo.parentName = routers.query.parentName;
|
state.projectInfo.parentName = routers.query.parentName;
|
||||||
state.projectInfo.parentId = routers.query.parentId;
|
state.projectInfo.parentId = routers.query.parentId;
|
||||||
});
|
});
|
||||||
watch(()=>state.projectInfo.boeFlag,(val)=>{
|
|
||||||
if(!val){
|
|
||||||
state.projectInfo.numValue = ''
|
|
||||||
state.projectInfo.numLabel = ''
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
function getProjectInfo() {
|
function getProjectInfo() {
|
||||||
state.projectInfo.parentName = routers.query.parentName;
|
state.projectInfo.parentName = routers.query.parentName;
|
||||||
@@ -786,20 +772,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.num{
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
.num_text{
|
|
||||||
color: #6f6f6f;
|
|
||||||
font-size: 14px;
|
|
||||||
// margin-right: 7px;
|
|
||||||
}
|
|
||||||
.num_input{
|
|
||||||
width: 184px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.filebox {
|
.filebox {
|
||||||
margin-left: 14px;
|
margin-left: 14px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user