diff --git a/src/pages-evaluation-sub/aiAutoFill/index.vue b/src/pages-evaluation-sub/aiAutoFill/index.vue
index 8a419a9..8e243b1 100644
--- a/src/pages-evaluation-sub/aiAutoFill/index.vue
+++ b/src/pages-evaluation-sub/aiAutoFill/index.vue
@@ -7,7 +7,7 @@
}
-
+
{{ userInfo.estimatedAchievement.expectedScore }}分{{
userInfo.estimatedAchievement.subjectGroup.split(',').join('/')
@@ -47,7 +47,9 @@
-
+
+
+
diff --git a/src/pages-sub/components/dragSort/DragSort.vue b/src/pages-sub/components/dragSort/DragSort.vue
new file mode 100644
index 0000000..672bca4
--- /dev/null
+++ b/src/pages-sub/components/dragSort/DragSort.vue
@@ -0,0 +1,754 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages-sub/components/dragSort/useSort.ts b/src/pages-sub/components/dragSort/useSort.ts
new file mode 100644
index 0000000..19a5bd9
--- /dev/null
+++ b/src/pages-sub/components/dragSort/useSort.ts
@@ -0,0 +1,3 @@
+export const deepCopy = (source: T): T => {
+ return JSON.parse(JSON.stringify(source))
+}
diff --git a/src/pages-sub/home/college/info.vue b/src/pages-sub/home/college/info.vue
index 3a351f5..723d11b 100644
--- a/src/pages-sub/home/college/info.vue
+++ b/src/pages-sub/home/college/info.vue
@@ -36,7 +36,7 @@
universityBaseInfo?.universityResult.level === 0 ? '本科' : '专科'
}}·{{ universityBaseInfo?.universityResult.nature }}
-
+
{{ universityBaseInfo?.universityResult.features.slice(0, 4).join('/ ') }}
diff --git a/src/pages-sub/home/wishesList/HeaderTip.vue b/src/pages-sub/home/wishesList/HeaderTip.vue
deleted file mode 100644
index 20c6a6b..0000000
--- a/src/pages-sub/home/wishesList/HeaderTip.vue
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- {{ userInfo.estimatedAchievement.expectedScore }}分
-
- {{ userInfo.estimatedAchievement.subjectGroup.split(',').join('/') }}
-
- {{ userInfo.batchName }}
-
-
- 重要提示
-
-
-
-
-
-
diff --git a/src/pages-sub/home/wishesList/ScrollListItem.vue b/src/pages-sub/home/wishesList/ScrollListItem.vue
deleted file mode 100644
index 7980b8c..0000000
--- a/src/pages-sub/home/wishesList/ScrollListItem.vue
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
- {{ calcTypeName(item.type).text }}
-
-
- {{
- Math.round(
- item.items.reduce((a, b) => a + Number(b.percentAge.replace('%', '')), 0) /
- item.items.length,
- )
- }}
- %
-
-
-
-
-
- {{ item.name }}
-
- {{ item.city }}·{{ item.educationCategory }}
-
-
-
- {{ item.features.slice(0, 3).join('/') }}/
-
- 排名{{ item.rank }}
-
-
- 代码{{ item.collegeCode }}
- {{ item.year }}计划{{ item.items.reduce((a, b) => a + b.planCount, 0) }}人
-
-
-
-
-
- 专业{{ item.items.length }}
-
-
- 已填 {{ collegeMajorCount }}
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
- {{ item.city }}·{{ item.educationCategory }}
-
-
-
-
-
- 已填
- {{ majorCount }}
- 个
-
-
-
-
-
-
-
-
-
- 取消
- 确认
-
-
-
-
-
-
-
-
diff --git a/src/pages-sub/home/wishesList/CollegeMajor.vue b/src/pages-sub/home/wishesList/components/CollegeMajor.vue
similarity index 74%
rename from src/pages-sub/home/wishesList/CollegeMajor.vue
rename to src/pages-sub/home/wishesList/components/CollegeMajor.vue
index 955ea51..e84e34f 100644
--- a/src/pages-sub/home/wishesList/CollegeMajor.vue
+++ b/src/pages-sub/home/wishesList/components/CollegeMajor.vue
@@ -1,6 +1,7 @@
@@ -23,7 +24,7 @@
代码{{ major.majorCode }}
- {{ item.year }}计划{{ major.planCount }}人
+ {{ college.year }}计划{{ major.planCount }}人
选科:{{ major.subjectClam }}
@@ -45,51 +46,40 @@
+
+
diff --git a/src/pages-sub/home/wishesList/components/ScrollListItem.vue b/src/pages-sub/home/wishesList/components/ScrollListItem.vue
new file mode 100644
index 0000000..5c753a1
--- /dev/null
+++ b/src/pages-sub/home/wishesList/components/ScrollListItem.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+ {{ calcTypeName(college.type).text }}
+
+
+ {{
+ Math.round(
+ college.items.reduce((a, b) => a + Number(b.percentAge.replace('%', '')), 0) /
+ college.items.length,
+ )
+ }}
+ %
+
+
+
+
+
+ {{ college.name }}
+
+ {{ college.city }}·{{ college.educationCategory }}
+
+
+
+ {{ college.features.slice(0, 3).join('/') }}/
+
+ 排名{{ college.rank }}
+
+
+ 代码{{ college.collegeCode }}
+
+ {{ college.year }}计划{{ college.items.reduce((a, b) => a + b.planCount, 0) }}人
+
+
+
+
+
+
+ 专业{{ college.items.length }}
+
+
+ 已填 {{ collegeMajorCount }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages-sub/home/wishesList/components/ScrollListItemAction.vue b/src/pages-sub/home/wishesList/components/ScrollListItemAction.vue
new file mode 100644
index 0000000..38b803c
--- /dev/null
+++ b/src/pages-sub/home/wishesList/components/ScrollListItemAction.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+ {{ college?.name }}
+
+ {{ college?.city }}·{{ college?.educationCategory }}
+
+
+
+
+
+ 已填
+ {{ majorCount }}
+ 个
+
+
+
+
+
+
+
+
+
+ 取消
+ 确认
+
+
+
+
+
+
+
+
diff --git a/src/pages-sub/home/wishesList/components/SortCollege.vue b/src/pages-sub/home/wishesList/components/SortCollege.vue
new file mode 100644
index 0000000..d1478d4
--- /dev/null
+++ b/src/pages-sub/home/wishesList/components/SortCollege.vue
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+ {{ collegeIndex }}
+
+
+
+ {{ calcTypeName(college.type).text }}
+
+
+ {{
+ Math.round(
+ college.vItems.reduce((a, b) => a + Number(b.percentAge.replace('%', '')), 0) /
+ college.vItems.length,
+ )
+ }}%
+
+
+
+
+
+ {{ college.name }}
+
+ {{ college.city }}·{{ college.educationCategory }}
+
+
+
+ {{ college.features.slice(0, 3).join('/') }}/
+
+ 排名{{ college.rank }}
+
+
+ 代码{{ college.collegeCode }}
+
+ {{ college.year }}计划{{ college.vItems.reduce((a, b) => a + b.planCount, 0) }}人
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ major.percentAge || '0%' }}
+
+
+
+
+
+ {{ major.major.replace(/(\r\n|\n|\r)/g, '') }}
+
+ {{ major.remark }}
+
+
+ 代码{{ major.majorCode }}
+ {{ college.year }}计划{{ major.planCount }}人
+
+
+ 选科:{{ major.subjectClam }}
+ 学费/学制:{{ major.fee }}/{{ major.academic }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages-sub/home/wishesList/phaseLine.ts b/src/pages-sub/home/wishesList/composable/phaseLine.ts
similarity index 100%
rename from src/pages-sub/home/wishesList/phaseLine.ts
rename to src/pages-sub/home/wishesList/composable/phaseLine.ts
diff --git a/src/pages-sub/home/wishesList/composable/useWishesList.ts b/src/pages-sub/home/wishesList/composable/useWishesList.ts
new file mode 100644
index 0000000..5bc3216
--- /dev/null
+++ b/src/pages-sub/home/wishesList/composable/useWishesList.ts
@@ -0,0 +1,86 @@
+import { getBatchBase } from '@/service/index/api'
+
+export const calcTypeName = (type: number) => {
+ const style = {
+ 2: {
+ text: '冲',
+ color: '#EB5241',
+ bgColor: 'rgba(235,82,65,0.15)',
+ roundedBgColor: '#E75859',
+ },
+ 1: {
+ text: '稳',
+ color: '#FA8E23',
+ bgColor: 'rgba(250,142,35,0.15)',
+ roundedBgColor: '#FF8800',
+ },
+ 0: {
+ text: '保',
+ color: '#15C496',
+ bgColor: 'rgba(21,196,150,0.15)',
+ roundedBgColor: '#34C724',
+ },
+ }[type] || { text: '保', color: '#15C496', bgColor: 'rgba(21,196,150,0.15)' }
+
+ return {
+ text: style.text,
+ style: {
+ color: style.color,
+ backgroundColor: style.bgColor,
+ },
+ roundedBgColor: style.roundedBgColor,
+ }
+}
+export const coverTypeModel = (tModel: Record, total: number) => {
+ const TYPE_LABELS = {
+ c: '冲',
+ w: '稳',
+ b: '保',
+ } as const
+
+ let _result = Object.entries(TYPE_LABELS).map(([key, label]) => ({
+ name: `${label}(${tModel[key]})`,
+ value: key === 'b' ? '0' : key === 'w' ? '1' : '2',
+ }))
+ _result.unshift({
+ name: `全部${total}`,
+ value: '-1',
+ })
+ return _result
+}
+
+export const countModel = (list: any[]) => {
+ const tModel = ref([
+ { type: 2, count: 0 },
+ { type: 1, count: 0 },
+ { type: 0, count: 0 },
+ ])
+
+ list.forEach((item) => {
+ item.vItems.forEach((vItem) => {
+ const target = tModel.value.find((t) => t.type === vItem.type)
+ if (target) target.count++
+ })
+ })
+
+ return { tModel }
+}
+
+export const useScore = (provinceCode, batchName) => {
+ const score = ref(0)
+ const minScore = ref(0)
+ const maxScore = ref(0)
+ getBatchBase({ locationCode: provinceCode }).then((resp) => {
+ if (resp.code === 200) {
+ const _result = resp.result as { batches: any[]; maxScore: number; minScore: number }
+ if (_result.batches.length > 0) {
+ const _score = _result.batches.find((item) => item.batch === batchName)?.score || 0
+ score.value = _score
+ }
+
+ minScore.value = _result.minScore
+ maxScore.value = _result.maxScore
+ }
+ })
+ return { score, minScore, maxScore }
+}
diff --git a/src/pages-sub/home/wishesList/index.vue b/src/pages-sub/home/wishesList/index.vue
index ab314bc..218e207 100644
--- a/src/pages-sub/home/wishesList/index.vue
+++ b/src/pages-sub/home/wishesList/index.vue
@@ -69,7 +69,12 @@
v-for="(item, index) in schoolList"
@click="itemClick(item, index)"
>
-
+
@@ -109,6 +114,12 @@
+
+
diff --git a/src/pages-sub/home/wishesList/useWisheList.ts b/src/pages-sub/home/wishesList/useWisheList.ts
deleted file mode 100644
index 19088b4..0000000
--- a/src/pages-sub/home/wishesList/useWisheList.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-export const calcTypeName = (type: number) => {
- const style = {
- 2: {
- text: '冲',
- color: '#EB5241',
- bgColor: 'rgba(235,82,65,0.15)',
- },
- 1: {
- text: '稳',
- color: '#FA8E23',
- bgColor: 'rgba(250,142,35,0.15)',
- },
- 0: {
- text: '保',
- color: '#15C496',
- bgColor: 'rgba(21,196,150,0.15)',
- },
- }[type] || { text: '保', color: '#15C496', bgColor: 'rgba(21,196,150,0.15)' }
-
- return {
- text: style.text,
- style: {
- color: style.color,
- backgroundColor: style.bgColor,
- },
- }
-}
-export const coverTypeModel = (tModel: Record, total: number) => {
- const TYPE_LABELS = {
- c: '冲',
- w: '稳',
- b: '保',
- } as const
-
- let _result = Object.entries(TYPE_LABELS).map(([key, label]) => ({
- name: `${label}(${tModel[key]})`,
- value: key === 'b' ? '0' : key === 'w' ? '1' : '2',
- }))
- _result.unshift({
- name: `全部${total}`,
- value: '-1',
- })
- return _result
-}
diff --git a/src/pages-sub/home/wishesList/wishesList.vue b/src/pages-sub/home/wishesList/wishesList.vue
index 261cfc8..3def87e 100644
--- a/src/pages-sub/home/wishesList/wishesList.vue
+++ b/src/pages-sub/home/wishesList/wishesList.vue
@@ -1,11 +1,58 @@
+
+{
+ style: {
+ navigationBarTitleText: '当前志愿表',
+ },
+}
+
+
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/pages.json b/src/pages.json
index 3a359b3..fc392a9 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -239,18 +239,6 @@
"navigationStyle": "custom"
}
},
- {
- "path": "home/wishesList/CollegeMajor",
- "type": "page"
- },
- {
- "path": "home/wishesList/DataTable",
- "type": "page"
- },
- {
- "path": "home/wishesList/HeaderTip",
- "type": "page"
- },
{
"path": "home/wishesList/index",
"type": "page",
@@ -258,13 +246,12 @@
"navigationBarTitleText": "我的志愿表"
}
},
- {
- "path": "home/wishesList/ScrollListItem",
- "type": "page"
- },
{
"path": "home/wishesList/wishesList",
- "type": "page"
+ "type": "page",
+ "style": {
+ "navigationBarTitleText": "当前志愿表"
+ }
}
]
},
diff --git a/src/store/user.ts b/src/store/user.ts
index f4a0bd1..f21efaf 100644
--- a/src/store/user.ts
+++ b/src/store/user.ts
@@ -118,9 +118,9 @@ export const useUserStore = defineStore(
userInfo.value.batchName = val
}
- const setWishListMajor = ({ val, unId }: { val: any; unId: string }) => {
+ const setWishListMajor = ({ val, uId }: { val: any; uId: string }) => {
try {
- const targetItem = userInfo.value.wishList.find((item) => item.unId === unId)
+ const targetItem = userInfo.value.wishList.find((item) => item.uId === uId)
if (!targetItem) {
console.error('未找到对应的志愿清单项')
return
@@ -129,7 +129,7 @@ export const useUserStore = defineStore(
userInfo.value = {
...userInfo.value,
wishList: userInfo.value.wishList.map((item) => {
- if (item.unId === unId) {
+ if (item.uId === uId) {
return {
...item,
vItems: [...item.vItems, { ...val, sort: item.vItems.length + 1 }],
@@ -143,10 +143,10 @@ export const useUserStore = defineStore(
}
}
- const deleteWishListMajor = ({ unId, _pId }: { unId: string; _pId: string }) => {
+ const deleteWishListMajor = ({ uId, planId }: { uId: string; planId: string }) => {
userInfo.value.wishList = userInfo.value.wishList.map((item) => {
- if (item.unId === unId) {
- item.vItems = item.vItems.filter((vItem) => vItem._pId !== _pId)
+ if (item.uId === uId) {
+ item.vItems = item.vItems.filter((vItem) => vItem.planId !== planId)
return item
}
return item
diff --git a/src/types/uni-pages.d.ts b/src/types/uni-pages.d.ts
index faa0af3..b5763b3 100644
--- a/src/types/uni-pages.d.ts
+++ b/src/types/uni-pages.d.ts
@@ -27,11 +27,7 @@ interface NavigateToOptions {
"/pages-sub/home/news/index" |
"/pages-sub/home/news/newsList" |
"/pages-sub/home/schoolRank/index" |
- "/pages-sub/home/wishesList/CollegeMajor" |
- "/pages-sub/home/wishesList/DataTable" |
- "/pages-sub/home/wishesList/HeaderTip" |
"/pages-sub/home/wishesList/index" |
- "/pages-sub/home/wishesList/ScrollListItem" |
"/pages-sub/home/wishesList/wishesList" |
"/login-sub/index" |
"/pages-evaluation-sub/index" |