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
f2cac34e
Commit
f2cac34e
authored
Jul 01, 2024
by
mengzixuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: (项目库-详情-招标计划): 年度资金计划导出修改
parent
aca7b255
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
85 deletions
+87
-85
exportModal.vue
src/views/project/annualDrawer/exportModal.vue
+87
-85
No files found.
src/views/project/annualDrawer/exportModal.vue
View file @
f2cac34e
...
@@ -12,17 +12,19 @@
...
@@ -12,17 +12,19 @@
</BasicModal>
</BasicModal>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
nextTick
,
defineProps
,
defineEmits
,
unref
}
from
'vue'
;
import
{
ref
,
nextTick
,
defineProps
,
defineEmits
,
unref
,
inject
}
from
'vue'
;
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'
;
import
{
uploadApi
}
from
'@/api/sys/upload'
;
import
{
exportData
}
from
'@/api/project/export'
;
import
{
AnnexAdd
}
from
'@/api/project/project'
;
import
{
downloadByData
}
from
'@/utils/file/download'
;
import
{
tenderPlanExport
}
from
'@/api/project/export'
;
const
title
=
ref
(
''
);
import
{
reject
}
from
'lodash-es'
;
const
exProjectUrl
=
ref
(
''
)
import
{
downloadByData
}
from
'@/utils/file/download'
;
const
projectId
=
ref
(
0
);
let
detailId
=
inject
(
'detailId'
);
const
projectId
=
ref
(
0
);
const
schemas
:
FormSchema
[]
=
[
const
searchData
=
ref
({})
const
schemas
:
FormSchema
[]
=
[
{
{
field
:
'colums'
,
field
:
'colums'
,
component
:
'CheckboxGroup'
,
component
:
'CheckboxGroup'
,
...
@@ -35,16 +37,16 @@
...
@@ -35,16 +37,16 @@
span
:
24
,
span
:
24
,
},
},
},
},
];
];
const
props
=
defineProps
({
const
props
=
defineProps
({
userData
:
{
type
:
Object
},
userData
:
{
type
:
Object
},
});
});
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'
]);
const
emit
=
defineEmits
([
'close'
,
'register'
]);
const
modelRef
=
ref
({});
const
modelRef
=
ref
({});
const
[
const
[
registerForm
,
registerForm
,
{
{
getFieldsValue
,
getFieldsValue
,
...
@@ -53,26 +55,28 @@
...
@@ -53,26 +55,28 @@
// // setFieldsValue,
// // setFieldsValue,
// setProps,
// setProps,
},
},
]
=
useForm
({
]
=
useForm
({
labelWidth
:
120
,
labelWidth
:
120
,
schemas
,
schemas
,
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
actionColOptions
:
{
span
:
24
,
span
:
24
,
},
},
});
});
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
console
.
log
(
111
);
console
.
log
(
111
);
exProjectUrl
.
value
=
data
.
exportUrl
;
if
(
data
.
title
){
console
.
log
(
data
.
title
,
"title"
)
}
title
.
value
=
data
.
title
;
searchData
.
value
=
data
.
searchData
;
data
&&
onDataReceive
(
data
);
data
&&
onDataReceive
(
data
);
});
});
// function handleVisibleChange(v) {
// v && props.userData && nextTick(() => onDataReceive(props.userData));
// }
function
onDataReceive
(
data
)
{
function
onDataReceive
(
data
)
{
console
.
log
(
'Data Received'
,
data
.
exportData
);
console
.
log
(
'Data Received'
,
data
.
exportData
);
updateSchema
({
updateSchema
({
field
:
'colums'
,
field
:
'colums'
,
...
@@ -80,22 +84,20 @@
...
@@ -80,22 +84,20 @@
options
:
data
.
exportData
,
options
:
data
.
exportData
,
},
},
});
});
// console.log(props.userData);
}
function
handleSubmit
()
{
// projectId.value = data.projectId;
// console.log(projectId.value);
}
function
handleSubmit
()
{
validate
().
then
(
async
()
=>
{
validate
().
then
(
async
()
=>
{
const
value
=
getFieldsValue
();
const
value
=
getFieldsValue
();
console
.
log
(
value
);
console
.
log
(
value
);
const
data
=
await
tenderPlanExport
({
const
data
=
await
exportData
(
exProjectUrl
.
value
,{
proId
:
detailId
,
colums
:
value
.
colums
,
colums
:
value
.
colums
,
searchField
:
{
biddingType
:
'施工'
}
,
searchField
:
searchData
.
value
,
});
});
downloadByData
(
data
,
'招标计划.xlsx'
);
console
.
log
(
title
.
value
,
"eeeeee"
);
downloadByData
(
data
,
title
.
value
+
'.xlsx'
);
emit
(
'close'
);
emit
(
'close'
);
closeModal
();
closeModal
();
});
});
}
}
</
script
>
</
script
>
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