Lijy 2 年 前
コミット
dacb2bf67e

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -12,7 +12,7 @@
                     <span v-if="!tile" style="width: 100%">
                         <span class="all">
                             <ww-open-data type='userName' :openid='multiSelectList[0].name'></ww-open-data>
-                            {{multiSelectList[0].name}}
+                            <!-- {{multiSelectList[0].name}} -->
                             <i class="el-icon-error" v-if="!disabled" @click.stop="deleteMultiSelectList('-1')"></i>
                         </span>
                         <span class="all" v-if="multiSelectList.length > 1"> + {{multiSelectList.length - 1}}</span>

+ 31 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -101,6 +101,7 @@
 
           <!-- 部门筛选 -->
           <vueCascader :size="'small'" :widthStr="'125'" :clearable="true" :subject="departmentList" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="((ins == 15 || (ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel) || (ins == 14)) && user.userNameNeedTranslate == 1)" :selectNameChuan="$t('qing-xuan-ze-bu-men')"></vueCascader>
+          <!-- <vueCascader :size="'small'" :widthStr="'125'" :clearable="true" :subject="departmentList" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="((ins == 15 || (ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel) || (ins == 14)) && user.userNameNeedTranslate != 1)" :selectNameChuan="$t('qing-xuan-ze-bu-men')"></vueCascader> -->
 
           <!-- 任务筛选 -->
           <el-select v-if="ins == 1" v-model="taskTypeId" :placeholder="$t('pleaseselecttype')" clearable filterable size="small" @change="selcts()" style="margin-left:10px">
@@ -498,7 +499,11 @@
               <el-table-column prop="deptName" :label="$t('subordinatedepartments')" width="150">
                 <template slot-scope="scope" >
                     <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> -->
+                        <ww-open-data type='departmentName' :openid='scope.row.deptName'></ww-open-data>
                     </span>
                     <span v-if="user.userNameNeedTranslate != '1'">
                       {{scope.row.deptName}}
@@ -752,7 +757,18 @@
 
             <!-- 部门参与项目情况表 -->
             <el-table v-if="ins == 15"  key="15" border :data="tableList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
-                <el-table-column align="center" prop="deptName" :label="$t('departmentname')" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="deptName" :label="$t('departmentname')" min-width="150">
+                  <template slot-scope="scope">
+                    <div>
+                      <span v-if="user.userNameNeedTranslate == '1'">
+                        <ww-open-data type='departmentName' :openid='scope.row.deptName'></ww-open-data>
+                      </span>
+                      <span v-if="user.userNameNeedTranslate != '1'">
+                        {{scope.row.deptName}}
+                      </span>
+                    </div>
+                  </template>
+                </el-table-column>
                 <el-table-column align="center" prop="deptHeadCount" :label="'部门人数'" min-width="150"></el-table-column>
                 <el-table-column align="center" prop="projectCount" :label="$t('can-yu-de-xiang-mu-de-shu-liang')" min-width="150"></el-table-column>
                 <el-table-column align="center" prop="centerCount" :label="this.user.timeType.customDegreeName + '数量'" min-width="150"></el-table-column>
@@ -1775,15 +1791,23 @@ export default {
         startDate: this.rangeDatas[0],
         endDate: this.rangeDatas[1],
       }
+      console.log(this.userId, '人员')
       if(this.userId) {
         obj.userId = this.userId
       }
+      console.log(this.departmentIdArray, '加班情况统计表')
       if(this.departmentIdArray.length != 0){
         let deptid = []
-        for(let i in this.departmentIdArray){
-          deptid.push(this.departmentIdArray[i][this.departmentIdArray[i].length - 1])
+        if(this.user.userNameNeedTranslate != '1') {
+          for(let i in this.departmentIdArray){
+            deptid.push(this.departmentIdArray[i][this.departmentIdArray[i].length - 1])
+          }
+        } else {
+          deptid = this.departmentIdArray
         }
         obj.departmentId = deptid
+        console.log(obj, deptid, '加班情况统计表')
+        // obj.departmentId = this.departmentIdArray[this.departmentIdArray.length - 1]
       }
       this.http.post('/project/getOvertimeList', obj,
         res => {
@@ -1992,6 +2016,9 @@ export default {
       res => {
         this.listLoading = false
         if(res.code == 'ok'){
+          // if(this.user.userNameNeedTranslate == '1') {
+          //   res.data.result = res.data.result.deptName.split('/')
+          // }
           this.userWorkHoursList = res.data.result
           this.total = res.data.total
         }else {

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -5,7 +5,7 @@
         <el-col :span="24" class="left" :style="'height:'+ (tableHeight + 113) + 'px;'">
             <div class="department">
                 <span><i class="iconfont firerock-iconzuzhijiegou" style="font-size:10px;" ></i>&nbsp;{{ $t('lable.department') }}</span>
-                <div v-on:click="createDepartment(-1)">
+                <div v-on:click="createDepartment(-1)" v-if="user.userNameNeedTranslate != '1'">
                     <i class="fa fa-plus-circle"></i>
                     {{ $t('create') }} 
                   </div>
@@ -40,10 +40,10 @@
 
                         <!-- <span v-if="node.label != '全部人员'" class="node none"> -->
                         <span v-if="node.label != $t('lable.allStaff') && node.label != $t('lable.unassigned')" class="node none poAub">
-                            <el-button type="text" size="mini" @click="createDepartment(-2)" >
+                            <el-button type="text" size="mini" @click="createDepartment(-2)" v-if="user.userNameNeedTranslate != '1'">
                                 <i class="el-icon-circle-plus-outline"></i> <!-- 新增 -->
                             </el-button>
-                            <el-button type="text" size="mini" @click="deleteDep(null)">
+                            <el-button type="text" size="mini" @click="deleteDep(null)" v-if="user.userNameNeedTranslate != '1'">
                                 <i class="el-icon-delete"></i> <!-- 删除 -->
                             </el-button>
                         </span>