Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
INET-TWO
web
Commits
b7f6794e
Commit
b7f6794e
authored
Sep 13, 2024
by
ztf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义导入文件组件
parent
a3531003
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
134 additions
and
69 deletions
+134
-69
index.vue
...privateComponents/components/changeProjectState/index.vue
+5
-13
index.vue
...ect/src/privateComponents/components/importFile/index.vue
+76
-0
view.js
.../src/privateComponents/components/leftProjectTree/view.js
+53
-56
No files found.
applications/dee-project/src/privateComponents/components/changeProjectState/index.vue
View file @
b7f6794e
...
...
@@ -56,24 +56,16 @@ 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
(
`/DxContext/lifecycle/changeStatus?id=
${
id
}
&status=
${
status
}
&isValid=true`
).
then
(
res
=>
{
// this.$utils.showMessageSuccess(`修改状态成功`)
this
.
$emit
(
'completeEven'
)
})
}
const
subTypeName
=
this
.
subTypeName
===
'ExtProgram'
?
'ExtProgram'
:
'DxContext'
post
(
`/
${
subTypeName
}
/lifecycle/changeStatus?id=
${
id
}
&status=
${
status
}
&isValid=true`
).
then
(
res
=>
{
this
.
$emit
(
'completeEven'
)
})
},
cancel
()
{
this
.
$emit
(
'cancel'
)
}
}
}
</
script
>
...
...
applications/dee-project/src/privateComponents/components/importFile/index.vue
0 → 100644
View file @
b7f6794e
<
template
>
<div
class=
"importTemp-com"
>
<el-upload
ref=
"upload"
:show-file-list=
"false"
action=
"#"
accept=
".xls,.xlsx,.XLS,.XLSX"
:http-request=
"(file) =>
{importFile(file)}"
>
<el-button
class=
"border-none"
>
选择文件:
<img
src=
"/icons/settledlcons/upLoad.png"
>
</el-button>
</el-upload>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'ImportFile'
,
componentName
:
'导入文件'
,
basicData
:
{
type
:
Object
,
default
:
null
},
data
()
{
return
{
action
:
'/ExtPuchasePlanAttribute/importPurchasePlan'
}
},
mounted
()
{
console
.
log
(
'basicData'
,
this
.
basicData
)
},
methods
:
{
importFile
(
file
)
{
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
.
$emit
(
'completeEven'
)
})
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.importTemp-com
{
.border-none
{
border
:
none
;
color
:
#2678cb
;
img
{
padding-left
:
15px
;
width
:
18px
;
height
:
16px
;
}
}
.info
{
background
:
#eee
;
padding
:
10px
15px
;
margin-bottom
:
20px
;
}
.flex-c
{
display
:flex
;
justify-content
:
center
;
}
}
</
style
>
applications/dee-project/src/privateComponents/components/leftProjectTree/view.js
View file @
b7f6794e
...
...
@@ -2,18 +2,13 @@
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-09-02 09:44:58
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-09-13
09:30:45
* @LastEditTime: 2024-09-13
14:45:42
*/
export
default
{
props
:
{},
data
()
{
return
{
projectMenus
:
[
// 这里还要监听是项目还是子项
// 项目全都展示
// 子项只有进度计划、采购计划,没有ICM接口计划 、IED计划
// 通过传进来的id进行判断这个项目的分类,进行判断,然后进行显示与隐藏
// 通过data.ifShow控制显隐
{
disabled
:
false
,
name
:
'计划'
,
...
...
@@ -21,44 +16,9 @@ export default {
icon
:
'/icons/dee-project/plan.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
ifShow
:
true
,
pageKey
:
'22c90a9f-0907-49ea-8f8d-d5234e93e0e6'
,
children
:
[
{
name
:
'进度计划'
,
id
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
pageKey
:
'22c90a9f-0907-49ea-8f8d-d5234e93e0e6'
,
ifShow
:
true
},
{
name
:
'采购计划'
,
id
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
pageKey
:
'a5728005-cd38-4568-bc63-8888fd7e5b5a'
,
ifShow
:
true
},
{
name
:
'IED计划'
,
id
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
pageKey
:
'd4e791a9-57bf-477c-b760-53bdc351bc7f'
,
ifShow
:
true
},
{
name
:
'接口计划'
,
id
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
pageKey
:
'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
,
ifShow
:
true
}]
children
:
[]
},
{
name
:
'团队'
,
...
...
@@ -86,7 +46,6 @@ export default {
formConfigType
:
'page'
,
pageKey
:
'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
},
{
name
:
'文档'
,
id
:
this
.
$route
.
query
.
id
,
...
...
@@ -104,25 +63,63 @@ export default {
// pageKey: 'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
}
// {
//
name: '子项',
//
planId: this.$route.query.id,
//
icon: '/icons/dee-project/baseline.png',
//
componentType: 'formConfig',
//
formConfigType: 'page',
//
pageKey: 'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
// name: '子项',
// planId: this.$route.query.id,
// icon: '/icons/dee-project/baseline.png',
// componentType: 'formConfig',
// formConfigType: 'page',
// pageKey: 'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
// }
]
}
},
computed
:
{},
watch
:
{
},
created
()
{
mounted
()
{
this
.
updateMenus
()
},
methods
:
{
// 判断是项目还是子项进行显示与隐藏
updateChildren
(
items
)
{
this
.
$set
(
this
.
projectMenus
[
0
],
'children'
,
items
)
},
updateMenus
()
{
const
baseItems
=
[
{
name
:
'进度计划'
,
id
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
pageKey
:
'22c90a9f-0907-49ea-8f8d-d5234e93e0e6'
},
{
name
:
'采购计划'
,
id
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
pageKey
:
'a5728005-cd38-4568-bc63-8888fd7e5b5a'
}
]
const
additionalItems
=
this
.
$route
.
query
.
type
===
'DxContext'
?
[
{
name
:
'IED计划'
,
id
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
pageKey
:
'26bda3a8-5273-4e77-a567-601ad2fa3b26'
},
{
name
:
'接口计划'
,
id
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
pageKey
:
'fe0b5925-0b7f-42bd-adbc-8ecb738013a0'
}
]
:
[]
this
.
updateChildren
([...
baseItems
,
...
additionalItems
])
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment