feat(finish) add img

pull/3/head
bob 2 years ago
parent 6f60edf7e3
commit 44c0687812

@ -34,29 +34,23 @@
<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"
:on-remove="handleRemove" </div>
multiple
:limit="3"
: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>
@ -306,6 +300,7 @@ export default {
issue: '', issue: '',
solution: '', solution: '',
}, },
uploadedImgs: [],
fileList: [], fileList: [],
projectList: [], projectList: [],
returnTaskList: [], // 退 returnTaskList: [], // 退
@ -323,6 +318,7 @@ export default {
methods: { methods: {
init(procInsId, deployId, taskId, finished) { init(procInsId, deployId, taskId, finished) {
this.uploadedImgs = []
this.open = true this.open = true
this.taskForm.deployId = deployId; this.taskForm.deployId = deployId;
this.taskForm.taskId = taskId; this.taskForm.taskId = taskId;
@ -431,6 +427,7 @@ export default {
getFlowRecordList(procInsId, deployId) { getFlowRecordList(procInsId, deployId) {
const params = {procInsId: procInsId, deployId: deployId} const params = {procInsId: procInsId, deployId: deployId}
flowRecord(params).then(res => { flowRecord(params).then(res => {
this.uploadedImgs = res.data.imgs;
this.flowRecordList = res.data.flowList; this.flowRecordList = res.data.flowList;
// //
// if (res.data.formData) { // if (res.data.formData) {

Loading…
Cancel
Save