Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	src/views/courselibrary/CoursewareManage.vue
#	src/views/courselibrary/courseModal.vue
This commit is contained in:
yuping
2023-02-24 17:06:28 +08:00
16 changed files with 1218 additions and 798 deletions

View File

@@ -430,6 +430,20 @@ export default {
}, },
]; ];
} }
if (
n.indexOf("/sonproject") !== -1 ||
n.indexOf("/SonProject") !== -1
) {
state.list = [
{
name: "项目",
href: "",
},
{
name: "基础信息",
},
];
}
} }
); );

View File

@@ -406,8 +406,8 @@ const beforeUpload = (file) => {
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!"); message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
return false; return false;
} }
let isLt1M = file.size < 2097152; let isLt1M = file.size < 2000000;
console.log(file.size, isLt1M) console.log(file.size, isLt1M)
if (!isLt1M) { if (!isLt1M) {
message.error("图片大小超过2MB!"); message.error("图片大小超过2MB!");

View File

@@ -3,20 +3,20 @@
<slot></slot> <slot></slot>
</div> </div>
<a-drawer <a-drawer
:visible="visible" :visible="visible"
class="drawerStyle addonlineDrawer" class="drawerStyle addonlineDrawer"
width="1000" width="1000"
title="添加在线" title="添加在线"
placement="right" placement="right"
> >
<div class="drawerMain"> <div class="drawerMain">
<div class="header"> <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> <div v-else class="headerTitle">添加项目</div>
<img <img
style="width: 29px; height: 29px; cursor: pointer" style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png" src="../../assets/images/basicinfo/close.png"
@click="closeDrawer" @click="closeDrawer"
/> />
</div> </div>
<div class="contentMain"> <div class="contentMain">
@@ -26,10 +26,10 @@
<div class="ipt_name"></div> <div class="ipt_name"></div>
<div class="fi_input"> <div class="fi_input">
<a-input <a-input
v-model:value="params.name" v-model:value="params.name"
style="width: 210px; height: 40px; border-radius: 8px" style="width: 210px; height: 40px; border-radius: 8px"
placeholder="请输入项目名称" placeholder="请输入项目名称"
maxlength="20" maxlength="20"
/> />
</div> </div>
</div> </div>
@@ -37,10 +37,10 @@
<div class="ipt_name"></div> <div class="ipt_name"></div>
<div class="fi_input"> <div class="fi_input">
<a-input <a-input
v-model:value="params.manager" v-model:value="params.manager"
style="width: 210px; height: 40px; border-radius: 8px" style="width: 210px; height: 40px; border-radius: 8px"
placeholder="请输入项目经理" placeholder="请输入项目经理"
maxlength="20" maxlength="20"
/> />
</div> </div>
</div> </div>
@@ -48,10 +48,10 @@
<div class="ipt_name"></div> <div class="ipt_name"></div>
<div class="fi_input"> <div class="fi_input">
<a-input <a-input
v-model:value="params.createName" v-model:value="params.createName"
style="width: 210px; height: 40px; border-radius: 8px" style="width: 210px; height: 40px; border-radius: 8px"
placeholder="请输入创建人" placeholder="请输入创建人"
maxlength="20" maxlength="20"
/> />
</div> </div>
</div> </div>
@@ -65,63 +65,56 @@
<div class="search"></div> <div class="search"></div>
<div class="btnText">重置</div> <div class="btnText">重置</div>
</div> </div>
<div class="btn btn2" @click="reset">
<div class="search"></div>
<div class="btnText">刷新</div>
</div>
</div> </div>
</div> </div>
<div class="main_item" style="margin-top: 16px;margin-bottom: 32px;"> <div class="main_item" style="margin-top: 16px; margin-bottom: 32px">
<button class="xkbtn" @click="goProjectmanage"> <button class="xkbtn" @click="goProjectmanage">新建项目</button>
新建项目
</button>
</div> </div>
<div class="main_notice" v-if="edit" style="display:none;"> <div class="main_notice" v-if="taskIndex >= 0">
<div class="mntc_left"> <div class="mntc_left" v-if="selectedRows">
<div class="notice_icon"></div> <div class="notice_icon"></div>
<div v-if="selectedRows.length == 0"> <div>
<span class="title"
>已选择
<span class="data" style="color: #4ea6ff">{{ 0 }}</span>
</span
>
</div>
<div v-else>
<div> <div>
<span class="title" <span class="title"
>已选择 >已选择
<span class="data" style="color: #4ea6ff">{{ <span class="data" style="color: #4ea6ff">{{ 1 }}</span>
selectedRows.length
}}</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span
> >
<span class="title" <span class="title"
>名称 >名称
<span <span
class="data" class="data"
style="color: #4ea6ff; margin-right: 15px" style="color: #4ea6ff; margin-right: 15px"
>{{ selectedRows[0].name }}</span >{{ selectedRows?.name }}</span
> >
</span> </span>
<span class="title" <span class="title"
>项目经理 >项目经理
<span <span
class="data" class="data"
style="color: #4ea6ff; margin-right: 15px" style="color: #4ea6ff; margin-right: 15px"
>{{ selectedRows[0].manager }}</span >{{ selectedRows?.manager }}</span
> >
</span> </span>
<span class="title" <span class="title"
>创建人 >创建人
<span <span
class="data" class="data"
style="color: #4ea6ff; margin-right: 15px" style="color: #4ea6ff; margin-right: 15px"
>{{ selectedRows[0].creater }}</span >{{ selectedRows?.createName }}</span
> >
</span> </span>
<span class="title" <span class="title"
>创建时间 >创建时间
<span class="data" style="color: #4ea6ff">{{ <span class="data" style="color: #4ea6ff">{{
selectedRows[0].time selectedRows?.createTime
}}</span> }}</span>
</span> </span>
</div> </div>
</div> </div>
@@ -130,15 +123,17 @@
<div class="main_table"> <div class="main_table">
<div class="drawerbox"> <div class="drawerbox">
<a-table <a-table
:customRow="customRow" :customRow="customRow"
class="ant-table-striped" class="ant-table-striped"
:row-class-name="(_, index) => (index % 2 === 1 ? 'table-striped' : null)" :row-class-name="
row-key="id" (_, index) => (index % 2 === 1 ? 'table-striped' : null)
:columns="columns" "
:data-source="data" row-key="id"
:loading="loading" :columns="columns"
:pagination="pagination" :data-source="data"
:row-selection="rowSelection" :loading="loading"
:pagination="pagination"
:row-selection="rowSelection"
/> />
</div> </div>
</div> </div>
@@ -150,10 +145,10 @@
</div> </div>
<!-- 有重复添加的项目时的弹窗 --> <!-- 有重复添加的项目时的弹窗 -->
<a-modal <a-modal
v-model:visible="sameModal" v-model:visible="sameModal"
:footer="null" :footer="null"
wrapClassName="sameModal" wrapClassName="sameModal"
centered="true" centered="true"
> >
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
@@ -180,28 +175,45 @@
</a-drawer> </a-drawer>
</template> </template>
<script setup> <script setup>
import {computed, defineEmits, defineProps, ref, watch} from "vue"; import { computed, defineEmits, defineProps, ref, watch } from "vue";
import {message} from "ant-design-vue"; import { message } from "ant-design-vue";
import {useRouter} from "vue-router"; // import { useRouter } from "vue-router";
import {useRowsPage} from "@/api/request"; import { useRowsPage } from "@/api/request";
import {PROJECT_AUDIT_PAGE} from "@/api/apis"; import { PROJECT_AUDIT_PAGE } from "@/api/apis";
import { getProjectDetail } from "@/api/index";
const props = defineProps({ const props = defineProps({
type: Number, type: Number,
taskList: [] taskList: [],
}) });
const visible = ref(false) const visible = ref(false);
const sameModal = ref(false) const sameModal = ref(false);
const emit = defineEmits({}) const emit = defineEmits({});
const columns = ref([ const columns = ref([
{ {
title: "项目名称", title: "项目名称",
dataIndex: "name", dataIndex: "name",
key: "projectName", key: "projectName",
width: "40%", width: "20%",
ellipsis: true, 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: "项目经理", title: "项目经理",
dataIndex: "manager", dataIndex: "manager",
@@ -223,38 +235,42 @@ const columns = ref([
width: "20%", width: "20%",
align: "center", align: "center",
}, },
]) ]);
const initParams = { const initParams = {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
orderAsc: true orderAsc: true,
} };
const params = ref(initParams) const params = ref(initParams);
const router = useRouter(); // const router = useRouter();
const rowSelectKeys = ref([]); const rowSelectKeys = ref([]);
const selectsData = ref([]); const selectsData = ref([]);
const taskIndex = ref(-1); const taskIndex = ref(-1);
const {data, loading, total, fetch} = useRowsPage(PROJECT_AUDIT_PAGE, params.value, { const { data, loading, total, fetch } = useRowsPage(
init: false, PROJECT_AUDIT_PAGE,
result: res => res.result.list, params.value,
totalPage: res => res.result.totalPages, {
total: res => res.result.count init: false,
}) result: (res) => res.result.list,
totalPage: (res) => res.result.totalPages,
total: (res) => res.result.count,
}
);
console.log(data)
watch(taskIndex, () => { watch(taskIndex, () => {
// if (taskIndex.value >= 0) { // if (taskIndex.value >= 0) {
// rowSelectKeys.value = [props.taskList[taskIndex.value].courseId] // rowSelectKeys.value = [props.taskList[taskIndex.value].courseId]
// selectsData.value = data.value.find(t => t.id === props.taskList[taskIndex.value].courseId) || {} // selectsData.value = data.value.find(t => t.id === props.taskList[taskIndex.value].courseId) || {}
// } // }
}) });
const customRow = (record) => ({ const customRow = (record) => ({
onClick: () => { onClick: () => {
rowSelectKeys.value = [record.id] rowSelectKeys.value = [record.id];
selectsData.value = [record] selectsData.value = [record];
} },
}) });
const pagination = computed(() => ({ const pagination = computed(() => ({
total: total.value, total: total.value,
@@ -266,10 +282,10 @@ const pagination = computed(() => ({
const changePagination = (e) => { const changePagination = (e) => {
params.value.pageNo = e; params.value.pageNo = e;
fetch() fetch();
}; };
const rowSelection = computed(() => ({ const rowSelection = computed(() => ({
type: 'radio', type: "radio",
columnWidth: 20, columnWidth: 20,
selectedRowKeys: rowSelectKeys.value, selectedRowKeys: rowSelectKeys.value,
onChange: onSelectChange, onChange: onSelectChange,
@@ -279,73 +295,90 @@ const rowSelection = computed(() => ({
function onSelectChange(e, l) { function onSelectChange(e, l) {
rowSelectKeys.value = e; rowSelectKeys.value = e;
selectsData.value = l; selectsData.value = l;
selectedRows.value = l[0];
console.log("selectedRows", selectedRows);
} }
function search() { function search() {
params.value.pageNo = 1 params.value.pageNo = 1;
fetch() fetch();
} }
function reset() { function reset() {
rowSelectKeys.value = []; rowSelectKeys.value = [];
selectsData.value = []; selectsData.value = [];
params.value.pageNo = 1 params.value.pageNo = 1;
params.value.keyWord = '' params.value.keyWord = "";
params.value.createName = '' params.value.createName = "";
params.value.manager = '' params.value.manager = "";
params.value.name = '' params.value.name = "";
fetch() fetch();
} }
const closeDrawer = () => { const closeDrawer = () => {
visible.value = false visible.value = false;
taskIndex.value = -1 taskIndex.value = -1;
reset() selectedRows.value = null;
reset();
}; };
function confirm() { function confirm() {
if (!selectsData.value.length || !rowSelectKeys.value.length) { if (!selectsData.value.length || !rowSelectKeys.value.length) {
message.warning("请选择项目"); message.warning("请选择项目");
return return;
} }
if (taskIndex.value === -1) { if (taskIndex.value === -1) {
const list = props.taskList const list = props.taskList;
list.push({ list.push({
name: selectsData.value[0].name, name: selectsData.value[0].name,
type: props.type, type: props.type,
courseId: selectsData.value[0].id, courseId: selectsData.value[0].id,
info: {...selectsData.value[0]} info: { ...selectsData.value[0] },
}) });
} else { } else {
const data = props.taskList[taskIndex.value] const data = props.taskList[taskIndex.value];
data.name = selectsData.value[0].name data.name = selectsData.value[0].name;
data.courseId = selectsData.value[0].id data.courseId = selectsData.value[0].id;
data.info = selectsData.value[0] data.info = selectsData.value[0];
} }
emit('update:taskList', [...props.taskList]) emit("update:taskList", [...props.taskList]);
closeDrawer() closeDrawer();
} }
const goProjectmanage = () => { const goProjectmanage = () => {
router.push({path: "/projectmanage"}); // router.push({path: "/projectmanage"});
} window.open(process.env.VUE_APP_BASE + "/projectmanage");
};
function closeSameModal() { function closeSameModal() {
sameModal.value = false sameModal.value = false;
}
function sureSameModal() {
} }
function sureSameModal() {}
let selectedRows = ref(null);
function openDrawer(i, row) { function openDrawer(i, row) {
console.log("row", row);
row && (rowSelectKeys.value = [row.courseId]); row && (rowSelectKeys.value = [row.courseId]);
row && (selectsData.value = [{name: row.name, id: row.courseId}]); row && (selectsData.value = [{ name: row.name, id: row.courseId }]);
(i >= 0) && (taskIndex.value = i) i >= 0 && (taskIndex.value = i);
visible.value = true 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> </script>
<style lang="scss"> <style lang="scss">
.ant-table-striped :deep(.table-striped) td { .ant-table-striped :deep(.table-striped) td {
@@ -383,8 +416,8 @@ defineExpose({openDrawer})
width: calc(100%); width: calc(100%);
height: 68px; height: 68px;
background: linear-gradient( background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%, rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100% rgba(78, 166, 255, 0) 100%
); );
} }
@@ -626,8 +659,8 @@ defineExpose({openDrawer})
} }
.ant-table-tbody .ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td { > td {
background: #f6f9fd; background: #f6f9fd;
} }
} }
@@ -680,8 +713,8 @@ defineExpose({openDrawer})
} }
.ant-table-tbody .ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td { > td {
background: #f6f9fd; background: #f6f9fd;
} }

View File

@@ -355,6 +355,7 @@ async function confirm() {
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
emit('update:taskList', [...props.taskList]) emit('update:taskList', [...props.taskList])
closeDrawer() closeDrawer()
} }

View File

@@ -17,10 +17,16 @@
<div class="search"></div> <div class="search"></div>
<div class="btnText">重置</div> <div class="btnText">重置</div>
</div> </div>
<div class="btnsn" @click="reset">
<div class="search"></div>
<div class="btnText">刷新</div>
</div>
</div> </div>
<div class="main_item"> <div class="main_item">
<button class="xkbtn" style="margin:0" @click="goResearchmanage">新建评估</button> <button class="xkbtn" style="margin: 0" @click="goResearchmanage">
新建评估
</button>
</div> </div>
<div class="main_notice" style="display: none"> <div class="main_notice" style="display: none">
@@ -44,7 +50,7 @@
</template> </template>
<script setup> <script setup>
import { computed, defineEmits, defineProps, ref, watch } from "vue"; import { computed, defineEmits, defineProps, ref, watch } from "vue";
import { useRouter } from "vue-router"; // import { useRouter } from "vue-router";
import { useRowsPage } from "@/api/request"; import { useRowsPage } from "@/api/request";
import { ASSESSMENT_PAGE } from "@/api/apis"; import { ASSESSMENT_PAGE } from "@/api/apis";
@@ -105,7 +111,7 @@ const initParams = {
pageSize: 10, pageSize: 10,
releaseStatus: 2, releaseStatus: 2,
}; };
const router = useRouter(); // const router = useRouter();
const params = ref(initParams); const params = ref(initParams);
const rowSelectKeys = ref([]); const rowSelectKeys = ref([]);
@@ -147,7 +153,7 @@ const pagination = computed(() => ({
})); }));
const changePagination = (e) => { const changePagination = (e) => {
params.value.pageIndex = e; params.value.pageNo = e;
fetch(); fetch();
}; };
const rowSelection = computed(() => ({ const rowSelection = computed(() => ({
@@ -156,12 +162,12 @@ const rowSelection = computed(() => ({
selectedRowKeys: rowSelectKeys.value, selectedRowKeys: rowSelectKeys.value,
onChange: onSelectChange, onChange: onSelectChange,
preserveSelectedRowKeys: true, preserveSelectedRowKeys: true,
getCheckboxProps: getCheckboxProps getCheckboxProps: getCheckboxProps,
})); }));
const getCheckboxProps = () => ({ const getCheckboxProps = () => ({
// 某几项默认禁止选中(R: 当state等于1时) // 某几项默认禁止选中(R: 当state等于1时)
disabled: false disabled: false,
}) });
function onSelectChange(e, l) { function onSelectChange(e, l) {
rowSelectKeys.value = e; rowSelectKeys.value = e;
@@ -180,12 +186,13 @@ function reset() {
selectsData.value = []; selectsData.value = [];
params.value.pageIndex = 1; params.value.pageIndex = 1;
params.value.keyWord = ""; params.value.keyWord = "";
params.value.assessmentName =""; params.value.assessmentName = "";
fetch(); fetch();
} }
const goResearchmanage = () => { const goResearchmanage = () => {
router.push({ path: "/researchmanage" }); // router.push({ path: "/researchmanage" });
window.open(process.env.VUE_APP_BASE + "/researchmanage");
}; };
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@@ -195,7 +195,7 @@ export default {
console.log('我是传递过来的参数2', props.basicdata) console.log('我是传递过来的参数2', props.basicdata)
api.QueryAssessmentDetail({ api.QueryAssessmentDetail({
"assessmentSubmitId": props.datasource.assessmentSubmitId, "assessmentSubmitId": props.datasource.assessmentSubmitId,
"courseId": props.basicdata.assessmentId, "courseId": props.basicdata.id,
"studentId": props.datasource.studentId "studentId": props.datasource.studentId
}).then(res=>{ }).then(res=>{
console.log(res) console.log(res)

View File

@@ -470,7 +470,7 @@ export default {
if (info.file.status === "done") { if (info.file.status === "done") {
console.log("上传图片返回的信息 %o", info.file.name); console.log("上传图片返回的信息 %o", info.file.name);
state.imageUrl = process.env.VUE_APP_FILE_PATH + info.file.name; state.imageUrl = process.env.VUE_APP_FILE_PATH + info.file.name;
state.imageName = info.file.name; state.imageName = process.env.VUE_APP_FILE_PATH + info.file.name;
} }
if (info.file.status === "error") { if (info.file.status === "error") {
message.error("upload error"); message.error("upload error");

View File

@@ -55,7 +55,7 @@
placeholder="请输入姓名" placeholder="请输入姓名"
/> />
</div> </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="name">任务状态</div>
<div class="select"> <div class="select">
<a-select <a-select
@@ -128,6 +128,8 @@
</div>--> </div>-->
</div> </div>
</a-drawer> </a-drawer>
<view-assess v-model:Assessvisible="Assessvisible" :datasource="evalDataSource" :evalName="datasource.info?.assessmentName"
:basicdata="datasource.info" />
</template> </template>
<script> <script>
@@ -135,9 +137,11 @@ import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
// import * as api from "../../../api/index"; // import * as api from "../../../api/index";
import * as api from "../../../api/indexTaskManage"; import * as api from "../../../api/indexTaskManage";
import ViewAssess from "../ViewAssess";
export default { export default {
name: "ProjectOnlineManage", name: "ProjectOnlineManage",
components: { ViewAssess },
props: { props: {
Tvisible: { Tvisible: {
type: Boolean, type: Boolean,
@@ -195,6 +199,8 @@ export default {
], ],
tabledata: [], tabledata: [],
tableDataTotalLoading: true, // 表格loading加载配置 tableDataTotalLoading: true, // 表格loading加载配置
evalDataSource: "",
Assessvisible: false
}); });
const tableDataFunc = () => { const tableDataFunc = () => {
const columns = [ 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; return columns;
}; };
{/* 查看评估弹框 */}
const showassess = (data) => {
state.evalDataSource = data;
state.Assessvisible = true;
};
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:Tvisible", false); ctx.emit("update:Tvisible", false);
state.currentPage = 1; state.currentPage = 1;
@@ -405,20 +444,20 @@ export default {
if(res.data.code==200){ if(res.data.code==200){
state.tableDataTotalLoading = false; state.tableDataTotalLoading = false;
let newData = [] 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 = { let obj = {
studentUserNo: res.data.data.studyDetailList[i].studentCode, studentUserNo: res.data.data.studyDetailList.records[i].studentCode,
studentName: res.data.data.studyDetailList[i].studentName, studentName: res.data.data.studyDetailList.records[i].studentName,
studentDepartName: res.data.data.studyDetailList[i].studentDepartName, studentDepartName: res.data.data.studyDetailList.records[i].studentDepartName,
studentJobName: res.data.data.studyDetailList[i].studentJobName, studentJobName: res.data.data.studyDetailList.records[i].studentJobName,
lastStudyTime: res.data.data.studyDetailList[i].finishedTime, lastStudyTime: res.data.data.studyDetailList.records[i].finishedTime,
finishStatus: res.data.data.studyDetailList[i].status?res.data.data.studyDetailList[i].status:0 finishStatus: res.data.data.studyDetailList.records[i].status?res.data.data.studyDetailList.records[i].status:0
} }
newData.push(obj) newData.push(obj)
} }
state.tabledata = newData; state.tabledata = newData;
state.tableDataTotal = res.data.data.total; state.tableDataTotal = res.data.data.studyDetailList.total;
} }
}).catch(err=>{ }).catch(err=>{
console.log(err) console.log(err)
@@ -454,13 +493,18 @@ export default {
// 导出数据 // 导出数据
function exportTaskStu() { function exportTaskStu() {
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}`) if(props.datasource.type==1){
// window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?pageNo=${state.currentPage}&pageSize=${state.pageSize}&currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&status=${state.name}&studentName=${state.projectName}`) {/* 在线课导出 */}
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}`)
}
} }
return { return {
...toRefs(state), ...toRefs(state),
selectProjectName, selectProjectName,
showassess,
closeDrawer, closeDrawer,
afterVisibleChange, afterVisibleChange,
tableDataFunc, tableDataFunc,

View File

@@ -55,7 +55,7 @@
placeholder="请输入姓名" placeholder="请输入姓名"
/> />
</div> </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="name">任务状态</div>
<div class="select"> <div class="select">
<a-select <a-select
@@ -390,7 +390,7 @@ export default {
console.log("我是传递的查询参数", { console.log("我是传递的查询参数", {
"pageNo": state.currentPage, "pageNo": state.currentPage,
"pageSize": state.pageSize, "pageSize": state.pageSize,
"chapterId": props.outchapter, "chapterId": props.datasource.chapterId,
"status": state.projectName, "status": state.projectName,
"studentName": state.name, "studentName": state.name,
"taskId": props.datasource.courseId, "taskId": props.datasource.courseId,
@@ -401,7 +401,7 @@ export default {
api.QueryOnlineManagementDetail({ api.QueryOnlineManagementDetail({
"pageNo": state.currentPage, "pageNo": state.currentPage,
"pageSize": state.pageSize, "pageSize": state.pageSize,
"chapterId": props.outchapter, "chapterId": props.datasource.chapterId,
"status": state.projectName, "status": state.projectName,
"studentName": state.name, "studentName": state.name,
"targetId":props.datasource.routerId, "targetId":props.datasource.routerId,
@@ -413,20 +413,20 @@ export default {
if(res.data.code==200){ if(res.data.code==200){
state.tableDataTotalLoading = false; state.tableDataTotalLoading = false;
let newData = [] 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 = { let obj = {
studentUserNo: res.data.data.studyDetailList[i].studentCode, studentUserNo: res.data.data.studyDetailList.records[i].studentCode,
studentName: res.data.data.studyDetailList[i].studentName, studentName: res.data.data.studyDetailList.records[i].studentName,
studentDepartName: res.data.data.studyDetailList[i].studentDepartName, studentDepartName: res.data.data.studyDetailList.records[i].studentDepartName,
studentJobName: res.data.data.studyDetailList[i].studentJobName, studentJobName: res.data.data.studyDetailList.records[i].studentJobName,
lastStudyTime: res.data.data.studyDetailList[i].finishedTime, lastStudyTime: res.data.data.studyDetailList.records[i].finishedTime,
finishStatus: res.data.data.studyDetailList[i].status?res.data.data.studyDetailList[i].status:0 finishStatus: res.data.data.studyDetailList.records[i].status?res.data.data.studyDetailList.records[i].status:0
} }
newData.push(obj) newData.push(obj)
} }
state.tabledata = newData; state.tabledata = newData;
state.tableDataTotal = res.data.data.total; state.tableDataTotal = res.data.data.studyDetailList.total;
} }
}).catch(err=>{ }).catch(err=>{
console.log(err) console.log(err)
@@ -462,9 +462,12 @@ export default {
// 导出数据 // 导出数据
function exportTaskStu() { 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/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}&currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}&status=${state.name}&studentName=${state.projectName}`) 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}`)
}
} }
return { return {

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-02-23 14:57:21 * @Date: 2023-02-23 14:57:21
* @LastEditors: lixg lixg@dongwu-inc.com * @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 * @FilePath: /fe-manage/src/components/project/OrgClassCheck.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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) { function change(e) {
// console.log("label", e, emit); console.log("label", e, emit);
// let label = []; // let label = [];
// let value = []; // let value = [];
// for (let i = 0; i < e.length; i++) { // for (let i = 0; i < e.length; i++) {

View File

@@ -4,18 +4,20 @@
<slot></slot> <slot></slot>
</div> </div>
<a-drawer <a-drawer
:visible="visible" :visible="visible"
class="drawerStyle createvoteDrawer" class="drawerStyle createvoteDrawer"
width="800" width="800"
placement="right" placement="right"
> >
<div class="researchadd"> <div class="researchadd">
<div class="header"> <div class="header">
<div class="headerTitle">{{ options.length ? "编辑投票题干" : "创建投票题干" }}</div> <div class="headerTitle">
{{ options.length ? "编辑投票题干" : "创建投票题干" }}
</div>
<img <img
style="width: 29px; height: 29px; cursor: pointer" style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png" src="../../assets/images/basicinfo/close.png"
@click="closeDrawer" @click="closeDrawer"
/> />
</div> </div>
<div class="main_left"> <div class="main_left">
@@ -23,8 +25,8 @@
<div class="signbox"> <div class="signbox">
<div class="sign"> <div class="sign">
<img <img
src="@/assets/images/coursewareManage/asterisk.png" src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk" alt="asterisk"
/> />
</div> </div>
<span>创建题干</span> <span>创建题干</span>
@@ -34,34 +36,35 @@
</div> </div>
</div> </div>
</div> </div>
<div v-for="(item, index) in formData" :key="index+Math.random()"> <div v-for="(item, index) in formData" :key="index + Math.random()">
<VoteQuestion v-if="!item.deleted" :item="item" :index="index" @del="itemDel"/> <VoteQuestion
v-if="!item.deleted"
:item="item"
:index="index"
@del="itemDel"
/>
</div> </div>
<div class="footer"> <div class="footer">
<div class="btn"> <div class="btn">
<a-button <a-button
type="primary" type="primary"
ghost ghost
style=" style="width: 100px; height: 40px; border-radius: 8px"
width: 100px; @click="closeDrawer"
height: 40px;
border-radius: 8px;
"
@click="closeDrawer"
> >
取消 取消
</a-button> </a-button>
<a-button <a-button
type="primary" type="primary"
style=" style="
margin-left: 14px; margin-left: 14px;
width: 100px; width: 100px;
height: 40px; height: 40px;
border-radius: 8px; border-radius: 8px;
background-color: #4ea6ff; background-color: #4ea6ff;
" "
@click="confirm" @click="confirm"
> >
保存 保存
</a-button> </a-button>
@@ -71,62 +74,80 @@
</a-drawer> </a-drawer>
</template> </template>
<script setup> <script setup>
import {defineEmits, defineProps, ref, watch} from "vue"; import { defineEmits, defineProps, ref, watch } from "vue";
import VoteQuestion from "./VoteQuestion.vue"; import VoteQuestion from "./VoteQuestion.vue";
import {message} from "ant-design-vue"; import { message } from "ant-design-vue";
const props = defineProps({ const props = defineProps({
options: [] options: [],
}) });
const emit = defineEmits({}) const emit = defineEmits({});
const formData = ref(props.options && props.options.length ? [...props.options] : [{ const formData = ref(
voteStemName: '', props.options && props.options.length
optionDetailList: [] ? [...props.options]
}]) : [
{
voteStemName: "",
optionDetailList: [],
},
]
);
const visible = ref(false) const visible = ref(false);
watch(() => props.options.length, () => { watch(
formData.value = props.options && props.options.length ? [...props.options] : [{ () => props.options.length,
voteStemName: '', () => {
optionDetailList: [] formData.value =
}] props.options && props.options.length
}) ? [...props.options]
: [
{
voteStemName: "",
optionDetailList: [],
},
];
}
);
function openDrawer() { function openDrawer() {
visible.value = true visible.value = true;
} }
const closeDrawer = () => { const closeDrawer = () => {
visible.value = false visible.value = false;
formData.value = props.options && props.options.length ? [...props.options] : [{ formData.value =
voteStemName: '', props.options && props.options.length
optionDetailList: [] ? [...props.options]
}] : [
{
voteStemName: "",
optionDetailList: [],
},
];
}; };
async function confirm() { async function confirm() {
console.log(formData.value) console.log(formData.value);
if (formData.value.some(t => !t.voteStemName && !t.deleted)) { if (formData.value.some((t) => !t.voteStemName && !t.deleted)) {
message.warning('请输入题干名称') message.warning("请输入题干名称");
return return;
} }
visible.value = false visible.value = false;
emit('update:options', formData.value) emit("update:options", formData.value);
} }
function handleAdd() { function handleAdd() {
formData.value.push({ formData.value.push({
voteStemName: '', voteStemName: "",
optionDetailList: [] optionDetailList: [],
}) });
} }
function itemDel(i) { function itemDel(i) {
formData.value[i].deleted = true formData.value[i].deleted = true;
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.researchadd { .researchadd {

View File

@@ -4,39 +4,47 @@
<div class="content"> <div class="content">
<div class="tagbox"> <div class="tagbox">
<div class="deleteop" @click="handleDel"> <div class="deleteop" @click="handleDel">
<div><img src="../../assets/images/projectadd/delete.png"/></div> <div><img src="../../assets/images/projectadd/delete.png" /></div>
<div class="del_text">删除选项</div> <div class="del_text">删除题干</div>
</div> </div>
</div> </div>
<div class="name"> <div class="name">
<div class="namebox"> <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 class="inname">题干</div>
</div> </div>
<div class="in"> <div class="in">
<a-input <a-input
v-model:value="formData.voteStemName" v-model:value="formData.voteStemName"
placeholder="请输入题干名称" placeholder="请输入题干名称"
show-count show-count
:maxlength="20" :maxlength="20"
style="border-radius: 8px" style="border-radius: 8px"
/> />
</div> </div>
</div> </div>
<div v-for="(item, index) in formData.optionDetailList" :key="index+Math.random()"> <div
<VoteQuestionItem v-if="!item.deleted" :item="item" :index="index" @del="delItem"/> v-for="(item, index) in formData.optionDetailList"
:key="index + Math.random()"
>
<VoteQuestionItem
v-if="!item.deleted"
:item="item"
:index="index"
@del="delItem"
/>
</div> </div>
<div class="name"> <div class="name">
<div class="in" style="margin-left: 85px; margin-bottom: 20px"> <div class="in" style="margin-left: 85px; margin-bottom: 20px">
<a-button <a-button
type="primary" type="primary"
style=" style="
width: 100px; width: 100px;
height: 40px; height: 40px;
border-radius: 8px; border-radius: 8px;
background-color: #4ea6ff; background-color: #4ea6ff;
" "
@click="handleSingleAdd" @click="handleSingleAdd"
> >
添加选项 添加选项
</a-button> </a-button>
@@ -45,34 +53,33 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import {defineEmits, defineProps, ref, watch} from "vue"; import { defineEmits, defineProps, ref, watch } from "vue";
import VoteQuestionItem from "./VoteQuestionItem.vue"; import VoteQuestionItem from "./VoteQuestionItem.vue";
const props = defineProps({ const props = defineProps({
index: Number, index: Number,
item: {} item: {},
}) });
const emit = defineEmits(['del']) const emit = defineEmits(["del"]);
const formData = ref(props.item) const formData = ref(props.item);
watch(props, () => { watch(props, () => {
formData.value = props.item formData.value = props.item;
}) });
function handleSingleAdd() { function handleSingleAdd() {
formData.value.optionDetailList.push({}) formData.value.optionDetailList.push({});
} }
function delItem(i) { function delItem(i) {
formData.value.optionDetailList[i].deleted = true formData.value.optionDetailList[i].deleted = true;
} }
function handleDel() { function handleDel() {
emit("del", props.index); emit("del", props.index);
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.researchadd { .researchadd {

File diff suppressed because it is too large Load Diff

View File

@@ -394,7 +394,7 @@
<div class="header"> <div class="header">
<div class="icon"></div> <div class="icon"></div>
<span>提示</span> <span>提示</span>
<div class="close_exit" @click="closeCancel"></div> <!-- <div class="close_exit" @click="closeCancel"></div> -->
</div> </div>
<div class="body"> <div class="body">
<span>您确定要删除所有阶段吗</span> <span>您确定要删除所有阶段吗</span>
@@ -699,7 +699,14 @@ const closeDelete = () => {
}; };
// 删除所有阶段 // 删除所有阶段
const removeAllLevel = () => { 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 = () => { const selectRowAll = () => {
@@ -723,6 +730,7 @@ const closeDeAll = () => {
//暂存 //暂存
const temporaryStorage = async () => { const temporaryStorage = async () => {
templateLoading.value = true templateLoading.value = true
console.log(projectInfo.value)
await request(PROJECT_DETAIL_MODIFY, projectInfo.value) await request(PROJECT_DETAIL_MODIFY, projectInfo.value)
await getTask() await getTask()
message.success("暂存成功"); message.success("暂存成功");

View File

@@ -641,7 +641,7 @@
<div class="more"> <div class="more">
<span style="color: rgba(0, 0, 0, 0.45); cursor: pointer">. . .</span> <span style="color: rgba(0, 0, 0, 0.45); cursor: pointer">. . .</span>
<div class="moreItems" v-if="checkPer(permissions)"> <div class="moreItems" v-if="checkPer(permissions)">
<div class="sammo" @click="showModal2(item)"> <div class="sammo" @click="showModal2(item,true)">
编辑 编辑
</div> </div>
<div class="sammo" @click="deleteGroupBtn(item.id)"> <div class="sammo" @click="deleteGroupBtn(item.id)">
@@ -1828,6 +1828,7 @@ export default {
allDelete: false, //批量删除弹窗 allDelete: false, //批量删除弹窗
pubproject: false, pubproject: false,
stugroup: false, stugroup: false,
isEdit: false,
canclestu: false, canclestu: false,
canclestu1: false, canclestu1: false,
deleteOneStu: false, //删除单个学员弹窗 deleteOneStu: false, //删除单个学员弹窗
@@ -2479,7 +2480,8 @@ export default {
console.log("点击换组", record.studentId); console.log("点击换组", record.studentId);
state.checkgroupStuId = record.studentId; state.checkgroupStuId = record.studentId;
}; };
const showModal2 = (item) => { const showModal2 = (item,isEdit) => {
state.isEdit = isEdit;
state.stugroup = true; state.stugroup = true;
state.groupInfo = item || {}; state.groupInfo = item || {};
}; };
@@ -3320,12 +3322,18 @@ export default {
console.log("state.groupPageList" + state.groupPageList) console.log("state.groupPageList" + state.groupPageList)
const d = state.groupPageList.filter(item => item.leaderId === state.groupInfo.leaderId); const d = state.groupPageList.filter(item => item.leaderId === state.groupInfo.leaderId);
const id = state.groupInfo.id; const id = state.groupInfo.id;
// 过滤掉编辑时候,只修改了组员最大值时候 if (state.isEdit) {
if(id !== d[0].id) { if (d.length > 0 && d[0].id !== id ) {
return message.warn(d[0].leaderName + "已是小组长,请重新选择");
}
}else{
if (d.length > 0 ) { if (d.length > 0 ) {
return message.warn(d[0].leaderName + "已是小组长,请重新选择"); return message.warn(d[0].leaderName + "已是小组长,请重新选择");
} }
} }
// 过滤掉编辑时候,只修改了组员最大值时候
state.isEdit = false;
await editGroup({ ...state.groupInfo, projectId: state.projectId }) await editGroup({ ...state.groupInfo, projectId: state.projectId })
message.success(id ? '小组编辑成功' : "小组创建成功"); message.success(id ? '小组编辑成功' : "小组创建成功");
getGroup(); getGroup();

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52 * @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com * @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 * @FilePath: /fe-manage/vue.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */