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
d82fdc3d
Commit
d82fdc3d
authored
Jun 20, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增高级搜索和安需导出
parent
dc2693ba
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
679 additions
and
593 deletions
+679
-593
BasicTable.vue
src/components/Table/src/BasicTable.vue
+3
-2
addChangeSignature.vue
src/views/changeSignature/addChangeSignature.vue
+332
-325
detail.vue
src/views/project/detail.vue
+11
-1
detail2.vue
src/views/project/detail2.vue
+0
-253
InvestmentPlan.vue
src/views/project/tabs/InvestmentPlan.vue
+33
-1
exportModal.vue
src/views/project/tabs/components/exportModal.vue
+93
-0
queryModal.vue
src/views/project/tabs/components/queryModal.vue
+93
-0
data.ts
src/views/project/tabs/data.ts
+10
-9
uploadContractModal.vue
src/views/project/uploadContractModal.vue
+103
-0
uploadModal.vue
src/views/project/uploadModal.vue
+1
-2
No files found.
src/components/Table/src/BasicTable.vue
View file @
d82fdc3d
...
@@ -230,7 +230,6 @@
...
@@ -230,7 +230,6 @@
const
{
getFormProps
,
replaceFormSlotKey
,
getFormSlotKeys
,
handleSearchInfoChange
}
=
const
{
getFormProps
,
replaceFormSlotKey
,
getFormSlotKeys
,
handleSearchInfoChange
}
=
useTableForm
(
getProps
,
slots
,
fetch
,
getLoading
);
useTableForm
(
getProps
,
slots
,
fetch
,
getLoading
);
console
.
log
(
getFormProps
);
const
getBindValues
=
computed
(()
=>
{
const
getBindValues
=
computed
(()
=>
{
const
dataSource
=
unref
(
getDataSourceRef
);
const
dataSource
=
unref
(
getDataSourceRef
);
...
@@ -343,7 +342,9 @@
...
@@ -343,7 +342,9 @@
background-color: #262626;
background-color: #262626;
}
}
}
}
.toolbar {
margin-bottom: 10px;
}
.@{prefix-cls} {
.@{prefix-cls} {
max-width: 100%;
max-width: 100%;
height: 100%;
height: 100%;
...
...
src/views/changeSignature/addChangeSignature.vue
View file @
d82fdc3d
<
template
>
<
template
>
<PageWrapper
:title=
"getTitle"
:contentBackground=
"false"
headerSticky
>
<PageWrapper
:title=
"getTitle"
:contentBackground=
"false"
headerSticky
>
<template
#
extra
>
<template
#
extra
>
<a-button
type=
"primary"
@
click=
"handleSubmit"
v-if=
"showSubmit"
>
提交
</a-button>
<a-button
type=
"primary"
@
click=
"handleSubmit"
v-if=
"showSubmit"
>
提交
</a-button>
<a-button
type=
"default"
@
click=
"router.back()"
>
返回
</a-button>
<a-button
type=
"default"
@
click=
"router.back()"
>
返回
</a-button>
<!--
<a-button
type=
"success"
@
click=
"examine"
v-if=
"isUpdate == false && routerId >0"
>
审核
</a-button>
-->
<!--
<a-button
type=
"success"
@
click=
"examine"
v-if=
"isUpdate == false && routerId >0"
>
审核
</a-button>
-->
</
template
>
</
template
>
<PageCard
v-for=
"(item, index) in tabsFormSchema"
:key=
"index"
:title=
"item.name"
>
<PageCard
v-for=
"(item, index) in tabsFormSchema"
:key=
"index"
:title=
"item.name"
>
<
template
#
right
>
<
template
#
right
>
<a-button
<a-button
v-if=
"isUpdate==
true"
v-if=
"isUpdate ==
true"
type=
"text"
type=
"text"
preIcon=
"ant-design:delete-outlined"
preIcon=
"ant-design:delete-outlined"
danger
danger
@
click=
"deleteItem(index,
item)"
@
click=
"deleteItem(index,
item)"
>
>
</a-button>
</a-button>
</
template
>
</
template
>
<BasicForm
:loading=
"loading"
@
register=
"item.Form[0]"
>
<BasicForm
:loading=
"loading"
@
register=
"item.Form[0]"
>
</BasicForm>
</BasicForm>
<PageCard
<PageCard
v-for=
"(content, contentIndex) in item.ContentFormList"
:key=
"contentIndex"
v-for=
"(content, contentIndex) in item.ContentFormList"
:title=
"'合同'+contractName[index].contractNameList[contentIndex]"
>
:key=
"contentIndex"
<BasicForm
:loading=
"loading"
@
register=
"content.ContentFormList"
/>
:title=
"'合同' + contractName[index].contractNameList[contentIndex]"
>
<BasicForm
:loading=
"loading"
@
register=
"content.ContentFormList"
/>
</PageCard>
</PageCard>
</PageCard>
</PageCard>
<a-button
type=
"dashed"
@
click=
"add"
preIcon=
"ei:plus"
v-if=
"buttonShow"
>
从合同中导入
</a-button>
<a-button
type=
"dashed"
@
click=
"add"
preIcon=
"ei:plus"
v-if=
"buttonShow"
>
<a-button
type=
"dashed"
@
click=
"handleAdd"
class=
"ml-2"
preIcon=
"ei:plus"
v-if=
"buttonShow"
>
新建合同
</a-button>
从合同中导入
</a-button
<contractDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
>
<projectlibraryModel
@
register=
"register"
@
close=
"handleNewData"
/>
<a-button
type=
"dashed"
@
click=
"handleAdd"
class=
"ml-2"
preIcon=
"ei:plus"
v-if=
"buttonShow"
>
新建合同
</a-button
>
<contractDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<projectlibraryModel
@
register=
"register"
@
close=
"handleNewData"
/>
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
unref
,
computed
,
onMounted
,
reactive
,
ref
}
from
'vue'
;
import
{
router
}
from
'@/router'
;
const
getTitle
=
ref
(
''
);
//新建合同
import
projectlibraryModel
from
'@/components/ContractModel/Contract.vue'
;
import
{
useRoute
}
from
'vue-router'
;
//分页查询
import
{
PageWrapper
}
from
'@/components/Page'
;
//卡片
import
PageCard
from
'@/components/Page/src/PageCard.vue'
;
//合同弹出框
import
contractDrawer
from
'@/views/contract/contractDrawer.vue'
;
//表单
import
{
BasicForm
,
useForm
,
FormProps
,
UseFormReturnType
}
from
'@/components/Form'
;
import
{
formSchema
,
Content
}
from
'./changeSignatrue.data'
;
//引入api
import
{
deepMerge
}
from
'@/utils'
;
//引入弹框
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
//引入弹框
import
{
useDrawer
}
from
'@/components/Drawer'
;
//引入api
import
{
nextTick
}
from
'vue'
;
import
{
unref
,
computed
,
onMounted
,
reactive
,
ref
}
from
'vue'
;
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
import
{
router
}
from
"@/router"
;
import
{
useModal
}
from
'@/components/Modal'
;
const
getTitle
=
ref
(
''
);
import
{
EditModel
}
from
'@/api/project/model/changeSignatureModel'
;
//新建合同
import
{
getItem
,
addItem
,
updateItem
,
deleteOne
}
from
'@/api/changeSignatrue/changeSignatrue'
;
import
projectlibraryModel
from
'@/components/ContractModel/Contract.vue'
;
import
{
useRoute
}
from
'vue-router'
;
const
[
register
,
{
openModal
:
openModal
}]
=
useModal
();
//分页查询
const
{
createMessage
}
=
useMessage
();
import
{
PageWrapper
}
from
'@/components/Page'
;
const
formData
=
ref
<
EditModel
>
({
management
:
[],
proClosingQuarter
:
undefined
});
//卡片
const
loadingRef
=
ref
(
false
);
import
PageCard
from
'@/components/Page/src/PageCard.vue'
;
//删除id集合
//合同弹出框
const
idList
=
ref
([]);
import
contractDrawer
from
'@/views/contract/contractDrawer.vue'
;
//表单
import
{
BasicForm
,
useForm
,
FormProps
,
UseFormReturnType
}
from
'@/components/Form'
;
import
{
formSchema
,
Content
}
from
'./changeSignatrue.data'
;
//引入api
import
{
deepMerge
}
from
'@/utils'
;
//引入弹框
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
//引入弹框
import
{
useDrawer
}
from
'@/components/Drawer'
;
//引入api
import
{
nextTick
}
from
'vue'
;
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
//列表对象
import
{
useModal
}
from
'@/components/Modal'
;
const
tabsFormSchema
=
reactive
<
TabsFormType
[]
>
([]);
import
{
EditModel
}
from
"@/api/project/model/changeSignatureModel"
;
//获取id
import
{
getItem
,
addItem
,
updateItem
,
deleteOne
}
from
'@/api/changeSignatrue/changeSignatrue'
;
//合同名称
const
contractName
=
ref
([]);
const
[
register
,
{
openModal
:
openModal
}]
=
useModal
();
const
isUpdate
=
ref
(
false
);
const
{
createMessage
}
=
useMessage
();
const
routerId
=
ref
(
null
);
const
formData
=
ref
<
EditModel
>
({
management
:
[],
proClosingQuarter
:
undefined
});
//提交按钮的显示
const
loadingRef
=
ref
(
false
);
const
showSubmit
=
ref
(
false
);
//删除id集合
// batton 显示
const
idList
=
ref
([])
const
buttonShow
=
ref
(
true
);
//表单禁用
//列表对象
const
disabled
=
ref
(
false
);
const
tabsFormSchema
=
reactive
<
TabsFormType
[]
>
([]);
//获取id
//合同名称
const
contractName
=
ref
([]);
const
isUpdate
=
ref
(
false
)
const
routerId
=
ref
(
null
)
//提交按钮的显示
const
showSubmit
=
ref
(
false
)
// batton 显示
const
buttonShow
=
ref
(
true
)
//表单禁用
const
disabled
=
ref
(
false
)
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
const
route
=
useRoute
();
const
route
=
useRoute
();
var
id
=
route
.
query
.
id
;
var
id
=
route
.
query
.
id
;
if
(
id
)
{
if
(
id
)
{
routerId
.
value
=
id
routerId
.
value
=
id
;
const
resData
=
await
getItem
({
"id"
:
id
})
const
resData
=
await
getItem
({
id
:
id
});
if
(
route
.
query
.
isUpdate
===
"true"
){
if
(
route
.
query
.
isUpdate
===
'true'
)
{
getTitle
.
value
=
"编辑变更签证"
getTitle
.
value
=
'编辑变更签证'
;
showSubmit
.
value
=
true
showSubmit
.
value
=
true
;
isUpdate
.
value
=
true
isUpdate
.
value
=
true
;
}
}
else
{
else
{
getTitle
.
value
=
'查看变更签证'
;
getTitle
.
value
=
"查看变更签证"
buttonShow
.
value
=
false
;
buttonShow
.
value
=
false
isUpdate
.
value
=
false
;
isUpdate
.
value
=
false
disabled
.
value
=
true
;
disabled
.
value
=
true
}
}
//定义数据
//定义数据
formData
.
value
.
management
=
[];
formData
.
value
.
management
=
[];
for
(
let
i
=
0
;
i
<
resData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
resData
.
length
;
i
++
)
{
//构建id集合
//构建id集合
const
source
=
resData
[
i
];
const
source
=
resData
[
i
];
let
Name
=
{
let
Name
=
{
//项目id
//项目id
projectId
:
source
.
projectId
,
projectId
:
source
.
projectId
,
//合同名称
//合同名称
contractNameList
:
[],
contractNameList
:
[],
}
};
const
item
=
{
const
item
=
{
name
:
'序号'
+
(
i
+
1
),
name
:
'序号'
+
(
i
+
1
),
projectId
:
source
.
projectId
,
projectId
:
source
.
projectId
,
forceRender
:
true
,
forceRender
:
true
,
Form
:
useForm
(
Object
.
assign
({
schemas
:
formSchema
,
disabled
},
baseFormConfig
)
as
FormProps
),
Form
:
useForm
(
Object
.
assign
({
schemas
:
formSchema
,
disabled
},
baseFormConfig
)
as
FormProps
,
),
ContentFormList
:
[],
ContentFormList
:
[],
};
};
tabsFormSchema
.
push
(
item
);
tabsFormSchema
.
push
(
item
);
contentAdd
(
item
.
Form
[
1
],
source
,
source
.
contractList
[
0
].
amountInvested
)
contentAdd
(
item
.
Form
[
1
],
source
,
source
.
contractList
[
0
].
amountInvested
);
//合同名称集合
//合同名称集合
let
contractList
=
[]
let
contractList
=
[];
for
(
let
j
=
0
;
j
<
source
.
contractList
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
source
.
contractList
.
length
;
j
++
)
{
const
sourceItem
=
source
.
contractList
[
j
];
const
sourceItem
=
source
.
contractList
[
j
];
console
.
log
(
sourceItem
,
"数据查看"
)
console
.
log
(
sourceItem
,
'数据查看'
);
const
contentItem
=
{
const
contentItem
=
{
ContentFormList
:
useForm
(
Object
.
assign
({
schemas
:
Content
,
disabled
},
baseFormConfig
)
as
FormProps
),
ContentFormList
:
useForm
(
Object
.
assign
({
schemas
:
Content
,
disabled
},
baseFormConfig
)
as
FormProps
,
),
};
};
item
.
ContentFormList
.
push
(
contentItem
)
item
.
ContentFormList
.
push
(
contentItem
);
Name
.
contractNameList
.
push
(
sourceItem
.
contrcatName
)
Name
.
contractNameList
.
push
(
sourceItem
.
contrcatName
);
contentAdd
(
contentItem
.
ContentFormList
[
1
],
sourceItem
,
null
)
contentAdd
(
contentItem
.
ContentFormList
[
1
],
sourceItem
,
null
);
const
contract
=
{
const
contract
=
{
contractId
:
sourceItem
.
contractId
,
contractId
:
sourceItem
.
contractId
,
id
:
sourceItem
.
id
,
id
:
sourceItem
.
id
,
proChngeVisaQuarterId
:
sourceItem
.
proChngeVisaQuarterId
proChngeVisaQuarterId
:
sourceItem
.
proChngeVisaQuarterId
,
}
};
contractList
.
push
(
contract
)
contractList
.
push
(
contract
);
}
}
formData
.
value
.
management
.
push
({
formData
.
value
.
management
.
push
({
projectId
:
source
.
projectId
,
projectId
:
source
.
projectId
,
projectName
:
source
.
projectName
,
projectName
:
source
.
projectName
,
fundingSource
:
source
.
fundingSource
,
fundingSource
:
source
.
fundingSource
,
contract
:
contractList
contract
:
contractList
,
})
});
contractName
.
value
.
push
(
Name
)
contractName
.
value
.
push
(
Name
);
}
}
}
else
{
}
else
{
isUpdate
.
value
=
true
isUpdate
.
value
=
true
;
showSubmit
.
value
=
true
showSubmit
.
value
=
true
;
formData
.
value
.
proClosingQuarter
=
{}
formData
.
value
.
proClosingQuarter
=
{};
formData
.
value
.
proClosingQuarter
.
companyName
=
"sdfh"
formData
.
value
.
proClosingQuarter
.
companyName
=
'sdfh'
;
formData
.
value
.
proClosingQuarter
.
status
=
"0"
formData
.
value
.
proClosingQuarter
.
status
=
'0'
;
formData
.
value
.
proClosingQuarter
.
quarter
=
route
.
query
.
quarter
formData
.
value
.
proClosingQuarter
.
quarter
=
route
.
query
.
quarter
;
formData
.
value
.
proClosingQuarter
.
givenYear
=
route
.
query
.
year
formData
.
value
.
proClosingQuarter
.
givenYear
=
route
.
query
.
year
;
formData
.
value
.
proClosingQuarter
.
yearQuarter
=
route
.
query
.
year
+
"年第"
+
route
.
query
.
quarter
+
"季度"
formData
.
value
.
proClosingQuarter
.
yearQuarter
=
route
.
query
.
year
+
'年第'
+
route
.
query
.
quarter
+
'季度'
;
getTitle
.
value
=
'新建变更签证'
;
getTitle
.
value
=
'新建变更签证'
;
}
}
})
});
type
TabsFormType
=
{
type
TabsFormType
=
{
name
:
string
;
name
:
string
;
forceRender
?:
boolean
;
forceRender
?:
boolean
;
projectId
:
string
|
number
;
projectId
:
string
|
number
;
Form
:
UseFormReturnType
;
Form
:
UseFormReturnType
;
ContentFormList
:
Array
<
UseFormReturnType
>
;
ContentFormList
:
Array
<
UseFormReturnType
>
;
};
};
//配置
//配置
const
baseFormConfig
:
Partial
<
FormProps
>
=
{
const
baseFormConfig
:
Partial
<
FormProps
>
=
{
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
labelWidth
:
100
,
labelWidth
:
100
,
layout
:
'vertical'
,
layout
:
'vertical'
,
};
};
//导入合同的确认
//导入合同的确认
async
function
handleNewData
(
info
:
any
)
{
async
function
handleNewData
(
info
:
any
)
{
if
(
info
)
{
if
(
info
)
{
info
.
map
((
i
)
=>
{
info
.
map
((
i
)
=>
{
handleNew
(
i
);
handleNew
(
i
);
});
});
}
}
}
}
// 构建表单
// 构建表单
async
function
handleNew
(
info
:
any
)
{
async
function
handleNew
(
info
:
any
)
{
//判断项目id是否相同
//判断项目id是否相同
if
(
formData
.
value
.
management
.
some
(
obj
=>
obj
.
projectId
===
info
.
projectId
))
{
if
(
formData
.
value
.
management
.
some
((
obj
)
=>
obj
.
projectId
===
info
.
projectId
))
{
const
item
=
{
const
item
=
{
ContentFormList
:
useForm
(
Object
.
assign
({
schemas
:
Content
,
disabled
},
baseFormConfig
)
as
FormProps
),
ContentFormList
:
useForm
(
Object
.
assign
({
schemas
:
Content
,
disabled
},
baseFormConfig
)
as
FormProps
,
),
};
};
const
index
=
tabsFormSchema
.
findIndex
(
obj
=>
obj
.
projectId
===
info
.
projectId
);
const
index
=
tabsFormSchema
.
findIndex
((
obj
)
=>
obj
.
projectId
===
info
.
projectId
);
const
contractList
=
formData
.
value
.
management
[
index
].
contract
const
contractList
=
formData
.
value
.
management
[
index
].
contract
;
if
(
contractList
.
some
(
obj
=>
obj
.
contractId
===
info
.
id
)){
if
(
contractList
.
some
((
obj
)
=>
obj
.
contractId
===
info
.
id
))
{
console
.
log
(
"id相同"
,
contractList
[
index
])
console
.
log
(
'id相同'
,
contractList
[
index
]);
}
}
else
{
else
{
for
(
let
i
=
0
;
i
<
contractList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
contractList
.
length
;
i
++
)
{
if
(
contractList
[
i
].
contractId
!==
info
.
id
)
{
if
(
contractList
[
i
].
contractId
!==
info
.
id
)
{
console
.
log
(
"id不相同"
,
contractList
[
i
])
console
.
log
(
'id不相同'
,
contractList
[
i
]);
contractName
.
value
[
index
].
contractNameList
.
push
(
info
.
contrcatName
)
contractName
.
value
[
index
].
contractNameList
.
push
(
info
.
contrcatName
);
tabsFormSchema
[
index
].
ContentFormList
.
push
(
item
);
tabsFormSchema
[
index
].
ContentFormList
.
push
(
item
);
if
(
isUpdate
)
{
if
(
isUpdate
)
{
formData
.
value
.
management
[
index
].
contract
.
push
({
formData
.
value
.
management
[
index
].
contract
.
push
({
contractId
:
info
.
id
,
contractId
:
info
.
id
,
proChngeVisaQuarterId
:
routerId
.
value
proChngeVisaQuarterId
:
routerId
.
value
,
});
});
}
}
else
{
else
{
formData
.
value
.
management
[
index
].
contract
.
push
({
formData
.
value
.
management
[
index
].
contract
.
push
({
contractId
:
info
.
id
,
contractId
:
info
.
id
,
});
});
...
@@ -215,47 +223,51 @@ async function handleNew(info: any) {
...
@@ -215,47 +223,51 @@ async function handleNew(info: any) {
}
}
}
else
{
}
else
{
const
contentItem
=
{
const
contentItem
=
{
ContentFormList
:
useForm
(
Object
.
assign
({
schemas
:
Content
,
disabled
},
baseFormConfig
)
as
FormProps
),
ContentFormList
:
useForm
(
Object
.
assign
({
schemas
:
Content
,
disabled
},
baseFormConfig
)
as
FormProps
,
),
};
};
//合同名称集合
//合同名称集合
const
contractNameList
=
[]
const
contractNameList
=
[];
console
.
log
(
"合同名称"
,
info
)
console
.
log
(
'合同名称'
,
info
);
contractNameList
.
push
(
info
.
contrcatName
)
contractNameList
.
push
(
info
.
contrcatName
);
//构建合同名称
//构建合同名称
let
Name
=
{
let
Name
=
{
//项目id
//项目id
projectId
:
info
.
projectId
,
projectId
:
info
.
projectId
,
//合同名称
//合同名称
contractNameList
:
contractNameList
,
contractNameList
:
contractNameList
,
}
};
contractName
.
value
.
push
(
Name
)
contractName
.
value
.
push
(
Name
);
const
list
=
[];
const
list
=
[];
list
.
push
(
contentItem
)
list
.
push
(
contentItem
);
const
item
=
{
const
item
=
{
name
:
'序号'
+
(
tabsFormSchema
.
length
+
1
),
name
:
'序号'
+
(
tabsFormSchema
.
length
+
1
),
projectId
:
info
.
projectId
,
projectId
:
info
.
projectId
,
forceRender
:
true
,
forceRender
:
true
,
Form
:
useForm
(
Object
.
assign
({
schemas
:
formSchema
,
disabled
},
baseFormConfig
)
as
FormProps
),
Form
:
useForm
(
Object
.
assign
({
schemas
:
formSchema
,
disabled
},
baseFormConfig
)
as
FormProps
,
),
ContentFormList
:
list
,
ContentFormList
:
list
,
};
};
const
{
setFieldsValue
}
=
item
.
Form
[
1
];
const
{
setFieldsValue
}
=
item
.
Form
[
1
];
tabsFormSchema
.
push
(
item
);
tabsFormSchema
.
push
(
item
);
const
contractList
=
[]
const
contractList
=
[];
const
contract
=
{
const
contract
=
{
contractId
:
info
.
id
,
contractId
:
info
.
id
,
proChngeVisaQuarterId
:
null
proChngeVisaQuarterId
:
null
,
}
};
if
(
isUpdate
)
{
if
(
isUpdate
)
{
//proChngeVisaQuarterId
//proChngeVisaQuarterId
contract
.
proChngeVisaQuarterId
=
parseInt
(
routerId
.
value
)
contract
.
proChngeVisaQuarterId
=
parseInt
(
routerId
.
value
);
}
}
contractList
.
push
(
contract
)
contractList
.
push
(
contract
);
formData
.
value
.
management
.
push
({
formData
.
value
.
management
.
push
({
projectId
:
info
.
projectId
,
projectId
:
info
.
projectId
,
projectName
:
info
.
projectName
,
projectName
:
info
.
projectName
,
fundingSource
:
info
.
fundingSource
,
fundingSource
:
info
.
fundingSource
,
contract
:
contractList
contract
:
contractList
,
});
});
nextTick
(()
=>
{
nextTick
(()
=>
{
setFieldsValue
({
setFieldsValue
({
...
@@ -264,115 +276,110 @@ async function handleNew(info: any) {
...
@@ -264,115 +276,110 @@ async function handleNew(info: any) {
});
});
});
});
}
}
}
}
//提交
//提交
async
function
handleSubmit
()
{
async
function
handleSubmit
()
{
//构建数据
//构建数据
const
data
=
{
const
data
=
{
management
:
""
,
management
:
''
,
idList
:
idList
.
value
,
idList
:
idList
.
value
,
proClosingQuarter
:
formData
.
value
.
proClosingQuarter
,
proClosingQuarter
:
formData
.
value
.
proClosingQuarter
,
};
};
const
management
=
[];
const
management
=
[];
loadingRef
.
value
=
true
;
loadingRef
.
value
=
true
;
console
.
log
(
formData
.
value
)
console
.
log
(
formData
.
value
);
for
(
let
i
=
0
;
i
<
tabsFormSchema
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
tabsFormSchema
.
length
;
i
++
)
{
//数据构建
//数据构建
const
contrantData
=
{
const
contrantData
=
{
projectId
:
""
,
projectId
:
''
,
contractList
:[]
contractList
:
[],
}
};
let
item
=
tabsFormSchema
[
i
];
let
item
=
tabsFormSchema
[
i
];
const
{
validate
}
=
item
.
Form
[
1
];
const
{
validate
}
=
item
.
Form
[
1
];
const
data
=
await
validate
();
const
data
=
await
validate
();
await
handleNewContent
(
item
.
Form
[
1
])
await
handleNewContent
(
item
.
Form
[
1
]);
const
{
getFieldsValue
}
=
item
.
Form
[
1
]
const
{
getFieldsValue
}
=
item
.
Form
[
1
];
contrantData
.
projectId
=
tabsFormSchema
[
i
].
projectId
;
contrantData
.
projectId
=
tabsFormSchema
[
i
].
projectId
;
var
projectInvoice
=
getFieldsValue
().
amountInvested
var
projectInvoice
=
getFieldsValue
().
amountInvested
;
for
(
let
j
=
0
;
j
<
item
.
ContentFormList
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
item
.
ContentFormList
.
length
;
j
++
)
{
let
content
=
item
.
ContentFormList
[
j
]
let
content
=
item
.
ContentFormList
[
j
];
const
{
getFieldsValue
}
=
content
.
ContentFormList
[
1
]
const
{
getFieldsValue
}
=
content
.
ContentFormList
[
1
];
await
handleNewContent
(
content
.
ContentFormList
[
1
])
await
handleNewContent
(
content
.
ContentFormList
[
1
]);
let
res
=
getFieldsValue
();
let
res
=
getFieldsValue
();
if
(
!
isUpdate
){
if
(
!
isUpdate
)
{
let
itemConetnt
=
Object
.
assign
let
itemConetnt
=
Object
.
assign
(
res
,
{
(
res
,{
amountInvested
:
projectInvoice
,
contractId
:
formData
.
value
.
management
[
i
].
contract
[
j
].
contractId
})
amountInvested
:
projectInvoice
,
contrantData
.
contractList
.
push
(
itemConetnt
)
}
else
{
let
itemConetnt
=
Object
.
assign
(
res
,{
id
:
formData
.
value
.
management
[
i
].
contract
[
j
].
id
,
amountInvested
:
projectInvoice
,
contractId
:
formData
.
value
.
management
[
i
].
contract
[
j
].
contractId
,
contractId
:
formData
.
value
.
management
[
i
].
contract
[
j
].
contractId
,
proChngeVisaQuarterId
:
formData
.
value
.
management
[
i
].
contract
[
j
].
proChngeVisaQuarterId
});
})
contrantData
.
contractList
.
push
(
itemConetnt
);
contrantData
.
contractList
.
push
(
itemConetnt
)
}
else
{
let
itemConetnt
=
Object
.
assign
(
res
,
{
id
:
formData
.
value
.
management
[
i
].
contract
[
j
].
id
,
amountInvested
:
projectInvoice
,
contractId
:
formData
.
value
.
management
[
i
].
contract
[
j
].
contractId
,
proChngeVisaQuarterId
:
formData
.
value
.
management
[
i
].
contract
[
j
].
proChngeVisaQuarterId
,
});
contrantData
.
contractList
.
push
(
itemConetnt
);
}
}
}
}
management
.
push
(
contrantData
)
management
.
push
(
contrantData
);
}
}
data
.
management
=
management
;
data
.
management
=
management
;
//新增接口
//新增接口
if
(
routerId
.
value
)
{
if
(
routerId
.
value
)
{
const
res
=
updateItem
(
data
)
const
res
=
updateItem
(
data
);
createMessage
.
success
(
'提交成功!'
);
createMessage
.
success
(
'提交成功!'
);
router
.
go
(
-
1
)
router
.
go
(
-
1
);
}
}
else
{
else
{
const
res
=
await
addItem
(
data
);
const
res
=
await
addItem
(
data
)
createMessage
.
success
(
'提交成功!'
);
createMessage
.
success
(
'提交成功!'
);
router
.
go
(
-
1
)
router
.
go
(
-
1
);
}
}
//修改接口
//修改接口
}
}
async
function
add
()
{
async
function
add
()
{
openModal
();
openModal
();
}
}
//j
//j
function
contentAdd
(
contentItem
,
sourceItem
,
amountInvested
)
{
console
.
log
(
"contentItem"
,
contentItem
,
"sourceItem"
,
sourceItem
)
const
{
setFieldsValue
}
=
contentItem
;
if
(
amountInvested
){
sourceItem
=
Object
.
assign
function
contentAdd
(
contentItem
,
sourceItem
,
amountInvested
)
{
(
sourceItem
,{
amountInvested
:
amountInvested
})
console
.
log
(
'contentItem'
,
contentItem
,
'sourceItem'
,
sourceItem
);
const
{
setFieldsValue
}
=
contentItem
;
if
(
amountInvested
)
{
sourceItem
=
Object
.
assign
(
sourceItem
,
{
amountInvested
:
amountInvested
});
}
}
nextTick
(()
=>
{
nextTick
(()
=>
{
setFieldsValue
({
setFieldsValue
({
...
sourceItem
,
...
sourceItem
,
});
});
});
});
}
}
//删除项目
//删除项目
function
deleteItem
(
index
,
item
)
{
function
deleteItem
(
index
,
item
)
{
idList
.
value
.
push
(
item
.
projectId
)
idList
.
value
.
push
(
item
.
projectId
);
console
.
log
(
"idList"
,
idList
)
console
.
log
(
'idList'
,
idList
);
// if(routerId.value){
// if(routerId.value){
// deleteOne({id:contractName.value[index].projectId})
// deleteOne({id:contractName.value[index].projectId})
// }
// }
tabsFormSchema
.
splice
(
index
,
1
)
tabsFormSchema
.
splice
(
index
,
1
);
formData
.
value
.
management
.
splice
(
index
,
1
)
formData
.
value
.
management
.
splice
(
index
,
1
);
contractName
.
value
.
splice
(
index
,
1
)
contractName
.
value
.
splice
(
index
,
1
);
}
}
async
function
handleAdd
()
{
async
function
handleAdd
()
{
openDrawer
(
true
,
{
openDrawer
(
true
,
{
isUpdate
:
false
,
isUpdate
:
false
,
});
});
}
}
// 校验方法
// 校验方法
function
handleNewContent
(
params
)
{
function
handleNewContent
(
params
)
{
const
{
validate
}
=
params
;
const
{
validate
}
=
params
;
const
data
=
validate
()
const
data
=
validate
();
return
data
;
return
data
;
}
}
async
function
handleSuccess
(
params
:
any
)
{
async
function
handleSuccess
(
params
:
any
)
{
handleNew
(
params
);
handleNew
(
params
);
}
}
</
script
>
</
script
>
src/views/project/detail.vue
View file @
d82fdc3d
...
@@ -16,6 +16,9 @@
...
@@ -16,6 +16,9 @@
<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=
"mdi:book-add"
@
click=
"importContract"
>
导入合同
</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>
...
@@ -79,13 +82,14 @@
...
@@ -79,13 +82,14 @@
</div>
</div>
<projectDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<projectDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<contractDrawer
@
register=
"register2"
@
success=
"handleRegisterSuccess"
/>
<contractDrawer
@
register=
"register2"
@
success=
"handleRegisterSuccess"
/>
<uploadContractModal
@
register=
"registerModal2"
/>
<uploadModal
@
register=
"registerModal"
@
close=
"handleNewFile"
/>
<uploadModal
@
register=
"registerModal"
@
close=
"handleNewFile"
/>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
projectDrawer
from
'./projectDrawer.vue'
;
import
projectDrawer
from
'./projectDrawer.vue'
;
import
uploadModal
from
'./uploadModal.vue'
;
import
uploadModal
from
'./uploadModal.vue'
;
import
uploadContractModal
from
'./uploadContractModal.vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
getItem
,
deleteItem
}
from
'@/api/project/project'
;
import
{
getItem
,
deleteItem
}
from
'@/api/project/project'
;
...
@@ -112,6 +116,7 @@
...
@@ -112,6 +116,7 @@
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
register2
,
{
openDrawer
:
openDrawer2
}]
=
useDrawer
();
const
[
register2
,
{
openDrawer
:
openDrawer2
}]
=
useDrawer
();
const
[
registerModal
,
{
openModal
:
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
:
openModal
}]
=
useModal
();
const
[
registerModal2
,
{
openModal
:
openModal2
}]
=
useModal
();
import
contractDrawer
from
'@/views/contract/contractDrawer.vue'
;
import
contractDrawer
from
'@/views/contract/contractDrawer.vue'
;
const
tabs
=
{
const
tabs
=
{
InvestmentPlan
,
InvestmentPlan
,
...
@@ -158,6 +163,11 @@
...
@@ -158,6 +163,11 @@
projectId
:
detailId
.
value
,
projectId
:
detailId
.
value
,
});
});
}
}
function
importContract
()
{
openModal2
(
true
,
{
projectId
:
detailId
.
value
,
});
}
async
function
handleRegisterSuccess
(
params
:
any
)
{
async
function
handleRegisterSuccess
(
params
:
any
)
{
// handleNew(params);
// handleNew(params);
}
}
...
...
src/views/project/detail2.vue
deleted
100644 → 0
View file @
dc2693ba
<
template
>
<div
class=
"header"
>
<div
class=
"header-tab"
>
<!--
<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-title"
>
{{
detail
.
projectName
}}
</div>
<div
class=
"header-tab-right-desc"
>
{{
detail
.
projectName
}}
</div>
</div>
</div>
<div
class=
"header-tool"
>
<a-button
type=
"default"
class=
"btn"
preIcon=
"ri:edit-line"
@
click=
"handleEdit"
>
编辑项目
</a-button>
<a-button
type=
"default"
class=
"btn"
preIcon=
"mdi:book-add"
@
click=
"handleContent"
>
添加合同
</a-button>
<a-button
type=
"default"
class=
"btn"
preIcon=
"humbleicons:upload"
@
click=
"handleUpload"
>
上传附件
</a-button>
<a-button
type=
"default"
class=
"btn"
preIcon=
"ant-design:delete-outlined"
@
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
>
</div>
</div>
<!--
<Descriptions></Descriptions>
-->
</div>
<div
class=
"body"
>
<Tabs>
<template
v-for=
"item in tabList"
:key=
"item.key"
>
<TabPane
:tab=
"item.tab"
>
<component
:is=
"tabs[item.component]"
/>
</TabPane>
</
template
>
</Tabs>
</div>
<projectDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<contractDrawer
@
register=
"register2"
@
success=
"handleRegisterSuccess"
/>
<uploadModal
@
register=
"registerModal"
@
close=
"handleNewFile"
/>
</template>
<
script
lang=
"ts"
setup
>
import
projectDrawer
from
'./projectDrawer.vue'
;
import
uploadModal
from
'./uploadModal.vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
getItem
,
deleteItem
}
from
'@/api/project/project'
;
import
{
tabList
}
from
'./project.data'
;
import
{
ref
,
onMounted
,
provide
}
from
'vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
router
}
from
'@/router'
;
import
InvestmentPlan
from
'./tabs/InvestmentPlan.vue'
;
import
performance
from
'./tabs/performance.vue'
;
import
annualPlan
from
'./tabs/annualPlan.vue'
;
import
monthlyPlan
from
'./tabs/monthlyPlan.vue'
;
import
completed
from
'./tabs/completed.vue'
;
import
biddingPlan
from
'./tabs/biddingPlan.vue'
;
import
biddingManagement
from
'./tabs/biddingManagement.vue'
;
import
settlementManagement
from
'./tabs/settlementManagement.vue'
;
import
changeSignature
from
'./tabs/changeSignature.vue'
;
import
potentialSafety
from
'./tabs/potentialSafety.vue'
;
import
safetyEducation
from
'./tabs/safetyEducation.vue'
;
import
contract
from
'./tabs/contract.vue'
;
import
annex
from
'./tabs/annex.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'
;
const
tabs
=
{
InvestmentPlan
,
performance
,
annualPlan
,
monthlyPlan
,
completed
,
biddingPlan
,
biddingManagement
,
settlementManagement
,
changeSignature
,
potentialSafety
,
safetyEducation
,
contract
,
annex
,
updateRecords
,
};
const
TabPane
=
Tabs
.
TabPane
;
const
{
createMessage
}
=
useMessage
();
let
detail
=
ref
<
any
>
({});
let
detailId
=
ref
<
any
>
(
0
);
// onMounted(async () => {
const
route
=
useRoute
();
detailId
.
value
=
route
.
query
.
id
;
// 获取名为id的参数
provide
(
'detailId'
,
detailId
.
value
);
handleDetail
();
// });
function
handleEdit
()
{
openDrawer
(
true
,
{
record
:
detail
,
isUpdate
:
true
,
});
}
function
handleContent
()
{
openDrawer2
(
true
,
{
projectId
:
detailId
.
value
,
isUpdate
:
false
,
});
}
function
handleUpload
()
{
openModal
(
true
,
{
projectId
:
detailId
.
value
,
});
}
async
function
handleRegisterSuccess
(
params
:
any
)
{
// handleNew(params);
}
async
function
handleSuccess
(
record
:
any
)
{
// detail.value = record;
await
handleDetail
();
}
async
function
handleDetail
()
{
let
res
=
await
getItem
({
id
:
detailId
.
value
});
detail
.
value
=
res
;
console
.
log
(
detail
.
value
);
}
function
handleDelete
()
{
deleteItem
({
id
:
detailId
.
value
}).
then
((
res
)
=>
{
createMessage
.
success
(
'删除成功!'
);
router
.
back
();
});
}
function
handleNewFile
()
{}
</
script
>
<
style
lang=
"less"
scoped
>
.header {
background-color: #ffffff;
margin: 0 16px;
margin-top: 16px;
height: 208px;
position: relative;
&-tool {
position: absolute;
right: 0;
top: 0;
padding-top: 20px;
padding-right: 20px;
.btn {
margin-left: 10px;
}
}
&-tab {
padding: 30px;
display: flex;
justify-content: flex-start;
align-items: center;
&-logo {
border-radius: 100%;
width: 72px;
height: 72px;
margin-right: 10px;
}
&-right {
display: flex;
flex-flow: column;
color: #1c1c1c;
&-title {
font-size: 36px;
}
&-desc {
font-size: 14px;
margin-top: 6px;
}
}
}
&-body {
display: flex;
flex-wrap: wrap;
&-item {
flex: 1;
&-title {
text-align: center;
color: #536387;
font-size: 14px;
}
&-value {
text-align: center;
color: #000000;
margin-top: 16px;
font-size: 12px;
}
}
}
}
</
style
>
<
style
lang=
"less"
>
.body {
margin: 16px;
padding: 10px 22px;
background-color: #ffffff;
.vben-basic-table-form-container {
padding: 0 !important;
}
.page-card {
padding: 0 !important;
}
.page-card-body {
padding: 0 !important;
}
}
</
style
>
src/views/project/tabs/InvestmentPlan.vue
View file @
d82fdc3d
<
template
>
<
template
>
<BasicTable
@
register=
"registerTable"
>
<BasicTable
@
register=
"registerTable"
>
<template
#
toolbar
>
<a-button
type=
"primary"
preIcon=
"mdi:plus"
@
click=
"handleExport"
>
导出筛选结果
</a-button>
<a-button
type=
"primary"
class=
"ml5"
preIcon=
"mdi:plus"
@
click=
"handleExport"
>
高级筛选
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record, index }"
>
<
template
#
bodyCell=
"{ column, record, index }"
>
<template
v-if=
"column.key === 'serialNumber'"
>
<template
v-if=
"column.key === 'serialNumber'"
>
{{
index
+
1
}}
{{
index
+
1
}}
...
@@ -19,15 +26,34 @@
...
@@ -19,15 +26,34 @@
</
template
>
</
template
>
</template>
</template>
</BasicTable>
</BasicTable>
<exportModal
@
register=
"registerModal"
/>
<queryModal
@
register=
"registerModal2"
/>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
exportModal
from
'./components/exportModal.vue'
;
import
queryModal
from
'./components/queryModal.vue'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
inject
}
from
'vue'
;
import
{
inject
,
ref
}
from
'vue'
;
import
{
getEngineeringList
}
from
'@/api/project/engineeringProject'
;
import
{
getEngineeringList
}
from
'@/api/project/engineeringProject'
;
import
{
router
}
from
'@/router'
;
import
{
router
}
from
'@/router'
;
import
{
useModal
}
from
'@/components/Modal'
;
const
[
registerModal
,
{
openModal
:
openModal
}]
=
useModal
();
const
[
registerModal2
,
{
openModal
:
openModal2
}]
=
useModal
();
let
detailId
=
inject
(
'detailId'
);
let
detailId
=
inject
(
'detailId'
);
console
.
log
(
'detailId'
,
detailId
);
console
.
log
(
'detailId'
,
detailId
);
function
getExportData
()
{
let
exportData
=
[];
columns
.
map
((
i
)
=>
{
exportData
.
push
({
label
:
i
.
title
,
value
:
i
.
dataIndex
,
});
});
return
exportData
;
}
getExportData
();
const
[
registerTable
,
{
reload
}]
=
useTable
({
const
[
registerTable
,
{
reload
}]
=
useTable
({
api
:
getEngineeringList
,
api
:
getEngineeringList
,
columns
,
columns
,
...
@@ -50,6 +76,12 @@
...
@@ -50,6 +76,12 @@
fixed
:
undefined
,
fixed
:
undefined
,
},
},
});
});
function
handleExport
()
{
openModal
(
true
,
{
projectId
:
detailId
,
exportData
:
getExportData
(),
});
}
function
handleDetail
(
record
:
Recordable
,
disabled
:
number
)
{
function
handleDetail
(
record
:
Recordable
,
disabled
:
number
)
{
if
(
record
.
planType
===
'工程'
)
{
if
(
record
.
planType
===
'工程'
)
{
router
.
push
({
router
.
push
({
...
...
src/views/project/tabs/components/exportModal.vue
0 → 100644
View file @
d82fdc3d
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"register"
title=
"导出筛选结果"
:minHeight=
"30"
okText=
"导出"
@
ok=
"handleSubmit"
@
visible-change=
"handleVisibleChange"
>
<BasicForm
@
register=
"registerForm"
:model=
"modelRef"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
nextTick
,
defineProps
,
defineEmits
,
unref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
FormSchema
,
useForm
}
from
'@/components/Form'
;
import
{
uploadApi
}
from
'@/api/sys/upload'
;
import
{
AnnexAdd
}
from
'@/api/project/project'
;
const
projectId
=
ref
(
0
);
const
schemas
:
FormSchema
[]
=
[
{
field
:
'colums'
,
component
:
'CheckboxGroup'
,
label
:
''
,
required
:
true
,
componentProps
:
{
options
:
[],
},
colProps
:
{
span
:
24
,
},
},
];
const
props
=
defineProps
({
userData
:
{
type
:
Object
},
});
function
handleVisibleChange
(
v
)
{
v
&&
props
.
userData
&&
nextTick
(()
=>
onDataReceive
(
props
.
userData
));
}
const
emit
=
defineEmits
([
'close'
,
'register'
]);
const
modelRef
=
ref
({});
const
[
registerForm
,
{
getFieldsValue
,
validate
,
updateSchema
,
// // setFieldsValue,
// setProps,
},
]
=
useForm
({
labelWidth
:
120
,
schemas
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
24
,
},
});
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
console
.
log
(
111
);
data
&&
onDataReceive
(
data
);
});
// function handleVisibleChange(v) {
// v && props.userData && nextTick(() => onDataReceive(props.userData));
// }
function
onDataReceive
(
data
)
{
console
.
log
(
'Data Received'
,
data
.
exportData
);
updateSchema
({
field
:
'colums'
,
componentProps
:
{
options
:
data
.
exportData
,
},
});
// console.log(props.userData);
// projectId.value = data.projectId;
// console.log(projectId.value);
}
function
handleSubmit
()
{
validate
().
then
(
async
()
=>
{
const
value
=
getFieldsValue
();
console
.
log
(
value
);
emit
(
'close'
);
closeModal
();
});
}
</
script
>
src/views/project/tabs/components/queryModal.vue
0 → 100644
View file @
d82fdc3d
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"register"
title=
"高级筛选"
:minHeight=
"30"
okText=
"提交"
@
ok=
"handleSubmit"
@
visible-change=
"handleVisibleChange"
>
<BasicForm
@
register=
"registerForm"
:model=
"modelRef"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
nextTick
,
defineProps
,
defineEmits
,
unref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
FormSchema
,
useForm
}
from
'@/components/Form'
;
import
{
uploadApi
}
from
'@/api/sys/upload'
;
import
{
AnnexAdd
}
from
'@/api/project/project'
;
const
projectId
=
ref
(
0
);
const
schemas
:
FormSchema
[]
=
[
{
field
:
'colums'
,
component
:
'CheckboxGroup'
,
label
:
''
,
required
:
true
,
componentProps
:
{
options
:
[],
},
colProps
:
{
span
:
24
,
},
},
];
const
props
=
defineProps
({
userData
:
{
type
:
Object
},
});
function
handleVisibleChange
(
v
)
{
v
&&
props
.
userData
&&
nextTick
(()
=>
onDataReceive
(
props
.
userData
));
}
const
emit
=
defineEmits
([
'close'
,
'register'
]);
const
modelRef
=
ref
({});
const
[
registerForm
,
{
getFieldsValue
,
validate
,
updateSchema
,
// // setFieldsValue,
// setProps,
},
]
=
useForm
({
labelWidth
:
120
,
schemas
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
24
,
},
});
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
console
.
log
(
111
);
data
&&
onDataReceive
(
data
);
});
// function handleVisibleChange(v) {
// v && props.userData && nextTick(() => onDataReceive(props.userData));
// }
function
onDataReceive
(
data
)
{
console
.
log
(
'Data Received'
,
data
.
exportData
);
updateSchema
({
field
:
'colums'
,
componentProps
:
{
options
:
data
.
exportData
,
},
});
// console.log(props.userData);
// projectId.value = data.projectId;
// console.log(projectId.value);
}
function
handleSubmit
()
{
validate
().
then
(
async
()
=>
{
const
value
=
getFieldsValue
();
console
.
log
(
value
);
emit
(
'close'
);
closeModal
();
});
}
</
script
>
src/views/project/tabs/data.ts
View file @
d82fdc3d
...
@@ -17,6 +17,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -17,6 +17,7 @@ export const searchFormSchema: FormSchema[] = [
colProps
:
{
span
:
5
},
colProps
:
{
span
:
5
},
},
},
];
];
export
const
columns
:
BasicColumn
[]
=
[
export
const
columns
:
BasicColumn
[]
=
[
{
{
title
:
'序号'
,
title
:
'序号'
,
...
@@ -25,22 +26,22 @@ export const columns: BasicColumn[] = [
...
@@ -25,22 +26,22 @@ export const columns: BasicColumn[] = [
},
},
{
{
title
:
'填报周期'
,
title
:
'填报周期'
,
dataIndex
:
'
serialNumber
'
,
dataIndex
:
'
filingCycle
'
,
width
:
180
,
width
:
180
,
},
},
{
{
title
:
'项目名称'
,
title
:
'项目名称'
,
dataIndex
:
'
serialNumber
'
,
dataIndex
:
'
projectName
'
,
width
:
180
,
width
:
180
,
},
},
{
{
title
:
'建设地点'
,
title
:
'建设地点'
,
dataIndex
:
'
serialNumber
'
,
dataIndex
:
'
constructionSite
'
,
width
:
180
,
width
:
180
,
},
},
{
{
title
:
'项目概况'
,
title
:
'项目概况'
,
dataIndex
:
'
serialNumber
'
,
dataIndex
:
'
projectOverview
'
,
width
:
180
,
width
:
180
,
},
},
{
{
...
@@ -50,27 +51,27 @@ export const columns: BasicColumn[] = [
...
@@ -50,27 +51,27 @@ export const columns: BasicColumn[] = [
},
},
{
{
title
:
'建设目的及项目功能'
,
title
:
'建设目的及项目功能'
,
dataIndex
:
'
serialNumber
'
,
dataIndex
:
'
constructionPurpose
'
,
width
:
180
,
width
:
180
,
},
},
{
{
title
:
'建设模式'
,
title
:
'建设模式'
,
dataIndex
:
'
serialNumber
'
,
dataIndex
:
'
constructionMode
'
,
width
:
180
,
width
:
180
,
},
},
{
{
title
:
'资金来源'
,
title
:
'资金来源'
,
dataIndex
:
'
serialNumber
'
,
dataIndex
:
'
fundingSource
'
,
width
:
180
,
width
:
180
,
},
},
{
{
title
:
'项目类型'
,
title
:
'项目类型'
,
dataIndex
:
'
serialNumber
'
,
dataIndex
:
'
projectType
'
,
width
:
180
,
width
:
180
,
},
},
{
{
title
:
'总投资'
,
title
:
'总投资'
,
dataIndex
:
'
serialNumber
'
,
dataIndex
:
'
totalInvestment
'
,
width
:
180
,
width
:
180
,
},
},
{
{
...
...
src/views/project/uploadContractModal.vue
0 → 100644
View file @
d82fdc3d
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"register"
title=
"上传附件"
:minHeight=
"30"
okText=
"保存"
@
ok=
"handleSubmit"
@
visible-change=
"handleVisibleChange"
>
<BasicForm
@
register=
"registerForm"
:model=
"modelRef"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
nextTick
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
FormSchema
,
useForm
}
from
'@/components/Form'
;
import
{
uploadApi
}
from
'@/api/sys/upload'
;
import
{
AnnexAdd
}
from
'@/api/project/project'
;
const
projectId
=
ref
(
0
);
const
schemas
:
FormSchema
[]
=
[
{
field
:
'url'
,
component
:
'Upload'
,
label
:
'上传附件'
,
required
:
true
,
componentProps
:
{
api
:
uploadApi
,
resultField
:
'data.data.fullPath'
,
accept
:
[
'rar'
,
'zip'
,
'doc'
,
'docx'
,
'pdf'
],
multiple
:
false
,
maxSize
:
20
,
maxNumber
:
1
,
name
:
'multipartFile'
,
},
colProps
:
{
span
:
24
,
},
},
{
field
:
'remarks'
,
label
:
'备注内容'
,
// required: true,
component
:
'InputTextArea'
,
componentProps
:
{
maxlength
:
300
,
showCount
:
true
,
},
colProps
:
{
span
:
24
},
},
];
const
props
=
defineProps
({
userData
:
{
type
:
Object
},
});
const
emit
=
defineEmits
([
'close'
,
'register'
]);
const
modelRef
=
ref
({});
const
[
registerForm
,
{
getFieldsValue
,
validate
,
// // setFieldsValue,
// // setProps
},
]
=
useForm
({
labelWidth
:
120
,
schemas
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
24
,
},
});
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
data
&&
onDataReceive
(
data
);
});
function
onDataReceive
(
data
)
{
console
.
log
(
'Data Received'
,
data
);
projectId
.
value
=
data
.
projectId
;
console
.
log
(
projectId
.
value
);
}
function
handleVisibleChange
(
v
)
{
v
&&
props
.
userData
&&
nextTick
(()
=>
onDataReceive
(
props
.
userData
));
}
function
handleSubmit
()
{
validate
().
then
(
async
()
=>
{
const
value
=
getFieldsValue
();
let
url
:
String
=
value
.
url
[
0
];
let
res
=
await
AnnexAdd
({
url
,
remark
:
value
.
remarks
,
proId
:
projectId
.
value
,
});
// console.log(res);
emit
(
'close'
);
closeModal
();
});
}
</
script
>
src/views/project/uploadModal.vue
View file @
d82fdc3d
...
@@ -52,7 +52,6 @@
...
@@ -52,7 +52,6 @@
const
props
=
defineProps
({
const
props
=
defineProps
({
userData
:
{
type
:
Object
},
userData
:
{
type
:
Object
},
});
});
const
emit
=
defineEmits
([
'close'
]);
const
modelRef
=
ref
({});
const
modelRef
=
ref
({});
const
[
const
[
registerForm
,
registerForm
,
...
@@ -84,7 +83,7 @@
...
@@ -84,7 +83,7 @@
function
handleVisibleChange
(
v
)
{
function
handleVisibleChange
(
v
)
{
v
&&
props
.
userData
&&
nextTick
(()
=>
onDataReceive
(
props
.
userData
));
v
&&
props
.
userData
&&
nextTick
(()
=>
onDataReceive
(
props
.
userData
));
}
}
const
emit
=
defineEmits
([
'close'
,
'register'
]);
function
handleSubmit
()
{
function
handleSubmit
()
{
validate
().
then
(
async
()
=>
{
validate
().
then
(
async
()
=>
{
const
value
=
getFieldsValue
();
const
value
=
getFieldsValue
();
...
...
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