123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- import {getDataSet, getEventParam} from "../../../../utils/utils";
- import {communityDetailTypes, formTypes, logicStatus, verifyTypes} from "../../../../model/enum";
- import Route from "../../../../model/route";
- const tabs1 = [
- {title: "学员手册", icon: '/images/ic_project_info.png'},
- {title: "文件上传", icon: '/images/ic_project_file.png'},
- {title: "班级群", icon: '/images/ic_class_team.png'},
- {title: "结业", icon: '/images/ic_graduation.png'}
- ]
- const tabs2 = [
- {title: "学员手册", icon: '/images/ic_project_info.png'},
- {title: "班级群", icon: '/images/ic_class_team.png'},
- {title: "结业", icon: '/images/ic_graduation.png'}
- ]
- Component({
- properties: {
- isPre: {
- type: Number,
- value: logicStatus.NO
- },
- item: Object,
- students: Array,
- messageList: Array,
- isRefresh: Boolean,
- isLoading: Boolean,
- noMore: Boolean,
- },
- observers: {
- 'isPre': async function (isPre) {
- if (isPre == logicStatus.YES) {
- this.setData({
- tabs: tabs2
- })
- } else {
- this.setData({
- tabs: tabs1
- })
- }
- }
- },
- data: {
- logicStatusEnum: logicStatus,
- tabs: tabs1,
- },
- methods: {
- toDetail(e) {
- let detail = JSON.stringify(getEventParam(e, "res"));
- let item = JSON.stringify(this.data.item);
- Route.tocCommunityDetail(communityDetailTypes.CLASS, "班级动态", "", "", detail, item,
- this.data.isPre, {
- comment: () => {
- this.triggerEvent("publish", {isSuccess: true})
- }
- })
- },
- checkIn(e) {
- if (this.data.item.isReport) {
- return;
- }
- Route.toChekIn(verifyTypes.REPORT, "报到", this.data.item.itemName, "", this.data.item.teamId, this.data.item.eduStuId,
- {
- check: () => {
- this.triggerEvent("refresh")
- }
- })
- },
- toStudent(e) {
- Route.toStudent(this.data.item.teamId, this.data.item.eduStuId);
- },
- publishInfo(e) {
- Route.toCommunityForm(formTypes.DYNAMIC, this.data.item.teamId, this.data.item.eduStuId,
- this.data.item.eduStuName, {
- publish: (res) => {
- this.triggerEvent("publish", res)
- }
- })
- },
- async toClickGrid(e) {
- const title = getDataSet(e, "title");
- if ('文件上传' == title) {
- Route.toUploadFile("", "文件上传", this.data.item.teamId)
- } else if ('结业' == title) {
- let detailParams = {...this.data.item, picUrl: '', itemName: ''};
- let detail = JSON.stringify(detailParams);
- Route.toGraduation(this.data.isPre, detail, {
- refresh: () => {
- this.triggerEvent("refresh")
- }
- })
- } else if ('班级群' == title) {
- Route.toClassTeam(this.data.item.teamId)
- } else if ('学员手册' == title) {
- Route.toStudentBookList(this.data.item.teamId)
- }
- },
- goRegister() {
- Route.toStuInfo(this.data.item.teamId, this.data.item.eduStuId, {
- refresh: () => {
- this.triggerEvent("refresh")
- }
- });
- }
- },
- });
|