From 058c7c78326aaf9ff58e6bc63107dbfe50544e9e Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期六, 15 四月 2023 17:30:43 +0800 Subject: [PATCH] 主要新增了家庭小医生模块 --- ruoyi-ui/src/views/device/equipmentInfo.vue | 67 ++++++++++++++++----------------- 1 files changed, 33 insertions(+), 34 deletions(-) diff --git a/ruoyi-ui/src/views/device/equipmentInfo.vue b/ruoyi-ui/src/views/device/equipmentInfo.vue index 6873343..6740171 100644 --- a/ruoyi-ui/src/views/device/equipmentInfo.vue +++ b/ruoyi-ui/src/views/device/equipmentInfo.vue @@ -44,8 +44,8 @@ <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> <el-upload action="#" @@ -86,11 +86,11 @@ <i class="el-icon-delete"></i> </span> </span> - - + + </div> </el-upload> - + <h4 class="form-header">鍏朵粬闄勪欢 </h4> <el-upload action="" @@ -98,7 +98,7 @@ class="upload-demo" multiple :on-preview="handlePreview" - + :on-remove="handleRemove" :http-request="requestUpload" :show-file-list="true" @@ -108,15 +108,15 @@ <div class="el-upload__tip"> </div> </template> - - + + </el-upload> - + <el-form-item size="large"> <el-button 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" /> </el-dialog> @@ -128,7 +128,7 @@ import {blobValidate} from "@/utils/ruoyi"; import errorCode from "@/utils/errorCode"; import {Message} from "element-ui"; - + export default { components: {}, props: [], @@ -140,7 +140,7 @@ fileList:[ ], fileListOther:[ - + ], dsb:true, btn:false, @@ -204,7 +204,7 @@ message: '璇疯緭鍏ュ娉�', trigger: 'blur' }], - + }, typeOptions: [], } @@ -227,20 +227,20 @@ document.title = "鏌ョ湅瀹跺涵璁惧璇︾粏淇℃伅"; this.$route.meta.title = "鏌ョ湅瀹跺涵璁惧璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉� } - + let _this = this if (id) { this.loading = true; getEquipmentInfo(id).then((response) => { - + this.formData = response.data; let paths = response.data.url.split(","); for(let i = 0; i < paths.length; i++) { if(paths[i]!="") { - + let pth = paths[i].substr(paths[i].length - 4, paths[i].length) - + if (_this.fot.includes(pth) === true) _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) else { @@ -254,7 +254,7 @@ this.loading = false; }); // this.getCateInfor() - + } }, mounted() {}, @@ -264,7 +264,7 @@ // { // 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]}) // }) @@ -278,10 +278,10 @@ return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") }).join(",") this.formData.url = ul+","+uls - + this.$refs['elForm'].validate(valid => { - - + + if (valid) { if (this.formData.id != undefined) { updateEquipment(this.formData).then(response => { @@ -291,7 +291,7 @@ }); } else { this.$modal.msgSuccess("淇敼澶辫触"); - + } } }) @@ -325,7 +325,7 @@ //鐐瑰嚮涓嬭浇鍑芥暟 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) => { @@ -347,27 +347,27 @@ var formData = new FormData(); formData.append('uploadFile', file); let _this = this - + uploadPic(formData).then(response => { let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) - + if(_this.fot.includes(pth) === true) { _this.fileList.push({name:response.data.fileName, "url":response.data.url}) - + } - + else{ _this.fileListOther.push({name:response.data.fileName, url:response.data.url}) - + } }) - + } - + } } - + </script> <style> .mt @@ -376,7 +376,7 @@ } .dt{ display: block; - + } .pt{ right: 10px; @@ -385,4 +385,3 @@ position: absolute; } </style> - \ No newline at end of file -- Gitblit v1.9.1