# Conflicts:
#	src/components/BreadCrumb.vue
This commit is contained in:
dongruihua
2023-02-24 17:18:11 +08:00
18 changed files with 1555 additions and 1153 deletions

View File

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

View File

@@ -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!");

View File

@@ -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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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;
}

View File

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

View File

@@ -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">

View File

@@ -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)

View File

@@ -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");

View File

@@ -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}&currentStageId=${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,

View File

@@ -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}&currentStageId=${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 {

View File

@@ -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++) {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -315,19 +315,23 @@
:pagination="false"
:scroll="{x:'max-content'}"
>
<template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'">
<template #operation="{ record }">
<a-space>
<a-button v-if="(record.status===0 || record.status===-1 || !record.kkty) && checkPer(record.permissions)"
<a-button v-if="record.auditStatus===2 && checkPer(record.permissions)"
@click="() => handlePush(record, String(record.courseform))" type="link">发布
</a-button>
<a-button v-if="record.auditStatus===0 && checkPer(record.permissions)"
@click="() => handleSubmit(record, String(record.courseform))" type="link">提交审核
</a-button>
<a-button v-if="(record.auditStatus===0 || record.auditStatus===-1) && checkPer(record.permissions)"
@click="() => handleEdit(record, String(record.courseform))" type="link">编辑
</a-button>
<a-button v-if="record.status===2 && checkPer(record.permissions)"
<a-button v-if="(record.auditStatus===2 || record.auditStatus===3) && checkPer(record.permissions)"
@click="() => handleStart(record, String(record.courseform))" type="link">开课
</a-button>
<a-button v-if="record.status===2 && checkPer(record.permissions)"
@click="() => handleLook(record, String(record.courseform))" type="link">查看
<a-button @click="() => handleLook(record, String(record.courseform))" type="link">查看
</a-button>
<a-button v-if="record.status===2 && checkPer(record.permissions)"
<a-button v-if="(record.auditStatus===2 || record.auditStatus===3) && checkPer(record.permissions)"
@click="() => handleGuan22(record, String(record.courseform))" type="link">管理
</a-button>
<DropDown v-if="checkPer(record.permissions)" value="授权">
@@ -338,18 +342,13 @@
<DropDown v-if="checkPer(record.permissions)" value="更多">
<a-button @click="() => handleCopy(record, String(record.courseform))" type="link">复制</a-button>
<a-button @click="() => handleRejectExit(record, String(record.courseform))" type="link">撤回</a-button>
<a-button v-if="record.status===2 && record.kkty"
@click="() => handleStop(record, String(record.courseform))" type="link">
</a-button>
<a-button v-if="record.status===2 && !record.kkty"
@click="() => handleOpen(record, String(record.courseform))" type="link">启用
</a-button>
<a-button v-if="record.status" @click="() => handleStop(record, String(record.courseform))" type="link">停用</a-button>
<a-button v-else @click="() => handleOpen(record, String(record.courseform))" type="link"></a-button>
<a-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除
</a-button>
</DropDown>
</a-space>
</template>
</template>
</a-table>
</div>
<div class="pa">
@@ -841,7 +840,7 @@
<div class="b_input">
<NameInput
maxlength="30"
v-model:value="xjkkinputV1" v-model:validate="validate" show-count :id="offcourseId" :type="2"
v-model:value="xjkkinputV1" v-model:validate="validate" show-count :id="offcourseId" :type="2"
style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入开课名称"
></NameInput>
@@ -970,9 +969,9 @@
<div class="signbox"></div>
<div class="btnbox">
<add-homework v-model:info="workInfo">
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">
配置作业
</button>
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">
配置作业
</button>
</add-homework>
<div v-if="workInfo.workName">
<a-tag closable @close="logW" color="processing">
@@ -987,7 +986,7 @@
<div class="signbox"></div>
<div class="btnbox">
<add-test v-model:info="examInfo">
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">配置考试</button>
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">配置考试</button>
</add-test>
<div v-if="examInfo.examinationName">
<a-tag closable @close="logT" color="processing">
@@ -1358,7 +1357,7 @@
<div
class="delete"
:style="{
display: del_hs || copy_hs || nouse_hs ? 'block' : 'none',
display: del_hs || copy_hs || nouse_hs || back_hs || submit_hs || useCourse || push_hs ? 'block' : 'none',
}"
>
<div class="del_header"></div>
@@ -1392,6 +1391,18 @@
<div :style="{ display: nouse_hs ? 'block' : 'none' }">
<span>您确定要停用此课程吗</span>
</div>
<div :style="{ display: submit_hs ? 'block' : 'none' }">
<span>您确定要提交审核吗</span>
</div>
<div :style="{ display: back_hs ? 'block' : 'none' }">
<span>您确定要撤回吗</span>
</div>
<div :style="{ display: useCourse ? 'block' : 'none' }">
<span>您确定要启用吗</span>
</div>
<div :style="{ display: push_hs ? 'block' : 'none' }">
<span>您确定要发布吗</span>
</div>
</div>
<div class="del_btnbox">
<div class="del_btn btn1" @click="delete_exit1">
@@ -1523,7 +1534,7 @@ import {
newFile,
getdateToDate,
} from "../../utils/utils";
import { validateName } from "@/api/index1";
import {validateName} from "@/api/index1";
import {fileUp} from "../../api/indexEval";
import * as api1 from "../../api/index1";
@@ -1548,206 +1559,7 @@ import {checkPer} from "@/utils/utils";
import dayjs from "dayjs";
//列表表格
const columns1 = [
{
title: "名称",
width: 400,
dataIndex: "name",
key: "name",
ellipsis: true,
align: "left",
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: "课程编号",
width: 130,
dataIndex: "offcourseNumber",
key: "offcourseNumber",
align: "center",
},
{
title: "内容分类",
width: 130,
dataIndex: "contentTxt",
ellipsis: true,
key: "contentTxt",
align: "center",
},
{
title: "课程形式",
width: 130,
dataIndex: "courseform",
key: "2",
align: "center",
customRender: ({record}) => {
switch (String(record.courseform)) {
case "1":
return "线上";
case "2":
return "面授";
}
},
},
{
title: " 所属项目",
width: 250,
dataIndex: "projectName",
key: "3",
align: "center",
ellipsis: true,
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: " 所属路径",
width: 250,
dataIndex: "routerName",
key: "3",
align: "center",
ellipsis: true,
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: " 资源归属",
width: 250,
dataIndex: "sourceBelongFullName",
key: "3",
align: "center",
ellipsis: true,
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: " 目标人群",
width: 250,
dataIndex: "targetUser",
key: "3",
align: "center",
ellipsis: true,
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: "学习人数",
width: 130,
dataIndex: "studentCnt",
key: "4",
align: "center",
customRender: ({text}) => {
return text ? text : "0";
},
},
// {
// title: "评分",
// width: 130,
// dataIndex: "grade",
// key: "5",
// align: "center",
// customRender: ({ text }) => {
// return text ? text : "0";
// },
// },
{
title: "状态",
width: 130,
dataIndex: "status",
key: "6",
align: "center",
customRender: ({record}) => {
switch (String(record.status)) {
case "0":
return "未提交";
case "1":
return "待审核";
case "2":
return "已审核";
case "-1":
return "审核未通过";
}
},
},
{
title: "是否发布",
width: 100,
dataIndex: "ynpub",
key: "7",
align: "center",
customRender: ({record}) => {
switch (String(record.ynpub)) {
case "0":
return "未发布";
case "1":
return "已发布";
}
},
},
{
title: "创建人",
width: 100,
dataIndex: "creator",
key: "8",
ellipsis: true,
align: "center",
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: "创建时间",
width: 100,
dataIndex: "createtime",
key: "9",
ellipsis: true,
align: "center",
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: "发布时间",
width: 100,
ellipsis: true,
dataIndex: "pubtime",
key: "10",
align: "center",
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: "是否停用",
width: 100,
key: "either",
dataIndex: "kkty",
align: "center",
customRender: ({record}) => {
switch (String(record.kkty)) {
case "0":
return "停用";
case "1":
return "启用";
case "-1":
return "已删除";
}
},
},
{
title: "操作",
width: 250,
dataIndex: "operation",
key: "operation",
fixed: "right",
align: "right",
},
];
//列表操作在线面授管理
const columns2 = [
{
@@ -1909,8 +1721,8 @@ const columns6 = [
align: "center",
ellipsis: true,
customRender: ({text}) => {
return text ? text : "-";
},
return text ? text : "-"
}
},
{
@@ -2152,11 +1964,207 @@ export default defineComponent({
setup() {
const CourseModalRef = ref(null);
const store = useStore();
const sysTypeOptions = computed(() => store.state.content_type);
const state = reactive({
workInfo:{},
examInfo:{},
workInfo: {},
examInfo: {},
tableLoading: false,
columns1: [
{
title: "名称",
width: 400,
dataIndex: "name",
key: "name",
ellipsis: true,
align: "left",
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: "课程编号",
width: 130,
dataIndex: "offcourseNumber",
key: "offcourseNumber",
align: "center",
},
{
title: "内容分类",
width: 130,
dataIndex: "contentTxt",
ellipsis: true,
key: "contentTxt",
align: "center",
customRender: ({record}) => (findClassFullName(sysTypeOptions.value, record.sysTypeId) || "-")
},
{
title: "课程形式",
width: 130,
dataIndex: "courseform",
key: "2",
align: "center",
customRender: ({record}) => {
switch (String(record.courseform)) {
case "1":
return "线上";
case "2":
return "面授";
}
},
},
{
title: " 所属项目",
width: 250,
dataIndex: "projectName",
key: "3",
align: "center",
ellipsis: true,
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: " 所属路径",
width: 250,
dataIndex: "routerName",
key: "3",
align: "center",
ellipsis: true,
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: " 资源归属",
width: 250,
dataIndex: "sourceBelongFullName",
key: "3",
align: "center",
ellipsis: true,
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: " 目标人群",
width: 250,
dataIndex: "targetUser",
key: "3",
align: "center",
ellipsis: true,
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: "学习人数",
width: 130,
dataIndex: "studentCnt",
key: "4",
align: "center",
customRender: ({text}) => {
return text ? text : "0";
},
},
// {
// title: "评分",
// width: 130,
// dataIndex: "grade",
// key: "5",
// align: "center",
// customRender: ({ text }) => {
// return text ? text : "0";
// },
// },
{
title: "状态",
width: 130,
dataIndex: "auditStatus",
key: "6",
align: "center",
customRender: ({record}) => {
switch (String(record.auditStatus)) {
case "0":
return "未提交";
case "1":
return "待审核";
case "2":
return "已审核";
case "3":
return "已审核";
case "-1":
return "审核未通过";
}
}
},
{
title: "是否发布",
width: 100,
dataIndex: "auditStatus",
key: "7",
align: "center",
customRender: ({record}) => record.auditStatus === 3 ? '已发布' : '未发布',
},
{
title: "创建人",
width: 100,
dataIndex: "createName",
key: "8",
ellipsis: true,
align: "center",
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: "创建时间",
width: 100,
dataIndex: "createTime",
key: "9",
ellipsis: true,
align: "center",
customRender: ({text}) => {
return text ? text : "-";
},
},
{
title: "发布时间",
width: 100,
ellipsis: true,
dataIndex: "publishTime",
key: "10",
align: "center",
customRender: ({text,auditStatus}) => {
return auditStatus == 3 ? (text || '-') : "-";
},
},
{
title: "是否停用",
width: 100,
key: "status",
dataIndex: "status",
align: "center",
customRender: ({record}) => {
switch (String(record.status)) {
case "0":
return "停用";
case "1":
return "启用";
}
},
},
{
title: "操作",
width: 250,
dataIndex: "id",
key: "id",
fixed: "right",
align: "right",
slots: { customRender: 'operation' }
},
],
//新加
stuColumns: [
{
@@ -2454,6 +2462,9 @@ export default defineComponent({
agreestudy_hs: false,
rejectstudy_hs: false,
delete_hs: false,
submit_hs: false,
push_hs: false,
back_hs: false,
del_hs: false,
del_hs_stu: false,
copy_hs: false,
@@ -2472,6 +2483,9 @@ export default defineComponent({
faceDetailObj: {},
offcourseId: null,
temp: null,
useCourse: false,
stopCourse: false,
projectName: "",
name: "",
createName: "",
@@ -2730,6 +2744,27 @@ export default defineComponent({
codeType: null, //二维码类型
});
function findClassFullName(list, classify, name = "") {
return (
(list &&
list.length > 0 &&
list.map((e) =>
classify == e.code
? name
? name + "-" + e.name
: e.name
: findClassFullName(
e.children,
classify,
name ? name + "-" + e.name : e.name
)
)
.filter((name) => name)
.join("")) ||
""
);
}
const showStuAdd = (record) => {
state.selectCourseId = record.offcoursePlanId;
state.shipType = 2;
@@ -2737,7 +2772,6 @@ export default defineComponent({
state.viewpowervisible = true;
};
const sysTypeOptions = computed(() => store.state.content_type);
// console.log('12344', sysTypeOptions)
@@ -2931,7 +2965,6 @@ export default defineComponent({
const getTableDate = async () => {
state.tableLoading = true;
console.log("我是点击搜索的数据", state.sysTypeId);
// let datas = state.tableData1;
let startTime = "";
let endTime = "";
if (state.projectTime) {
@@ -2956,66 +2989,15 @@ export default defineComponent({
endTime: endTime,
beginTime: startTime,
});
console.log("获取面授课列表", res);
const {rows, total, pageNo} = res.data.data;
console.log(res.data.data);
const {rows, total} = res.data.data;
state.tableData1 = rows;
state.tableDataTotal1 = total;
for (let i = 0; i < rows.length; i++) {
rows[i].num = i + 1 + (state.currentPage1 - 1) * 10;
}
const datas = traverseArr(
rows,
{
key: "offcourseId",
num: "num",
name: "name",
content: "sysTypeId",
courseform: "type",
project: "projectName",
stunum: "studentCnt",
grade: "score",
status: "auditStatus",
ynpub: "publishStatus",
creator: "createName",
createtime: "createTime",
pubtime: "publishTime",
kkty: "status",
offcourseId: "offcourseId",
},
true
);
datas.forEach((itm) => {
itm.pageNo = pageNo;
itm.contentTxt =
findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-";
});
state.tableData1 = datas;
console.log("state.tableData1", state.tableData1);
state.tableLoading = false;
// itm.pageNo = pageNo;
// itm.contentTxt = findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-";
console.log("state.tableData1", state.tableData1);
};
function findClassFullName(list, classify, name = "") {
return (
(list &&
list.length > 0 &&
list.map((e) =>
classify == e.code
? name
? name + "-" + e.name
: e.name
: findClassFullName(
e.children,
classify,
name ? name + "-" + e.name : e.name
)
)
.filter((name) => name)
.join("")) ||
""
);
}
getTableDate();
const handelChangePage1 = (page, pageSize) => {
state.currentPage1 = page;
@@ -3353,6 +3335,7 @@ export default defineComponent({
// };
// 渲染开课操作
const getTableDate3 = async () => {
state.tableLoading = true;
// let datas = state.tableData6;
let beginTime = "";
let endTime = "";
@@ -3381,6 +3364,7 @@ export default defineComponent({
};
console.log("获取开obj", obj, state.selectTime);
let res = await planList(obj);
state.tableLoading = false;
console.log("开课res", res);
const {rows, total, pageNo} = res.data.data;
state.tableDataTotal222 = total;
@@ -3646,22 +3630,22 @@ export default defineComponent({
};
//保存开课
const handleSureStu = async() => {
const handleSureStu = async () => {
let startTime,
endTime = 0;
if (state.xjkkinputV3) {
startTime = dayjs(state.xjkkinputV3[0]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000);
endTime = dayjs(state.xjkkinputV3[1]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000);
}
const offName = await validateName({ name: state.xjkkinputV1, type: 5 ,id:state.offcoursePlanId}).then(res => {
console.log(res,res.data.data);
return res.data.data === 1;
});
console.log('校验重复',offName)
if (offName) {
message.destroy();
return message.warning("开课名称重复,请重新填写");
}
const offName = await validateName({name: state.xjkkinputV1, type: 5, id: state.offcoursePlanId}).then(res => {
console.log(res, res.data.data);
return res.data.data === 1;
});
console.log('校验重复', offName)
if (offName) {
message.destroy();
return message.warning("开课名称重复,请重新填写");
}
let t = state.signCom ? "1," : "0,";
let p = state.comLeave ? "1" : "0";
let type = t.concat(p);
@@ -3843,6 +3827,9 @@ export default defineComponent({
state.delete_hs = false;
state.del_hs = false;
state.del_hs_stu = false;
state.submit_hs = false;
state.back_hs = false;
state.push_hs = false;
state.copy_hs = false;
state.nouse_hs = false;
state.rg_hs = false;
@@ -3854,15 +3841,8 @@ export default defineComponent({
return;
}
state.offcourseId = itm.id;
handle({
offcourseId: state.offcourseId,
type: 0,
}).then((res) => {
if (res.data.code === 200) {
getTableDate();
}
});
state.delete_hs = true;
state.back_hs = true;
};
const handleJoin = async () => {
@@ -3949,12 +3929,8 @@ export default defineComponent({
};
//确认复制课程 操作
const handleDeleteExit = async () => {
state.addLoading = true;
if (state.del_hs) {
console.log(11111111);
if (state.offcourseId && state.offcoursePlanId && state.studentId) {
console.log(111111);
handleStudent({
offcoursePlanId: state.offcoursePlanId,
score: "",
@@ -3967,7 +3943,6 @@ export default defineComponent({
}
});
} else if (state.offcourseId && state.offcoursePlanId) {
console.log(2222222);
deletePlan({
offcoursePlanId: state.offcoursePlanId,
}).then((res) => {
@@ -3977,10 +3952,7 @@ export default defineComponent({
}
});
} else if (state.offcourseId) {
console.log(3333333);
handle({
offcourseId: state.offcourseId,
type: -1,
handle({offcourseId: state.offcourseId, type: -1,
}).then((res) => {
if (res.data.code === 200) {
message.destroy();
@@ -3992,39 +3964,43 @@ export default defineComponent({
}
}
if (state.copy_hs) {
state.tableLoading = true;
if (state.offcourseId && state.offcoursePlanId) {
state.tableLoading = true;
message.success("复制成功");
delete_exit1();
rest();
await copyCoursePlan({offcoursePlanId: state.offcoursePlanId})
getTableDate3();
} else if (state.offcourseId) {
delete_exit1();
rest();
message.success("复制成功");
state.tableLoading = true;
await copyCourse({courseId: state.offcourseId})
getTableDate();
}
message.success("复制成功");
rest();
}
if (state.nouse_hs) {
console.log(3333333333);
if (state.offcourseId) {
console.log(87887);
handle({
offcourseId: state.offcourseId,
type: -2,
}).then((res) => {
if (res.data.code === 200) {
message.destroy();
message.success("操作成功");
getTableDate();
delete_exit1();
}
});
}
state.temp.auditStatus = 0
message.success("停用成功");
handle({offcourseId: state.offcourseId, type: -2,})
}
if (state.submit_hs) {
state.tableLoading = true;
message.success("提交审核成功");
handle({offcourseId: state.offcourseId, type: 1}).then(() => getTableDate());
}
if (state.back_hs) {
state.tableLoading = true;
message.success("撤回成功");
handle({offcourseId: state.offcourseId, type: 0}).then(() => getTableDate());
}
if (state.useCourse) {
state.tableLoading = true;
message.success("启用成功");
handle({offcourseId: state.offcourseId, type: 2}).then(() => getTableDate());
}
if (state.push_hs) {
state.tableLoading = true;
message.success("发布成功");
handle({offcourseId: state.offcourseId, type: 3}).then(() => getTableDate());
}
delete_exit1();
};
const handleDeleteKaike = (value) => {
state.offcoursePlanId = value.id;
@@ -4280,7 +4256,6 @@ export default defineComponent({
state.del_hs = true;
};
const handleCopy = async (itm, type) => {
console.log(itm);
if (type === "1") {
return;
}
@@ -4289,6 +4264,22 @@ export default defineComponent({
state.delete_hs = true;
state.copy_hs = true;
};
const handleSubmit = async (itm, type) => {
if (type === "1") {
return;
}
state.offcourseId = itm.id;
state.submit_hs = true;
state.delete_hs = true;
};
const handlePush = async (itm, type) => {
if (type === "1") {
return;
}
state.offcourseId = itm.id;
state.push_hs = true;
state.delete_hs = true;
};
const handleCopyP = async (itm) => {
console.log(itm);
state.offcourseId = itm.offcourseId;
@@ -4297,33 +4288,23 @@ export default defineComponent({
state.delete_hs = true;
state.copy_hs = true;
};
const handleStop = async (itm, type) => {
const handleStop = (itm, type) => {
console.log(itm);
if (type === "1") {
return;
}
state.temp = itm;
state.offcourseId = itm.id;
state.delete_hs = true;
state.nouse_hs = true;
};
const handleOpen = async (itm, type) => {
console.log(itm);
if (type === "1") {
return;
}
state.offcourseId = itm.id;
handle({
offcourseId: state.offcourseId,
type: 2,
}).then((res) => {
if (res.data.code === 200) {
getTableDate();
message.destroy();
message.success("启用成功");
}
});
state.useCourse = true;
state.delete_hs = true;
};
const handleStart = (item, type) => {
console.log(item);
@@ -4679,6 +4660,7 @@ export default defineComponent({
return {
...toRefs(state),
sysTypeOptions,
findClassFullName,
CourseModalRef,
auditStudent,
getdateToDateFn,
@@ -4707,12 +4689,13 @@ export default defineComponent({
handleStart,
handleCopyP,
handleCopy,
handleSubmit,
handlePush,
handleStop,
handleOpen,
handleEdit,
handleDelete,
changevalue,
columns1,
columns2,
columns4,
columns6,

View File

@@ -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>
@@ -882,11 +879,11 @@ export default defineComponent({
intro: state.qdms_inputV6,
attach: state.attach,
outline: valueHtml.value,
organizationIds: orgSelect,
// organizationIds: orgSelect, //todo 传的不对
jobTypeIds: selectJobId,
bandIds: selectBandId,
sourceBelongId: state.sourceBelongId,
sourceBelongFullName: state.sourceBelongName,
sourceBelongFullName: state.sourceBelongName
};
console.log("postData", postData);
const checkList = [

File diff suppressed because it is too large Load Diff

View File

@@ -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("暂存成功");

View File

@@ -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();

View File

@@ -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
*/