Commit 818bdc05 authored by 何远江's avatar 何远江

功能优化

parent d603cd21
......@@ -12,8 +12,8 @@ import {
showsheetbarConfig,
showstatisticBarConfig
} from '@/constants/excelConfig'
import { useRoute } from 'vue-router';
import { isFunction } from '@/utils/is';
import { useRoute } from 'vue-router'
import { isFunction } from '@/utils/is'
const props = defineProps(['fileId'])
const luckysheet = (window as any).luckysheet
......@@ -47,9 +47,15 @@ const generateExcel = (path: string) => {
const getFilePath = async () => {
try {
loading.value = true
const { data } = await getOrderFileById((props.fileId || route.query.fileId) as string)
if (data.code == 200) {
generateExcel(data.result.mergeFilePath)
const fileId = props.fileId || route.query.fileId
if (fileId) {
const { data } = await getOrderFileById(fileId)
if (data.code == 200) {
generateExcel(data.result.mergeFilePath)
}
} else {
const path = (route.query.filePath || '') as string
!!path && generateExcel(path)
}
} catch {}
loading.value = false
......
......@@ -33,7 +33,7 @@
<vxe-column field="customerId_dictText" title="客户名称" width="200"></vxe-column>
<vxe-column field="filePath" title="订单文件">
<template #default="{ row }">
<el-link target="_blank" :href="'/api/sys/static/' + row.filePath">{{
<el-link target="_blank" :href="'/preview-excel?path=' + row.filePath">{{
row.filePath
}}</el-link>
</template>
......
......@@ -182,11 +182,12 @@
</el-form-item>
</el-col>
</template>
<el-col :span="24" v-if="currentConfigColumn.scriptName">
<el-col :span="24" v-if="currentConfigColumn.scriptName && !!currentConfigColumn.content">
<el-form-item label="脚本语句">
<el-input
style="width: 220px"
rows="3"
disabled
type="textarea"
v-model.trim="currentConfigColumn.content"
></el-input>
......@@ -373,6 +374,7 @@ const resetConfigForm = () => {
/** 脚本参数List */
const currentScriptParamsList = computed(() => {
const item: any = scriptList.value.find((v) => v.srciptName == currentConfigColumn.scriptName)
Reflect.set(currentConfigColumn, 'content', item?.scriptContent || '')
// 生成脚本参数表单
gScriptPs(item?.paramsName)
return item?.paramsName != null ? item.paramsName : []
......
......@@ -34,7 +34,7 @@
<vxe-column field="customerId_dictText" title="客户名称" width="120"></vxe-column>
<vxe-column title="原始文件地址">
<template #default="{ row }">
<el-link target="_blank" :href="'/api/sys/static/' + row.filePath">{{
<el-link target="_blank" :href="'/preview-excel?filePath=' + row.filePath">{{
row.filePath
}}</el-link>
</template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment