mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
// export const USER_LIST = '/userbasic/user/list post'
|
||||
//学员列表带分页
|
||||
export const USER_LIST_PAGE = '/userbasic/user/list post'
|
||||
//学员列表 没有分页数据 只能通过名称检索 速度较快
|
||||
export const USER_LIST = '/userbasic/user/searchList post'
|
||||
export const ORG_LIST = '/userbasic/org/list post'
|
||||
export const ORG_CHILD_LIST = '/userbasic/org/info post'
|
||||
|
||||
@@ -80,6 +80,7 @@ export const delStudent = (obj) =>
|
||||
|
||||
// 获取学员路径图进度明细
|
||||
export const stuProgress = (params) => http.get('/admin/router/detail', { params });
|
||||
export const stuRouterProgress = (params) => http.get('/admin/router/stuDetail', { params });
|
||||
// export const stuProgress = (obj) =>http.post("/admin/router/studentProcess", obj);
|
||||
|
||||
//编辑学习路径基本信息
|
||||
|
||||
@@ -27,7 +27,9 @@ export const removeGroupStudent = (obj) => http.post('/admin/project/removeGroup
|
||||
//查看学员
|
||||
// export const studentProcess = (obj) => http.get('/admin/project/studentProcess', { params: obj })
|
||||
export const studentProcess = (obj) => http.get('/admin/project/detail', { params: obj })
|
||||
export const studentRank = (obj) => http.get('/admin/project/studentRank', { params: obj })
|
||||
export const projectStudentProcess = (obj) => http.get('/admin/project/stuDetail', { params: obj })
|
||||
export const projectStudentRank = (obj) => http.get('/admin/project/studentRank', { params: obj })
|
||||
export const routerStudentRank = (obj) => http.get('/admin/router/studentRank', { params: obj })
|
||||
|
||||
//是否优秀学员
|
||||
export const topStudent = (obj) => http.post('/admin/project/topStudent', obj)
|
||||
|
||||
@@ -430,6 +430,20 @@ export default {
|
||||
},
|
||||
];
|
||||
}
|
||||
if (
|
||||
n.indexOf("/sonproject") !== -1 ||
|
||||
n.indexOf("/SonProject") !== -1
|
||||
) {
|
||||
state.list = [
|
||||
{
|
||||
name: "项目",
|
||||
href: "",
|
||||
},
|
||||
{
|
||||
name: "基础信息",
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
70
src/components/common/CommonAlert.vue
Normal file
70
src/components/common/CommonAlert.vue
Normal file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:visible="true"
|
||||
:footer="null"
|
||||
:closable="false"
|
||||
wrapClassName="DelModal"
|
||||
style="margin-top: 400px"
|
||||
:zIndex="9999"
|
||||
@cancel="close"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
<div class="header">
|
||||
<div class="del-icons">
|
||||
<img :src="types[type]" alt=""/>
|
||||
</div>
|
||||
<span>提示</span>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div><span>{{ content }}</span></div>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn1" @click="close">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<div class="del_btn btn2" @click="handleConfirm">
|
||||
<div class="btnText">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import notide from '@/assets/images/coursewareManage/notice.png'
|
||||
import infoPng from '@/assets/images/coursewareManage/QR.png'
|
||||
import {defineProps, ref} from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
close: {
|
||||
type: Function,
|
||||
default: () => ({})
|
||||
},
|
||||
ok: {
|
||||
type: Function,
|
||||
default: () => ({})
|
||||
},
|
||||
content: String,
|
||||
title: {
|
||||
type: String,
|
||||
default: '提示'
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
})
|
||||
const types = {
|
||||
1: infoPng,
|
||||
2: notide
|
||||
}
|
||||
const type = ref(1)
|
||||
|
||||
function handleConfirm() {
|
||||
props.ok()
|
||||
props.close()
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -407,7 +407,7 @@ const beforeUpload = (file) => {
|
||||
return false;
|
||||
}
|
||||
|
||||
let isLt1M = file.size < 2097152;
|
||||
let isLt1M = file.size < 2000000;
|
||||
console.log(file.size, isLt1M)
|
||||
if (!isLt1M) {
|
||||
message.error("图片大小超过2MB!");
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div v-if="taskIndex>=0" class="headerTitle">编辑项目</div>
|
||||
<div v-if="taskIndex >= 0" class="headerTitle">编辑项目</div>
|
||||
<div v-else class="headerTitle">添加项目</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
@@ -65,32 +65,25 @@
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="reset">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">刷新</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_item" style="margin-top: 16px;margin-bottom: 32px;">
|
||||
<button class="xkbtn" @click="goProjectmanage">
|
||||
新建项目
|
||||
</button>
|
||||
<div class="main_item" style="margin-top: 16px; margin-bottom: 32px">
|
||||
<button class="xkbtn" @click="goProjectmanage">新建项目</button>
|
||||
</div>
|
||||
|
||||
<div class="main_notice" v-if="edit" style="display:none;">
|
||||
<div class="mntc_left">
|
||||
<div class="main_notice" v-if="taskIndex >= 0">
|
||||
<div class="mntc_left" v-if="selectedRows">
|
||||
<div class="notice_icon"></div>
|
||||
<div v-if="selectedRows.length == 0">
|
||||
<span class="title"
|
||||
>已选择
|
||||
<span class="data" style="color: #4ea6ff">{{ 0 }}</span>
|
||||
条</span
|
||||
>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>
|
||||
<div>
|
||||
<span class="title"
|
||||
>已选择
|
||||
<span class="data" style="color: #4ea6ff">{{
|
||||
selectedRows.length
|
||||
}}</span>
|
||||
<span class="data" style="color: #4ea6ff">{{ 1 }}</span>
|
||||
条 </span
|
||||
>
|
||||
<span class="title"
|
||||
@@ -98,7 +91,7 @@
|
||||
<span
|
||||
class="data"
|
||||
style="color: #4ea6ff; margin-right: 15px"
|
||||
>{{ selectedRows[0].name }}</span
|
||||
>{{ selectedRows?.name }}</span
|
||||
>
|
||||
</span>
|
||||
<span class="title"
|
||||
@@ -106,7 +99,7 @@
|
||||
<span
|
||||
class="data"
|
||||
style="color: #4ea6ff; margin-right: 15px"
|
||||
>{{ selectedRows[0].manager }}</span
|
||||
>{{ selectedRows?.manager }}</span
|
||||
>
|
||||
</span>
|
||||
<span class="title"
|
||||
@@ -114,13 +107,13 @@
|
||||
<span
|
||||
class="data"
|
||||
style="color: #4ea6ff; margin-right: 15px"
|
||||
>{{ selectedRows[0].creater }}</span
|
||||
>{{ selectedRows?.createName }}</span
|
||||
>
|
||||
</span>
|
||||
<span class="title"
|
||||
>创建时间:
|
||||
<span class="data" style="color: #4ea6ff">{{
|
||||
selectedRows[0].time
|
||||
selectedRows?.createTime
|
||||
}}</span>
|
||||
</span>
|
||||
</div>
|
||||
@@ -132,7 +125,9 @@
|
||||
<a-table
|
||||
:customRow="customRow"
|
||||
class="ant-table-striped"
|
||||
:row-class-name="(_, index) => (index % 2 === 1 ? 'table-striped' : null)"
|
||||
:row-class-name="
|
||||
(_, index) => (index % 2 === 1 ? 'table-striped' : null)
|
||||
"
|
||||
row-key="id"
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
@@ -180,28 +175,45 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import {computed, defineEmits, defineProps, ref, watch} from "vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useRowsPage} from "@/api/request";
|
||||
import {PROJECT_AUDIT_PAGE} from "@/api/apis";
|
||||
|
||||
import { computed, defineEmits, defineProps, ref, watch } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
// import { useRouter } from "vue-router";
|
||||
import { useRowsPage } from "@/api/request";
|
||||
import { PROJECT_AUDIT_PAGE } from "@/api/apis";
|
||||
import { getProjectDetail } from "@/api/index";
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
taskList: []
|
||||
})
|
||||
const visible = ref(false)
|
||||
const sameModal = ref(false)
|
||||
const emit = defineEmits({})
|
||||
taskList: [],
|
||||
});
|
||||
const visible = ref(false);
|
||||
const sameModal = ref(false);
|
||||
const emit = defineEmits({});
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: "项目名称",
|
||||
dataIndex: "name",
|
||||
key: "projectName",
|
||||
width: "40%",
|
||||
width: "20%",
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: "所属项目",
|
||||
dataIndex: "topName",
|
||||
key: "topName",
|
||||
width: "20%",
|
||||
ellipsis: true,
|
||||
customRender: ({ record: { gaName, faName, name } }) => (
|
||||
<div title={faName ? gaName !== null ? gaName + "/" + faName : faName : name}>
|
||||
{
|
||||
faName ? gaName !== null
|
||||
? (gaName + "/" + faName).length > 16 ? (gaName + "/" + faName).slice(0, 16) + '...' : (gaName + "/" + faName)
|
||||
: faName.length > 16 ? faName.slice(0, 16) + '...' : faName
|
||||
: name.length > 16 ? name.slice(0, 16) + '...' : name
|
||||
}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "项目经理",
|
||||
dataIndex: "manager",
|
||||
@@ -223,38 +235,42 @@ const columns = ref([
|
||||
width: "20%",
|
||||
align: "center",
|
||||
},
|
||||
])
|
||||
]);
|
||||
const initParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
orderAsc: true
|
||||
}
|
||||
const params = ref(initParams)
|
||||
const router = useRouter();
|
||||
orderAsc: true,
|
||||
};
|
||||
const params = ref(initParams);
|
||||
// const router = useRouter();
|
||||
const rowSelectKeys = ref([]);
|
||||
const selectsData = ref([]);
|
||||
const taskIndex = ref(-1);
|
||||
|
||||
const {data, loading, total, fetch} = useRowsPage(PROJECT_AUDIT_PAGE, params.value, {
|
||||
const { data, loading, total, fetch } = useRowsPage(
|
||||
PROJECT_AUDIT_PAGE,
|
||||
params.value,
|
||||
{
|
||||
init: false,
|
||||
result: res => res.result.list,
|
||||
totalPage: res => res.result.totalPages,
|
||||
total: res => res.result.count
|
||||
})
|
||||
|
||||
result: (res) => res.result.list,
|
||||
totalPage: (res) => res.result.totalPages,
|
||||
total: (res) => res.result.count,
|
||||
}
|
||||
);
|
||||
console.log(data)
|
||||
watch(taskIndex, () => {
|
||||
// if (taskIndex.value >= 0) {
|
||||
// rowSelectKeys.value = [props.taskList[taskIndex.value].courseId]
|
||||
// selectsData.value = data.value.find(t => t.id === props.taskList[taskIndex.value].courseId) || {}
|
||||
// }
|
||||
})
|
||||
});
|
||||
|
||||
const customRow = (record) => ({
|
||||
onClick: () => {
|
||||
rowSelectKeys.value = [record.id]
|
||||
selectsData.value = [record]
|
||||
}
|
||||
})
|
||||
rowSelectKeys.value = [record.id];
|
||||
selectsData.value = [record];
|
||||
},
|
||||
});
|
||||
|
||||
const pagination = computed(() => ({
|
||||
total: total.value,
|
||||
@@ -266,10 +282,10 @@ const pagination = computed(() => ({
|
||||
|
||||
const changePagination = (e) => {
|
||||
params.value.pageNo = e;
|
||||
fetch()
|
||||
fetch();
|
||||
};
|
||||
const rowSelection = computed(() => ({
|
||||
type: 'radio',
|
||||
type: "radio",
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: rowSelectKeys.value,
|
||||
onChange: onSelectChange,
|
||||
@@ -279,73 +295,90 @@ const rowSelection = computed(() => ({
|
||||
function onSelectChange(e, l) {
|
||||
rowSelectKeys.value = e;
|
||||
selectsData.value = l;
|
||||
selectedRows.value = l[0];
|
||||
console.log("selectedRows", selectedRows);
|
||||
}
|
||||
|
||||
function search() {
|
||||
params.value.pageNo = 1
|
||||
fetch()
|
||||
params.value.pageNo = 1;
|
||||
fetch();
|
||||
}
|
||||
|
||||
function reset() {
|
||||
rowSelectKeys.value = [];
|
||||
selectsData.value = [];
|
||||
params.value.pageNo = 1
|
||||
params.value.keyWord = ''
|
||||
params.value.createName = ''
|
||||
params.value.manager = ''
|
||||
params.value.name = ''
|
||||
fetch()
|
||||
params.value.pageNo = 1;
|
||||
params.value.keyWord = "";
|
||||
params.value.createName = "";
|
||||
params.value.manager = "";
|
||||
params.value.name = "";
|
||||
fetch();
|
||||
}
|
||||
|
||||
const closeDrawer = () => {
|
||||
visible.value = false
|
||||
taskIndex.value = -1
|
||||
reset()
|
||||
visible.value = false;
|
||||
taskIndex.value = -1;
|
||||
selectedRows.value = null;
|
||||
reset();
|
||||
};
|
||||
|
||||
function confirm() {
|
||||
if (!selectsData.value.length || !rowSelectKeys.value.length) {
|
||||
message.warning("请选择项目!");
|
||||
return
|
||||
return;
|
||||
}
|
||||
if (taskIndex.value === -1) {
|
||||
const list = props.taskList
|
||||
const list = props.taskList;
|
||||
list.push({
|
||||
name: selectsData.value[0].name,
|
||||
type: props.type,
|
||||
courseId: selectsData.value[0].id,
|
||||
info: {...selectsData.value[0]}
|
||||
})
|
||||
info: { ...selectsData.value[0] },
|
||||
});
|
||||
} else {
|
||||
const data = props.taskList[taskIndex.value]
|
||||
data.name = selectsData.value[0].name
|
||||
data.courseId = selectsData.value[0].id
|
||||
data.info = selectsData.value[0]
|
||||
const data = props.taskList[taskIndex.value];
|
||||
data.name = selectsData.value[0].name;
|
||||
data.courseId = selectsData.value[0].id;
|
||||
data.info = selectsData.value[0];
|
||||
}
|
||||
emit('update:taskList', [...props.taskList])
|
||||
closeDrawer()
|
||||
emit("update:taskList", [...props.taskList]);
|
||||
closeDrawer();
|
||||
}
|
||||
|
||||
const goProjectmanage = () => {
|
||||
router.push({path: "/projectmanage"});
|
||||
}
|
||||
// router.push({path: "/projectmanage"});
|
||||
window.open(process.env.VUE_APP_BASE + "/projectmanage");
|
||||
};
|
||||
|
||||
function closeSameModal() {
|
||||
sameModal.value = false
|
||||
}
|
||||
|
||||
function sureSameModal() {
|
||||
|
||||
sameModal.value = false;
|
||||
}
|
||||
|
||||
function sureSameModal() {}
|
||||
let selectedRows = ref(null);
|
||||
function openDrawer(i, row) {
|
||||
console.log("row", row);
|
||||
|
||||
row && (rowSelectKeys.value = [row.courseId]);
|
||||
row && (selectsData.value = [{name: row.name, id: row.courseId}]);
|
||||
(i >= 0) && (taskIndex.value = i)
|
||||
visible.value = true
|
||||
row && (selectsData.value = [{ name: row.name, id: row.courseId }]);
|
||||
i >= 0 && (taskIndex.value = i);
|
||||
visible.value = true;
|
||||
|
||||
//获取项目详情
|
||||
if (row && row.courseId) {
|
||||
getProjectDetail({
|
||||
projectId: row.courseId,
|
||||
}).then((res) => {
|
||||
console.log("获取选中项目详情", res);
|
||||
if (res.data.code === 200) {
|
||||
selectedRows.value = res.data.data.projectInfo;
|
||||
console.log("selectedRows", selectedRows);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({openDrawer})
|
||||
defineExpose({ openDrawer });
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
|
||||
@@ -355,6 +355,7 @@ async function confirm() {
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
emit('update:taskList', [...props.taskList])
|
||||
closeDrawer()
|
||||
}
|
||||
|
||||
@@ -17,10 +17,16 @@
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
<div class="btnsn" @click="reset">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">刷新</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_item">
|
||||
<button class="xkbtn" style="margin:0" @click="goResearchmanage">新建评估</button>
|
||||
<button class="xkbtn" style="margin: 0" @click="goResearchmanage">
|
||||
新建评估
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="main_notice" style="display: none">
|
||||
@@ -44,7 +50,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, defineEmits, defineProps, ref, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
// import { useRouter } from "vue-router";
|
||||
import { useRowsPage } from "@/api/request";
|
||||
import { ASSESSMENT_PAGE } from "@/api/apis";
|
||||
|
||||
@@ -105,7 +111,7 @@ const initParams = {
|
||||
pageSize: 10,
|
||||
releaseStatus: 2,
|
||||
};
|
||||
const router = useRouter();
|
||||
// const router = useRouter();
|
||||
const params = ref(initParams);
|
||||
|
||||
const rowSelectKeys = ref([]);
|
||||
@@ -147,7 +153,7 @@ const pagination = computed(() => ({
|
||||
}));
|
||||
|
||||
const changePagination = (e) => {
|
||||
params.value.pageIndex = e;
|
||||
params.value.pageNo = e;
|
||||
fetch();
|
||||
};
|
||||
const rowSelection = computed(() => ({
|
||||
@@ -156,12 +162,12 @@ const rowSelection = computed(() => ({
|
||||
selectedRowKeys: rowSelectKeys.value,
|
||||
onChange: onSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
getCheckboxProps: getCheckboxProps
|
||||
getCheckboxProps: getCheckboxProps,
|
||||
}));
|
||||
const getCheckboxProps = () => ({
|
||||
// 某几项默认禁止选中(R: 当state等于1时)
|
||||
disabled: false
|
||||
})
|
||||
disabled: false,
|
||||
});
|
||||
|
||||
function onSelectChange(e, l) {
|
||||
rowSelectKeys.value = e;
|
||||
@@ -180,12 +186,13 @@ function reset() {
|
||||
selectsData.value = [];
|
||||
params.value.pageIndex = 1;
|
||||
params.value.keyWord = "";
|
||||
params.value.assessmentName ="";
|
||||
params.value.assessmentName = "";
|
||||
fetch();
|
||||
}
|
||||
|
||||
const goResearchmanage = () => {
|
||||
router.push({ path: "/researchmanage" });
|
||||
// router.push({ path: "/researchmanage" });
|
||||
window.open(process.env.VUE_APP_BASE + "/researchmanage");
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
class="drawerStyle CheckStu"
|
||||
placement="right"
|
||||
width="70%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
@@ -19,17 +18,19 @@
|
||||
<div v-if="!loading" class="main">
|
||||
<div class="stuinfor">
|
||||
<div class="portrait">
|
||||
<img src="../../assets/images/studentimg/character.png" />
|
||||
<img src="../../assets/images/studentimg/character.png"/>
|
||||
</div>
|
||||
<div class="stumation">
|
||||
<div class="stuname">{{pro==null?"":pro.routerInfo.name}}</div>
|
||||
<div class="stugangw">{{pro==null?"":pro.routerInfo.organizationName?pro.routerInfo.organizationName:"" + '-' + pro==null?"":pro.routerInfo.jobName?pro.routerInfo.jobName:""}}</div>
|
||||
<div class="stuname">{{ pro.userInfo?.realName }}</div>
|
||||
<div class="stugangw">
|
||||
{{pro.routerInfo?.departName || '' }} - {{ pro.userInfo?.jobName || ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="sortbox">
|
||||
<div class="sortname">进度排名</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{rank.current}}</span>
|
||||
<span class="total">/{{rank.total}}</span>
|
||||
<span class="nub1">{{ rank.current || 0 }}</span>
|
||||
<span class="total">/{{ rank.total || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<a-divider
|
||||
@@ -43,8 +44,8 @@
|
||||
<div class="sortbox" style="margin-left: 34px">
|
||||
<div class="sortname">完成必修</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{pro==null?"":pro.currentReqCnt}}</span>
|
||||
<span class="total">/{{pro==null?"":pro.totalReqCnt}}</span>
|
||||
<span class="nub1">{{ rank.finishCompulsoryNum || 0 }}</span>
|
||||
<span class="total">/{{ rank.totalCompulsoryNum || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<a-divider
|
||||
@@ -57,50 +58,10 @@
|
||||
<div class="sortbox" style="margin-left: 34px">
|
||||
<div class="sortname">已修证书</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{pro==null?"":pro.routerInfo.certCnt?pro.routerInfo.certCnt:0}}</span>
|
||||
<span class="nub1">{{ rank.certNum || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="secondrow">
|
||||
<div class="rowleft">{{ pro.name }}</div> -->
|
||||
<!-- <div class="rowbox" @click="showProMess">
|
||||
<div class="shuom">说明</div>
|
||||
<div><img src="../../assets/images/studentimg/chak.png" /></div>
|
||||
</div> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div v-for="(item) in pro.chapterList" class="mainbox"
|
||||
style="margin-top: 15px; height: 56px"
|
||||
:key="item.chapterId">
|
||||
<div class="rowtitle" @click="changeDown">
|
||||
<div class="titleimg">
|
||||
<img
|
||||
:src="
|
||||
showDown
|
||||
? require('../../assets/images/studentimg/open.png')
|
||||
: require('../../assets/images/studentimg/close.png')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="titletext">{{item.chapterName}}</div>
|
||||
</div>
|
||||
|
||||
<div :style="{ display: showDown ? 'block' : 'none' }">
|
||||
<div v-for="_item in item.taskList" :key="_item.routerTaskId" class="rowclass">
|
||||
<div class="leftclass">
|
||||
<div><img src="../../assets/images/leveladd/zai.png" /></div>
|
||||
<div class="text1">{{checkType(_item.type)}}</div>
|
||||
<div class="text2">{{_item.name}}</div>
|
||||
</div>
|
||||
<div class="alreadyclass">
|
||||
<div class="alimg">
|
||||
<img src="../../assets/images/studentimg/complete.png" />
|
||||
</div>
|
||||
<div class="altext">{{checkStatus(_item.status)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="mainbox">
|
||||
<a-collapse v-model:activeKey="stageListActive">
|
||||
<template #expandIcon="{ isActive }">
|
||||
@@ -114,32 +75,25 @@
|
||||
/>
|
||||
<div></div>
|
||||
</template>
|
||||
<a-collapse-panel
|
||||
v-for="value in pro==null?[]:pro.chapterList"
|
||||
:key="value.chapterId"
|
||||
:header="value.chapterName"
|
||||
|
||||
>
|
||||
<template #extra >
|
||||
<a-collapse-panel v-for="value in pro.chapterList || []" :key="value.id" :header="value.name">
|
||||
<template #extra>
|
||||
<div @click.stop="">
|
||||
<div class="rowbox">
|
||||
<a-popover title="关卡说明">
|
||||
<template #content>
|
||||
<p>{{value.remark}}</p>
|
||||
<p>{{ value.remark }}</p>
|
||||
</template>
|
||||
<div class="shuom">说明</div>
|
||||
</a-popover>
|
||||
<div><img src="../../assets/images/studentimg/chak.png" /></div>
|
||||
<div><img src="../../assets/images/studentimg/chak.png"/></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div
|
||||
class="rowclass"
|
||||
v-for="(item, key) in value.taskList"
|
||||
:key="key"
|
||||
>
|
||||
|
||||
<div class="leftclass">
|
||||
<div>
|
||||
<img
|
||||
@@ -187,7 +141,7 @@
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="altext">{{ item.status ==0?"进行中":item.status ==1?"已完成":"未开始" }}</div>
|
||||
<div class="altext">{{ item.status === 0 ? "进行中" : item.status === 1 ? "已完成" : "未开始" }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -201,18 +155,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<check-stu-mess v-model:StuMessvisible="StuMessvisible" />
|
||||
<check-stu-mess v-model:StuMessvisible="StuMessvisible"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import CheckStuMess from "./CheckStuMess.vue";
|
||||
import {stuProgress} from "@/api/index1";
|
||||
import {studentRank} from "@/api/indexProjStu";
|
||||
// import {message} from "ant-design-vue";
|
||||
import {reactive, toRefs, watch} from "vue";
|
||||
import {stuRouterProgress} from "@/api/index1";
|
||||
import {routerStudentRank} from "@/api/indexProjStu";
|
||||
|
||||
export default {
|
||||
name: "CheckStu",
|
||||
components: { CheckStuMess },
|
||||
props: {
|
||||
CheckStuvisible: {
|
||||
type: Boolean,
|
||||
@@ -231,54 +183,38 @@ export default {
|
||||
const state = reactive({
|
||||
StuMessvisible: false,
|
||||
showDown: false,
|
||||
pro:null,
|
||||
loading:true,
|
||||
pro: null,
|
||||
loading: false,
|
||||
stageListActive: 0,
|
||||
rank:{total:1,current:1},
|
||||
rank: {total: 0, current: 0, finishCompulsoryNum: 0, totalCompulsoryNum: 0, certNum: 0},
|
||||
});
|
||||
|
||||
watch([()=>props.studentId, ()=>props.routerId], () => {
|
||||
console.log(111111)
|
||||
console.log(props)
|
||||
getStuProgress()
|
||||
getStuRank()
|
||||
})
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:CheckStuvisible", false);
|
||||
};
|
||||
|
||||
const getStuRank = () => {
|
||||
studentRank({
|
||||
projectId: props.routerId,
|
||||
studentId: props.studentId,
|
||||
type:2
|
||||
}).then(res=>{
|
||||
state.rank = res.data.data
|
||||
})
|
||||
routerStudentRank({routerId: props.routerId, studentId: props.studentId}).then(res => state.rank = res.data.data)
|
||||
}
|
||||
|
||||
const showProMess = () => {
|
||||
state.StuMessvisible = true;
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
if(props.CheckStuvisible) {
|
||||
getStuProgress()
|
||||
getStuRank()
|
||||
}
|
||||
console.log("state", bool);
|
||||
};
|
||||
const changeDown = () => {
|
||||
state.showDown = !state.showDown;
|
||||
};
|
||||
const getStuProgress = () => {
|
||||
state.loading = true
|
||||
let obj = {
|
||||
routerId:props.routerId,
|
||||
id:props.studentId
|
||||
}
|
||||
console.log("obj",obj);
|
||||
stuProgress(obj).then(res => {
|
||||
console.log("查询当前学员进度信息success",res)
|
||||
stuRouterProgress({routerId: props.routerId, userId: props.studentId}).then(res => {
|
||||
state.pro = res.data.data
|
||||
state.loading = false
|
||||
console.log(res)
|
||||
}).catch(err => {
|
||||
console.log("查询当前学员进度信息err",err)
|
||||
state.loading = false
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -302,47 +238,37 @@ export default {
|
||||
return typeRules[type];
|
||||
}
|
||||
|
||||
const checkStatus = (status) => {
|
||||
if(status < 0) return "未开始"
|
||||
let statusRules = [
|
||||
"进行中","已完成"
|
||||
]
|
||||
return statusRules[status]
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
showProMess,
|
||||
changeDown,
|
||||
checkType,
|
||||
checkStatus,
|
||||
// change,
|
||||
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
<style lang="scss">
|
||||
.CheckStu {
|
||||
.ant-drawer-content-wrapper {
|
||||
// max-width: 1000px;
|
||||
.ant-drawer-header {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.ant-drawer-body {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
@@ -352,6 +278,7 @@ export default {
|
||||
// background-color: red;
|
||||
margin-bottom: 20px;
|
||||
flex-shrink: 0;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
@@ -360,11 +287,13 @@ export default {
|
||||
// margin-left: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.stuinfor {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -374,35 +303,43 @@ export default {
|
||||
background-image: url("../../assets/images/studentimg/bgimg.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right;
|
||||
|
||||
.stumation {
|
||||
margin-left: 24px;
|
||||
|
||||
.stuname {
|
||||
color: #333333;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.stugangw {
|
||||
color: #999999;
|
||||
font-size: 16px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.sortbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-left: 114px;
|
||||
|
||||
.sortname {
|
||||
color: #666660;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.sortnub {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 7px;
|
||||
|
||||
.nub1 {
|
||||
color: #0060ff;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.total {
|
||||
color: #999999;
|
||||
font-size: 22px;
|
||||
@@ -410,13 +347,16 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.secondrow {
|
||||
margin-top: 32px;
|
||||
display: flex;
|
||||
|
||||
.rowleft {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.rowbox {
|
||||
width: 64px;
|
||||
height: 24px;
|
||||
@@ -427,6 +367,7 @@ export default {
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
background: rgba(64, 158, 255, 0.1);
|
||||
cursor: pointer;
|
||||
|
||||
.shuom {
|
||||
color: rgba(64, 158, 255, 1);
|
||||
font-size: 14px;
|
||||
@@ -435,6 +376,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .mainbox {
|
||||
// // height: 463px;
|
||||
// margin-right: 37px;
|
||||
@@ -512,6 +454,7 @@ export default {
|
||||
background: rgba(64, 158, 255, 0.1);
|
||||
margin-right: 480px;
|
||||
cursor: pointer;
|
||||
|
||||
.shuom {
|
||||
color: rgba(64, 158, 255, 1);
|
||||
font-size: 14px;
|
||||
@@ -519,23 +462,28 @@ export default {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-collapse {
|
||||
background-color: #ffffff;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.ant-collapse-content > .ant-collapse-content-box {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.ant-collapse > .ant-collapse-item {
|
||||
border: 1px solid rgba(221, 238, 255, 1);
|
||||
border-radius: 6px;
|
||||
margin-bottom: 15px;
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
.ant-collapse-content {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.ant-collapse-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -545,52 +493,60 @@ export default {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.rowclass {
|
||||
height: 81px;
|
||||
border-bottom: 1px solid rgba(221, 238, 255, 1);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.leftclass {
|
||||
display: flex;
|
||||
margin-left: 25px;
|
||||
align-items: center;
|
||||
|
||||
.text1 {
|
||||
color: #000000;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
margin-left: 25px;
|
||||
word-break:keep-all;
|
||||
white-space:nowrap;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.text2 {
|
||||
color: rgba(51, 51, 51, 0.8);
|
||||
font-size: 14px;
|
||||
margin-left: 65px;
|
||||
word-break:keep-all;
|
||||
white-space:nowrap;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.alreadyclass {
|
||||
display: flex;
|
||||
margin-right: 57px;
|
||||
|
||||
.alimg {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.altext {
|
||||
color: rgba(56, 125, 247, 1);
|
||||
font-size: 14px;
|
||||
margin-left: 16px;
|
||||
word-break:keep-all;
|
||||
white-space:nowrap;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
@@ -602,6 +558,7 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
|
||||
@@ -417,7 +417,7 @@ export default {
|
||||
message.error(`请输入审核意见!`);
|
||||
return;
|
||||
}
|
||||
|
||||
ctx.emit("update:ProjAuditvisible", false);
|
||||
auditView({
|
||||
createId: props.chooseCreateId,
|
||||
createName: props.chooseCreater,
|
||||
|
||||
@@ -1,58 +1,56 @@
|
||||
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
|
||||
<template>
|
||||
<a-drawer :visible="Seevisible" class="drawerStyle seestu" placement="right" width="70%"
|
||||
@after-visible-change="afterVisibleChange">
|
||||
<a-drawer :visible="Seevisible" class="drawerStyle seestu" placement="right" width="70%">
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">查看</div>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer" />
|
||||
@click="closeDrawer"/>
|
||||
</div>
|
||||
<a-spin v-if="loading" :spinning="loading" />
|
||||
<a-spin v-if="loading" :spinning="loading"/>
|
||||
<div v-if="!loading" class="main">
|
||||
<div class="stuinfor">
|
||||
<div class="portrait">
|
||||
<img src="../../assets/images/studentimg/character.png" />
|
||||
<img src="../../assets/images/studentimg/character.png"/>
|
||||
</div>
|
||||
<div class="stumation">
|
||||
<div class="stuname">{{ userName }}</div>
|
||||
<div class="stugangw">{{ deptName }} - {{ jobName }}</div>
|
||||
<div class="stuname">{{ info.userInfo?.realName }}</div>
|
||||
<div class="stugangw">{{ info.userInfo?.departName }} - {{ info.userInfo?.jobName }}</div>
|
||||
</div>
|
||||
<div class="sortbox">
|
||||
<div class="sortname">进度排名</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{ rank.current }}</span>
|
||||
<span class="total">/{{ rank.total }}</span>
|
||||
<span class="nub1">{{ rank.current || 0 }}</span>
|
||||
<span class="total">/{{ rank.total || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<a-divider type="vertical" style="
|
||||
height: 49px;
|
||||
margin-left: 34px;
|
||||
background-color: rgba(170, 166, 166, 0.3);
|
||||
" />
|
||||
"/>
|
||||
<div class="sortbox" style="margin-left: 34px">
|
||||
<div class="sortname">完成必修</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{ currentReqCnt }}</span>
|
||||
<span class="total">/{{ totalReqCnt }}</span>
|
||||
<span class="nub1">{{ rank.finishCompulsoryNum || 0 }}</span>
|
||||
<span class="total">/{{ rank.totalCompulsoryNum || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-divider type="vertical" style="
|
||||
height: 49px;
|
||||
margin-left: 34px;
|
||||
background-color: rgba(170, 166, 166, 0.3);" />
|
||||
background-color: rgba(170, 166, 166, 0.3);"/>
|
||||
<div class="sortbox" style="margin-left: 34px">
|
||||
<div class="sortname">已修证书</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{ 0 }}</span>
|
||||
<span class="nub1">{{ rank.certNum || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="secondrow">
|
||||
<div class="rowleft">{{ name }} </div>
|
||||
<div class="rowRight"> 排序号:{{ sort }}</div>
|
||||
<div class="rowleft">{{ info.projectInfo.name }}</div>
|
||||
</div>
|
||||
<div class="mainbox">
|
||||
<a-collapse v-model:activeKey="stageListActive">
|
||||
@@ -61,10 +59,10 @@
|
||||
isActive
|
||||
? require('../../assets/images/studentimg/open.png')
|
||||
: require('../../assets/images/studentimg/close.png')
|
||||
" />
|
||||
"/>
|
||||
<div></div>
|
||||
</template>
|
||||
<a-collapse-panel v-for="value in stageList" :key="value.stageId" :header="value.stageName">
|
||||
<a-collapse-panel v-for="value in info.stageList" :key="value.id" :header="value.name || '无阶段任务'">
|
||||
<template #extra>
|
||||
<div @click.stop="">
|
||||
<div class="rowbox">
|
||||
@@ -74,7 +72,7 @@
|
||||
</template>
|
||||
<div class="shuom">说明</div>
|
||||
</a-popover>
|
||||
<div><img src="../../assets/images/studentimg/chak.png" /></div>
|
||||
<div><img src="../../assets/images/studentimg/chak.png"/></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -83,37 +81,36 @@
|
||||
|
||||
<div class="leftclass">
|
||||
<div>
|
||||
<img :src="
|
||||
item.course === '在线'
|
||||
<img
|
||||
:src="
|
||||
item.type === 1
|
||||
? require('../../assets/images/leveladd/zai.png')
|
||||
: item.course === '面授'
|
||||
: item.type === 2
|
||||
? require('../../assets/images/leveladd/mian.png')
|
||||
: item.course === '案例'
|
||||
: item.type === 3
|
||||
? require('../../assets/images/leveladd/an.png')
|
||||
: item.course === '作业'
|
||||
: item.type === 4
|
||||
? require('../../assets/images/leveladd/zuo.png')
|
||||
: item.course === '考试'
|
||||
: item.type === 5
|
||||
? require('../../assets/images/leveladd/kao.png')
|
||||
: item.course === '直播'
|
||||
: item.type === 6
|
||||
? require('../../assets/images/leveladd/zhi.png')
|
||||
: item.course === '外链'
|
||||
: item.type === 7
|
||||
? require('../../assets/images/leveladd/wai.png')
|
||||
: item.course === '讨论'
|
||||
: item.type === 8
|
||||
? require('../../assets/images/leveladd/tao.png')
|
||||
: item.course === '活动'
|
||||
: item.type === 9
|
||||
? require('../../assets/images/leveladd/huo.png')
|
||||
: item.course === '测评'
|
||||
: item.type === 10
|
||||
? require('../../assets/images/leveladd/ce.png')
|
||||
: item.course === '调研'
|
||||
: item.type === 11
|
||||
? require('../../assets/images/leveladd/diao.png')
|
||||
: item.course === '投票'
|
||||
: item.type === 12
|
||||
? require('../../assets/images/leveladd/tou.png')
|
||||
: item.course === '评估'
|
||||
? require('../../assets/images/leveladd/diao.png')
|
||||
: item.course === '项目'
|
||||
: item.type === 13
|
||||
? require('../../assets/images/leveladd/xiangmu.png')
|
||||
: null
|
||||
" />
|
||||
: null"
|
||||
/>
|
||||
</div>
|
||||
<div class="text1">{{ item.course }}</div>
|
||||
<div class="text2">{{ item.name }}</div>
|
||||
@@ -124,11 +121,10 @@
|
||||
item.complete === '已完成'
|
||||
? require('../../assets/images/studentimg/complete.png')
|
||||
: require('../../assets/images/studentimg/notice.png')
|
||||
" />
|
||||
"/>
|
||||
</div>
|
||||
<div class="altext">{{ item.complete }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a-collapse-panel>
|
||||
</a-collapse>
|
||||
@@ -138,17 +134,18 @@
|
||||
<button class="btn2" @click="closeDrawer">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<pro-mess v-model:Provisible="Provisible" />
|
||||
<pro-mess v-model:Provisible="Provisible"/>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import {reactive, toRefs, watch} from "vue";
|
||||
import ProMess from "./ProMess.vue";
|
||||
import { studentProcess, studentRank } from "../../api/indexProjStu";
|
||||
import {projectStudentRank, projectStudentProcess} from "@/api/indexProjStu";
|
||||
|
||||
export default {
|
||||
name: "SeeStu",
|
||||
components: { ProMess },
|
||||
components: {ProMess},
|
||||
props: {
|
||||
Seevisible: {
|
||||
type: Boolean,
|
||||
@@ -166,213 +163,40 @@ export default {
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
loading: false,
|
||||
userName: null, //用户名
|
||||
deptName: null, //部门
|
||||
jobName: null, //岗位
|
||||
certCnt: null, //已修证书
|
||||
name: null, //路径图名称
|
||||
totalReqCnt: null, //累计必修数
|
||||
currentReqCnt: null, //完成必修数
|
||||
info: {},
|
||||
Provisible: false,
|
||||
showDown: true,
|
||||
showDown1: false,
|
||||
rank: { total: 1, current: 1 },
|
||||
sort: null,
|
||||
stageList: [
|
||||
// {
|
||||
// stageName: "阶段1腾飞班阶段1",
|
||||
// stageId: 1,
|
||||
// taskList: [
|
||||
// {
|
||||
// course: "在线",
|
||||
// name: "如何成为一个产品经理",
|
||||
// complete: "已完成",
|
||||
// },
|
||||
// {
|
||||
// course: "直播",
|
||||
// name: "管理直播课",
|
||||
// complete: "已完成",
|
||||
// },
|
||||
// {
|
||||
// course: "面授",
|
||||
// name: "管理面授课",
|
||||
// complete: "未完成",
|
||||
// },
|
||||
// {
|
||||
// course: "活动",
|
||||
// name: "管理活动",
|
||||
// complete: "未完成",
|
||||
// },
|
||||
// {
|
||||
// course: "作业",
|
||||
// name: "管理者作业",
|
||||
// complete: "未完成",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
],
|
||||
stageListActive: 0,
|
||||
rank: {total: 0, current: 0, finishCompulsoryNum: 0, totalCompulsoryNum: 0, certNum: 0},
|
||||
});
|
||||
|
||||
watch([() => props.checkStuId, () => props.projectId], () => {
|
||||
getStuRank()
|
||||
check()
|
||||
})
|
||||
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:Seevisible", false);
|
||||
};
|
||||
|
||||
const getStuRank = () => {
|
||||
studentRank({
|
||||
projectId: props.projectId,
|
||||
studentId: props.checkStuId,
|
||||
type: 1
|
||||
}).then(res => {
|
||||
state.rank = res.data.data
|
||||
})
|
||||
projectStudentRank({projectId: props.projectId, studentId: props.checkStuId}).then(res => state.rank = res.data.data)
|
||||
}
|
||||
|
||||
const showProMess = () => {
|
||||
state.Provisible = true;
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
if (bool == true) {
|
||||
check();
|
||||
getStuRank()
|
||||
}
|
||||
};
|
||||
const changeDown = () => {
|
||||
state.showDown = !state.showDown;
|
||||
};
|
||||
const changeDown1 = () => {
|
||||
state.showDown1 = !state.showDown1;
|
||||
};
|
||||
const taskList = (tableData) => {
|
||||
let data = tableData;
|
||||
console.log('我排序了吗--------------------------》', data)
|
||||
let array = [];
|
||||
if (data != undefined) {
|
||||
data.map((value) => {
|
||||
console.log('我排序了吗---------value-----------------》', value)
|
||||
let obj = {
|
||||
course:
|
||||
value.type == 1
|
||||
? "在线"
|
||||
: value.type == 2
|
||||
? "面授"
|
||||
: value.type == 3
|
||||
? "案例"
|
||||
: value.type == 4
|
||||
? "作业"
|
||||
: value.type == 5
|
||||
? "考试"
|
||||
: value.type == 6
|
||||
? "直播"
|
||||
: value.type == 7
|
||||
? "外链"
|
||||
: value.type == 8
|
||||
? "讨论"
|
||||
: value.type == 9
|
||||
? "活动"
|
||||
: value.type == 10
|
||||
? "测评"
|
||||
: value.type == 11
|
||||
? "评估"
|
||||
: value.type == 12
|
||||
? "投票"
|
||||
: "-",
|
||||
name: value.name,
|
||||
projectId: value.projectId,
|
||||
complete:
|
||||
value.status == -1
|
||||
? "未开始"
|
||||
: value.status == 1
|
||||
? "已完成"
|
||||
: value.status == 0
|
||||
? "未完成"
|
||||
: "-",
|
||||
flag: value.flag == 0 ? "选修" : "必修",
|
||||
currentRatio: value.currentRatio,
|
||||
routerTaskId: value.routerTaskId,
|
||||
};
|
||||
console.log('我排序了吗---------obj-----------------》', obj)
|
||||
array.push(obj);
|
||||
});
|
||||
array.sort((a, b) => { return a.projectId - b.projectId })
|
||||
}
|
||||
|
||||
console.log('我排序了吗-----------1---------------》', array)
|
||||
return array;
|
||||
};
|
||||
const setStageList = (tableData) => {
|
||||
let data = tableData;
|
||||
console.log("查看了学员1", data);
|
||||
let array = [];
|
||||
//无阶段任务
|
||||
if (data?.length == 1 && data[0].id == 0) {
|
||||
console.log("无阶段任务", data);
|
||||
data.map((value) => {
|
||||
let obj = {
|
||||
stageName: "无阶段任务",
|
||||
stageId: 0,
|
||||
remark: value.remark,
|
||||
taskList: taskList(value.taskList),
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
} else { //有阶段
|
||||
console.log("有阶段", data);
|
||||
data.map((value) => {
|
||||
console.log("有阶段value", value);
|
||||
let obj = {
|
||||
stageName: value.name,
|
||||
stageId: value.id,
|
||||
remark: value.remark,
|
||||
taskList: taskList(value.taskList),
|
||||
};
|
||||
if (value.id > 0) {
|
||||
array.push(obj);
|
||||
}
|
||||
console.log("有阶段array", array);
|
||||
});
|
||||
}
|
||||
|
||||
state.stageList = array;
|
||||
};
|
||||
const check = () => {
|
||||
state.loading = true
|
||||
let obj = {
|
||||
projectId: props.projectId,
|
||||
studentId: props.checkStuId,
|
||||
};
|
||||
studentProcess(obj).then((res) => {
|
||||
projectStudentProcess({projectId: props.projectId, userId: props.checkStuId}).then((res) => {
|
||||
state.loading = false
|
||||
console.log("查看了学员", res.data);
|
||||
let result = res.data.data;
|
||||
console.log("查看了学员result:", result);
|
||||
state.userName = result.projectInfo.name;
|
||||
state.deptName = result.projectInfo.deptName;
|
||||
state.jobName = result.projectInfo.jobName;
|
||||
state.certCnt = result.projectInfo.certCnt == null ? 0 : result.projectInfo.certCnt;
|
||||
state.name = result.projectInfo.name;
|
||||
state.currentReqCnt = result.projectInfo.currentReqCnt;
|
||||
state.totalReqCnt = result.projectInfo.totalReqCnt;
|
||||
|
||||
if (result.stageList.length > 0) {
|
||||
state.sort = result.stageList[0].sort;
|
||||
|
||||
state.info = res.data.data;
|
||||
})
|
||||
}
|
||||
setStageList(result.stageList);
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
showProMess,
|
||||
changeDown,
|
||||
changeDown1,
|
||||
check,
|
||||
setStageList,
|
||||
taskList,
|
||||
// change,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -521,12 +345,12 @@ export default {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.ant-collapse-content>.ant-collapse-content-box {
|
||||
.ant-collapse-content > .ant-collapse-content-box {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.ant-collapse>.ant-collapse-item {
|
||||
.ant-collapse > .ant-collapse-item {
|
||||
border: 1px solid rgba(221, 238, 255, 1);
|
||||
border-radius: 6px;
|
||||
margin-bottom: 15px;
|
||||
|
||||
@@ -194,8 +194,8 @@ export default {
|
||||
console.log('我是传递过来的参数', props.datasource)
|
||||
console.log('我是传递过来的参数2', props.basicdata)
|
||||
api.QueryAssessmentDetail({
|
||||
"assessmentSubmitId": props.datasource.assessmentSubmitId,
|
||||
"courseId": props.basicdata.assessmentId,
|
||||
"assessmentSubmitId": props.datasource.assessmentSubmitId?props.datasource.assessmentSubmitId:props.datasource.assessmentResultIds,
|
||||
"courseId": props.basicdata.id,
|
||||
"studentId": props.datasource.studentId
|
||||
}).then(res=>{
|
||||
console.log(res)
|
||||
|
||||
@@ -462,20 +462,6 @@ export default {
|
||||
function CreateCertificate() {
|
||||
state.CCertificate = true;
|
||||
}
|
||||
//上传封面
|
||||
const handleChange = (info) => {
|
||||
if (info.file.status === "uploading") {
|
||||
return;
|
||||
}
|
||||
if (info.file.status === "done") {
|
||||
console.log("上传图片返回的信息 %o", info.file.name);
|
||||
state.imageUrl = process.env.VUE_APP_FILE_PATH + info.file.name;
|
||||
state.imageName = info.file.name;
|
||||
}
|
||||
if (info.file.status === "error") {
|
||||
message.error("upload error");
|
||||
}
|
||||
};
|
||||
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng =
|
||||
@@ -501,19 +487,14 @@ export default {
|
||||
fileUp(formDatas).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
console.log(file)
|
||||
state.imageUrl = res.data.data;
|
||||
state.imageName = file.name;
|
||||
state.imageUrl = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||
state.imageName = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
// function beforeUpload(file) {
|
||||
// if (!state.fileType.includes(file.name.split(".").slice(-1).join(""))) {
|
||||
// message.error("不支持该格式");
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
//查看证书
|
||||
const getcertificate = () => {
|
||||
@@ -528,7 +509,7 @@ export default {
|
||||
if (res.data.code === 200) {
|
||||
let info = res.data.data;
|
||||
state.certificateName = info.name; //证书名称
|
||||
state.imageUrl = process.env.VUE_APP_FILE_PATH + info.url; //证书封面
|
||||
state.imageUrl = info.url; //证书封面
|
||||
state.certificateRemark = info.remark; //证书说明
|
||||
state.condition = info.finishType; //选择条件
|
||||
state.large = info.finishType == 1 ? info.finishValue : null; //选择项目里的全部任务或必修任务
|
||||
@@ -634,7 +615,6 @@ export default {
|
||||
closeDrawer,
|
||||
selectCondition,
|
||||
selectlarge,
|
||||
handleChange,
|
||||
beforeUpload,
|
||||
CreateCertificate,
|
||||
saveupdatecertificate,
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="datasource.type !==1" class="namecon" style="margin-right: 50px">
|
||||
<div class="namecon" style="margin-right: 50px">
|
||||
<div class="name">任务状态:</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
@@ -128,6 +128,8 @@
|
||||
</div>-->
|
||||
</div>
|
||||
</a-drawer>
|
||||
<view-assess v-model:Assessvisible="Assessvisible" :datasource="evalDataSource" :evalName="datasource.info?.assessmentName"
|
||||
:basicdata="datasource.info" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -135,9 +137,11 @@ import { toRefs, reactive, onMounted, onUnmounted } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
// import * as api from "../../../api/index";
|
||||
import * as api from "../../../api/indexTaskManage";
|
||||
import ViewAssess from "../ViewAssess";
|
||||
|
||||
export default {
|
||||
name: "ProjectOnlineManage",
|
||||
|
||||
components: { ViewAssess },
|
||||
props: {
|
||||
Tvisible: {
|
||||
type: Boolean,
|
||||
@@ -195,6 +199,8 @@ export default {
|
||||
],
|
||||
tabledata: [],
|
||||
tableDataTotalLoading: true, // 表格loading加载配置
|
||||
evalDataSource: "",
|
||||
Assessvisible: false
|
||||
});
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
@@ -309,9 +315,42 @@ export default {
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
let obj = {
|
||||
title: "操作",
|
||||
dataIndex: "finishStatus",
|
||||
key: "finishStatus",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<a
|
||||
onClick={()=>{
|
||||
console.log('iyiy', text.record)
|
||||
showassess(text.record);
|
||||
}}>查看</a>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
}
|
||||
|
||||
{/* 评估查看操作 */}
|
||||
if(props.datasource.type==11){
|
||||
columns.push(obj)
|
||||
}
|
||||
|
||||
return columns;
|
||||
};
|
||||
|
||||
{/* 查看评估弹框 */}
|
||||
const showassess = (data) => {
|
||||
state.evalDataSource = data;
|
||||
state.Assessvisible = true;
|
||||
};
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:Tvisible", false);
|
||||
state.currentPage = 1;
|
||||
@@ -405,20 +444,20 @@ export default {
|
||||
if(res.data.code==200){
|
||||
state.tableDataTotalLoading = false;
|
||||
let newData = []
|
||||
for(let i=0;i<res.data.data.studyDetailList.length;i++){
|
||||
for(let i=0;i<res.data.data.studyDetailList.records.length;i++){
|
||||
// 处理在线课字段和表格中字段保持一致
|
||||
let obj = {
|
||||
studentUserNo: res.data.data.studyDetailList[i].studentCode,
|
||||
studentName: res.data.data.studyDetailList[i].studentName,
|
||||
studentDepartName: res.data.data.studyDetailList[i].studentDepartName,
|
||||
studentJobName: res.data.data.studyDetailList[i].studentJobName,
|
||||
lastStudyTime: res.data.data.studyDetailList[i].finishedTime,
|
||||
finishStatus: res.data.data.studyDetailList[i].status?res.data.data.studyDetailList[i].status:0
|
||||
studentUserNo: res.data.data.studyDetailList.records[i].studentCode,
|
||||
studentName: res.data.data.studyDetailList.records[i].studentName,
|
||||
studentDepartName: res.data.data.studyDetailList.records[i].studentDepartName,
|
||||
studentJobName: res.data.data.studyDetailList.records[i].studentJobName,
|
||||
lastStudyTime: res.data.data.studyDetailList.records[i].finishedTime,
|
||||
finishStatus: res.data.data.studyDetailList.records[i].status?res.data.data.studyDetailList.records[i].status:0
|
||||
}
|
||||
newData.push(obj)
|
||||
}
|
||||
state.tabledata = newData;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.tableDataTotal = res.data.data.studyDetailList.total;
|
||||
}
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
@@ -454,13 +493,18 @@ export default {
|
||||
|
||||
// 导出数据
|
||||
function exportTaskStu() {
|
||||
if(props.datasource.type==1){
|
||||
{/* 在线课导出 */}
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/online/manage/exportOnline?chapterId=${props.datasource.chapterId}&type=${1}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}`)
|
||||
}else{
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?pageNo=${state.currentPage}&pageSize=${state.pageSize}¤tStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&status=${state.name}&studentName=${state.projectName}`)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
showassess,
|
||||
closeDrawer,
|
||||
afterVisibleChange,
|
||||
tableDataFunc,
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="datasource.type !==1" class="namecon" style="margin-right: 50px">
|
||||
<div class="namecon" style="margin-right: 50px">
|
||||
<div class="name">任务状态:</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
@@ -390,7 +390,7 @@ export default {
|
||||
console.log("我是传递的查询参数", {
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"chapterId": props.outchapter,
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"status": state.projectName,
|
||||
"studentName": state.name,
|
||||
"taskId": props.datasource.courseId,
|
||||
@@ -401,7 +401,7 @@ export default {
|
||||
api.QueryOnlineManagementDetail({
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"chapterId": props.outchapter,
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"status": state.projectName,
|
||||
"studentName": state.name,
|
||||
"targetId":props.datasource.routerId,
|
||||
@@ -413,20 +413,20 @@ export default {
|
||||
if(res.data.code==200){
|
||||
state.tableDataTotalLoading = false;
|
||||
let newData = []
|
||||
for(let i=0;i<res.data.data.studyDetailList.length;i++){
|
||||
for(let i=0;i<res.data.data.studyDetailList.records.length;i++){
|
||||
// 处理在线课字段和表格中字段保持一致
|
||||
let obj = {
|
||||
studentUserNo: res.data.data.studyDetailList[i].studentCode,
|
||||
studentName: res.data.data.studyDetailList[i].studentName,
|
||||
studentDepartName: res.data.data.studyDetailList[i].studentDepartName,
|
||||
studentJobName: res.data.data.studyDetailList[i].studentJobName,
|
||||
lastStudyTime: res.data.data.studyDetailList[i].finishedTime,
|
||||
finishStatus: res.data.data.studyDetailList[i].status?res.data.data.studyDetailList[i].status:0
|
||||
studentUserNo: res.data.data.studyDetailList.records[i].studentCode,
|
||||
studentName: res.data.data.studyDetailList.records[i].studentName,
|
||||
studentDepartName: res.data.data.studyDetailList.records[i].studentDepartName,
|
||||
studentJobName: res.data.data.studyDetailList.records[i].studentJobName,
|
||||
lastStudyTime: res.data.data.studyDetailList.records[i].finishedTime,
|
||||
finishStatus: res.data.data.studyDetailList.records[i].status?res.data.data.studyDetailList.records[i].status:0
|
||||
}
|
||||
newData.push(obj)
|
||||
}
|
||||
state.tabledata = newData;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.tableDataTotal = res.data.data.studyDetailList.total;
|
||||
}
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
@@ -462,9 +462,12 @@ export default {
|
||||
|
||||
// 导出数据
|
||||
function exportTaskStu() {
|
||||
console.log(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
|
||||
if(props.datasource.type==1){
|
||||
{/* 在线课导出 */}
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/online/manage/exportOnline?chapterId=${props.datasource.chapterId}&type=${2}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}`)
|
||||
}else{
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?pageNo=${state.currentPage}&pageSize=${state.pageSize}¤tStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}&status=${state.name}&studentName=${state.projectName}`)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2023-02-23 14:57:21
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-02-23 20:42:25
|
||||
* @LastEditTime: 2023-02-24 09:58:42
|
||||
* @FilePath: /fe-manage/src/components/project/OrgClassCheck.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
@@ -88,7 +88,7 @@ function onLoadData(treeNode) {
|
||||
}
|
||||
|
||||
function change(e) {
|
||||
// console.log("label", e, emit);
|
||||
console.log("label", e, emit);
|
||||
// let label = [];
|
||||
// let value = [];
|
||||
// for (let i = 0; i < e.length; i++) {
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<div class="tab2">
|
||||
<a-form-item label="组织:">
|
||||
<a-input v-model:value="searchOrgName.keyword"
|
||||
style="width: 230px; height: 40px; border-radius: 8px" placeholder="请输入组织" />
|
||||
style="width: 230px; height: 40px; border-radius: 8px" placeholder="请输入组织" @click="orgValue"/>
|
||||
<a-button type="primary" @click="searchOrg" style="margin-left: 20px; border-radius: 4px">
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
@@ -97,7 +97,7 @@
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="boeTree">
|
||||
<a-tree :tree-data="searchOrgName.keyword ? orgData : treeOrgData" @select="onOrgSelectChange"
|
||||
<a-tree v-model:selectedKeys="selectedOrgKeys" :tree-data="searchOrgName.keyword ? orgData : treeOrgData" @select="onOrgSelectChange"
|
||||
:loading="orgOrgLoading" :load-data="onLoadOrgData" :fieldNames="{
|
||||
children: 'treeChildList',
|
||||
key: 'id',
|
||||
@@ -196,7 +196,7 @@
|
||||
<div v-if="i < 11">
|
||||
<div class="chose1">
|
||||
<div class="span">{{ item.name }}</div>
|
||||
<div class="ch1" @click="orgDel(i)"></div>
|
||||
<div class="ch1" @click="orgDel(i)" style="cursor: pointer;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -295,7 +295,8 @@ import {
|
||||
AUDIENCE_LIST,
|
||||
ORG_CHILD_LIST,
|
||||
ORG_LIST,
|
||||
USER_LIST,
|
||||
// USER_LIST,
|
||||
USER_LIST_PAGE,
|
||||
} from "@/api/ThirdApi";
|
||||
import {
|
||||
saveStu,
|
||||
@@ -463,7 +464,7 @@ const {
|
||||
loading: stuLoading,
|
||||
total: stuTotal,
|
||||
reset: stuReset,
|
||||
} = useBoeApiPage(USER_LIST, nameSearch.value, {
|
||||
} = useBoeApiPage(USER_LIST_PAGE, nameSearch.value, {
|
||||
init: false,
|
||||
result: (res) => res.result.userInfoList,
|
||||
totalPage: (res) => res.result.totalPage,
|
||||
@@ -613,6 +614,7 @@ const closeDrawer = () => {
|
||||
visiable.value = false;
|
||||
stuData.value = [];
|
||||
nameSearch.value.keyword = "";
|
||||
selectedOrgKeys.value = [];
|
||||
};
|
||||
|
||||
function onLoadData(treeNode) {
|
||||
@@ -661,8 +663,16 @@ function stuDel(i) {
|
||||
selectsData.value.studentList.splice(i, 1);
|
||||
}
|
||||
|
||||
const selectedOrgKeys = ref([]);
|
||||
|
||||
watch(selectedOrgKeys, () => {
|
||||
console.log('selectedKeys', selectedOrgKeys);
|
||||
});
|
||||
|
||||
function orgDel(i) {
|
||||
console.log(selectedOrgKeys.value)
|
||||
orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id)
|
||||
selectedOrgKeys.value.splice(i, 1)
|
||||
selectsData.value.deptList.splice(i, 1)
|
||||
}
|
||||
|
||||
@@ -685,8 +695,12 @@ function onStuSelectChange(e, l) {
|
||||
}
|
||||
|
||||
function onOrgSelectChange(e, l) {
|
||||
|
||||
orgRowSelection.value = e;
|
||||
selectsData.value.deptList = l.selectedNodes;
|
||||
|
||||
// 获取被点击的树节点
|
||||
|
||||
}
|
||||
|
||||
function onAuditSelectChange(e, l) {
|
||||
@@ -727,6 +741,7 @@ const resetStu = () => {
|
||||
//清空选择部门信息
|
||||
const deleteDepSelect = () => {
|
||||
stuSelectKeys.value = [];
|
||||
selectedOrgKeys.value = [];
|
||||
};
|
||||
//重置组织
|
||||
const resetOrg = () => {
|
||||
@@ -821,6 +836,12 @@ function handleStageOk() {
|
||||
// }
|
||||
}
|
||||
|
||||
// 搜索受众值发生变化
|
||||
function orgValue(value) {
|
||||
console.log("", value.target.value);
|
||||
searchOrgName.value.keyword = value.target.value;
|
||||
}
|
||||
|
||||
watch(visiable, () => {
|
||||
stuSelectKeys.value = [];
|
||||
orgSelectKeys.value = [];
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
>
|
||||
<div class="researchadd">
|
||||
<div class="header">
|
||||
<div class="headerTitle">{{ options.length ? "编辑投票题干" : "创建投票题干" }}</div>
|
||||
<div class="headerTitle">
|
||||
{{ options.length ? "编辑投票题干" : "创建投票题干" }}
|
||||
</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@@ -34,8 +36,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="(item, index) in formData" :key="index+Math.random()">
|
||||
<VoteQuestion v-if="!item.deleted" :item="item" :index="index" @del="itemDel"/>
|
||||
<div v-for="(item, index) in formData" :key="index + Math.random()">
|
||||
<VoteQuestion
|
||||
v-if="!item.deleted"
|
||||
:item="item"
|
||||
:index="index"
|
||||
@del="itemDel"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
@@ -43,11 +50,7 @@
|
||||
<a-button
|
||||
type="primary"
|
||||
ghost
|
||||
style="
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
"
|
||||
style="width: 100px; height: 40px; border-radius: 8px"
|
||||
@click="closeDrawer"
|
||||
>
|
||||
取消
|
||||
@@ -71,62 +74,80 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import {defineEmits, defineProps, ref, watch} from "vue";
|
||||
import { defineEmits, defineProps, ref, watch } from "vue";
|
||||
import VoteQuestion from "./VoteQuestion.vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import { message } from "ant-design-vue";
|
||||
|
||||
const props = defineProps({
|
||||
options: []
|
||||
})
|
||||
options: [],
|
||||
});
|
||||
|
||||
const emit = defineEmits({})
|
||||
const formData = ref(props.options && props.options.length ? [...props.options] : [{
|
||||
voteStemName: '',
|
||||
optionDetailList: []
|
||||
}])
|
||||
const emit = defineEmits({});
|
||||
const formData = ref(
|
||||
props.options && props.options.length
|
||||
? [...props.options]
|
||||
: [
|
||||
{
|
||||
voteStemName: "",
|
||||
optionDetailList: [],
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
const visible = ref(false)
|
||||
const visible = ref(false);
|
||||
|
||||
watch(() => props.options.length, () => {
|
||||
formData.value = props.options && props.options.length ? [...props.options] : [{
|
||||
voteStemName: '',
|
||||
optionDetailList: []
|
||||
}]
|
||||
})
|
||||
watch(
|
||||
() => props.options.length,
|
||||
() => {
|
||||
formData.value =
|
||||
props.options && props.options.length
|
||||
? [...props.options]
|
||||
: [
|
||||
{
|
||||
voteStemName: "",
|
||||
optionDetailList: [],
|
||||
},
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
function openDrawer() {
|
||||
visible.value = true
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
const closeDrawer = () => {
|
||||
visible.value = false
|
||||
formData.value = props.options && props.options.length ? [...props.options] : [{
|
||||
voteStemName: '',
|
||||
optionDetailList: []
|
||||
}]
|
||||
visible.value = false;
|
||||
formData.value =
|
||||
props.options && props.options.length
|
||||
? [...props.options]
|
||||
: [
|
||||
{
|
||||
voteStemName: "",
|
||||
optionDetailList: [],
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
async function confirm() {
|
||||
console.log(formData.value)
|
||||
if (formData.value.some(t => !t.voteStemName && !t.deleted)) {
|
||||
message.warning('请输入题干名称')
|
||||
return
|
||||
console.log(formData.value);
|
||||
if (formData.value.some((t) => !t.voteStemName && !t.deleted)) {
|
||||
message.warning("请输入题干名称");
|
||||
return;
|
||||
}
|
||||
visible.value = false
|
||||
emit('update:options', formData.value)
|
||||
visible.value = false;
|
||||
emit("update:options", formData.value);
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
formData.value.push({
|
||||
voteStemName: '',
|
||||
optionDetailList: []
|
||||
})
|
||||
voteStemName: "",
|
||||
optionDetailList: [],
|
||||
});
|
||||
}
|
||||
|
||||
function itemDel(i) {
|
||||
formData.value[i].deleted = true
|
||||
formData.value[i].deleted = true;
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.researchadd {
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<div class="content">
|
||||
<div class="tagbox">
|
||||
<div class="deleteop" @click="handleDel">
|
||||
<div><img src="../../assets/images/projectadd/delete.png"/></div>
|
||||
<div class="del_text">删除选项</div>
|
||||
<div><img src="../../assets/images/projectadd/delete.png" /></div>
|
||||
<div class="del_text">删除题干</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png"/>
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">题干</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
@@ -23,8 +23,16 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="(item, index) in formData.optionDetailList" :key="index+Math.random()">
|
||||
<VoteQuestionItem v-if="!item.deleted" :item="item" :index="index" @del="delItem"/>
|
||||
<div
|
||||
v-for="(item, index) in formData.optionDetailList"
|
||||
:key="index + Math.random()"
|
||||
>
|
||||
<VoteQuestionItem
|
||||
v-if="!item.deleted"
|
||||
:item="item"
|
||||
:index="index"
|
||||
@del="delItem"
|
||||
/>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="in" style="margin-left: 85px; margin-bottom: 20px">
|
||||
@@ -45,34 +53,33 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {defineEmits, defineProps, ref, watch} from "vue";
|
||||
import { defineEmits, defineProps, ref, watch } from "vue";
|
||||
import VoteQuestionItem from "./VoteQuestionItem.vue";
|
||||
|
||||
const props = defineProps({
|
||||
index: Number,
|
||||
item: {}
|
||||
})
|
||||
item: {},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['del'])
|
||||
const emit = defineEmits(["del"]);
|
||||
|
||||
const formData = ref(props.item)
|
||||
const formData = ref(props.item);
|
||||
|
||||
watch(props, () => {
|
||||
formData.value = props.item
|
||||
})
|
||||
formData.value = props.item;
|
||||
});
|
||||
|
||||
function handleSingleAdd() {
|
||||
formData.value.optionDetailList.push({})
|
||||
formData.value.optionDetailList.push({});
|
||||
}
|
||||
|
||||
function delItem(i) {
|
||||
formData.value.optionDetailList[i].deleted = true
|
||||
formData.value.optionDetailList[i].deleted = true;
|
||||
}
|
||||
|
||||
function handleDel() {
|
||||
emit("del", props.index);
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.researchadd {
|
||||
|
||||
14
src/utils/dialog.js
Normal file
14
src/utils/dialog.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { createApp } from 'vue'
|
||||
import CommonAlert from "@/components/common/CommonAlert";
|
||||
import Antd from "ant-design-vue";
|
||||
|
||||
function mountContent (option = {}) {
|
||||
const dom = document.createElement('div')
|
||||
document.body.appendChild(dom)
|
||||
const app = createApp(CommonAlert, {
|
||||
close: () => { app.unmount(dom); document.body.removeChild(dom) },
|
||||
...option
|
||||
})
|
||||
app.use(Antd).mount(dom)
|
||||
}
|
||||
export default mountContent
|
||||
@@ -149,7 +149,7 @@ export default {
|
||||
api.DownLoadTotalSize().then(res=>{
|
||||
console.log(res)
|
||||
if(res.data.code==200){
|
||||
state.capacity = res.data.data;
|
||||
state.capacity = res.data.data && res.data.data !== {} ? res.data.data : 0;
|
||||
}else{
|
||||
state.capacity = 0;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -214,7 +214,7 @@
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<a-select
|
||||
v-model:value="selectBandName"
|
||||
v-model:value="selectBandId"
|
||||
mode="multiple"
|
||||
style="width: 440px; min-height: 40px"
|
||||
placeholder="请选择Band"
|
||||
@@ -460,9 +460,6 @@
|
||||
<div class="btn btn6" @click="handlePush">
|
||||
<div class="btnText">保存</div>
|
||||
</div>
|
||||
<div class="btn btn6" v-if="statusTingQi == 1" @click="reviewClick">
|
||||
<div class="btnText">提交审核</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -827,15 +824,19 @@ export default defineComponent({
|
||||
}
|
||||
files = files.slice(0, files.length - 1);
|
||||
|
||||
let orgSelect = [];
|
||||
let orgSelectIds = [];
|
||||
let orgSelectNames = [];
|
||||
if (state.orgSelect && state.orgSelect.length) {
|
||||
state.orgSelect.forEach((item) => {
|
||||
orgSelect.push({
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
orgSelectIds += item.value + ",";
|
||||
});
|
||||
state.orgSelect.forEach((item) => {
|
||||
orgSelectNames += item.label + ",";
|
||||
});
|
||||
}
|
||||
orgSelectIds = orgSelectIds.slice(0, orgSelectIds.length - 1);
|
||||
orgSelectNames = orgSelectNames.slice(0, orgSelectNames.length - 1);
|
||||
console.log("orgSelectIds&orgSelectNames2", orgSelectIds, orgSelectNames);
|
||||
|
||||
let selectJobId = "";
|
||||
if (state.selectJobId.length) {
|
||||
@@ -882,7 +883,9 @@ export default defineComponent({
|
||||
intro: state.qdms_inputV6,
|
||||
attach: state.attach,
|
||||
outline: valueHtml.value,
|
||||
organizationIds: orgSelect,
|
||||
// organizationIds: orgSelect, //todo 传的不对
|
||||
organizationIds: orgSelectIds,
|
||||
organizationNames: orgSelectNames,
|
||||
jobTypeIds: selectJobId,
|
||||
bandIds: selectBandId,
|
||||
sourceBelongId: state.sourceBelongId,
|
||||
@@ -994,6 +997,40 @@ export default defineComponent({
|
||||
}
|
||||
console.log(str);
|
||||
state.attach = str;
|
||||
|
||||
if (item.jobTypeIds) {
|
||||
state.selectJobId = item.jobTypeIds.split(",");
|
||||
}
|
||||
if (item.bandIds) {
|
||||
state.selectBandId = item.bandIds.split(",");
|
||||
}
|
||||
console.log("state.selectBandId", state.selectBandId);
|
||||
state.sourceBelongId = item.sourceBelongId;
|
||||
state.sourceBelongName = item.sourceBelongFullName;
|
||||
if (item.organizationIds && item.organizationNames) {
|
||||
let orgSelectIds = item.organizationIds;
|
||||
let orgSelectNames = item.organizationNames;
|
||||
orgSelectIds = orgSelectIds.split(",");
|
||||
orgSelectNames = orgSelectNames.split(",");
|
||||
console.log(
|
||||
"orgSelectIds&orgSelectNames",
|
||||
orgSelectIds,
|
||||
orgSelectNames
|
||||
);
|
||||
let arrObj = [];
|
||||
arrObj = orgSelectIds.map((item, index) => {
|
||||
return { value: item, lebel: orgSelectNames[index] };
|
||||
});
|
||||
console.log("arrObj-------------", arrObj);
|
||||
state.orgSelect = arrObj;
|
||||
}
|
||||
const imgDict = optionsUrl.value.find(
|
||||
(img) => img.value.split(",")[0] === item.picUrl
|
||||
);
|
||||
console.log("imgDict", imgDict);
|
||||
if (imgDict) {
|
||||
state.pathBgId = imgDict.id;
|
||||
}
|
||||
};
|
||||
|
||||
const handleTagChange = () => {
|
||||
|
||||
@@ -3,7 +3,12 @@
|
||||
<div class="sonproject">
|
||||
<div class="header">
|
||||
<span class="title">创建/编辑单层子项目</span>
|
||||
<div @click="backPage" style="cursor: pointer" to="/projectmanage" class="goback">
|
||||
<div
|
||||
@click="backPage"
|
||||
style="cursor: pointer"
|
||||
to="/projectmanage"
|
||||
class="goback"
|
||||
>
|
||||
<span class="return"></span><span class="returntext">返回</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,7 +16,10 @@
|
||||
<div class="main">
|
||||
<div class="name" v-if="projectInfo.parentName">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目归属</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
@@ -22,73 +30,150 @@
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目名称</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<NameInput placeholder="请输入项目名称" v-model:value="projectInfo.name" v-model:validate="projectInfo.validate"
|
||||
:maxlength="30" show-count :id="projectInfo.projectId"></NameInput>
|
||||
<NameInput
|
||||
placeholder="请输入项目名称"
|
||||
v-model:value="projectInfo.name"
|
||||
v-model:validate="projectInfo.validate"
|
||||
:maxlength="30"
|
||||
show-count
|
||||
:id="projectInfo.projectId"
|
||||
></NameInput>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name flex-top">
|
||||
<div class="namebox" style="margin-top: 10px">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">封面图</div>
|
||||
</div>
|
||||
<div class="in select" style="flex: 1; display: flex">
|
||||
<div :class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`" style="
|
||||
<div
|
||||
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
" v-for="(src, index) in projectPic" :key="index" @click="() => (projectInfo.picUrl = src.value)">
|
||||
<img style="
|
||||
"
|
||||
v-for="(src, index) in projectPic"
|
||||
:key="index"
|
||||
:style="{
|
||||
display: index >= 3 ? 'none' : 'flex',
|
||||
}"
|
||||
@click="() => (projectInfo.picUrl = src.value)"
|
||||
>
|
||||
<img
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 4px;
|
||||
margin-right: 4px;
|
||||
" :src="src.value" alt="avatar" />
|
||||
"
|
||||
:src="src.value"
|
||||
alt="avatar"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@click="showLearnBgMore"
|
||||
v-if="projectPic.length > 3"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding-left: 15px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #c7cbd2;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
line-height: 36px;
|
||||
"
|
||||
>
|
||||
查看更多
|
||||
<img src="../../assets/images/projectadd/go.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目时间</div>
|
||||
</div>
|
||||
|
||||
<div class="in">
|
||||
<a-range-picker :show-time="{ format: 'HH:mm' }" :disabled-date="disabledDate"
|
||||
:disabled-time="disabledRangeTime" separator="至" :placeholder="[' 开始时间', ' 结束时间']"
|
||||
v-model:value="projectInfo.rangeTime" style="width: 100%; height: 40px; border-radius: 5px"
|
||||
valueFormat="YYYY-MM-DD HH:mm" @change="timeChange" :disabled="viewDetail ? true : false" />
|
||||
<a-range-picker
|
||||
:show-time="{ format: 'HH:mm' }"
|
||||
:disabled-date="disabledDate"
|
||||
:disabled-time="disabledRangeTime"
|
||||
separator="至"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
v-model:value="projectInfo.rangeTime"
|
||||
style="width: 100%; height: 40px; border-radius: 5px"
|
||||
valueFormat="YYYY-MM-DD HH:mm"
|
||||
@change="timeChange"
|
||||
:disabled="viewDetail ? true : false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目经理</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<ProjectManager v-model:value="projectInfo.managerId" v-model:name="projectInfo.manager"
|
||||
@onChange="managerChange" mode="multiple"></ProjectManager>
|
||||
<ProjectManager
|
||||
v-model:value="projectInfo.managerId"
|
||||
v-model:name="projectInfo.manager"
|
||||
@onChange="managerChange"
|
||||
mode="multiple"
|
||||
></ProjectManager>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">资源归属</div>
|
||||
</div>
|
||||
|
||||
<div class="in select">
|
||||
<OrgClass v-model:value="projectInfo.sourceBelongId" v-model:name="projectInfo.sourceBelongName" v-model:fullName="projectInfo.sourceBelongFullName"></OrgClass>
|
||||
<OrgClass
|
||||
v-model:value="projectInfo.sourceBelongId"
|
||||
v-model:name="projectInfo.sourceBelongName"
|
||||
v-model:fullName="projectInfo.sourceBelongFullName"
|
||||
></OrgClass>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">项目级别</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
@@ -97,7 +182,10 @@
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">培训分类</div>
|
||||
</div>
|
||||
<div class="in select">
|
||||
@@ -106,11 +194,17 @@
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
class="nameimg"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">是否BOEU实施</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-radio-group v-model:value="projectInfo.boeFlag" :disabled="viewDetail ? true : false">
|
||||
<a-radio-group
|
||||
v-model:value="projectInfo.boeFlag"
|
||||
:disabled="viewDetail ? true : false"
|
||||
>
|
||||
<a-radio :style="radioStyle" :value="1">是</a-radio>
|
||||
<a-radio :style="radioStyle" :value="0">否</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -121,11 +215,18 @@
|
||||
<div class="inname">同步学习记录</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-checkbox v-model:checked="courseSyncFlag" :disabled="viewDetail ? true : false"><span style="
|
||||
<a-checkbox
|
||||
v-model:checked="courseSyncFlag"
|
||||
:disabled="viewDetail ? true : false"
|
||||
><span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
">同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span></a-checkbox>
|
||||
"
|
||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||
></a-checkbox
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2" v-if="projectInfo.remark">
|
||||
@@ -133,8 +234,14 @@
|
||||
<div class="inname" style="margin-top: 13px">项目说明</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-textarea v-model:value="projectInfo.remark" style="height: 80px" placeholder="请输入说明" show-count
|
||||
:maxlength="200" :disabled="viewDetail ? true : false" />
|
||||
<a-textarea
|
||||
v-model:value="projectInfo.remark"
|
||||
style="height: 80px"
|
||||
placeholder="请输入说明"
|
||||
show-count
|
||||
:maxlength="200"
|
||||
:disabled="viewDetail ? true : false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -150,15 +257,63 @@
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="btn">
|
||||
<a-button v-on:click="createProject" type="primary" class="btn1">确定
|
||||
<a-button
|
||||
:loading="loading"
|
||||
v-on:click="createProject"
|
||||
type="primary"
|
||||
class="btn1"
|
||||
>确定
|
||||
</a-button>
|
||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 更多背景图 v-model:visible="learnBgMore" -->
|
||||
<a-modal
|
||||
:closable="sh"
|
||||
centered="true"
|
||||
v-model:visible="learnBgMore"
|
||||
:footer="null"
|
||||
:width="650"
|
||||
wrapClassName="learnBgMoreModal"
|
||||
:z-index="9999"
|
||||
>
|
||||
<div class="main">
|
||||
<div class="top">
|
||||
<div class="topc">封面图</div>
|
||||
</div>
|
||||
<div class="imagesBox">
|
||||
<!-- <div
|
||||
@click="() => (projectInfo.picUrl = src.value)"
|
||||
v-for="item in projectPic"
|
||||
:key="item.code"
|
||||
class="learnBgItem"
|
||||
> -->
|
||||
<div
|
||||
@click="chooseImg2(item)"
|
||||
v-for="item in projectPic"
|
||||
:key="item.code"
|
||||
class="learnBgItem"
|
||||
:style="{
|
||||
border:
|
||||
projectInfo.picUrl === item.value
|
||||
? '3px solid rgba(78, 166, 255, 1)'
|
||||
: '1px solid #ccc',
|
||||
'background-image': 'url(' + item.value.split(',')[0] + ')',
|
||||
}"
|
||||
>
|
||||
<!-- <img class="im" :src="item.source" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<button class="samtn btn1" @click="closeLearnBgMore">取消</button>
|
||||
<button class="samtn btn2" @click="closeLearnBgMore">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref, computed, onMounted } from "vue";
|
||||
import { reactive, toRefs, ref, onMounted } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import * as api from "../../api/index";
|
||||
@@ -211,16 +366,26 @@ export default {
|
||||
currentPage1: 1, //项目经理
|
||||
pageSize1: 10, //项目经理
|
||||
projectInfo: {},
|
||||
courseSyncFlag: false
|
||||
courseSyncFlag: false,
|
||||
learnBgMore: false,
|
||||
projectPic: [],
|
||||
loading: false,
|
||||
});
|
||||
|
||||
const projectPic = computed(() => store.state.projectPic.map((e) => ({
|
||||
value: e.dictValue,
|
||||
label: e.dictName,
|
||||
})));
|
||||
|
||||
// const projectPic = computed(() =>
|
||||
// store.state.project_pic.map((e) => ({
|
||||
// code: e.id,
|
||||
// value: e.dictValue,
|
||||
// label: e.dictName,
|
||||
// }))
|
||||
// );
|
||||
|
||||
onMounted(() => {
|
||||
state.projectPic = store.state.project_pic.map((e) => ({
|
||||
code: e.id,
|
||||
value: e.value,
|
||||
label: e.name,
|
||||
}));
|
||||
state.viewDetail = routers.query.viewDetail;
|
||||
getProjectInfo();
|
||||
});
|
||||
@@ -230,7 +395,8 @@ export default {
|
||||
state.projectInfo.parentId = routers.query.parentId;
|
||||
state.projectInfo.projectId = routers.query.projectId;
|
||||
(state.projectInfo.projectId || state.projectInfo.parentId) &&
|
||||
api.getProjectDetail({
|
||||
api
|
||||
.getProjectDetail({
|
||||
projectId: state.projectInfo.projectId,
|
||||
})
|
||||
.then((res) => {
|
||||
@@ -251,7 +417,6 @@ export default {
|
||||
}, 400);
|
||||
};
|
||||
|
||||
|
||||
const errorMsgs = {
|
||||
name: "请输入项目名称",
|
||||
picUrl: "请选择项目封面图",
|
||||
@@ -284,8 +449,10 @@ export default {
|
||||
}
|
||||
|
||||
const createProject = async () => {
|
||||
state.loading = true;
|
||||
console.log("我是否要编辑项目", isEdit.value);
|
||||
if (!validate(state.projectInfo, errorMsgs)) {
|
||||
state.loading = false;
|
||||
return;
|
||||
}
|
||||
/**
|
||||
@@ -294,32 +461,48 @@ export default {
|
||||
message.warning('项目名称重复,请修改名称!');
|
||||
return;
|
||||
}*/
|
||||
console.log("state.projectInfo", state.projectInfo);
|
||||
const offName = await validateName({
|
||||
name: state.projectInfo.name,
|
||||
type: 1,
|
||||
id: state.projectInfo.projectId
|
||||
}).then(res => {
|
||||
id: state.projectInfo.id,
|
||||
}).then((res) => {
|
||||
return res.data.data == 1;
|
||||
});
|
||||
if (offName) {
|
||||
message.destroy();
|
||||
state.loading = false;
|
||||
return message.warning("项目名称重复,请重新填写");
|
||||
}
|
||||
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
|
||||
api.createProject(state.projectInfo).then(() => {
|
||||
state.loading = false;
|
||||
message.destroy();
|
||||
message.success(state.projectInfo.projectId ? "编辑成功" : "创建成功");
|
||||
router.back()
|
||||
message.success(state.projectInfo.id ? "编辑成功" : "创建成功");
|
||||
router.back();
|
||||
});
|
||||
};
|
||||
|
||||
function managerChange(e, l, d, t,orgName) {
|
||||
state.projectInfo.sourceBelongId = d
|
||||
state.projectInfo.sourceBelongName = t
|
||||
state.projectInfo.sourceBelongFullName = orgName
|
||||
function managerChange(e, l, d, t, orgName) {
|
||||
state.projectInfo.sourceBelongId = d;
|
||||
state.projectInfo.sourceBelongName = t;
|
||||
state.projectInfo.sourceBelongFullName = orgName;
|
||||
}
|
||||
const disabledDate = (current) => {
|
||||
return current && current < dayjs().startOf('day');
|
||||
return current && current < dayjs().startOf("day");
|
||||
};
|
||||
|
||||
//显示更多路径背景弹窗
|
||||
const showLearnBgMore = () => {
|
||||
state.learnBgMore = true;
|
||||
};
|
||||
//关闭更多路径背景弹窗
|
||||
const closeLearnBgMore = () => {
|
||||
state.learnBgMore = false;
|
||||
};
|
||||
const chooseImg2 = (item) => {
|
||||
console.log("itemmmmmmm", item);
|
||||
state.projectInfo.picUrl = item.value;
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -327,10 +510,12 @@ export default {
|
||||
disabledDate,
|
||||
managerChange,
|
||||
timeChange,
|
||||
projectPic,
|
||||
createProject,
|
||||
isEdit,
|
||||
backPage,
|
||||
showLearnBgMore,
|
||||
closeLearnBgMore,
|
||||
chooseImg2,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -632,5 +817,94 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.learnBgMoreModal {
|
||||
.ant-modal {
|
||||
width: 680px !important;
|
||||
height: 528px !important;
|
||||
|
||||
.ant-modal-content {
|
||||
width: 680px !important;
|
||||
height: 528px !important;
|
||||
|
||||
.ant-modal-body {
|
||||
width: 680px !important;
|
||||
height: 528px !important;
|
||||
padding: 0 !important;
|
||||
|
||||
.main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.top {
|
||||
padding-left: 51px;
|
||||
padding-right: 51px;
|
||||
padding-top: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
|
||||
.topc {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
line-height: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.imagesBox {
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
padding-left: 51px;
|
||||
padding-right: 39px;
|
||||
margin-top: 20px;
|
||||
height: 350px;
|
||||
overflow-y: auto;
|
||||
|
||||
.learnBgItem {
|
||||
border-radius: 8px;
|
||||
width: 136px;
|
||||
height: 106px;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
margin-bottom: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
margin-top: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.samtn {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background-color: #fff;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background-color: #4ea6ff;
|
||||
color: #fff;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@
|
||||
<div class="header">
|
||||
<div class="icon"></div>
|
||||
<span>提示</span>
|
||||
<div class="close_exit" @click="closeCancel"></div>
|
||||
<!-- <div class="close_exit" @click="closeCancel"></div> -->
|
||||
</div>
|
||||
<div class="body">
|
||||
<span>您确定要删除所有阶段吗?</span>
|
||||
@@ -699,7 +699,14 @@ const closeDelete = () => {
|
||||
};
|
||||
// 删除所有阶段
|
||||
const removeAllLevel = () => {
|
||||
|
||||
console.log(projectInfo.value.stageList)
|
||||
projectInfo.value.stageList.forEach(t => {
|
||||
if(t.id!=='0'){
|
||||
t.checked = false;
|
||||
t.deleted = true;
|
||||
}
|
||||
})
|
||||
cancelModal.value = false;
|
||||
};
|
||||
//全选任务或全不选任务
|
||||
const selectRowAll = () => {
|
||||
@@ -723,6 +730,7 @@ const closeDeAll = () => {
|
||||
//暂存
|
||||
const temporaryStorage = async () => {
|
||||
templateLoading.value = true
|
||||
console.log(projectInfo.value)
|
||||
await request(PROJECT_DETAIL_MODIFY, projectInfo.value)
|
||||
await getTask()
|
||||
message.success("暂存成功");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-21 14:32:52
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-12-14 17:38:38
|
||||
* @LastEditTime: 2023-02-24 09:03:55
|
||||
* @FilePath: /fe-manage/vue.config.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user