Browse Source

2024-09-13 单据状态

master
qiezi 1 year ago
parent
commit
a69c7e9ce5
  1. 9
      src/api/oss/oss.js
  2. 302
      src/views/modules/oss/ossComponents.vue
  3. 179
      src/views/modules/project/projectInfo/projectInfo.vue
  4. 99
      src/views/modules/quotation/requestForQuote.vue
  5. 152
      src/views/modules/quotation/sellForQuotation.vue
  6. 9
      src/views/modules/test/file/testFile.vue

9
src/api/oss/oss.js

@ -8,3 +8,12 @@ export const updateOssRef = data => createAPI(`/sys/oss/updateOssRef`,'post',dat
* @returns {*}
*/
export const uploadFile = data => createAPI(`/base/uploadFile`,'post',data)
export const ossUpload = (data) => createAPI(`/oss/upload`,'post',data)
export const queryOss = (data) => createAPI(`/oss`,'post',data)
export const removeOss = (data) => createAPI(`/oss/remove`,'post',data)
export const previewOssFileById = (data) => createAPI(`/oss/${data.id}`,'post','download')

302
src/views/modules/oss/ossComponents.vue

@ -0,0 +1,302 @@
<script>
import {ossUpload, previewOssFileById, queryOss, removeOss} from "../../../api/oss/oss";
export default {
name: "ossComponents",
props:{
orderRef1:{
type:String,
required:true
},
orderRef2:{
type:String,
required:true
},
orderRef3:{
type:String,
default:''
},
columns:{
type:Array,
required:true
},
height:{
type:[String,Number],
default:'35vh'
},
title:{
type:String,
default:'附件列表'
},
label:{
type:String,
default:'单号'
},
},
data(){
return{
dataList:[],
queryLoading:false,
uploadLoading:false,
selectionDataList:[],
ossVisible:false,
ossForm:{
orderRef2:'',
remark:''
},
fileList:[],
}
},
methods:{
handleSelectionChange(val){
this.selectionDataList = val
},
handleQuery(){
let params = {
...this.params,
}
this.queryLoading = true;
queryOss(params).then(({data})=>{
if (data && data.code === 0){
this.dataList = data.rows;
}else {
this.$message.warning(data.msg);
}
this.queryLoading = false;
}).catch((error)=>{
this.$message.error(error);
this.queryLoading = false;
})
},
handleUpload(){
this.$nextTick(()=>{
if (this.$refs.upload){
this.$refs.upload.clearFiles();
}
})
this.fileList = [];
this.ossForm.remark = '';
this.ossVisible = true
},
onRemoveFile(file, fileList){
this.fileList = fileList
},
onChangeFile(file, fileList){
this.fileList = fileList
},
handleUploadFiles(){
if (this.fileList.length === 0){
this.$message.error('请选择文件');
return;
}
let formData = new FormData();
for (let i = 0; i < this.fileList.length; i++) {
formData.append('file', this.fileList[i].raw);
}
formData.append('orderRef1', this.orderRef1);
formData.append('orderRef2', this.ossForm.orderRef2);
formData.append('orderRef3', this.orderRef3);
formData.append('createBy', this.$store.state.user.name);
formData.append('fileRemark', this.ossForm.remark);
this.uploadLoading = true;
ossUpload(formData).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.handleQuery();
this.ossVisible = false;
}else {
this.$message.warning(data.msg);
}
this.uploadLoading = false;
}).catch((error)=>{
this.$message.error(error);
this.uploadLoading = false;
})
},
handleRemove(row){
this.$confirm('确认删除吗?', '提示').then(() => {
let ids = [row.id]
removeOss(ids).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.handleQuery();
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error);
})
}).catch(()=>{
})
},
previewFile(row){
//
let type = '';
let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
if (image.includes(row.fileType.toLowerCase())){
type = 'image/' + row.fileType;
}
let video = ['mp4', 'avi', 'mov', 'wmv', 'flv'];
if (video.includes(row.fileType.toLowerCase())){
type = 'video/' + row.fileType;
}
let txt = ['txt'];
if (txt.includes(row.fileType.toLowerCase())){
type = 'text/plain;charset=utf-8';
}
let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'];
if (office.includes(row.fileType.toLowerCase())){
this.$message.warning(`该文件格式暂不支持预览`)
return
}
let pdf = ['pdf'];
if (pdf.includes(row.fileType.toLowerCase())){
type = 'application/pdf';
}
if (type === ''){
this.$message.warning(`该文件格式暂不支持预览`)
return;
}
let params = {
id:row.id,
}
previewOssFileById(params).then(({data}) => {
const blob = new Blob([data], { type: type });
// URL
const fileURL = URL.createObjectURL(blob);
//
const newTab = window.open(fileURL, '_blank');
});
},
handleDownload(){
if (this.selectionDataList.length === 0){
this.$message.warning('请选择要下载的附件');
return;
}
for (let i = 0; i < this.selectionDataList.length; i++) {
let params = {
id:this.selectionDataList[i].id,
}
previewOssFileById(params).then((response) => {
const blob = new Blob([response.data], { type: response.headers['content-type'] });
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('download', this.selectionDataList[i].fileName);
link.target = '_blank'; //
link.click();
URL.revokeObjectURL(link.href);
this.$refs.table.clearSelection();
});
}
}
},
computed:{
params:{
get(){
return{
orderRef1:this.orderRef1,
orderRef2:this.orderRef2,
orderRef3:this.orderRef3,
}
}
}
},
watch:{
params:{
handler(){
this.ossForm.orderRef2 = this.orderRef2;
this.dataList = [];
this.handleQuery();
}
}
}
}
</script>
<template>
<div>
<el-button type="primary" @click="handleUpload">上传附件</el-button>
<el-button type="primary" @click="handleDownload">下载</el-button>
<el-table
:height="height"
:data="dataList"
ref="table"
v-loading="queryLoading"
border
@selection-change="handleSelectionChange"
style="width: 100%;margin-top: 5px">
<el-table-column type="selection" label="序号" align="center"/>
<el-table-column
v-for="(item,index) in columns" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed===''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="120"
label="操作">
<template slot-scope="{row,$index}">
<el-link style="cursor:pointer;" @click="handleRemove(row)">删除</el-link>
<el-link style="cursor:pointer;" @click="previewFile(row)">预览</el-link>
</template>
</el-table-column>
</el-table>
<el-dialog :title="title" :visible.sync="ossVisible" v-drag width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="ossForm" label-width="80px" label-position="top">
<el-row :gutter="10">
<el-col :span="8">
<el-form-item :label="label">
<el-input v-model="ossForm.orderRef2" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label=" " class="auto">
<el-upload drag :file-list="fileList"
action="#" ref="upload"
:on-remove="onRemoveFile"
:on-change="onChangeFile"
multiple
:auto-upload="false">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" class="auto">
<el-input type="textarea" v-model="ossForm.remark" resize="none" :autosize="{minRows: 3, maxRows: 3}"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" :loading="uploadLoading" @click="handleUploadFiles">确定</el-button>
<el-button @click="ossVisible = false">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<style scoped>
.auto /deep/ .el-form-item__content{
height: auto;
line-height: 1.5;
}
</style>

