提交 65c5d7a6 authored 作者: 刘旭's avatar 刘旭

更新代码

上级 f21fe2da
......@@ -104,10 +104,12 @@ const toEvaluate = () => {
url:
"/pages/class/evaluate?classNumber=" +
props.classItem.classNumber +
"&isEvaluate=" +
"&iEvaluate=" +
props.classItem.iEevaluate +
"&classId=" +
props.classItem.classId,
props.classItem.classId +
"&ItemNumber=" +
props.classItem.ItemNumber,
})
}
</script>
......
......@@ -48,6 +48,7 @@ const listQuery = reactive({
total: 0,
type: 5,
classId: "",
Name: "",
})
const status = ref("loadmore")
......
......@@ -148,7 +148,8 @@ const evaluateData = reactive({
onLoad(async (options: any) => {
evaluateData.parmeters.Model.FClass.FNUMBER = options.classNumber
if (options.isEvaluate) {
evaluateData.parmeters.Model.FTrainingPro.FNUMBER = options.ItemNumber
if (options.iEvaluate != "false") {
let data = {
classId: options.classId,
studentId: globalStore.infoData.FSTUDENTID,
......
......@@ -122,7 +122,12 @@ const init = async () => {
}
}
init()
onShow(() => {
classList.value = []
listQuery.pageIndex = 1
listQuery.pageSize = 10
init()
})
</script>
<style lang="scss" scoped>
......
......@@ -193,11 +193,7 @@ import { useGlobalStore } from "@/store/useStore"
const props = defineProps({
courseItem: {
type: Array,
default: () => [
{
title: "你好",
},
],
default: () => [] as any,
} as any,
current: {
type: Number,
......@@ -241,67 +237,64 @@ const tagList = [
// 已补签:QDBJ + ''
// 签退补签: '' + QDBJ
const attendanceStatus = computed(() => {
if (props.current != 2) return
let data
if (props.courseItem.State.length) {
const { SingIn, SingInText, SingOut, SingOutText } =
props.courseItem.State[0].Value[0]
if (SingIn == "QD" && SingOut == "QT") data = tagList[0]
if (SingIn == "QD" && !SingOut) data = tagList[2]
if (SingIn == "QDQJ" && !SingOut) data = tagList[3]
if (SingIn == "QD" && SingOut == "QTQJ") data = tagList[4]
if (SingIn == "QDBJ" && !SingOut) data = tagList[5]
if (SingIn == "QD" && SingOut == "QDBJ") data = tagList[6]
} else {
data = tagList[1]
if (props.current !== 2) return
const { SingIn, SingInText, SingOut, SingOutText }: any = props.courseItem
.State.length
? props.courseItem.State[0]?.Value[0]
: {}
const conditions: any = {
"QD-QT": tagList[0],
QD: tagList[2],
QDQJ: tagList[3],
"QD-QTQJ": tagList[4],
QDBJ: tagList[5],
"QD-QDBJ": tagList[6],
}
const key = `${SingIn || ""}-${SingOut || ""}`
let data = conditions.hasOwnProperty(key) ? conditions[key] : tagList[1]
data = { ...data, SingInText, SingOutText }
return data
})
const singInStatus = computed(() => {
let str = ""
if (props.courseItem.State.length) {
switch (props.courseItem.State[0].Value[0].SingIn) {
case "QDBQ":
str = "已补签"
break
case "QD":
str = "已签到"
break
case "QDQJ":
str = "签到请假"
break
case null:
str = "未签到"
break
}
} else {
str = "未签到"
const defaultStatus = "未签到"
const statusMap: any = {
QDBQ: "已补签",
QD: "已签到",
QDQJ: "签到请假",
}
return str
const singOut = props.courseItem.State.length
? props.courseItem.State[0]?.Value[0].SingOut
: null
const status = statusMap[singOut] || defaultStatus
return status
})
const singOutStatus = computed(() => {
let str = ""
if (props.courseItem.State.length) {
switch (props.courseItem.State[0].Value[0].SingOut) {
case "QTBQ":
str = "已补签"
break
case "QT":
str = "已签退"
break
case "QTQJ":
str = "签退请假"
break
case null:
str = "未签退"
break
}
} else {
str = "未签退"
const defaultStatus = "未签退"
const statusMap: any = {
QDBQ: "已补签",
QTBQ: "已补签",
QT: "已签退",
QTQJ: "签退请假",
}
return str
const singIn = props.courseItem.State.length
? props.courseItem.State[0]?.Value[0].SingIn
: null
const status =
singIn === "QDBQ"
? "已补签"
: statusMap[props.courseItem.State[0]?.Value[0].SingOut] || defaultStatus
return status
})
// 签到按钮的显示状态
......
......@@ -236,13 +236,6 @@ const application = async () => {
const close = () => {
isFText.value = false
// form.value = {
// fillInfo: "",
// fillRiding: "否",
// fillArrAngEroom: "否",
// fillCohabItant: "否",
// fillCohabItantName: "",
// }
emits("update:modelValue", false)
}
......
......@@ -35,7 +35,7 @@
<script setup lang="ts">
import dayjs from "dayjs"
import applicationPupop from "./applicationPopup.vue"
import { getInFormAtion, quit } from "@/api/trainRegistration"
import { getInFormAtion, quit, signUp } from "@/api/trainRegistration"
import { toast, zconfirm } from "@/utils/util"
import { useGlobalStore } from "@/store/useStore"
......@@ -89,10 +89,65 @@ const registerTrain = () => {
case 0:
zconfirm(
"确认报名参加本期培训?",
(result: boolean) => {
async (result: boolean) => {
if (result) {
initInFormAtion()
show.value = true
if (
props.trainItem.fisFillArrAngEroom !== "false" &&
props.trainItem.fisFillCohabItant !== "false" &&
props.trainItem.fisFillInfo !== "false" &&
props.trainItem.fsFillRiding !== "false"
) {
initInFormAtion()
show.value = true
} else {
const data: any = {
classId: props.trainItem.classId,
parmeters: {
IsDeleteEntry: "false",
Model: {
FID: 0,
FTrainingProgram: {
FNUMBER: props.trainItem.itemNumber, //项目
},
FClass: {
FNUMBER: props.trainItem.classNumber, //班级
},
F_LQKJ_Entity: [
{
FStudentId: {
FNUMBER: globalStore.infoData.FNUMBER,
},
FGroup: "1",
FSourceChannel: "",
FWorkUnit: globalStore.infoData.FWorkUnit1,
FDuties: globalStore.infoData.FDUTIES,
FType: "",
FStreet: {
FNumber: "",
},
FAffiliationDGW: {
FNumber: "",
},
FText: "",
FIsRiding: false,
FIsArrangeRoom: false,
FIsCohabit: false,
FCohabitName: "",
FStuClassId: {
FNUMBER: "",
},
FPhoneNmuber: globalStore.infoData.FMOBILE,
},
],
},
},
}
const { data: res } = await signUp(data)
if (res.code == 200) {
initTrain()
toast("报名成功")
}
}
}
},
"报名培训"
......
......@@ -72,7 +72,7 @@ const listQuery = reactive({
})
const registeredQuery = reactive({
Phone: globalStore.infoData.FMOBILE,
FSTUDENTID: globalStore.infoData.FSTUDENTID,
pageIndex: 1,
pageSize: 10,
total: 0,
......@@ -156,7 +156,6 @@ const init = async () => {
else status.value = "nomore"
trainList.value = [...trainList.value, ...res.data]
listQuery.total = res.total
console.log(trainList.value, listQuery.total, res.total)
}
}
......
import { jsonp } from "./util"
import { hLoading, jsonp, sLoading } from "./util"
const mapsInfo = reactive({
lat: 0, // 纬度
......@@ -16,6 +16,7 @@ const useQqMaps = () => {
const initQqMaps = () => {
// 获取当前所在地理位置
sLoading()
geolocation.getLocation(showPosition, showErr)
}
......@@ -40,9 +41,9 @@ const useQqMaps = () => {
location: position.lat + "," + position.lng,
get_poi: 1,
}).then((res: any) => {
// console.log(res.result, 'res.result');
hLoading()
mapsInfo.addr = res.result.address
console.log(mapsInfo)
// console.log(mapsInfo)
})
}
......
import config from "./config"
import { useGlobalStore } from "@/store/useStore"
import { hLoading, sLoading, toast } from "./util"
// export const baseUrl = "/k3cloud"
export const baseUrl = "/k3cloud"
// 部署到iis上用的
// export const baseUrl = "https://weixin.lingqingkeji.com:86/k3cloud"
export const baseUrl = "/XiBU"
// export const baseUrl = "/XiBU"
const globalStore = useGlobalStore()
// 封装公共申请办法
function request(
url: string,
......@@ -14,9 +16,16 @@ function request(
) {
return new Promise<any>(function (resolve, reject) {
let header: any
uni.showLoading({
title: "加载中...",
})
sLoading()
let pages = getCurrentPages()
let page = pages[pages.length - 1] // 当前页面
if (
page.route !== "pages/login/index" &&
page.route !== "pages/login/register" &&
JSON.stringify(globalStore.infoData) === "{}"
) {
uni.reLaunch({ url: "/pages/login/index" })
}
header = { "Content-Type": "application/json" }
url = baseUrl + url
......@@ -27,14 +36,11 @@ function request(
header,
responseType,
success(res: any) {
uni.hideLoading()
hLoading()
if (res.data.code == 200 || res.data.code == 501) {
resolve(res)
} else if (res.data.code == 500 || res.data.code === 401) {
uni.showToast({
title: res.data.msg,
icon: "none",
})
toast(res.data.msg)
reject(res)
} else {
console.log(res, "非200错误")
......@@ -43,7 +49,7 @@ function request(
}
},
fail(err: any) {
uni.hideLoading()
hLoading()
//申请失败
uni.showToast({
title: "连接服务器失败",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论