ソースを参照

2022.10.13 消息记录转译

ggooalice 2 年 前
コミット
b2287d01a7

+ 13 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/msg/index.vue

@@ -5,7 +5,15 @@
         <div class="login_form">
             <van-list v-model="loading" :finished="finished" finished-text="没有更多了" :error.sync="error" error-text="请求失败,点击重新加载" @load="getMessage">
                 <van-cell @click="readMsg(index)" v-for="(item,index) in list" :key="index" 
-                :title="item.msg==null?msgType[item.type]:item.msg" :label="item.time.replace('T', ' ')" >
+                 :label="item.time.replace('T', ' ')" >
+                <template #title>
+                    <span v-if="user.userNameNeedTranslate == 1 && item.msg != null && item.indexOf('$userName=') != -1">
+                        <span>{{item.split('$')[0]}}</span>
+                        <ww-open-data type='userName' :openid='getmsgtext(item.msg)'></ww-open-data>
+                        <span>{{item.split('$')[2]}}</span>
+                    </span>
+                    <span v-else>{{item.msg}}</span>
+                </template>
                 <div >
                     <span v-if="item.checked == 1" style="color:green">已读</span>
                     <span v-if="item.checked == 0" style="color:red">未读</span>
@@ -46,6 +54,10 @@
                 history.back();
             },
 
+            getmsgtext(text){
+                return text.split('$')[1].split('=')[1]
+            },
+
             readMsg(index) {
                 var item = this.list[index];
                 if (item.type == 0) {

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

@@ -45,11 +45,11 @@
             <van-pull-refresh v-model="isDownLoading" @refresh="onDownRefresh">
                 <van-list v-model="isUpLoading" :finished="upFinished" :immediate-check="false" :offset="100" finished-text="没有更多了" @load="onLoadList">
                     <van-swipe-cell v-for="(item,index) in list" :key="index">
-                        <van-cell :border="false" :title="item.projectName" :value="item.projectCode"/>
+                        <van-cell :border="false" :title="item.projectName" :value="item.projectCode" clickable @click="toProjectInside(item)"/>
                         <template slot="right" v-if="projectManagement || item.creatorId == user.id">
-                            <van-button square type="primary" text="查看" @click="toProjectInside(item)"/>
-                            <van-button square type="info" text="编辑" @click="openDialog(index)"/>
-                            <van-button square type="danger" text="删除" @click="delPro(index)"/>
+                            <!-- <van-button square type="primary" text="查看" @click="toProjectInside(item)"/> -->
+                            <van-button square type="info" text="编辑" @click="openDialog(index)" style="height:100%"/>
+                            <van-button square type="danger" text="删除" @click="delPro(index)" style="height:100%"/>
                         </template>
                     </van-swipe-cell> 
                 </van-list>