浏览代码

提交测试

Lijy 2 年之前
父节点
当前提交
3830e2c62d
共有 1 个文件被更改,包括 32 次插入0 次删除
  1. 32 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

+ 32 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -652,7 +652,31 @@ import timetoolVue from '../timetool/timetool.vue';
                     this.projectss = this.proads
                 }
             },
+
+            selectDegreeId(domain, index, domainItem, list) {
+                console.log(domain)
+                this.$axios.post("/report/defaultDegree", {
+                    projectId: domain.id
+                })
+                .then(res => {
+                    if(res.code == "ok") {
+                        var arr = domainItem.wuduList
+                        for(var i in arr) {
+                            if(arr[i].id == res.data.id) {
+                                domainItem.weiduName = arr[i].name
+                                domainItem.degreeId = res.data.id
+                            }
+                        }
+                        console.log(domainItem, '值')
+                        this.$forceUpdate();
+                    } else {
+                        this.$toast.fail('获取失败:'+res.msg);
+                    }
+                }).catch(err=> {this.$toast.clear();});
+            },
+
             fZr(item,index) {
+
                 var domainItem = this.form.domains[this.clickIndex];
                 domainItem.projectId = item.id;
                 domainItem.projectName = item.projectName;
@@ -693,6 +717,14 @@ import timetoolVue from '../timetool/timetool.vue';
                 if (curProject && this.user.timeType.reportAuditType == 0) {
                     this.getProjectAuditorList(domainItem, index);
                 }
+
+                console.log(item, '数据')
+                if(this.user.timeType.customDegreeActive == 1 && item) {
+                    var that = this
+                    setTimeout(()=>{
+                        that.selectDegreeId(item, index, that.form.domains[that.clickIndex])
+                    }, 500)
+                }
             },
             //获取项目下的任务分组
             getTaskGroups(domainItem, index) {