فهرست منبع

完成首页 任务类型跳转

yuanmingze 5 ماه پیش
والد
کامیت
7676ad8ef6

+ 177 - 0
src/pages-task/task-entry-page/index.vue

@@ -0,0 +1,177 @@
+<template>
+  <view class="task-entry">
+    <view
+      v-for="item in visibleTaskConfig"
+      :key="item.id"
+      class="task-entry__item"
+      :style="{ background: item.backgroundColor }"
+    >
+      <image class="task-entry__image" :src="item.img" mode="aspectFit" />
+
+      <view class="task-entry__info" :style="{ color: item.color }">
+        <view class="task-entry__title">
+          {{ item.title }}
+        </view>
+        <view class="task-entry__desc">
+          {{ item.desc }}
+        </view>
+      </view>
+
+      <view class="task-entry__action">
+        <wd-icon name="arrow-right" :color="item.color" size="48rpx" />
+      </view>
+    </view>
+
+    <view v-if="!visibleTaskConfig.length" class="task-entry__empty"> 暂无任务 </view>
+  </view>
+</template>
+
+<script setup lang="ts">
+import { computed, ref } from 'vue'
+
+import { onLoad } from '@dcloudio/uni-app'
+
+import { getListTaskTypeIdsApi } from '@/services/modules/task/taskEntry'
+
+import { useUserStore } from '@/stores/modules/user'
+
+import { taskConfig } from './taskList/task.config'
+
+type TaskItem = {
+  id: string
+  title: string
+  desc: string
+  img: string
+  color: string
+  backgroundColor: string
+}
+
+type TaskConfigMap = Record<string, TaskItem[]>
+
+type PageLoadOptions = {
+  taskTitle?: string
+  taskType?: string
+}
+
+const userStore = useUserStore()
+const typedTaskConfig = taskConfig as TaskConfigMap
+
+const taskType = ref('')
+const taskTypeList = ref<string[]>([])
+
+const currentTaskConfig = computed<TaskItem[]>(() => {
+  return typedTaskConfig[taskType.value] ?? []
+})
+
+const visibleTaskConfig = computed<TaskItem[]>(() => {
+  if (!taskTypeList.value.length) {
+    return []
+  }
+
+  return currentTaskConfig.value.filter((item) => {
+    return taskTypeList.value.includes(item.id)
+  })
+})
+
+const setNavigationTitle = (title?: string) => {
+  if (!title) return
+
+  uni.setNavigationBarTitle({
+    title,
+  })
+}
+
+const initTaskType = (type?: string) => {
+  if (!type) return
+
+  taskType.value = type
+
+  if (!typedTaskConfig[type]) {
+    console.warn('No task config found for type:', type)
+  }
+}
+
+const getListTaskTypeIds = async () => {
+  const deptId = userStore.currentUserInfo?.deptId
+  if (!deptId) {
+    taskTypeList.value = []
+    return
+  }
+
+  try {
+    const res = await getListTaskTypeIdsApi(deptId)
+
+    if (res.code === 0 && Array.isArray(res.data)) {
+      taskTypeList.value = res.data
+      return
+    }
+
+    taskTypeList.value = []
+  } catch (error) {
+    taskTypeList.value = []
+  }
+}
+
+onLoad(async (options: PageLoadOptions = {}) => {
+  setNavigationTitle(options.taskTitle)
+  initTaskType(options.taskType)
+  await getListTaskTypeIds()
+})
+</script>
+
+<style scoped lang="scss">
+.task-entry {
+  padding: 30rpx;
+
+  .task-entry__item {
+    display: flex;
+    align-items: center;
+    min-height: 180rpx;
+    margin-bottom: 24rpx;
+    padding: 10rpx 24rpx;
+    border-radius: 16rpx;
+    box-sizing: border-box;
+
+    .task-entry__image {
+      width: 160rpx;
+      height: 160rpx;
+      flex-shrink: 0;
+    }
+
+    .task-entry__info {
+      margin-left: 24rpx;
+
+      .task-entry__title {
+        margin-bottom: 10rpx;
+        font-size: 36rpx;
+        font-weight: 600;
+        line-height: 1.4;
+      }
+
+      .task-entry__desc {
+        font-size: 22rpx;
+        line-height: 1.4;
+      }
+    }
+
+    .task-entry__action {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      width: 56rpx;
+      height: 56rpx;
+      margin-left: auto;
+      border-radius: 50%;
+      background: rgba(255, 255, 255, 0.3);
+      flex-shrink: 0;
+    }
+  }
+
+  .task-entry__empty {
+    margin-top: 40rpx;
+    text-align: center;
+    font-size: 26rpx;
+    color: #999;
+  }
+}
+</style>

