|
@@ -1,69 +1,125 @@
|
|
|
<template>
|
|
|
- <div id="configManage">
|
|
|
- <div class="functionBtn">
|
|
|
- <el-select v-show="proxyType != 'INTEGRATION'" v-model="dataType" placeholder="请选择类型" style="margin-right: 12px"
|
|
|
- default-first-option>
|
|
|
- <el-option v-for="(item, index) in selectOptions" :key="index" :label="item.label"
|
|
|
- :value="item.value"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-button type="primary" round @click="handleDetailVisible('Add')">新增配置</el-button>
|
|
|
- <el-button v-show="proxyType != 'INTEGRATION'" round @click="viewAllModel">全部预览</el-button>
|
|
|
- <el-tooltip content="刷新" placement="right">
|
|
|
- <el-button circle @click="refresh"><el-icon><IconPark-refresh /></el-icon></el-button>
|
|
|
- </el-tooltip>
|
|
|
- </div>
|
|
|
- <div class="tableContent">
|
|
|
- <el-table ref="table" :data="tableData" :max-height="maxHeight" v-loading="loading"
|
|
|
- @current-change="(row) => { this.currRow = row }" border stripe>
|
|
|
- <el-table-column prop="id" label="ID" width="60" align="center">
|
|
|
- <template #default="scope">
|
|
|
- <span>{{ scope.row.id + 1 }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="key" label="标题" min-width="100">
|
|
|
- <template #default="scope">
|
|
|
- <span style="font-weight: bold;font-family: JetBrainsMono-Regular,serif">{{ scope.row.key }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="content" label="描述" min-width="100" />
|
|
|
- <el-table-column prop="proxyUrl" label="链接" min-width="350">
|
|
|
- <template #default="scope">
|
|
|
- <span style="font-family: JetBrainsMono-Regular,serif">{{ scope.row.proxyUrl }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="operation" label="操作" min-width="120">
|
|
|
- <template #default="scope">
|
|
|
- <el-button type="primary" size="small" @click="handleDetailVisible('Edit', scope.row)">
|
|
|
- <el-icon><IconPark-edit /></el-icon>
|
|
|
- 修改
|
|
|
- </el-button>
|
|
|
- <el-button size="small" @click="deleteConfig(scope.row)">
|
|
|
- <el-icon><IconPark-delete /></el-icon>
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
- <el-button v-show="proxyType != 'INTEGRATION'" size="small" @click="view(scope.row)">
|
|
|
- <el-icon><IconPark-preview-open /></el-icon>
|
|
|
- 预览
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <div class="pagination">
|
|
|
- <el-pagination background layout="sizes, prev, pager, next, jumper, ->, total"
|
|
|
- v-model:current-page="pageInfo.page" v-model:page-size="pageInfo.pageSize" :total="pageInfo.total" />
|
|
|
+ <div class="configManageContainer">
|
|
|
+ <div id="configManage">
|
|
|
+ <div class="functionBtn">
|
|
|
+ <el-select
|
|
|
+ v-show="proxyType != 'INTEGRATION'"
|
|
|
+ v-model="dataType"
|
|
|
+ placeholder="请选择类型"
|
|
|
+ style="margin-right: 12px"
|
|
|
+ default-first-option
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in selectOptions"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-input v-model="searchStr" style="width:150px;margin-right:20px;" placeholder="请输入查询关键字"></el-input>
|
|
|
+ <el-button type="primary" round @click="screenData()">查询</el-button>
|
|
|
+ <el-button type="primary" round @click="handleDetailVisible('Add')">新增配置</el-button>
|
|
|
+ <!-- <el-button v-show="proxyType != 'INTEGRATION'" round @click="viewAllModel">全部预览</el-button> -->
|
|
|
+ <el-tooltip content="刷新" placement="right">
|
|
|
+ <el-button circle @click="refresh">
|
|
|
+ <el-icon>
|
|
|
+ <IconPark-refresh />
|
|
|
+ </el-icon>
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <div class="tableContent">
|
|
|
+ <el-table
|
|
|
+ ref="table"
|
|
|
+ :data="tableData"
|
|
|
+ :max-height="maxHeight"
|
|
|
+ v-loading="loading"
|
|
|
+ @current-change="(row) => { this.currRow = row }"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ >
|
|
|
+ <el-table-column prop="id" label="ID" width="60" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.id + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="key" label="标题" min-width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <span
|
|
|
+ style="font-weight: bold;font-family: JetBrainsMono-Regular,serif"
|
|
|
+ >{{ scope.row.key }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="content" label="描述" min-width="100" />
|
|
|
+ <el-table-column prop="proxyUrl" label="链接" min-width="350">
|
|
|
+ <template #default="scope">
|
|
|
+ <span style="font-family: JetBrainsMono-Regular,serif">{{ scope.row.proxyUrl }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="operation" label="操作" min-width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="handleDetailVisible('Edit', scope.row)"
|
|
|
+ >
|
|
|
+ <el-icon>
|
|
|
+ <IconPark-edit />
|
|
|
+ </el-icon>修改
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" @click="deleteConfig(scope.row)">
|
|
|
+ <el-icon>
|
|
|
+ <IconPark-delete />
|
|
|
+ </el-icon>删除
|
|
|
+ </el-button>
|
|
|
+ <el-button v-show="proxyType != 'INTEGRATION'" size="small" @click="view(scope.row)">
|
|
|
+ <el-icon>
|
|
|
+ <IconPark-preview-open />
|
|
|
+ </el-icon>预览
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="pagination">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="prev, pager, next, jumper, ->, total"
|
|
|
+ v-model:current-page="pageInfo.page"
|
|
|
+ v-model::page-size="pageInfo.pageSize"
|
|
|
+ :total="pageInfo.total"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <ConfigDetail v-model:show="detailVisible" :operation="detailOperation" :item="currRow" :is-edit="detailIsEdit"
|
|
|
- :select-options="selectOptions" :proxy-type="proxyType" :data-type="dataType" :refresh="getData">
|
|
|
- </ConfigDetail>
|
|
|
+ <ConfigDetail
|
|
|
+ :show="detailVisible"
|
|
|
+ :operation="detailOperation"
|
|
|
+ :item="currRow"
|
|
|
+ :is-edit="detailIsEdit"
|
|
|
+ :select-options="selectOptions"
|
|
|
+ :proxy-type="proxyType"
|
|
|
+ :data-type="dataType"
|
|
|
+ :refresh="getData"
|
|
|
+ :close="configDetailClose"
|
|
|
+ ></ConfigDetail>
|
|
|
|
|
|
- <CesiumMap v-if="isMapShow" :is-show="isMapShow" :type="mapType" :close="closeMap" :item="mapItem">
|
|
|
- </CesiumMap>
|
|
|
+ <CesiumMap
|
|
|
+ v-if="isMapShow"
|
|
|
+ :is-show="isMapShow"
|
|
|
+ :type="mapType"
|
|
|
+ :close="closeMap"
|
|
|
+ :item="mapItem"
|
|
|
+ ></CesiumMap>
|
|
|
|
|
|
- <AllCesiumMap v-if="isAllMapShow" :is-show="isAllMapShow" :type="allMapType" :close="closeMap" :item="tableData">
|
|
|
- </AllCesiumMap>
|
|
|
+ <AllCesiumMap
|
|
|
+ v-if="isAllMapShow"
|
|
|
+ :is-show="isAllMapShow"
|
|
|
+ :type="allMapType"
|
|
|
+ :close="closeMap"
|
|
|
+ :item="tableData"
|
|
|
+ ></AllCesiumMap>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -82,57 +138,57 @@ export default {
|
|
|
pageInfo: {
|
|
|
page: 1,
|
|
|
pageSize: 10,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
},
|
|
|
- proxyType: '',
|
|
|
- dataType: '',
|
|
|
+ proxyType: "",
|
|
|
+ dataType: "",
|
|
|
selectOptions: [],
|
|
|
dataTypes: {
|
|
|
99: {
|
|
|
- label: '数据',
|
|
|
- value: 'UNKNOWN'
|
|
|
+ label: "数据",
|
|
|
+ value: "UNKNOWN"
|
|
|
},
|
|
|
0: {
|
|
|
- label: '全部',
|
|
|
- value: 'ALL'
|
|
|
+ label: "全部",
|
|
|
+ value: "ALL"
|
|
|
},
|
|
|
1: {
|
|
|
- label: '地图',
|
|
|
- value: 'MAP',
|
|
|
+ label: "地图",
|
|
|
+ value: "MAP"
|
|
|
},
|
|
|
2: {
|
|
|
- label: '三维模型',
|
|
|
- value: 'MODEL',
|
|
|
+ label: "三维模型",
|
|
|
+ value: "MODEL"
|
|
|
},
|
|
|
3: {
|
|
|
- label: 'GLTF模型',
|
|
|
- value: 'GLTF',
|
|
|
+ label: "GLTF模型",
|
|
|
+ value: "GLTF"
|
|
|
}
|
|
|
},
|
|
|
|
|
|
routerParam: {
|
|
|
- 'publish_twoD': {
|
|
|
- proxyType: 'PUBLISH',
|
|
|
- dataTypes: [1],
|
|
|
+ publish_twoD: {
|
|
|
+ proxyType: "PUBLISH",
|
|
|
+ dataTypes: [1]
|
|
|
},
|
|
|
- 'publish_threeD': {
|
|
|
- proxyType: 'PUBLISH',
|
|
|
- dataTypes: [2, 3],
|
|
|
- },
|
|
|
- 'integration_data': {
|
|
|
- proxyType: 'INTEGRATION',
|
|
|
- dataTypes: [99],
|
|
|
+ publish_threeD: {
|
|
|
+ proxyType: "PUBLISH",
|
|
|
+ dataTypes: [2, 3]
|
|
|
},
|
|
|
+ integration_data: {
|
|
|
+ proxyType: "INTEGRATION",
|
|
|
+ dataTypes: [99]
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
mapTypes: {
|
|
|
- 'MODEL': 1,
|
|
|
- 'GLTF': 2,
|
|
|
- 'MAP': 4
|
|
|
+ MODEL: 1,
|
|
|
+ GLTF: 2,
|
|
|
+ MAP: 4
|
|
|
},
|
|
|
|
|
|
detailVisible: false,
|
|
|
- detailOperation: '',
|
|
|
+ detailOperation: "",
|
|
|
detailIsEdit: false,
|
|
|
|
|
|
isMapShow: false,
|
|
@@ -141,19 +197,21 @@ export default {
|
|
|
|
|
|
allMapType: -1,
|
|
|
isAllMapShow: false,
|
|
|
- }
|
|
|
+
|
|
|
+ searchStr: ""
|
|
|
+ };
|
|
|
},
|
|
|
watch: {
|
|
|
- "pageInfo.page": function () {
|
|
|
+ "pageInfo.page": function() {
|
|
|
this.renderTable();
|
|
|
},
|
|
|
- "pageInfo.pageSize": function () {
|
|
|
+ "pageInfo.pageSize": function() {
|
|
|
this.renderTable();
|
|
|
},
|
|
|
- "dataType": function () {
|
|
|
- this.refresh()
|
|
|
+ dataType: function() {
|
|
|
+ this.refresh();
|
|
|
},
|
|
|
- "$route.name": function (val) {
|
|
|
+ "$route.name": function(val) {
|
|
|
if (val) {
|
|
|
this.initType();
|
|
|
this.refresh();
|
|
@@ -163,10 +221,15 @@ export default {
|
|
|
components: {
|
|
|
ConfigDetail,
|
|
|
CesiumMap,
|
|
|
- AllCesiumMap,
|
|
|
+ AllCesiumMap
|
|
|
},
|
|
|
created() {
|
|
|
- this.initType()
|
|
|
+ this.initType();
|
|
|
+ this.pageInfo = {
|
|
|
+ page: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ total: 0
|
|
|
+ };
|
|
|
},
|
|
|
mounted() {
|
|
|
let container = document.getElementById("configManage");
|
|
@@ -180,15 +243,15 @@ export default {
|
|
|
if (!obj) {
|
|
|
return;
|
|
|
}
|
|
|
- this.proxyType = obj.proxyType
|
|
|
- this.dataType = '';
|
|
|
+ this.proxyType = obj.proxyType;
|
|
|
+ this.dataType = "";
|
|
|
this.selectOptions = [];
|
|
|
//this.selectOptions.push(this.dataTypes[0])
|
|
|
for (let index of obj.dataTypes) {
|
|
|
- this.selectOptions.push(this.dataTypes[index])
|
|
|
+ this.selectOptions.push(this.dataTypes[index]);
|
|
|
}
|
|
|
if (this.selectOptions.length > 0) {
|
|
|
- this.dataType = this.selectOptions[0].value
|
|
|
+ this.dataType = this.selectOptions[0].value;
|
|
|
}
|
|
|
},
|
|
|
refresh() {
|
|
@@ -198,9 +261,9 @@ export default {
|
|
|
this.getData();
|
|
|
},
|
|
|
getData() {
|
|
|
- if (!this.dataType || this.dataType == '') {
|
|
|
+ if (!this.dataType || this.dataType == "") {
|
|
|
this.configData = [];
|
|
|
- this.tableData = []
|
|
|
+ this.tableData = [];
|
|
|
this.pageInfo.total = 0;
|
|
|
return;
|
|
|
}
|
|
@@ -208,81 +271,111 @@ export default {
|
|
|
that.loading = true;
|
|
|
|
|
|
let params = {
|
|
|
- proxyType: this.proxyType,//"PUBLISH"
|
|
|
- dataType: this.dataType,//"MAP"
|
|
|
- }
|
|
|
- this.$request.postForm('/proxy_proxy/proxy_api/config/getByType', params).then(res => {
|
|
|
- that.configData = [];
|
|
|
- if (res.code === 200) {
|
|
|
- let num = 0;
|
|
|
+ proxyType: this.proxyType, //"PUBLISH"
|
|
|
+ dataType: this.dataType //"MAP"
|
|
|
+ };
|
|
|
+ this.$request
|
|
|
+ .postForm("/proxy_proxy/proxy_api/config/getByType", params)
|
|
|
+ .then(res => {
|
|
|
that.configData = [];
|
|
|
- that.pageInfo.total = 0;
|
|
|
- // let t = []
|
|
|
- if (res.content) {
|
|
|
- that.configData = JSON.parse(JSON.stringify(res.content))
|
|
|
+ if (res.code === 200) {
|
|
|
+ let num = 0;
|
|
|
+ that.configData = [];
|
|
|
+ that.pageInfo.total = 0;
|
|
|
// let t = []
|
|
|
- that.configData.forEach(i => {
|
|
|
- i.id = num++;
|
|
|
- // if (i.type == "3dtiles") {
|
|
|
- if (i.type.indexOf("arcgis") >= 0) {
|
|
|
- i.proxyUrl = systemConfig.proxyUrl_arcgis.replace('{PROXYURL}', i.key);
|
|
|
- // if (i.type.indexOf("arcgis-tile") >= 0) t.push(encodeURIComponent(i.proxyUrl + "622067E9-93E5-D8EC-E677-85B58A63C0C7"))
|
|
|
- }
|
|
|
- else if (i.type == "cartodb") {
|
|
|
- let one = systemConfig.proxyUrl.replace('proxy/?', "proxy/{z}/{x}/{y}.png?");
|
|
|
- i.proxyUrl = one.replace('{PROXYURL}', i.key);
|
|
|
- }
|
|
|
- else if (i.type == "xyz_jpg") {
|
|
|
- let one = systemConfig.proxyUrl.replace('proxy/?', "proxy/{z}/{x}/{y}.jpg?");
|
|
|
- i.proxyUrl = one.replace('{PROXYURL}', i.key);
|
|
|
- }
|
|
|
- else if (i.type == "xyz_png") {
|
|
|
- let one = systemConfig.proxyUrl.replace('proxy/?', "proxy/{z}/{x}/{y}.png?");
|
|
|
- i.proxyUrl = one.replace('{PROXYURL}', i.key);
|
|
|
- }
|
|
|
- else if (that.dataType == "MODEL") {
|
|
|
- let one = systemConfig.proxyUrl.replace('proxy/?', "proxy/tileset.json?");
|
|
|
- i.proxyUrl = one.replace('{PROXYURL}', i.key);
|
|
|
- }
|
|
|
- else {
|
|
|
- i.proxyUrl = systemConfig.proxyUrl.replace('{PROXYURL}', i.key);
|
|
|
- }
|
|
|
- })
|
|
|
- that.pageInfo.total = that.configData.length;
|
|
|
- // console.log(JSON.stringify(t))
|
|
|
- }
|
|
|
+ if (res.content) {
|
|
|
+ that.configData = JSON.parse(JSON.stringify(res.content));
|
|
|
+ // let t = []
|
|
|
+ that.configData.forEach(i => {
|
|
|
+ i.id = num++;
|
|
|
+ // if (i.type == "3dtiles") {
|
|
|
+ if (i.type.indexOf("arcgis") >= 0) {
|
|
|
+ i.proxyUrl = systemConfig.proxyUrl_arcgis.replace(
|
|
|
+ "{PROXYURL}",
|
|
|
+ i.key
|
|
|
+ );
|
|
|
+ // if (i.type.indexOf("arcgis-tile") >= 0) t.push(encodeURIComponent(i.proxyUrl + "622067E9-93E5-D8EC-E677-85B58A63C0C7"))
|
|
|
+ } else if (i.type == "cartodb") {
|
|
|
+ let one = systemConfig.proxyUrl.replace(
|
|
|
+ "proxy/?",
|
|
|
+ "proxy/{z}/{x}/{y}.png?"
|
|
|
+ );
|
|
|
+ i.proxyUrl = one.replace("{PROXYURL}", i.key);
|
|
|
+ } else if (i.type == "xyz_jpg") {
|
|
|
+ let one = systemConfig.proxyUrl.replace(
|
|
|
+ "proxy/?",
|
|
|
+ "proxy/{z}/{x}/{y}.jpg?"
|
|
|
+ );
|
|
|
+ i.proxyUrl = one.replace("{PROXYURL}", i.key);
|
|
|
+ } else if (i.type == "xyz_png") {
|
|
|
+ let one = systemConfig.proxyUrl.replace(
|
|
|
+ "proxy/?",
|
|
|
+ "proxy/{z}/{x}/{y}.png?"
|
|
|
+ );
|
|
|
+ i.proxyUrl = one.replace("{PROXYURL}", i.key);
|
|
|
+ } else if (that.dataType == "MODEL") {
|
|
|
+ let one = systemConfig.proxyUrl.replace(
|
|
|
+ "proxy/?",
|
|
|
+ "proxy/tileset.json?"
|
|
|
+ );
|
|
|
+ i.proxyUrl = one.replace("{PROXYURL}", i.key);
|
|
|
+ } else {
|
|
|
+ i.proxyUrl = systemConfig.proxyUrl.replace(
|
|
|
+ "{PROXYURL}",
|
|
|
+ i.key
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- this.renderTable();
|
|
|
- }
|
|
|
- that.loading = false;
|
|
|
- }).catch(err => {
|
|
|
- that.loading = false;
|
|
|
- that.$message({ message: err.message, type: 'error' });
|
|
|
- })
|
|
|
+ that.configData = that.configData.filter(function(item) {
|
|
|
+ return that.searchStr == ""
|
|
|
+ ? true
|
|
|
+ : item.content.indexOf(that.searchStr.replace(/ /g, "")) >=
|
|
|
+ 0 ||
|
|
|
+ item.key.indexOf(that.searchStr.replace(/ /g, "")) >= 0;
|
|
|
+ });
|
|
|
+
|
|
|
+ that.pageInfo.total = that.configData.length;
|
|
|
+ // console.log(JSON.stringify(t))
|
|
|
+ }
|
|
|
+ this.renderTable();
|
|
|
+ }
|
|
|
+ that.loading = false;
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ that.loading = false;
|
|
|
+ that.$message({ message: err.message, type: "error" });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ screenData() {
|
|
|
+ this.getData();
|
|
|
},
|
|
|
renderTable() {
|
|
|
- let start = (this.pageInfo.page - 1) * this.pageInfo.pageSize
|
|
|
- let end = this.pageInfo.page * this.pageInfo.pageSize
|
|
|
- this.tableData = this.configData.slice(start, end)
|
|
|
+ let start = (this.pageInfo.page - 1) * this.pageInfo.pageSize;
|
|
|
+ let end = this.pageInfo.page * this.pageInfo.pageSize;
|
|
|
+ this.tableData = this.configData.slice(start, end);
|
|
|
},
|
|
|
handleDetailVisible(operation, item) {
|
|
|
this.detailOperation = operation;
|
|
|
this.detailVisible = true;
|
|
|
this.detailIsEdit = true;
|
|
|
- if (operation === 'Add') {
|
|
|
- this.currRow = { title: '', url: '' };
|
|
|
+ if (operation === "Add") {
|
|
|
+ this.currRow = { title: "", url: "" };
|
|
|
this.detailIsEdit = false;
|
|
|
} else {
|
|
|
this.currRow = JSON.parse(JSON.stringify(item));
|
|
|
}
|
|
|
},
|
|
|
+ configDetailClose() {
|
|
|
+ this.detailVisible = false;
|
|
|
+ },
|
|
|
viewAllModel() {
|
|
|
let type = this.mapTypes[this.dataType];
|
|
|
if (type) {
|
|
|
this.allMapType = type;
|
|
|
this.isAllMapShow = true;
|
|
|
} else {
|
|
|
- this.$message.error('该类型暂不支持预览');
|
|
|
+ this.$message.error("该类型暂不支持预览");
|
|
|
return;
|
|
|
}
|
|
|
},
|
|
@@ -292,55 +385,62 @@ export default {
|
|
|
// debugger;
|
|
|
// console.log(item)
|
|
|
// console.log(this.dataType)
|
|
|
- this.mapItem = JSON.parse(JSON.stringify(item))
|
|
|
+ this.mapItem = JSON.parse(JSON.stringify(item));
|
|
|
let type = this.mapTypes[this.dataType];
|
|
|
if (type) {
|
|
|
this.mapType = type;
|
|
|
this.isMapShow = true;
|
|
|
} else {
|
|
|
- this.$message.error('该类型暂不支持预览');
|
|
|
+ this.$message.error("该类型暂不支持预览");
|
|
|
return;
|
|
|
}
|
|
|
},
|
|
|
closeMap() {
|
|
|
- this.isMapShow = false
|
|
|
- this.isAllMapShow = false
|
|
|
+ this.isMapShow = false;
|
|
|
+ this.isAllMapShow = false;
|
|
|
},
|
|
|
deleteConfig(item) {
|
|
|
let that = this;
|
|
|
- this.$msgbox.confirm('确定要删除:' + item.key + '吗?').then(() => {
|
|
|
+ this.$msgbox.confirm("确定要删除:" + item.key + "吗?").then(() => {
|
|
|
let params = {
|
|
|
proxyType: this.proxyType,
|
|
|
dataType: this.dataType,
|
|
|
index: item.id
|
|
|
- }
|
|
|
- that.$request.deleteForm('/proxy_proxy/proxy_api/config/delete', params).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- that.$message({ message: '删除成功', type: 'success' });
|
|
|
- that.getData();
|
|
|
- } else {
|
|
|
- that.$message({ message: res.content, type: 'error' });
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- that.$message({ message: err.message, type: 'error' });
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
+ };
|
|
|
+ that.$request
|
|
|
+ .deleteForm("/proxy_proxy/proxy_api/config/delete", params)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ that.$message({ message: "删除成功", type: "success" });
|
|
|
+ that.getData();
|
|
|
+ } else {
|
|
|
+ that.$message({ message: res.content, type: "error" });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ that.$message({ message: err.message, type: "error" });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-#configManage {
|
|
|
+.configManageContainer {
|
|
|
width: 98%;
|
|
|
height: 100%;
|
|
|
+}
|
|
|
+#configManage {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
|
|
|
.functionBtn {
|
|
|
margin-top: 1%;
|
|
|
}
|
|
|
|
|
|
.tableContent {
|
|
|
+ // max-height: 500px;
|
|
|
margin-top: 1%;
|
|
|
|
|
|
.pagination {
|