|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | open (title, target,type) { | 
|---|
|  |  |  | open(title, target, type) { | 
|---|
|  |  |  | this.title = title | 
|---|
|  |  |  | this.visible = true | 
|---|
|  |  |  | this.getProject() | 
|---|
|  |  |  | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | this.$refs.form.resetFields() | 
|---|
|  |  |  | this.form[this.configData['field.id']] = null | 
|---|
|  |  |  | this.form.type=type | 
|---|
|  |  |  | this.form.type = type | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 编辑 | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | console.log('----'); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | console.log('----') | 
|---|
|  |  |  |  | 
|---|
|  |  |  | this.getDetail(target.id) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | getProject() { | 
|---|
|  |  |  | getProjectList({}).then(res => { | 
|---|
|  |  |  | this.projectList = res || [] | 
|---|
|  |  |  | if (this.projectList.length > 0) { | 
|---|
|  |  |  | this.$set(this.form, 'projectId', this.projectList[0].id) | 
|---|
|  |  |  | // this.changeProject(this.projectList[0].id) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|