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

View File

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

View File

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

View File

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

View File

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

View File

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