|
@@ -8,6 +8,8 @@
|
|
placeholder="请选择类型"
|
|
placeholder="请选择类型"
|
|
style="margin-right: 12px"
|
|
style="margin-right: 12px"
|
|
default-first-option
|
|
default-first-option
|
|
|
|
+ @change="screenData()"
|
|
|
|
+ clearable
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="(item, index) in selectOptions"
|
|
v-for="(item, index) in selectOptions"
|
|
@@ -16,9 +18,17 @@
|
|
:value="item.value"
|
|
:value="item.value"
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</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-input
|
|
|
|
+ v-model="searchStr"
|
|
|
|
+ style="width: 150px; margin-right: 20px"
|
|
|
|
+ placeholder="请输入查询关键字"
|
|
|
|
+ @change="screenData()"
|
|
|
|
+ clearable
|
|
|
|
+ ></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-button v-show="proxyType != 'INTEGRATION'" round @click="viewAllModel">全部预览</el-button> -->
|
|
<el-tooltip content="刷新" placement="right">
|
|
<el-tooltip content="刷新" placement="right">
|
|
<el-button circle @click="refresh">
|
|
<el-button circle @click="refresh">
|
|
@@ -34,7 +44,11 @@
|
|
:data="tableData"
|
|
:data="tableData"
|
|
:max-height="maxHeight"
|
|
:max-height="maxHeight"
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
- @current-change="(row) => { this.currRow = row }"
|
|
|
|
|
|
+ @current-change="
|
|
|
|
+ (row) => {
|
|
|
|
+ this.currRow = row;
|
|
|
|
+ }
|
|
|
|
+ "
|
|
border
|
|
border
|
|
stripe
|
|
stripe
|
|
>
|
|
>
|
|
@@ -46,14 +60,17 @@
|
|
<el-table-column prop="key" label="标题" min-width="100">
|
|
<el-table-column prop="key" label="标题" min-width="100">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span
|
|
<span
|
|
- style="font-weight: bold;font-family: JetBrainsMono-Regular,serif"
|
|
|
|
- >{{ scope.row.key }}</span>
|
|
|
|
|
|
+ style="font-weight: bold; font-family: JetBrainsMono-Regular, serif"
|
|
|
|
+ >{{ scope.row.key }}</span
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="content" label="描述" min-width="100" />
|
|
<el-table-column prop="content" label="描述" min-width="100" />
|
|
<el-table-column prop="proxyUrl" label="链接" min-width="350">
|
|
<el-table-column prop="proxyUrl" label="链接" min-width="350">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <span style="font-family: JetBrainsMono-Regular,serif">{{ scope.row.proxyUrl }}</span>
|
|
|
|
|
|
+ <span style="font-family: JetBrainsMono-Regular, serif">{{
|
|
|
|
+ scope.row.proxyUrl
|
|
|
|
+ }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="operation" label="操作" min-width="120">
|
|
<el-table-column prop="operation" label="操作" min-width="120">
|
|
@@ -64,18 +81,22 @@
|
|
@click="handleDetailVisible('Edit', scope.row)"
|
|
@click="handleDetailVisible('Edit', scope.row)"
|
|
>
|
|
>
|
|
<el-icon>
|
|
<el-icon>
|
|
- <IconPark-edit />
|
|
|
|
- </el-icon>修改
|
|
|
|
|
|
+ <IconPark-edit /> </el-icon
|
|
|
|
+ >修改
|
|
</el-button>
|
|
</el-button>
|
|
<el-button size="small" @click="deleteConfig(scope.row)">
|
|
<el-button size="small" @click="deleteConfig(scope.row)">
|
|
<el-icon>
|
|
<el-icon>
|
|
- <IconPark-delete />
|
|
|
|
- </el-icon>删除
|
|
|
|
|
|
+ <IconPark-delete /> </el-icon
|
|
|
|
+ >删除
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button v-show="proxyType != 'INTEGRATION'" size="small" @click="view(scope.row)">
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-show="proxyType != 'INTEGRATION'"
|
|
|
|
+ size="small"
|
|
|
|
+ @click="view(scope.row)"
|
|
|
|
+ >
|
|
<el-icon>
|
|
<el-icon>
|
|
- <IconPark-preview-open />
|
|
|
|
- </el-icon>预览
|
|
|
|
|
|
+ <IconPark-preview-open /> </el-icon
|
|
|
|
+ >预览
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -138,7 +159,7 @@ export default {
|
|
pageInfo: {
|
|
pageInfo: {
|
|
page: 1,
|
|
page: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- total: 0
|
|
|
|
|
|
+ total: 0,
|
|
},
|
|
},
|
|
proxyType: "",
|
|
proxyType: "",
|
|
dataType: "",
|
|
dataType: "",
|
|
@@ -146,45 +167,45 @@ export default {
|
|
dataTypes: {
|
|
dataTypes: {
|
|
99: {
|
|
99: {
|
|
label: "数据",
|
|
label: "数据",
|
|
- value: "UNKNOWN"
|
|
|
|
|
|
+ value: "UNKNOWN",
|
|
},
|
|
},
|
|
0: {
|
|
0: {
|
|
label: "全部",
|
|
label: "全部",
|
|
- value: "ALL"
|
|
|
|
|
|
+ value: "ALL",
|
|
},
|
|
},
|
|
1: {
|
|
1: {
|
|
label: "地图",
|
|
label: "地图",
|
|
- value: "MAP"
|
|
|
|
|
|
+ value: "MAP",
|
|
},
|
|
},
|
|
2: {
|
|
2: {
|
|
label: "三维模型",
|
|
label: "三维模型",
|
|
- value: "MODEL"
|
|
|
|
|
|
+ value: "MODEL",
|
|
},
|
|
},
|
|
3: {
|
|
3: {
|
|
label: "GLTF模型",
|
|
label: "GLTF模型",
|
|
- value: "GLTF"
|
|
|
|
- }
|
|
|
|
|
|
+ value: "GLTF",
|
|
|
|
+ },
|
|
},
|
|
},
|
|
|
|
|
|
routerParam: {
|
|
routerParam: {
|
|
publish_twoD: {
|
|
publish_twoD: {
|
|
proxyType: "PUBLISH",
|
|
proxyType: "PUBLISH",
|
|
- dataTypes: [1]
|
|
|
|
|
|
+ dataTypes: [1],
|
|
},
|
|
},
|
|
publish_threeD: {
|
|
publish_threeD: {
|
|
proxyType: "PUBLISH",
|
|
proxyType: "PUBLISH",
|
|
- dataTypes: [2, 3]
|
|
|
|
|
|
+ dataTypes: [2, 3],
|
|
},
|
|
},
|
|
integration_data: {
|
|
integration_data: {
|
|
proxyType: "INTEGRATION",
|
|
proxyType: "INTEGRATION",
|
|
- dataTypes: [99]
|
|
|
|
- }
|
|
|
|
|
|
+ dataTypes: [99],
|
|
|
|
+ },
|
|
},
|
|
},
|
|
|
|
|
|
mapTypes: {
|
|
mapTypes: {
|
|
MODEL: 1,
|
|
MODEL: 1,
|
|
GLTF: 2,
|
|
GLTF: 2,
|
|
- MAP: 4
|
|
|
|
|
|
+ MAP: 4,
|
|
},
|
|
},
|
|
|
|
|
|
detailVisible: false,
|
|
detailVisible: false,
|
|
@@ -198,37 +219,37 @@ export default {
|
|
allMapType: -1,
|
|
allMapType: -1,
|
|
isAllMapShow: false,
|
|
isAllMapShow: false,
|
|
|
|
|
|
- searchStr: ""
|
|
|
|
|
|
+ searchStr: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- "pageInfo.page": function() {
|
|
|
|
|
|
+ "pageInfo.page": function () {
|
|
this.renderTable();
|
|
this.renderTable();
|
|
},
|
|
},
|
|
- "pageInfo.pageSize": function() {
|
|
|
|
|
|
+ "pageInfo.pageSize": function () {
|
|
this.renderTable();
|
|
this.renderTable();
|
|
},
|
|
},
|
|
- dataType: function() {
|
|
|
|
|
|
+ dataType: function () {
|
|
this.refresh();
|
|
this.refresh();
|
|
},
|
|
},
|
|
- "$route.name": function(val) {
|
|
|
|
|
|
+ "$route.name": function (val) {
|
|
if (val) {
|
|
if (val) {
|
|
this.initType();
|
|
this.initType();
|
|
this.refresh();
|
|
this.refresh();
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
ConfigDetail,
|
|
ConfigDetail,
|
|
CesiumMap,
|
|
CesiumMap,
|
|
- AllCesiumMap
|
|
|
|
|
|
+ AllCesiumMap,
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.initType();
|
|
this.initType();
|
|
this.pageInfo = {
|
|
this.pageInfo = {
|
|
page: 1,
|
|
page: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- total: 0
|
|
|
|
|
|
+ total: 0,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -272,11 +293,11 @@ export default {
|
|
|
|
|
|
let params = {
|
|
let params = {
|
|
proxyType: this.proxyType, //"PUBLISH"
|
|
proxyType: this.proxyType, //"PUBLISH"
|
|
- dataType: this.dataType //"MAP"
|
|
|
|
|
|
+ dataType: this.dataType, //"MAP"
|
|
};
|
|
};
|
|
this.$request
|
|
this.$request
|
|
.postForm("/proxy_proxy/proxy_api/config/getByType", params)
|
|
.postForm("/proxy_proxy/proxy_api/config/getByType", params)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
that.configData = [];
|
|
that.configData = [];
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
let num = 0;
|
|
let num = 0;
|
|
@@ -286,14 +307,11 @@ export default {
|
|
if (res.content) {
|
|
if (res.content) {
|
|
that.configData = JSON.parse(JSON.stringify(res.content));
|
|
that.configData = JSON.parse(JSON.stringify(res.content));
|
|
// let t = []
|
|
// let t = []
|
|
- that.configData.forEach(i => {
|
|
|
|
|
|
+ that.configData.forEach((i) => {
|
|
i.id = num++;
|
|
i.id = num++;
|
|
// if (i.type == "3dtiles") {
|
|
// if (i.type == "3dtiles") {
|
|
if (i.type.indexOf("arcgis") >= 0) {
|
|
if (i.type.indexOf("arcgis") >= 0) {
|
|
- i.proxyUrl = systemConfig.proxyUrl_arcgis.replace(
|
|
|
|
- "{PROXYURL}",
|
|
|
|
- i.key
|
|
|
|
- );
|
|
|
|
|
|
+ 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"))
|
|
// if (i.type.indexOf("arcgis-tile") >= 0) t.push(encodeURIComponent(i.proxyUrl + "622067E9-93E5-D8EC-E677-85B58A63C0C7"))
|
|
} else if (i.type == "cartodb") {
|
|
} else if (i.type == "cartodb") {
|
|
let one = systemConfig.proxyUrl.replace(
|
|
let one = systemConfig.proxyUrl.replace(
|
|
@@ -320,18 +338,14 @@ export default {
|
|
);
|
|
);
|
|
i.proxyUrl = one.replace("{PROXYURL}", i.key);
|
|
i.proxyUrl = one.replace("{PROXYURL}", i.key);
|
|
} else {
|
|
} else {
|
|
- i.proxyUrl = systemConfig.proxyUrl.replace(
|
|
|
|
- "{PROXYURL}",
|
|
|
|
- i.key
|
|
|
|
- );
|
|
|
|
|
|
+ i.proxyUrl = systemConfig.proxyUrl.replace("{PROXYURL}", i.key);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
- that.configData = that.configData.filter(function(item) {
|
|
|
|
|
|
+ that.configData = that.configData.filter(function (item) {
|
|
return that.searchStr == ""
|
|
return that.searchStr == ""
|
|
? true
|
|
? true
|
|
- : item.content.indexOf(that.searchStr.replace(/ /g, "")) >=
|
|
|
|
- 0 ||
|
|
|
|
|
|
+ : item.content.indexOf(that.searchStr.replace(/ /g, "")) >= 0 ||
|
|
item.key.indexOf(that.searchStr.replace(/ /g, "")) >= 0;
|
|
item.key.indexOf(that.searchStr.replace(/ /g, "")) >= 0;
|
|
});
|
|
});
|
|
|
|
|
|
@@ -342,7 +356,7 @@ export default {
|
|
}
|
|
}
|
|
that.loading = false;
|
|
that.loading = false;
|
|
})
|
|
})
|
|
- .catch(err => {
|
|
|
|
|
|
+ .catch((err) => {
|
|
that.loading = false;
|
|
that.loading = false;
|
|
that.$message({ message: err.message, type: "error" });
|
|
that.$message({ message: err.message, type: "error" });
|
|
});
|
|
});
|
|
@@ -405,11 +419,11 @@ export default {
|
|
let params = {
|
|
let params = {
|
|
proxyType: this.proxyType,
|
|
proxyType: this.proxyType,
|
|
dataType: this.dataType,
|
|
dataType: this.dataType,
|
|
- index: item.id
|
|
|
|
|
|
+ index: item.id,
|
|
};
|
|
};
|
|
that.$request
|
|
that.$request
|
|
.deleteForm("/proxy_proxy/proxy_api/config/delete", params)
|
|
.deleteForm("/proxy_proxy/proxy_api/config/delete", params)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
that.$message({ message: "删除成功", type: "success" });
|
|
that.$message({ message: "删除成功", type: "success" });
|
|
that.getData();
|
|
that.getData();
|
|
@@ -417,12 +431,12 @@ export default {
|
|
that.$message({ message: res.content, type: "error" });
|
|
that.$message({ message: res.content, type: "error" });
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- .catch(err => {
|
|
|
|
|
|
+ .catch((err) => {
|
|
that.$message({ message: err.message, type: "error" });
|
|
that.$message({ message: err.message, type: "error" });
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -451,4 +465,4 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|