From c48fc6b1b440ef54da502ebf8b8e13fe4343f929 Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期二, 15 八月 2023 21:45:10 +0800 Subject: [PATCH] 完善荣誉证书模块的类别和名称的选择输入功能;家根网可以按照身份、姓名搜索;成长经历阅历的各个小模块的时间在修改时变成可选形式 --- ruoyi-ui/src/views/pet/index.vue | 67 ++++++++++++--------------------- 1 files changed, 25 insertions(+), 42 deletions(-) diff --git a/ruoyi-ui/src/views/pet/index.vue b/ruoyi-ui/src/views/pet/index.vue index 551e98b..43840fe 100644 --- a/ruoyi-ui/src/views/pet/index.vue +++ b/ruoyi-ui/src/views/pet/index.vue @@ -78,40 +78,7 @@ v-hasPermi="['system:role:remove']" >鍒犻櫎</el-button> </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - v-hasPermi="['family:note:export']" - >瀵煎嚭</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - v-hasPermi="['family:note:export']" - >瀵煎叆妯℃澘涓嬭浇</el-button> - </el-col> - <el-col :span="1.2"> - <el-upload - action="" - class="upload-demo" - :show-file-list="false" - :http-request="handleEnport" - > - <el-button size="mini" type="primary" - plain - icon="el-icon-plus" >瀵煎叆</el-button> - - </el-upload> - </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> @@ -190,11 +157,11 @@ <el-input v-model="formDat.name" placeholder="璇疯緭鍏ュ悕瀛�" clearable :style="{width: '100%'}" ></el-input> </el-form-item> <el-form-item label="鍑虹敓鏃ユ湡" prop="birth"> - <el-date-picker + <el-input v-model='formDat.birth' type='date' placeholder='閫夋嫨鏃ユ湡' - ></el-date-picker> + ></el-input> </el-form-item> <el-form-item label="鎬у埆" prop="sex"> <el-select v-model="formDat.sex" placeholder="璇烽�夋嫨鎬у埆" clearable :style="{width: '100%'}" > @@ -260,7 +227,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" @@ -296,9 +264,10 @@ list-type="picture-card" multiple :http-request="requestUpload" - :file-list="fileList" + :file-list="fileListOther" > - <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" @@ -319,7 +288,7 @@ <span v-if="!disabled" class="el-upload-list__item-delete" - @click="handleRemove(file)" + @click="handleRemoveFile(file)" > <i class="el-icon-delete"></i> </span> @@ -397,6 +366,7 @@ ], dsb:true, btn:false, + uploading: false, formDat: { type: undefined, name: undefined, @@ -599,8 +569,14 @@ ); }, - handleRemove(file) { + for(let i = 0; i < this.fileList.length; i++) + { + if(this.fileList[i].url==file.url) + this.$delete(this.fileList,i); + } + }, + handleRemoveFile(file) { for(let i = 0; i < this.fileListOther.length; i++) { if(this.fileListOther[i].url==file.url) @@ -709,6 +685,12 @@ }); } }); + // 娓呯┖formDat瀵硅薄鐨勬暟鎹� + Object.keys(this.formDat).forEach(key => { + this.formDat[key] = ''; + }); + this.handleRemove(this.fileList[0]); + this.handleRemoveFile(this.fileListOther[0]); }, requestUpload(params) { @@ -716,10 +698,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