|
@@ -37,8 +37,8 @@
|
|
|
style="width:20vw"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.idap"
|
|
|
+ v-for="(item,index) in options"
|
|
|
+ :key="index"
|
|
|
:label="item.name"
|
|
|
:value="item.idap"
|
|
|
>
|
|
@@ -94,7 +94,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
- {{ form }}
|
|
|
<template v-slot:footer>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
<el-button type="primary" @click="confirm">确 认</el-button>
|
|
@@ -176,9 +175,14 @@ export default {
|
|
|
watch: {
|
|
|
visible: function(newVisible, oldVisible) {
|
|
|
this.isVisible = newVisible
|
|
|
+ if (newVisible && this.title === '编辑需求') {
|
|
|
+ this.form = JSON.parse(JSON.stringify(this.data))
|
|
|
+ this.form.pm = this.form.pm[0].idap
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
},
|
|
|
isVisible: function(newIsVisible, oldIsVisible) {
|
|
|
- if (newIsVisible === false) {
|
|
|
+ if (!newIsVisible) {
|
|
|
if (this.title === '新建需求') {
|
|
|
for (const i in this.form) {
|
|
|
this.form[i] = null
|
|
@@ -186,13 +190,6 @@ export default {
|
|
|
}
|
|
|
this.$emit('cancel', false)
|
|
|
}
|
|
|
- },
|
|
|
- data: function(newData, oldData) {
|
|
|
- if (newData) {
|
|
|
- this.form = JSON.parse(JSON.stringify(this.data))
|
|
|
- this.form.pm = this.form.pm[0].idap
|
|
|
- this.init()
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|