From 01adce6d9fc82f29cc2a29b35ee727b642284715 Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期一, 31 七月 2023 17:52:11 +0800 Subject: [PATCH] 隐私、财产的修改 --- ruoyi-ui/src/views/bignote/familyeventInfo.vue | 210 +++++++++++++++++++++++++++++----------------------- 1 files changed, 117 insertions(+), 93 deletions(-) diff --git a/ruoyi-ui/src/views/bignote/familyeventInfo.vue b/ruoyi-ui/src/views/bignote/familyeventInfo.vue index 5b3fae8..63cdca6 100644 --- a/ruoyi-ui/src/views/bignote/familyeventInfo.vue +++ b/ruoyi-ui/src/views/bignote/familyeventInfo.vue @@ -1,28 +1,16 @@ <template> <div class="app-container"> <div class="form-header mt"> - <h4 class="dt h4">瀹跺涵澶т簨璁拌鎯� </h4> - <el-button type="primary" class="pt" icon="el-icon-edit" @click="handleEdit()" :disabled="btn">缂栬緫</el-button> + <h4 class="dt h4">瀹跺ぇ浜嬭璇︾粏淇℃伅 </h4> + </div> - <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px" > - <!-- <el-form-item label="id" prop="id"> - <el-input v-model="formData.id" placeholder="璇疯緭鍏d" :maxlength="11" show-word-limit :disabled="true" - clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input> - </el-form-item> --> - <!-- <el-form-item label="绫诲埆" prop="type"> - <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 ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px"> + <el-form-item label="鏍囬" prop="title"> <el-input v-model="formData.title" placeholder="璇疯緭鍏ユ爣棰�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> </el-form-item> - <!-- <el-form-item label="瀛樺偍鍦板潃" prop="location"> - <el-input v-model="formData.location" placeholder="璇疯緭鍏ュ瓨鍌ㄥ湴鍧�" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> --> + <el-form-item label="浜虹墿" prop="people"> <el-input v-model="formData.people" placeholder="璇疯緭鍏ヤ汉鐗�" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> @@ -31,16 +19,16 @@ <el-input v-model="formData.address" placeholder="璇疯緭鍏ュ湴鐐�" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> - <el-form-item label="瀹跺涵鍙�" prop="familyId"> - <el-input v-model="formData.familyId" placeholder="璇疯緭鍏ュ搴彿" :maxlength="11" show-word-limit :disabled="true" - clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input> + <el-form-item label="鍙戠敓鏃堕棿" prop="happenTime"> + <el-input v-model="formData.happenTime" placeholder="璇疯緭鍏ュ彂鐢熸椂闂�" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> </el-form-item> + <el-form-item label="澶囨敞" prop="remark"> <el-input v-model="formData.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> </el-form-item> - - <h4 class="form-header">鐩稿叧鍥剧墖 </h4> + <h4 class="form-header">鐢靛瓙鏂囦欢 </h4> <el-upload action="#" list-type="picture-card" @@ -59,27 +47,28 @@ :preview-src-list="[file.url]" > <span class="el-upload-list__item-actions"> - <span - class="el-upload-list__item-preview" - @click="handlePictureCardPreview(file)" - > - <i class="el-icon-zoom-in"></i> - </span> - <span - v-if="!disabled" - class="el-upload-list__item-delete" - @click="handleDownload(file.url)" - > - <i class="el-icon-download"></i> - </span> - <span - v-if="!disabled" - class="el-upload-list__item-delete" - @click="handleRemove(file)" - > - <i class="el-icon-delete"></i> - </span> + <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)" + > + <i class="el-icon-download"></i> + </span> + <span + v-if="isShow" + class="el-upload-list__item-delete" + @click="handleRemove(file)" + > + <i class="el-icon-delete"></i> + </span> + </span> </div> @@ -91,37 +80,69 @@ :file-list="fileListOther" class="upload-demo" multiple - :on-preview="handlePreview" - - :on-remove="handleRemove" + list-type="picture-card" + :on-preview="handleFileCardPreview" + :on-remove="handleRemoveFile" :http-request="requestUpload" :show-file-list="true" > - <el-button type="primary">Click to upload</el-button> - <template #tip> - <div class="el-upload__tip"> - </div> - </template> + + <i slot="default" class="el-icon-plus"></i> + <div slot="file" slot-scope="{file}"> + <img + class="el-upload-list__item-thumbnail" + src="../../assets/401_images/401.gif" + alt="" + style="width: 147px; height: 147px" + fit="cover" + > + <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" + class="el-upload-list__item-delete" + @click="handleDownload(file.url)" + > + <i class="el-icon-download"></i> + </span> + <span + v-if="isShow" + class="el-upload-list__item-delete" + @click="handleRemoveFile(file)" + > + <i class="el-icon-delete"></i> + </span> + </span> + + + </div> </el-upload> <el-form-item size="large"> - <el-button type="primary" @click="submitForm" :disabled="dsb">淇敼</el-button> + <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">淇敼</el-button> </el-form-item> </el-form> <el-dialog :visible.sync="dialogVisible"> - <img w-full :src="dialogImageUrl" alt="Preview Image" /> + <img w-full :src="dialogImageUrl" style="width: 700px; height: 700px" alt="Preview Image" /> </el-dialog> </div> </template> + <script> -import {getFamilyeventInfo, updateFamilyevent, uploadPic, download} from "@/api/bignote/index"; import {addRole, updateRole} from "@/api/system/role"; import {blobValidate} from "@/utils/ruoyi"; import errorCode from "@/utils/errorCode"; import {Message} from "element-ui"; +import { getFamilyeventInfo, updateFamilyevent, uploadPic, download} from "@/api/bignote/index"; export default { components: {}, @@ -130,7 +151,7 @@ return { cdi:"瀹跺涵澶т簨璁颁俊鎭�", udi:"瀹跺涵澶т簨璁颁慨鏀�", - fot:[".jpg",".jif"], + fot:[".jpg",".jif","png"], fileList:[ ], fileListOther:[ @@ -138,11 +159,13 @@ ], dsb:true, btn:false, + isShow:true, + + doctorList: [], + formData: { id: undefined, - // type: undefined, title: undefined, - // location: undefined, people: undefined, address: undefined, remark: undefined, @@ -152,16 +175,6 @@ dialogVisible: false, disabled: false, rules: { - id: [{ - required: true, - message: '璇疯緭鍏d', - trigger: 'blur' - }], - // type: [{ - // required: true, - // message: '璇烽�夋嫨绫诲埆', - // trigger: 'change' - // }], title: [{ required: true, message: '璇疯緭鍏ュぇ浜嬫爣棰�', @@ -183,7 +196,7 @@ trigger: 'blur' }], remark: [{ - required: true, + // required: true, message: '璇疯緭鍏ュ娉�', trigger: 'blur' }], @@ -192,7 +205,6 @@ typeOptions: [], } }, - //鍦╟reated锛堬級涓皟鐢ㄦ帴鍙o紝鎷垮埌鏁版嵁 computed: {}, watch: {}, created() { @@ -203,21 +215,20 @@ jd = this.$route.query.detail this.btn= jd this.dsb = !jd - document.title = "淇敼瀹跺ぇ浜嬭璇︾粏淇℃伅"; - this.$route.meta.title = "淇敼瀹跺ぇ浜嬭璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉� + this.isShow=true + document.title = "淇敼澶т簨璁拌缁嗕俊鎭�"; + this.$route.meta.title = "淇敼澶т簨璁拌缁嗕俊鎭�";//鍒楄〃鐨勫悕绉� } else{ - document.title = "鏌ョ湅瀹跺ぇ浜嬭璇︾粏淇℃伅"; - this.$route.meta.title = "鏌ョ湅瀹跺ぇ浜嬭璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉� + document.title = "瀹跺ぇ浜嬭璇︾粏淇℃伅"; + this.$route.meta.title = "瀹跺ぇ浜嬭璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉� + this.isShow=true } let _this = this - if (id) { - this.loading = true; getFamilyeventInfo(id).then((response) => { - this.formData = response.data; let paths = response.data.url.split(","); for(let i = 0; i < paths.length; i++) @@ -238,23 +249,13 @@ } this.loading = false; }); - // this.getCateInfor() + this.getCateInfor() } }, mounted() {}, methods: { - /** 鏌ヨ绫诲埆淇℃伅 */ - // getCateInfor() - // { - // let _this = this - // getCategory().then(response=>{ - // response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ - // _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) - // }) - // }) - // }, submitForm() { let ul = this.fileList.map(function (elem){ return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") @@ -298,16 +299,29 @@ }) }, handleRemoveFile(file) { - alert(23) + for(let i = 0; i < this.fileListOther.length; i++) + { + if(this.fileListOther[i].url==file.url) + this.$delete(this.fileListOther,i); + } }, handleRemove(file) { - alert(323) + for(let i = 0; i < this.fileList.length; i++) + { + if(this.fileList[i].url==file.url) + this.$delete(this.fileList,i); + } + }, + handleFileCardPreview(file){ + this.dialogFileUrl = file.url; + const Base64 = require('js-base64').Base64 + this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl)); + myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300'); }, handlePictureCardPreview(file) { this.dialogImageUrl = file.url; this.dialogVisible = true; }, - //鐐瑰嚮涓嬭浇鍑芥暟 handleDownload(url) { var formData = {'path':"/"+url.replace(process.env.VUE_APP_BASE_TRUE_API,"")}; @@ -324,7 +338,8 @@ handleEdit() { this.dsb = false - this.btn = true + // this.btn = true + this.isShow=false }, requestUpload(params) { @@ -348,13 +363,24 @@ } }) + }, + + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download('/zfEvent/export', { + ...this.queryParams + }, `zfEvent_${new Date().getTime()}.xlsx`) } } } </script> -<style> + +<style scoped> +.app-container{ + background-color: #FEF7FC; +} .mt { position: relative; @@ -363,8 +389,6 @@ display: block; } - - .pt{ right: 10px; top:-3px; -- Gitblit v1.9.1