| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="文件上传" prop="modelRoute"> |
| | | <el-upload class="upload-demo" action="" :auto-upload="false" accept="" |
| | | <el-upload class="upload-demo" action="" :auto-upload="false" accept=".glb" |
| | | :on-change="getFile" :limit="1"> |
| | | <div class="icon-bg-box icon-bg-box1"> |
| | | <el-icon ><PictureFilled /> </el-icon> |
| | |
| | | |
| | | <script> |
| | | import cesiumMapNoSelect from "@/components/common/cesiumMapNoSelect.vue"; |
| | | import { uploadFile} from "@/api/system/device" |
| | | export default { |
| | | name: 'modelManage', |
| | | components: { cesiumMapNoSelect }, |
| | |
| | | // formData.append("type", 'pic'); |
| | | //上传图片的接口 |
| | | uploadFile(formData).then(res => { |
| | | this.$set(this.form, 'modelRoute', res.data.url) |
| | | this.$set(this.form, 'modelRoute', res.url) |
| | | }) |
| | | }, |
| | | handleSelectAddress(data) { |
| | |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | console.log(this.form) |
| | | // if (valid) { |
| | | // this.$api.save('work/tower/', 'id', Object.assign({}, this.form)).then(res => { |
| | | // this.form = {} |
| | | // this.$emit('on-submit') |
| | | // this.open = false |
| | | // }) |
| | | // } |
| | | |
| | | if (valid) { |
| | | this.$api.save('tower/model/', 'id', Object.assign({}, this.form)).then(res => { |
| | | this.form = {} |
| | | this.$emit('on-submit') |
| | | this.open = false |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | addModel(){ |