Parcourir la source

提交请假管理

Lijy il y a 2 ans
Parent
commit
14e83c1b70

+ 6 - 3
fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue

@@ -189,7 +189,7 @@ export default {
         },
         subjectId: {
             handler(newValue, oldValue) {
-                console.log(newValue, oldValue)
+                console.log(newValue, '过来的id')
                 this.optionsOId = newValue
                 if(this.optionsOId && this.optionsOId.length != 0) {
                     this.traverseArr(this.options, this.optionsOId)
@@ -231,6 +231,8 @@ export default {
         }
         if(this.subjectId) {
             this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
+            console.log(this.options, '过来的数据')
+            this.traverseArr(this.options, this.optionsOId)
             for(let i in this.options) {
                 if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
                      this.selectName = this.options[i].name || this.options[i].auditorName
@@ -247,11 +249,12 @@ export default {
     methods: {
         // 循环取值
         traverseArr(arr, idd){
-            console.log(arr, idd, '传过来的值')
             let id = idd[0]
             if(arr) {
                 for(var i in arr) {
-                    if(arr[i].value == id) {
+                    console.log(arr[i].value, idd)
+                    if(arr[i].value == idd) {
+                        console.log('将要付给的值', arr[i])
                         this.selectName = arr[i].label
                         if(arr[i].type) {
                             this.selectNameType = arr[i].type

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

@@ -469,10 +469,10 @@
         <el-dialog  :title="$t('pleaseselectapprover')" v-if="dialogVisible" :visible.sync="dialogVisible"  width="460px">
               <el-form label-width="140px">
               <el-form-item :label="$t('selectdepartmentsdesignatepersonnel')" >
-                  <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>
+                  <!-- <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" :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>
 
               </el-form-item>
               </el-form>
@@ -925,6 +925,7 @@ export default {
       curWorkflowList:{},
       denyReasonVisible : false,
       auditLogList:[],
+      selectedAuuid: ''
     };
   },
   computed: {},
@@ -1433,8 +1434,10 @@ export default {
                             this.isAdd = false;
                             this.sindex = index;
                             this.curUserId = item.userId;
-                            this.dialogVisible = true;
                             this.curDeptId = item.auditDeptId;
+                            this.selectedAuuid = item.userId || item.auditDeptId
+                            console.log(this.selectedAuuid, '看看数据类')
+                            this.dialogVisible = true;
                         } else {
                             this.$message({
                                 message: res.msg,