feat:合并

This commit is contained in:
lixg
2022-12-19 21:44:44 +08:00
6 changed files with 77 additions and 86 deletions

View File

@@ -57,6 +57,7 @@ export const getProjectDetail = (obj) => http.get('/admin/project/detail', {para
export const releaseProject = (obj) => http.post('/admin/project/publish', obj) export const releaseProject = (obj) => http.post('/admin/project/publish', obj)
//获取项目学员 //获取项目学员
export const projectStudent = (obj) => http.post('/admin/project/studentList', obj) export const projectStudent = (obj) => http.post('/admin/project/studentList', obj)
export const projectStudentCount = (obj) => http.get('/admin/student/getStudentCount', {params: obj})
//撤回发布、结束 //撤回发布、结束
export const handleProject = (obj) => http.post('/admin/project/handle', obj) export const handleProject = (obj) => http.post('/admin/project/handle', obj)

View File

@@ -22,7 +22,8 @@
</a-col> </a-col>
<a-col :span="2"> <a-col :span="2">
<a-button class="cus-btn white" style="width: 100px" @click="reset" <a-button class="cus-btn white" style="width: 100px" @click="reset"
>重置</a-button >重置
</a-button
> >
</a-col> </a-col>
</a-row> </a-row>
@@ -96,8 +97,8 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { computed, defineProps, onMounted, ref } from "vue"; import {computed, defineProps, onMounted, ref, watch} from "vue";
import { delStudentList, getStuPage } from "@/api/index1"; import {delStudentList, getStuPage} from "@/api/index1";
import CommonStudent from "@/components/student/CommonStudent"; import CommonStudent from "@/components/student/CommonStudent";
const props = defineProps({ const props = defineProps({
@@ -145,8 +146,8 @@ const tablecolumns = ref([
key: "source", key: "source",
width: "10%", width: "10%",
align: "center", align: "center",
customRender: ({ record: { source } }) => customRender: ({record: {source}}) =>
({ 1: "快速添加", 2: "组织", 3: "受众" }[source]), ({1: "快速添加", 2: "组织", 3: "受众"}[source]),
}, },
...props.columns, ...props.columns,
{ {
@@ -155,7 +156,7 @@ const tablecolumns = ref([
key: "operation", key: "operation",
width: "25%", width: "25%",
align: "center", align: "center",
slots: { customRender: "action" }, slots: {customRender: "action"},
}, },
]); ]);
const tableParam = ref({ const tableParam = ref({
@@ -183,6 +184,11 @@ onMounted(() => {
getStuList(); getStuList();
}); });
watch(props, () => {
tableParam.value.pid= props.id
getStuList();
})
function onStuSelectChange(e) { function onStuSelectChange(e) {
stuSelectKeys.value = e; stuSelectKeys.value = e;
} }
@@ -210,7 +216,8 @@ function getStuList() {
}); });
} }
function reset() {} function reset() {
}
function bathDel() { function bathDel() {
stuSelectKeys.value && stuSelectKeys.value &&

View File

@@ -2278,7 +2278,7 @@
<span>{{ currentPlanItem.teacher }}</span> <span>{{ currentPlanItem.teacher }}</span>
</div> </div>
<div class="stmm_i5"> <div class="stmm_i5">
<TableStudent :type="3" :id="offcourseId" :columns="stuColumns"> <TableStudent :type="3" :id="offcoursePlanId" :columns="stuColumns">
<!-- <template #extension = "data">--> <!-- <template #extension = "data">-->
<!-- <div style="display: flex">--> <!-- <div style="display: flex">-->
<!-- <button @click="handlJoinStu(data)">成绩录入</button>--> <!-- <button @click="handlJoinStu(data)">成绩录入</button>-->
@@ -4982,7 +4982,7 @@ export default defineComponent({
console.log(state.currentPlanItem); console.log(state.currentPlanItem);
state.sm_hs = true; state.sm_hs = true;
getTableDate2(); // getTableDate2();
}; };
const sm_exit = () => { const sm_exit = () => {
state.sm_hs = false; state.sm_hs = false;

View File

@@ -244,7 +244,7 @@
class="aeLoading" class="aeLoading"
:style="{ display: lpLoading ? 'flex' : 'none' }" :style="{ display: lpLoading ? 'flex' : 'none' }"
> >
<a-spin :spinning="lpLoading" tip="" /> <a-spin :spinning="lpLoading" tip=""/>
</div> </div>
</div> </div>
</div> </div>
@@ -278,7 +278,7 @@
/> />
</div> </div>
<div class="inname">路径图名称</div> <div class="inname">路径图名称</div>
<div class="in"> <div class="in" >
<!-- <a-input--> <!-- <a-input-->
<!-- v-model:value="pathName"--> <!-- v-model:value="pathName"-->
<!-- maxlength="20"--> <!-- maxlength="20"-->
@@ -699,6 +699,7 @@ import ProjPowerList from "../../components/drawers/ProjPowerList";
import ProjCheckShip from "../../components/drawers/ProjCheckPower"; import ProjCheckShip from "../../components/drawers/ProjCheckPower";
// import ManageRight from "../../components/drawers/ManageRight"; // import ManageRight from "../../components/drawers/ManageRight";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import * as apiStu from "../../api/index";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { import {
commonData, commonData,
@@ -709,7 +710,7 @@ import { storage } from "../../api/storage";
import { useStore } from "vuex"; import { useStore } from "vuex";
import OrgClass from "@/components/project/OrgClass"; import OrgClass from "@/components/project/OrgClass";
import NameInput from "@/components/project/NameInput"; import NameInput from "@/components/project/NameInput";
import { getStuPage } from "@/api/index1";
export default { export default {
name: "learningPath", name: "learningPath",
components: { components: {
@@ -857,7 +858,7 @@ export default {
state.pathName = ""; state.pathName = "";
state.pathBg = ""; state.pathBg = "";
state.pathBgId = ""; state.pathBgId = "";
if (store.state.userInfo.departId && store.state.userInfo.departName) { if(store.state.userInfo.departId && store.state.userInfo.departName){
state.organizationSelectName = store.state.userInfo.departName; state.organizationSelectName = store.state.userInfo.departName;
state.organizationSelectId = store.state.userInfo.departId; state.organizationSelectId = store.state.userInfo.departId;
} }
@@ -867,7 +868,7 @@ export default {
const handleOut1 = () => { const handleOut1 = () => {
state.pathName = ""; state.pathName = "";
state.pathBg = ""; state.pathBg = "";
state.pathBgId = 1; state.pathBgId =1;
state.organizationSelectName = null; state.organizationSelectName = null;
state.organizationSelectId = null; state.organizationSelectId = null;
state.pathIntro = ""; state.pathIntro = "";
@@ -905,23 +906,13 @@ export default {
console.log("err", err); console.log("err", err);
}); });
//获取学员列表 //获取学员列表
let stuobj = { apiStu.projectStudentCount({
pageNo: 1,
pageSize: 10,
pid: router.id, pid: router.id,
type: 2, type:2
}; }).then((res) => {
getStuPage(stuobj) state.routeStudentsNum = res.data.data;
.then((res) => {
console.log("获取学员列表", res.data);
if (res.data.code === 200) {
state.routeStudentsNum = res.data.data.total;
state.pubLoading = false; state.pubLoading = false;
}
}) })
.catch((err) => {
console.log("获取学员列表失败", err);
});
}; };
//确定发布 //确定发布
const releaseLearnPath = () => { const releaseLearnPath = () => {
@@ -1626,6 +1617,7 @@ export default {
arr.forEach((item) => { arr.forEach((item) => {
if (item.dictValue === state.pathBg) { if (item.dictValue === state.pathBg) {
state.pathBgId = item.dictCode; state.pathBgId = item.dictCode;
} }
}); });
@@ -1744,7 +1736,7 @@ export default {
state.searchdate = null; state.searchdate = null;
state.startTime = null; state.startTime = null;
state.endTime = null; state.endTime = null;
state.createUser = null; state.createUser=null;
getLearnPath(); getLearnPath();
}; };
@@ -1802,7 +1794,7 @@ export default {
// state.imgData = ; // state.imgData = ;
// } // }
}); });
const imgData = computed(() => store.state.pathmapPic); const imgData = computed(()=>store.state.pathmapPic)
//添加权限 //添加权限
watch( watch(
() => state.addAuthList, () => state.addAuthList,

View File

@@ -357,6 +357,7 @@ export default {
...res.data.data.projectInfo, ...res.data.data.projectInfo,
...state.projectInfo, ...state.projectInfo,
}; };
!routers.query.projectId && !!routers.query.parentId && (state.projectInfo.name = '')
state.projectInfo.rangeTime = [ state.projectInfo.rangeTime = [
state.projectInfo.beginTime, state.projectInfo.beginTime,
state.projectInfo.endTime, state.projectInfo.endTime,

View File

@@ -51,6 +51,7 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
style="border-radius: 8px; height: 40px; margin-left: 5px" style="border-radius: 8px; height: 40px; margin-left: 5px"
:placeholder="[' 开始时间', ' 结束时间']" :placeholder="[' 开始时间', ' 结束时间']"
/> />
</div> </div>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
@@ -828,7 +829,7 @@ import { changeOwnership } from "@/api/method";
import NameInput from "@/components/project/NameInput"; import NameInput from "@/components/project/NameInput";
import { validateName } from "@/api/index1"; import { validateName } from "@/api/index1";
//import { toDate } from "../../api/method"; //import { toDate } from "../../api/method";
import { getStuPage } from "@/api/index1";
export default { export default {
name: "projectManage", name: "projectManage",
components: { components: {
@@ -1046,25 +1047,13 @@ export default {
state.projectTasks = res.data.data.tasks; state.projectTasks = res.data.data.tasks;
}); });
//获取学员总数 //获取学员总数
let obj = { api.projectStudentCount({
pageNo: 0,
pageSize: 0,
pid: object.projectId, pid: object.projectId,
type: 1, type:1
}; }).then((res) => {
getStuPage(obj) state.projectStudentsNum = res.data.data
.then((res) => {
if (res.data.code === 200) {
// console.log("res", res.data);
state.projectStudentsNum = res.data.data.total
? res.data.data.total
: 0;
state.projectPubLoading = false; state.projectPubLoading = false;
}
}) })
.catch((err) => {
console.log("获取学员人数失败", err);
});
//获取阶段及任务总数 //获取阶段及任务总数
}; };
//确认发布项目 //确认发布项目
@@ -1698,6 +1687,7 @@ export default {
state.searchParam.valueDate && state.searchParam.valueDate &&
state.searchParam.valueDate.length === 2 state.searchParam.valueDate.length === 2
? dayjs(state.searchParam.valueDate[0]).format("YYYY-MM-DD") ? dayjs(state.searchParam.valueDate[0]).format("YYYY-MM-DD")
: "", : "",
endTime: endTime:
state.searchParam.valueDate && state.searchParam.valueDate &&