| | |
| | | <template> |
| | | <div class="uploads_box"> |
| | | |
| | | <My-bread :list="[ |
| | | <My-bread |
| | | :list="[ |
| | | `${$t('dataManage.dataManage')}`, |
| | | `${$t('dataManage.uploadManage')}`, |
| | | ]"></My-bread> |
| | | ]" |
| | | ></My-bread> |
| | | <el-divider /> |
| | | <!-- tabs切换 --> |
| | | <div class="tabs_box"> |
| | | <div |
| | | class="tabs_pane" |
| | | @click="setTabsChange(1)" |
| | | > |
| | | <div |
| | | class="tabsSpan" |
| | | :class="{ changetabs : active == 'first'}" |
| | | > |
| | | <span> {{$t('dataManage.uploadObj.dataRelease')}}</span> |
| | | <div class="tabs_pane" @click="setTabsChange(1)"> |
| | | <div class="tabsSpan" :class="{ changetabs: active == 'first' }"> |
| | | <span> {{ $t("dataManage.uploadObj.dataRelease") }}</span> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="tabs_pane" |
| | | @click="setTabsChange(2)" |
| | | > |
| | | <div |
| | | class="tabsSpan" |
| | | :class="{ changetabs : active == 'second'}" |
| | | > |
| | | <span> {{$t('dataManage.uploadObj.releaseList')}}</span> |
| | | <div class="tabs_pane" @click="setTabsChange(2)"> |
| | | <div class="tabsSpan" :class="{ changetabs: active == 'second' }"> |
| | | <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 class="tabs_pane" @click="setTabsChange(3)"> |
| | | <div class="tabsSpan" :class="{ changetabs: active == 'third' }"> |
| | | <span> {{ $t("dataManage.uploadObj.modelAttachMount") }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div |
| | | v-if="active != 'third'" |
| | | class="content_box" |
| | | > |
| | | <el-form |
| | | :inline="true" |
| | | :model="formInline" |
| | | class="demo-form-inline" |
| | | > |
| | | <div v-if="active != 'third'" class="content_box"> |
| | | <el-form :inline="true" :model="formInline" class="demo-form-inline"> |
| | | <!-- 单位 --> |
| | | <el-form-item v-if="active == 'first'"> |
| | | <el-select |
| | | size="small" |
| | | v-model="formInline.depid" |
| | | > |
| | | <el-select size="small" v-model="formInline.depid" ref="treeSelect"> |
| | | <el-option |
| | | :value="formInline.depid" |
| | | :label="formInline.depName" |
| | | style="height: auto" |
| | | |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | |
| | | </el-form-item> |
| | | <!-- 目录 --> |
| | | <el-form-item v-if="active == 'first'"> |
| | | <el-select |
| | | size="small" |
| | | v-model="formInline.dirid" |
| | | > |
| | | <el-select size="small" v-model="formInline.dirid" ref="treeSelect1"> |
| | | <el-option |
| | | :value="formInline.dirid" |
| | | :label="formInline.dirName" |
| | |
| | | size="small" |
| | | v-model="formInline.verid" |
| | | @change="handleVerChange" |
| | | > <el-option |
| | | > |
| | | <el-option |
| | | v-for="item in verOption" |
| | | :key="item.id" |
| | | :label="item.name" |
| | |
| | | size="small" |
| | | :title="$t('dataManage.vmobj.keyword')" |
| | | v-model="formInline.name" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuedataName')" |
| | | > <i |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuedataName')" |
| | | > |
| | | <i |
| | | @click="getTableData" |
| | | :title="$t('common.iquery')" |
| | | slot="suffix" |
| | | class="el-icon-search" |
| | | style="padding-right: 8px" |
| | | |
| | | ></i></el-input> |
| | | ></i |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="float:right"> |
| | | <el-form-item style="float: right"> |
| | | <!-- 发布 --> |
| | | <el-button |
| | | v-if="active == 'first'" |
| | |
| | | size="small" |
| | | icon="el-icon-s-promotion" |
| | | @click="setPagePublish" |
| | | >{{$t('common.publish')}}</el-button> |
| | | >{{ $t("common.publish") }}</el-button |
| | | > |
| | | <!-- 刪除 --> |
| | | <el-button |
| | | v-if="active == 'second'" |
| | |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | @click="setPageDelete" |
| | | >{{$t('common.delete')}}</el-button> |
| | | >{{ $t("common.delete") }}</el-button |
| | | > |
| | | <!-- 重置 --> |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="setPageStart" |
| | | icon="el-icon-refresh" |
| | | >{{$t('common.reset')}}</el-button> |
| | | >{{ $t("common.reset") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | |
| | | @cell-dblclick="copyText" |
| | | height="calc(100% - 1px)" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | /> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column |
| | | :label="$t('dataManage.dictionaryManageObj.number')" |
| | | type="index" |
| | |
| | | align="center" |
| | | /> |
| | | |
| | | <el-table-column |
| | | min-width="150" |
| | | :label="$t('common.operate')" |
| | | > |
| | | <el-table-column min-width="150" :label="$t('common.operate')"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="active == 'second'" |
| | |
| | | type="info" |
| | | plain |
| | | @click="setPreviewDetails(scope.row)" |
| | | >{{$t('common.details')}} |
| | | |
| | | >{{ $t("common.details") }} |
| | | </el-button> |
| | | <el-button |
| | | v-if="active == 'second'" |
| | |
| | | type="warning" |
| | | plain |
| | | @click="setPreviewEdit(scope.row)" |
| | | >{{$t('common.update')}} |
| | | |
| | | >{{ $t("common.update") }} |
| | | </el-button> |
| | | |
| | | <el-button |
| | |
| | | type="success" |
| | | plain |
| | | @click="setPreviewLayer(scope.row)" |
| | | >{{$t('common.preview')}} |
| | | |
| | | >{{ $t("common.preview") }} |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div |
| | | class="pagination_box" |
| | | style="margin-top: 10px" |
| | | > |
| | | <div class="pagination_box" style="margin-top: 10px"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <div |
| | | v-if="active == 'third'" |
| | | class="content_box" |
| | | > |
| | | <div v-if="active == 'third'" class="content_box"> |
| | | <mapview v-if="active == 'third'"></mapview> |
| | | </div> |
| | | <!-- 地址预览 --> |
| | |
| | | @handle-closed="handleClose" |
| | | @is-fullscreen="onFullscreen" |
| | | ></dialog-header> |
| | | <div :class="{'fullscreen1':isFullscreen}"> |
| | | <div :class="{ fullscreen1: isFullscreen }"> |
| | | <mapview v-if="showMapView"></mapview> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | :show-close="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div style="width:100%;height:50vh"> |
| | | <el-form |
| | | ref="form" |
| | | :model="editLayer" |
| | | label-width="150px" |
| | | > |
| | | <div style="width: 100%; height: 50vh"> |
| | | <el-form ref="form" :model="editLayer" label-width="150px"> |
| | | <el-form-item :label="$t('dataManage.vmobj.name')"> |
| | | <el-input v-model="editLayer.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.vmobj.format')"> |
| | | <el-input |
| | | disabled |
| | | v-model="editLayer.type" |
| | | ></el-input> |
| | | <el-input disabled v-model="editLayer.type"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.vmobj.depName')"> |
| | | <el-input |
| | | disabled |
| | | v-model="editLayer.depName" |
| | | ></el-input> |
| | | <el-input disabled v-model="editLayer.depName"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item :label="$t('dataManage.vmobj.dirName')"> |
| | | <el-input |
| | | disabled |
| | | v-model="editLayer.dirName" |
| | | ></el-input> |
| | | <el-input disabled v-model="editLayer.dirName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.vmobj.versionNumber')"> |
| | | <el-input |
| | | disabled |
| | | v-model="editLayer.verName" |
| | | ></el-input> |
| | | <el-input disabled v-model="editLayer.verName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('common.publishAddress')"> |
| | | <el-input v-model="editLayer.url"></el-input> |
| | |
| | | size="small" |
| | | type="primary" |
| | | @click="setEditLayerSubmit" |
| | | >{{$t('common.submit')}}</el-button> |
| | | <el-button |
| | | size="small" |
| | | type="info" |
| | | @click="setEditLayerCancle" |
| | | >{{$t('common.cancel')}}</el-button> |
| | | >{{ $t("common.submit") }}</el-button |
| | | > |
| | | <el-button size="small" type="info" @click="setEditLayerCancle">{{ |
| | | $t("common.cancel") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | width="50%" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div style="width:100%;height:50vh"> |
| | | <div style="width: 100%; height: 50vh"> |
| | | <p>{{ $t("dataManage.vmobj.name") }}:{{ itemdetail.name }}</p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("dataManage.vmobj.format") }}:{{ itemdetail.type }}</p> |
| | |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("dataManage.vmobj.dirName") }}:{{ itemdetail.dirName }}</p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("dataManage.vmobj.versionNumber") }}:{{ itemdetail.verName }}</p> |
| | | <p> |
| | | {{ $t("dataManage.vmobj.versionNumber") }}:{{ itemdetail.verName }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("common.publishAddress") }}:{{ itemdetail.url }}</p> |
| | | <el-divider></el-divider> |
| | |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("common.releaseTime") }}:{{ itemdetail.createTime }}</p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("dataManage.vmobj.updateonuser") }}:{{ itemdetail.updateName }}</p> |
| | | <p> |
| | | {{ $t("dataManage.vmobj.updateonuser") }}:{{ itemdetail.updateName }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p>{{ $t("dataManage.vmobj.updateontime") }}:{{ itemdetail.updateTime }}</p> |
| | | <p> |
| | | {{ $t("dataManage.vmobj.updateontime") }}:{{ itemdetail.updateTime }} |
| | | </p> |
| | | <el-divider></el-divider> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | :close-on-click-modal="false" |
| | | :show-close="false" |
| | | > |
| | | <div style="width:100%; "> |
| | | <el-form |
| | | ref="form" |
| | | :model="insertLayer" |
| | | label-width="150px" |
| | | > |
| | | <div style="width: 100%"> |
| | | <el-form ref="form" :model="insertLayer" label-width="150px"> |
| | | <el-form-item :label="$t('dataManage.vmobj.name')"> |
| | | <el-input |
| | | v-model="insertLayer.name" |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('dataManage.vmobj.numberFiles')"> |
| | | <el-input |
| | | disabled |
| | | v-model="insertLayer.number" |
| | | ></el-input> |
| | | <el-input disabled v-model="insertLayer.number"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.vmobj.labe14')" |
| | | v-show="formInline.type =='DOM'" |
| | | 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 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')"> |
| | |
| | | :placeholder="$t('dataManage.vmobj.labe11')" |
| | | ></el-input> --> |
| | | <el-select |
| | | style="width:100%" |
| | | style="width: 100%" |
| | | v-model="insertLayer.min" |
| | | :placeholder="$t('dataManage.vmobj.labe11')" |
| | | > |
| | |
| | | :placeholder="$t('dataManage.vmobj.labe12')" |
| | | ></el-input> --> |
| | | <el-select |
| | | style="width:100%" |
| | | style="width: 100%" |
| | | v-model="insertLayer.max" |
| | | :placeholder="$t('dataManage.vmobj.labe12')" |
| | | > |
| | |
| | | size="small" |
| | | type="primary" |
| | | @click="setinsertLayerSubmit()" |
| | | >{{$t('common.submit')}}</el-button> |
| | | >{{ $t("common.submit") }}</el-button |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="info" |
| | | @click="setinsertLayerCancel()" |
| | | >{{$t('common.cancel')}}</el-button> |
| | | >{{ $t("common.cancel") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <div |
| | | class="loadBox" |
| | | v-if="loadDialogVisible" |
| | | > |
| | | <div style="widht:100%; margin:20px; color:white"> |
| | | <div style="margin-left:99%"> |
| | | <el-link |
| | | @click="setloadDialogVisible()" |
| | | style="color:white" |
| | | > X</el-link> |
| | | <div class="loadBox" v-if="loadDialogVisible"> |
| | | <div style="widht: 100%; margin: 20px; color: white"> |
| | | <div style="margin-left: 99%"> |
| | | <el-link @click="setloadDialogVisible()" style="color: white"> |
| | | X</el-link |
| | | > |
| | | </div> |
| | | </div> |
| | | <div |
| | | v-loading="true" |
| | | element-loading-background="rgba(0, 0, 0, 0.0) " |
| | | element-loading-text="数据发布中" |
| | | style="margin: 0px 20px;widht:100%;height:calc(100% - 80px); " |
| | | > |
| | | </div> |
| | | 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 axios from "axios"; |
| | | import dialogHeader from "./dialogHeader.vue"; |
| | | import mapview from "../../components/preview_map.vue"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | import { |
| | | selectdepTab, |
| | | selectdirTab, |
| | |
| | | publish_deletes, |
| | | publish_update, |
| | | publish_insert, |
| | | } from '../../api/api.js' |
| | | } from "../../api/api.js"; |
| | | |
| | | export default { |
| | | components: { |
| | | MyBread, mapview, |
| | | 'dialog-header': dialogHeader, |
| | | MyBread, |
| | | mapview, |
| | | "dialog-header": dialogHeader, |
| | | }, |
| | | data() { |
| | | return { |
| | | active: 'first', |
| | | active: "first", |
| | | formInline: { |
| | | dirid: null, |
| | | dirName: null, |
| | |
| | | verid: null, |
| | | depName: null, |
| | | name: "", |
| | | type: "" |
| | | type: "", |
| | | }, |
| | | listData: { |
| | | pageIndex: 1, |
| | | pageSize: 100, |
| | | count: 0 |
| | | count: 0, |
| | | }, |
| | | multipleSelection: [], |
| | | tableData: [], |
| | | depOption: [], |
| | | dirOption: [], |
| | | verOption: [], |
| | | typeOption: [{ |
| | | value: 'DOM', |
| | | label: '影像数据(.tif, .img)' |
| | | }, { |
| | | value: 'DEM', |
| | | label: '高程数据(.tif)' |
| | | }, { |
| | | value: 'MPT', |
| | | label: '场景数据(.mpt)' |
| | | }, { |
| | | value: '3DML', |
| | | label: '三维模型(.3dml)' |
| | | }, { |
| | | value: 'BIM', |
| | | label: '三维模型(.fbx, .ifc, .rvt)' |
| | | }], |
| | | typeOption: [ |
| | | { |
| | | value: "DOM", |
| | | label: "影像数据(.tif, .img)", |
| | | }, |
| | | { |
| | | value: "DEM", |
| | | label: "高程数据(.tif)", |
| | | }, |
| | | { |
| | | value: "MPT", |
| | | label: "场景数据(.mpt)", |
| | | }, |
| | | { |
| | | value: "3DML", |
| | | label: "三维模型(.3dml)", |
| | | }, |
| | | { |
| | | value: "BIM", |
| | | label: "三维模型(.fbx, .ifc, .rvt)", |
| | | }, |
| | | ], |
| | | defaultProps: { |
| | | label: "name", |
| | | value: "id", |
| | |
| | | detailsDialogVisible: false, |
| | | itemdetail: {}, |
| | | insertDialogVisible: false, |
| | | insertLayer: { name: '', number: null, min: 4, max: 18, noData: '0' }, |
| | | insertLayer: { name: "", number: null, min: 4, max: 18, noData: "0" }, |
| | | loadDialogVisible: false, |
| | | options: [], |
| | | isFullscreen: false, |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | "formInline.depid"() { |
| | | this.$refs.treeSelect.visible = false; |
| | | }, |
| | | "formInline.dirid"() { |
| | | this.$refs.treeSelect1.visible = 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' })//提示 |
| | | 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 |
| | | }) |
| | | label: i, |
| | | }); |
| | | } |
| | | this.options = std; |
| | | }, |
| | | setloadDialogVisible() { |
| | | this.loadDialogVisible = false |
| | | this.loadDialogVisible = false; |
| | | }, |
| | | setinsertLayerCancel() { |
| | | this.insertDialogVisible = false; |
| | | this.insertLayer = { name: '', number: null, min: 4, max: 18 }; |
| | | this.insertLayer = { name: "", number: null, min: 4, max: 18 }; |
| | | }, |
| | | //发布提交 |
| | | async setinsertLayerSubmit() { |
| | |
| | | var max = this.insertLayer.max; |
| | | var name = this.insertLayer.name; |
| | | if (!name) { |
| | | this.$message.error("名称不能为空") |
| | | return |
| | | this.$message.error("名称不能为空"); |
| | | return; |
| | | } |
| | | if (!min) { |
| | | this.$message.error("请输入最小级别(0 ~ 20)") |
| | | return |
| | | this.$message.error("请输入最小级别(0 ~ 20)"); |
| | | return; |
| | | } else { |
| | | |
| | | if (parseInt(min) < 0 || parseInt(min) > 20) { |
| | | this.$message.error(" 最小级别不能小于 0 或大于 20 ") |
| | | return |
| | | this.$message.error(" 最小级别不能小于 0 或大于 20 "); |
| | | return; |
| | | } |
| | | } |
| | | if (!max) { |
| | | this.$message.error("请输入最大级别(0 ~ 20)") |
| | | return |
| | | this.$message.error("请输入最大级别(0 ~ 20)"); |
| | | return; |
| | | } else { |
| | | if (parseInt(max) < 0 || parseInt(max) > 20) { |
| | | this.$message.error(" 最大级别不能小于 0 或大于 20 ") |
| | | return |
| | | this.$message.error(" 最大级别不能小于 0 或大于 20 "); |
| | | return; |
| | | } |
| | | } |
| | | if (parseInt(min) > parseInt(max)) { |
| | | this.$message.error("最小级别不得大于最大级别") |
| | | return |
| | | this.$message.error("最小级别不得大于最大级别"); |
| | | return; |
| | | } |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id) |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | var obj = { |
| | | dircode: this.formInline.dirid, |
| | |
| | | name: name, |
| | | ids: std, |
| | | type: this.formInline.type, |
| | | noData: this.insertLayer.noData |
| | | } |
| | | this.loadDialogVisible = true |
| | | noData: this.insertLayer.noData, |
| | | }; |
| | | this.loadDialogVisible = true; |
| | | this.insertDialogVisible = false; |
| | | |
| | | const data = await publish_insert(obj); |
| | | if (data.code != 200 || data.count > 0) { |
| | | this.$message.error("数据发布失败") |
| | | |
| | | this.$message.error("数据发布失败"); |
| | | } else { |
| | | this.$message({ |
| | | message: '数据发布成功', |
| | | type: 'success' |
| | | message: "数据发布成功", |
| | | type: "success", |
| | | }); |
| | | } |
| | | this.loadDialogVisible = false |
| | | this.loadDialogVisible = false; |
| | | this.getTableData(); |
| | | }, |
| | | |
| | | //数据发布 |
| | | async setPagePublish() { |
| | | if (this.multipleSelection.length == 0) { |
| | | this.$message("请选择要发布的数据") |
| | | return |
| | | this.$message("请选择要发布的数据"); |
| | | return; |
| | | } |
| | | if (this.formInline.type == "DOM" || this.formInline.type == "DEM") { |
| | | this.insertLayer.name = this.formInline.dirName; |
| | | this.insertLayer.number = this.multipleSelection.length |
| | | this.insertLayer.noData = '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].id) |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | var obj = { |
| | | dircode: this.formInline.dirid, |
| | | depcode: this.formInline.depid, |
| | | ids: std, |
| | | type: this.formInline.type |
| | | } |
| | | this.loadDialogVisible = true |
| | | type: this.formInline.type, |
| | | }; |
| | | this.loadDialogVisible = true; |
| | | this.insertDialogVisible = false; |
| | | |
| | | const data = await publish_insert(obj); |
| | | if (data.code != 200) { |
| | | this.$message.error("数据发布失败") |
| | | |
| | | this.$message.error("数据发布失败"); |
| | | } else { |
| | | this.$message({ |
| | | message: '数据发布成功', |
| | | type: 'success' |
| | | message: "数据发布成功", |
| | | type: "success", |
| | | }); |
| | | } |
| | | this.loadDialogVisible = false |
| | | this.loadDialogVisible = false; |
| | | this.getTableData(); |
| | | } |
| | | }, |
| | |
| | | } |
| | | const data = await publish_update(this.editLayer); |
| | | if (data.code != 200) { |
| | | this.$message.error("数据修改失败") |
| | | return |
| | | this.$message.error("数据修改失败"); |
| | | return; |
| | | } |
| | | this.$message({ |
| | | message: '数据修改成功', |
| | | type: 'success' |
| | | message: "数据修改成功", |
| | | type: "success", |
| | | }); |
| | | this.getTableData(); |
| | | this.editDialogVisible = false; |
| | |
| | | if (this.editLayer == this.updateLayer) { |
| | | this.editDialogVisible = false; |
| | | } else { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | this.$confirm("确认关闭?") |
| | | .then((_) => { |
| | | done(); |
| | | }) |
| | | .catch(_ => { |
| | | this.editLayer = JSON.parse(this.updateLayer) |
| | | .catch((_) => { |
| | | this.editLayer = JSON.parse(this.updateLayer); |
| | | this.editDialogVisible = false; |
| | | }); |
| | | } |
| | | }, |
| | | //修改弹窗 |
| | | setPreviewEdit(res) { |
| | | this.updateLayer = JSON.stringify(res) //备份; |
| | | this.updateLayer = JSON.stringify(res); //备份; |
| | | this.editLayer = JSON.parse(JSON.stringify(res)); |
| | | this.editDialogVisible = true; |
| | | }, |
| | | //删除 |
| | | setPageDelete() { |
| | | if (this.multipleSelection.length == 0) { |
| | | return this.$message.error("请选择要删除的数据") |
| | | return this.$message.error("请选择要删除的数据"); |
| | | } else { |
| | | var that = this |
| | | this.$confirm('确定是否删除所选内容?') |
| | | .then(_ => { |
| | | var that = this; |
| | | this.$confirm("确定是否删除所选内容?") |
| | | .then((_) => { |
| | | done(); |
| | | }) |
| | | .catch(_ => { |
| | | that.deletePage() |
| | | .catch((_) => { |
| | | that.deletePage(); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | } |
| | | const data = await publish_deletes({ ids: std.toString() }); |
| | | if (data.code != 200) { |
| | | this.$message.error("单位列表获取失败") |
| | | return |
| | | this.$message.error("单位列表获取失败"); |
| | | return; |
| | | } else { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | | message: "删除成功", |
| | | type: "success", |
| | | }); |
| | | this.getTableData(); |
| | | } |
| | |
| | | this.getTableData(); |
| | | this.dialogVisible = false; |
| | | this.showMapView = false; |
| | | |
| | | }, |
| | | // 获取多选选中的对象 |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | this.multipleSelection = val; |
| | | }, |
| | | //单位转换 |
| | | stateFormatSizes(row, column) { |
| | | if (row.sizes >= 1024) { |
| | | const val = parseFloat(row.sizes / 1024).toFixed(3) |
| | | return val + " GB" |
| | | const val = parseFloat(row.sizes / 1024).toFixed(3); |
| | | return val + " GB"; |
| | | } else { |
| | | return row.sizes + " MB" |
| | | return row.sizes + " MB"; |
| | | } |
| | | }, |
| | | //格式化地址 |
| | | formatLayer(row, column) { |
| | | let data = row.layer |
| | | let data = row.layer; |
| | | if (data == null) { |
| | | return data |
| | | return data; |
| | | } |
| | | |
| | | return data.replace("{host}", iisHost) |
| | | return data.replace("{host}", iisHost); |
| | | }, |
| | | //格式化时间 |
| | | formatData(row, column) { |
| | | let data = row[column.property] |
| | | let data = row[column.property]; |
| | | if (data == null) { |
| | | return data |
| | | return data; |
| | | } |
| | | return this.format(data) |
| | | return this.format(data); |
| | | }, |
| | | //分页切换 |
| | | handleCurrentChange(val) { |
| | |
| | | setTabsChange(res) { |
| | | switch (res) { |
| | | case 1: |
| | | this.active = 'first'; |
| | | this.active = "first"; |
| | | this.setPageStart(); |
| | | break; |
| | | case 2: |
| | | this.active = 'second'; |
| | | this.active = "second"; |
| | | this.setPageStart(); |
| | | break; |
| | | case 3: |
| | | this.$store.state.previewLayer = { |
| | | url: "menuLayer" |
| | | } |
| | | this.active = 'third'; |
| | | url: "menuLayer", |
| | | }; |
| | | this.active = "third"; |
| | | |
| | | break; |
| | | } |
| | |
| | | verid: null, |
| | | depName: null, |
| | | name: "", |
| | | type: "" |
| | | } |
| | | type: "", |
| | | }; |
| | | if (this.active == "first") { |
| | | this.listData = { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | count: 0 |
| | | } |
| | | this.showPageSize = [10, 50, 100, 200] |
| | | count: 0, |
| | | }; |
| | | this.showPageSize = [10, 50, 100, 200]; |
| | | } else { |
| | | this.listData = { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | count: 0 |
| | | } |
| | | this.showPageSize = [10, 50, 100, 200] |
| | | count: 0, |
| | | }; |
| | | this.showPageSize = [10, 50, 100, 200]; |
| | | } |
| | | |
| | | this.formInline.type = this.typeOption[0].value; |
| | |
| | | async getDirTreeList() { |
| | | const data = await selectdirTab(); |
| | | if (data.code != 200) { |
| | | this.$message.error("单位列表获取失败") |
| | | return |
| | | this.$message.error("单位列表获取失败"); |
| | | return; |
| | | } |
| | | this.dirOption = this.treeData(data.result); |
| | | this.formInline.dirid = this.dirOption[0].code; |
| | | this.formInline.dirName = this.dirOption[0].name; |
| | | this.getVerList(this.dirOption[0].id) |
| | | this.getVerList(this.dirOption[0].id); |
| | | }, |
| | | //获取版本列表 |
| | | async getVerList(res) { |
| | | const data = await meta_selectVerByDirid({ dirid: res }) |
| | | const data = await meta_selectVerByDirid({ dirid: res }); |
| | | if (data.code != 200) { |
| | | this.$message.error("版本列表获取失败") |
| | | return |
| | | this.$message.error("版本列表获取失败"); |
| | | return; |
| | | } |
| | | this.verOption = data.result |
| | | this.verOption = data.result; |
| | | this.formInline.verid = data.result[0].id; |
| | | this.getTableData(); |
| | | }, |
| | | //版本列表切换 |
| | | handleVerChange(value) { |
| | | |
| | | this.formInline.verid = value; |
| | | this.getTableData(); |
| | | }, |
| | |
| | | }, |
| | | //单位列表切换 |
| | | handleDepChange(data, node, nodeData) { |
| | | this.formInline.depid = data.code |
| | | this.formInline.depName = data.name |
| | | this.formInline.depid = data.code; |
| | | this.formInline.depName = data.name; |
| | | this.getTableData(); |
| | | }, |
| | | //目录列表切换 |
| | | handleDirChange(data, node, nodeData) { |
| | | this.formInline.dirid = data.code |
| | | this.formInline.dirName = data.name |
| | | this.getVerList(data.id) |
| | | this.formInline.dirid = data.code; |
| | | this.formInline.dirName = data.name; |
| | | this.getVerList(data.id); |
| | | }, |
| | | //获取Table表格数据 |
| | | async getTableData() { |
| | |
| | | this.listData.count = 0; |
| | | this.listData.pageIndex = 1; |
| | | if (this.active == "first") { |
| | | |
| | | this.listData.depcode = this.formInline.depid; |
| | | this.listData.dircode = this.formInline.dirid; |
| | | this.listData.name = this.formInline.name; |
| | | this.listData.type = this.formInline.type; |
| | | this.listData.verid = this.formInline.verid; |
| | | const data = await publish_selectMetasByPage(this.listData) |
| | | const data = await publish_selectMetasByPage(this.listData); |
| | | if (data.code != 200) { |
| | | |
| | | } |
| | | if (data.result) { |
| | | |
| | | |
| | | var that = this |
| | | var that = this; |
| | | |
| | | var val = data.result.filter((res) => { |
| | | if (res.createTime) { |
| | |
| | | if (res.url) { |
| | | res.url = res.url.replace("{host}", iisHost); |
| | | } |
| | | return res |
| | | }) |
| | | return res; |
| | | }); |
| | | this.tableData = val; |
| | | this.listData.count = data.count; |
| | | } |
| | | } |
| | | else { |
| | | } else { |
| | | if (this.formInline.name) { |
| | | this.listData.name = this.formInline.name |
| | | this.listData.name = this.formInline.name; |
| | | } |
| | | |
| | | const data = await publish_selectByPage(this.listData); |
| | | |
| | | if (data.result) { |
| | | var that = this |
| | | var that = this; |
| | | var val = data.result.filter((res) => { |
| | | if (res.createTime) { |
| | | res.createTime = that.format(res.createTime); |
| | |
| | | if (res.url) { |
| | | res.url = res.url.replace("{host}", iisHost); |
| | | } |
| | | return res |
| | | }) |
| | | return res; |
| | | }); |
| | | this.tableData = val; |
| | | this.listData.count = data.count; |
| | | } |
| | |
| | | var s = time.getSeconds(); |
| | | return ( |
| | | y + |
| | | '-' + |
| | | "-" + |
| | | this.add0(m) + |
| | | '-' + |
| | | "-" + |
| | | this.add0(d) + |
| | | ' ' + |
| | | " " + |
| | | h + |
| | | ':' + |
| | | ":" + |
| | | mm + |
| | | ':' + |
| | | ":" + |
| | | s |
| | | ); |
| | | }, |
| | | //格式化时间 |
| | | add0(m) { |
| | | return m < 10 ? '0' + m : m; |
| | | return m < 10 ? "0" + m : m; |
| | | }, |
| | | //获取单位列表 |
| | | async getDepTreeList() { |
| | | const data = await selectdepTab(); |
| | | if (data.code != 200) { |
| | | this.$message.error("单位列表获取失败") |
| | | return |
| | | this.$message.error("单位列表获取失败"); |
| | | return; |
| | | } |
| | | this.depOption = this.treeData(data.result); |
| | | this.formInline.depid = this.depOption[0].code |
| | | this.formInline.depName = this.depOption[0].name |
| | | this.formInline.depid = this.depOption[0].code; |
| | | this.formInline.depName = this.depOption[0].name; |
| | | }, |
| | | //树列表生成 |
| | | treeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)) // 对源数据深度克隆 |
| | | return cloneData.filter(father => { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆 |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter(child => father.id == child.pid) // 对比ID,分别上下级菜单,并返回数据 |
| | | branchArr.length > 0 ? (father.children = branchArr) : "" // 给父级添加一个children属性,并赋值 |
| | | return father.pid == 0 // 返回一级菜单 |
| | | }) |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | return father.pid == 0; // 返回一级菜单 |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.active = 'first'; |
| | | this.active = "first"; |
| | | this.setPageStart(); |
| | | this.setOptions(); |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |