From 8319f67b9bec1d19c06eaa4216f0f34c67e3afb1 Mon Sep 17 00:00:00 2001 From: feige <feige@qq.com> Date: 星期日, 10 九月 2023 10:08:25 +0800 Subject: [PATCH] Merge branch 'master' of http://47.93.189.255:8099/r/zhangshi_app_web --- ruoyi-ui/src/views/note/propertyInfo.vue | 115 +++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 75 insertions(+), 40 deletions(-) diff --git a/ruoyi-ui/src/views/note/propertyInfo.vue b/ruoyi-ui/src/views/note/propertyInfo.vue index 63d0c4f..52645e3 100644 --- a/ruoyi-ui/src/views/note/propertyInfo.vue +++ b/ruoyi-ui/src/views/note/propertyInfo.vue @@ -1,15 +1,33 @@ <template> <div class="app-container"> <div class="form-header mt"> - <h4 class="dt h4">璧勪骇璇︾粏淇℃伅 </h4> - + <h1 style="font-size:21px;padding-top:30px;display: flex;justify-content: space-between;align-items: center;"> + <span>瀹跺涵璧勪骇璇︽儏</span> + <div style="display: flex; align-items: center;"> + <el-button size="mini" type="text" @click="checkNote()" v-hasPermi="['person:information:memo']"> + <div class="form" ><el-icon style="padding-right:110px;"></el-icon> + <span class="text" style="width: 69px;height: 26px;font-size: 16px; + font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">澶囧繕鏈�</span></div> + </el-button> + </div> + </h1> </div> <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px"> <el-form-item label="绫诲瀷" prop="type"> - <el-input v-model="formData.type" placeholder="璇疯緭鍏ョ被鍨�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> + <el-select v-model="formData.type" placeholder="璇烽�夋嫨绫诲埆" clearable :style="{width: '100%'}" :disabled="dsb" > + <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value" + :disabled="item.disabled"></el-option> + </el-select> </el-form-item> + + <el-form-item label="鍙戠敓鏃堕棿" prop="happenTime" > + <el-input v-model="formData.happenTime" placeholder="璇疯緭鍏ユ椂闂�" type="date" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + + <el-form-item label="鏍囬" prop="title"> <el-input v-model="formData.title" placeholder="璇疯緭鍏ユ爣棰�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> </el-form-item> @@ -28,6 +46,9 @@ <el-form-item label="澶囨敞" prop="remark"> <el-input v-model="formData.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> </el-form-item> + <el-form-item label="鏄惁鏄湰瀹跺涵璁板綍" prop="ownData"> + <el-input v-model="formData.ownData=== 1 ? '鏄�':'鍚�'" placeholder=" " clearable :style="{width: '100%'}" :disabled=true></el-input> + </el-form-item> <h4 class="form-header">鐩稿叧鍥剧墖 </h4> <el-upload @@ -37,7 +58,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" @@ -49,14 +71,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)" > @@ -83,12 +105,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" @@ -99,20 +121,19 @@ > <span class="el-upload-list__item-actions"> <span - v-if="isShow" + 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" @@ -161,6 +182,7 @@ dsb:true, btn:false, isShow:true, + uploading: false, formData: { type: undefined, @@ -171,10 +193,10 @@ remark: undefined, url: undefined, }, - desurl:'', - dialogImageUrl: '', - dialogVisible: false, - disabled: false, + desurl:'', + dialogImageUrl: '', + dialogVisible: false, + disabled: false, rules: { type: [{ @@ -225,7 +247,7 @@ else{ document.title = "瀹跺涵璧勪骇璇︾粏淇℃伅"; this.$route.meta.title = "瀹跺涵璧勪骇璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉� - this.isShow=true + this.isShow=false } let _this = this @@ -275,8 +297,8 @@ }).join(",") let uls = this.fileListOther.map(function (elem){ return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") - }).join(",") - this.formData.url = ul+","+uls + }).join(",") + this.formData.url = ul+","+uls this.$refs['elForm'].validate(valid => { @@ -330,28 +352,36 @@ if(this.fileList[i].url==file.url) this.$delete(this.fileList,i); } - }, - handlePictureCardPreview(file) { - this.dialogImageUrl = file.url; - this.dialogVisible = true; - }, - handleDownload(url) { - var formData = {'path':"/"+url.replace(process.env.VUE_APP_BASE_TRUE_API,"")}; + }, + handlePictureCardPreview(file) { + this.dialogImageUrl = file.url; + this.dialogVisible = true; + }, + handleDownload(url) { + var formData = {'path':"/"+url.replace(process.env.VUE_APP_BASE_TRUE_API,"")}; - let lens = formData.path.split(".") - let suffix = lens[lens.length-1] - download(formData).then(async (response) => { - const isLogin = await blobValidate(response); - let nt = new Date().getTime() - let filename = 'property_'+nt+'.'+suffix - const blob = new Blob([response]) - saveAs(blob, filename) - }) - }, + let lens = formData.path.split(".") + let suffix = lens[lens.length-1] + download(formData).then(async (response) => { + const isLogin = await blobValidate(response); + let nt = new Date().getTime() + let filename = 'property_'+nt+'.'+suffix + const blob = new Blob([response]) + saveAs(blob, filename) + }) + }, handleEdit() { this.dsb = false this.btn = true + }, + + //鏌ョ湅澶囧繕鏈� + checkNote(row){ + // const id =row.id; + const id = this.$route.params && this.$route.params.id; + // const fid =2031 + this.$router.push("/familymodel/property/memo/" + id ); }, requestUpload(params) { @@ -359,9 +389,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.indexOf(pth) !== -1) { _this.fileList.push({"name":response.data.fileName, "url":response.data.url}) @@ -386,6 +418,9 @@ display: block; } +.form{ + background:center/11% no-repeat url('../../assets/icons/form.png') ; +} .pt{ right: 10px; top:-3px; -- Gitblit v1.9.1