Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
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
紫光云
web-project
Commits
c93c50ed
Commit
c93c50ed
authored
Jun 19, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改项目详情打开的错误
parent
c78f2b7d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
185 additions
and
164 deletions
+185
-164
yearModal.vue
src/components/yearModal.vue
+5
-4
project.ts
src/router/routes/modules/project.ts
+11
-10
detail.vue
src/views/project/detail.vue
+83
-66
index.vue
src/views/project/index.vue
+86
-84
No files found.
src/components/yearModal.vue
View file @
c93c50ed
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
:minHeight=
"30"
:minHeight=
"30"
okText=
"新建"
okText=
"新建"
@
ok=
"handleSubmit"
@
ok=
"handleSubmit"
@
visible-change
=
"handleVisibleChange"
@
cancel
=
"handleVisibleChange"
>
>
<BasicForm
@
register=
"registerForm"
:model=
"modelRef"
/>
<BasicForm
@
register=
"registerForm"
:model=
"modelRef"
/>
</BasicModal>
</BasicModal>
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
FormSchema
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
FormSchema
,
useForm
}
from
'@/components/Form'
;
cons
t
schemas
=
reactive
<
FormSchema
[]
>
([]);
le
t
schemas
=
reactive
<
FormSchema
[]
>
([]);
const
props
=
defineProps
({
const
props
=
defineProps
({
userData
:
{
type
:
Object
},
userData
:
{
type
:
Object
},
});
});
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
},
},
]
=
useForm
({
]
=
useForm
({
labelWidth
:
120
,
labelWidth
:
120
,
schemas
,
schemas
:
schemas
,
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
actionColOptions
:
{
span
:
24
,
span
:
24
,
...
@@ -129,13 +129,14 @@
...
@@ -129,13 +129,14 @@
}
}
function
handleVisibleChange
(
v
)
{
function
handleVisibleChange
(
v
)
{
v
&&
props
.
userData
&&
nextTick
(()
=>
onDataReceive
(
props
.
userData
))
;
schemas
=
[]
;
}
}
function
handleSubmit
()
{
function
handleSubmit
()
{
validate
().
then
(()
=>
{
validate
().
then
(()
=>
{
const
value
=
getFieldsValue
();
const
value
=
getFieldsValue
();
console
.
log
(
value
);
console
.
log
(
value
);
schemas
=
[];
console
.
log
(
'submit'
);
console
.
log
(
'submit'
);
emit
(
'close'
,
value
);
emit
(
'close'
,
value
);
closeModal
();
closeModal
();
...
...
src/router/routes/modules/project.ts
View file @
c93c50ed
...
@@ -14,6 +14,16 @@ const dashboard: AppRouteModule = {
...
@@ -14,6 +14,16 @@ const dashboard: AppRouteModule = {
title
:
'项目库'
,
title
:
'项目库'
,
},
},
children
:
[
children
:
[
{
path
:
'info'
,
name
:
'projectDetail'
,
component
:
()
=>
import
(
'@/views/project/detail.vue'
),
meta
:
{
// affix: true,
ignoreKeepAlive
:
true
,
title
:
'项目详情'
,
},
},
{
{
path
:
'project'
,
path
:
'project'
,
name
:
'projectIndex'
,
name
:
'projectIndex'
,
...
@@ -25,16 +35,7 @@ const dashboard: AppRouteModule = {
...
@@ -25,16 +35,7 @@ const dashboard: AppRouteModule = {
title
:
'项目库'
,
title
:
'项目库'
,
},
},
},
},
{
path
:
'info'
,
name
:
'projectDetail'
,
component
:
()
=>
import
(
'@/views/project/detail2.vue'
),
meta
:
{
// affix: true,
ignoreKeepAlive
:
true
,
title
:
'项目详情'
,
},
},
],
],
};
};
...
...
src/views/project/detail.vue
View file @
c93c50ed
<
template
>
<
template
>
<div
class=
"header"
>
<div>
<div
class=
"header-tab"
>
<div
class=
"header"
>
<!--
<img
class=
"header-tab-logo"
src=
"../../assets/images/logo.png"
alt=
""
/>
-->
<div
class=
"header-tab"
>
<img
class=
"header-tab-logo"
:src=
"detail.logo"
/>
<!--
<img
class=
"header-tab-logo"
src=
"../../assets/images/logo.png"
alt=
""
/>
-->
<div
class=
"header-tab-right"
>
<img
class=
"header-tab-logo"
:src=
"detail.logo"
/>
<div
class=
"header-tab-right-title"
>
{{
detail
.
projectName
}}
</div>
<div
class=
"header-tab-right"
>
<div
class=
"header-tab-right-desc"
>
{{
detail
.
projectName
}}
</div>
<div
class=
"header-tab-right-title"
>
{{
detail
.
projectName
}}
</div>
<div
class=
"header-tab-right-desc"
>
{{
detail
.
projectName
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"header-tool"
>
<div
class=
"header-tool"
>
<a-button
type=
"default"
class=
"btn"
preIcon=
"ri:edit-line"
@
click=
"handleEdit"
>
<a-button
type=
"default"
class=
"btn"
preIcon=
"ri:edit-line"
@
click=
"handleEdit"
>
编辑项目
编辑项目
</a-button>
</a-button>
<a-button
type=
"default"
class=
"btn"
preIcon=
"mdi:book-add"
@
click=
"handleContent"
>
<a-button
type=
"default"
class=
"btn"
preIcon=
"mdi:book-add"
@
click=
"handleContent"
>
添加合同
添加合同
</a-button>
</a-button>
<a-button
type=
"default"
class=
"btn"
preIcon=
"humbleicons:upload"
@
click=
"handleUpload"
>
<a-button
type=
"default"
class=
"btn"
preIcon=
"humbleicons:upload"
@
click=
"handleUpload"
>
上传附件
上传附件
</a-button>
</a-button>
<a-button
<a-button
type=
"default"
type=
"default"
class=
"btn"
class=
"btn"
preIcon=
"ant-design:delete-outlined"
preIcon=
"ant-design:delete-outlined"
@
click=
"handleDelete"
@
click=
"handleDelete"
>
删除项目
</a-button>
</div>
<!--
<div
class=
"header-body"
>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
实施主体
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
implementingEntity
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
建设模式
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
constructionMode
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
建设地点
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
constructionSite
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
项目类型
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
projectType
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
资金来源
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
fundingSource
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
建设规模
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
constructionScale
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
建设目的及项目功能
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
constructionPurpose
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
更新人/更新时间
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
updateBy
||
'--'
}}
/
{{
detail
.
updateTime
||
'--'
}}
</div
>
>
删除项目
</a-button>
</div>
</div>
</div>
-->
<div
class=
"header-body"
>
<!--
<Descriptions></Descriptions>
-->
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
实施主体
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
implementingEntity
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
建设模式
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
constructionMode
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
建设地点
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
constructionSite
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
项目类型
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
projectType
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
资金来源
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
fundingSource
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
建设规模
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
constructionScale
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
建设目的及项目功能
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
constructionPurpose
}}
</div>
</div>
<div
class=
"header-body-item"
>
<div
class=
"header-body-item-title"
>
更新人/更新时间
</div>
<div
class=
"header-body-item-value"
>
{{
detail
.
updateBy
||
'--'
}}
/
{{
detail
.
updateTime
||
'--'
}}
</div
>
</div>
</div>
<!--
<Descriptions></Descriptions>
-->
</div>
<div
class=
"body"
>
<Tabs>
<template
v-for=
"item in tabList"
:key=
"item.key"
>
<TabPane
:tab=
"item.tab"
>
<div>
<component
:is=
"tabs[item.component]"
/>
</div>
</TabPane>
</
template
>
</Tabs>
</div>
<projectDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<contractDrawer
@
register=
"register2"
@
success=
"handleRegisterSuccess"
/>
<uploadModal
@
register=
"registerModal"
@
close=
"handleNewFile"
/>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -92,7 +109,9 @@
...
@@ -92,7 +109,9 @@
import
contract
from
'./tabs/contract.vue'
;
import
contract
from
'./tabs/contract.vue'
;
import
annex
from
'./tabs/annex.vue'
;
import
annex
from
'./tabs/annex.vue'
;
import
updateRecords
from
'./tabs/updateRecords.vue'
;
import
updateRecords
from
'./tabs/updateRecords.vue'
;
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
register2
,
{
openDrawer
:
openDrawer2
}]
=
useDrawer
();
const
[
registerModal
,
{
openModal
:
openModal
}]
=
useModal
();
import
contractDrawer
from
'@/views/contract/contractDrawer.vue'
;
import
contractDrawer
from
'@/views/contract/contractDrawer.vue'
;
const
tabs
=
{
const
tabs
=
{
InvestmentPlan
,
InvestmentPlan
,
...
@@ -112,9 +131,7 @@
...
@@ -112,9 +131,7 @@
};
};
const
TabPane
=
Tabs
.
TabPane
;
const
TabPane
=
Tabs
.
TabPane
;
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
register2
,
{
openDrawer
:
openDrawer2
}]
=
useDrawer
();
const
[
registerModal
,
{
openModal
:
openModal
}]
=
useModal
();
let
detail
=
ref
<
any
>
({});
let
detail
=
ref
<
any
>
({});
let
detailId
=
ref
<
any
>
(
0
);
let
detailId
=
ref
<
any
>
(
0
);
// onMounted(async () => {
// onMounted(async () => {
...
...
src/views/project/index.vue
View file @
c93c50ed
<
template
>
<
template
>
<div
:class=
"`$
{prefixCls}__top`">
<div>
<Row
:gutter=
"12"
>
<div
:class=
"`$
{prefixCls}__top`">
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<Row
:gutter=
"12"
>
<div
class=
"title"
>
项目总数
</div>
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<div
class=
"content"
>
<div
class=
"title"
>
项目总数
</div>
<img
:class=
"`$
{prefixCls}__top-img`" src="../../assets/images/group.png" />
<div
class=
"content"
>
<img
:class=
"`$
{prefixCls}__top-img`" src="../../assets/images/group.png" />
<span
><p>
{{
countData
.
counttotal
}}
</p
>
个
</span
>
</div>
</Col>
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<div
class=
"title"
>
自建
</div>
<span
<span
><p>
{{
countData
.
count
total
}}
</p
><p>
{{
countData
.
count
buildbyoneself
}}
</p
>
个
</span
>
个
</span
>
>
</div>
</Col>
</Col>
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<div
class=
"title"
>
委托建设
</div>
<div
class=
"title"
>
自建
</div>
<span
<span
><p>
{{
countData
.
countbuildbyentrust
}}
</p
><p>
{{
countData
.
countbuildbyoneself
}}
</p
>
个
</span
>
个
</span
>
>
</Col>
</Col>
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<div
class=
"title"
>
代建
</div>
<div
class=
"title"
>
委托建设
</div>
<span
<span
><p>
{{
countData
.
countbuildbyreplace
}}
</p
><p>
{{
countData
.
countbuildbyentrust
}}
</p
>
个
</span
>
个
</span
>
>
</Col>
</Col>
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<div
class=
"title"
>
承建
</div>
<div
class=
"title"
>
代建
</div>
<span
<span
><p>
{{
countData
.
countbuildbyhold
}}
</p
><p>
{{
countData
.
countbuildbyreplace
}}
</p
>
个
</span
>
个
</span
>
>
</Col>
</Col>
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
<div
class=
"title"
>
储备
</div>
<div
class=
"title"
>
承建
</div>
<span
<span
><p>
{{
countData
.
countreserve
}}
</p
><p>
{{
countData
.
countbuildbyhold
}}
</p
>
个
</span
>
个
</span
>
>
</Col>
</Col>
</Row>
<Col
:span=
"4"
:class=
"`$
{prefixCls}__top-col`">
</div>
<div
class=
"title"
>
储备
</div>
<BasicTable
@
register=
"registerTable"
>
<span
<template
#
toolbar
>
><p>
{{
countData
.
countreserve
}}
</p
<a-button
type=
"primary"
preIcon=
"mdi:plus"
@
click=
"handleCreate"
>
新增项目
</a-button>
>
个
</span
>
</Col>
</Row>
</div>
<BasicTable
@
register=
"registerTable"
>
<template
#
toolbar
>
<a-button
type=
"primary"
preIcon=
"mdi:plus"
@
click=
"handleCreate"
>
新增项目
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'projectName'"
>
<Tag
color=
"warning"
v-if=
"record.isReserveProject == 'true'"
>
储备
</Tag>
{{
record
.
projectName
}}
</
template
>
<
template
v-if=
"column.key === 'constructionMode'"
>
<Tag
color=
"processing"
>
{{
record
.
constructionMode
}}
</Tag>
</
template
>
</
template
>
<
template
v-if=
"column.key === 'action'"
>
<
template
#
bodyCell=
"{ column, record }"
>
<TableAction
<template
v-if=
"column.key === 'projectName'"
>
:actions=
"[
<Tag
color=
"warning"
v-if=
"record.isReserveProject == 'true'"
>
储备
</Tag>
{
{{
record
.
projectName
}}
label: '详情',
</
template
>
onClick: handleDetail.bind(null, record),
<
template
v-if=
"column.key === 'constructionMode'"
>
},
<Tag
color=
"processing"
>
{
{{
record
.
constructionMode
}}
label: '编辑',
</Tag>
onClick: handleEdit.bind(null, record, false),
</
template
>
},
<
template
v-if=
"column.key === 'action'"
>
{
<TableAction
label: '删除',
:actions=
"[
color: 'error',
{
popConfirm: {
label: '详情',
title: '是否确认删除',
onClick: handleDetail.bind(null, record),
placement: 'left',
},
confirm: handleDelete.bind(null, record),
{
label: '编辑',
onClick: handleEdit.bind(null, record, false),
},
},
},
{
]"
label: '删除',
/>
color: 'error',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</
template
>
</template>
</template>
</
templat
e>
</
BasicTabl
e>
</BasicTable
>
<projectDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/
>
<
projectDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/
>
<
/div
>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
Tag
}
from
'ant-design-vue'
;
import
{
Tag
}
from
'ant-design-vue'
;
...
@@ -130,7 +132,7 @@
...
@@ -130,7 +132,7 @@
}
}
function
handleDetail
(
record
:
any
)
{
function
handleDetail
(
record
:
any
)
{
push
({
push
({
path
:
'
/project/
info'
,
path
:
'info'
,
query
:
{
query
:
{
id
:
record
.
id
,
id
:
record
.
id
,
},
},
...
...
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