| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 目录 --> |
| | | <el-form-item v-if="active == 'second'"> |
| | | <el-select |
| | | size="small" |
| | | v-model="formInline.dirid2" |
| | | placeholder="请选择项目目录..." |
| | | > |
| | | <el-option |
| | | :value="formInline.dirid2" |
| | | :label="formInline.dirName2" |
| | | style="height: auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | | :data="dirOption2" |
| | | node-key="id" |
| | | :props="defaultProps" |
| | | @node-click="handleDirChange2" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 版本 --> |
| | | <el-form-item v-if="active == 'first'"> |
| | | <el-select |
| | |
| | | > |
| | | <el-option |
| | | v-for="item in typeOption" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="active == 'second'"> |
| | | <el-select |
| | | size="small" |
| | | v-model="formInline.type1" |
| | | @change="handleTypeChange1" |
| | | placeholder="请选择数据类别..." |
| | | > |
| | | <el-option |
| | | v-for="item in typeOption1" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="10"> |
| | | <div style="height: 64px; display: flex; align-items: center;"> |
| | | <div |
| | | class="contLable" |
| | | style="height: 64px; display: flex; align-items: center;" |
| | | > |
| | | {{ item.name }} |
| | | </div> |
| | | </el-col> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- OSGB LAS --> |
| | | <el-dialog |
| | | :title="$t('common.publish')" |
| | | :visible.sync="insertOsgbVisible" |
| | | :close-on-click-modal="false" |
| | | :show-close="false" |
| | | width="35%" |
| | | > |
| | | <div> |
| | | |
| | | <div |
| | | v-for="item in osgbLasOption" |
| | | style="margin-top: 10px; display: flex; align-items: center; justify-content: space-around; " |
| | | > |
| | | <div |
| | | class="contLable" |
| | | style=" margin: 0px 10px;" |
| | | > |
| | | {{ item.name }} |
| | | </div> |
| | | <div> |
| | | <div style="display: flex; align-items: center; margin: 0px 10px;"> |
| | | <label class="contLable">高度偏移量:</label> |
| | | <el-input |
| | | size="small" |
| | | v-model="item.zs" |
| | | > |
| | | <i slot="suffix">m</i></el-input> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div v-show="formInline.type =='LAS'"> |
| | | <div style="display: flex; align-items: center; margin: 0px 10px;"> |
| | | <label class="contLable">坐标系:</label> |
| | | <el-select |
| | | v-if="!item.lids" |
| | | v-model="item.srids" |
| | | style="width: 100%;" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in stridOption" |
| | | :key="item.id" |
| | | :label="item.coordinate" |
| | | :value="item.epsgcode" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-input |
| | | v-if="item.lids" |
| | | v-model="item.srids" |
| | | size="small" |
| | | disabled |
| | | ></el-input> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- <el-form-item :label="$t('dataManage.vmobj.heightOffset')"> |
| | | <el-input |
| | | :placeholder="$t('dataManage.vmobj.label1')" |
| | | v-model="osgbLasLayer.z" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item |
| | | v-if="formInline.type == 'LAS'" |
| | | :label="$t('dataManage.vmobj.coordinateSystemID')" |
| | | > |
| | | <el-select |
| | | v-model="osgbLasLayer.strid" |
| | | :placeholder="$t('dataManage.vmobj.label2')" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="item in stridOption" |
| | | :key="item.id" |
| | | :label="item.coordinate" |
| | | :value="item.epsgcode" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | |
| | | <div style="display: flex; justify-content: end;margin-top:10px;"> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="setOsgbInsert" |
| | | >{{$t('common.submit')}}</el-button> |
| | | <el-button |
| | | size="small" |
| | | type="info" |
| | | @click="setOsgbCanel" |
| | | >{{$t('common.cancel')}}</el-button> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <div |
| | | class="loadBox" |
| | | v-if="loadDialogVisible" |
| | |
| | | publish_deletes, |
| | | publish_update, |
| | | publish_insert, |
| | | dataUpload_selectCoords, |
| | | publish_selectLasCs |
| | | } from '../../api/api.js' |
| | | import { conditions } from '../Archive/Archive'; |
| | | |
| | |
| | | active: 'first', |
| | | formInline: { |
| | | dirid: null, |
| | | dirid2: null, |
| | | dirName: null, |
| | | dirName2: null, |
| | | depid: null, |
| | | verid: null, |
| | | depName: null, |
| | | name: "", |
| | | type: "" |
| | | type: "", |
| | | type1: "All", |
| | | }, |
| | | listData: { |
| | | pageIndex: 1, |
| | |
| | | multipleSelection: [], |
| | | tableData: [], |
| | | depOption: [], |
| | | dirOption2: [], |
| | | dirOption: [], |
| | | verOption: [], |
| | | modelOptions: [], |
| | |
| | | }, { |
| | | value: 'MPT', |
| | | label: '场景数据(.mpt)' |
| | | }, { |
| | | value: 'OSGB', |
| | | label: '倾斜数据(.osgb)' |
| | | }, { |
| | | value: 'LAS', |
| | | label: '点云数据(.las, .laz)' |
| | | }, { |
| | | value: 'CPT', |
| | | label: '点云数据(.cpt)' |
| | | }, { |
| | | value: '3DML', |
| | | label: '三维模型(.3dml)' |
| | | }, { |
| | | value: 'BIM', |
| | | label: '三维模型(.fbx, .ifc, .rvt)' |
| | | }], |
| | | typeOption1: [{ |
| | | value: 'All', |
| | | label: '全部' |
| | | }, { |
| | | value: 'DOM', |
| | | label: '影像数据(.tif, .img)' |
| | | }, { |
| | | value: 'DEM', |
| | | label: '高程数据(.tif)' |
| | | }, { |
| | | value: 'MPT', |
| | | label: '场景数据(.mpt)' |
| | | }, { |
| | | value: 'OSGB', |
| | | label: '倾斜数据(.osgb)' |
| | | }, { |
| | | value: 'LAS', |
| | | label: '点云数据(.las, .laz)' |
| | | }, { |
| | | value: 'CPT', |
| | | label: '点云数据(.cpt)' |
| | |
| | | loadDialogVisible: false, |
| | | options: [], |
| | | isFullscreen: false, |
| | | |
| | | insertOsgbVisible: false, |
| | | osgbLasLayer: { |
| | | z: '0', |
| | | strid: '' |
| | | }, |
| | | stridOption: [], |
| | | osgbLasOption: [], |
| | | } |
| | | }, |
| | | methods: { |
| | | setOsgbCanel() { |
| | | this.insertOsgbVisible = false; |
| | | this.osgbLasLayer = { |
| | | z: '0', |
| | | strid: '' |
| | | } |
| | | }, |
| | | async setOsgbInsert() { |
| | | |
| | | var ids = []; |
| | | var zs = [] |
| | | for (var i in this.osgbLasOption) { |
| | | ids.push(this.osgbLasOption[i].id) |
| | | zs.push(this.osgbLasOption[i].zs) |
| | | } |
| | | var srids = []; |
| | | var lerro = []; |
| | | if (this.formInline.type == 'LAS') { |
| | | for (var i in this.osgbLasOption) { |
| | | if (this.osgbLasOption[i].srids) { |
| | | var epsg = this.osgbLasOption[i].srids.replace('EPSG:', '') |
| | | srids.push(epsg) |
| | | } else { |
| | | lerro.push(this.osgbLasOption[i].name) |
| | | } |
| | | } |
| | | if (lerro.length > 0) { |
| | | return this.$message(lerro + '未选择发布数据的坐标系'); |
| | | } |
| | | |
| | | // if (!this.osgbLasLayer.strid) { |
| | | // return this.$message('请选择发布数据的坐标系'); |
| | | // } else { |
| | | // strid = this.osgbLasLayer.strid.replace('EPSG:', '') |
| | | // } |
| | | } |
| | | var obj = { |
| | | dircode: this.formInline.dirid, |
| | | depcode: this.formInline.depid, |
| | | min: null, |
| | | max: null, |
| | | name: null, |
| | | type: this.formInline.type, |
| | | noData: null, |
| | | ids: ids, |
| | | models: null, |
| | | srids: srids, |
| | | zx: zs |
| | | } |
| | | this.loadDialogVisible = true |
| | | this.setOsgbCanel(); |
| | | const data = await publish_insert(obj); |
| | | |
| | | if (data.code == 200 && data.result > 0) { |
| | | this.$message({ |
| | | message: '数据发布成功', |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | this.$message.error("数据发布失败") |
| | | } |
| | | this.loadDialogVisible = false |
| | | this.getTableData(); |
| | | |
| | | }, |
| | | setModelCanel() { |
| | | this.insertModelVisible = false; |
| | | this.modelOptions = []; |
| | |
| | | this.$message("请选择要发布的数据") |
| | | return |
| | | } |
| | | |
| | | if (this.formInline.type == "DOM" || this.formInline.type == "DEM") { |
| | | |
| | | this.insertLayer.name = this.multipleSelection[0].name.split('.')[0]; |
| | | this.insertLayer.number = this.multipleSelection.length |
| | | this.insertLayer.noData = '0'; |
| | | this.insertDialogVisible = true; |
| | | } if (this.formInline.type == "3DML" || this.formInline.type == "BIM") { |
| | | } else if (this.formInline.type == "3DML" || this.formInline.type == "BIM") { |
| | | var val = JSON.parse(JSON.stringify(this.multipleSelection)) |
| | | for (var i in val) { |
| | | val[i].isModel = null |
| | | } |
| | | this.modelOptions = val; |
| | | |
| | | this.insertModelVisible = true; |
| | | } else if (this.formInline.type == "OSGB") { |
| | | |
| | | var val = JSON.parse(JSON.stringify(this.multipleSelection)) |
| | | for (var i in val) { |
| | | val[i].zs = 0; |
| | | val[i].srids = null; |
| | | } |
| | | this.osgbLasOption = val; |
| | | this.insertOsgbVisible = true; |
| | | |
| | | } else if (this.formInline.type == "LAS") { |
| | | var lids = []; |
| | | var val = JSON.parse(JSON.stringify(this.multipleSelection)) |
| | | for (var i in val) { |
| | | val[i].zs = 0; |
| | | val[i].srids = null; |
| | | val[i].lids = false; |
| | | lids.push('ids=' + val[i].id) |
| | | } |
| | | |
| | | var url = lids.join('&') |
| | | const data1 = await publish_selectLasCs(url); |
| | | |
| | | if (data1.code != 200) { |
| | | this.$message('Las文件坐标系ID失败'); |
| | | } else { |
| | | for (var i = 0; i < val.length; i++) { |
| | | var coord = data1.result[i] |
| | | if (coord > 0) { |
| | | val[i].srids = "EPSG:" + coord; |
| | | val[i].lids = true; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | const data = await dataUpload_selectCoords(); |
| | | |
| | | if (data.code != 200) { |
| | | this.$message('坐标系数据获取失败'); |
| | | } |
| | | this.stridOption = data.result; |
| | | |
| | | this.osgbLasOption = val; |
| | | this.insertOsgbVisible = true; |
| | | } else { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | |
| | | this.insertDialogVisible = false; |
| | | |
| | | const data = await publish_insert(obj); |
| | | if (data.code != 200) { |
| | | this.$message.error("数据发布失败") |
| | | |
| | | } else { |
| | | if (data.code == 200 && data.result > 0) { |
| | | this.$message({ |
| | | message: '数据发布成功', |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | this.$message.error("数据发布失败") |
| | | } |
| | | |
| | | this.loadDialogVisible = false |
| | | this.getTableData(); |
| | | } |
| | |
| | | var that = this |
| | | this.$confirm('确定是否删除所选内容?') |
| | | .then(_ => { |
| | | done(); |
| | | that.deletePage() |
| | | }) |
| | | .catch(_ => { |
| | | that.deletePage() |
| | | |
| | | }); |
| | | } |
| | | }, |
| | |
| | | setPageStart() { |
| | | this.formInline = { |
| | | dirid: null, |
| | | dirid2: null, |
| | | dirName: null, |
| | | dirName2: null, |
| | | depid: null, |
| | | verid: null, |
| | | depName: null, |
| | | name: "", |
| | | type: "" |
| | | type: "", |
| | | type1: "All" |
| | | } |
| | | if (this.active == "first") { |
| | | this.listData = { |
| | |
| | | pageSize: 10, |
| | | count: 0 |
| | | } |
| | | this.showPageSize = [10, 50, 100, 200] |
| | | this.showPageSize = [10, 50, 100, 200, 500] |
| | | this.formInline.type1 = this.typeOption1[0].value; |
| | | this.formInline.dirid2 = this.dirOption2[0].code; |
| | | this.formInline.dirName2 = this.dirOption2[0].name; |
| | | } |
| | | |
| | | this.formInline.type = this.typeOption[0].value; |
| | |
| | | this.$message.error("单位列表获取失败") |
| | | return |
| | | } |
| | | var res = JSON.parse(JSON.stringify(data.result)); |
| | | var res_val = res.filter((rs) => { |
| | | if (rs.pid == 0) { |
| | | return rs |
| | | } |
| | | }) |
| | | |
| | | res_val.unshift({ |
| | | name: '全部', |
| | | id: 'All', |
| | | pid: 0, |
| | | code: "All" |
| | | }) |
| | | this.dirOption2 = this.treeData(res_val) |
| | | this.dirOption = this.treeData(data.result); |
| | | this.formInline.dirid = this.dirOption[0].code; |
| | | this.formInline.dirName = this.dirOption[0].name; |
| | | this.formInline.dirid2 = this.dirOption2[0].code; |
| | | this.formInline.dirName2 = this.dirOption2[0].name; |
| | | this.getVerList(this.dirOption[0].id) |
| | | }, |
| | | //获取版本列表 |
| | |
| | | this.formInline.type = value; |
| | | this.getTableData(); |
| | | }, |
| | | handleTypeChange1(value) { |
| | | this.formInline.type1 = value; |
| | | this.getTableData(); |
| | | }, |
| | | //单位列表切换 |
| | | handleDepChange(data, node, nodeData) { |
| | | this.formInline.depid = data.code |
| | |
| | | this.formInline.dirName = data.name |
| | | this.getVerList(data.id) |
| | | }, |
| | | //目录列表切换 |
| | | handleDirChange2(data, node, nodeData) { |
| | | this.formInline.dirid2 = data.code |
| | | this.formInline.dirName2 = data.name |
| | | this.getTableData(); |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | //获取Table表格数据 |
| | | async getTableData() { |
| | | |
| | |
| | | } |
| | | } |
| | | else { |
| | | if (this.formInline.name) { |
| | | this.listData.name = this.formInline.name |
| | | this.listData.name = this.formInline.name |
| | | if (this.formInline.dirid2 == 'All') { |
| | | this.listData.dircode = this.formInline.dirid2.replace('All', ''); |
| | | } else { |
| | | this.listData.dircode = this.formInline.dirid2 |
| | | } |
| | | if (this.formInline.type1 == 'All') { |
| | | this.listData.type = this.formInline.type1.replace('All', ''); |
| | | } else { |
| | | this.listData.type = this.formInline.type1 |
| | | } |
| | | |
| | | |
| | | const data = await publish_selectByPage(this.listData); |
| | | |
| | |
| | | /deep/.el-dialog__header { |
| | | padding: 10px !important; |
| | | } |
| | | .contLable { |
| | | width: 160px; |
| | | } |
| | | } |
| | | </style> |