179
src/views/modules/project/projectInfo/projectInfo.vue

@ -300,48 +300,49 @@
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="文档管理" name="down">
<el-tab-pane label="附件信息" name="down">
<oss-components :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.projectId"></oss-components>
<!--文件上传-->
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
<el-form :inline="true" label-position="top" style="margin-top: 0px">
<el-button type="primary" @click="addUploadFileModal">上传文件</el-button>
</el-form>
</el-form>
<el-table
:data="fileContentList"
height="240"
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columnFileContentArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<!-- <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>-->
<a @click="downloadFile(scope.row)" >下载</a>
<a type="text" size="small" @click="deleteFile(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
<!-- <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">-->
<!-- <el-form :inline="true" label-position="top" style="margin-top: 0px">-->
<!-- <el-button type="primary" @click="addUploadFileModal">上传文件</el-button>-->
<!-- </el-form>-->
<!-- </el-form>-->
<!-- <el-table-->
<!-- :data="fileContentList"-->
<!-- height="240"-->
<!-- border-->
<!-- v-loading="dataListLoading"-->
<!-- style="width: 100%; ">-->
<!-- <el-table-column-->
<!-- v-for="(item,index) in columnFileContentArray" :key="index"-->
<!-- :sortable="item.columnSortable"-->
<!-- :prop="item.columnProp"-->
<!-- :header-align="item.headerAlign"-->
<!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
<!-- :align="item.align"-->
<!-- :fixed="item.fixed==''?false:item.fixed"-->
<!-- :min-width="item.columnWidth"-->
<!-- :label="item.columnLabel">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>-->
<!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"-->
<!-- style="width: 100px; height: 80px"/></span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="100"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
<!-- <a @click="downloadFile(scope.row)" >下载</a>-->
<!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
</el-tab-pane>
<el-tab-pane label="项目物料" name="part">
<projectPart ref="projectPart"></projectPart>
@ -549,9 +550,11 @@
import quotationHeader from "./com_project_info_quotation.vue";
import DictDataSelect from "../../sys/dict-data-select.vue";
import ChangeRecord from "./com_project_change_record.vue";
import OssComponents from "../../oss/ossComponents.vue";
/*組件*/
export default {
components: {
OssComponents,
ChangeRecord,
DictDataSelect,
Chooselist,
@ -1332,7 +1335,99 @@
fixed: '',
columnWidth: 100
}
]
],
ossColumns:[
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2FileName',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'fileName',
headerAlign: 'center',
align: 'center',
columnLabel: '文件名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2FileRemark',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'fileRemark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 240
},
// {
// userId: this.$store.state.user.name,
// functionId: 103001,
// serialNumber: '103001Table2OrderRef3',
// tableId: '103001Table2',
// tableName: '',
// columnProp: 'orderRef3',
// headerAlign: 'center',
// align: 'center',
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth: 120
// },
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2CreateDate',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2CreatedBy',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
}
],
}
},
mounted() {

99
src/views/modules/quotation/requestForQuote.vue

@ -989,6 +989,9 @@
<el-tab-pane label="报价明细" name="quote_detail" >
<inquiry-quote-detail :quotation="quotationCurrentRow"></inquiry-quote-detail>
</el-tab-pane>
<el-tab-pane label="附件信息" name="oss_file" >
<oss-components style="margin-top: 5px" height="44vh" :columns="ossColumns" :order-ref1="quotationCurrentRow.site" :order-ref2="quotationCurrentRow.quotationNo"></oss-components>
</el-tab-pane>
</el-tabs>
<!-- chooseList模态框 -->
@ -1039,6 +1042,7 @@ import {getPriceCheckDetailList} from "../../../api/quotation/priceCheckDetail";
import InquiryQuoteDetail from "./inquiry/inquiryQuoteDetail.vue";
import {queryCustomer} from "../../../api/customer/customerInformation";
import {queryProjectByCustomer} from "../../../api/project/project";
import OssComponents from "../oss/ossComponents.vue";
export default {
computed: {
@ -1059,6 +1063,7 @@ export default {
},
},
components: {
OssComponents,
InquiryQuoteDetail,
PriceCheckDetail,
TestProperties,
@ -2090,7 +2095,99 @@ export default {
projectPartModelFlag: false,
contactModelFlag: false,
priceCheckDetailList:[],
plmQuotationInformationArr: []
plmQuotationInformationArr: [],
ossColumns:[
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2FileName',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'fileName',
headerAlign: 'center',
align: 'center',
columnLabel: '文件名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2FileRemark',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'fileRemark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 240
},
// {
// userId: this.$store.state.user.name,
// functionId: 103001,
// serialNumber: '103001Table2OrderRef3',
// tableId: '103001Table2',
// tableName: '',
// columnProp: 'orderRef3',
// headerAlign: 'center',
// align: 'center',
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth: 120
// },
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2CreateDate',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2CreatedBy',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
}
],
}
},
mounted() {

152
src/views/modules/quotation/sellForQuotation.vue

@ -169,6 +169,10 @@
<el-tab-pane label="审批信息" name="approvalInformation">
<approval-information ref="approvalTable" v-model:data-list="approvalList" :height="300"></approval-information>
</el-tab-pane>
<el-tab-pane label="附件信息" name="oss">
<oss-components :columns="ossColumns" :order-ref1="quotationHeader.site" :order-ref2="`${quotationHeader.quotationNo}-${quotationHeader.versionCode}`"></oss-components>
</el-tab-pane>
</el-tabs>
<!-- 新增弹框 -->
@ -196,7 +200,7 @@
<span slot="label" style="" v-if="insertData.internalInquiryNo ===''" @click="getBaseList(102,1)"><a
herf="#">客户编码</a></span>
<el-input v-model="insertData.customerNo" :disabled="insertData.internalInquiryNo !==''"
clearable @change="clearCustomer"/>
clearable @change="clearCustomer" @blur="handleQueryCustomer"/>
</el-form-item>
</el-col>
<el-col :span="16">
@ -212,7 +216,7 @@
@click="clickProject"><a herf="#">项目编码</a></span>
<el-input v-model="insertData.projectId"
:disabled="insertData.customerNo ==='' || insertData.internalInquiryNo !==''"
clearable/>
clearable @blur="handleQueryProjectByCustomer"/>
</el-form-item>
</el-col>
<el-col :span="16">
@ -411,10 +415,12 @@ import {getQuotePage} from "../../../api/quotation/quote";
import {queryCustomer} from "../../../api/customer/customerInformation";
import {queryProjectByCustomer} from "../../../api/project/project";
import ApprovalInformation from "../changeManagement/approvalInformation.vue";
import OssComponents from "../oss/ossComponents.vue";
export default {
components: {
ApprovalInformation,
OssComponents,
QuoteDetail,
Chooselist,
quotationExamineAndApprove,
@ -778,10 +784,107 @@ export default {
//
quotationNoData: [],
//
quotationHeader: {},
quotationHeader: {
quotationNo: "",
versionCode: "",
site: "",
},
//
insertQuotationHeaderBtn: false,
approvalList: [],
ossColumns:[
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2FileName',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'fileName',
headerAlign: 'center',
align: 'center',
columnLabel: '文件名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2FileRemark',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'fileRemark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 240
},
// {
// userId: this.$store.state.user.name,
// functionId: 103001,
// serialNumber: '103001Table2OrderRef3',
// tableId: '103001Table2',
// tableName: '',
// columnProp: 'orderRef3',
// headerAlign: 'center',
// align: 'center',
// columnLabel: '',
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth: 120
// },
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2CreateDate',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 103001,
serialNumber: '103001Table2CreatedBy',
tableId: '103001Table2',
tableName: '文件信息表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
}
],
}
},
methods: {
@ -1324,7 +1427,50 @@ export default {
this.initData();//
}
this.initPage = true;
},
handleQueryCustomer(){
let params = {
site:this.$store.state.user.site,
customerNo:this.insertData.customerNo
}
queryCustomer(params).then(({data})=>{
if (data && data.code === 0 ) {
if (data.rows && data.rows.length === 1){
this.insertData.customerName = data.rows[0].customerDesc
}else {
this.insertData.customerName = ''
}
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
handleQueryProjectByCustomer(){
let params = {
site:this.$store.state.user.site,
customerId:this.insertData.customerNo,
projectId:this.insertData.projectId
}
queryProjectByCustomer(params).then(({data})=>{
if (data && data.code === 0 ){
if (data.rows && data.rows.length === 1){
this.insertData.projectName = data.rows[0].projectName
this.insertData.finalCustomerId = data.rows[0].finalCustomerId
this.insertData.finalCustomerName = data.rows[0].finalCustomerName
}else {
this.insertData.projectName = ''
this.insertData.finalCustomerId = ''
this.insertData.finalCustomerName = ''
}
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
},
computed: {},
watch: {

9
src/views/modules/test/file/testFile.vue

@ -88,8 +88,8 @@ export default {
},
previewFile(row){
//
let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
let type = '';
let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
if (image.includes(row.fileType.toLowerCase())){
type = 'image/' + row.fileType;
}
@ -104,13 +104,6 @@ export default {
}
let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'];
if (office.includes(row.fileType.toLowerCase())){
// if (row.fileType.toLowerCase() === 'doc' || row.fileType.toLowerCase() === 'docx'){
// type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
// } else if (row.fileType.toLowerCase() === 'ppt' || row.fileType.toLowerCase() === 'pptx'){
// type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
// } else {
// type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
// }
this.$message.warning(`该文件格式暂不支持预览`)
return
}

Loading…
Cancel
Save