+ 297 - 0
src/pages-task/task-entry-page/taskList/task.config.ts

@@ -0,0 +1,297 @@
+export const taskConfig = {
+  // 市场信息收集
+  market_research: [
+    {
+      title: '政策调查',
+      desc: '市场调研-政策调查',
+      id: '12',
+      color: '#30546E',
+      backgroundColor: 'linear-gradient(270.93deg, #D6EDFD 0.8%, #F1F9FF 100%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/zxdc.png',
+    },
+    {
+      title: '药店调查',
+      desc: '市场调研-药店调查',
+      id: '18',
+      color: '#427C89',
+      backgroundColor: 'linear-gradient(94.41deg, #F0FCFF -14.28%, #DBF3F8 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/yddc.png',
+    },
+    {
+      title: '竞品调查',
+      desc: '市场调研-竞品调查',
+      id: '13',
+      color: '#685B32',
+      backgroundColor: 'linear-gradient(273.25deg, #FFF5D1 9.9%, #FFFAE6 99.41%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/jpdc.png',
+    },
+    {
+      title: '库存调查',
+      desc: '市场调研-库存调查',
+      id: '14',
+      color: '#8E3F3B',
+      backgroundColor: 'linear-gradient(94.41deg, #FFFCFC -14.28%, #F4E1E0 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/kcdc.png',
+    },
+    {
+      title: '医院信息收集',
+      desc: '市场调研-医院调查',
+      id: '15',
+      color: '#30546E',
+      backgroundColor: 'linear-gradient(270.93deg, #D6EDFD 0.8%, #F1F9FF 100%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/yyxxsj.png',
+    },
+    {
+      title: '物流信息收集',
+      desc: '市场调研-物流信息调查',
+      id: '45',
+      color: '#427C89',
+      backgroundColor: 'linear-gradient(94.41deg, #F0FCFF -14.28%, #DBF3F8 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/wlxxsj.png',
+    },
+    {
+      title: '商业公司信息收集',
+      desc: '市场调研-商业公司信息调查',
+      id: '16',
+      color: '#685B32',
+      backgroundColor: 'linear-gradient(273.25deg, #FFF5D1 9.9%, #FFFAE6 99.41%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/sygs.png',
+    },
+    {
+      title: '治疗领域相关信息收集',
+      desc: '治疗领域相关信息收集',
+      id: '54',
+      color: '#8E3F3B',
+      backgroundColor: 'linear-gradient(94.41deg, #FFFCFC -14.28%, #F4E1E0 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/zlly.png',
+    },
+    {
+      title: '问卷调研',
+      desc: '问卷调研',
+      id: '801',
+      color: '#30546E',
+      backgroundColor: 'linear-gradient(270.93deg, #D6EDFD 0.8%, #F1F9FF 100%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/quiz.jpg',
+    },
+    {
+      title: '商业渠道拓展',
+      desc: '商业渠道拓展',
+      id: '74',
+      color: '#427C89',
+      backgroundColor: 'linear-gradient(94.41deg, #F0FCFF -14.28%, #DBF3F8 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/syqdtz.png',
+    },
+    {
+      title: '产品调研',
+      desc: '产品调研',
+      id: '75',
+      color: '#685B32',
+      backgroundColor: 'linear-gradient(273.25deg, #FFF5D1 9.9%, #FFFAE6 99.41%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/cpdy.png',
+    },
+    {
+      title: '不良反应收集',
+      desc: '不良反应收集',
+      id: '76',
+      color: '#8E3F3B',
+      backgroundColor: 'linear-gradient(94.41deg, #FFFCFC -14.28%, #F4E1E0 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/blfysj.png',
+    },
+    {
+      title: '第三终端信息收集',
+      desc: '第三终端信息收集',
+      id: '78',
+      color: '#30546E',
+      backgroundColor: 'linear-gradient(270.93deg, #D6EDFD 0.8%, #F1F9FF 100%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/zxdc.png',
+    },
+    {
+      title: '患教海报张贴',
+      desc: '患教海报张贴',
+      id: '80',
+      color: '#427C89',
+      backgroundColor: 'linear-gradient(94.41deg, #F0FCFF -14.28%, #DBF3F8 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/yddc.png',
+    },
+    {
+      title: '产品反馈采集',
+      desc: '产品反馈采集',
+      id: '81',
+      color: '#30546E',
+      backgroundColor: 'linear-gradient(270.93deg, #D6EDFD 0.8%, #F1F9FF 100%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/yyxxsj.png',
+    },
+  ],
+  // 商业公司客户管理
+  business_customer_manage: [
+    {
+      title: '库存调查',
+      desc: '市场调研-库存调查',
+      id: '14',
+      color: '#8E3F3B',
+      backgroundColor: 'linear-gradient(94.41deg, #FFFCFC -14.28%, #F4E1E0 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/kcdc.png',
+    },
+    {
+      title: '物流信息收集',
+      desc: '物流信息收集',
+      id: '45',
+      color: '#30546E',
+      backgroundColor: 'linear-gradient(270.93deg, #D6EDFD 0.8%, #F1F9FF 100%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/wlxxsj.png',
+    },
+    {
+      title: '合同/订单管理',
+      desc: '合同/订单管理',
+      id: '55',
+      color: '#427C89',
+      backgroundColor: 'linear-gradient(94.41deg, #F0FCFF -14.28%, #DBF3F8 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/htgl.png',
+    },
+    {
+      title: '信用管理',
+      desc: '信用管理',
+      id: '51',
+      color: '#685B32',
+      backgroundColor: 'linear-gradient(273.25deg, #FFF5D1 9.9%, #FFFAE6 99.41%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/xygl.png',
+    },
+    {
+      title: '首营管理',
+      desc: '首营管理',
+      id: '56',
+      color: '#8E3F3B',
+      backgroundColor: 'linear-gradient(94.41deg, #FFFCFC -14.28%, #F4E1E0 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/sygl.png',
+    },
+  ],
+  // 会议培训与专访
+  meeting_training: [
+    {
+      title: '会议举办',
+      desc: '信息采集-会议举办',
+      id: '1',
+      color: '#30546E',
+      backgroundColor: 'linear-gradient(270.93deg, #D6EDFD 0.8%, #F1F9FF 100%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/hyjb.png',
+    },
+    {
+      title: '一对一专访',
+      desc: '信息采集-一对一专访',
+      id: '19',
+      color: '#427C89',
+      backgroundColor: 'linear-gradient(94.41deg, #F0FCFF -14.28%, #DBF3F8 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/ydyzf.png',
+    },
+    {
+      title: '培训',
+      desc: '信息采集-培训',
+      id: '34',
+      color: '#685B32',
+      backgroundColor: 'linear-gradient(273.25deg, #FFF5D1 9.9%, #FFFAE6 99.41%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/px.png',
+    },
+  ],
+  // 专项服务
+  special_service: [
+    {
+      title: 'OTC推广',
+      desc: 'OTC推广',
+      id: '47',
+      color: '#8E3F3B',
+      backgroundColor: 'linear-gradient(94.41deg, #FFFCFC -14.28%, #F4E1E0 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/ydtg.png',
+    },
+    {
+      title: '调剂服务',
+      desc: '调剂服务',
+      id: '38',
+      color: '#30546E',
+      backgroundColor: 'linear-gradient(270.93deg, #D6EDFD 0.8%, #E7F4FE 100%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/tjfw.png',
+    },
+    {
+      title: '应收账款回款',
+      desc: '应收账款回款',
+      id: '39',
+      color: '#427C89',
+      backgroundColor: 'linear-gradient(94.41deg, #F7FFFC -14.28%, #D3EFE8 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/yszkhk.png',
+    },
+    {
+      title: '设备保养与维修',
+      desc: '设备保养与维修',
+      id: '46',
+      color: '#685B32',
+      backgroundColor: 'linear-gradient(273.25deg, #FFF5D1 9.9%, #FFFAE6 99.41%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/sbwxyby.png',
+    },
+    {
+      title: '手术跟台',
+      desc: '手术跟台',
+      id: '42',
+      color: '#8E3F3B',
+      backgroundColor: 'linear-gradient(94.41deg, #FFFCFC -14.28%, #F4E1E0 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/ssgt.png',
+    },
+    {
+      title: '医疗终端客户拜访',
+      desc: '医疗终端客户拜访',
+      id: '85',
+      color: '#30546E',
+      backgroundColor: 'linear-gradient(270.93deg, #D6EDFD 0.8%, #F1F9FF 100%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/zxdc.png',
+    },
+    {
+      title: '客户反馈总结',
+      desc: '客户反馈总结',
+      id: '86',
+      color: '#427C89',
+      backgroundColor: 'linear-gradient(94.41deg, #F0FCFF -14.28%, #DBF3F8 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/ydyzf.png',
+    },
+    {
+      title: '性能验证',
+      desc: '性能验证',
+      id: '87',
+      color: '#685B32',
+      backgroundColor: 'linear-gradient(273.25deg, #FFF5D1 9.9%, #FFFAE6 99.41%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/px.png',
+    },
+  ],
+  // 代理商客户管理
+  agent_customer_manage: [
+    {
+      title: '代理商拜访',
+      desc: '代理商拜访',
+      id: '58',
+      color: '#30546E',
+      backgroundColor: 'linear-gradient(270.93deg, #D6EDFD 0.8%, #F1F9FF 100%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/dlsbf.png',
+    },
+    {
+      title: '协访代理商拜访医院',
+      desc: '协访代理商拜访医院',
+      id: '59',
+      color: '#427C89',
+      backgroundColor: 'linear-gradient(94.41deg, #F0FCFF -14.28%, #DBF3F8 77.47%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/xfdlsbfyy.png',
+    },
+    {
+      title: '代理商培训',
+      desc: '代理商培训',
+      id: '60',
+      color: '#685B32',
+      backgroundColor: 'linear-gradient(273.25deg, #FFF5D1 9.9%, #FFFAE6 99.41%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/dlspx.png',
+    },
+    {
+      title: '业务沟通会',
+      desc: '业务沟通会',
+      id: '65',
+      color: '#8e3f3b',
+      backgroundColor: 'linear-gradient(273.25deg, #f4e1e0 9.9%, #fdf7f6 99.41%);',
+      img: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/jy/ywgtha.png',
+    },
+  ],
+}

