Просмотр исходного кода

feat:checkgroup v-modal修改

ljc 1 месяц назад
Родитель
Сommit
0fb311d8ee

+ 2 - 2
components/IbInfo.vue

@@ -174,9 +174,9 @@
       <template #agree>
       <template #agree>
         <view v-if="ibStatus.status == 0">
         <view v-if="ibStatus.status == 0">
           <view class="agree" >
           <view class="agree" >
-            <checkbox-group v-model="ibAgree" @change="onAgreeChange">
+            <checkbox-group :value="ibAgree" @change="onAgreeChange">
               <label class="checkbox">
               <label class="checkbox">
-                <checkbox value="1" />
+                <checkbox value="1" :checked="!!ibAgree"/>
                 <text class="crm-cursor" style="text-decoration: underline;">{{
                 <text class="crm-cursor" style="text-decoration: underline;">{{
                     t('Home.msg.Agree1') }}</text>
                     t('Home.msg.Agree1') }}</text>
               </label>
               </label>

+ 2 - 1
components/cwg-sidebar.vue

@@ -44,7 +44,8 @@ const userStore = useUserStore()
 const { userInfo } = storeToRefs(userStore)
 const { userInfo } = storeToRefs(userStore)
 // ib按钮展示
 // ib按钮展示
 const ibStatus = computed(() => {
 const ibStatus = computed(() => {
-  return userInfo.value?.customInfo?.ibInvalid == 0 && !!userInfo.value?.ibInfo
+  const info: any = userInfo.value
+  return !!info && !!info.customInfo && info.customInfo.ibInvalid == 0 && !!info.ibInfo
 })
 })
 </script>
 </script>
 
 

+ 6 - 6
pages/ib/components/documentaryDialog.vue

@@ -19,9 +19,9 @@
           ]" />
           ]" />
         </uni-forms-item>
         </uni-forms-item>
         <uni-forms-item class="agree">
         <uni-forms-item class="agree">
-          <checkbox-group v-model="formData.agree" @change="onAgreeChange">
+          <checkbox-group :value="formData.agree ? ['1'] : []" @change="onAgreeChange">
             <label class="checkbox">
             <label class="checkbox">
-              <checkbox value="1" />
+              <checkbox value="1" :checked="!!formData.agree" />
               <view style="display: inline">
               <view style="display: inline">
                 <text class="crm-cursor">{{ t('Documentary.AgentBackground.item3') }}</text>
                 <text class="crm-cursor">{{ t('Documentary.AgentBackground.item3') }}</text>
                 <cwg-link type="pdf" title="Documentary.AgentBackground.item4" v-if="['cn', 'zhHant'].indexOf(local) != -1"
                 <cwg-link type="pdf" title="Documentary.AgentBackground.item4" v-if="['cn', 'zhHant'].indexOf(local) != -1"
@@ -68,7 +68,7 @@
   const formData = ref({
   const formData = ref({
     cId: '',
     cId: '',
     permissionDisplay: '',
     permissionDisplay: '',
-    agree: '',
+    agree: false,
   })
   })
   const emit = defineEmits(['close','confirm'])
   const emit = defineEmits(['close','confirm'])
 
 
@@ -83,7 +83,7 @@
   })
   })
   const onAgreeChange = (e) => {
   const onAgreeChange = (e) => {
     console.log(e)
     console.log(e)
-    formData.value.agree = e.detail.value.length > 0
+    formData.value.agree = e.detail.value?.includes('1')
   }
   }
   const closeDia = () => {
   const closeDia = () => {
     emit('close')
     emit('close')
@@ -95,7 +95,7 @@
       id: formData.value.id,
       id: formData.value.id,
       permissionDisplay: formData.value.permissionDisplay,
       permissionDisplay: formData.value.permissionDisplay,
     })
     })
-    if (res.Code = Code.StatusOK) {
+    if (res.Code === Code.StatusOK) {
       emit('confirm')
       emit('confirm')
       uni.showToast({
       uni.showToast({
         title:t("Msg.Success"),
         title:t("Msg.Success"),
@@ -122,4 +122,4 @@
       background-color: var(--color-zinc-100) !important;
       background-color: var(--color-zinc-100) !important;
     }
     }
   }
   }
-</style>
+</style>

+ 1 - 1
stores/use-user-store.ts

@@ -168,7 +168,7 @@ const useUserStore = defineStore("userStore", () => {
     ls.remove(ACCOUNT_INFO_KEY);
     ls.remove(ACCOUNT_INFO_KEY);
 
 
     const globalStore = useGlobalStore();
     const globalStore = useGlobalStore();
-    globalStore.setMode('customer');
+    globalStore.setMode("customer");
   };
   };
 
 
   initReasonsOptions();
   initReasonsOptions();

+ 3 - 2
windows/left-window.vue

@@ -49,7 +49,8 @@ const isCollapsed = ref(false)
 
 
 // ib按钮展示
 // ib按钮展示
 const ibStatus = computed(() => {
 const ibStatus = computed(() => {
-  return userInfo.value?.customInfo?.ibInvalid == 0 && !!userInfo.value?.ibInfo
+  const info: any = userInfo.value
+  return !!info && !!info.customInfo && info.customInfo.ibInvalid == 0 && !!info.ibInfo
 })
 })
 
 
 // 固定菜单项点击事件
 // 固定菜单项点击事件
@@ -211,4 +212,4 @@ function handleFixedMenuClick() {
     display: flex;
     display: flex;
   }
   }
 }
 }
-</style>
+</style>