From d9806cf6fda3ff5388fbc747d4061775b278ad66 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期二, 07 三月 2023 09:37:30 +0800
Subject: [PATCH] 修改样式等
---
src/views/cause/Entry.vue | 100 ++++++++++++++++++++++++++++++++-----------------
1 files changed, 65 insertions(+), 35 deletions(-)
diff --git a/src/views/cause/Entry.vue b/src/views/cause/Entry.vue
index c7dd612..bc2238f 100644
--- a/src/views/cause/Entry.vue
+++ b/src/views/cause/Entry.vue
@@ -16,7 +16,7 @@
<el-button type="primary" @click="search">鏌ヨ</el-button>
</el-form-item>
<el-form-item>
- <el-button type="primary" @click="addAduitDialogVisible = true">娣诲姞</el-button>
+ <el-button type="primary" @click="addAduitAnJian">娣诲姞</el-button>
</el-form-item>
<el-form-item>
@@ -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: '',
@@ -1075,6 +1091,18 @@
},
methods:
{
+ addAduitAnJian(){
+ let date=(new Date()).valueOf();//鑾峰彇鏃堕棿鎴�
+ let txt = '1234567890';//鐢熸垚鐨勯殢鏈烘満鍣ㄧ爜
+ let len =13;//鏈哄櫒鐮佹湁澶氬皯浣�
+ let pwd = '';//瀹氫箟绌哄彉閲忕敤鏉ユ帴鏀舵満鍣ㄧ爜
+ for (let i = 0; i < len; i++) {
+ pwd += txt.charAt(Math.floor(Math.random() * txt.length));//寰幆鏈哄櫒鐮佷綅鏁伴殢鏈哄~鍏�
+ }
+ let id= date+pwd;
+ this.causeForm.number=id;
+ this.addAduitDialogVisible=true;
+ },
//鍏抽棴妗堜欢鐨勬浠朵汉鍛樻坊鍔�
addReportVisibleClose() {
@@ -1214,6 +1242,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 +1304,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 +1322,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) {
@@ -1364,7 +1394,7 @@
} else {
this.$message({
type: "error",
- message: "琛ㄥ崟涓嶈兘涓虹┖"
+ message: res.data.msg
})
}
}
@@ -1589,4 +1619,4 @@
::v-deep(.el-table thead) {
color: #000000;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0