소스 검색

提交代码

Lijy 4 달 전
부모
커밋
111bc78dbe

+ 32 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/components/common/formForm/formItem.vue

@@ -113,6 +113,33 @@
       } resetStyles-right`"
     />
   </template>
+  <template v-if="element.type === 'radio'">
+    <van-field
+      type="textarea"
+      :label="element.label"
+      :name="element.model"
+      :rows="element.rows"
+      :show-word-limit="element.options?.showWordLimit"
+      :maxlength="element.options?.maxlength"
+      :placeholder="element.options?.placeholder"
+      :clearable="element.options?.clearable"
+      :disabled="element.options?.disabled"
+      :readonly="true"
+      :required="element.options?.rules?.required"
+      :rules="[{ validator: characterVerification, message: '' }]"
+      :class="`${
+        element.options?.rules?.required ? '' : 'resetStyles'
+      } resetStyles-right radios`"
+    >
+      <template #input>
+        <van-radio-group v-model="element.options.defaultValue" direction="horizontal">
+          <van-radio :name="item.value" v-for="(item, index) in (element.options?.options || [])" :key="index">
+            <template v-if="item.label">{{ item.label }}</template>
+          </van-radio>
+        </van-radio-group>
+      </template>
+    </van-field>
+  </template>
 
   <!-- 日期选择器 -->
   <van-popup
@@ -279,4 +306,9 @@ onMounted(() => {
 //     margin-right: 20px;
 //   }
 // }
+.radios {
+  :deep(.van-field__control--min-height) {
+    min-height: auto;
+  }
+}
 </style>

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/hooks/useApi.js

@@ -86,7 +86,7 @@ export const TOP_DATA_OF_CLUE_LIST = `/clue/pageClueByPin` // 线索列表顶置
 
 export const TASK_TOP = `/tasks/pinTasks` // 任务顶置
 export const TASK_CANCELLATION_TOP = `/tasks/undoPin` // 取消顶置
-export const TASK_LIST_TOP_DATA = `/tasks/pagetasksByPin` // 任务列表顶置数据
+export const TASK_LIST_TOP_DATA = `/tasks/pageTasksByPin` // 任务列表顶置数据
 
 export const TOP_MOUNTED_PRODUCT = `/product/pinProduct` // 产品顶置
 export const CANCEL_THE_TOP_PLACEMENT_OF_THE_PRODUCT = `/product/undoPin` // 取消顶置

+ 3 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/moduleList/moduleList.vue

@@ -257,6 +257,9 @@ function noTopMounted(row) {
 }
 
 function toDetail(item) {
+  if(queryParameters.value?.key == 'tasks') {
+    return
+  }
   router.navigateTo({
     pathName: 'details',
     success: () => {

+ 18 - 5
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/home/component/workbench.vue

@@ -182,6 +182,7 @@ const planCalendarList = ref([])
 const showCommonForms = ref(false)
 const commonExpressionsHaveBeenAdded = ref([])
 const commonExpressionsHaveBeenNodded = ref([])
+const areYouRequesting = ref(false)
 
 function toContactDetails(item) {
   router.navigateTo({
@@ -320,15 +321,27 @@ function getPlanCalendarList() {
   })
 }
 
+function getAllData() {
+  if (areYouRequesting.value) {
+    return
+  }
+  areYouRequesting.value = true
+  Promise.all([
+    getVisitorPlan(),
+    getCommonlyUsedModules(),
+    getFrequentlyUsedContacts(),
+    getPlanCalendarList()
+  ]).finally(() => {
+    areYouRequesting.value = false
+  })
+}
+
 useLifecycle({
   load: () => {
-    // 添加加载逻辑
-    getVisitorPlan()
-    getCommonlyUsedModules()
-    getFrequentlyUsedContacts()
-    getPlanCalendarList()
+    getAllData()
   },
   init: () => {
+    getAllData()
     setTimeout(() => {
       if (expandAndCollapse.value) {
         calendarHeight.value = calendarRef.value.$el.offsetHeight

+ 2 - 6
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/home/index.vue

@@ -21,12 +21,8 @@
         </div>
         <!-- 内容 -->
         <div class="flex-1 overflow-y-auto relative aopiuyt">
-          <template v-if="homepageType == 'workbench'">
-            <Workbench />
-          </template>
-          <template v-if="homepageType == 'dataAnalysis'">
-            <DataAnalysis />
-          </template>
+            <Workbench v-if="homepageType == 'workbench'" />
+            <DataAnalysis v-if="homepageType == 'dataAnalysis'" />
         </div>
       </div>