优化提交

main
yangyuanshuai 9 months ago
parent 2b4eeb264b
commit aec7eb71e6

@ -47,6 +47,11 @@ export const exportExcelApi = (params: any) => {
return request.doExport({ url: '/RepDataProblem/sdi/reporting/RepDataProblem/RepDataProblemExportXls', params }); return request.doExport({ url: '/RepDataProblem/sdi/reporting/RepDataProblem/RepDataProblemExportXls', params });
}; };
/** 导出Word */
export const exportWordApi = (params: any) => {
return request.doExport({ url: '/RepDataProblem/sdi/reporting/RepDataProblem/RepDataProblemExportWord', params });
};
/** 获取某个字典 */ /** 获取某个字典 */
export const getCsckCheckType = ({ paramName, systemCode }): Promise<IResponse> => { export const getCsckCheckType = ({ paramName, systemCode }): Promise<IResponse> => {
return request.postJson({ return request.postJson({

@ -37,8 +37,8 @@ export const queryRepTemplateApi = (tId?: string): Promise<IResponse> => {
}; };
/** 查询文件流 */ /** 查询文件流 */
export const queryFileFlowRepTemplateApi = (tId?: string): Promise<IResponse> => { export const queryFileFlowRepTemplateApi = (pId?: string): Promise<IResponse> => {
return request.postJson({ url: '/RepTemplate/spi/reporting/RepTemplate/RepTemplateQueryOneFileFlow', data: { tId } }); return request.doPreviewFile({ url: '/RepDataProblem/sdi/reporting/RepDataProblem/RepDataProblemPreview', data: { pId } });
}; };
/** 同步导入 */ /** 同步导入 */

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import mammoth from 'mammoth'; import mammoth from 'mammoth';
import "@vue-office/docx/lib/index.css";
import { reactive,ref } from "vue"; import { reactive,ref } from "vue";
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
@ -22,22 +21,8 @@ const fetchDocFile = async ()=>{
// APIDOC // APIDOC
const response = await queryFileFlowRepTemplateApi(fileData); const response = await queryFileFlowRepTemplateApi(fileData);
console.log(response,"response文件流信息"); console.log(response,"response文件流信息");
const { data, headers } = response; const { data } = response;
if(headers['status'] == 500){// WARNERROR const arrayBuffer = new File([data], 'document.docx', { type: 'docx' }).arrayBuffer();
const code = headers['error']?headers['error'].substring(headers['error'].length-4):'1003';
console.log(code)
switch(code){
case "1001":
case "1002":
ElMessage.error(downLoadErrorMsg[code]);
break;
default:
ElMessage.error(downLoadErrorMsg['1003']);
break;
}
return;
}
const arrayBuffer = new File([data], 'document.docx', { type: 'doc' }).arrayBuffer();
console.log(arrayBuffer,"arrayBuffer"); console.log(arrayBuffer,"arrayBuffer");
const result = mammoth.convertToHtml({ arrayBuffer }); const result = mammoth.convertToHtml({ arrayBuffer });
console.log(result,"result信息"); console.log(result,"result信息");

@ -79,10 +79,7 @@ export default {
} }
return; return;
} }
let fileName:string = headers['content-disposition']?.replace(/\w+;\s*filename=(.*)/, '$1'); const fileName:string = headers['content-disposition']?.replace(/\w+;\s*filename=(.*)/, '$1');
fileName = fileName?fileName:'报表导出.txt';
// const fileName = "测试导出.xlsx";
// @ts-ignore
const blob = new Blob([data], { const blob = new Blob([data], {
type: headers['content-type'] type: headers['content-type']
}) })

@ -1910,7 +1910,7 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [
name: 'repIndexSet', name: 'repIndexSet',
menuId: 'repIndexSet', menuId: 'repIndexSet',
meta: { meta: {
title: '指标集模型', title: '指标集',
alwaysShow: true, alwaysShow: true,
type:"ybt", type:"ybt",
sort:10, sort:10,
@ -1922,7 +1922,7 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [
name: 'repStoreParameter', name: 'repStoreParameter',
menuId: 'repStoreParameter', menuId: 'repStoreParameter',
meta: { meta: {
title: '参数管理', title: '模型参数管理',
alwaysShow: true, alwaysShow: true,
type:"ybt", type:"ybt",
sort:11, sort:11,

@ -18,14 +18,17 @@ import { Search } from '@/components/Search'
import { FormSchema } from '@/components/Form' import { FormSchema } from '@/components/Form'
import { ContentWrap } from '@/components/ContentWrap' import { ContentWrap } from '@/components/ContentWrap'
import Write from './components/Write.vue' import Write from './components/Write.vue'
import RuleConfig from './components/RuleConfig.vue'
import { Dialog } from '@/components/Dialog' import { Dialog } from '@/components/Dialog'
import { getWidth } from '@/utils'; import { getWidth } from '@/utils';
import Detail from './components/Detail.vue'
import { Upload } from '@/components/Upload' import { Upload } from '@/components/Upload'
import { saveRepDataProblemApi } from '@/api/reporting/RepDataProblem/RepDataProblem'
const { t } = useI18n() const { t } = useI18n()
const ids = ref<string[]>([]) const ids = ref<string[]>([])
const ruleConfigRef = ref<ComponentRef<typeof RuleConfig>>()
const { tableRegister, tableState, tableMethods } = useTable({ const { tableRegister, tableState, tableMethods } = useTable({
fetchDataApi: async () => { fetchDataApi: async () => {
@ -57,43 +60,16 @@ const tableColumns = reactive<TableColumn[]>([
}, },
{ {
field: 'indexsetCode', field: 'indexsetCode',
label: '指标集编码' label: '指标集编码',
hidden:true
}, },
{ {
field: 'code', field: 'code',
label: '科目编码' label: '指标代码'
},
{
field: 'beginDate',
label: '开始日期'
},
{
field: 'endDate',
label: '结束日期'
}, },
{ {
field: 'itemName', field: 'itemName',
label: '科目名称' label: '指标名称'
},
{
field: 'itemOrder',
label: '排序'
},
{
field: 'frequency',
label: '频度'
},
{
field: 'isOrgCollect',
label: '是否机构汇总'
},
{
field: 'status',
label: '状态'
},
{
field: 'conCode',
label: '对照指标编码'
}, },
{ {
field: 'indexType', field: 'indexType',
@ -103,17 +79,18 @@ const tableColumns = reactive<TableColumn[]>([
field: 'indexcalType', field: 'indexcalType',
label: '指标计算类型' label: '指标计算类型'
}, },
{ {
field: 'indexdataType', field: 'indexdataType',
label: '指标数据类型' label: '指标数据类型'
}, },
{ {
field: 'indexdataPrecision', field: 'beginDate',
label: '指标数据精度' label: '开始日期'
}, },
{ {
field: 'indexdataUnit', field: 'endDate',
label: '指标数据项单位' label: '结束日期'
}, },
{ {
field: 'action', field: 'action',
@ -143,6 +120,10 @@ const tableColumns = reactive<TableColumn[]>([
}} }}
onConfirm={() => delData(data.row)} onConfirm={() => delData(data.row)}
></ElPopconfirm> ></ElPopconfirm>
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'ruleconfig')}>
{'配置'}
</ElLink>
</> </>
) )
} }
@ -151,41 +132,32 @@ const tableColumns = reactive<TableColumn[]>([
].map(item => ({ minWidth: item.label ? getWidth(item.label) : 120, ...item }) as TableColumn)) ].map(item => ({ minWidth: item.label ? getWidth(item.label) : 120, ...item }) as TableColumn))
const searchSchema = reactive<FormSchema[]>([ const searchSchema = reactive<FormSchema[]>([
{
field: 'indexsetCode',
label: '指标集编码',
componentProps: {},
component: 'Input'
},
{ {
field: 'code', field: 'code',
label: '科目编码', label: '指标代码',
componentProps: {}, componentProps: {},
component: 'Input' component: 'Input'
}, },
{ {
field: 'itemName', field: 'itemName',
label: '科目名称', label: '指标名称',
componentProps: {}, componentProps: {},
component: 'Input' component: 'Input'
}, },
{
field: 'frequency',
label: '频度',
componentProps: {},
component: 'Select'
},
{
field: 'status',
label: '状态',
componentProps: {},
component: 'Select'
},
{ {
field: 'indexType', field: 'indexType',
label: '指标类型', label: '指标类型',
componentProps: {}, componentProps: {},
component: 'Select' component: 'Select'
},
{
field: 'indexDate',
label: '日期范围',
componentProps: {
type:'daterange',
valueFormat: 'YYYYMMDD'
},
component: 'DatePicker'
} }
]) ])
@ -216,13 +188,32 @@ const action = async (row: TableData, type: string) => {
detailLoading.close() detailLoading.close()
if (res) { if (res) {
const data = res.body.result const data = res.body.result
dialogTitle.value = t(type === 'edit' ? 'tableDemo.edit' : 'tableDemo.detail') dialogTitle.value = type === 'edit' ? '编辑' : '规则配置'
actionType.value = type actionType.value = type
currentRow.value = data currentRow.value = data
dialogVisible.value = true dialogVisible.value = true
} }
} }
/** 添加指标加工规则**/
const addRuleConfig = async () => {
const ruleConfig = unref(ruleConfigRef)
const formData = await ruleConfig?.submit()
if (formData) {
saveLoading.value = true
const res = await saveRepDataProblemApi(formData)
.catch(() => {})
.finally(() => {
saveLoading.value = false
})
if (res) {
dialogVisible.value = false
currentPage.value = 1
getList()
}
}
}
const AddAction = () => { const AddAction = () => {
dialogTitle.value = t('tableDemo.add') dialogTitle.value = t('tableDemo.add')
currentRow.value = undefined currentRow.value = undefined
@ -321,16 +312,19 @@ const exportExcel = async () => {
<Dialog v-model="dialogVisible" :title="dialogTitle"> <Dialog v-model="dialogVisible" :title="dialogTitle">
<Write <Write
v-if="actionType !== 'detail'" v-if="actionType !== 'ruleconfig'"
ref="writeRef" ref="writeRef"
:current-row="currentRow" :current-row="currentRow"
:action-type="actionType" :action-type="actionType"
/> />
<Detail v-if="actionType === 'detail'" :current-row="currentRow" /> <RuleConfig v-if="actionType === 'ruleconfig'" />
<template #footer> <template #footer>
<ElButton v-if="actionType !== 'detail'" type="primary" :loading="saveLoading" @click="save"> <ElButton v-if="actionType == 'edit'" type="primary" :loading="saveLoading" @click="save">
{{ t('dialogDemo.save') }} {{ t('dialogDemo.save') }}
</ElButton> </ElButton>
<ElButton v-if="actionType == 'ruleconfig'" type="primary" :loading="saveLoading" @click="addRuleConfig">
{{ t('formDemo.add') }}
</ElButton>
<ElButton @click="dialogVisible = false">{{ t('dialogDemo.close') }}</ElButton> <ElButton @click="dialogVisible = false">{{ t('dialogDemo.close') }}</ElButton>
</template> </template>
</Dialog> </Dialog>

@ -3,7 +3,6 @@ import { Form, FormSchema } from '@/components/Form'
import { useForm } from '@/hooks/web/useForm' import { useForm } from '@/hooks/web/useForm'
import { PropType, reactive, watch } from 'vue' import { PropType, reactive, watch } from 'vue'
import { useValidator } from '@/hooks/web/useValidator' import { useValidator } from '@/hooks/web/useValidator'
import { Value } from 'sass';
// import { getWorkFlowVisiableButton } from '@/api/csck/CsckFlow'; // import { getWorkFlowVisiableButton } from '@/api/csck/CsckFlow';
const { required } = useValidator() const { required } = useValidator()

@ -57,11 +57,16 @@ const tableColumns = reactive<TableColumn[]>([
}, },
{ {
field: 'indexsetCode', field: 'indexsetCode',
label: '指标集编码' label: '指标集编码',
hidden:true
}, },
{ {
field: 'targetCode', field: 'targetCode',
label: '栏编码' label: '指标属性编码'
},
{
field: 'targetName',
label: '指标属性名称'
}, },
{ {
field: 'beginDate', field: 'beginDate',
@ -71,22 +76,6 @@ const tableColumns = reactive<TableColumn[]>([
field: 'endDate', field: 'endDate',
label: '结束日期' label: '结束日期'
}, },
{
field: 'targetName',
label: '栏名称'
},
{
field: 'targetOrder',
label: '排序'
},
{
field: 'status',
label: '状态'
},
{
field: 'isOrgCollect',
label: '是否机构汇总'
},
{ {
field: 'action', field: 'action',
label: t('tableDemo.action'), label: t('tableDemo.action'),
@ -127,26 +116,21 @@ const searchSchema = reactive<FormSchema[]>([
field: 'indexsetCode', field: 'indexsetCode',
label: '指标集编码', label: '指标集编码',
componentProps: {}, componentProps: {},
component: 'Input' component: 'Input',
hidden:true
}, },
{ {
field: 'targetName', field: 'targetCode',
label: '栏名称', label: '指标属性编号',
componentProps: {}, componentProps: {},
component: 'Input' component: 'Input'
}, },
{ {
field: 'status', field: 'targetName',
label: '状态', label: '指标属性名称',
componentProps: {}, componentProps: {},
component: 'Select' component: 'Input'
}, },
{
field: 'isOrgCollect',
label: '是否机构汇总',
componentProps: {},
component: 'Select'
}
]) ])
const searchParams = ref({}) const searchParams = ref({})

@ -10,19 +10,13 @@ import {
import { TableData } from '@/api/reporting/RepDataProblem/RepDataProblem/types' import { TableData } from '@/api/reporting/RepDataProblem/RepDataProblem/types'
import { useTable } from '@/hooks/web/useTable' import { useTable } from '@/hooks/web/useTable'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
import { Table, TableColumn } from '@/components/Table'
import { ElButton, ElLink, ElLoading, ElPopconfirm, ElMessage } from 'element-plus' import { ElButton, ElLink, ElLoading, ElPopconfirm, ElMessage } from 'element-plus'
import { Search } from '@/components/Search'
import { FormSchema } from '@/components/Form'
import { ContentWrap } from '@/components/ContentWrap' import { ContentWrap } from '@/components/ContentWrap'
import CodeRepItem from '@/views/dataset/CodeRepItem/CodeRepItem.vue';// import CodeRepItem from '@/views/dataset/CodeRepItem/CodeRepItem.vue';//
import CodeRepTarget from '@/views/dataset/CodeRepTarget/CodeRepTarget.vue';// import CodeRepTarget from '@/views/dataset/CodeRepTarget/CodeRepTarget.vue';//
import RuleConfig from './components/Ruleconfig.vue'
import Write from './components/Write.vue' import Write from './components/Write.vue'
import { Dialog } from '@/components/Dialog' import { Dialog } from '@/components/Dialog'
import { getWidth } from '@/utils';
import { INDEX_CATAGOTY_LIST } from './constants'
const { t } = useI18n() const { t } = useI18n()
/** /**
@ -31,7 +25,7 @@ const { t } = useI18n()
const ids = ref<string[]>([]) const ids = ref<string[]>([])
const { tableRegister, tableState, tableMethods } = useTable({ const { tableState, tableMethods } = useTable({
fetchDataApi: async () => { fetchDataApi: async () => {
const { currentPage, pageSize } = tableState const { currentPage, pageSize } = tableState
const res = await getRepDataProblemListApi({ const res = await getRepDataProblemListApi({
@ -50,197 +44,15 @@ const { tableRegister, tableState, tableMethods } = useTable({
}, },
}) })
const { loading, dataList, total, currentPage, pageSize } = tableState const { currentPage } = tableState
const { getList, getElTableExpose, delList, refresh } = tableMethods const { getList } = tableMethods
const indexDefineTableColumns = reactive<TableColumn[]>([
{
field: 'selection',
type: 'selection',
fixed: true
},
{
field: 'dataDate',
label: '指标代码'
},
{
field: 'createTime',
label: '指标名称'
},
{
field: 'tName',
label: '指标类型'
},
{
field: 'tCategory',
label: '指标计算类型'
},
{
field: 'tCategory',
label: '指标数据类型'
},
{
field: 'tCategory',
label: '开始时间'
},
{
field: 'tCategory',
label: '结束时间'
},
{
field: 'action',
label: t('tableDemo.action'),
width: 160,
fixed: 'right',
slots: {
default: (data: any) => {
return (
<>
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'edit')}>
{t('tableDemo.edit')}
</ElLink>
<ElPopconfirm
title={t('common.delTableMsg')}
width={200}
v-slots={{
reference: () => {
return (
<>
<ElLink type="primary" underline={false}>
{t('tableDemo.del')}
</ElLink>
</>
)
}
}}
onConfirm={() => delData(data.row)}
></ElPopconfirm>
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'ruleconfig')}>
{'配置'}
</ElLink>
</>
)
}
}
}
].map(item => ({ minWidth: item.label ? getWidth(item.label) : 120, ...item }) as TableColumn))
/**
* 指标属性
*/
const indexPropertiesTableColumns = reactive<TableColumn[]>([
{
field: 'selection',
type: 'selection',
fixed: true
},
{
field: 'dataDate',
label: '指标属性编号'
},
{
field: 'createTime',
label: '指标属性名称'
},
{
field: 'tCategory',
label: '开始时间'
},
{
field: 'tCategory',
label: '结束时间'
},
{
field: 'action',
label: t('tableDemo.action'),
width: 160,
fixed: 'right',
slots: {
default: (data: any) => {
return (
<>
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'edit')}>
{t('tableDemo.edit')}
</ElLink>
<ElPopconfirm
title={t('common.delTableMsg')}
width={200}
v-slots={{
reference: () => {
return (
<>
<ElLink type="primary" underline={false}>
{t('tableDemo.del')}
</ElLink>
</>
)
}
}}
onConfirm={() => delData(data.row)}
></ElPopconfirm>
</>
)
}
}
}
].map(item => ({ minWidth: item.label ? getWidth(item.label) : 120, ...item }) as TableColumn))
const indexDefineSearchSchema = reactive<FormSchema[]>([
{
field: 'createTime',
label: '指标代码',
componentProps: {},
component: 'Input'
},
{
field: 'tName',
label: '指标名称',
componentProps: {},
component: 'Input'
},
{
field: 'tCategory',
label: '指标计算类型',
componentProps: {
options:INDEX_CATAGOTY_LIST
},
component: 'Select'
},
{
field: 'organCode',
label: '日期范围',
componentProps: {type: 'daterange'},
component: 'DatePicker'
}
])
const indexPropertiesSearchSchema = reactive<FormSchema[]>([
{
field: 'createTime',
label: '编号',
componentProps: {},
component: 'Input'
},
{
field: 'tName',
label: '名称',
componentProps: {},
component: 'Input'
}
])
const indexDefineSearchParams = ref({}) const indexDefineSearchParams = ref({})
const indexDefineSetSearchParams = (data: any) => {
indexDefineSearchParams.value = data
getList()
}
const indexPropertieSearchParams = ref({})
const indexPropertieSetSearchParams = (data: any) => {
indexPropertieSearchParams.value = data
getList()
}
const dialogVisible = ref(false) const dialogVisible = ref(false)
const dialogTitle = ref('') const dialogTitle = ref('')
@ -248,34 +60,8 @@ const dialogTitle = ref('')
const currentRow = ref() const currentRow = ref()
const actionType = ref('') const actionType = ref('')
const ruleConfigRef = ref<ComponentRef<typeof RuleConfig>>()
const writeRef = ref<ComponentRef<typeof Write>>() const writeRef = ref<ComponentRef<typeof Write>>()
/**单行查询**/
const action = async (row: TableData, type: string) => {
let detailLoading = ElLoading.service({
background: 'rgba(0, 0, 0, 0.7)'
})
const res = await queryRepDataProblemApi(row.pId)
.catch(() => {})
.finally(() => {
detailLoading.close()
})
detailLoading.close()
if (res) {
const data = res.body.result
dialogTitle.value = type === 'edit' ? '编辑' : '规则配置'
actionType.value = type
currentRow.value = data
dialogVisible.value = true
}
}
const AddAction = () => {
dialogTitle.value = t('tableDemo.add')
currentRow.value = undefined
dialogVisible.value = true
actionType.value = 'add'
}
const saveLoading = ref(false) const saveLoading = ref(false)
/** 保存 **/ /** 保存 **/
@ -297,36 +83,6 @@ const save = async () => {
} }
} }
/** 添加指标加工规则**/
const addRuleConfig = async () => {
const ruleConfig = unref(ruleConfigRef)
const formData = await ruleConfig?.submit()
if (formData) {
saveLoading.value = true
const res = await saveRepDataProblemApi(formData)
.catch(() => {})
.finally(() => {
saveLoading.value = false
})
if (res) {
dialogVisible.value = false
currentPage.value = 1
getList()
}
}
}
const delLoading = ref(false)
/** 批量删除 **/
const delDataBatch = async () => {
const elTableExpose = await getElTableExpose()
ids.value = elTableExpose?.getSelectionRows().map((v: TableData) => { v.pId }) || []
delLoading.value = true
await delList(unref(ids).length).finally(() => {
delLoading.value = false
})
}
/** 单行删除 */ /** 单行删除 */
const delData = async (row: TableData) => { const delData = async (row: TableData) => {
@ -342,11 +98,7 @@ const delData = async (row: TableData) => {
} }
} }
const disabled = ref(true)
const onSelectionChange = (selection: TableData[]) => {
disabled.value = selection.length === 0
}
const activeName = ref('indexDefination') const activeName = ref('indexDefination')
@ -368,12 +120,11 @@ const handleClick=(tab: any, event: Event | undefined)=> {
</ContentWrap> </ContentWrap>
<Dialog v-model="dialogVisible" :title="dialogTitle"> <Dialog v-model="dialogVisible" :title="dialogTitle">
<Write <Write
v-if="actionType !== 'ruleconfig'" v-if="actionType !== 'detail'"
ref="writeRef" ref="writeRef"
:current-row="currentRow" :current-row="currentRow"
:action-type="actionType" :action-type="actionType"
/> />
<RuleConfig v-if="actionType === 'ruleconfig'" />
<template #footer> <template #footer>
<ElButton v-if="actionType == 'edit'" type="primary" :loading="saveLoading" @click="save"> <ElButton v-if="actionType == 'edit'" type="primary" :loading="saveLoading" @click="save">
{{ t('dialogDemo.save') }} {{ t('dialogDemo.save') }}

@ -6,6 +6,7 @@ import {
delRepDataProblemListApi, delRepDataProblemListApi,
delRepDataProblemApi, delRepDataProblemApi,
queryRepDataProblemApi, queryRepDataProblemApi,
exportWordApi,
} from '@/api/reporting/RepDataProblem/RepDataProblem' } from '@/api/reporting/RepDataProblem/RepDataProblem'
import { TableData } from '@/api/reporting/RepDataProblem/RepDataProblem/types' import { TableData } from '@/api/reporting/RepDataProblem/RepDataProblem/types'
import { useTable } from '@/hooks/web/useTable' import { useTable } from '@/hooks/web/useTable'
@ -33,6 +34,12 @@ const loginOrganCode = getLoginOrganCodeByUserInfo();
const ids = ref<string[]>([]) const ids = ref<string[]>([])
/** 生成word */
const exportWord = async (row: TableData) => {
const data = { tid: row.tId};
exportWordApi(data);
};
const { tableRegister, tableState, tableMethods } = useTable({ const { tableRegister, tableState, tableMethods } = useTable({
fetchDataApi: async () => { fetchDataApi: async () => {
const { currentPage, pageSize } = tableState const { currentPage, pageSize } = tableState
@ -86,10 +93,10 @@ const tableColumns = reactive<TableColumn[]>([
default: (data: any) => { default: (data: any) => {
return ( return (
<> <>
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'detail')}> <ElLink type="primary" underline={false} onClick={() => exportWord(data.row)}>
{'生成'} {'生成'}
</ElLink> </ElLink>
<ElLink type="primary" underline={false} onClick={() => ShowPreViewFile(data.row)}> <ElLink type="primary" disabled={data.row.status=='true'} underline={false} onClick={() => ShowPreViewFile(data.row)}>
{'预览'} {'预览'}
</ElLink> </ElLink>
</> </>
@ -200,7 +207,7 @@ const ShowPreViewFile = (data)=>{
router.push({ router.push({
name:'PreViewFile', name:'PreViewFile',
query:{ query:{
fileData:data.tId, fileData:data.pId,
} }
}) })
// const routeData = router.resolve({ // const routeData = router.resolve({

@ -101,7 +101,7 @@ const formSchema = reactive<FormSchema[]>([
componentProps: { componentProps: {
limit: 1, limit: 1,
drag:true, drag:true,
accept:".doc,.docx", accept:".docx",
action: null, action: null,
autoUpload:false, autoUpload:false,
fileList:[], fileList:[],
@ -119,7 +119,7 @@ const formSchema = reactive<FormSchema[]>([
}, },
slots: { slots: {
default: () =><div class="el-upload"><i class="el-icon-upload"></i><br/><h1 class="el-upload__text">拖拽报告模版到这里...<br/><em>上传报告模版</em></h1></div>, default: () =><div class="el-upload"><i class="el-icon-upload"></i><br/><h1 class="el-upload__text">拖拽报告模版到这里...<br/><em>上传报告模版</em></h1></div>,
tip: () => <div class="el-upload__tip">doc,docx文件</div>, tip: () => <div class="el-upload__tip">docx文件</div>,
file:(file)=>{ file:(file)=>{
fileData = file.file.raw; fileData = file.file.raw;
tName=file.file.name; tName=file.file.name;

Loading…
Cancel
Save