| | |
| | | <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="#" |
| | |
| | | <i class="el-icon-delete"></i> |
| | | </span> |
| | | </span> |
| | | |
| | | |
| | | |
| | | |
| | | </div> |
| | | </el-upload> |
| | | |
| | | |
| | | <h4 class="form-header">其他附件 </h4> |
| | | <el-upload |
| | | action="" |
| | |
| | | class="upload-demo" |
| | | multiple |
| | | :on-preview="handlePreview" |
| | | |
| | | |
| | | :on-remove="handleRemove" |
| | | :http-request="requestUpload" |
| | | :show-file-list="true" |
| | |
| | | <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> |
| | |
| | | import {blobValidate} from "@/utils/ruoyi"; |
| | | import errorCode from "@/utils/errorCode"; |
| | | import {Message} from "element-ui"; |
| | | |
| | | |
| | | export default { |
| | | components: {}, |
| | | props: [], |
| | |
| | | fileList:[ |
| | | ], |
| | | fileListOther:[ |
| | | |
| | | |
| | | ], |
| | | dsb:true, |
| | | btn:false, |
| | |
| | | message: '请输入备注', |
| | | trigger: 'blur' |
| | | }], |
| | | |
| | | |
| | | }, |
| | | typeOptions: [], |
| | | } |
| | |
| | | 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 { |
| | |
| | | this.loading = false; |
| | | }); |
| | | // this.getCateInfor() |
| | | |
| | | |
| | | } |
| | | }, |
| | | mounted() {}, |
| | |
| | | // { |
| | | // 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]}) |
| | | // }) |
| | |
| | | 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 => { |
| | |
| | | }); |
| | | } else { |
| | | this.$modal.msgSuccess("修改失败"); |
| | | |
| | | |
| | | } |
| | | } |
| | | }) |
| | |
| | | //点击下载函数 |
| | | 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) => { |
| | |
| | | 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 |
| | |
| | | } |
| | | .dt{ |
| | | display: block; |
| | | |
| | | |
| | | } |
| | | .pt{ |
| | | right: 10px; |
| | |
| | | position: absolute; |
| | | } |
| | | </style> |
| | | |