|
@@ -23,7 +23,7 @@
|
|
|
</tr>-->
|
|
|
<tr>
|
|
|
<td>
|
|
|
- <el-form-item label="缓急" prop="urgency">
|
|
|
+ <el-form-item label="缓急" prop="ponderance">
|
|
|
<el-select v-model="form.ponderance" placeholder="请选择">
|
|
|
<el-option label="一般" value="4"></el-option>
|
|
|
<el-option label="平急" value="3"></el-option>
|
|
@@ -34,7 +34,7 @@
|
|
|
</el-form-item>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <el-form-item label="密级" prop="encryption">
|
|
|
+ <el-form-item label="密级" prop="securityClass">
|
|
|
<el-select v-model="form.securityClass" placeholder="请选择">
|
|
|
<el-option label="一般" value="3"></el-option>
|
|
|
<el-option label="秘密" value="2"></el-option>
|
|
@@ -108,19 +108,24 @@
|
|
|
<td colspan="2">
|
|
|
<el-form-item label="上传附件:" prop="accessory">
|
|
|
<el-upload
|
|
|
- ref="upload"
|
|
|
- :limit="1"
|
|
|
+
|
|
|
accept=".jpg, .png"
|
|
|
:action="upload.url"
|
|
|
:headers="upload.headers"
|
|
|
- :file-list="upload.fileList"
|
|
|
+ :file-list="upload.oldFileList"
|
|
|
+ multiple
|
|
|
+ :show-file-list="true"
|
|
|
:on-progress="handleFileUploadProgress"
|
|
|
- :on-success="handleFileSuccess"
|
|
|
- :auto-upload="false">
|
|
|
- <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
- <el-button style="margin-left: 10px;" size="small" type="success" :loading="upload.isUploading" @click="submitUpload">上传</el-button>
|
|
|
- <div slot="tip" class="el-upload__tip">只能上传文件,且不超过500kb</div>
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :http-request="submitUpload"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :before-remove="beforeRemove"
|
|
|
+ >
|
|
|
+ <el-button slot="trigger" size="small" :loading="upload.isUploading" type="primary">上传文件</el-button>
|
|
|
+<!-- <el-button style="margin-left: 10px;" size="small" type="success" :loading="upload.isUploading" @click="submitUpload">上传文件</el-button>-->
|
|
|
+ <div slot="tip" class="el-upload__tip">只能上传文件,且不超过1mb</div>
|
|
|
</el-upload>
|
|
|
+ <ul v-show="!!upload.oldFileList.length" class="old-file-list"></ul>
|
|
|
</el-form-item>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -128,7 +133,7 @@
|
|
|
<td colspan="2">
|
|
|
<el-form-item label="正文:" prop="content">
|
|
|
<el-button size="small" type="primary" @click="openIweboffice" v-loading.fullscreen.lock="fullscreenLoading">打开正文</el-button>
|
|
|
- <el-input v-model="form.content" type="primary" placeholder=""/>
|
|
|
+<!-- <el-input v-model="form.content" type="primary" placeholder=""/>-->
|
|
|
</el-form-item>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -192,7 +197,7 @@
|
|
|
import iWebOffice from "./iWebOffice";
|
|
|
import SelectRen from '@/components/SelectRen';
|
|
|
import {treeselect} from "@/api/system/dept";
|
|
|
- import {submitApply, getFormData, deleteToDoItem, submitToDoItem,updateInfo} from "@/api/activiti/form/fw";
|
|
|
+ import {submitApply, getFormData, deleteToDoItem, submitToDoItem,updateInfo,uploadFujian} from "@/api/activiti/form/fw";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
|
|
@@ -307,7 +312,8 @@
|
|
|
// 上传的地址
|
|
|
url: process.env.VUE_APP_BASE_API + "/common/upload",
|
|
|
// 上传的文件列表
|
|
|
- fileList: []
|
|
|
+ fileList: [],
|
|
|
+ oldFileList:[]
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -402,20 +408,43 @@
|
|
|
},
|
|
|
|
|
|
// 文件提交处理
|
|
|
- submitUpload() {
|
|
|
- this.$refs.upload.submit();
|
|
|
+ submitUpload(item) {
|
|
|
+ let uploadData = new FormData()
|
|
|
+ uploadData.append('file',item.file)
|
|
|
+ uploadFujian(uploadData).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.upload.fileList.push(response.fileName);
|
|
|
+ this.form.accessory=this.upload.fileList.toString()
|
|
|
+ this.upload.oldFileList.push({
|
|
|
+ name: response.fileName.substring(response.fileName.lastIndexOf("/")+1,response.fileName.length),
|
|
|
+ url: response.url
|
|
|
+ });
|
|
|
+ this.msgSuccess("上传成功");
|
|
|
+ this.upload.isUploading = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 文件上传中处理
|
|
|
handleFileUploadProgress(event, file, fileList) {
|
|
|
this.upload.isUploading = true;
|
|
|
},
|
|
|
- // 文件上传成功处理
|
|
|
- handleFileSuccess(response, file, fileList) {
|
|
|
- this.upload.isUploading = false;
|
|
|
- this.form.accessory = response.fileName;
|
|
|
- this.msgSuccess(response.msg);
|
|
|
- },
|
|
|
|
|
|
+ handlePreview(file) {
|
|
|
+ // 预览,一些文件因为格式问题无法预览。推荐使用a标签,src为文件的下载地址,点击即可下载,参照录音
|
|
|
+ window.open(file.url);
|
|
|
+ },
|
|
|
+ beforeRemove(file, fileList) {
|
|
|
+ return this.$confirm(`确定移除 ${ file.name }?`);
|
|
|
+ },
|
|
|
+ handleRemove(file) {
|
|
|
+ // 移除
|
|
|
+ this.upload.oldFileList.forEach((item, index) => {
|
|
|
+ if (item.uid === file.uid) {
|
|
|
+ this.mail.oldFileList.splice(index, 1);
|
|
|
+ //删除
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
//获取详细信息,修改用到
|
|
|
getDetails() {
|
|
@@ -424,12 +453,13 @@
|
|
|
this.fileData.filePath = this.form.content==""?"/profile/doc/NewCreate.doc":this.form.content;
|
|
|
this.fileData.user = this.form.user;
|
|
|
var files= response.data.accessory.split(",")
|
|
|
+ alert(files.length)
|
|
|
for (var i=0;i<files.length;i++){
|
|
|
var fiellist={
|
|
|
"name":files[i].substring(files[i].lastIndexOf("/")+1,files[i].length),
|
|
|
"url":process.env.VUE_APP_BASE_API+files[i]
|
|
|
}
|
|
|
- this.upload.fileList.push(fiellist)
|
|
|
+ this.upload.oldFileList.push(fiellist)
|
|
|
}
|
|
|
|
|
|
});
|
|
@@ -450,7 +480,6 @@
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.$emit('getList');
|
|
|
-
|
|
|
this.open = false;
|
|
|
this.reset();
|
|
|
|