|
@@ -1,49 +1,49 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <z-paging ref="paging" v-model="list" :auto="false" :height="safeScrollHeight" auto-show-system-loading
|
|
|
|
|
- @query="handleQuery">
|
|
|
|
|
|
|
+ <z-paging ref="paging" v-model="list" :auto="false" auto-show-system-loading @query="handleQuery">
|
|
|
<template #top>
|
|
<template #top>
|
|
|
<slot name="top"/>
|
|
<slot name="top"/>
|
|
|
- <mx-condition-dropdown ref="dropdown" x layout="fx-row items-center gap-20 w-max"/>
|
|
|
|
|
|
|
+ <ie-condition-dropdown ref="dropdown" x layout="flex items-center gap-20 w-max"/>
|
|
|
</template>
|
|
</template>
|
|
|
<voluntary-search @search="handleSearch"/>
|
|
<voluntary-search @search="handleSearch"/>
|
|
|
- <view class="fx-col p-20 gap-20">
|
|
|
|
|
|
|
+ <view class="flex flex-col p-20 gap-20">
|
|
|
<voluntary-item v-for="item in list" :item="item" @major="openMajorPopup(item)" @notify="showNotify"/>
|
|
<voluntary-item v-for="item in list" :item="item" @major="openMajorPopup(item)" @notify="showNotify"/>
|
|
|
- <vip-guide-more v-if="isNotVip"/>
|
|
|
|
|
|
|
+<!-- <vip-guide-more v-if="isNotVip"/>-->
|
|
|
</view>
|
|
</view>
|
|
|
<template #bottom>
|
|
<template #bottom>
|
|
|
- <voluntary-bottom @modify="$refs.modifyPopup.open()" @cart="$refs.cartPopup.open()"/>
|
|
|
|
|
|
|
+<!-- <voluntary-bottom @modify="$refs.modifyPopup.open()" @cart="$refs.cartPopup.open()"/>-->
|
|
|
</template>
|
|
</template>
|
|
|
</z-paging>
|
|
</z-paging>
|
|
|
<!-- 这里渲染的弹窗不会被back-to-top遮挡 -->
|
|
<!-- 这里渲染的弹窗不会被back-to-top遮挡 -->
|
|
|
- <score-batch-popup ref="modifyPopup"/>
|
|
|
|
|
- <voluntary-cart-popup ref="cartPopup"/>
|
|
|
|
|
- <major-popup ref="majorPopup" @notify="showNotify"/>
|
|
|
|
|
- <uv-notify ref="notifier"/>
|
|
|
|
|
|
|
+<!-- <score-batch-popup ref="modifyPopup"/>-->
|
|
|
|
|
+<!-- <voluntary-cart-popup ref="cartPopup"/>-->
|
|
|
|
|
+<!-- <major-popup ref="majorPopup" @notify="showNotify"/>-->
|
|
|
|
|
+<!-- <uv-notify ref="notifier"/>-->
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import {computed, ref, watch} from 'vue';
|
|
|
|
|
-import {toValue} from "@vueuse/core";
|
|
|
|
|
-import {createPropDefine} from "@/utils";
|
|
|
|
|
import {sleep} from "@/uni_modules/uv-ui-tools/libs/function";
|
|
import {sleep} from "@/uni_modules/uv-ui-tools/libs/function";
|
|
|
-import {getRecommendVoluntary, getVoluntaryMarjors} from "@/api/webApi/volunteer";
|
|
|
|
|
-import {useUserStore} from "@/hooks/useUserStore";
|
|
|
|
|
-import {useInjectVoluntaryForm} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryFormInjection";
|
|
|
|
|
-import {useInjectVoluntaryAssistant} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryAssistantInjection";
|
|
|
|
|
-import {useInjectVoluntaryStep} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryStepInjection";
|
|
|
|
|
-import {useInjectVoluntaryHeader} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryHeaderInjection";
|
|
|
|
|
-import {useVoluntaryMajorGroupIdentifier} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryMajorGroupIdentifier";
|
|
|
|
|
-import {useInjectVoluntaryCart} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryCartInjection";
|
|
|
|
|
-import VoluntaryItem from "@/pagesOther/pages/voluntary/index/components/voluntary-item.vue";
|
|
|
|
|
-import VoluntaryBottom from "@/pagesOther/pages/voluntary/index/components/voluntary-bottom.vue";
|
|
|
|
|
-import MajorPopup from "@/pagesOther/pages/voluntary/index/components/major-popup.vue";
|
|
|
|
|
-import ScoreBatchPopup from "@/pagesOther/pages/voluntary/index/components/score-batch-popup.vue";
|
|
|
|
|
-import VoluntaryCartPopup from "@/pagesOther/pages/voluntary/index/components/voluntary-cart-popup.vue";
|
|
|
|
|
-import VoluntarySearch from "@/pagesOther/pages/voluntary/index/components/voluntary-search.vue";
|
|
|
|
|
-import {useProvideVoluntarySearch} from "@/pagesOther/pages/voluntary/hooks/useVoluntarySearchInjection";
|
|
|
|
|
|
|
+import {useUserStore} from "@/store/userStore";
|
|
|
|
|
+import VoluntaryItem from "@/pagesOther/pages/vhs/index/components/voluntary-item.vue";
|
|
|
|
|
+import IeConditionDropdown from "@/pagesOther/components/ie-condition-dropdown/ie-condition-dropdown.vue";
|
|
|
|
|
+// import VoluntaryBottom from "@/pagesOther/pages/vhs/index/components/voluntary-bottom.vue";
|
|
|
|
|
+// import MajorPopup from "@/pagesOther/pages/vhs/index/components/major-popup.vue";
|
|
|
|
|
+// import ScoreBatchPopup from "@/pagesOther/pages/vhs/index/components/score-batch-popup.vue";
|
|
|
|
|
+// import VoluntaryCartPopup from "@/pagesOther/pages/vhs/index/components/voluntary-cart-popup.vue";
|
|
|
|
|
+import VoluntarySearch from "@/pagesOther/pages/vhs/index/components/voluntary-search.vue";
|
|
|
|
|
+import {useInjectVoluntaryForm} from "@/pagesOther/pages/vhs/hooks/useVoluntaryFormInjection";
|
|
|
|
|
+import {useInjectVoluntaryStep} from "@/pagesOther/pages/vhs/hooks/useVoluntaryStepInjection";
|
|
|
|
|
+import {useInjectVoluntaryCart} from "@/pagesOther/pages/vhs/hooks/useVoluntaryCartInjection";
|
|
|
|
|
+import {useInjectVoluntaryAssistant} from "@/pagesOther/pages/vhs/hooks/useVoluntaryAssistantInjection";
|
|
|
|
|
+import {useInjectVoluntaryHeader} from "@/pagesOther/pages/vhs/hooks/useVoluntaryHeaderInjection";
|
|
|
|
|
+import {useProvideVoluntarySearch} from "@/pagesOther/pages/vhs/hooks/useVoluntarySearchInjection";
|
|
|
|
|
+import {useVoluntaryMajorGroupIdentifier} from "@/pagesOther/pages/vhs/hooks/useVoluntaryMajorGroupIdentifier";
|
|
|
|
|
+import {getRecommendVoluntary, getVoluntaryMarjors} from "@/api/modules/vhs";
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
- editMode: createPropDefine(false, Boolean)
|
|
|
|
|
|
|
+ editMode: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const paging = ref(null)
|
|
const paging = ref(null)
|
|
@@ -51,21 +51,20 @@ const notifier = ref(null)
|
|
|
const majorPopup = ref(null)
|
|
const majorPopup = ref(null)
|
|
|
const cartPopup = ref(null)
|
|
const cartPopup = ref(null)
|
|
|
const dropdown = ref(null)
|
|
const dropdown = ref(null)
|
|
|
-const {currentUser, GetInfo, isBind} = useUserStore()
|
|
|
|
|
|
|
+const currentUser = useUserStore()
|
|
|
const {model, batch, mode} = useInjectVoluntaryForm()
|
|
const {model, batch, mode} = useInjectVoluntaryForm()
|
|
|
const {currentStep} = useInjectVoluntaryStep()
|
|
const {currentStep} = useInjectVoluntaryStep()
|
|
|
const {
|
|
const {
|
|
|
resetCart, total, list, selectedList,
|
|
resetCart, total, list, selectedList,
|
|
|
syncMajorGroupToSelected, syncMajorsToSelectedGroup
|
|
syncMajorGroupToSelected, syncMajorsToSelectedGroup
|
|
|
} = useInjectVoluntaryCart()
|
|
} = useInjectVoluntaryCart()
|
|
|
-const {scrollHeight, onBeforeBack, save} = useInjectVoluntaryAssistant() // 填报页下面有原生tabs,必须手动设置高度
|
|
|
|
|
|
|
+const {onBeforeBack, save} = useInjectVoluntaryAssistant() // 填报页下面有原生tabs,必须手动设置高度
|
|
|
const {isMock, ensureHistoryYears} = useInjectVoluntaryHeader()
|
|
const {isMock, ensureHistoryYears} = useInjectVoluntaryHeader()
|
|
|
|
|
|
|
|
const {formatQueryParams, onSearch, reset: resetCondition} = useProvideVoluntarySearch()
|
|
const {formatQueryParams, onSearch, reset: resetCondition} = useProvideVoluntarySearch()
|
|
|
|
|
|
|
|
-const safeScrollHeight = computed(() => scrollHeight ? toValue(scrollHeight) + 'px' : undefined)
|
|
|
|
|
const isNotVip = computed(() => {
|
|
const isNotVip = computed(() => {
|
|
|
- return !toValue(isBind) && toValue(total) > 1
|
|
|
|
|
|
|
+ return !currentUser.isVip && toValue(total) > 1
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const showNotify = (message) => {
|
|
const showNotify = (message) => {
|
|
@@ -87,7 +86,7 @@ const openMajorPopup = (item) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const loadMajorDetails = (item) => {
|
|
const loadMajorDetails = (item) => {
|
|
|
- uni.showLoading()
|
|
|
|
|
|
|
+ uni.$ie.showLoading()
|
|
|
getVoluntaryMarjors({
|
|
getVoluntaryMarjors({
|
|
|
batchName: toValue(batch).name,
|
|
batchName: toValue(batch).name,
|
|
|
collegeCode: item.recruitPlan.collegeCode,
|
|
collegeCode: item.recruitPlan.collegeCode,
|
|
@@ -100,17 +99,17 @@ const loadMajorDetails = (item) => {
|
|
|
syncMajorsToSelectedGroup(res.data, item)
|
|
syncMajorsToSelectedGroup(res.data, item)
|
|
|
item.majors = res.data
|
|
item.majors = res.data
|
|
|
majorPopup.value.open(item)
|
|
majorPopup.value.open(item)
|
|
|
- }).finally(() => uni.hideLoading())
|
|
|
|
|
|
|
+ }).finally(() => uni.$ie.hideLoading())
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
const syncUserScoreByNeed = (query) => {
|
|
const syncUserScoreByNeed = (query) => {
|
|
|
- const {score, seatInput/*, mode*/} = toValue(currentUser)
|
|
|
|
|
|
|
+ const {score, seatInput/*, mode*/} = toValue(currentUser.userInfo)
|
|
|
// if query score mode seatInput changed, re-call getInfo.
|
|
// if query score mode seatInput changed, re-call getInfo.
|
|
|
if (query.score != score ||
|
|
if (query.score != score ||
|
|
|
// query.mode != mode ||
|
|
// query.mode != mode ||
|
|
|
query.seatInput != seatInput) {
|
|
query.seatInput != seatInput) {
|
|
|
- GetInfo()
|
|
|
|
|
|
|
+ currentUser.getUserInfo()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -202,9 +201,9 @@ const reloadWatches = [
|
|
|
watch(reloadWatches, async ([step, score, input, batch], arg2) => {
|
|
watch(reloadWatches, async ([step, score, input, batch], arg2) => {
|
|
|
if (step == 2) {
|
|
if (step == 2) {
|
|
|
if (!props.editMode) resetCart() // 编辑模式下保留cart数据
|
|
if (!props.editMode) resetCart() // 编辑模式下保留cart数据
|
|
|
- cartPopup.value.close()
|
|
|
|
|
- majorPopup.value.close()
|
|
|
|
|
- dropdown.value.terminate()
|
|
|
|
|
|
|
+ cartPopup.value?.close()
|
|
|
|
|
+ majorPopup.value?.close()
|
|
|
|
|
+ dropdown.value?.terminate()
|
|
|
await sleep(400) // wait for animation complete
|
|
await sleep(400) // wait for animation complete
|
|
|
resetCondition()
|
|
resetCondition()
|
|
|
}
|
|
}
|