Commit 154b6a58 authored by ztf's avatar ztf

新建项目相关修改

parent 7e2557ee
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
layKey: 'updateState' layKey: 'updateState'
}" }"
:form="form" :form="form"
:basic-data="{id:basicData.id}"
@on-submit="toSubmit" @on-submit="toSubmit"
@on-cancel="cancel" @on-cancel="cancel"
/> />
...@@ -30,35 +31,17 @@ export default { ...@@ -30,35 +31,17 @@ export default {
} }
}, },
mounted() { mounted() {
this.getInitData() // this.getInitData()
}, },
methods: { methods: {
getInitData() {
const id = this.basicData.id
const params = {
'searchItems': {
'children': [],
'items': [{
'fieldName': 'id',
'operator': 'EQ',
'value': id
}],
'operator': 'AND'
}
}
post(`/DxContext/search`, params).then(res => {
this.form = res.items.content[0]
})
},
toSubmit() { toSubmit() {
const id = this.form.id const id = this.form.id
const status = this.form.state const status = this.form.state
post(`/DxContextProject/lifecycle/changeStatus?id=${id}&status=${status}&isValid=true`).then(res => { post(`/DxContextProject/lifecycle/changeStatus?id=${id}&status=${status}&isValid=true`).then(res => {
if (res.items) { if (res.items) {
this.$utils.showMessageSuccess('修改成功') this.$utils.showMessageSuccess('修改成功')
}
this.$emit('completeEven') this.$emit('completeEven')
}
}) })
}, },
cancel() { cancel() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment