Parcourir la source

审批流部门和人员调整

Lijy il y a 2 ans
Parent
commit
d5d917a62f

+ 34 - 30
fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue

@@ -26,7 +26,7 @@
         <div class="transitionBox">
             <ul class="transitionBoxUl">
                 <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 || fistRadio">
                         <!-- {{item.label}} -->
                         <span v-if="userName">
                             <span v-if="item.type == 'dep'">
@@ -41,7 +41,7 @@
                         </span>
                         <!-- <ww-open-data type='departmentName' :openid='item.label'></ww-open-data> -->
                     </span>
-                    <span v-if="radios" style="margin-left: -15px">
+                    <span v-if="radios && !fistRadio" style="margin-left: -15px">
                         <el-radio v-model="optionsOId" :label="item.value">
                             <span class="idxspan" style="margin-left: -10px"> 
                                 <!-- {{item.label}}  -->
@@ -147,6 +147,11 @@ export default {
         userName: {
             type: Boolean,
             default: false
+        },
+        // 第一季是否不选中
+        fistRadio: {
+            type: Boolean,
+            default: false
         }
     },
     data() {
@@ -298,36 +303,35 @@ export default {
         },
         // 点击
         liClist(item) {
-            console.log('我被你点击了')
-            if(!item.children) {
-                this.selectName = item.label
-                if(item.type) {
-                    this.selectNameType = item.type
-                }
-                let obj = {
-                    id: item.value,
-                    distinction: this.distinction
-                }
-                console.log('将要传出去的值1', obj)
-                this.$emit('vueCasader', obj)
-            }
-            if(this.radios) {
-                this.selectName = item.label
-                if(item.type) {
-                    this.selectNameType = item.type
+            if(item.label != this.$t('lable.department') && item.label != this.$t('designatedpersonnel')) {
+                if(!item.children) {
+                    this.selectName = item.label
+                    if(item.type) {
+                        this.selectNameType = item.type
+                    }
+                    let obj = {
+                        id: item.value,
+                        distinction: this.distinction
+                    }
+                    this.$emit('vueCasader', obj)
                 }
-                let obj = {
-                    id: item.value,
-                    distinction: this.distinction,
-                    item: item
+                if(this.radios) {
+                    this.selectName = item.label
+                    if(item.type) {
+                        this.selectNameType = item.type
+                    }
+                    let obj = {
+                        id: item.value,
+                        distinction: this.distinction,
+                        item: item
+                    }
+                    this.$emit('vueCasader', obj)
+                } else {
+                    this.transitionBoxLiIdx = ''
+                    this.show = !this.show
+                    this.classDiv = false
+                    this.move = false
                 }
-                console.log('将要传出去的值2', obj)
-                this.$emit('vueCasader', obj)
-            } else {
-                this.transitionBoxLiIdx = ''
-                this.show = !this.show
-                this.classDiv = false
-                this.move = false
             }
         },
         // 接受子组件传过来的值

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue

@@ -462,7 +462,7 @@
                     <el-form-item :label="$t('selectdepartmentsdesignatepersonnel')" >
                         <el-cascader filterable ref="deptCascader" v-model="curDeptId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" @change="chooseDept" v-if="user.userNameNeedTranslate != 1" :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
                         <!-- <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subjectId="this.selectedAuuid" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader> -->
-                        <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :userName="true" :subjectId="this.selectedAuuid" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
+                        <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :fistRadio="true" :userName="true" :subjectId="this.selectedAuuid" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
                     </el-form-item>
                 </el-form>
                 <div slot="footer" class="dialog-footer">

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

@@ -474,7 +474,7 @@
                   <el-cascader filterable ref="deptCascader"  v-model="curDeptId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" @change="chooseDept"
                     :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable v-show="user.userNameNeedTranslate != 1"></el-cascader>
 
-                  <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :userName="true" :subjectId="this.selectedAuuid" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
+                    <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :userName="true" :fistRadio="true" :subjectId="this.selectedAuuid" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
 
               </el-form-item>
               </el-form>