| | |
| | | <div class="tabs_box"> |
| | | <div |
| | | class="tabs_pane" |
| | | @click="setTabsChange()" |
| | | @click="setTabsChange(1)" |
| | | > |
| | | <div |
| | | class="tabsSpan" |
| | |
| | | </div> |
| | | <div |
| | | class="tabs_pane" |
| | | @click="setTabsChange()" |
| | | @click="setTabsChange(2)" |
| | | > |
| | | <div |
| | | class="tabsSpan" |
| | |
| | | <span> {{$t('dataManage.uploadObj.releaseList')}}</span> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="tabs_pane" |
| | | @click="setTabsChange(3)" |
| | | > |
| | | <div |
| | | class="tabsSpan" |
| | | :class="{ changetabs : active == 'third'}" |
| | | > |
| | | <span> {{$t('dataManage.uploadObj.modelAttachMount')}}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="content_box"> |
| | | <div |
| | | v-if="active != 'third'" |
| | | class="content_box" |
| | | > |
| | | <el-form |
| | | :inline="true" |
| | | :model="formInline" |
| | |
| | | size="small" |
| | | :title="$t('dataManage.vmobj.keyword')" |
| | | v-model="formInline.name" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuedataName')" |
| | | > <i |
| | | @click="getTableData" |
| | | :title="$t('common.iquery')" |
| | |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | @cell-dblclick="copyText" |
| | | height="calc(100% - 1px)" |
| | | > |
| | | <el-table-column |
| | |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <div |
| | | v-if="active == 'third'" |
| | | class="content_box" |
| | | > |
| | | <mapview v-if="active == 'third'"></mapview> |
| | | </div> |
| | | <!-- 地址预览 --> |
| | | <el-dialog |
| | | :title="$t('common.preview')" |
| | | :class="isFullscreen ? '' : 'dialogClass_his'" |
| | | custom-class="handleDialogClass" |
| | | width="73.4%" |
| | | :fullscreen="isFullscreen" |
| | | v-if="dialogVisible" |
| | | :visible.sync="dialogVisible" |
| | | :show-close="false" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | > |
| | | <dialog-header |
| | | slot="title" |
| | | :dialog-tittle="$t('common.preview')" |
| | | :fullscreen="isFullscreen" |
| | | @handle-closed="handleClose" |
| | | @is-fullscreen="onFullscreen" |
| | | ></dialog-header> |
| | | <div :class="{'fullscreen1':isFullscreen}"> |
| | | <mapview v-if="showMapView"></mapview> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- <el-dialog |
| | | :title="$t('common.preview')" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | :before-close="handleClose" |
| | | top="13vh" |
| | | :lock-scroll="false" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | v-el-drag-dialog |
| | | > |
| | | <div style="width:100%;height:65vh"> |
| | | <mapview v-if="showMapView"></mapview> |
| | | </div> |
| | | </el-dialog> |
| | | <div |
| | | id="MapDiv" |
| | | style="background:red;widht:100%;height:calc(100% - 10px)" |
| | | ></div> |
| | | <!-- |
| | | </el-dialog> --> |
| | | <!-- 修改数据 --> |
| | | <el-dialog |
| | | :title="$t('common.update')" |
| | |
| | | :visible.sync="insertDialogVisible" |
| | | width="40%" |
| | | :close-on-click-modal="false" |
| | | :show-close="false" |
| | | > |
| | | <div style="width:100%;height:30vh"> |
| | | <div style="width:100%; "> |
| | | <el-form |
| | | ref="form" |
| | | :model="insertLayer" |
| | |
| | | v-model="insertLayer.number" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.vmobj.labe14')" |
| | | v-show="formInline.type =='DOM'" |
| | | > |
| | | <el-select |
| | | style="width:100%" |
| | | v-model="insertLayer.noData" |
| | | > |
| | | <el-option |
| | | label="黑色" |
| | | value="0" |
| | | ></el-option> |
| | | <el-option |
| | | label="白色" |
| | | value="255" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.vmobj.minLevel')"> |
| | | <el-input |
| | | <!-- <el-input |
| | | v-model="insertLayer.min" |
| | | :placeholder="$t('dataManage.vmobj.labe11')" |
| | | ></el-input> |
| | | ></el-input> --> |
| | | <el-select |
| | | style="width:100%" |
| | | v-model="insertLayer.min" |
| | | :placeholder="$t('dataManage.vmobj.labe11')" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.vmobj.maxLevel')"> |
| | | <el-input |
| | | <!-- <el-input |
| | | v-model="insertLayer.max" |
| | | :placeholder="$t('dataManage.vmobj.labe12')" |
| | | ></el-input> |
| | | ></el-input> --> |
| | | <el-select |
| | | style="width:100%" |
| | | v-model="insertLayer.max" |
| | | :placeholder="$t('dataManage.vmobj.labe12')" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | <el-button |
| | | size="small" |
| | | type="info" |
| | | @click="setsubmitLayerSubmit()" |
| | | @click="setinsertLayerCancel()" |
| | | >{{$t('common.cancel')}}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | element-loading-text="数据发布中" |
| | | style="margin: 0px 20px;widht:100%;height:calc(100% - 80px); " |
| | | > |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import axios from 'axios'; |
| | | import dialogHeader from './dialogHeader.vue' |
| | | import mapview from '../../components/preview_map.vue' |
| | | import MyBread from "../../components/MyBread.vue" |
| | | import { |
| | |
| | | } from '../../api/api.js' |
| | | |
| | | export default { |
| | | components: { MyBread, mapview }, |
| | | components: { |
| | | MyBread, mapview, |
| | | 'dialog-header': dialogHeader, |
| | | }, |
| | | data() { |
| | | return { |
| | | active: 'first', |
| | |
| | | value: 'DOM', |
| | | label: '影像数据(.tif, .img)' |
| | | }, { |
| | | value: 'DEM', |
| | | label: '高程数据(.tif)' |
| | | }, { |
| | | value: 'MPT', |
| | | label: '场景数据(.mpt)' |
| | | }, { |
| | |
| | | detailsDialogVisible: false, |
| | | itemdetail: {}, |
| | | insertDialogVisible: false, |
| | | insertLayer: { name: '', number: null, min: 4, max: 8 }, |
| | | loadDialogVisible: false |
| | | insertLayer: { name: '', number: null, min: 4, max: 18, noData: '0' }, |
| | | loadDialogVisible: false, |
| | | options: [], |
| | | isFullscreen: false, |
| | | } |
| | | }, |
| | | methods: { |
| | | copyText(row, column, cell, event) { |
| | | // 双击复制 |
| | | let save = function (e) { |
| | | e.clipboardData.setData('text/plain', event.target.innerText); |
| | | e.preventDefault(); //阻止默认行为 |
| | | } |
| | | document.addEventListener('copy', save);//添加一个copy事件 |
| | | document.execCommand("copy");//执行copy方法 |
| | | this.$message({ message: '复制成功', type: 'success' })//提示 |
| | | }, |
| | | setOptions() { |
| | | var std = []; |
| | | for (var i = 0; i < 23; i++) { |
| | | std.push({ |
| | | value: i, |
| | | label: i |
| | | }) |
| | | } |
| | | this.options = std; |
| | | }, |
| | | setloadDialogVisible() { |
| | | this.loadDialogVisible = false |
| | | }, |
| | | setinsertLayerCancel() { |
| | | this.insertDialogVisible = false; |
| | | this.insertLayer = { name: '', number: null, min: 4, max: 18 }; |
| | | }, |
| | | //发布提交 |
| | | async setinsertLayerSubmit() { |
| | |
| | | this.$message.error("名称不能为空") |
| | | return |
| | | } |
| | | if (!min) { |
| | | this.$message.error("请输入最小级别(0 ~ 20)") |
| | | return |
| | | } else { |
| | | |
| | | if (parseInt(min) < 0 || parseInt(min) > 20) { |
| | | this.$message.error(" 最小级别不能小于 0 或大于 20 ") |
| | | return |
| | | } |
| | | } |
| | | if (!max) { |
| | | this.$message.error("请输入最大级别(0 ~ 20)") |
| | | |
| | | if (parseInt(min) < 0 || parseInt(min) > 20) { |
| | | this.$message.error("最小级别不能小于 0 或大于 20 ") |
| | | return |
| | | } else { |
| | | if (parseInt(max) < 0 || parseInt(max) > 20) { |
| | | this.$message.error(" 最大级别不能小于 0 或大于 20 ") |
| | | return |
| | | } |
| | | } |
| | | |
| | | |
| | | if (parseInt(max) < 0 || parseInt(max) > 20) { |
| | | this.$message.error(" 最大级别不能小于 0 或大于 20 ") |
| | | return |
| | | } |
| | | |
| | | if (parseInt(min) > parseInt(max)) { |
| | | this.$message.error("最小级别不得大于最大级别") |
| | | return |
| | | } |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i]) |
| | | std.push(this.multipleSelection[i].id) |
| | | } |
| | | var obj = { |
| | | dircode: this.formInline.dirid, |
| | |
| | | min: min, |
| | | max: max, |
| | | name: name, |
| | | ids: std.toString(), |
| | | type: this.formInline.type |
| | | ids: std, |
| | | type: this.formInline.type, |
| | | noData: this.insertLayer.noData |
| | | } |
| | | this.loadDialogVisible = true |
| | | 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(); |
| | |
| | | //数据发布 |
| | | async setPagePublish() { |
| | | if (this.multipleSelection.length == 0) { |
| | | this.$message.error("请选择要发布的数据") |
| | | this.$message("请选择要发布的数据") |
| | | return |
| | | } |
| | | if (this.formInline.type == "DOM") { |
| | | this.insertLayer.name = this.formInline.dirName; |
| | | 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; |
| | | } else { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i]) |
| | | std.push(this.multipleSelection[i].id) |
| | | } |
| | | |
| | | var obj = { |
| | | dircode: this.formInline.dirid, |
| | | depcode: this.formInline.depid, |
| | | |
| | | ids: std.toString(), |
| | | ids: std, |
| | | type: this.formInline.type |
| | | } |
| | | |
| | | this.loadDialogVisible = true |
| | | this.insertDialogVisible = false; |
| | | |
| | |
| | | }, |
| | | //修改提交 |
| | | async setEditLayerSubmit() { |
| | | if (this.editLayer.url) { |
| | | var url = this.editLayer.url; |
| | | this.editLayer.url = url.replace(iisHost, "{host}"); |
| | | } |
| | | const data = await publish_update(this.editLayer); |
| | | if (data.code != 200) { |
| | | this.$message.error("数据修改失败") |
| | |
| | | this.editDialogVisible = true; |
| | | }, |
| | | //删除 |
| | | async setPageDelete() { |
| | | setPageDelete() { |
| | | if (this.multipleSelection.length == 0) { |
| | | return this.$message.error("请选择要删除的数据") |
| | | } else { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | const data = await publish_deletes({ ids: std.toString() }); |
| | | if (data.code != 200) { |
| | | this.$message.error("单位列表获取失败") |
| | | return |
| | | } else { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | | var that = this |
| | | this.$confirm('确定是否删除所选内容?') |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | .catch(_ => { |
| | | that.deletePage() |
| | | }); |
| | | this.getTableData(); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | async deletePage() { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | const data = await publish_deletes({ ids: std.toString() }); |
| | | if (data.code != 200) { |
| | | this.$message.error("单位列表获取失败") |
| | | return |
| | | } else { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | | }); |
| | | this.getTableData(); |
| | | } |
| | | }, |
| | | //预览弹窗打开 |
| | | setPreviewLayer(res) { |
| | |
| | | this.dialogVisible = true; |
| | | this.showMapView = true; |
| | | }, |
| | | //是否为全屏函数 |
| | | onFullscreen(fullscreen) { |
| | | this.isFullscreen = fullscreen; |
| | | }, |
| | | //预览弹窗关闭 |
| | | handleClose() { |
| | | this.getTableData(); |
| | | this.dialogVisible = false; |
| | | this.showMapView = false; |
| | | |
| | |
| | | this.getTableData(); |
| | | }, |
| | | //tabs切換 |
| | | setTabsChange() { |
| | | switch (this.active) { |
| | | case 'first': |
| | | this.active = 'second'; |
| | | this.setPageStart(); |
| | | break; |
| | | case 'second': |
| | | setTabsChange(res) { |
| | | switch (res) { |
| | | case 1: |
| | | this.active = 'first'; |
| | | this.setPageStart(); |
| | | break; |
| | | case 2: |
| | | this.active = 'second'; |
| | | this.setPageStart(); |
| | | break; |
| | | case 3: |
| | | this.$store.state.previewLayer = { |
| | | url: "menuLayer" |
| | | } |
| | | this.active = 'third'; |
| | | |
| | | break; |
| | | } |
| | | }, |
| | | //页面初始化 |
| | |
| | | if (this.active == "first") { |
| | | this.listData = { |
| | | pageIndex: 1, |
| | | pageSize: 100, |
| | | pageSize: 10, |
| | | count: 0 |
| | | } |
| | | this.showPageSize = [100, 200, 500, 1000] |
| | | this.showPageSize = [10, 50, 100, 200] |
| | | } else { |
| | | this.listData = { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | count: 0 |
| | | } |
| | | this.showPageSize = [10, 20, 50, 100] |
| | | this.showPageSize = [10, 50, 100, 200] |
| | | } |
| | | |
| | | this.formInline.type = this.typeOption[0].value; |
| | |
| | | async getTableData() { |
| | | this.tableData = []; |
| | | this.listData.count = 0; |
| | | this.listData.pageIndex = 1; |
| | | if (this.active == "first") { |
| | | |
| | | this.listData.depcode = this.formInline.depid; |
| | |
| | | mounted() { |
| | | this.active = 'first'; |
| | | this.setPageStart(); |
| | | this.setOptions(); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | background: transparent !important; |
| | | } |
| | | } |
| | | .fullscreen1 { |
| | | width: 100%; |
| | | height: 92vh; |
| | | } |
| | | /deep/.el-dialog__body { |
| | | padding: 10px !important; |
| | | } |
| | | /deep/.el-dialog__header { |
| | | padding: 10px !important; |
| | | } |
| | | } |
| | | </style> |