| | |
| | | <template> |
| | | <div |
| | | class="expiort" |
| | | v-drag="true" |
| | | > |
| | | <div class="expiort" v-drag="true"> |
| | | <div class="leftMenu"> |
| | | <div class="menuTitle">地图设计</div> |
| | | <div class="menmuContent"> |
| | |
| | | <p>制作日期</p> |
| | | <div class="contentInput"> |
| | | <!-- <el-input v-model="exportFrom.date"></el-input> --> |
| | | <el-date-picker |
| | | v-model="exportFrom.date" |
| | | style="width: 100%;" |
| | | type="date" |
| | | :clearable="false" |
| | | /> |
| | | <el-date-picker v-model="exportFrom.date" style="width: 100%;" type="date" :clearable="false" /> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | <div class="contentBox"> |
| | | <p>导出格式</p> |
| | | <div class="contentInput"> |
| | | <el-select |
| | | style="width: 100%;" |
| | | v-model="exportFrom.type" |
| | | > |
| | | <el-option |
| | | label=".PNG" |
| | | value="png" |
| | | ></el-option> |
| | | <el-select style="width: 100%;" v-model="exportFrom.type"> |
| | | <el-option label=".PNG" value="png"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <p>纸张设置</p> |
| | | <div class="contentInput"> |
| | | <el-select |
| | | style="width: 100%;" |
| | | v-model="exportFrom.pageSize" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.name" |
| | | :value="item.value" |
| | | /> |
| | | <el-select style="width: 100%;" v-model="exportFrom.pageSize"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.name" :value="item.value" /> |
| | | </el-select> |
| | | </div> |
| | | <p>旋转角度</p> |
| | | <div class="contentInput"> |
| | | <el-input |
| | | v-model="exportFrom.role" |
| | | placeholder="请输入旋转角度(0-360)" |
| | | ></el-input> |
| | | <el-input v-model="exportFrom.role" placeholder="请输入旋转角度(0-360)"></el-input> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="contentImg"></div> |
| | | 图层列表 |
| | | </div> |
| | | <div |
| | | class="contentBox spatialTable" |
| | | style="height: 15vh; overflow: auto;" |
| | | > |
| | | <el-table |
| | | ref="singleTableRef" |
| | | :data="tableData" |
| | | highlight-current-row |
| | | style="width: 100%" |
| | | height="calc(100% - 1px)" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | label="序号" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | property="cnName" |
| | | label="图层名称" |
| | | /> |
| | | <div class="contentBox spatialTable" style="height: 15vh; overflow: auto;"> |
| | | <el-table ref="singleTableRef" :data="tableData" highlight-current-row style="width: 100%" |
| | | height="calc(100% - 1px)"> |
| | | <el-table-column type="index" label="序号" width="100" /> |
| | | <el-table-column property="cnName" label="图层名称" /> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="menuButton"> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click.stop="setInsertExporLayer" |
| | | >确认</el-button> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | class="delbtn" |
| | | @click="editExport" |
| | | >取消</el-button> |
| | | <el-button size="small" type="primary" @click.stop="setInsertExporLayer">确认</el-button> |
| | | <el-button size="small" type="primary" class="delbtn" @click="editExport">取消</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="rightMap"> |
| | | <el-image |
| | | style="width: 100%; height: 100%;" |
| | | :src="url" |
| | | fit="fill" |
| | | /> |
| | | <el-image style="width: 100%; height: 100%;" :src="url" fit="fill" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | const myCanvas = window.Viewer.scene.canvas; |
| | | var res = canvas2image.convertToImage(myCanvas, "869", "783", "png"); |
| | | url.value = res.src; |
| | | tableData.value = store.state.chekNowLayers; |
| | | // |
| | | |
| | | |
| | | var layers = store.state.chekNowLayers |
| | | var tabLayer = layers.filter((rs) => { |
| | | console.log(rs) |
| | | if (!rs.shpType && rs.isLayer == 1) { |
| | | return rs |
| | | } |
| | | }) |
| | | tableData.value = tabLayer.reverse(); |
| | | var val = menuTool.exportSquare; |
| | | exportFrom.value.xmin = val[0]; |
| | | exportFrom.value.ymin = val[1]; |
| | |
| | | store.state.loading = true; |
| | | var token = "?token=" + getToken(); |
| | | var res = []; |
| | | var ids = []; |
| | | for (var i in tableData.value) { |
| | | if (tableData.value[i].tab) { |
| | | res.push(tableData.value[i].tab.replace("moon:", "")); |
| | | |
| | | } |
| | | if (!tableData.value[i].shpType) { |
| | | ids.push(tableData.value[i].id); |
| | | } |
| | | } |
| | | |
| | | res.push("moon"); |
| | | var obj = { |
| | | layerIds: ids, |
| | | token: token.replace("?token=", ""), |
| | | title: exportFrom.value.name, |
| | | pageSize: exportFrom.value.pageSize, |
| | |
| | | data: JSON.stringify(obj), |
| | | contentType: "application/json", |
| | | dataType: "json", |
| | | error: function () {}, |
| | | error: function () { }, |
| | | success: (rs) => { |
| | | store.state.loading = false; |
| | | var value = "code = " + rs.code + ", result = " + rs.result; |
| | |
| | | z-index: 10; |
| | | box-shadow: inset 0px 10px 40px 10px rgba(38, 47, 71, 1); |
| | | } |
| | | |
| | | .leftMenu { |
| | | width: 358px; |
| | | height: 100%; |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .rightMap { |
| | | height: calc(100% - 20px); |
| | | width: 849px; |
| | | border-right: 1px solid #d6e4ff; |
| | | padding: 10px; |
| | | } |
| | | |
| | | .menmuContent { |
| | | flex: 1; |
| | | width: 100%; |
| | |
| | | background: #0e151f; |
| | | margin: 2px 0px; |
| | | } |
| | | |
| | | .contentBox { |
| | | margin: 5px 7px; |
| | | width: calc(100% - 76px); |
| | | |
| | | background: #1e2a3d; |
| | | padding: 14px 23px 5px 39px; |
| | | |
| | | p { |
| | | font-size: 12px; |
| | | font-family: Source Han Sans CN; |
| | |
| | | line-height: 9px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .contentInput { |
| | | margin-bottom: 10px; |
| | | } |
| | |
| | | font-family: Source Han Sans CN; |
| | | } |
| | | } |
| | | |
| | | .menuButton { |
| | | padding: 10px; |
| | | display: flex; |
| | |
| | | font-weight: 400; |
| | | color: #ffffff; |
| | | } |
| | | |
| | | .el-button:hover { |
| | | border: 1px solid #689cff; |
| | | } |
| | | |
| | | .delbtn { |
| | | background: rgba(245, 108, 108, 0.2); |
| | | border: 1px solid #5a0914; |
| | | } |
| | | } |
| | | |
| | | .spatialTable { |
| | | margin-top: 10px; |
| | | width: 100%; |
| | |
| | | background-color: rgba(38, 47, 71, 1) !important; |
| | | color: #d6e4ff; |
| | | } |
| | | |
| | | // 修改每行样式: |
| | | .el-table /deep/ .el-table__row { |
| | | background-color: rgba(38, 47, 71, 1) !important; |
| | | color: #d6e4ff; |
| | | } |
| | | .el-table /deep/ .el-table__body tr.current-row > td { |
| | | |
| | | .el-table /deep/ .el-table__body tr.current-row>td { |
| | | background-color: rgba(38, 47, 71, 1) !important; |
| | | } |
| | | .el-table /deep/ .el-table__body tr:hover > td { |
| | | |
| | | .el-table /deep/ .el-table__body tr:hover>td { |
| | | background-color: rgba(38, 47, 71, 1) !important; |
| | | } |
| | | |
| | | // 修改表格每行边框的样式: |
| | | .el-table /deep/ td, |
| | | .el-table /deep/ th.is-leaf { |
| | | // border-bottom: 1px solid #409eff; |
| | | // border-right: 1px solid #409eff; |
| | | } |
| | | |
| | | .el-table /deep/ .el-table__cell { |
| | | padding: 8px 0; |
| | | } |
| | | |
| | | // 设置表格每行的高度: |
| | | .el-table /deep/ .el-table__header tr, |
| | | .el-table /deep/ .el-table__header th { |
| | | height: 50px; |
| | | } |
| | | |
| | | .el-table__body tr, |
| | | .el-table__body td { |
| | | height: 50px; |
| | | padding: 0; |
| | | } |
| | | |
| | | // 设置表格边框颜色: |
| | | |
| | | .el-table--border::after, |
| | | .el-table--group::after { |
| | | width: 0; |
| | | } |
| | | |
| | | .el-table::before { |
| | | height: 0; |
| | | } |
| | | } |
| | | |
| | | .menuTitle { |
| | | width: calc(100% - 30px); |
| | | |
| | |
| | | padding: 10px; |
| | | padding-left: 28px; |
| | | } |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 10px; |
| | | } |
| | | |
| | | /* Change the scrollbar background color here */ |
| | | ::-webkit-scrollbar-track { |
| | | background-color: rgba(0, 0, 0, 0); |
| | | } |
| | | |
| | | /* Change the scrollbar button color and roundedness here */ |
| | | ::-webkit-scrollbar-thumb { |
| | | background-color: rgba(104, 156, 255, 0.2); |