+ 14 - 2
src/pages.json

@@ -22,7 +22,7 @@
       }
     },
     {
-      "path": "pages/minePage/index",
+      "path": "pages/mine-page/index",
       "style": {
         "navigationStyle": "custom"
       }
@@ -52,6 +52,18 @@
           }
         }
       ]
+    },
+    {
+      "root": "pages-task",
+      "pages": [
+        {
+          "path": "task-entry-page/index",
+          "style": {
+            "navigationBarTitleText": "任务录入",
+            "navigationStyle": "default"
+          }
+        }
+      ]
     }
   ],
   "globalStyle": {
@@ -79,7 +91,7 @@
         "text": "资讯"
       },
       {
-        "pagePath": "pages/minePage/index",
+        "pagePath": "pages/mine-page/index",
         "iconPath": "static/images/tabbar/mine.png",
         "selectedIconPath": "static/images/tabbar/mineAct.png",
         "text": "我的"

+ 25 - 22
src/pages/index/components/WorkbenchTaskSection.vue

@@ -4,21 +4,21 @@
       <view class="workbench-task-section-title">任务实施</view>
       <view class="workbench-task-section-action">
         <wd-icon name="photo" color="#fff" size="40rpx"></wd-icon>
-        <text>拍照留存</text>
+        <text class="workbench-task-section-action-text">拍照留存</text>
       </view>
     </view>
+
     <view class="workbench-task-list">
       <view
-        class="workbench-task-item"
         v-for="item in currentTaskList"
-        :key="item.backgroundImage"
-        @click="onSelectTask(item)"
+        :key="item.key"
+        class="workbench-task-item"
         :style="{
           backgroundImage: 'url(' + item.backgroundImage + ')',
           color: item.color,
         }"
