From cd2a5241cdbee482652d987c3553f7aa2e2d0679 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期二, 31 一月 2023 11:35:41 +0800
Subject: [PATCH] fix: bug
---
src/views/cause/Entry.vue | 82 +++++++++++++++++++++++++----------------
1 files changed, 50 insertions(+), 32 deletions(-)
diff --git a/src/views/cause/Entry.vue b/src/views/cause/Entry.vue
index c7dd612..7c226aa 100644
--- a/src/views/cause/Entry.vue
+++ b/src/views/cause/Entry.vue
@@ -35,7 +35,7 @@
</el-table-column>
<el-table-column prop="reportNumber" label="鎶ユ浜烘暟" width="100" header-align="center" align="center">
</el-table-column>
- <el-table-column prop="totalMoney" label="棰勪及鎬婚噾棰�" width="100" header-align="center" align="center">
+ <el-table-column prop="totalMoney" label="棰勪及鎬婚噾棰�" width="100" header-align="center" align="center">
</el-table-column>
<el-table-column prop="firstTime" label="鏈�鏃╁彂妗堟棩鏈�" width="160" header-align="center" align="center">
</el-table-column>
@@ -83,9 +83,10 @@
</el-input>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <el-col :span="12">
<el-form-item label="棰勪及鎬婚噾棰�" prop="totalMoney">
- <el-input v-model="causeForm.totalMoney" clearable :style="{ width: '100%' }" placeholder="杈撳叆棰勪及鎬婚噾棰�"></el-input>
+ <el-input v-model="causeForm.totalMoney" clearable :style="{ width: '100%' }"
+ placeholder="杈撳叆棰勪及鎬婚噾棰�"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -111,7 +112,7 @@
</el-select>
</el-form-item>
</el-col>
-
+
<el-col :span="24">
<el-form-item label="妗堜欢鎻忚堪" prop="description">
<el-input v-model="causeForm.description" type="textarea" placeholder="璇疯緭鍏ュ琛屾枃鏈�"
@@ -143,7 +144,7 @@
</el-input>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <el-col :span="12">
<el-form-item label="棰勪及鎬婚噾棰�" prop="totalMoney">
<el-input v-model="updataCauseForm.totalMoney" clearable :style="{ width: '100%' }"></el-input>
</el-form-item>
@@ -261,12 +262,13 @@
</el-table-column>
<el-table-column width="100" prop="reportMaterials" label="鎶ユ鏉愭枡">
<template slot-scope="scope">
- <span>{{ scope.row.reportMaterials === null||scope.row.reportMaterials === '' ? "鏈彁浜�" : "宸叉彁浜�" }}</span>
+ <span>{{ scope.row.reportMaterials === null || scope.row.reportMaterials === '' ? "鏈彁浜�" : "宸叉彁浜�"
+}}</span>
</template>
</el-table-column>
- <el-table-column width="200" prop="ctime" label="鎶ユ鏃堕棿">
+ <el-table-column width="200" prop="reportTime" label="鎶ユ鏃堕棿">
<template slot-scope="scope">
- <span>{{ scope.row.ctime === null ? "2022-07-12 10:32:56" : scope.row.ctime }}</span>
+ <span>{{ scope.row.reportTime === null ? "2022-07-12 10:32:56" : scope.row.reportTime }}</span>
</template>
</el-table-column>
<el-table-column label="鎿嶄綔">
@@ -289,15 +291,15 @@
:before-close="addReportVisibleClose">
<el-row :gutter="15">
<el-form ref="auditFrom" :model="auditFrom" :rules="addReportRules" size="medium" label-width="100px">
- <!-- <el-col :span="12">
- <el-form-item label="澶村儚" prop="pic" required>
- <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" :on-success="handleAvatarSuccess"
- list-type="picture-card" accept="image/*">
- <img v-if="picShow" :src="picShow" style="width: 145px;height: 145px">
- <i v-else class="el-icon-plus"></i>
- </el-upload>
- </el-form-item>
- </el-col> -->
+ <el-col :span="12">
+ <el-form-item label="澶村儚" prop="pic" required>
+ <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false"
+ :on-success="handleAvatarSuccess" list-type="picture-card" accept="image/*">
+ <img v-if="picShow" :src="picShow" style="width: 145px;height: 145px">
+ <i v-else class="el-icon-plus"></i>
+ </el-upload>
+ </el-form-item>
+ </el-col>
<el-col :span="12">
<el-form-item label="鎶ユ浜� " prop="reporterName">
<el-input v-model="auditFrom.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable :style="{ width: '100%' }">
@@ -362,31 +364,42 @@
:before-close="updateReportVisibleclose">
<el-row :gutter="20">
<el-form ref="updateReportForm" :model="updateReportForm" size="medium" label-width="100px">
- <!-- <el-col :span="12">
+ <el-col :span="12">
+ <el-form-item label="澶村儚" prop="pic" required>
+ <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false"
+ :on-success="handleAvatarSuccess" list-type="picture-card" accept="image/*">
+ <img v-if="updateReportForm.pic!=null||updateReportForm!=''" :src="updateReportForm.pic" style="width: 145px;height: 145px">
+ <i v-else class="el-icon-plus"></i>
+ </el-upload>
+ </el-form-item>
+ </el-col>
+
+ <el-col :span="12">
<el-form-item label="鎶ユ浜� " prop="reporterName">
- <el-input v-model="auditFrom.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable :style="{ width: '100%' }">
+ <el-input v-model="updateReportForm.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鎵嬫満鍙风爜" prop="mobile">
- <el-input v-model="auditFrom.mobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable :style="{ width: '100%' }">
+ <el-input v-model="updateReportForm.mobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="韬唤璇佸彿" prop="idcard">
- <el-input v-model="auditFrom.idcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{ width: '100%' }">
+ <el-input v-model="updateReportForm.idcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{ width: '100%' }">
</el-input>
</el-form-item>
- </el-col> -->
- <el-col :span="12">
+ </el-col>
+
+ <!-- <el-col :span="12">
<el-form-item prop="reportTime" label="鎶ユ鏃堕棿">
<el-date-picker v-model="updateReportForm.reportTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable
:style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="12">
<el-form-item label="琚獥鏃堕棿" prop="cheatTime">
<el-date-picker v-model="updateReportForm.cheatTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable
@@ -420,8 +433,7 @@
</el-upload>
</el-form-item>
</el-col>
- <!--
- <el-col :span="24">
+ <!-- <el-col :span="24">
<el-form-item label="涓婁紶" prop="fileList" required>
<el-upload ref="reportMaterials" :file-list="auditFrom.fileList" action="/api/minio/upload"
list-type="picture" :on-success="handleMaterialSuccess">
@@ -591,9 +603,9 @@
</el-col>
<el-col :span="12">
<el-form-item label="鐘舵��" prop="status">
- <span v-if="detailsGroupAn.status === 1">宸插彂甯�</span>
- <span v-else-if="detailsGroupAn.status === 0">鏈彂甯�</span>
- <span v-else="detailsGroupAn.status === 2">宸蹭笅鏋�</span>
+ <span v-if="detailsGroupAn.status === 1">宸插彂甯�</span>
+ <span v-else-if="detailsGroupAn.status === 0">鏈彂甯�</span>
+ <span v-else="detailsGroupAn.status === 2">宸蹭笅鏋�</span>
</el-form-item>
</el-col>
</el-form>
@@ -729,6 +741,7 @@
size: 10,
},
auditFrom: {
+ pic: '',
reporterName: '',
mobile: '',
idcard: '',
@@ -824,7 +837,7 @@
message: '璇烽�夋嫨妗堜欢鐘舵�� ',
trigger: 'blur'
}],
- totalMoney: [{
+ totalMoney: [{
required: true,
message: '璇疯緭鍏ラ浼版�婚噾棰� ',
trigger: 'blur'
@@ -890,6 +903,7 @@
}
],
updateReportForm: {
+ pic: '',
reporterName: '',
mobile: '',
idcard: '',
@@ -905,6 +919,7 @@
//妗堜欢浜哄憳琛ㄦ牸鏁版嵁
updateReportPrams: {
id: '',
+ pic:'',
reporterName: '',
mobile: '',
idcard: '',
@@ -930,6 +945,7 @@
},
updataCauseForm: {
id: '',
+ pic:'',
name: '',
number: '',
firstTime: '',
@@ -1214,6 +1230,8 @@
this.updateReportPrams.groupId = this.updateReportForm.groupId
this.updateReportPrams.id = this.updateReportForm.id
this.updateReportPrams.reportMaterials = this.updateReportPrams.fileList.map(i => i.data).join(',')
+
+ this.updateReportPrams.pic=this.updateReportForm.pic
let form = null;
form = this.updateReportPrams;
const data = form;
@@ -1274,7 +1292,7 @@
if (!vaild) return this.$message.error('杈撳叆鏈夎')
this.auditFrom.reportMaterials = this.auditFrom.fileList.map(i => i.data).join(',');
this.auditFrom.causeId = this.reportCauseId;
- console.log(this.reportCauseId);
+ // console.log(this.reportCauseId);
report(this.auditFrom).then(res => {
this.$message.success('鎻愪氦鎴愬姛')
this.auditFrom = {}
@@ -1292,9 +1310,9 @@
},
handleAvatarSuccess(res, file) {
this.auditFrom.pic = res.data
-
getImgUrl(res.data).then(res => {
this.picShow = res
+ this.updateReportForm.pic = res
})
},
async handleMaterialSuccess(res, file) {
--
Gitblit v1.8.0