Kaynağa Gözat

提交项目报表服务的部门转译

Lijy 2 yıl önce
ebeveyn
işleme
3e3c7dbd48

+ 13 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -761,7 +761,10 @@
                   <template slot-scope="scope">
                     <div>
                       <span v-if="user.userNameNeedTranslate == '1'">
-                        <ww-open-data type='departmentName' :openid='scope.row.deptName'></ww-open-data>
+                        <span v-for="item, index in scope.row.deptName" :key='index'>
+                          <ww-open-data type='departmentName' :openid='item'></ww-open-data>
+                          <span v-if="index < scope.row.deptName.length - 1">/</span>
+                        </span>
                       </span>
                       <span v-if="user.userNameNeedTranslate != '1'">
                         {{scope.row.deptName}}
@@ -1047,7 +1050,7 @@ export default {
       this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang')],
 
       shuzArr: [this.$t('projectreport'),this.$t('projectTaskReport'),this.$t('projectcoststatement'),
-      this.$t('projectbalancesheet'),this.$t('customerprojectprofitstatement'),this.$t('projectphasetimesheet'),
+      this.$t('projectbalancesheet'),this.$t('customerprojectincomestatement'),this.$t('projectphasetimesheet'),
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('employeereporttimelinessrate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
       this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang')],
@@ -1229,8 +1232,9 @@ export default {
 
 
     getUserList() {
+      console.log(this.shuzArr[this.ins])
       this.http.post('/user/getUserListByRole', {
-        tableName: this.shuzArr[this.ins]
+        tableName: this.shuzArr[this.ins] || '加班情况统计表'
       },
       res => {
           if (res.code == "ok") {
@@ -1775,6 +1779,12 @@ export default {
       res => {
       this.listLoading = false
         if(res.code == 'ok'){
+          if(this.user.userNameNeedTranslate == 1) {
+            for(var i in res.data.resultList) {
+              let arrDemant = res.data.resultList[i].deptName.split('/')
+              res.data.resultList[i].deptName = arrDemant
+            }
+          }
           this.tableList = res.data.resultList
           this.total = res.data.total
         }else {