Browse Source

Merge remote-tracking branch 'origin/master'

yurk 2 years ago
parent
commit
cd89476687

+ 59 - 4
fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue

@@ -3,8 +3,19 @@
     <div :class="disabled ? 'disabledTrue' : 'disabledFalse'" @mouseenter="moveIonDiv" @mouseleave="outIonDiv">
     <div :class="disabled ? 'disabledTrue' : 'disabledFalse'" @mouseenter="moveIonDiv" @mouseleave="outIonDiv">
         <div :style="`width:${selectWidth}px;height:${selectHeight}px`" :class="classDiv ? 'select selectDiv' : 'select'" @click.stop="selectCli" :ref="disabled ? '' : 'selectDiv'">
         <div :style="`width:${selectWidth}px;height:${selectHeight}px`" :class="classDiv ? 'select selectDiv' : 'select'" @click.stop="selectCli" :ref="disabled ? '' : 'selectDiv'">
             <div :style="'line-height: '+selectHeight+'px;font-size: '+selectFontSize+'px;'" :class="(selectName == $t('defaultText.pleaseChoose') || selectName == $t('qing-xuan-ze-bu-men') || selectName == $t('other.allDepartments')) ? 'selecttex selecttexXuan' : 'selecttex'">
             <div :style="'line-height: '+selectHeight+'px;font-size: '+selectFontSize+'px;'" :class="(selectName == $t('defaultText.pleaseChoose') || selectName == $t('qing-xuan-ze-bu-men') || selectName == $t('other.allDepartments')) ? 'selecttex selecttexXuan' : 'selecttex'">
-                <ww-open-data type='departmentName' :openid='selectName'></ww-open-data>
+                <!-- <ww-open-data type='departmentName' :openid='selectName'></ww-open-data> -->
                 <!-- {{selectName}} -->
                 <!-- {{selectName}} -->
+                 <span v-if="userName">
+                    <span v-if="selectNameType == 'dep'">
+                        <ww-open-data type='departmentName' :openid='selectName'></ww-open-data>
+                    </span>
+                    <span v-if="selectNameType == 'user'">
+                        <ww-open-data type='userName' :openid='selectName'></ww-open-data>
+                    </span>
+                </span>
+                <span v-if="!userName">
+                    <ww-open-data type='departmentName' :openid='selectName'></ww-open-data>
+                </span>
             </div>
             </div>
             <i :class=" move ? 'el-icon-arrow-down iostu iostuHover' : 'el-icon-arrow-down iostu'" v-if="!moveIon"></i>
             <i :class=" move ? 'el-icon-arrow-down iostu iostuHover' : 'el-icon-arrow-down iostu'" v-if="!moveIon"></i>
             <i v-if="moveIon" class="el-icon-circle-close iostu" @click.stop="clearDelete"></i>
             <i v-if="moveIon" class="el-icon-circle-close iostu" @click.stop="clearDelete"></i>
@@ -17,13 +28,35 @@
                 <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click.stop="liClist(item)"> 
                 <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click.stop="liClist(item)"> 
                     <span :class="item.children ? 'idxspan' : ''" v-if="!radios">
                     <span :class="item.children ? 'idxspan' : ''" v-if="!radios">
                         <!-- {{item.label}} -->
                         <!-- {{item.label}} -->
-                        <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                        <span v-if="userName">
+                            <span v-if="item.type == 'dep'">
+                                <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                            </span>
+                            <span v-if="item.type == 'user'">
+                                <ww-open-data type='userName' :openid='item.label'></ww-open-data>
+                            </span>
+                        </span>
+                        <span v-if="!userName">
+                            <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                        </span>
+                        <!-- <ww-open-data type='departmentName' :openid='item.label'></ww-open-data> -->
                     </span>
                     </span>
                     <span v-if="radios" style="margin-left: -15px">
                     <span v-if="radios" style="margin-left: -15px">
                         <el-radio v-model="optionsOId" :label="item.value">
                         <el-radio v-model="optionsOId" :label="item.value">
                             <span class="idxspan" style="margin-left: -10px"> 
                             <span class="idxspan" style="margin-left: -10px"> 
                                 <!-- {{item.label}}  -->
                                 <!-- {{item.label}}  -->
