Sfoglia il codice sorgente

调整转译判断

Lijy 2 anni fa
parent
commit
845ac5f607

+ 12 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -618,10 +618,18 @@
                                         totalCost += Number(params[i].data.money);
                                     }
                                 }
-                                res = res +'<br/>'+ params[0].name+ '<br/>' + _this.$t('zong-ji') + ':' + 
-                                ((_this.permissions.countHours) ? totalTime.toFixed(1) + _this.$t('time.hour') : '') + 
-                                ((_this.permissions.countCost) ? totalCost.toFixed(2) + _this.$t('yuan') : '') + 
-                                "<br/>";
+                                if(_this.user.userNameNeedTranslate != 1) {
+                                    res = res +'<br/>'+ params[0].name+ '<br/>' + _this.$t('zong-ji') + ':' + 
+                                    ((_this.permissions.countHours) ? totalTime.toFixed(1) + _this.$t('time.hour') : '') + 
+                                    ((_this.permissions.countCost) ? totalCost.toFixed(2) + _this.$t('yuan') : '') + 
+                                    "<br/>";
+                                } else {
+                                    res = res +'<br/>'+ '' + '<br/>' + _this.$t('zong-ji') + ':' + 
+                                    ((_this.permissions.countHours) ? totalTime.toFixed(1) + _this.$t('time.hour') : '') + 
+                                    ((_this.permissions.countCost) ? totalCost.toFixed(2) + _this.$t('yuan') : '') + 
+                                    "<br/>";
+                                }
+                                
                                 return res;
                             }
                         },

+ 16 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1046,12 +1046,26 @@
         
         <!-- 按部门选择人员 -->
         <el-dialog :title="$t('defaultText.selectthepersonwhneedstofillinthereport')"  v-if="chooseParticipVisible" :visible.sync="chooseParticipVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
-            <el-input style="width:100%" v-model="deptMembDataText" :placeholder="$t('defaultText.pleaseEnterNametoSearch')"></el-input>
+            <el-input v-if="user.userNameNeedTranslate != 1" style="width:100%" v-model="deptMembDataText" :placeholder="$t('defaultText.pleaseEnterNametoSearch')"></el-input>
             <div class="tree" style="height:400px">
                 <el-scrollbar style="height:100%">
                 <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
                     ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="workForm.userId"
-                    highlight-current :filter-node-method="filterNode"></el-tree>
+                    highlight-current :filter-node-method="filterNode">
+                    <span class="custom-tree-node" slot-scope="{ node, data }">
+                        <span v-if="user.userNameNeedTranslate == '1'">
+                            <span v-if="node.data.children">
+                                <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                            </span>
+                            <span v-else>
+                                <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                            </span>
+                        </span>
+                        <span v-if="user.userNameNeedTranslate != '1'">
+                            {{ node.label }}
+                        </span>
+                    </span>    
+                </el-tree>
                 </el-scrollbar>
             </div>
             <div>{{$t('btn.choose')}}&nbsp;{{chosenMembCount}}&nbsp;{{$t('other.people')}}</div>