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
Hide 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
<
template
>
<
template
>
<BasicModal
<BasicModal
v-bind=
"$attrs"
v-bind=
"$attrs"
@
register=
"register"
@
register=
"register"
title=
"导出筛选结果"
title=
"导出筛选结果"
:minHeight=
"30"
:minHeight=
"30"
okText=
"导出"
okText=
"导出"
@
ok=
"handleSubmit"
@
ok=
"handleSubmit"
@
visible-change=
"handleVisibleChange"
@
visible-change=
"handleVisibleChange"
>
>
<BasicForm
@
register=
"registerForm"
:model=
"modelRef"
/>
<BasicForm
@
register=
"registerForm"
:model=
"modelRef"
/>
</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'
,
{
component
:
'CheckboxGroup'
,
field
:
'colums'
,
label
:
''
,
component
:
'CheckboxGroup'
,
required
:
true
,
label
:
''
,
componentProps
:
{
required
:
true
,
options
:
[],
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
({
colProps
:
{
labelWidth
:
120
,
schemas
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
24
,
span
:
24
,
},
},
});
},
];
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
const
props
=
defineProps
({
console
.
log
(
111
);
userData
:
{
type
:
Object
},
});
data
&&
onDataReceive
(
data
);
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
,
},
});
// function handleVisibleChange(v) {
const
[
register
,
{
closeModal
}]
=
useModalInner
((
data
)
=>
{
// v && props.userData && nextTick(() => onDataReceive(props.userData));
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
);
});
function
onDataReceive
(
data
)
{
console
.
log
(
'Data Received'
,
data
.
exportData
);
updateSchema
({
field
:
'colums'
,
componentProps
:
{
options
:
data
.
exportData
,
},
});
// console.log(props.userData);
// projectId.value = data.projectId;
function
onDataReceive
(
data
)
{
// console.log(projectId.value);
console
.
log
(
'Data Received'
,
data
.
exportData
);
}
updateSchema
({
function
handleSubmit
()
{
field
:
'colums'
,
validate
().
then
(
async
()
=>
{
componentProps
:
{
const
value
=
getFieldsValue
();
options
:
data
.
exportData
,
console
.
log
(
value
);
},
const
data
=
await
tenderPlanExport
({
});
colums
:
value
.
colums
,
}
searchField
:
{
biddingType
:
'施工'
},
function
handleSubmit
()
{
});
validate
().
then
(
async
()
=>
{
downloadByData
(
data
,
'招标计划.xlsx'
);
const
value
=
getFieldsValue
();
emit
(
'close'
);
console
.
log
(
value
);
closeModal
();
const
data
=
await
exportData
(
exProjectUrl
.
value
,{
proId
:
detailId
,
colums
:
value
.
colums
,
searchField
:
searchData
.
value
,
});
});
}
console
.
log
(
title
.
value
,
"eeeeee"
);
downloadByData
(
data
,
title
.
value
+
'.xlsx'
);
emit
(
'close'
);
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