| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="form-header mt"> |
| | | <h4 class="dt h4">隐私详细信息 </h4> |
| | | <h4 class="dt h4">健康详细信息 </h4> |
| | | |
| | | </div> |
| | | |
| | |
| | | :http-request="requestUpload" |
| | | :file-list="fileList" |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div v-if="uploading" class="upload-status">正在上传...</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" |
| | |
| | | > |
| | | <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)" |
| | | > |
| | |
| | | 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">正在上传...</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" |
| | |
| | | > |
| | | <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" |
| | |
| | | |
| | | </el-upload> |
| | | |
| | | |
| | | <el-form-item size="large"> |
| | | <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改</el-button> |
| | | </el-form-item> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import {getSecretInfo, uploadPic, download, updateSecret} from "@/api/secret/index"; |
| | | import {getHealthInfo, uploadPic, download, updateSecret} from "@/api/healthy/index"; |
| | | import {addRole, updateRole} from "@/api/system/role"; |
| | | import {blobValidate} from "@/utils/ruoyi"; |
| | | import errorCode from "@/utils/errorCode"; |
| | |
| | | props: [], |
| | | data() { |
| | | return { |
| | | cdi:"隐私详细信息", |
| | | udi:"隐私信息修改", |
| | | cdi:"健康详细信息", |
| | | udi:"健康信息修改", |
| | | fot:[".jpg",".jif"], |
| | | fileList:[ |
| | | ], |
| | |
| | | dsb:true, |
| | | btn:false, |
| | | isShow:true, |
| | | uploading: false, |
| | | formData: { |
| | | type: undefined, |
| | | happenTime: undefined, |
| | |
| | | this.btn= jd |
| | | this.dsb = !jd |
| | | this.isShow=true |
| | | document.title = "修改隐私详细信息"; |
| | | this.$route.meta.title = "修改隐私详细信息";//列表的名称 |
| | | document.title = "修改健康详细信息"; |
| | | this.$route.meta.title = "修改健康详细信息";//列表的名称 |
| | | } |
| | | else{ |
| | | document.title = "查看隐私详细信息"; |
| | | this.$route.meta.title = "查看隐私详细信息";//列表的名称 |
| | | document.title = "查看健康详细信息"; |
| | | this.$route.meta.title = "查看健康详细信息";//列表的名称 |
| | | this.isShow=false |
| | | } |
| | | |
| | |
| | | if (id) { |
| | | this.loading = true; |
| | | |
| | | getSecretInfo(query).then((response) => { |
| | | getHealthInfo({id}).then((response) => { |
| | | this.formData = response.data; |
| | | let paths = response.data.url.split(","); |
| | | for(let i = 0; i < paths.length; i++) |
| | |
| | | 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}) |