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
dde64191
Commit
dde64191
authored
Jun 07, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改项目
parent
c9e36a8e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
24 deletions
+62
-24
biddingManagement.data.ts
src/views/biddingManagement/biddingManagement.data.ts
+1
-1
index.vue
src/views/biddingManagement/index.vue
+4
-1
biddingPlan.data.ts
src/views/biddingPlan/biddingPlan.data.ts
+1
-1
index.vue
src/views/biddingPlan/index.vue
+4
-1
detail.vue
src/views/project/detail.vue
+37
-11
project.data.ts
src/views/project/project.data.ts
+7
-4
projectDrawer.vue
src/views/project/projectDrawer.vue
+8
-5
No files found.
src/views/biddingManagement/biddingManagement.data.ts
View file @
dde64191
...
@@ -7,7 +7,7 @@ import { useMessage } from '@/hooks/web/useMessage';
...
@@ -7,7 +7,7 @@ import { useMessage } from '@/hooks/web/useMessage';
export
const
columns
:
BasicColumn
[]
=
[
export
const
columns
:
BasicColumn
[]
=
[
{
{
title
:
'序号'
,
title
:
'序号'
,
dataIndex
:
'
projectName
'
,
dataIndex
:
'
serialNumber
'
,
width
:
100
,
width
:
100
,
},
},
{
{
...
...
src/views/biddingManagement/index.vue
View file @
dde64191
...
@@ -4,7 +4,10 @@
...
@@ -4,7 +4,10 @@
<template
#
toolbar
>
<template
#
toolbar
>
<a-button
type=
"primary"
preIcon=
"mdi:plus"
@
click=
"handleCreate"
>
新增招标管理
</a-button>
<a-button
type=
"primary"
preIcon=
"mdi:plus"
@
click=
"handleCreate"
>
新增招标管理
</a-button>
</
template
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record, index }"
>
<template
v-if=
"column.key === 'serialNumber'"
>
{{
index
+
1
}}
</
template
>
<
template
v-if=
"column.key === 'tenderYear'"
>
<
template
v-if=
"column.key === 'tenderYear'"
>
{{
record
.
tenderYear
+
'年'
+
record
.
biddingQuarter
+
'季度'
}}
{{
record
.
tenderYear
+
'年'
+
record
.
biddingQuarter
+
'季度'
}}
</
template
>
</
template
>
...
...
src/views/biddingPlan/biddingPlan.data.ts
View file @
dde64191
...
@@ -7,7 +7,7 @@ import { useMessage } from '@/hooks/web/useMessage';
...
@@ -7,7 +7,7 @@ import { useMessage } from '@/hooks/web/useMessage';
export
const
columns
:
BasicColumn
[]
=
[
export
const
columns
:
BasicColumn
[]
=
[
{
{
title
:
'序号'
,
title
:
'序号'
,
dataIndex
:
'
projectName
'
,
dataIndex
:
'
serialNumber
'
,
width
:
100
,
width
:
100
,
},
},
{
{
...
...
src/views/biddingPlan/index.vue
View file @
dde64191
...
@@ -4,7 +4,10 @@
...
@@ -4,7 +4,10 @@
<template
#
toolbar
>
<template
#
toolbar
>
<a-button
type=
"primary"
preIcon=
"mdi:plus"
@
click=
"handleCreate"
>
新增招标计划
</a-button>
<a-button
type=
"primary"
preIcon=
"mdi:plus"
@
click=
"handleCreate"
>
新增招标计划
</a-button>
</
template
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record, index }"
>
<template
v-if=
"column.key === 'serialNumber'"
>
{{
index
+
1
}}
</
template
>
<
template
v-if=
"column.key === 'tenderYear'"
>
<
template
v-if=
"column.key === 'tenderYear'"
>
{{
record
.
tenderYear
+
'年'
+
record
.
biddingQuarter
+
'季度'
}}
{{
record
.
tenderYear
+
'年'
+
record
.
biddingQuarter
+
'季度'
}}
</
template
>
</
template
>
...
...
src/views/project/detail.vue
View file @
dde64191
...
@@ -3,27 +3,28 @@
...
@@ -3,27 +3,28 @@
<PageCard>
<PageCard>
<div
class=
"header"
>
<div
class=
"header"
>
<div
class=
"header-tab"
>
<div
class=
"header-tab"
>
<img
class=
"header-tab-logo"
src=
"../../assets/images/logo.png"
alt=
""
/>
<!--
<img
class=
"header-tab-logo"
src=
"../../assets/images/logo.png"
alt=
""
/>
-->
<img
class=
"header-tab-logo"
:src=
"detail.logo"
/>
<div
class=
"header-tab-right"
>
<div
class=
"header-tab-right"
>
<div
class=
"header-tab-right-title"
>
{{
detail
.
projectName
}}
</div>
<div
class=
"header-tab-right-title"
>
{{
detail
.
projectName
}}
</div>
<div
class=
"header-tab-right-desc"
>
{{
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=
"handle
Create
"
>
<a-button
type=
"default"
class=
"btn"
preIcon=
"ri:edit-line"
@
click=
"handle
Edit
"
>
编辑项目
编辑项目
</a-button>
</a-button>
<a-button
type=
"default"
class=
"btn"
preIcon=
"mdi:book-add"
@
click=
"handle
Create
"
>
<a-button
type=
"default"
class=
"btn"
preIcon=
"mdi:book-add"
@
click=
"handle
Edit
"
>
添加合同
添加合同
</a-button>
</a-button>
<a-button
type=
"default"
class=
"btn"
preIcon=
"humbleicons:upload"
@
click=
"handle
Create
"
>
<a-button
type=
"default"
class=
"btn"
preIcon=
"humbleicons:upload"
@
click=
"handle
Edit
"
>
上传附件
上传附件
</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=
"handle
Crea
te"
@
click=
"handle
Dele
te"
>
>
删除项目
删除项目
</a-button>
</a-button>
...
@@ -111,15 +112,23 @@
...
@@ -111,15 +112,23 @@
</template>
</template>
</BasicTable>
</BasicTable>
</PageWrapper>
</PageWrapper>
<projectDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
projectDrawer
from
'./projectDrawer.vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
getListByPage
,
getItem
}
from
'@/api/project/project'
;
import
{
getListByPage
,
getItem
,
deleteItem
}
from
'@/api/project/project'
;
import
{
columns
,
searchFormSchema
,
tabList
}
from
'./project.data'
;
import
{
columns
,
searchFormSchema
,
tabList
}
from
'./project.data'
;
import
{
ref
,
onMounted
}
from
'vue'
;
import
{
ref
,
onMounted
}
from
'vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
router
}
from
'@/router'
;
const
{
createMessage
}
=
useMessage
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
let
detail
=
ref
<
any
>
({});
let
detail
=
ref
<
any
>
({});
let
detailId
=
ref
<
any
>
(
0
);
const
activeKey
=
ref
(
'1'
);
const
activeKey
=
ref
(
'1'
);
const
[
registerTable
,
{
reload
}]
=
useTable
({
const
[
registerTable
,
{
reload
}]
=
useTable
({
api
:
getListByPage
,
api
:
getListByPage
,
...
@@ -143,13 +152,30 @@
...
@@ -143,13 +152,30 @@
});
});
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
const
route
=
useRoute
();
const
route
=
useRoute
();
const
id
=
route
.
query
.
id
;
// 获取名为id的参数
detailId
.
value
=
route
.
query
.
id
;
// 获取名为id的参数
let
res
=
await
getItem
({
id
});
await
handleDetail
();
console
.
log
(
res
);
});
function
handleEdit
()
{
openDrawer
(
true
,
{
record
:
detail
,
isUpdate
:
true
,
});
}
async
function
handleSuccess
(
record
:
any
)
{
// detail.value = record;
await
handleDetail
()
}
async
function
handleDetail
()
{
let
res
=
await
getItem
({
id
:
detailId
.
value
});
detail
.
value
=
res
;
detail
.
value
=
res
;
console
.
log
(
detail
.
value
);
console
.
log
(
detail
.
value
);
});
}
function
handleDelete
()
{
deleteItem
({
id
:
detailId
.
value
}).
then
((
res
)
=>
{
createMessage
.
success
(
'删除成功!'
);
router
.
back
();
});
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.header {
.header {
...
...
src/views/project/project.data.ts
View file @
dde64191
...
@@ -25,12 +25,15 @@ export const formSchema: FormSchema[] = [
...
@@ -25,12 +25,15 @@ export const formSchema: FormSchema[] = [
},
},
{
{
field
:
'isReserveProject'
,
field
:
'isReserveProject'
,
component
:
'Switch'
,
label
:
'储备项目'
,
component
:
'RadioButtonGroup'
,
defaultValue
:
'false'
,
componentProps
:
{
componentProps
:
{
checkedValue
:
'true'
,
options
:
[
unCheckedValue
:
'false'
,
{
label
:
'是'
,
value
:
'true'
},
{
label
:
'否'
,
value
:
'false'
},
],
},
},
label
:
'储备项目'
,
labelWidth
:
'140px'
,
labelWidth
:
'140px'
,
},
},
{
{
...
...
src/views/project/projectDrawer.vue
View file @
dde64191
...
@@ -7,9 +7,7 @@
...
@@ -7,9 +7,7 @@
width=
"700px"
width=
"700px"
@
ok=
"handleSubmit"
@
ok=
"handleSubmit"
>
>
<BasicForm
ref=
"formElRef"
@
register=
"registerForm"
>
<BasicForm
ref=
"formElRef"
@
register=
"registerForm"
>
</BasicForm>
<!--
<template
#
menu=
"
{ model, field }">
</
template
>
-->
</BasicForm>
</BasicDrawer>
</BasicDrawer>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -18,6 +16,7 @@
...
@@ -18,6 +16,7 @@
import
{
formSchema
}
from
'./project.data'
;
import
{
formSchema
}
from
'./project.data'
;
import
{
BasicDrawer
,
useDrawerInner
}
from
'@/components/Drawer'
;
import
{
BasicDrawer
,
useDrawerInner
}
from
'@/components/Drawer'
;
import
{
addItem
,
updateItem
}
from
'@/api/project/project'
;
import
{
addItem
,
updateItem
}
from
'@/api/project/project'
;
import
{
isArray
}
from
'@/utils/is'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
isUpdate
=
ref
(
true
);
const
isUpdate
=
ref
(
true
);
const
detailId
=
ref
(
0
);
const
detailId
=
ref
(
0
);
...
@@ -49,6 +48,7 @@
...
@@ -49,6 +48,7 @@
}
}
if
(
unref
(
isUpdate
))
{
if
(
unref
(
isUpdate
))
{
data
.
record
.
logo
=
[
data
.
record
.
logo
];
setFieldsValue
({
setFieldsValue
({
...
data
.
record
,
...
data
.
record
,
});
});
...
@@ -63,8 +63,11 @@
...
@@ -63,8 +63,11 @@
if
(
isUpdate
.
value
)
{
if
(
isUpdate
.
value
)
{
values
.
id
=
detailId
.
value
;
values
.
id
=
detailId
.
value
;
}
}
// TODO custom api
let
logo
=
unref
(
values
.
logo
);
console
.
log
(
values
);
if
(
isArray
(
logo
))
{
let
img
:
string
=
logo
[
0
];
values
.
logo
=
img
;
}
let
res
=
isUpdate
.
value
?
await
updateItem
(
values
)
:
await
addItem
(
values
);
let
res
=
isUpdate
.
value
?
await
updateItem
(
values
)
:
await
addItem
(
values
);
console
.
log
(
res
);
console
.
log
(
res
);
...
...
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