布局政策征求意见流程

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,4 +1,5 @@
<template> <template>
<div>
<el-drawer <el-drawer
:title="modalshowtitle" :title="modalshowtitle"
:visible.sync="modalshowflag" :visible.sync="modalshowflag"
@@ -41,6 +42,37 @@
placeholder="请输入修改理由" placeholder="请输入修改理由"
clearable></el-input> clearable></el-input>
</el-form-item> </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-form-item label="处理意见" prop="handlingSuggestion" label-width="150px" class="add-form-item">
<el-input v-model.trim="sarStandardsInfoEO.handlingSuggestion" <el-input v-model.trim="sarStandardsInfoEO.handlingSuggestion"
placeholder="请输入处理意见" placeholder="请输入处理意见"
@@ -57,14 +89,26 @@
<el-button size="mini" class="common-button-primary" icon="el-icon-check" type="primary" <el-button size="mini" class="common-button-primary" icon="el-icon-check" type="primary"
@click="saveOrUpdateStands" :loading="isSubmit">提交 @click="saveOrUpdateStands" :loading="isSubmit">提交
</el-button> </el-button>
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="resetForm">取消</el-button> <el-button size="mini" class="common-button-default" icon="el-icon-close" @click="resetForm">取消
</el-button>
</div> </div>
</el-drawer> </el-drawer>
<processFile
ref="processFileRef"
:accept="accept"
:fileMax_M="fileMax_M"
@uploadSuccess="uploadSuccess"/>
</div>
</template> </template>
<script> <script>
import processFile from "../../../components/processFile";
export default { export default {
name: "addModel", name: "addModel",
components: {
processFile
},
data() { data() {
return { return {
modalshowflag: false, modalshowflag: false,
@@ -129,9 +173,42 @@
} }
], ],
}, },
fileListName: '',
fileName: '',
accept: '',
fileMax_M: 0,
} }
}, },
methods: { 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() { add() {
this.modalshowflag = true this.modalshowflag = true
this.sarStandardsInfoEO = {} this.sarStandardsInfoEO = {}
@@ -9,7 +9,7 @@
<el-timeline-item timestamp="发起流程" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''"> <el-timeline-item timestamp="发起流程" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''">
<el-card> <el-card>
<el-form-item prop="startUserName" style="margin-bottom: 0"> <el-form-item prop="startUserName" style="margin-bottom: 0">
<h4>流程发起人</h4> <h4>起草</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.startUser" <el-input :disabled="disabledXX" v-model="roleForm.startUser"
style="display: none;"></el-input> style="display: none;"></el-input>
@@ -20,81 +20,145 @@
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-timeline-item timestamp="责任对接人任务分发及审核" placement="top" <el-timeline-item timestamp="审核" placement="top"
:color="roleForm.responseDockerId ? '#66b1ff' : ''"> :color="roleForm.responseDockerId ? '#66b1ff' : ''">
<el-card> <el-card>
<el-form-item prop="responseDockerName" style="margin-bottom: 0"> <el-form-item prop="responseDockerName" style="margin-bottom: 0">
<h4>责任对接人</h4> <h4>审核</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.responseDockerId" <el-input :disabled="disabledXX" v-model="roleForm.responseDockerId"
style="display: none;"></el-input> style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.responseDockerName" readonly <el-input :disabled="disabledXX" v-model="roleForm.responseDockerName" readonly
placeholder="选择责任对接人" placeholder="选择审核人"
@click.native="choicePeoPle('responseDockerId', '选择责任对接人', roleForm.responseDockerId)"></el-input> @click.native="choicePeoPle('responseDockerId', '选择审核人', roleForm.responseDockerId,true)"></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-timeline-item timestamp="法规认证工程师意见汇总并发起会签" placement="top" <el-timeline-item timestamp="审定" placement="top"
:color="roleForm.lawsProveEngineerId ? '#66b1ff' : ''"> :color="roleForm.lawsProveEngineerId ? '#66b1ff' : ''">
<el-card> <el-card>
<el-form-item prop="lawsProveEngineerName" style="margin-bottom: 0"> <el-form-item prop="lawsProveEngineerName" style="margin-bottom: 0">
<h4>法规认证工程师</h4> <h4>审定</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveEngineerId" <el-input :disabled="disabledXX" v-model="roleForm.lawsProveEngineerId"
style="display: none;"></el-input> style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveEngineerName" readonly <el-input :disabled="disabledXX" v-model="roleForm.lawsProveEngineerName" readonly
placeholder="选择法规认证工程师" placeholder="选择审定人"
@click.native="choicePeoPle('lawsProveEngineerId', '选择法规认证工程师', roleForm.lawsProveEngineerId)"></el-input> @click.native="choicePeoPle('lawsProveEngineerId', '选择审定人', roleForm.lawsProveEngineerId,true)"></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-timeline-item timestamp="法规认证部部长审核" placement="top" <el-timeline-item timestamp="批准" placement="top"
:color="roleForm.lawsProveMinisterId ? '#66b1ff' : ''"> :color="roleForm.lawsProveMinisterId ? '#66b1ff' : ''">
<el-card> <el-card>
<el-form-item prop="lawsProveMinisterName" style="margin-bottom: 0"> <el-form-item prop="lawsProveMinisterName" style="margin-bottom: 0">
<h4>法规认证部部长</h4> <h4>批准</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveMinisterId" <el-input :disabled="disabledXX" v-model="roleForm.lawsProveMinisterId"
style="display: none;"></el-input> style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveMinisterName" readonly <el-input :disabled="disabledXX" v-model="roleForm.lawsProveMinisterName" readonly
placeholder="选择法规认证部部长" placeholder="选择批准人"
@click.native="choicePeoPle('lawsProveMinisterId', '选择法规认证部部长', roleForm.lawsProveMinisterId)"></el-input> @click.native="choicePeoPle('lawsProveMinisterId', '选择批准人', roleForm.lawsProveMinisterId,false)"></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-timeline-item timestamp="法规认证部副总监审定" placement="top" <el-timeline-item timestamp="责任对接人分配任务" placement="top"
:color="roleForm.lawsProveViceChiefId ? '#66b1ff' : ''"> :color="roleForm.lawsProveViceChiefId ? '#66b1ff' : ''">
<el-card> <el-card>
<el-form-item prop="lawsProveViceChiefName" style="margin-bottom: 0"> <el-form-item prop="lawsProveViceChiefName" style="margin-bottom: 0">
<h4>法规认证部副总监</h4> <h4>责任对接人分配任务</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveViceChiefId" <el-input :disabled="disabledXX" v-model="roleForm.lawsProveViceChiefId"
style="display: none;"></el-input> style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveViceChiefName" readonly <el-input :disabled="disabledXX" v-model="roleForm.lawsProveViceChiefName" readonly
placeholder="选择法规认证部副总监" placeholder="责任对接人分配任务"
@click.native="choicePeoPle('lawsProveViceChiefId', '选择法规认证部副总监', roleForm.lawsProveViceChiefId)"></el-input> @click.native="choicePeoPle('lawsProveViceChiefId', '责任对接人分配任务', roleForm.lawsProveViceChiefId,true)"></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
<el-timeline-item timestamp="法规认证部总监批准" placement="top" <el-timeline-item timestamp="管理员" placement="top"
:color="roleForm.lawsProveChiefId ? '#66b1ff' : ''"> :color="roleForm.lawsProveChiefId ? '#66b1ff' : ''">
<el-card> <el-card>
<el-form-item prop="lawsProveChiefName" style="margin-bottom: 0"> <el-form-item prop="lawsProveChiefName" style="margin-bottom: 0">
<h4>法规认证部总监</h4> <h4>管理员</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefId" <el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefId"
style="display: none;"></el-input> style="display: none;"></el-input>
<el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefName" readonly <el-input :disabled="disabledXX" v-model="roleForm.lawsProveChiefName" readonly
placeholder="选择法规认证部总监" placeholder="管理员"
@click.native="choicePeoPle('lawsProveChiefId', '选择法规认证部总监', roleForm.lawsProveChiefId)"></el-input> @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> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
@@ -107,6 +171,7 @@
:is-visible.sync="modalshowflag" :is-visible.sync="modalshowflag"
@checkedRole="checkedRole" @checkedRole="checkedRole"
:nodeList="nodeList" :nodeList="nodeList"
:checkBox="checkBox"
></Role-tree> ></Role-tree>
</div> </div>
</template> </template>
@@ -142,15 +207,22 @@
drawerTitle: '', drawerTitle: '',
nodeList: [], nodeList: [],
modalshowflag: false, 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: { methods: {
//选择人 //选择人
choicePeoPle(type, title, id) { choicePeoPle(type, title, id, isTrue) {
this.nodeList = []; this.nodeList = [];
this.nodeList.push(id); this.nodeList.push(id);
this.type = type; this.type = type;
this.drawerTitle = title; this.drawerTitle = title;
this.checkBox = isTrue
this.modalshowflag = true; this.modalshowflag = true;
}, },
//选择人 //选择人
@@ -39,7 +39,7 @@
ref="selection" ref="selection"
:data="histortData" :data="histortData"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%;margin-bottom: 20px"
border border
row-key="id" row-key="id"
@selection-change="selectChange" @selection-change="selectChange"
@@ -61,10 +61,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="责任单位截止时间" prop="responsibilityEndTime" <el-form-item label="责任单位截止时间" prop="responsibleUnitDeadline"
class="add-form-item form-item-disabled"> class="add-form-item form-item-disabled">
<el-date-picker :disabled="disabledXX" <el-date-picker :disabled="disabledXX"
v-model="dataForm.responsibilityEndTime" v-model="dataForm.responsibleUnitDeadline"
type="date" type="date"
style="width: 100%" style="width: 100%"
placeholder="请选择责任单位截止时间"> placeholder="请选择责任单位截止时间">
@@ -95,7 +95,7 @@
<el-input <el-input
disabled disabled
style="display: none;" style="display: none;"
v-model="dataForm.templateFileNameList" v-model="dataForm.templateFileId"
clearable clearable
></el-input> ></el-input>
<div v-if="dataForm.templateFileList && dataForm.templateFileList.length > 0"> <div v-if="dataForm.templateFileList && dataForm.templateFileList.length > 0">
@@ -116,7 +116,7 @@
<el-button :disabled="disabledXX" <el-button :disabled="disabledXX"
type="primary" type="primary"
class="common-button-primary" class="common-button-primary"
@click="fileUpload" @click="fileUpload('templateFileList','templateFileId','.zip,.docx,.doc,.xls,.xlsx',200)"
size="mini"> size="mini">
点击上传 点击上传
</el-button> </el-button>
@@ -158,28 +158,6 @@
@submit="handleSubmit" @submit="handleSubmit"
> >
</ProcessFooter> </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 <Role-tree
check-box check-box
is-title="转办处理人" is-title="转办处理人"
@@ -188,6 +166,11 @@
></Role-tree> ></Role-tree>
<policySolicitingOpinions ref="policySolicitingOpinionsRef" <policySolicitingOpinions ref="policySolicitingOpinionsRef"
@policySolicitingOpinionsForm="policySolicitingOpinionsForm"/> @policySolicitingOpinionsForm="policySolicitingOpinionsForm"/>
<processFile
ref="processFileRef"
:accept="accept"
:fileMax_M="fileMax_M"
@uploadSuccess="uploadSuccess"/>
</div> </div>
</template> </template>
@@ -199,6 +182,7 @@
import personnelInformation from "./components/personnelInformation";//人员信息 import personnelInformation from "./components/personnelInformation";//人员信息
import solicitationList from "./components/solicitationList";//征求意见列表 import solicitationList from "./components/solicitationList";//征求意见列表
import policySolicitingOpinions from "./components/policySolicitingOpinions"; import policySolicitingOpinions from "./components/policySolicitingOpinions";
import processFile from "../../components/processFile";
import {queryTaskFirst, saveTaskFirst, taskDel, changeAssigneeNew} from "api/process"; import {queryTaskFirst, saveTaskFirst, taskDel, changeAssigneeNew} from "api/process";
import axios from "axios"; import axios from "axios";
@@ -211,11 +195,14 @@
approvalHistory, approvalHistory,
personnelInformation, personnelInformation,
solicitationList, solicitationList,
policySolicitingOpinions policySolicitingOpinions,
processFile
}, },
data() { data() {
return { return {
active: '1', active: '1',
accept: '',
fileMax_M: 0,
disabledXX: false, disabledXX: false,
drawerModal: false, drawerModal: false,
formRules: { formRules: {
@@ -231,16 +218,16 @@
cycleTime: [ cycleTime: [
{required: true, message: '请选择政策征求意见周期', trigger: 'change'}, {required: true, message: '请选择政策征求意见周期', trigger: 'change'},
], ],
responsibilityEndTime: [ responsibleUnitDeadline: [
{required: true, message: '请选择责任单位截止时间', trigger: 'change'}, {required: true, message: '请选择责任单位截止时间', trigger: 'change'},
], ],
}, },
dataForm: {}, dataForm: {},
fileMadel: false,
fileUrl: 'api/att/attFile/uploadNew',
saveLoading: false, saveLoading: false,
isSubmit: false, isSubmit: false,
commentText: '', commentText: '',
fileListName: '',
fileName: '',
} }
}, },
computed: { computed: {
@@ -252,6 +239,16 @@
} }
}, },
methods: { methods: {
handlePreview(file) {
let attId = ""
if (file && file.id) {
attId = file.id
} else {
attId = file.response.data.id
}
this.$preview(attId)
},
//基础信息/人员信息 //基础信息/人员信息
handleTabs(type) { handleTabs(type) {
this.active = type; this.active = type;
@@ -265,8 +262,17 @@
handleSearchStandard() { handleSearchStandard() {
this.$refs.policySolicitingOpinionsRef.handleSearchStandard() this.$refs.policySolicitingOpinionsRef.handleSearchStandard()
}, },
fileUpload() { fileUpload(fileListName, fileName, accept, fileMax_M) {
this.fileMadel = true 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) { clickButtonToUpload(file) {
const attId = file.attId const attId = file.attId
@@ -276,58 +282,6 @@
this.$message.warning('文件不存在,下载失败') 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() { handleSave() {
this.saveLoading = true; this.saveLoading = true;