From 6dfcf03c0330968c6d14b84f33ec94f73acfaab7 Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期二, 15 八月 2023 19:32:22 +0800 Subject: [PATCH] 魅宠 --- ruoyi-ui/src/views/wish/wishInfo.vue | 62 +++++++++++-------------------- 1 files changed, 22 insertions(+), 40 deletions(-) diff --git a/ruoyi-ui/src/views/wish/wishInfo.vue b/ruoyi-ui/src/views/wish/wishInfo.vue index 6daf558..9cbd3f8 100644 --- a/ruoyi-ui/src/views/wish/wishInfo.vue +++ b/ruoyi-ui/src/views/wish/wishInfo.vue @@ -17,7 +17,7 @@ <el-row :span="12"> <el-cow > <el-form-item label="鏃堕棿" prop="happenTime" label-width="70px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> - <el-input v-model="formData.happenTime" placeholder="璇疯緭鍏ユ椂闂�" clearable :style="{width: '100%'}" :disabled="dsb"> + <el-input v-model="formData.happenTime" placeholder="璇疯緭鍏ユ椂闂�" type="date" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> @@ -58,7 +58,7 @@ </el-cow> <el-cow > <el-form-item label="鏄惁渚濇棫鏈夋晥" prop="isEffective" label-width="100px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;"> - <el-select v-model="formData.isEffective" placeholder="璇烽�夋嫨鏄惁渚濇棫鏈夋晥" clearable :style="{width: '100%'}" > + <el-select v-model="formData.isEffective" placeholder="璇烽�夋嫨鏄惁渚濇棫鏈夋晥" clearable :style="{width: '100%'}" :disabled="dsb"> <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value" ></el-option> </el-select> @@ -79,7 +79,8 @@ :http-request="requestUpload" :file-list="fileList" > - <i slot="default" class="el-icon-plus"></i> + <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div> + <i v-if="!uploading" slot="default" class="el-icon-plus"></i> <div slot="file" slot-scope="{file}"> <img class="el-upload-list__item-thumbnail" @@ -91,14 +92,14 @@ > <span class="el-upload-list__item-actions" > <span - v-if="isShow" + class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)" > <i class="el-icon-zoom-in"></i> </span> <span - v-if="isShow" + class="el-upload-list__item-delete" @click="handleDownload(file.url)" > @@ -117,26 +118,6 @@ </div> </el-upload> - <!--<h4 class="form-header">鍏朵粬闄勪欢 </h4> - <el-upload - action="" - :file-list="fileListOther" - class="upload-demo" - multiple - :on-preview="handlePreview" - - :on-remove="handleRemove" - :http-request="requestUpload" - :show-file-list="true" - > - <el-button v-if="isShow" type="primary" >鐐瑰嚮涓婁紶</el-button> - <template #tip> - <div class="el-upload__tip"> - </div> - </template> - - - </el-upload>--> <h4 class="form-header">鍏朵粬闄勪欢 </h4> <el-upload action="" @@ -145,12 +126,12 @@ multiple list-type="picture-card" :on-preview="handleFileCardPreview" - :on-remove="handleRemove" + :on-remove="handleRemoveFile" :http-request="requestUpload" :show-file-list="true" > - - <i slot="default" class="el-icon-plus"></i> + <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div> + <i v-if="!uploading" slot="default" class="el-icon-plus"></i> <div slot="file" slot-scope="{file}"> <img class="el-upload-list__item-thumbnail" @@ -160,20 +141,19 @@ fit="cover" > <span class="el-upload-list__item-actions"> - <span v-if="isShow" + <span class="el-upload-list__item-preview" @click="handleFileCardPreview(file)" > <i class="el-icon-zoom-in"></i> </span> <span - v-if="isShow" - @click="handleRemove(file)" - class="el-upload-list__item-delete" + class="el-upload-list__item-delete" + @click="handleDownload(file.url)" > - <i class="el-icon-download"></i> - </span> + <i class="el-icon-download"></i> + </span> <span v-if="isShow" class="el-upload-list__item-delete" @@ -215,8 +195,8 @@ props: [], data() { return { - cdi:"鏀惰棌涓庤崳瑾夎缁嗕俊鎭�", - udi:"鏀惰棌涓庤崳瑾変俊鎭鎯�", + cdi:"鐧惧勾蹇冩効璇︾粏淇℃伅", + udi:"鐧惧勾蹇冩効淇℃伅璇︽儏", fot:[".jpg",".jif"], fileList:[ ], @@ -226,6 +206,7 @@ dsb:true, btn:false, isShow:true, + uploading: false, // 鐧惧勾蹇冩効琛ㄦ牸鏁版嵁 wishList: [], @@ -309,13 +290,13 @@ else{ document.title = "鐧惧勾蹇冩効璇︾粏淇℃伅"; this.$route.meta.title = "鐧惧勾蹇冩効璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉� - this.isShow=true + this.isShow=false } let _this = this if (id) { this.loading = true; - getWish(id).then((response) => { + getWish({id}).then((response) => { this.formData = response.data; let paths = response.data.url.split(","); for(let i = 0; i < paths.length; i++) @@ -448,10 +429,11 @@ var formData = new FormData(); formData.append('uploadFile', file); let _this = this - + this.uploading = true; uploadPic(formData).then(response => { let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) - + this.uploading = false; + this.$modal.msgSuccess("涓婁紶鎴愬姛"); if(_this.fot.includes(pth) === true) { _this.fileList.push({name:response.data.fileName, "url":response.data.url}) -- Gitblit v1.9.1