bzkf3 2 years ago
parent
commit
9e1a357ed8
5 changed files with 46 additions and 2 deletions
  1. 4 0
      auto-imports.d.ts
  2. 30 0
      components.d.ts
  3. 3 0
      public/config.js
  4. 2 1
      shims.d.ts
  5. 7 1
      src/pages/step/[id].vue

+ 4 - 0
auto-imports.d.ts

@@ -12,6 +12,8 @@ declare global {
   const $shallowRef: typeof import('vue/macros')['$shallowRef']
   const $toRef: typeof import('vue/macros')['$toRef']
   const EffectScope: typeof import('vue')['EffectScope']
+  const ElMessage: typeof import('element-plus/es')['ElMessage']
+  const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
   const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
   const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
   const computed: typeof import('vue')['computed']
@@ -298,6 +300,8 @@ declare module 'vue' {
     readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
     readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
     readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
+    readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
+    readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
     readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
     readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
     readonly computed: UnwrapRef<typeof import('vue')['computed']>

+ 30 - 0
components.d.ts

@@ -9,13 +9,43 @@ export {}
 
 declare module '@vue/runtime-core' {
   export interface GlobalComponents {
+    Bjqk: typeof import('./src/components/step/link/bjqk.vue')['default']
     BreadCrumb: typeof import('./src/components/BreadCrumb/index.vue')['default']
     CommonFooter: typeof import('./src/components/commonFooter/index.vue')['default']
+    ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
+    ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
+    ElButton: typeof import('element-plus/es')['ElButton']
+    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
+    ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
+    ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
+    ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
+    ElDialog: typeof import('element-plus/es')['ElDialog']
+    ElForm: typeof import('element-plus/es')['ElForm']
+    ElFormItem: typeof import('element-plus/es')['ElFormItem']
+    ElIcon: typeof import('element-plus/es')['ElIcon']
+    ElInput: typeof import('element-plus/es')['ElInput']
+    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
+    ElLink: typeof import('element-plus/es')['ElLink']
+    ElOption: typeof import('element-plus/es')['ElOption']
+    ElPagination: typeof import('element-plus/es')['ElPagination']
+    ElRadio: typeof import('element-plus/es')['ElRadio']
+    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
+    ElSelect: typeof import('element-plus/es')['ElSelect']
+    ElStep: typeof import('element-plus/es')['ElStep']
+    ElSteps: typeof import('element-plus/es')['ElSteps']
+    ElTable: typeof import('element-plus/es')['ElTable']
+    ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
+    'I:mdi:horizontalLine': typeof import('~icons/mdi/horizontal-line')['default']
+    'I:mdi:tick': typeof import('~icons/mdi/tick')['default']
     LeftSider: typeof import('./src/components/leftSider/index.vue')['default']
     LeftSiderStu: typeof import('./src/components/leftSiderStu/index.vue')['default']
     NavHeader: typeof import('./src/components/NavHeader/index.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']
     StatisticsSchool: typeof import('./src/components/statisticsSchool/index.vue')['default']
+    Szcjckqx: typeof import('./src/components/step/link/szcjckqx.vue')['default']
+    TheCard: typeof import('./src/components/TheCard.vue')['default']
+    TinymceVue: typeof import('./src/components/TinymceVue/index.vue')['default']
+    Xgstda: typeof import('./src/components/step/link/xgstda.vue')['default']
   }
 }

+ 3 - 0
public/config.js

@@ -8,6 +8,7 @@ const local = {
   api:'https://openapi.dev.bozedu.net/',
   uc: 'https://uc.dev.bozedu.net/',
   origin: window.location.origin,
+  base:'/'
 }
 
 // 测试服环境
@@ -18,6 +19,7 @@ const development = {
   yzy: 'https://yzy.dev.bozedu.net/',
   api:'https://openapi.dev.bozedu.net/',
   uc: 'https://uc.dev.bozedu.net/',
+  base:'/webapps/page/liankao'
 }
 
 // // 正式服环境
@@ -28,6 +30,7 @@ const production = {
   yzy: 'https://yzy.bozedu.net/',
   api:'https://openapi.bozedu.net/',
   uc: 'https://uc.bozedu.net/',
+  base:'/webapps/page/liankao'
 }
 
 function isWhich() {

+ 2 - 1
shims.d.ts

@@ -9,7 +9,7 @@ declare class LeaderLine {
 
   }
 
-  position() {}
+  position() { }
   _id: number
 
   static captionLabel: any
@@ -21,6 +21,7 @@ declare interface Window {
   GLOBAL_CONFIG: {
     yzy: string
     uc: string
+    base: string
   }
   // handleCompleteTask: (gid: number, pid: number, idy: number) => void
   // handleAutoCompleteTask: () => void

+ 7 - 1
src/pages/step/[id].vue

@@ -457,6 +457,12 @@ const TaskEventMap: { [key: string]: () => void } = {
       handleJumpTask(gid, pid, cid)
     })
   },
+  预划考号区域: () => {
+    windowPushState(`${window.GLOBAL_CONFIG.base}/dtk/index.html`)
+  },
+  制作答题卡: () => {
+    windowPushState(`${window.GLOBAL_CONFIG.base}/dtk/index.html`)
+  },
 }
 </script>
 
@@ -508,7 +514,7 @@ const TaskEventMap: { [key: string]: () => void } = {
                   <template v-if="task.title === '预划考号区域'">
                     <div
                       class="min-w-60px cursor-pointer rounded bg-light-50 py-3px text-center text-xs"
-                      @click="beforeClickTask(currentStep, idx, idy) && windowPushState('/dtk/index.html')"
+                      @click="beforeClickTask(currentStep, idx, idy) && TaskEventMap[task.title]()"
                     >
                       {{ judgeStepCompleted(stepsReactiveMap[currentStep][idx][idy]) ? '已经完成' : '立即开始' }}
                     </div>