布局政策征求意见流程

This commit is contained in:
范强强
2023-10-17 14:11:02 +08:00
parent 0f6c056271
commit cb4f422f6f
5 changed files with 388 additions and 168 deletions
@@ -0,0 +1,117 @@
<template>
<el-dialog width='400px' :visible.sync="fileMadel" :title="title">
<el-upload
v-if="fileMadel"
multiple
class="upload-demo"
drag
:action="fileUrl"
ref="importfile"
name="file"
:before-upload="beginImportFile"
:on-success="importFileSuccess"
:on-remove="importFileRemove"
:show-file-list="true"
:file-list="fileList"
>
<div style="padding: 20px 0">
<i class="el-icon-upload" style="color: #3399ff"></i>
<p>点击或拖拽上传文件</p>
</div>
</el-upload>
</el-dialog>
</template>
<script>
export default {
name: "processFile",
props: {
title: {
type: String,
default: '上传文件'
},
fileMax_M: {
type: Number,
default: 0
},
accept: {
type: String,
default: '*'
}
},
data() {
return {
fileMadel: false,
fileUrl: 'api/att/attFile/uploadNew',
fileList: [],
}
},
methods: {
getFile(fileList) {
this.fileList = fileList || []
this.fileMadel = true
},
beginImportFile(file) {
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
fileSuffix = fileSuffix.toLowerCase()
if (this.fileMax_M > 0) {
if (file.size / 1024 / 1024 > this.fileMax_M) {
this.$message({
message: '文件' + file.name + '大小不超过' + this.fileMax_M + 'M',
type: 'warning'
})
return false
}
}
if (this.accept == '*') {
} else {
if (this.accept.includes(fileSuffix)) {
return true
} else {
this.$message.error('文件' + file.name + '格式不正确,请上传' + this.accept + '文件')
return false
}
}
return true
},
// 导入标准数据成功后执行
importFileSuccess(response, file, fileList) {
if (response.ok) {
let templateFileList = []
let list = []
fileList.forEach(item => {
templateFileList.push(item)
list.push(item.name)
})
let templateFileName = list.join(',')
this.$emit('uploadSuccess', templateFileList, templateFileName)
this.$message({
// showClose: true,
message: response.message,
type: 'success'
})
} else {
this.$message.error('程序异常,上传失败')
}
},
importFileRemove(file, fileList) {
let list = []
let templateFileList = []
fileList.forEach(item => {
templateFileList.push(item)
list.push(item.name)
})
let templateFileName = list.join(',')
this.$emit('uploadSuccess', templateFileList, templateFileName)
},
}
}
</script>
<style scoped>
</style>
@@ -1,70 +1,114 @@
<template>
<el-drawer
:title="modalshowtitle"
:visible.sync="modalshowflag"
:wrapperClosable="false"
size="800px"
@close="resetForm"
ref="standard"
append-to-body
>
<!-- 新增样式 -->
<div class="demo-drawer-content">
<el-form
ref="sarStandardsInfoForm"
:model="sarStandardsInfoEO"
:rules="sarStandardsInfoRules"
class="label-input-form"
>
<el-form-item label="章节编号" prop="chapterNumber" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.chapterNumber"
placeholder="请输入章节编号"
clearable></el-input>
</el-form-item>
<el-form-item label="章节条目" prop="chapterEntry" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.chapterEntry"
placeholder="请输入章节条目"
clearable></el-input>
</el-form-item>
<el-form-item label="修改前" prop="beforeRevision" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.beforeRevision"
placeholder="请输入修改前"
clearable></el-input>
</el-form-item>
<el-form-item label="修改后" prop="afterRevision" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.afterRevision"
placeholder="请输入修改后"
clearable></el-input>
</el-form-item>
<el-form-item label="修改理由" prop="revisionModification" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.revisionModification"
placeholder="请输入修改理由"
clearable></el-input>
</el-form-item>
<el-form-item label="处理意见" prop="handlingSuggestion" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.handlingSuggestion"
placeholder="请输入处理意见"
clearable></el-input>
</el-form-item>
<el-form-item label="原因" prop="reason" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.reason"
placeholder="请输入原因"
clearable></el-input>
</el-form-item>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button size="mini" class="common-button-primary" icon="el-icon-check" type="primary"
@click="saveOrUpdateStands" :loading="isSubmit">提交
</el-button>
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="resetForm">取消</el-button>
</div>
</el-drawer>
<div>
<el-drawer
:title="modalshowtitle"
:visible.sync="modalshowflag"
:wrapperClosable="false"
size="800px"
@close="resetForm"
ref="standard"
append-to-body
>
<!-- 新增样式 -->
<div class="demo-drawer-content">
<el-form
ref="sarStandardsInfoForm"
:model="sarStandardsInfoEO"
:rules="sarStandardsInfoRules"
class="label-input-form"
>
<el-form-item label="章节编号" prop="chapterNumber" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.chapterNumber"
placeholder="请输入章节编号"
clearable></el-input>
</el-form-item>
<el-form-item label="章节条目" prop="chapterEntry" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.chapterEntry"
placeholder="请输入章节条目"
clearable></el-input>
</el-form-item>
<el-form-item label="修改前" prop="beforeRevision" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.beforeRevision"
placeholder="请输入修改前"
clearable></el-input>
</el-form-item>
<el-form-item label="修改后" prop="afterRevision" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.afterRevision"
placeholder="请输入修改后"
clearable></el-input>
</el-form-item>
<el-form-item label="修改理由" prop="revisionModification" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.revisionModification"
placeholder="请输入修改理由"
clearable></el-input>
</el-form-item>
<el-form-item label="模板"
label-width="150px"
class="add-form-item">
<el-input
disabled
style="display: none;"
v-model="sarStandardsInfoEO.templateFileId"
clearable
></el-input>
<div v-if="sarStandardsInfoEO.templateFileList && sarStandardsInfoEO.templateFileList.length > 0">
<div v-for="(item, index) in sarStandardsInfoEO.templateFileList" :key="index"
style="margin-right: 5px;padding-left: 10px">
<div class="fileClass">
<span @click="handlePreview(item)">{{ item.name }}</span>
<el-button size="small"
@click="clickButtonToUpload(item)"
icon="el-icon-download"
style="height: 32px; margin-left: 5px;"
></el-button>
</div>
</div>
</div>
<div>
<el-button type="primary"
class="common-button-primary"
@click="fileUpload('templateFileList','templateFileId','.zip,.docx,.doc,.xls,.xlsx',200)"
size="mini">
点击上传
</el-button>
</div>
</el-form-item>
<el-form-item label="处理意见" prop="handlingSuggestion" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.handlingSuggestion"
placeholder="请输入处理意见"
clearable></el-input>
</el-form-item>
<el-form-item label="原因" prop="reason" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.reason"
placeholder="请输入原因"
clearable></el-input>
</el-form-item>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button size="mini" class="common-button-primary" icon="el-icon-check" type="primary"
@click="saveOrUpdateStands" :loading="isSubmit">提交
</el-button>
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="resetForm">取消
</el-button>
</div>
</el-drawer>
<processFile
ref="processFileRef"
:accept="accept"
:fileMax_M="fileMax_M"
@uploadSuccess="uploadSuccess"/>
</div>
</template>
<script>
import processFile from "../../../components/processFile";
export default {
name: "addModel",
components: {
processFile
},
data() {
return {
modalshowflag: false,
@@ -129,9 +173,42 @@
}
],
},
fileListName: '',
fileName: '',
accept: '',
fileMax_M: 0,
}
},
methods: {
handlePreview(file) {
let attId = ""
if (file && file.id) {
attId = file.id
} else {
attId = file.response.data.id
}
this.$preview(attId)
},
clickButtonToUpload(file) {
const attId = file.attId
if (attId) {
window.location.href = '/api/att/attFile/downloadFileForSarNew?fileId=' + attId
} else {
this.$message.warning('文件不存在,下载失败')
}
},
fileUpload(fileListName, fileName, accept, fileMax_M) {
this.fileListName = fileListName
this.fileName = fileName
this.accept = accept
this.fileMax_M = fileMax_M
this.$refs.processFileRef.getFile(this.sarStandardsInfoEO[this.fileListName])
},
uploadSuccess(fileList, fileId) {
this.sarStandardsInfoEO[this.fileListName] = fileList
this.sarStandardsInfoEO[this.fileName] = fileId
this.sarStandardsInfoEO = {...this.sarStandardsInfoEO}
},
add() {
this.modalshowflag = true
this.sarStandardsInfoEO = {}
@@ -9,7 +9,7 @@
<el-timeline-item timestamp="发起流程" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="startUserName" style="margin-bottom: 0">
<h4>流程发起人</h4>
<h4>起草</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.startUser"
style="display: none;"></el-input>
@@ -20,81 +20,145 @@
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="责任对接人任务分发及审核" placement="top"
<el-timeline-item timestamp="审核" placement="top"
:color="roleForm.responseDockerId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="responseDockerName" style="margin-bottom: 0">
<h4>责任对接人</h4>
<h4>审核</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.responseDockerId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.responseDockerName" readonly
placeholder="选择责任对接人"
@click.native="choicePeoPle('responseDockerId', '选择责任对接人', roleForm.responseDockerId)"></el-input>
placeholder="选择审核人"
@click.native="choicePeoPle('responseDockerId', '选择审核人', roleForm.responseDockerId,true)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="法规认证工程师意见汇总并发起会签" placement="top"
<el-timeline-item timestamp="审定" placement="top"
:color="roleForm.lawsProveEngineerId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveEngineerName" style="margin-bottom: 0">
<h4>法规认证工程师</h4>
<h4>审定</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveEngineerId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveEngineerName" readonly
placeholder="选择法规认证工程师"
@click.native="choicePeoPle('lawsProveEngineerId', '选择法规认证工程师', roleForm.lawsProveEngineerId)"></el-input>
placeholder="选择审定人"
@click.native="choicePeoPle('lawsProveEngineerId', '选择审定人', roleForm.lawsProveEngineerId,true)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="法规认证部部长审核" placement="top"
<el-timeline-item timestamp="批准" placement="top"
:color="roleForm.lawsProveMinisterId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveMinisterName" style="margin-bottom: 0">
<h4>法规认证部部长</h4>
<h4>批准</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveMinisterId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveMinisterName" readonly
placeholder="选择法规认证部部长"
@click.native="choicePeoPle('lawsProveMinisterId', '选择法规认证部部长', roleForm.lawsProveMinisterId)"></el-input>
placeholder="选择批准人"
@click.native="choicePeoPle('lawsProveMinisterId', '选择批准人', roleForm.lawsProveMinisterId,false)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="法规认证部副总监审定" placement="top"
<el-timeline-item timestamp="责任对接人分配任务" placement="top"
:color="roleForm.lawsProveViceChiefId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveViceChiefName" style="margin-bottom: 0">
<h4>法规认证部副总监</h4>
<h4>责任对接人分配任务</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveViceChiefId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveViceChiefName" readonly
placeholder="选择法规认证部副总监"
@click.native="choicePeoPle('lawsProveViceChiefId', '选择法规认证部副总监', roleForm.lawsProveViceChiefId)"></el-input>
placeholder="责任对接人分配任务"
@click.native="choicePeoPle('lawsProveViceChiefId', '责任对接人分配任务', roleForm.lawsProveViceChiefId,true)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="法规认证部总监批准" placement="top"
<el-timeline-item timestamp="管理员" placement="top"
:color="roleForm.lawsProveChiefId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveChiefName" style="margin-bottom: 0">
<h4>法规认证部总监</h4>
<h4>管理员</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefName" readonly
placeholder="选择法规认证部总监"
@click.native="choicePeoPle('lawsProveChiefId', '选择法规认证部总监', roleForm.lawsProveChiefId)"></el-input>
placeholder="管理员"
@click.native="choicePeoPle('lawsProveChiefId', '管理员', roleForm.lawsProveChiefId,false)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="审核" placement="top"
:color="roleForm.lawsProveChiefId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveChiefName" style="margin-bottom: 0">
<h4>审核</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefName" readonly
placeholder="审核"
@click.native="choicePeoPle('lawsProveChiefId', '审核', roleForm.lawsProveChiefId,true)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="审定" placement="top"
:color="roleForm.lawsProveChiefId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveChiefName" style="margin-bottom: 0">
<h4>审定</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefName" readonly
placeholder="审定"
@click.native="choicePeoPle('lawsProveChiefId', '审定', roleForm.lawsProveChiefId,true)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="批准" placement="top"
:color="roleForm.lawsProveChiefId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveChiefName" style="margin-bottom: 0">
<h4>批准</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefName" readonly
placeholder="批准"
@click.native="choicePeoPle('lawsProveChiefId', '批准', roleForm.lawsProveChiefId,false)"></el-input>
</div>
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="抄送" placement="top"
:color="roleForm.lawsProveChiefId ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="lawsProveChiefName" style="margin-bottom: 0">
<h4>抄送</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefId"
style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefName" readonly
placeholder="抄送"
@click.native="choicePeoPle('lawsProveChiefId', '抄送', roleForm.lawsProveChiefId,true)"></el-input>
</div>
</el-form-item>
</el-card>
@@ -107,6 +171,7 @@
:is-visible.sync="modalshowflag"
@checkedRole="checkedRole"
:nodeList="nodeList"
:checkBox="checkBox"
></Role-tree>
</div>
</template>
@@ -142,15 +207,22 @@
drawerTitle: '',
nodeList: [],
modalshowflag: false,
checkBox: false,
}
},
mounted() {
this.roleForm.startUser = this.$store.getters.userInfo.userId
this.roleForm.startUserName = this.$store.getters.userInfo.userName
this.roleForm = {...this.roleForm}
},
methods: {
//选择人
choicePeoPle(type, title, id) {
choicePeoPle(type, title, id, isTrue) {
this.nodeList = [];
this.nodeList.push(id);
this.type = type;
this.drawerTitle = title;
this.checkBox = isTrue
this.modalshowflag = true;
},
//选择人
@@ -39,7 +39,7 @@
ref="selection"
:data="histortData"
tooltip-effect="dark"
style="width: 100%"
style="width: 100%;margin-bottom: 20px"
border
row-key="id"
@selection-change="selectChange"
@@ -61,10 +61,10 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="责任单位截止时间" prop="responsibilityEndTime"
<el-form-item label="责任单位截止时间" prop="responsibleUnitDeadline"
class="add-form-item form-item-disabled">
<el-date-picker :disabled="disabledXX"
v-model="dataForm.responsibilityEndTime"
v-model="dataForm.responsibleUnitDeadline"
type="date"
style="width: 100%"
placeholder="请选择责任单位截止时间">
@@ -95,7 +95,7 @@
<el-input
disabled
style="display: none;"
v-model="dataForm.templateFileNameList"
v-model="dataForm.templateFileId"
clearable
></el-input>
<div v-if="dataForm.templateFileList && dataForm.templateFileList.length > 0">
@@ -116,7 +116,7 @@
<el-button :disabled="disabledXX"
type="primary"
class="common-button-primary"
@click="fileUpload"
@click="fileUpload('templateFileList','templateFileId','.zip,.docx,.doc,.xls,.xlsx',200)"
size="mini">
点击上传
</el-button>
@@ -158,28 +158,6 @@
@submit="handleSubmit"
>
</ProcessFooter>
<el-dialog width='400px' :visible.sync="fileMadel" title="上传模板">
<el-upload
v-if="fileMadel"
multiple
class="upload-demo"
drag
:action="fileUrl"
ref="importfile"
name="file"
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx"
:before-upload="beginImportFile"
:on-success="importFileSuccess"
:on-remove="importFileRemove"
:show-file-list="true"
:file-list="dataForm.templateFileList"
>
<div style="padding: 20px 0">
<i class="el-icon-upload" style="color: #3399ff"></i>
<p>点击或拖拽上传文件</p>
</div>
</el-upload>
</el-dialog>
<Role-tree
check-box
is-title="转办处理人"
@@ -188,6 +166,11 @@
></Role-tree>
<policySolicitingOpinions ref="policySolicitingOpinionsRef"
@policySolicitingOpinionsForm="policySolicitingOpinionsForm"/>
<processFile
ref="processFileRef"
:accept="accept"
:fileMax_M="fileMax_M"
@uploadSuccess="uploadSuccess"/>
</div>
</template>
@@ -199,6 +182,7 @@
import personnelInformation from "./components/personnelInformation";//人员信息
import solicitationList from "./components/solicitationList";//征求意见列表
import policySolicitingOpinions from "./components/policySolicitingOpinions";
import processFile from "../../components/processFile";
import {queryTaskFirst, saveTaskFirst, taskDel, changeAssigneeNew} from "api/process";
import axios from "axios";
@@ -211,11 +195,14 @@
approvalHistory,
personnelInformation,
solicitationList,
policySolicitingOpinions
policySolicitingOpinions,
processFile
},
data() {
return {
active: '1',
accept: '',
fileMax_M: 0,
disabledXX: false,
drawerModal: false,
formRules: {
@@ -231,16 +218,16 @@
cycleTime: [
{required: true, message: '请选择政策征求意见周期', trigger: 'change'},
],
responsibilityEndTime: [
responsibleUnitDeadline: [
{required: true, message: '请选择责任单位截止时间', trigger: 'change'},
],
},
dataForm: {},
fileMadel: false,
fileUrl: 'api/att/attFile/uploadNew',
saveLoading: false,
isSubmit: false,
commentText: '',
fileListName: '',
fileName: '',
}
},
computed: {
@@ -252,6 +239,16 @@
}
},
methods: {
handlePreview(file) {
let attId = ""
if (file && file.id) {
attId = file.id
} else {
attId = file.response.data.id
}
this.$preview(attId)
},
//基础信息/人员信息
handleTabs(type) {
this.active = type;
@@ -265,8 +262,17 @@
handleSearchStandard() {
this.$refs.policySolicitingOpinionsRef.handleSearchStandard()
},
fileUpload() {
this.fileMadel = true
fileUpload(fileListName, fileName, accept, fileMax_M) {
this.fileListName = fileListName
this.fileName = fileName
this.accept = accept
this.fileMax_M = fileMax_M
this.$refs.processFileRef.getFile(this.dataForm[this.fileListName])
},
uploadSuccess(fileList, fileId) {
this.dataForm[this.fileListName] = fileList
this.dataForm[this.fileName] = fileId
this.dataForm = {...this.dataForm}
},
clickButtonToUpload(file) {
const attId = file.attId
@@ -276,58 +282,6 @@
this.$message.warning('文件不存在,下载失败')
}
},
// 导入按钮 上传之前的钩子
beginImportFile(file) {
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
// const fileSuffix = file.name.split('.')[1] // 后缀名
// 判断上传文件格式
if (fileSuffix === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx' || fileSuffix === '.XLS' || fileSuffix === '.XLSX' || fileSuffix === '.pdf' || fileSuffix === '.PDF' || fileSuffix === '.PPTX' || fileSuffix === '.pptx') {
return true
} else {
this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS,PDF文件')
return false
}
// 判断文件上传大小
// eslint-disable-next-line no-unreachable
if (file.size / 1024 / 1024 <= 200) {
return true
} else {
this.$message.error('文件' + file.name + '大小不超过200M')
return false
}
return true
},
// 导入标准数据成功后执行
importFileSuccess(response, file, fileList) {
if (response.ok) {
this.dataForm.templateFileList = []
let list = []
fileList.forEach(item => {
this.dataForm.templateFileList.push(item)
list.push(item.name)
})
this.dataForm.templateFileNameList = list.join(',')
this.$message({
// showClose: true,
message: response.message,
type: 'success'
})
} else {
this.$message.error('程序异常,上传失败')
}
},
importFileRemove(file, fileList) {
let list = []
this.dataForm.templateFileList = []
fileList.forEach(item => {
this.dataForm.templateFileList.push(item)
list.push(item.name)
})
this.dataForm.templateFileNameList = list.join(',')
},
//保存事件
handleSave() {
this.saveLoading = true;