|
|
@ -32,29 +32,25 @@
|
|
|
|
<el-form-item label="工作记录">
|
|
|
|
<el-form-item label="工作记录">
|
|
|
|
<el-input type="textarea" v-model="form.workRecord"/>
|
|
|
|
<el-input type="textarea" v-model="form.workRecord"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="图片上传" prop="remark">
|
|
|
|
<el-form-item label="附件">
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
class="upload-demo"
|
|
|
|
<div v-for="(item,index) in uploadedImgs" class="demo-image__preview">
|
|
|
|
action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
|
<el-row :span="24">
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
<el-col :span="6">
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
<el-image
|
|
|
|
:file-list="fileList">
|
|
|
|
style="width: 100px; height: 100px"
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
:src="'data:image/png;base64,'+item.base64"
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
|
:preview-src-list="['data:image/png;base64,'+item.base64]">
|
|
|
|
</el-upload>
|
|
|
|
</el-image>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-form-item label="文件上传" prop="remark">
|
|
|
|
<el-col :span="2">
|
|
|
|
<el-upload
|
|
|
|
<span>{{item.name}}</span>
|
|
|
|
class="upload-demo"
|
|
|
|
</el-col>
|
|
|
|
action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
|
</el-row>
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
</div>
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
<div v-for="(item,index) in uploadedFiles" class="demo-image__preview">
|
|
|
|
multiple
|
|
|
|
<span>{{item.name}}</span>
|
|
|
|
:limit="3"
|
|
|
|
</div>
|
|
|
|
:file-list="fileList">
|
|
|
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -94,29 +90,39 @@
|
|
|
|
<el-form-item label="工作记录">
|
|
|
|
<el-form-item label="工作记录">
|
|
|
|
<el-input type="textarea" v-model="form.workRecord"/>
|
|
|
|
<el-input type="textarea" v-model="form.workRecord"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="图片上传" prop="remark">
|
|
|
|
<el-form-item v-if="applyIsRevoked" label="附件上传" prop="remark">
|
|
|
|
<el-upload
|
|
|
|
<el-upload
|
|
|
|
class="upload-demo"
|
|
|
|
class="upload-demo"
|
|
|
|
action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
|
:action="uploadFileUrl"
|
|
|
|
|
|
|
|
:on-error="handleUploadError"
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
|
|
|
|
:on-success="handleSuccess"
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
|
|
|
|
:headers="headers"
|
|
|
|
:file-list="fileList">
|
|
|
|
:file-list="fileList">
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
</el-upload>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="文件上传" prop="remark">
|
|
|
|
<el-form-item v-if="!applyIsRevoked" label="附件">
|
|
|
|
<el-upload
|
|
|
|
|
|
|
|
class="upload-demo"
|
|
|
|
<div v-for="(item,index) in uploadedImgs" class="demo-image__preview">
|
|
|
|
action="https://jsonplaceholder.typicode.com/posts/"
|
|
|
|
<el-row :span="24">
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
<el-col :span="6">
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
<el-image
|
|
|
|
multiple
|
|
|
|
style="width: 100px; height: 100px"
|
|
|
|
:limit="3"
|
|
|
|
:src="'data:image/png;base64,'+item.base64"
|
|
|
|
:file-list="fileList">
|
|
|
|
:preview-src-list="['data:image/png;base64,'+item.base64]">
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
</el-image>
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
|
</el-col>
|
|
|
|
</el-upload>
|
|
|
|
<el-col :span="2">
|
|
|
|
|
|
|
|
<span>{{item.name}}</span>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-for="(item,index) in uploadedFiles" class="demo-image__preview">
|
|
|
|
|
|
|
|
<span>{{item.name}}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -304,6 +310,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
import {listUser} from "@/api/system/user";
|
|
|
|
import {listUser} from "@/api/system/user";
|
|
|
|
import {optionProject} from "@/api/system/project";
|
|
|
|
import {optionProject} from "@/api/system/project";
|
|
|
|
|
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Record",
|
|
|
|
name: "Record",
|
|
|
@ -369,8 +376,16 @@ export default {
|
|
|
|
issue: '',
|
|
|
|
issue: '',
|
|
|
|
submitDate: '',
|
|
|
|
submitDate: '',
|
|
|
|
solution: '',
|
|
|
|
solution: '',
|
|
|
|
|
|
|
|
attachmentIds:''
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
fileIdList: [],
|
|
|
|
fileList: [],
|
|
|
|
fileList: [],
|
|
|
|
|
|
|
|
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/attachment/upload", // 上传的图片服务器地址
|
|
|
|
|
|
|
|
headers: {
|
|
|
|
|
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
uploadedImgs: [],
|
|
|
|
|
|
|
|
uploadedFiles: [],
|
|
|
|
projectList: [],
|
|
|
|
projectList: [],
|
|
|
|
returnTaskList: [], // 回退列表数据
|
|
|
|
returnTaskList: [], // 回退列表数据
|
|
|
|
finished: 'false',
|
|
|
|
finished: 'false',
|
|
|
@ -404,6 +419,9 @@ export default {
|
|
|
|
this.optionList();
|
|
|
|
this.optionList();
|
|
|
|
this.getFlowRecordList( this.taskForm.procInsId, this.taskForm.deployId);
|
|
|
|
this.getFlowRecordList( this.taskForm.procInsId, this.taskForm.deployId);
|
|
|
|
this.finished = this.$route.query && this.$route.query.finished
|
|
|
|
this.finished = this.$route.query && this.$route.query.finished
|
|
|
|
|
|
|
|
this.fileIdList = []
|
|
|
|
|
|
|
|
this.uploadedFiles = []
|
|
|
|
|
|
|
|
this.uploadedImgs = []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
/** 查询部门下拉树结构 */
|
|
|
|
/** 查询部门下拉树结构 */
|
|
|
@ -502,6 +520,8 @@ export default {
|
|
|
|
const params = {procInsId: procInsId, deployId: deployId}
|
|
|
|
const params = {procInsId: procInsId, deployId: deployId}
|
|
|
|
flowRecord(params).then(res => {
|
|
|
|
flowRecord(params).then(res => {
|
|
|
|
this.flowRecordList = res.data.flowList;
|
|
|
|
this.flowRecordList = res.data.flowList;
|
|
|
|
|
|
|
|
this.uploadedImgs = res.data.imgs;
|
|
|
|
|
|
|
|
this.uploadedFiles = res.data.files;
|
|
|
|
// 流程过程中不存在初始化表单 直接读取的流程变量中存储的表单值
|
|
|
|
// 流程过程中不存在初始化表单 直接读取的流程变量中存储的表单值
|
|
|
|
// if (res.data.formData) {
|
|
|
|
// if (res.data.formData) {
|
|
|
|
this.form = res.data.form;
|
|
|
|
this.form = res.data.form;
|
|
|
@ -583,6 +603,10 @@ export default {
|
|
|
|
this.getTreeselect();
|
|
|
|
this.getTreeselect();
|
|
|
|
}, /** 确认并提交任务选择 */
|
|
|
|
}, /** 确认并提交任务选择 */
|
|
|
|
handleClaimAndComplete() {
|
|
|
|
handleClaimAndComplete() {
|
|
|
|
|
|
|
|
if (this.fileIdList.length > 0) {
|
|
|
|
|
|
|
|
this.form.attachmentIds=this.fileIdList.map(e => e.id).join(',')
|
|
|
|
|
|
|
|
console.log("this.form.attachmentIds", this.form.attachmentIds);
|
|
|
|
|
|
|
|
}
|
|
|
|
this.taskForm.comment = '提交任务';
|
|
|
|
this.taskForm.comment = '提交任务';
|
|
|
|
this.taskForm.vars= JSON.stringify(this.form)
|
|
|
|
this.taskForm.vars= JSON.stringify(this.form)
|
|
|
|
this.taskForm.taskId= this.flowRecordList[0].taskId
|
|
|
|
this.taskForm.taskId= this.flowRecordList[0].taskId
|
|
|
@ -721,7 +745,29 @@ export default {
|
|
|
|
this.returnTaskList = [];
|
|
|
|
this.returnTaskList = [];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleRemove(file, fileList) {
|
|
|
|
handleRemove(file, fileList) {
|
|
|
|
|
|
|
|
// 删除对应id
|
|
|
|
console.log(file, fileList);
|
|
|
|
console.log(file, fileList);
|
|
|
|
|
|
|
|
for(var i = this.fileIdList.length -1; i >= 0 ; i--){
|
|
|
|
|
|
|
|
if(this.fileIdList[i].uid == file.uid){
|
|
|
|
|
|
|
|
// 删除 fileIdList中已删除文件的id
|
|
|
|
|
|
|
|
this.fileIdList.splice(i, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleUploadError(err, file, fileList) {
|
|
|
|
|
|
|
|
this.$message.error("上传失败, 请重试");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleSuccess(res, file, fileList) {
|
|
|
|
|
|
|
|
if (res.code !== 200) {
|
|
|
|
|
|
|
|
this.$message.error("上传失败, 请重试");
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.fileIdList.push({
|
|
|
|
|
|
|
|
id:res.data.id,
|
|
|
|
|
|
|
|
uid:file.uid // 上传文件,唯一id
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
// 存入id
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handlePreview(file) {
|
|
|
|
handlePreview(file) {
|
|
|
|
console.log(file);
|
|
|
|
console.log(file);
|
|
|
|