Commit a3531003 authored by ztf's avatar ztf

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

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