Commit a3531003 authored by ztf's avatar ztf

修改项目状态以及编辑项目接口修改

parent 13ac7392
......@@ -56,12 +56,15 @@ export default {
toSubmit() {
const id = this.form.id
const status = this.form.state
// post(`/${this.subTypeName}/lifecycle/changeStatus?id=${id}&status=${status}&isValid=true`).then(res => {
// this.$emit('completeEven')
// })
if (this.subTypeName === 'ExtProgram') {
post(`/ExtProgram/lifecycle/changeStatus?id=${id}&status=${status}&isValid=true`).then(res => {
this.$emit('completeEven')
})
} else if (this.subTypeName === 'DxContext' || this.subTypeName === 'DxContextProject') {
post(`/DxContextProject/lifecycle/changeStatus?id=${id}&status=${status}&isValid=true`).then(res => {
post(`/DxContext/lifecycle/changeStatus?id=${id}&status=${status}&isValid=true`).then(res => {
// this.$utils.showMessageSuccess(`修改状态成功`)
this.$emit('completeEven')
})
......
......@@ -65,26 +65,22 @@ export default {
this.$emit('completeEven')
})
} else if (this.subTypeName === 'DxContext') {
const id = this.form.extProgramProjectLinks[0].id
delete this.form.extProgramProjectLinks
delete this.form.extProgram
delete this.form.extProject
delete this.form.dxType
delete this.form.projectCategory
delete this.form.extProgramProjectLinks
console.log(' this.form修改之后的', this.form)
const params = {
subTypeName: 'DxContextProject',
id: id,
extProgramProjectLinks: [{
operator: 'MODIFY',
target: {
...this.form,
dxType: 'project',
subTypeName: 'DxContext',
modelName: 'DxContext',
operator: 'MODIFY',
parentId: 0,
parentName: 'Root',
state: 'edit'
}
}],
operator: 'NO_CHANGE'
}
post('/ExtProgram/recursion', params).then(res => {
post('/DxContext/recursion', params).then(res => {
this.$utils.showMessageSuccess(`编辑成功`)
this.$emit('completeEven')
})
......
......@@ -11,7 +11,7 @@
<el-tree
ref="tree"
class="PlanTreeMenu-main"
node-key="id"
node-key="pageKey"
:data="treeData"
empty-text="暂无数据"
:highlight-current="true"
......@@ -59,7 +59,6 @@ export default {
treeData: [],
isEdit: false,
basicData: null,
projectTitle: `${this.$route.query.name}`,
isShowTooltip: false,
planDetail: {
subTypeName: this.$route.query.type,
......@@ -73,6 +72,12 @@ export default {
}
},
computed: {
type() {
return this.$route.query.type === 'DxContext' ? '项目' : '子项'
},
projectTitle() {
return `${this.type}-${this.$route.query.name}`
}
},
watch: {
},
......
......@@ -2,7 +2,7 @@
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-09-02 09:44:58
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-09-12 18:44:44
* @LastEditTime: 2024-09-13 09:30:45
*/
export default {
props: {},
......@@ -92,16 +92,16 @@ export default {
id: this.$route.query.id,
icon: '/icons/dee-project/baseline.png',
componentType: 'formConfig',
formConfigType: 'page',
pageKey: 'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
formConfigType: 'page'
// pageKey: 'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
},
{
name: '归档',
id: this.$route.query.id,
icon: '/icons/dee-project/baseline.png',
componentType: 'formConfig',
formConfigType: 'page',
pageKey: 'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
formConfigType: 'page'
// pageKey: 'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
}
// {
// name: '子项',
......
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