You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.7 KiB
63 lines
1.7 KiB
11 months ago
|
<template>
|
||
|
<div class="app-container">
|
||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
|
||
|
<el-form-item label="订单号" prop="orderNo">
|
||
|
<el-input
|
||
|
v-model="queryParams.orderNo"
|
||
|
placeholder="请输入订单号"
|
||
|
clearable
|
||
|
@keyup.enter="handleQuery"
|
||
|
/>
|
||
|
</el-form-item>
|
||
|
<el-form-item>
|
||
|
<el-button type="primary" icon="Search" @click="handleExport('changchun')">导出长春</el-button>
|
||
|
<el-button type="primary" icon="Search" @click="handleExport('foshan')">导出佛山青岛</el-button>
|
||
|
<el-button type="primary" icon="Search" @click="handleExport('guowai')">导出国外</el-button>
|
||
|
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button>
|
||
|
</el-form-item>
|
||
|
</el-form>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script setup name="Excel">
|
||
|
import { exportOut } from "@/api/excel";
|
||
|
const uploadImgUrl = ref(import.meta.env.VITE_APP_BASE_API + "/profile/upload");
|
||
|
|
||
|
const { proxy } = getCurrentInstance();
|
||
|
|
||
|
const linuxAccessList = ref([]);
|
||
|
const loading = ref(true);
|
||
|
|
||
|
const data = reactive({
|
||
|
queryParams: {
|
||
|
orderNo: null,
|
||
|
type: 'changchun'
|
||
|
},
|
||
|
});
|
||
|
|
||
|
const { queryParams } = toRefs(data);
|
||
|
|
||
|
/** 搜索按钮操作 */
|
||
|
function handleQuery() {
|
||
|
handleExport();
|
||
|
}
|
||
|
|
||
|
/** 重置按钮操作 */
|
||
|
function resetQuery() {
|
||
|
proxy.resetForm("queryRef");
|
||
|
}
|
||
|
|
||
|
/** 导出按钮操作 */
|
||
|
function handleExport(type) {
|
||
|
loading.value = true;
|
||
|
queryParams.value.type = type;
|
||
|
exportOut(queryParams.value).then(response => {
|
||
|
response.data.forEach(item => {
|
||
|
window.open(uploadImgUrl.value + '/' + item, "_blank")
|
||
|
});
|
||
|
loading.value = false;
|
||
|
});
|
||
|
}
|
||
|
|
||
|
</script>
|