-                                <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                                <span v-if="userName">
+                                    <span v-if="item.type == 'dep'">
+                                        <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                                    </span>
+                                    <span v-if="item.type == 'user'">
+                                        <ww-open-data type='userName' :openid='item.label'></ww-open-data>
+                                    </span>
+                                </span>
+                                <span v-if="!userName">
+                                    <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                                </span>
+                                <!-- <ww-open-data type='departmentName' :openid='item.label'></ww-open-data> -->
                             </span>
                             </span>
                         </el-radio>
                         </el-radio>
                     </span>
                     </span>
@@ -34,7 +67,7 @@
 
 
         <div v-for="(item, index) in options" :key="index">
         <div v-for="(item, index) in options" :key="index">
             <div v-if="item.children" style="position: absolute;left: 200px;top: 6px">
             <div v-if="item.children" style="position: absolute;left: 200px;top: 6px">
-                <cascaderOption :subject="item.children" :radios="radios" v-show="transitionBoxLiIdx == index" @cascaderOptionClick="cascaderOptionClick"></cascaderOption>
+                <cascaderOption :subject="item.children" :userName="userName" :radios="radios" v-show="transitionBoxLiIdx == index" @cascaderOptionClick="cascaderOptionClick"></cascaderOption>
             </div>
             </div>
         </div>
         </div>
 
 
