소스 검색

vhs - all init temporary save

abpcoder 4 주 전
부모
커밋
0c859dad91

+ 18 - 18
src/pages.json

@@ -201,24 +201,24 @@
              "navigationBarTitleText": ""
            }
          },
-//         {
-//           "path": "pages/vhs/detail/detail",
-//           "style": {
-//             "navigationBarTitleText": ""
-//           }
-//         },
-//         {
-//           "path": "pages/vhs/edit/edit",
-//           "style": {
-//             "navigationBarTitleText": ""
-//           }
-//         },
-//         {
-//           "path": "pages/vhs/list/list",
-//           "style": {
-//             "navigationBarTitleText": ""
-//           }
-//         },
+         {
+           "path": "pages/vhs/detail/detail",
+           "style": {
+             "navigationBarTitleText": ""
+           }
+         },
+         {
+           "path": "pages/vhs/edit/edit",
+           "style": {
+             "navigationBarTitleText": ""
+           }
+         },
+         {
+           "path": "pages/vhs/list/list",
+           "style": {
+             "navigationBarTitleText": ""
+           }
+         },
         {
           "path": "pages/ranking/ranking",
           "style": {

+ 3 - 2
src/pagesOther/components/ie-bottom-buttons/ie-bottom-buttons.vue

@@ -1,5 +1,5 @@
 <template>
-    <view v-if="left||right" class="flex gap-30 p-30" :class="containerClass">
+    <view v-if="left||right" class="flex gap-30 p-30" :class="[containerClass, customClass]">
         <view v-if="left" class="flex-1">
             <uv-button :text="left" :type="leftType" :icon="leftIcon" :icon-color="leftType" plain
                        v-bind="buttonStyle" @click="$emit('left')"/>
@@ -23,7 +23,8 @@ const props = defineProps({
     rightIcon: createPropDefine(undefined),
     leftType: createPropDefine('error'),
     rightType: createPropDefine('primary'),
-    loading: createPropDefine(false, Boolean)
+    loading: createPropDefine(false, Boolean),
+    customClass: createPropDefine('')
 })
 defineEmits(['left', 'right'])
 

+ 57 - 58
src/pagesOther/pages/vhs/detail/detail.vue

@@ -1,47 +1,46 @@
 <template>
-    <z-paging ref="paging" v-model="list" :auto="false" auto-show-system-loading @query="handleQuery">
-        <template #top>
-            <mx-nav-bar :title="prevData.name"/>
-        </template>
-        <view class="fx-col gap-20 p-20">
-            <voluntary-item v-for="item in list" :item="item" @major="openMajorPopup(item)" @notify="showNotify"/>
-        </view>
-        <major-popup ref="majorPopup" readonly @notify="showNotify"/>
-        <uv-notify ref="notifier"/>
-        <template #bottom>
-            <mx-bottom-buttons left="编辑" left-type="primary" right="下载" class="h-[60px] px-30 bg-white mx-shadow-up"
-                               left-icon="edit-pen" right-icon="download" @left="handleEdit" @right="handleDownload"/>
-        </template>
-    </z-paging>
+    <ie-page>
+        <z-paging ref="paging" v-model="list" :auto="false" bg-color="#F6F8FA" auto-show-system-loading
+                  safe-area-inset-bottom @query="handleQuery">
+            <template #top>
+                <ie-navbar :title="prevData.name"/>
+            </template>
+            <view class="flex flex-col gap-20 p-20">
+                <voluntary-item v-for="item in list" :item="item" @major="openMajorPopup(item)" @notify="showNotify"/>
+            </view>
+            <major-popup ref="majorPopup" readonly @notify="showNotify"/>
+            <uv-notify ref="notifier"/>
+            <template #bottom>
+                <!--                <ie-bottom-buttons left="编辑" left-type="primary" right="下载"-->
+                <!--                                   custom-class="bg-white ie-shadow-up"-->
+                <!--                                   left-icon="edit-pen" right-icon="download" @left="handleEdit"-->
+                <!--                                   @right="handleDownload"/>-->
+                <ie-bottom-buttons left="" right="编辑" right-icon="edit-pen" custom-class="bg-white ie-shadow-up"
+                                   @right="handleEdit"/>
+            </template>
+        </z-paging>
+    </ie-page>
 </template>
 
 <script setup>
-import {ref, onMounted} from 'vue';
-import {
-    downloadRecommendReport,
-    getDownloadRecommendReportOptionsForWap2App,
-    getRecommendVoluntary,
-    getVoluntaryMarjors,
-    getZhiyuanDetail,
-} from '@/api/webApi/volunteer.js'
-import MxConst from '@/common/MxConst'
+import {alertAsync} from "@/utils/uni-helper";
+import {useEnv} from "@/hooks/useEnv";
+import {useUserStore} from "@/store/userStore";
+import {useTransferPage} from "@/hooks/useTransferPage";
+import {routes} from "@/common/routes";
 import MajorPopup from '../index/components/major-popup.vue'
 import VoluntaryItem from "../index/components/voluntary-item.vue";
-import {useProvideTransfer} from "@/hooks/useTransfer";
-import {useVoluntaryMajorGroupIdentifier} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryMajorGroupIdentifier";
-import {useProvideVoluntaryMajorHighlight} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryMajorHighlightInjection";
-import {useProvideVoluntaryHeader} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryHeaderInjection";
-import {useProvideVoluntaryCart} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryCartInjection";
-import {useVoluntaryPageDataFormat} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryPageDataFormat";
-import {useUserStore} from "@/hooks/useUserStore";
-import {alertAsync} from "@/utils/uni-helper";
-import {useEnvStore} from "@/hooks/useEnvStore";
-import {useDownload} from "@/hooks/useDownload";
+import IeBottomButtons from "@/pagesOther/components/ie-bottom-buttons/ie-bottom-buttons.vue";
+import {useVoluntaryMajorGroupIdentifier} from "@/pagesOther/pages/vhs/hooks/useVoluntaryMajorGroupIdentifier";
+import {useProvideVoluntaryMajorHighlight} from "@/pagesOther/pages/vhs/hooks/useVoluntaryMajorHighlightInjection";
+import {useProvideVoluntaryHeader} from "@/pagesOther/pages/vhs/hooks/useVoluntaryHeaderInjection";
+import {useProvideVoluntaryCart} from "@/pagesOther/pages/vhs/hooks/useVoluntaryCartInjection";
+import {useVoluntaryPageDataFormat} from "@/pagesOther/pages/vhs/hooks/useVoluntaryPageDataFormat";
+import {getRecommendVoluntary, getVoluntaryMarjors, getZhiyuanDetail} from "@/api/modules/vhs";
 
-const {isWap2App, isH5} = useEnvStore()
-const {currentUser, isScoreLocked} = useUserStore()
-const {prevData, transferTo, onPageCallback} = useProvideTransfer()
-const {downloadBlobFileForWap2app, downloadBlobFile} = useDownload()
+const {isWap2App, isH5, isMP} = useEnv()
+const currentUser = useUserStore()
+const {prevData, transferTo} = useTransferPage()
 const paging = ref(null)
 const notifier = ref(null)
 const majorPopup = ref(null)
@@ -118,8 +117,8 @@ const loadMajorDetails = (item) => {
 }
 
 const handleEdit = async () => {
-    if (isScoreLocked.value) {
-        const {score, mode} = currentUser.value
+    if (currentUser.isScoreLocked) {
+        const {score, mode} = currentUser.userInfo
         if (prevData.value.score != score || prevData.value.mode != mode) {
             return alertAsync('现在是志愿填报高峰期,此志愿表与您的考试分数不符,为保证系统稳定性,填报期间您不能修改这张志愿表')
         }
@@ -127,24 +126,27 @@ const handleEdit = async () => {
     if (prevData.value.obsoleted) {
         return alertAsync('此志愿表已经过期,不能使用修改功能')
     }
-    const next = {...prevData.value, callback: MxConst.globalEvents.voluntaryChanged}
-    transferTo('/pages/voluntary/edit/edit', next, null, true)
+    const next = {...prevData.value}
+    transferTo(routes.VHSEdit, {bigData: next})
+        .then(change => {
+            if (change) loadDataById(prevData.value.id)
+        })
 }
 
-const handleDownload = async () => {
-    const {name, score, batchName, id} = prevData.value
-    const fileName = `${name}-${score}-${batchName}`
-    const params = {wishResId: id}
-    if (isWap2App.value) {
-        const opt = getDownloadRecommendReportOptionsForWap2App(params)
-        downloadBlobFileForWap2app(opt, fileName)
-    } else if (isH5.value) {
-        const rep = await downloadRecommendReport(params)
-        downloadBlobFile(rep, fileName)
-    } else {
-        console.error('unexpected env, neither wap2app nor h5')
-    }
-}
+// const handleDownload = async () => {
+//     const {name, score, batchName, id} = prevData.value
+//     const fileName = `${name}-${score}-${batchName}`
+//     const params = {wishResId: id}
+//     if (isWap2App.value) {
+//         const opt = getDownloadRecommendReportOptionsForWap2App(params)
+//         downloadBlobFileForWap2app(opt, fileName)
+//     } else if (isH5.value) {
+//         const rep = await downloadRecommendReport(params)
+//         downloadBlobFile(rep, fileName)
+//     } else {
+//         console.error('unexpected env, neither wap2app nor h5')
+//     }
+// }
 
 onMounted(() => {
     if (prevData.value.id) {
@@ -154,9 +156,6 @@ onMounted(() => {
         loadDataByCache()
     }
 })
-onPageCallback((change) => {
-    if (change) loadDataById(prevData.value.id)
-})
 </script>
 
 <style lang="scss" scoped>

+ 31 - 218
src/pagesOther/pages/vhs/edit/edit.vue

@@ -1,32 +1,34 @@
 <template>
-    <view class="page-content h-screen">
-        <cart-step ref="cart" edit-mode>
-            <template #top>
-                <mx-nav-bar :title="title" :sub-title="name" :left-click-block="confirmBackChange"
-                            style="z-index: 20000"/>
-            </template>
-        </cart-step>
-    </view>
+    <ie-page fix-height :safe-area-inset-bottom="false">
+        <ie-auto-resizer>
+            <cart-step ref="cart" edit-mode>
+                <template #top>
+                    <ie-navbar :title="title" :sub-title="name" :left-click-block="confirmBackChange"
+                               style="z-index: 20000"/>
+                </template>
+            </cart-step>
+        </ie-auto-resizer>
+    </ie-page>
 </template>
 
 <script setup>
-import {ref, computed, onMounted} from 'vue';
-import {zytbBatches} from '@/api/webApi/volunteer'
-import MxConst from "@/common/MxConst";
-import {useProvideTransfer} from "@/hooks/useTransfer";
-import {useVoluntaryPageDataFormat} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryPageDataFormat";
-import {useProvideVoluntaryMajorHighlight} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryMajorHighlightInjection";
-import {useProvideVoluntaryStep} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryStepInjection";
-import {useProvideVoluntaryHeader} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryHeaderInjection";
-import {useProvideVoluntaryData} from "@/hooks/useVoluntaryDataInjection";
-import {useProvideVoluntaryCart} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryCartInjection";
-import {useProvideVoluntaryForm} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryFormInjection";
-import {useProvideVoluntaryAssistant} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryAssistantInjection";
-import {useVoluntaryMajorGroupIdentifier} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryMajorGroupIdentifier";
-import CartStep from "@/pagesOther/pages/voluntary/index/components/cart-step.vue";
+import {useVoluntaryPageDataFormat} from "@/pagesOther/pages/vhs/hooks/useVoluntaryPageDataFormat";
+import {useProvideVoluntaryMajorHighlight} from "@/pagesOther/pages/vhs/hooks/useVoluntaryMajorHighlightInjection";
+import {useProvideVoluntaryStep} from "@/pagesOther/pages/vhs/hooks/useVoluntaryStepInjection";
+import {useProvideVoluntaryHeader} from "@/pagesOther/pages/vhs/hooks/useVoluntaryHeaderInjection";
+import {useProvideVoluntaryData} from "@/pagesOther/hooks/useVoluntaryDataInjection";
+import {useProvideVoluntaryCart} from "@/pagesOther/pages/vhs/hooks/useVoluntaryCartInjection";
+import {useProvideVoluntaryForm} from "@/pagesOther/pages/vhs/hooks/useVoluntaryFormInjection";
+import {useProvideVoluntaryAssistant} from "@/pagesOther/pages/vhs/hooks/useVoluntaryAssistantInjection";
+import {useVoluntaryMajorGroupIdentifier} from "@/pagesOther/pages/vhs/hooks/useVoluntaryMajorGroupIdentifier";
+import CartStep from "@/pagesOther/pages/vhs/index/components/cart-step.vue";
+import {useTransferPage} from "@/hooks/useTransferPage";
+import {recommendMajorSortFn} from "@/utils/common";
+import {zytbBatches} from "@/api/modules/vhs";
+import {sleep} from "@/uni_modules/uv-ui-tools/libs/function";
 
 const cart = ref(null)
-const {prevData, transferBack, callbackEventData} = useProvideTransfer()
+const {prevData, transferBack} = useTransferPage()
 const year = computed(() => prevData.value?.detail?.year)
 const {isMock} = useProvideVoluntaryHeader()
 const stepSvc = useProvideVoluntaryStep('志愿编辑')
@@ -120,11 +122,11 @@ const reloadSelectedList = () => {
 const isSelectedListChanged = () => {
     const old = prevData.value.detail.batch.wishes.map(g => ({
         uniqueCode: g.uniqueCode,
-        majors: [...g.marjors].sort(MxConst.recommendMajorSortFn).map(m => m.id)
+        majors: [...g.marjors].sort(recommendMajorSortFn).map(m => m.id)
     }))
     const current = selectedList.value.map(g => ({
         uniqueCode: g.uniqueCode,
-        majors: [...g.majors].filter(m => m.selected).sort(MxConst.recommendMajorSortFn).map(m => m.id)
+        majors: [...g.majors].filter(m => m.selected).sort(recommendMajorSortFn).map(m => m.id)
     }))
     console.log('aop compare selected old and current', old, current)
     // validate the sequence and unique code/id of major group and major item
@@ -138,7 +140,7 @@ const confirmBackChange = async () => {
     }
 }
 
-onMounted(() => {
+onMounted(async () => {
     useVoluntaryPageDataFormat(prevData)
     resolveFormedMajorsFromSavedData(prevData.value)
     id.value = prevData.value.id
@@ -150,201 +152,12 @@ onMounted(() => {
     tryFixScoreMissing()
     //
     currentStep.value = 2
+    await sleep(800)
+    cart.value?.openCartPopup()
 })
 onComplete(() => {
-    callbackEventData.value = true
-    transferBack()
+    transferBack(true)
 })
-// export default {
-//     extends: VoluntaryIndex,
-//     mixins: [mxTransferPageMixins],
-//     data() {
-//         return {
-//             currentStep: 2,
-//             resetCalled: false // reset only need to call once in edit mode
-//         }
-//     },
-//     computed: {
-//         voluntaryDataCalculate() {
-//             // NOTE: overriding by history voluntary data in edit mode
-//             const param = this.voluntaryData || {}
-//             const defaultLimit = {groups: 9999, profession: 9999}
-//             // noinspection JSUnresolvedVariable
-//             const historyParam = {
-//                 sort: this.prevData.detail.batch?.sort || '',
-//                 firedLimit: ext.arrayFirst(this.prevData.detail.batch?.paramBatches) || defaultLimit
-//             }
-//             return {
-//                 ...param,
-//                 ...historyParam
-//             }
-//         },
-//         batchScoreRangeCalculate() {
-//             // NOTE: overriding by history batch score range in edit mode
-//             const min = this.batchMinScore
-//             const max = this.prevData.detail?.batch?.scoreBatchLimit || this.voluntaryData?.maxScore
-//             return [min, max]
-//         },
-//         batchMinScore() {
-//             return this.batch.score2 || this.batch.score1 || this.batch.scorel
-//         }
-//     },
-//     watch: {
-//         'filter': function () {
-//             // 这里与index作区分,因为filter数据可能还没有准备好
-//             if (this.batchMinScore && !this.resetCalled) {
-//                 this.resetCalled = true
-//                 this.reset()
-//             }
-//         },
-//         'batchMinScore': function () {
-//             // if filter is ready first, call reset here.
-//             if (!this.resetCalled && Object.keys(this.filter).length) {
-//                 this.resetCalled = true
-//                 this.reset()
-//             }
-//         }
-//     },
-//     async mounted() {
-//         this.title = '志愿编辑'
-//         this.subTitle = this.prevData.name
-//         this.id = this.prevData.id
-//         // super中会调用 reloadScoreAndMode
-//         this.reloadBatch()
-//         this.reloadSelectedList()
-//         this.simulateFormedMajors()
-//         await this.tryFixScoreMissing()
-//     },
-//     methods: {
-//         prepareData() {
-//             // important: string to json
-//             if (typeof this.prevData.userSnapshot === 'string') {
-//                 this.prevData.userSnapshot = JSON.parse(this.prevData.userSnapshot)
-//             }
-//             if (typeof this.prevData.detail === 'string') {
-//                 const parsedData = JSON.parse(this.prevData.detail)
-//                 parsedData.batch?.wishes?.forEach(this.ensureMajorGroupIdentifier)
-//                 this.prevData.detail = parsedData
-//             }
-//             this.isMockHeader = this.prevData.detail.isMock || false
-//         },
-//         prevStep() {
-//             const next = () => {
-//                 const pages = getCurrentPages()
-//                 return pages.length > 1 ? uni.navigateBack() : this.transferToIndex()
-//             }
-//             this.confirmSave(next)
-//         },
-//         async tryFixScoreMissing() {
-//             if (this.batchMinScore) return
-//             // NOTE: try to fix score range in edit mode, because old versions `scorel` defined in the API model.
-//             const res = await zytbBatches({
-//                 year: this.prevData.detail.year,
-//                 score: this.scoreProps.score,
-//                 mode: this.form.mode
-//             })
-//             const match = res.rows.find(r => r.batch == this.batch.batch)
-//             if (match) {
-//                 this.batch.score1 = match.score1
-//                 this.batch.score2 = match.score2
-//             }
-//         },
-//         async reloadScoreAndMode() {
-//             // 编辑模式下应该使用prevData中的数据
-//             const {
-//                 mode,
-//                 score,
-//                 detail: {seatInput}
-//             } = this.prevData
-//             const modeParams = mode?.split(',') || []
-//             this.scoreProps.score = score
-//             this.scoreProps.firstSubject = modeParams[0]
-//             this.scoreProps.lastSubject = modeParams.slice(1) || []
-//             this.scoreProps.seatInput = seatInput || 0
-//
-//             await sleep(50)
-//             this.scoreProps.init = true // begin seat monitor after init
-//         },
-//         reloadBatch() {
-//             const {
-//                 batch,
-//                 batchName
-//             } = this.prevData
-//             this.batch = {
-//                 batch,
-//                 batchName,
-//                 name: batchName,
-//                 score1: this.prevData.detail.batch.score1 || this.prevData.detail.batch.scorel,
-//                 score2: this.prevData.detail.batch.score2,
-//                 year: this.prevData.detail.year
-//             }
-//             this.form = {
-//                 batch: this.batch.batch,
-//                 mode: this.mode
-//             }
-//         },
-//         reloadSelectedList() {
-//             const detail = this.prevData.detail
-//             const wishes = detail.batch.wishes
-//             // 反向转化选中专业,参照index的保存逻辑
-//             const restoredWishes = wishes.map(group => ({
-//                 uniqueCode: group.uniqueCode,
-//                 pickType: group.pickType,
-//                 enrollRatio: group.enrollRatio,
-//                 enrollRatioText: group.enrollRatioText,
-//                 jCode: group.jCode,
-//                 university: {
-//                     id: group.universityId,
-//                     name: group.name,
-//                     code: group.code,
-//                     ranking: group.ranking,
-//                     rankingOfEdu: group.rankingOfEdu
-//                 },
-//                 history: {
-//                     seat: group.seat
-//                 },
-//                 recruitPlan: {
-//                     collegeCode: group.collegeCode
-//                 },
-//                 // marjors is a write error of history issue
-//                 majors: group.marjors.map((m, index) => ({
-//                     selected: true,
-//                     localPriority: index + 1,
-//                     id: m.id,
-//                     marjorBelongs: m.code,
-//                     marjorName: m.name,
-//                     enrollRatio: m.enrollRatio,
-//                     enrollRatioText: m.enrollRatioText,
-//                     enrollFluctuate: m.enrollFluctuate,
-//                     history: {
-//                         submitMajorId: m.submitMajorId
-//                     }
-//                 }))
-//             }))
-//             restoredWishes.forEach(this.ensureMajorGroupIdentifier)
-//             this.selectedList = restoredWishes
-//             this.defaultSort = this.selectedList.map(g => g.uniqueCode)
-//         },
-//         // simulate formed majors for highlight major
-//         simulateFormedMajors() {
-//             this.formedMajors = this.resolveFormedMajorsFromSavedData(this.prevData)
-//         },
-//         // override the NewSimulatedVolunteer
-//         isSelectedListChanged() {
-//             const old = this.prevData.detail.batch.wishes.map(g => ({
-//                 jCode: g.jCode,
-//                 majors: [...g.marjors].sort(MxConst.recommendMajorSortFn).map(m => m.id)
-//             }))
-//             const current = this.selectedList.map(g => ({
-//                 jCode: g.jCode,
-//                 majors: [...g.majors].filter(m => m.selected).sort(MxConst.recommendMajorSortFn).map(m => m.id)
-//             }))
-//             console.log('aop compare selected old and current', old, current)
-//             // validate the sequence and unique code/id of major group and major item
-//             return JSON.stringify(old) != JSON.stringify(current)
-//         }
-//     }
-// }
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
src/pagesOther/pages/vhs/hooks/useVoluntaryPageDataFormat.js

@@ -1,4 +1,4 @@
-import {useVoluntaryMajorGroupIdentifier} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryMajorGroupIdentifier";
+import {useVoluntaryMajorGroupIdentifier} from "@/pagesOther/pages/vhs/hooks/useVoluntaryMajorGroupIdentifier";
 
 export const useVoluntaryPageDataFormat = (prevData) => {
     if (typeof prevData.value.userSnapshot === 'string') {

+ 8 - 4
src/pagesOther/pages/vhs/index/components/cart-step.vue

@@ -1,6 +1,6 @@
 <template>
-    <z-paging ref="paging" v-model="list" :auto="false" bg-color="#F6F8FA" safe-area-inset-bottom
-              auto-show-system-loading @query="handleQuery">
+    <z-paging ref="paging" v-model="list" :auto="false" :default-page-size="10" bg-color="#F6F8FA"
+              safe-area-inset-bottom auto-show-system-loading @query="handleQuery">
         <template #top>
             <slot name="top"/>
             <ie-condition-dropdown ref="dropdown" x layout="flex items-center gap-20 w-max"/>
@@ -11,7 +11,7 @@
             <vip-guide-more v-if="isNotVip"/>
         </view>
         <template #bottom>
-            <voluntary-bottom @modify="$refs.modifyPopup.open()" @cart="$refs.cartPopup.open()"/>
+            <voluntary-bottom @modify="$refs.modifyPopup.open()" @cart="openCartPopup"/>
         </template>
     </z-paging>
     <!--  这里渲染的弹窗不会被back-to-top遮挡  -->
@@ -87,6 +87,10 @@ const openMajorPopup = (item) => {
     }
 }
 
+const openCartPopup = () => {
+    cartPopup.value?.open()
+}
+
 const loadMajorDetails = (item) => {
     uni.$ie.showLoading()
     getVoluntaryMarjors({
@@ -217,7 +221,7 @@ watch(currentStep, async (step) => {
     }
 })
 
-defineExpose({checkPopupBlock, confirmSave})
+defineExpose({checkPopupBlock, confirmSave, openCartPopup})
 </script>
 
 <style scoped lang="scss">

+ 28 - 23
src/pagesOther/pages/vhs/list/list.vue

@@ -1,32 +1,37 @@
 <template>
-    <z-paging ref="paging" v-model="list" @query="handleQuery">
-        <template #top>
-            <mx-nav-bar title="我的志愿表"/>
-        </template>
-        <view class="p-30 fx-col gap-30">
-            <view v-for="item in list" class="bg-white mx-card p-30 fx-row fx-bet-cen" @click="goDetails(item)">
-                <view class="fx-col gap-10">
-                    <text class="font-bold text-main"> {{ item.name }}</text>
-                    <text class="text-tips text-sm">
-                        {{ `${item.score}分 ${item.batchName || ''} ${item.userSnapshot.examMajorName}` }}
-                    </text>
-                </view>
-                <view class="fx-row">
-                    <view class="w-80 h-80 fx-row fx-cen-cen" @click.stop="handleDelete(item)">
-                        <uv-icon name="trash" size="20"/>
+    <ie-page>
+        <z-paging ref="paging" v-model="list" bg-color="#F6F8FA" @query="handleQuery">
+            <template #top>
+                <ie-navbar title="我的志愿表"/>
+            </template>
+            <view class="p-30 flex flex-col gap-30">
+                <view v-for="item in list"
+                      class="bg-white p-30 flex justify-between items-center rounded-lg shadow-card"
+                      @click="goDetails(item)">
+                    <view class="flex flex-col gap-10">
+                        <text class="font-bold text-main"> {{ item.name }}</text>
+                        <text class="text-tips text-sm">
+                            {{ `${item.score}分 ${item.batchName || ''} ${item.userSnapshot.examMajorName}` }}
+                        </text>
+                    </view>
+                    <view class="flex">
+                        <view class="w-80 h-80 flex justify-center items-center" @click.stop="handleDelete(item)">
+                            <uv-icon name="trash" size="20"/>
+                        </view>
+                        <uv-icon name="arrow-right"></uv-icon>
                     </view>
-                    <uv-icon name="arrow-right"></uv-icon>
                 </view>
             </view>
-        </view>
-    </z-paging>
+        </z-paging>
+    </ie-page>
+
 </template>
 
 <script>
-import {delZytbRecord, selectZytbRecord} from '@/api/webApi/volunteer'
-import {useProvideTransfer} from "@/hooks/useTransfer";
 import {confirmAsync} from "@/utils/uni-helper";
-import {toast} from "@/uni_modules/uv-ui-tools/libs/function";
+import {routes} from "@/common/routes";
+import {useTransferPage} from "@/hooks/useTransferPage";
+import {delZytbRecord, selectZytbRecord} from "@/api/modules/vhs";
 
 export default {
     data() {
@@ -35,14 +40,14 @@ export default {
         }
     },
     setup() {
-        const {transferTo} = useProvideTransfer()
+        const {transferTo} = useTransferPage()
         return {
             transferTo
         }
     },
     methods: {
         goDetails(data) {
-            this.transferTo('/pages/voluntary/detail/detail', data, null, true)
+            this.transferTo(routes.VHSDetail, {bigData: data})
         },
         handleQuery(pageNum, pageSize) {
             selectZytbRecord({pageNum, pageSize}).then(res => {