From ad054c369ed1ee164024f47d38b10824d41f9a9c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 22 九月 2025 17:42:26 +0800
Subject: [PATCH] 优化
---
frontWuhu/src/components/business/OperaApplicationInfoWindow.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/frontWuhu/src/components/business/OperaApplicationInfoWindow.vue b/frontWuhu/src/components/business/OperaApplicationInfoWindow.vue
index 9457ead..c981c58 100644
--- a/frontWuhu/src/components/business/OperaApplicationInfoWindow.vue
+++ b/frontWuhu/src/components/business/OperaApplicationInfoWindow.vue
@@ -12,6 +12,21 @@
<el-form-item label="搴旂敤LOGO" prop="logo">
<UploadAvatarImage :uploadData="uploadData" :file="file" @uploadSuccess="getFiles" />
</el-form-item>
+ <el-form-item label="搴旂敤闄勪欢" prop="mutifileUrl">
+ <el-upload
+ class="upload-demo"
+ :action="uploadImgUrl"
+ :data="uploadData"
+ accept=".pdf,.jpg,.png,.jpeg,.zip,.rar"
+ :limit="1"
+ :on-exceed="exceed"
+ :on-remove="remove"
+ :on-success="getFileSuccess"
+ :file-list="fileList">
+ <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+ <div slot="tip" class="el-upload__tip">鍙兘涓婁紶PDF銆佸浘鐗囥�佸帇缂╁寘鏍煎紡鏂囦欢</div>
+ </el-upload>
+ </el-form-item>
<el-form-item label="鏈嶅姟鍟�" prop="serverId">
<el-select v-model="form.serverId" placeholder="璇烽�夋嫨">
<el-option
@@ -29,7 +44,7 @@
<el-input type="textarea" :autosize="{ minRows: 12, maxRows: 6 }" v-model="form.introduction" placeholder="璇疯緭鍏ュ簲鐢ㄧ畝浠�" v-trim/>
</el-form-item>
<el-form-item label="搴旂敤璇︽儏" prop="details">
- <el-input v-model="form.details" placeholder="璇疯緭鍏ュ簲鐢ㄨ鎯�" v-trim/>
+ <RichEditor :content="{ content: form.details }" @edit="form.details = $event" :max-length="0" />
</el-form-item>
</el-form>
</GlobalWindow>
@@ -40,18 +55,21 @@
import GlobalWindow from '@/components/common/GlobalWindow'
import UploadAvatarImage from '@/components/common/UploadAvatarImage'
import { fetchList } from '@/api/business/serverProvider'
+import RichEditor from '@/components/common/RichEditor'
export default {
name: 'OperaApplicationInfoWindow',
extends: BaseOpera,
- components: { GlobalWindow, UploadAvatarImage },
+ components: { GlobalWindow, UploadAvatarImage, RichEditor },
data () {
return {
+ uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/uploadPicture',
// 琛ㄥ崟鏁版嵁
form: {
id: null,
serverId: '',
name: '',
logo: '',
+ mutifileUrl: '',
lables: '',
introduction: '',
details: ''
@@ -77,6 +95,7 @@
imgurl: '',
imgurlfull: ''
},
+ fileList: []
}
},
created () {
@@ -88,6 +107,9 @@
methods: {
open (title, target) {
this.title = title
+ this.file.imgurl = ''
+ this.file.imgurlfull = ''
+ this.fileList = []
this.getFetchList()
this.visible = true
// 鏂板缓
@@ -103,10 +125,34 @@
for (const key in this.form) {
this.form[key] = target[key]
}
+ setTimeout(() => {
+ this.form.details = target.details
+ }, 500)
this.file.imgurl = target.logo
this.file.imgurlfull = target.fullLog
+ if (target.fullMutifileUrl) {
+ this.fileList.push({
+ name: '搴旂敤闄勪欢',
+ url: target.fullMutifileUrl
+ })
+ }
})
},
+ getFileSuccess(response) {
+ this.form.mutifileUrl = response.data.imgaddr
+ // response.data.originname
+ this.fileList.push({
+ name: '搴旂敤闄勪欢',
+ url: response.data.url
+ })
+ },
+ exceed() {
+ this.$message.warning('鍙兘涓婁紶涓�涓檮浠�')
+ },
+ remove() {
+ this.form.mutifileUrl = ''
+ this.fileList = []
+ },
getFiles(e) {
this.file.imgurl = e.imgurl
this.file.imgurlfull = e.imgurlfull
--
Gitblit v1.9.3