Lijy 4 mesiacov pred
rodič
commit
a8e11a4be7

+ 0 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/tasks/addEditor.vue

@@ -156,7 +156,6 @@
         <div></div>
       </van-form>
       <CustomerForm ref="formFormRef" :formJson="formJson" :formValue="formVal"></CustomerForm>
-      {{ formJson }}
     </div>
     <div class="mar-20px ">
       <van-button type="primary" @click="onSubmit" class="w-full">

+ 11 - 2
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/news/index.vue

@@ -14,7 +14,13 @@
               <img src="/src/assets/image/news.png" alt="">
             </div>
             <div class="flex-1">
-              <div class="text-size-in text-[#000]">{{ item.msg }}</div>
+              <div class="text-size-in text-[#000]">
+                <!-- {{ item.msg }} -->
+                {{ item.msgTextList[0] || '' }}
+                <TranslationComponent :openId="item.msgTextList[1]" v-if="(item.msgTextList || []).length > 1">
+                </TranslationComponent>
+                {{ item.msgTextList[2] || '' }}
+              </div>
               <div class="text-[#B9B9B9]">{{ item.timeStr }}</div>
             </div>
             <van-icon name="arrow" color="#D4D4D4" size="1.2rem" />
@@ -49,9 +55,12 @@ const messageList = ref([]);
 function getMessageList() {
   requests.post(GET_MESSAGE_LIST, {}).then(({ data = [] }) => {
     messageList.value = (data || []).map(item => {
+      let str = item.msg || ''
+      let arr = str.split(/\$|=/).filter((item) => item && item !== 'username');
       return {
         ...item,
-        timeStr: dayjs(item.time).format('YYYY-MM-DD HH:mm')
+        timeStr: dayjs(item.time).format('YYYY-MM-DD HH:mm'),
+        msgTextList: arr || []
       }
     })
     userInfo.updateState({

+ 15 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/header/header.vue

@@ -88,7 +88,13 @@
         <el-table :data="newsDrawerTableData" style="flex1" border>
           <el-table-column prop="msg" label="消息内容">
             <template #default="scope">
-              <el-link type="primary" :underline="false" @click="toDetail(scope.row)">{{ scope.row.msg }}</el-link>
+              <el-link type="primary" :underline="false" @click="toDetail(scope.row)">
+                <!-- {{ scope.row.msg }} -->
+                {{ scope.row.msgTextList[0] || '' }}
+                <TextTranslation translationTypes="userName" :translationValue="scope.row.msgTextList[1]" v-if="(scope.row.msgTextList || []).length > 1">
+                </TextTranslation>
+                {{ scope.row.msgTextList[2] || '' }}
+              </el-link>
             </template>
           </el-table-column>
           <el-table-column prop="checked" label="状态" width="100">
@@ -244,7 +250,14 @@ const getNewsDrawerTableData = () => {
       }
     })
     numberOfLogos.value = (data || []).filter((item: any) => !item.checked).length
-    newsDrawerTableData.value = data
+    newsDrawerTableData.value = (data || []).map((item: any) => {
+      let str = item.msg || ''
+      let arr = str.split(/\$|=/).filter((item: any) => item && item !== 'username');
+      return {
+          ...item,
+          msgTextList: arr || []
+      }
+    })
   }).catch(err => {
     newsDrawerTableData.value = []
     console.log(err)