-      >
-      </view>
+        @click="onSelectTask(item)"
+      />
     </view>
 
     <ImagePreviewOverlay
@@ -39,7 +39,7 @@ import { useUserStore } from '@/stores/modules/user'
 
 import { takePhoto } from '@/utils/image'
 
-import { DEFAULT_WORKBENCH_TASKS, INVESTMENT_MANAGER_TASKS } from '../taskList/index'
+import { DEFAULT_WORKBENCH_TASKS, INVESTMENT_MANAGER_TASKS } from '../workbench/workbench.config'
 import ImagePreviewOverlay from './ImagePreviewOverlay.vue'
 
 const emit = defineEmits<{
@@ -98,48 +98,51 @@ const onTakePhoto = async () => {
   }
 }
 </script>
-
 <style lang="scss" scoped>
 .workbench-task-section {
   padding: 0 30rpx;
   margin-top: 30rpx;
 
   .workbench-task-section-header {
-    height: 80rpx;
-    margin-bottom: 30rpx;
     display: flex;
-    justify-content: space-between;
     align-items: center;
+    justify-content: space-between;
+    height: 80rpx;
+    margin-bottom: 30rpx;
+
     .workbench-task-section-title {
+      color: var(--font-color-333);
       font-size: 36rpx;
       font-weight: 600;
-      color: var(--font-color-333);
     }
-    .workbench-task-section-action {
-      width: 185rpx;
-      height: 60rpx;
 
+    .workbench-task-section-action {
       display: flex;
       align-items: center;
       justify-content: space-between;
-      background-color: var(--main-color);
-      border-radius: 30rpx;
+      width: 185rpx;
+      height: 60rpx;
       padding: 10rpx 20rpx;
+      border-radius: 30rpx;
+      background-color: var(--main-color);
       font-size: 24rpx;
-      text {
-        color: #fff;
-      }
+    }
+
+    .workbench-task-section-action-text {
+      color: #fff;
     }
   }
+
   .workbench-task-list {
     display: flex;
-    justify-content: space-between;
     flex-flow: row wrap;
+    justify-content: space-between;
+
     .workbench-task-item {
       width: 328rpx;
       height: 224rpx;
-      background-size: 100% 100%;
       margin-bottom: 30rpx;
+      background-size: 100% 100%;
     }
   }
 }

+ 35 - 24
src/pages/index/index.vue

@@ -46,6 +46,7 @@ import { useUserStore } from '@/stores/modules/user'
 import HonestAgreementGate from './components/HonestAgreementGate.vue'
 import WorkbenchCard from './components/WorkbenchCard.vue'
 import WorkbenchTaskSection from './components/WorkbenchTaskSection.vue'
+import type { TASK_TYPE } from './workbench/workbench.config'
 
 const userStore = useUserStore()
 
@@ -121,9 +122,17 @@ const handleOpenStatus = (type: 'on-the-way' | 'wait-approve') => {
   console.log('type', type)
 }
 
-const handleSelectTask = (item: any) => {
+const handleSelectTask = (item: TASK_TYPE) => {
   if (!ensureCanOperate()) return
-  // 统一处理跳转 / 权限校验
+  if (item.key === 'customer_visit') {
+    return
+  } else if (item.key === 'info_forward') {
+    return
+  } else {
+    uni.navigateTo({
+      url: `/pages-task/task-entry-page/index?taskType=${item.key}&taskTitle=${item.title}`,
+    })
+  }
 }
 
 // 业务判断
@@ -203,29 +212,31 @@ const getPltQuizResult = async (): Promise<boolean> => {
 // 是否修改过密码
 const checkLastChangePassword = async () => {
   const userInfo = userStore.currentUserInfo
-  if (!userInfo) return
-  const latestChangePwdTime = userInfo.latestChangePwdTime
-  const now = Date.now()
-  const ninetyDaysAgo = now - 90 * 24 * 60 * 60 * 1000
-  const lastChangeTime = new Date(latestChangePwdTime).getTime()
+  if (!userInfo || !userInfo.latestChangePwdTime) return
 
-  if (lastChangeTime < ninetyDaysAgo) {
-    uni.showModal({
-      title: '提示',
-      content: '您的登录密码长时间未修改,为保障账号安全,建议您及时修改密码!',
-      confirmText: '去修改',
-      cancelText: '暂不修改',
-      success: async (res) => {
-        if (res.confirm) {
-          uni.navigateTo({
-            url: '/pages/reset-password/index',
-          })
-        } else if (res.cancel) {
-          resetPasswordApi(userInfo.userId)
-        }
-      },
-    })
-  }
+  const lastChangeTime = new Date(userInfo.latestChangePwdTime.replace(/-/g, '/')).getTime()
+
+  if (Number.isNaN(lastChangeTime)) return
+
+  const isExpired = Date.now() - lastChangeTime >= 90 * 24 * 60 * 60 * 1000
+
+  if (!isExpired) return
+
+  uni.showModal({
+    title: '提示',
+    content: '您的登录密码长时间未修改,为保障账号安全,建议您及时修改密码!',
+    confirmText: '去修改',
+    cancelText: '暂不修改',
+    success: async ({ confirm, cancel }) => {
+      if (confirm) {
+        uni.navigateTo({
+          url: '/pages/reset-password/index',
+        })
+      } else if (cancel) {
+        resetPasswordApi(userInfo.userId)
+      }
+    },
+  })
 }
 </script>
 

+ 14 - 27
src/pages/index/taskList/index.ts → src/pages/index/workbench/workbench.config.ts

@@ -1,59 +1,46 @@
-export const DEFAULT_WORKBENCH_TASKS = [
+export type TASK_TYPE = {
+  key: string
+  title: string
+  backgroundImage: string
+}
+
+export const DEFAULT_WORKBENCH_TASKS: TASK_TYPE[] = [
   {
-    id: 64,
-    value: 2,
-    typedIds: [5],
+    key: 'customer_visit',
     title: '客户拜访',
     backgroundImage: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/khbf.svg',
-    url: '/pages/task/customer-call/index',
   },
   {
-    id: 65,
-    value: 3,
-    typedIds: [12, 13, 14, 15, 16, 17, 18, 45, 54, 801],
+    key: 'market_research',
     title: '市场信息收集',
     backgroundImage: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/scxxsj.svg',
-    url: '/pages/task/market-research/index',
   },
   {
-    id: 67,
-    value: 5,
-    typedIds: [45, 51, 52, 53, 55, 56],
+    key: 'business_customer_manage',
     title: '商业公司客户管理',
     backgroundImage: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/sygskhgl.svg',
-    url: '/pages/task/customer-manage/index',
   },
   {
-    id: 66,
-    value: 4,
+    key: 'info_forward',
     title: '信息转发',
     backgroundImage: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/xxzf.svg',
   },
   {
-    id: 63,
-    value: 1,
-    typedIds: [1, 9, 34],
+    key: 'meeting_training',
     title: '会议培训与专访',
     backgroundImage: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/hypxyzf.svg',
-    url: '/pages/task/conference-organizers/index',
   },
   {
-    id: 71,
-    value: 7,
-    typedIds: [47, 38, 39, 46, 42],
+    key: 'special_service',
     title: '专项服务',
     backgroundImage: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/zxfw.svg',
-    url: '/pages/task/cso-task/index',
   },
 ]
 
 export const INVESTMENT_MANAGER_TASKS = [
   {
-    id: 72,
-    value: 8,
-    typedIds: [58, 59, 60],
+    key: 'agent_customer_manage',
     title: '代理商客户管理',
     backgroundImage: 'https://yy-cloud-oss.oss-cn-beijing.aliyuncs.com/img/dlskhgl.svg',
-    url: '/pages/task/agent-customer-manage/index',
   },
 ]

+ 0 - 0
src/pages/minePage/index.vue → src/pages/mine-page/index.vue


+ 0 - 0
src/pages/minePage/mine.config.ts.ts → src/pages/mine-page/mine.config.ts


+ 9 - 0
src/services/modules/task/taskEntry/index.ts

@@ -0,0 +1,9 @@
+import http from '../../../index'
+import type { getListTaskTypeIdsResponse } from './type'
+
+// 获取当前企业配置的任务类型
+export const getListTaskTypeIdsApi = (deptId: string) => {
+  return http.get<getListTaskTypeIdsResponse>(
+    `/admin/task/submission/rule/list-task-type-ids?deptId=${deptId}`
+  )
+}

+ 3 - 0
src/services/modules/task/taskEntry/type.d.ts

@@ -0,0 +1,3 @@
+export type getListTaskTypeIdsResponse = {
+  data: string[]
+}