|
@@ -662,21 +662,27 @@ const leadModalSave = async () => {
|
|
|
// ishowTree.value = true
|
|
|
// }, 1000)
|
|
|
}
|
|
|
+const getImportTemplate = async (type)=>{
|
|
|
+ const { error, code, msg, data } = await unitApi.importTemplate({
|
|
|
+ type,
|
|
|
+ })
|
|
|
+ if (!error && code === 200) {
|
|
|
+ if (data) {
|
|
|
+ window.open(data)
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ window.$message.error(msg)
|
|
|
+ }
|
|
|
+}
|
|
|
//下载范例模板
|
|
|
const downLoadExel = ()=>{
|
|
|
if (typevalue.value) {
|
|
|
- if (typevalue.value === '1') {
|
|
|
- window.open('https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240307/1430b65643615f80156ec328a9a09ff8.xlsx', '_blank')
|
|
|
- } else if (typevalue.value === '2') {
|
|
|
- window.open('https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20240109/98addbf48d620030504b2cb03b1c24f5.xls', '_blank')
|
|
|
- } else if (typevalue.value === '3') {
|
|
|
- window.open('https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240320/88fc4e47dd3f729b1b71cf79a6db44ae.xlsx', '_blank')
|
|
|
-
|
|
|
- } else {
|
|
|
- window.$message.warning('请先选择模板')
|
|
|
- }
|
|
|
+ getImportTemplate(typevalue.value)
|
|
|
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ window.$message.error('请选择范例模板')
|
|
|
+ }
|
|
|
}
|
|
|
const typeoptions = ref([
|
|
|
{
|