diff --git a/src/components/PreViewFile/index.ts b/src/components/PreViewFile/index.ts
new file mode 100644
index 0000000..82deb06
--- /dev/null
+++ b/src/components/PreViewFile/index.ts
@@ -0,0 +1,3 @@
+import PreViewFile from './src/PreViewFile.vue'
+
+export { PreViewFile }
diff --git a/src/components/PreViewFile/src/PreViewFile.vue b/src/components/PreViewFile/src/PreViewFile.vue
new file mode 100644
index 0000000..a91a9a1
--- /dev/null
+++ b/src/components/PreViewFile/src/PreViewFile.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/index.ts b/src/router/index.ts
index d57743d..33c8873 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -86,6 +86,17 @@ export const constantRouterMap: AppRouteRecordRaw[] = [
noTagsView: true,
},
},
+ /* ----------------------在线Word的预览开始------------------------- */
+ {
+ path: '/PreViewFile',
+ component: () => import('@/components/PreViewFile/src/PreViewFile.vue'),
+ name: 'PreViewFile',
+ meta: {
+ title: '文件预览',
+ hidden:true
+ },
+ },
+ /* ----------------------在线Word的预览结束------------------------- */
// 可疑案例处理界面
{
path: '/caseManageT',
diff --git a/src/views/reporting/RepTemplate/RepTemplate.vue b/src/views/reporting/RepTemplate/RepTemplate.vue
index bbe1932..bcd2cbc 100644
--- a/src/views/reporting/RepTemplate/RepTemplate.vue
+++ b/src/views/reporting/RepTemplate/RepTemplate.vue
@@ -22,7 +22,9 @@ import { Dialog } from '@/components/Dialog'
import { getWidth, transfDictList } from '@/utils';
import Detail from './components/Detail.vue'
import { REPORTING_STATUS_LIST } from './constants'
+import { useRouter } from 'vue-router';
+const router = useRouter()
const { t } = useI18n()
const ids = ref([])
@@ -115,6 +117,9 @@ const tableColumns = reactive([
default: (data: any) => {
return (
<>
+ ShowPreViewFile(data.row)}>
+ 预览
+
action(data.row, 'edit')}>
{t('tableDemo.edit')}
@@ -134,6 +139,7 @@ const tableColumns = reactive([
}}
onConfirm={() => delData(data.row)}
>
+
>
)
}
@@ -171,7 +177,20 @@ const searchSchema = reactive([
component: 'DatePicker'
}
])
-
+/** 预览 **/
+const ShowPreViewFile = (data)=>{
+ const routeData = router.resolve({
+ name:'PreViewFile',
+ query:{
+ fileData:data.fileFlow,
+ }
+ })
+ router.push({name:'PreViewFile',
+ query:{
+ fileData:data.fileFlow,
+ }});
+ // window.open(routeData.href,'_blank')
+}
const searchParams = ref({})
const setSearchParams = (data: any) => {
searchParams.value = data
@@ -207,7 +226,7 @@ const action = async (row: TableData, type: string) => {
}
const AddAction = () => {
- dialogTitle.value = t('tableDemo.add')
+ dialogTitle.value = "上传模板";
currentRow.value = undefined
dialogVisible.value = true
actionType.value = 'add'