|
@@ -3,16 +3,19 @@
|
|
|
<card-page>
|
|
|
<template v-slot:card-header>
|
|
|
<el-row>
|
|
|
- <el-col :span="4" style="padding-bottom: 30px;">
|
|
|
- <el-page-header @back="goBack" :content="action">
|
|
|
- </el-page-header>
|
|
|
+ <el-col :span="22" style="padding-bottom: 30px;">
|
|
|
+ <span class="title-font-big">{{action}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col @click="goBack" :span="2" style="padding-bottom: 30px;display: flex;align-items: center;justify-content: flex-end;cursor: pointer">
|
|
|
+ <el-icon ><Back /></el-icon>
|
|
|
+ <span class="title-font">返回</span>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="18">
|
|
|
<el-form :inline="true" :model="formData" ref="formDataRef">
|
|
|
<el-form-item label="工具名称" prop="RESOURCE_NAME">
|
|
|
- <el-input v-model="formData.RESOURCE_NAME" placeholder="请输入"></el-input>
|
|
|
+ <el-input style="width: 400px" v-model="formData.RESOURCE_NAME" placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
@@ -34,105 +37,48 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</template>
|
|
|
- </card-page>
|
|
|
- <card-page>
|
|
|
- <template v-slot:card-header>
|
|
|
- <p style="padding-bottom: 15px" class="title-font">接口共享</p>
|
|
|
- </template>
|
|
|
+
|
|
|
+
|
|
|
<template v-slot:card-item>
|
|
|
- <div style="height: 100%">
|
|
|
+ <div style="height: 100%;padding-top: 20px">
|
|
|
<el-table
|
|
|
- border
|
|
|
- id="ftable"
|
|
|
- :row-style="{backgroundColor:' #e7f2ff'}"
|
|
|
- default-expand-all
|
|
|
- v-loading="loading"
|
|
|
- :show-header="false"
|
|
|
- :data="data_map">
|
|
|
- <el-table-column type="expand">
|
|
|
- <template #default="props">
|
|
|
- <el-table
|
|
|
- id="stable"
|
|
|
- :row-style="{backgroundColor:' #f2faff'}"
|
|
|
- :show-header="false"
|
|
|
- ref="tableRef"
|
|
|
- :span-method="objectSpanMethod"
|
|
|
- :data="props.row.child">
|
|
|
- <el-table-column
|
|
|
- min-width="30">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- type="selection"
|
|
|
- width="45">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column min-width="270">
|
|
|
- <template #default="{ row }">
|
|
|
- <div class="center" style="justify-content: left">
|
|
|
- <!-- <img :src="row.SLT_URL" @error="onImageError" style="min-width: 346px"/>-->
|
|
|
- <img src="@/assets/imgs/interfaceTool.png" style="min-width: 346px"/>
|
|
|
- <div style="padding-left: 10px">
|
|
|
- <p>
|
|
|
- <span class="table-show-tile-font">{{ row.RESOURCE_NAME }}</span><br>
|
|
|
- <span style="font-size: 15px;color: #595959;" class="table-filed-font">{{ row.RELEASE_REMARKS }}</span>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column>
|
|
|
- <template #default="{ row }">
|
|
|
- <span class="table-filed-font" style="line-height: 35px">最近更新时间</span><br>
|
|
|
- <span class="content-font">{{ row.INSERT_TIME }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column min-width="120px">
|
|
|
- <template #default="{ row }">
|
|
|
- <div class="center" style="justify-content: left">
|
|
|
- <i class="iconfont icon-shoucang" style="padding-right: 20px"
|
|
|
- v-if="row.COLLECTION_FLAG == '-1'" @click="collection(row)"></i>
|
|
|
- <i class="iconfont icon-shoucang1" @click="canceltCollection(row.COLLECTION_FLAG)"
|
|
|
- v-else
|
|
|
- style="color: #edd25b;padding-right: 20px"></i>
|
|
|
- <el-button class="button-font" type="primary" @click="onLineTest(row)" plain
|
|
|
- :disabled="!!!row.TEXT_ADDRESS">在线测试
|
|
|
- </el-button>
|
|
|
- <el-button class="button-font" type="primary" @click="getDetails(row)" plain>查看详情
|
|
|
- </el-button>
|
|
|
- <el-button class="button-font" type="primary" @click="jumpTool(row)" plain>申请资源
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <template #empty>
|
|
|
- <el-empty
|
|
|
- description="暂无数据"></el-empty>
|
|
|
- </template>
|
|
|
- </el-table>
|
|
|
+ id="stable"
|
|
|
+ :row-style="{backgroundColor:' #f2faff'}"
|
|
|
+ ref="tableRef"
|
|
|
+ :data="tableData" style="width: 100%">
|
|
|
+ <el-table-column type="selection" width="55" />
|
|
|
+ <el-table-column label="工具名称" >
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span class="table-show-tile-font">{{ row.RESOURCE_NAME }}</span><br>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- 表格的表头-->
|
|
|
- <el-table-column width="175px">
|
|
|
+ <el-table-column label="更新时间" width="250">
|
|
|
<template #default="{ row }">
|
|
|
- <img src="../../../assets/imgs/serviceLoad.png" width="100"
|
|
|
- height="100"/>
|
|
|
+ <span class="content-font">{{ row.INSERT_TIME }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
- <el-table-column min-width="235">
|
|
|
+ <el-table-column label="加入收藏夹" width="200">
|
|
|
<template #default="{ row }">
|
|
|
- <p class="table-filed-font" style=" display: flex;justify-content: left; /* 水平居中 */">
|
|
|
- {{ row.REMARKS }}
|
|
|
- </p>
|
|
|
+ <div class="center" style="justify-content: left">
|
|
|
+ <i class="iconfont icon-shoucang" style="padding-right: 20px"
|
|
|
+ v-if="row.COLLECTION_FLAG == '-1'" @click="collection(row)"></i>
|
|
|
+ <i class="iconfont icon-shoucang1" @click="canceltCollection(row.COLLECTION_FLAG)"
|
|
|
+ v-else
|
|
|
+ style="color: #edd25b;padding-right: 20px"></i>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column min-width="190" style=" display: flex;justify-content: left; /* 水平居中 */">
|
|
|
+ <el-table-column label="操作">
|
|
|
<template #default="{ row }">
|
|
|
- <p class="table-filed-font">
|
|
|
- 最近更新时间
|
|
|
- </p>
|
|
|
- <p class="title-font">
|
|
|
- <span class="content-font" style="font-size: 16px">{{ row.INSERT_TIME }}</span>
|
|
|
- </p>
|
|
|
+ <div class="center" style="justify-content: left">
|
|
|
+ <el-button class="button-font" type="primary" @click="onLineTest(row)" plain
|
|
|
+ :disabled="!!!row.TEXT_ADDRESS">在线测试
|
|
|
+ </el-button>
|
|
|
+ <el-button class="button-font" type="primary" @click="getDetails(row)" plain>查看详情
|
|
|
+ </el-button>
|
|
|
+ <el-button class="button-font" type="primary" @click="jumpTool(row)" plain>申请资源
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<template #empty>
|
|
@@ -156,6 +102,7 @@
|
|
|
</template>
|
|
|
</card-page>
|
|
|
|
|
|
+
|
|
|
<!-- -->
|
|
|
<el-dialog title="接口待申请列表" v-model="dialogTableVisible" center>
|
|
|
<el-table ref="pendingTableRef" :data="gridData" v-loading="collectionLoading">
|
|
@@ -185,6 +132,7 @@
|
|
|
import '@/assets/icon/collection/iconfont.css'
|
|
|
import CardPage from '@/common/card-page.vue'
|
|
|
import {showMessage} from "@/unit/element-ui/tip";
|
|
|
+import {Back} from "@element-plus/icons-vue";
|
|
|
import {
|
|
|
baseUrl,
|
|
|
selectInterfaceKooleitMainType,
|
|
@@ -214,9 +162,6 @@ const dialogTableVisible = ref(false);
|
|
|
const gridData = ref([])
|
|
|
|
|
|
|
|
|
-// map
|
|
|
-const type_map = ref({});
|
|
|
-const data_map = ref([]);
|
|
|
// 表格
|
|
|
const tableRef = ref()
|
|
|
|
|
@@ -248,24 +193,20 @@ function goBack() {
|
|
|
onMounted(() => {
|
|
|
type.value = route.params.type
|
|
|
action.value = route.params.action
|
|
|
- selectInterfaceKooleitMainTypeList()
|
|
|
+ commit();
|
|
|
});
|
|
|
watch(route, (newRoute, oldRoute) => {
|
|
|
type.value = route.params.type
|
|
|
action.value = route.params.action
|
|
|
- selectInterfaceKooleitMainTypeList()
|
|
|
+ commit();
|
|
|
})
|
|
|
|
|
|
-function onImageError(event) {
|
|
|
- event.target.src = window.location.origin + '/src/assets/imgs/interfaceTool.png';
|
|
|
-}
|
|
|
-
|
|
|
|
|
|
//重置
|
|
|
function reset() {
|
|
|
formDataRef.value.resetFields()
|
|
|
removeItem()
|
|
|
- selectInterfaceKooleitMainTypeList()
|
|
|
+ commit();
|
|
|
}
|
|
|
|
|
|
function removeItem() {
|
|
@@ -378,22 +319,9 @@ function handleCurrentChange(val) {
|
|
|
commit()
|
|
|
}
|
|
|
|
|
|
-// 加载就绪触发
|
|
|
-function selectInterfaceKooleitMainTypeList() {
|
|
|
- selectInterfaceKooleitMainType().then(response => {
|
|
|
- let dataArr = response.msg[0].Rows
|
|
|
- for (var i = 0; i < dataArr.length; i++) {
|
|
|
- type_map.value[dataArr[i]["CODE"]] = dataArr[i];
|
|
|
- }
|
|
|
- commit();
|
|
|
- });
|
|
|
-};
|
|
|
|
|
|
function commit() {
|
|
|
loading.value = true
|
|
|
- data_map.value.forEach(data => {
|
|
|
- data.child = []
|
|
|
- })
|
|
|
selectInterfaceKoolkitNewMainPageList(
|
|
|
formData.value.RESOURCE_NAME,
|
|
|
'',
|
|
@@ -437,94 +365,11 @@ function loadInterfaceKoolkitNewMainPageList(response) {
|
|
|
page.value.totalCount = response.msg[0]?.TotalRowCount || 0;
|
|
|
|
|
|
if (dataArr.length > 0) {
|
|
|
- tableData.value = [];
|
|
|
-
|
|
|
- for (let i = 0; i < dataArr.length; i++) {
|
|
|
- //判断是否上传过缩略图,如果未上传使用默认缩略图
|
|
|
- if (!dataArr[i]["RESOURCE_THUMBNAIL"]) {
|
|
|
- //判断访问类型 添加默认图标
|
|
|
- switch (dataArr[i]["RESOURCE_TYPE"]) {
|
|
|
- case "1":
|
|
|
- dataArr[i]["SLT_URL"] = baseUrl + "//fileController//image?path=D://files//interfaceKoolkit//slt//资源访问类.jpg";
|
|
|
- break;
|
|
|
- case "2":
|
|
|
- dataArr[i]["SLT_URL"] = baseUrl + "//fileController//image?path=D://files//interfaceKoolkit//slt//地图类.jpg";
|
|
|
- break;
|
|
|
- case "3":
|
|
|
- dataArr[i]["SLT_URL"] = baseUrl + "//fileController//image?path=D://files//interfaceKoolkit//slt//控件类.jpg";
|
|
|
- break;
|
|
|
- default:
|
|
|
- dataArr[i]["SLT_URL"] = baseUrl + "//fileController//image?path=D://files//interfaceKoolkit//slt//默认图.jpg";
|
|
|
- break;
|
|
|
- }
|
|
|
- } else {
|
|
|
- dataArr[i]["SLT_URL"] = baseUrl + "//fileController//image?path=" + dataArr[i]["RESOURCE_THUMBNAIL"];
|
|
|
- }
|
|
|
-
|
|
|
- dataArr[i]["GWC_URL"] = baseUrl + "//fileController//image?path=D://files//interfaceKoolkit//slt//购物车.png";
|
|
|
-
|
|
|
- switch (dataArr[i]["RESOURCE_TYPE"]) {
|
|
|
- case "1":
|
|
|
- dataArr[i]["RESOURCE_TYPE"] = "资源访问类";
|
|
|
- break;
|
|
|
- case "2":
|
|
|
- dataArr[i]["RESOURCE_TYPE"] = "地图类";
|
|
|
- break;
|
|
|
- case "3":
|
|
|
- dataArr[i]["RESOURCE_TYPE"] = "控件类";
|
|
|
- break;
|
|
|
- default:
|
|
|
- dataArr[i]["RESOURCE_TYPE"] = "未知类型";
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- data_map.value = [];
|
|
|
- for (let i = 0; i < dataArr.length; i++) {
|
|
|
- let data = dataArr[i]
|
|
|
- if (dataArr[i]["INSERT_TIME"]) {
|
|
|
- dataArr[i]["INSERT_TIME"] = dataArr[i]["INSERT_TIME"].toString().split(".")[0];
|
|
|
- }
|
|
|
- if (!data_map.value[dataArr[i]["TYPE"]]) {
|
|
|
- data_map.value[data.TYPE] = type_map.value[dataArr[i]["TYPE"]] || {};
|
|
|
- data_map.value[data.TYPE].TYPE_URL = baseUrl + "//fileController//image?path=" + (type_map.value[dataArr[i]["TYPE"]] ? type_map.value[dataArr[i]["TYPE"]]["ICON_IMAGE"] : "默认图标.jpg");
|
|
|
- }
|
|
|
- if (!data_map.value[data.TYPE].child) {
|
|
|
- data_map.value[data.TYPE].child = [];
|
|
|
- data_map.value[data.TYPE].child.push(data)
|
|
|
- } else {
|
|
|
- data_map.value[data.TYPE].child.push(data)
|
|
|
- }
|
|
|
- }
|
|
|
- data_map.value = data_map.value.filter(item => {
|
|
|
- // 根据你的过滤条件进行过滤,这里以搜索关键词为例
|
|
|
- return item.NAME.includes(action.value);
|
|
|
- });
|
|
|
- } else {
|
|
|
- loading.value = false;
|
|
|
- // data_map.value[0].child = []
|
|
|
- tableData.value = [];
|
|
|
+ tableData.value = dataArr;
|
|
|
}
|
|
|
loading.value = false;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
-// 合并列
|
|
|
-function objectSpanMethod({row, column, rowIndex, columnIndex}) {
|
|
|
- console.log(rowIndex, 123132)
|
|
|
- if (columnIndex === 0) {
|
|
|
- if (rowIndex == 0) {
|
|
|
- return {
|
|
|
- rowspan: data_map.value[0].child.length,
|
|
|
- colspan: 1
|
|
|
- };
|
|
|
- } else {
|
|
|
- return {
|
|
|
- rowspan: 0,
|
|
|
- colspan: 0
|
|
|
- };
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
|
|
|
</script>
|
|
|
|
|
@@ -584,6 +429,14 @@ function objectSpanMethod({row, column, rowIndex, columnIndex}) {
|
|
|
color: #5c6160;
|
|
|
}
|
|
|
|
|
|
+// title字体
|
|
|
+.title-font-big {
|
|
|
+ font-size: 20px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #5c6160;
|
|
|
+}
|
|
|
+
|
|
|
// 内容字体
|
|
|
.content-font {
|
|
|
font-size: 15px;
|