mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # src/views/courselibrary/CoursewareManage.vue # src/views/courselibrary/courseModal.vue
This commit is contained in:
@@ -430,6 +430,20 @@ export default {
|
||||
},
|
||||
];
|
||||
}
|
||||
if (
|
||||
n.indexOf("/sonproject") !== -1 ||
|
||||
n.indexOf("/SonProject") !== -1
|
||||
) {
|
||||
state.list = [
|
||||
{
|
||||
name: "项目",
|
||||
href: "",
|
||||
},
|
||||
{
|
||||
name: "基础信息",
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -406,8 +406,8 @@ const beforeUpload = (file) => {
|
||||
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
|
||||
return false;
|
||||
}
|
||||
|
||||
let isLt1M = file.size < 2097152;
|
||||
|
||||
let isLt1M = file.size < 2000000;
|
||||
console.log(file.size, isLt1M)
|
||||
if (!isLt1M) {
|
||||
message.error("图片大小超过2MB!");
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
<slot></slot>
|
||||
</div>
|
||||
<a-drawer
|
||||
:visible="visible"
|
||||
class="drawerStyle addonlineDrawer"
|
||||
width="1000"
|
||||
title="添加在线"
|
||||
placement="right"
|
||||
:visible="visible"
|
||||
class="drawerStyle addonlineDrawer"
|
||||
width="1000"
|
||||
title="添加在线"
|
||||
placement="right"
|
||||
>
|
||||
<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"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
@@ -26,10 +26,10 @@
|
||||
<div class="ipt_name"></div>
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="params.name"
|
||||
style="width: 210px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入项目名称"
|
||||
maxlength="20"
|
||||
v-model:value="params.name"
|
||||
style="width: 210px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入项目名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,10 +37,10 @@
|
||||
<div class="ipt_name"></div>
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="params.manager"
|
||||
style="width: 210px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入项目经理"
|
||||
maxlength="20"
|
||||
v-model:value="params.manager"
|
||||
style="width: 210px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入项目经理"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,10 +48,10 @@
|
||||
<div class="ipt_name"></div>
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="params.createName"
|
||||
style="width: 210px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入创建人"
|
||||
maxlength="20"
|
||||
v-model:value="params.createName"
|
||||
style="width: 210px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入创建人"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,63 +65,56 @@
|
||||
<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"
|
||||
>名称:
|
||||
>名称:
|
||||
<span
|
||||
class="data"
|
||||
style="color: #4ea6ff; margin-right: 15px"
|
||||
>{{ selectedRows[0].name }}</span
|
||||
class="data"
|
||||
style="color: #4ea6ff; margin-right: 15px"
|
||||
>{{ selectedRows?.name }}</span
|
||||
>
|
||||
</span>
|
||||
<span class="title"
|
||||
>项目经理:
|
||||
>项目经理:
|
||||
<span
|
||||
class="data"
|
||||
style="color: #4ea6ff; margin-right: 15px"
|
||||
>{{ selectedRows[0].manager }}</span
|
||||
class="data"
|
||||
style="color: #4ea6ff; margin-right: 15px"
|
||||
>{{ selectedRows?.manager }}</span
|
||||
>
|
||||
</span>
|
||||
<span class="title"
|
||||
>创建人:
|
||||
>创建人:
|
||||
<span
|
||||
class="data"
|
||||
style="color: #4ea6ff; margin-right: 15px"
|
||||
>{{ selectedRows[0].creater }}</span
|
||||
class="data"
|
||||
style="color: #4ea6ff; margin-right: 15px"
|
||||
>{{ selectedRows?.createName }}</span
|
||||
>
|
||||
</span>
|
||||
<span class="title"
|
||||
>创建时间:
|
||||
>创建时间:
|
||||
<span class="data" style="color: #4ea6ff">{{
|
||||
selectedRows[0].time
|
||||
}}</span>
|
||||
selectedRows?.createTime
|
||||
}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -130,15 +123,17 @@
|
||||
<div class="main_table">
|
||||
<div class="drawerbox">
|
||||
<a-table
|
||||
:customRow="customRow"
|
||||
class="ant-table-striped"
|
||||
:row-class-name="(_, index) => (index % 2 === 1 ? 'table-striped' : null)"
|
||||
row-key="id"
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
:loading="loading"
|
||||
:pagination="pagination"
|
||||
:row-selection="rowSelection"
|
||||
:customRow="customRow"
|
||||
class="ant-table-striped"
|
||||
:row-class-name="
|
||||
(_, index) => (index % 2 === 1 ? 'table-striped' : null)
|
||||
"
|
||||
row-key="id"
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
:loading="loading"
|
||||
:pagination="pagination"
|
||||
:row-selection="rowSelection"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -150,10 +145,10 @@
|
||||
</div>
|
||||
<!-- 有重复添加的项目时的弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="sameModal"
|
||||
:footer="null"
|
||||
wrapClassName="sameModal"
|
||||
centered="true"
|
||||
v-model:visible="sameModal"
|
||||
:footer="null"
|
||||
wrapClassName="sameModal"
|
||||
centered="true"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
@@ -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, {
|
||||
init: false,
|
||||
result: res => res.result.list,
|
||||
totalPage: res => res.result.totalPages,
|
||||
total: res => res.result.count
|
||||
})
|
||||
|
||||
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,
|
||||
}
|
||||
);
|
||||
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 {
|
||||
@@ -383,8 +416,8 @@ defineExpose({openDrawer})
|
||||
width: calc(100%);
|
||||
height: 68px;
|
||||
background: linear-gradient(
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
);
|
||||
}
|
||||
|
||||
@@ -626,8 +659,8 @@ defineExpose({openDrawer})
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
}
|
||||
@@ -680,8 +713,8 @@ defineExpose({openDrawer})
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
console.log('我是传递过来的参数2', props.basicdata)
|
||||
api.QueryAssessmentDetail({
|
||||
"assessmentSubmitId": props.datasource.assessmentSubmitId,
|
||||
"courseId": props.basicdata.assessmentId,
|
||||
"courseId": props.basicdata.id,
|
||||
"studentId": props.datasource.studentId
|
||||
}).then(res=>{
|
||||
console.log(res)
|
||||
|
||||
@@ -470,7 +470,7 @@ export default {
|
||||
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;
|
||||
state.imageName = process.env.VUE_APP_FILE_PATH + info.file.name;
|
||||
}
|
||||
if (info.file.status === "error") {
|
||||
message.error("upload error");
|
||||
|
||||
@@ -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() {
|
||||
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}`)
|
||||
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}`)
|
||||
}
|
||||
}
|
||||
|
||||
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}`)
|
||||
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}`)
|
||||
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}`)
|
||||
}
|
||||
}
|
||||
|
||||
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++) {
|
||||
|
||||
@@ -4,18 +4,20 @@
|
||||
<slot></slot>
|
||||
</div>
|
||||
<a-drawer
|
||||
:visible="visible"
|
||||
class="drawerStyle createvoteDrawer"
|
||||
width="800"
|
||||
placement="right"
|
||||
:visible="visible"
|
||||
class="drawerStyle createvoteDrawer"
|
||||
width="800"
|
||||
placement="right"
|
||||
>
|
||||
<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"
|
||||
@click="closeDrawer"
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="main_left">
|
||||
@@ -23,8 +25,8 @@
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt="asterisk"
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt="asterisk"
|
||||
/>
|
||||
</div>
|
||||
<span>创建题干:</span>
|
||||
@@ -34,34 +36,35 @@
|
||||
</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">
|
||||
<div class="btn">
|
||||
<a-button
|
||||
type="primary"
|
||||
ghost
|
||||
style="
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
"
|
||||
@click="closeDrawer"
|
||||
type="primary"
|
||||
ghost
|
||||
style="width: 100px; height: 40px; border-radius: 8px"
|
||||
@click="closeDrawer"
|
||||
>
|
||||
取消
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
style="
|
||||
type="primary"
|
||||
style="
|
||||
margin-left: 14px;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
background-color: #4ea6ff;
|
||||
"
|
||||
@click="confirm"
|
||||
@click="confirm"
|
||||
>
|
||||
保存
|
||||
</a-button>
|
||||
@@ -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,39 +4,47 @@
|
||||
<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">
|
||||
<a-input
|
||||
v-model:value="formData.voteStemName"
|
||||
placeholder="请输入题干名称"
|
||||
show-count
|
||||
:maxlength="20"
|
||||
style="border-radius: 8px"
|
||||
v-model:value="formData.voteStemName"
|
||||
placeholder="请输入题干名称"
|
||||
show-count
|
||||
:maxlength="20"
|
||||
style="border-radius: 8px"
|
||||
/>
|
||||
</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">
|
||||
<a-button
|
||||
type="primary"
|
||||
style="
|
||||
type="primary"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
background-color: #4ea6ff;
|
||||
"
|
||||
@click="handleSingleAdd"
|
||||
@click="handleSingleAdd"
|
||||
>
|
||||
添加选项
|
||||
</a-button>
|
||||
@@ -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 {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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("暂存成功");
|
||||
|
||||
@@ -641,7 +641,7 @@
|
||||
<div class="more">
|
||||
<span style="color: rgba(0, 0, 0, 0.45); cursor: pointer">. . .</span>
|
||||
<div class="moreItems" v-if="checkPer(permissions)">
|
||||
<div class="sammo" @click="showModal2(item)">
|
||||
<div class="sammo" @click="showModal2(item,true)">
|
||||
编辑
|
||||
</div>
|
||||
<div class="sammo" @click="deleteGroupBtn(item.id)">
|
||||
@@ -1828,6 +1828,7 @@ export default {
|
||||
allDelete: false, //批量删除弹窗
|
||||
pubproject: false,
|
||||
stugroup: false,
|
||||
isEdit: false,
|
||||
canclestu: false,
|
||||
canclestu1: false,
|
||||
deleteOneStu: false, //删除单个学员弹窗
|
||||
@@ -2479,7 +2480,8 @@ export default {
|
||||
console.log("点击换组", record.studentId);
|
||||
state.checkgroupStuId = record.studentId;
|
||||
};
|
||||
const showModal2 = (item) => {
|
||||
const showModal2 = (item,isEdit) => {
|
||||
state.isEdit = isEdit;
|
||||
state.stugroup = true;
|
||||
state.groupInfo = item || {};
|
||||
};
|
||||
@@ -3320,12 +3322,18 @@ export default {
|
||||
console.log("state.groupPageList" + state.groupPageList)
|
||||
const d = state.groupPageList.filter(item => item.leaderId === state.groupInfo.leaderId);
|
||||
const id = state.groupInfo.id;
|
||||
// 过滤掉编辑时候,只修改了组员最大值时候
|
||||
if(id !== d[0].id) {
|
||||
if (state.isEdit) {
|
||||
if (d.length > 0 && d[0].id !== id ) {
|
||||
return message.warn(d[0].leaderName + "已是小组长,请重新选择");
|
||||
}
|
||||
}else{
|
||||
if (d.length > 0 ) {
|
||||
return message.warn(d[0].leaderName + "已是小组长,请重新选择");
|
||||
}
|
||||
}
|
||||
// 过滤掉编辑时候,只修改了组员最大值时候
|
||||
|
||||
state.isEdit = false;
|
||||
await editGroup({ ...state.groupInfo, projectId: state.projectId })
|
||||
message.success(id ? '小组编辑成功' : "小组创建成功");
|
||||
getGroup();
|
||||
|
||||
@@ -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