Commit c0ebf567 authored by ztf's avatar ztf

修改项目要素相关组件

parent 4f50982f
......@@ -27,11 +27,24 @@ export default {
},
data() {
return {
action: '/ExtPuchasePlanAttribute/importPurchasePlan'
}
},
mounted() {
console.log('basicData', this.basicData)
// const action = this.$refs['upload'].$parent.$parent.$parent.$parent.$parent.basicData.subTypeName
// if (action === 'ExtPuchasePlanAttribute') {
// this.action = '/ExtPuchasePlanAttribute/importPurchasePlan'
// } else if (action === 'ExtIEDPlan') {
// this.action = '/ExtIEDPlan/importIEDPlan'
// } else if (action === 'ExtICMExternalInterfacePlan') {
// this.action = '/ExtICMExternalInterfacePlan/importICMPlan'
// }
const action = this.$refs['upload'].$parent.$parent.$parent.$parent.$parent.basicData.subTypeName
const actionMap = {
'ExtPuchasePlanAttribute': '/ExtPuchasePlanAttribute/importPurchasePlan',
'ExtIEDPlan': '/ExtIEDPlan/importIEDPlan',
'ExtICMExternalInterfacePlan': '/ExtICMExternalInterfacePlan/importICMPlan'
}
this.action = actionMap[action] || null
},
methods: {
......@@ -39,11 +52,10 @@ export default {
const formData = new FormData()
if (!file) return this.$utils.showMessageWarning('请选择文件')
if (file !== '') {
// const action = `${this.action}${this.basicData.id}&dxContextIdType=${this.basicData.subTypeName}`
formData.append('file', file.file)
formData.append('projectId', this.$route.query.id)
post(this.action, formData).then(res => {
this.$utils.showMessageSuccess('导入成功33')
this.$utils.showMessageSuccess('操作成功')
this.$emit('completeEven')
})
}
......
......@@ -57,9 +57,8 @@ export default {
name: this.projectTitle,
disabled: false,
id: this.$route.query.id,
// componentType: 'formConfig',
// formConfigType: 'page',
detail: 'projectDetail',
componentType: 'formConfig',
formConfigType: 'page',
pageKey: this.$route.query.type === 'DxContext' ? '79edd06e-3a7d-440e-bb4f-4b7691f7a641' : 'e32bab11-07c1-42b9-9ce7-d00d12c3b680'
}
}
......
/*
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-09-02 09:44:58
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-09-13 14:45:42
*/
export default {
props: {},
data() {
......@@ -27,7 +21,7 @@ export default {
icon: '/icons/dee-project/team.png',
componentType: 'formConfig',
formConfigType: 'page',
pageKey: '71091156-e060-40a8-9573-1136d345c1c4',
pageKey: 'f8e17790-5ab7-4c33-b6a1-33f07f87051f',
disabled: false
},
{
......@@ -84,7 +78,7 @@ export default {
const baseItems = [
{
name: '进度计划',
id: this.$route.query.id,
subTypeName: 'ExtPlan',
icon: '/icons/dee-project/baseline.png',
componentType: 'formConfig',
formConfigType: 'page',
......@@ -92,7 +86,7 @@ export default {
},
{
name: '采购计划',
id: this.$route.query.id,
subTypeName: 'ExtPuchasePlanAttribute',
icon: '/icons/dee-project/baseline.png',
componentType: 'formConfig',
formConfigType: 'page',
......@@ -102,7 +96,7 @@ export default {
const additionalItems = this.$route.query.type === 'DxContext' ? [
{
name: 'IED计划',
id: this.$route.query.id,
subTypeName: 'ExtIEDPlan',
icon: '/icons/dee-project/baseline.png',
componentType: 'formConfig',
formConfigType: 'page',
......@@ -110,11 +104,11 @@ export default {
},
{
name: '接口计划',
id: this.$route.query.id,
subTypeName: 'ExtICMExternalInterfacePlan',
icon: '/icons/dee-project/baseline.png',
componentType: 'formConfig',
formConfigType: 'page',
pageKey: 'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
pageKey: '9e0af428-3bc4-48d1-b8f2-0eb660c821da'
}
] : []
......
<template>
<div id="project-dynamicComponent-com">
<dee-as-page
v-if="basicData && basicData.componentType === 'formConfig' && basicData.formConfigType === 'page'"
:id="basicData.componentName"
:key="basicData.pageKey"
:page-key="basicData.pageKey"
/>
<dee-as-page
v-if="basicData && basicData.detail === 'projectDetail'"
:id="basicData.componentName"
:key="basicData.pageKey"
:page-key="basicData.pageKey"
:basic-data="basicData"
/>
</div>
</template>
<script>
export default {
name: 'DynamicComponent',
componentName: '项目要素动态组件',
props: {},
data() {
// 这里存放数据
return {
emitMethods: [
{
methods: 'loadComponent',
methodsName: '加载动态组件'
}
],
comName: '',
parentType: '',
basicData: null,
planObj: null
}
},
// 监听属性 类似于data概念
computed: {},
// 监控data中的数据变化
watch: {},
// 生命周期 - 创建完成(可以访问当前this实例)
created() {
},
// 生命周期 - 挂载完成(可以访问DOM元素)
mounted() {
},
activated() {
},
// 方法集合
methods: {
loadComponent(val) {
this.planObj = val
this.basicData = val
this.comName = val.componentName
}
}
}
</script>
<style lang='scss'>
#project-dynamicComponent-com {
padding: 0;
position: absolute;
left: 4px;
right: 4px;
top: 4px;
bottom: 4px;
background-color: #E8EDEF;
.page-content-box{
padding-bottom:8px
}
.page-content-box>.dee-as-table-com {
background-color: #fff;
padding: 2px 8px 0px 8px;
}
.show-page-com {
.page-content-item {
padding-left: 0px;
padding-right: 0px;
}
}
// 详情页整体上边距
.dee-as-com {
padding-top: 16px;
}
// 详情页内部行距
.PaneContent-com {
.sub-title {
padding-bottom: 0px !important;
}
// 详情页页签内title-按钮-表格之间的间距调整
.dee-up-table {
margin-top: 8px;
}
.dee-as-table-com,
.predecessor_table {
.dee-up-table {
margin-top: 0px;
}
}
// 详情页info
.dee-form2 .el-form-item {
margin-bottom: 0px;
}
}
// 交付物菜单
#DxDeliver {
.dee-table>.sub-title {
color: #424141;
font-size: 16px;
padding: 2px 0 2px 2px;
margin-top: 10px;
}
}
}
</style>
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