@@ -111,6 +144,10 @@ export default {
         selectNameChuan: {
         selectNameChuan: {
             type: String
             type: String
         },
         },
+        userName: {
+            type: Boolean,
+            default: false
+        }
     },
     },
     data() {
     data() {
         return {
         return {
@@ -197,6 +234,9 @@ export default {
             for(let i in this.options) {
             for(let i in this.options) {
                 if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
                 if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
                      this.selectName = this.options[i].name || this.options[i].auditorName
                      this.selectName = this.options[i].name || this.options[i].auditorName
+                     if(this.options[i].type) {
+                        this.selectNameType = this.options[i].type
+                     }
                 }
                 }
             }
             }
         }
         }
@@ -213,6 +253,9 @@ export default {
                 for(var i in arr) {
                 for(var i in arr) {
                     if(arr[i].value == id) {
                     if(arr[i].value == id) {
                         this.selectName = arr[i].label
                         this.selectName = arr[i].label
+                        if(arr[i].type) {
+                            this.selectNameType = arr[i].type
+                        }
                         return
                         return
                     }
                     }
                     if(arr[i].children) {
                     if(arr[i].children) {
@@ -255,6 +298,9 @@ export default {
             console.log('我被你点击了')
             console.log('我被你点击了')
             if(!item.children) {
             if(!item.children) {
                 this.selectName = item.label
                 this.selectName = item.label
+                if(item.type) {
+                    this.selectNameType = item.type
+                }
                 let obj = {
                 let obj = {
                     id: item.value,
                     id: item.value,
                     distinction: this.distinction
                     distinction: this.distinction
@@ -264,6 +310,9 @@ export default {
             }
             }
             if(this.radios) {
             if(this.radios) {
                 this.selectName = item.label
                 this.selectName = item.label
+                if(item.type) {
+                    this.selectNameType = item.type
+                }
                 let obj = {
                 let obj = {
                     id: item.value,
                     id: item.value,
                     distinction: this.distinction,
                     distinction: this.distinction,
@@ -358,6 +407,9 @@ export default {
         text-overflow: ellipsis;
         text-overflow: ellipsis;
         font-size: 12px;
         font-size: 12px;
     }
     }
+    .selecttex span {
+        padding: 0 !important;
+    }
     .iostu {
     .iostu {
         position: absolute;
         position: absolute;
         top: 50%;
         top: 50%;
@@ -415,6 +467,9 @@ export default {
         color: #409eff !important;
         color: #409eff !important;
         font-weight: 700;
         font-weight: 700;
     }
     }
+    .idxspan span{
+        padding: 0 !important;
+    }
     .transitionBoxUl span {
     .transitionBoxUl span {
         flex: 1;
         flex: 1;
         width: 110px;
         width: 110px;

+ 34 - 5
fhKeeper/formulahousekeeper/timesheet/src/components/cascaderOption.vue

@@ -3,15 +3,37 @@
     <div class="child">
     <div class="child">
         <ul class="transitionBoxUl">
         <ul class="transitionBoxUl">
             <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click.stop="liClick(item)"> 
             <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click.stop="liClick(item)"> 
-                <span :class="item.children ? 'idxspan' : ''" v-if="!radios">
+                <span :class="item.children ? 'idxspan idxSpanspan' : 'idxSpanspan'" v-if="!radios">
                     <!-- {{item.label}} -->
                     <!-- {{item.label}} -->
-                    <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                    <span v-if="userName">
+                        <span v-if="item.type == 'dep'">
+                            <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                        </span>
+                        <span v-if="item.type == 'user'">
+                            <ww-open-data type='userName' :openid='item.label'></ww-open-data>
+                        </span>
+                    </span>
+                    <span v-if="!userName">
+                        <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                    </span>
+                    <!-- <ww-open-data type='departmentName' :openid='item.label'></ww-open-data> -->
                 </span>
                 </span>
                 <span v-if="radios" style="margin-left: -15px">
                 <span v-if="radios" style="margin-left: -15px">
                     <el-radio v-model="departmentId" :label="item.value">
                     <el-radio v-model="departmentId" :label="item.value">
-                        <span class="idxspan" style="margin-left: -10px"> 
+                        <span class="idxspan idxSpanspan" style="margin-left: -10px"> 
                             <!-- {{item.label}}  -->
                             <!-- {{item.label}}  -->
-                            <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                            <span v-if="userName">
+                                <span v-if="item.type == 'dep'">
+                                    <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                                </span>
+                                <span v-if="item.type == 'user'">
+                                    <ww-open-data type='userName' :openid='item.label'></ww-open-data>
+                                </span>
+                            </span>
+                            <span v-if="!userName">
+                                <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                            </span>
+                            <!-- <ww-open-data type='departmentName' :openid='item.label'></ww-open-data> -->
                         </span>
                         </span>
                     </el-radio>
                     </el-radio>
                 </span>
                 </span>
@@ -22,7 +44,7 @@
 
 
     <div v-for="(item, index) in options" :key="index">
     <div v-for="(item, index) in options" :key="index">
         <div v-if="item.children">
         <div v-if="item.children">
-            <cascaderOption :subject="item.children" :radios="radiosFlg" :subjectId="departmentId" v-show="transitionBoxLiIdx == index" @cascaderOptionClick="cascaderOptionClick"></cascaderOption>
+            <cascaderOption :subject="item.children" :userName="userName" :radios="radiosFlg" :subjectId="departmentId" v-show="transitionBoxLiIdx == index" @cascaderOptionClick="cascaderOptionClick"></cascaderOption>
         </div>
         </div>
     </div>
     </div>
   </div>
   </div>
@@ -48,6 +70,10 @@ export default {
         type: Boolean,
         type: Boolean,
         default: false
         default: false
     },
     },
+    userName: {
+        type: Boolean,
+        default: false
+    }
   },
   },
   watch: {
   watch: {
     subject: {
     subject: {
@@ -131,6 +157,9 @@ export default {
         margin: 5px 0;
         margin: 5px 0;
         // box-shadow: 0 2px 12px #dfdfdf;
         // box-shadow: 0 2px 12px #dfdfdf;
     }
     }
+    .idxSpanspan span{
+        padding: 0 !important;
+    }
     .child {
     .child {
         width: 100%;
         width: 100%;
         max-height: 270px;
         max-height: 270px;

+ 27 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -413,8 +413,20 @@
                     <icon class="iconfont firerock-iconright"></icon>
                     <icon class="iconfont firerock-iconright"></icon>
                     <span v-for="(item, index) in dataArray" :key="item.seq" >
                     <span v-for="(item, index) in dataArray" :key="item.seq" >
                         
                         
-                        <el-button type="primary" v-if="item.auditorType == 1" @click="editNodeDialog(index, item)">{{item.auditDeptName}}</el-button>
-                        <el-button type="primary" v-if="item.auditorType == 2" @click="editNodeDialog(index, item)">{{item.userName}}</el-button>
+                        <el-button type="primary" v-if="item.auditorType == 1 && user.userNameNeedTranslate == 1" @click="editNodeDialog(index, item)">
+                          <!-- {{item.auditDeptName}} -->
+                          <ww-open-data type='departmentName' :openid='item.auditDeptName'></ww-open-data>
+                        </el-button>
+                        <el-button type="primary" v-if="item.auditorType == 2 && user.userNameNeedTranslate == 1" @click="editNodeDialog(index, item)">
+                          <!-- {{item.userName}} -->
+                            <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
+                        </el-button>
+                        <el-button type="primary" v-if="item.auditorType == 1 && user.userNameNeedTranslate != 1" @click="editNodeDialog(index, item)">
+                          {{item.auditDeptName}}
+                        </el-button>
+                        <el-button type="primary" v-if="item.auditorType == 2 && user.userNameNeedTranslate != 1" @click="editNodeDialog(index, item)">
+                          {{item.userName}}
+                        </el-button>
                         <template v-if="item.auditorType == 1 || item.auditorType == 2">
                         <template v-if="item.auditorType == 1 || item.auditorType == 2">
                         <icon class="iconfont firerock-iconright"></icon>
                         <icon class="iconfont firerock-iconright"></icon>
                         <icon class="iconfont firerock-iconInsertLine addNode" @click="showNodeDialog(index+1)"></icon>
                         <icon class="iconfont firerock-iconInsertLine addNode" @click="showNodeDialog(index+1)"></icon>
@@ -856,7 +868,8 @@ export default {
       hubs: 0,
       hubs: 0,
       vueCasaderItem: [], // 仿数据
       vueCasaderItem: [], // 仿数据
       vueIAlDataSItems: undefined, // 仿数据
       vueIAlDataSItems: undefined, // 仿数据
-      exporLoading: false
+      exporLoading: false,
+      addNodeObj: {}
     };
     };
   },
   },
   computed: {},
   computed: {},
@@ -1271,9 +1284,10 @@ export default {
                         var list = res.data , list1 = JSON.parse(JSON.stringify(res.data));
                         var list = res.data , list1 = JSON.parse(JSON.stringify(res.data));
                         this.sdata = list;
                         this.sdata = list;
                         this.soption = [
                         this.soption = [
-                          {value: 1 , label : this.$t('lable.department') , children : this.changeArr(list1)},
-                          {value: 2 , label : this.$t('designatedpersonnel'),children : this.susers}
+                          {value: 1 , label : this.$t('lable.department') , children : this.changeArr(list1), type: 'dep'},
+                          {value: 2 , label : this.$t('designatedpersonnel'),children : this.susers, type: 'user'}
                         ]
                         ]
+                        console.log(this.soption, '选人的数据')
                         this.Nsdata = list1
                         this.Nsdata = list1
                     } else {
                     } else {
                         this.$message({
                         this.$message({
@@ -1349,8 +1363,14 @@ export default {
               this.dialogVisible = false;
               this.dialogVisible = false;
               if (this.curDeptId == null) return;
               if (this.curDeptId == null) return;
               // if(this.user.userNameNeedTranslate != '1') {
               // if(this.user.userNameNeedTranslate != '1') {
-              var node = this.user.userNameNeedTranslate != '1' ? this.vueCasaderItem : this.$refs.deptCascader.getCheckedNodes()[0];
+              // var node = this.user.userNameNeedTranslate != '1' ? this.vueCasaderItem : this.$refs.deptCascader.getCheckedNodes()[0];
               // var node = this.$refs.deptCascader.getCheckedNodes()[0];
               // var node = this.$refs.deptCascader.getCheckedNodes()[0];
+              var node = ''
+              if(this.user.userNameNeedTranslate != 1) {
+                node = this.user.userNameNeedTranslate != '1' ? this.vueCasaderItem : this.$refs.deptCascader.getCheckedNodes()[0];
+              } else {
+                node = this.addNodeObj
+              }
               console.log(this.vueCasaderItem)
               console.log(this.vueCasaderItem)
               console.log("node",node);
               console.log("node",node);
               
               
@@ -1970,6 +1990,7 @@ export default {
         arr.push(obj.id)
         arr.push(obj.id)
         this.curDeptId = arr
         this.curDeptId = arr
         this.vueCasaderItem = obj.item
         this.vueCasaderItem = obj.item
+        this.addNodeObj = obj.item
         console.log(obj)
         console.log(obj)
       } else if(obj.distinction == 2) {
       } else if(obj.distinction == 2) {
         let arr = []
         let arr = []