浏览代码

资源管理详情页面开发

chaihaorui 1 年之前
父节点
当前提交
133b3a1002

文件差异内容过多而无法显示
+ 1 - 0
src/assets/image/u9765.svg


+ 1 - 1
src/pages/homepage/components/cardWrap.vue

@@ -190,7 +190,7 @@ export default {
190 190
           path: "/searchPage",
191 191
           query: {
192 192
             searchword: this.searchWords,
193
-            pageType: pageType ? pageType : 'all'
193
+            pageType: pageType ? pageType : 'all' // 搜索页使用的
194 194
           }
195 195
         });
196 196
       },

+ 4 - 2
src/pages/homepage/components/entityDetail.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="entity-detail">
3 3
     <el-card v-loading="loading">
4
-      <div class="back-button">
4
+      <div class="back-button" @click="handleReturn">
5 5
         <img :src="backIcon" alt="">
6 6
         返回
7 7
       </div>
@@ -68,7 +68,6 @@
68 68
 </template>
69 69
 
70 70
 <script>
71
-import axios from "axios";
72 71
 import api from "@/api/homepage/entityDetail.js";
73 72
 import data from './entityDetailData'
74 73
 import collectPentacle from '@/assets/image/entityDetail/u1517.svg'
@@ -251,6 +250,9 @@ export default {
251 250
           this.$message(res.message)
252 251
         }
253 252
       })
253
+    },
254
+    handleReturn() {
255
+      this.$router.go(-1)
254 256
     }
255 257
   }
256 258
 };

+ 26 - 59
src/pages/homepage/components/searchPage.vue

@@ -1,4 +1,4 @@
1
-// 详情
1
+// 搜索
2 2
 <template>
3 3
   <div class="detailPage">
4 4
     <div class="search-card">
@@ -21,41 +21,18 @@
21 21
           </div>
22 22
           <div class="list-wrap">
23 23
             <div v-if="pageType === 'collect'" ><el-button :type="'primary'" @click="batchCancelCollect" size="small">批量取消收藏</el-button></div>
24
-            <div v-if="pageType === 'background'">
25
-              <el-button :type="'primary'" @click="batchListing" size="small">批量上架</el-button>
26
-              <el-button :type="'primary'" @click="batchOffShelf" size="small">批量下架</el-button>
27
-            </div>
28 24
             <div :class="getCardClass()" v-for="(item, idx) in list" :key="idx" @click="jumpToDetailPage(item.id)">
29 25
               <!-- 主题库和专题库块 -->
30 26
               <div v-if="activeName === 'first' || activeName === 'second'" class="title title-block clearfix">
31 27
                 <p class="left">
32 28
                   <span  @click.stop="">
33
-                    <el-checkbox v-if="pageType === 'collect' || pageType === 'background'" class="checkbox" v-model="item.checked" @change="(e) => checkboxChange(e, item.id)"></el-checkbox>
29
+                    <el-checkbox v-if="pageType === 'collect'" class="checkbox" v-model="item.checked" @change="(e) => checkboxChange(e, item.id)"></el-checkbox>
34 30
                   </span>
35 31
                   <img src="../../../assets/image/u652.svg" alt="">
36 32
                   实体名称:{{item.logicTbName}}
37 33
                 </p>
38 34
                 <div class="right">
39
-                  <span v-if="item.isListing" class="right-item">
40
-                    <img src="../../../assets/image/u1723.png" alt="">
41
-                    已上架
42
-                  </span>
43
-                  <span @click.stop="">
44
-                    <span v-if="!item.isListing" class="active right-item"  @click="handleUp(item.id)">
45
-                      <img src="../../../assets/image/u1723.png" alt="">
46
-                      上架
47
-                    </span>
48
-                  </span>
49
-                  <span v-if="!item.isListing"  class="right-item">
50
-                    <img src="../../../assets/image/u1720.png" alt="">
51
-                    已下架
52
-                  </span>
53
-                  <span @click.stop="">
54
-                    <span v-if="item.isListing" class="active right-item" @click="handleDown(item.id)">
55
-                      <img src="../../../assets/image/u1720.png" alt="">
56
-                      下架
57
-                    </span>
58
-                  </span>
35
+                  <img src="../../../assets/image/u9765.svg" alt="">
59 36
                 </div>
60 37
               </div>
61 38
               <el-row v-if="activeName === 'first' || activeName === 'second'" style="color: rgb(91,91,91);line-height: 40px;">
@@ -72,7 +49,7 @@
72 49
               <!-- 指标编码块 -->
73 50
               <p v-if="activeName === 'third'" class="title">
74 51
                 <span  @click.stop="">
75
-                  <el-checkbox v-if="pageType === 'collect' || pageType === 'background'" class="checkbox" v-model="item.checked" @click.stop="" @change="(e) => checkboxChange(e, item.id)"></el-checkbox>
52
+                  <el-checkbox v-if="pageType === 'collect'" class="checkbox" v-model="item.checked" @click.stop="" @change="(e) => checkboxChange(e, item.id)"></el-checkbox>
76 53
                 </span>
77 54
                 <img src="../../../assets/image/u652.svg" alt="">
78 55
                 指标名称:{{item.logicTbName}}
@@ -98,7 +75,7 @@
98 75
               <!-- 服务块 -->
99 76
               <p v-if="activeName === 'fourth'" class="title">
100 77
                 <span  @click.stop="">
101
-                  <el-checkbox v-if="pageType === 'collect' || pageType === 'background'"  class="checkbox" v-model="item.checked" @click.stop="" @change="(e) => checkboxChange(e, item.id)"></el-checkbox>
78
+                  <el-checkbox v-if="pageType === 'collect'"  class="checkbox" v-model="item.checked" @click.stop="" @change="(e) => checkboxChange(e, item.id)"></el-checkbox>
102 79
                 </span>
103 80
                 <img src="../../../assets/image/u652.svg" alt="">
104 81
                 {{ serviceType === 'API' ? '序号:' : 'Topic名称:'}}{{item.logicTbName}}
@@ -226,8 +203,7 @@ export default {
226 203
           apiDesc: 'degegwgwgwg',
227 204
           useDepart: '部门XXX',
228 205
           sysName: 'app-tfs',
229
-          desc: '暂无',
230
-          isListing: true
206
+          desc: '暂无'
231 207
         },
232 208
         {
233 209
           id: '222',
@@ -240,8 +216,7 @@ export default {
240 216
           apiDesc: 'degegwgwgwg',
241 217
           useDepart: '部门XXX',
242 218
           sysName: 'app-tfs',
243
-          desc: '暂无',
244
-          isListing: false
219
+          desc: '暂无'
245 220
         },
246 221
         {
247 222
           id: '333',
@@ -254,8 +229,7 @@ export default {
254 229
           apiDesc: 'degegwgwgwg',
255 230
           useDepart: '部门XXX',
256 231
           sysName: 'app-tfs',
257
-          desc: '暂无',
258
-          isListing: true
232
+          desc: '暂无'
259 233
         },
260 234
         {
261 235
           id: '444',
@@ -268,8 +242,7 @@ export default {
268 242
           apiDesc: 'degegwgwgwg',
269 243
           useDepart: '部门XXX',
270 244
           sysName: 'app-tfs',
271
-          desc: '暂无',
272
-          isListing: true
245
+          desc: '暂无'
273 246
         },
274 247
         {
275 248
           id: '555',
@@ -282,15 +255,14 @@ export default {
282 255
           apiDesc: 'degegwgwgwg',
283 256
           useDepart: '部门XXX',
284 257
           sysName: 'app-tfs',
285
-          desc: '暂无',
286
-          isListing: true
258
+          desc: '暂无'
287 259
         },
288 260
       ],
289 261
       currentPage: 1,
290 262
       pageSize: 5,
291 263
       total: 1000,
292 264
       serviceType: 'API', // API-API服务,MQ-消息队列
293
-      pageType: this.$route.query.pageType || 'all', // all-全量搜索,theme-只有主题库搜索,topic-只有专题库搜索,index-只有指标搜索,service-只有服务搜索,collect-我的收藏全量搜索,background-后台管理搜索
265
+      pageType: this.$route.query.pageType || 'all', // all-全量搜索,theme-只有主题库搜索,topic-只有专题库搜索,index-只有指标搜索,service-只有服务搜索,collect-我的收藏全量搜索
294 266
     };
295 267
   },
296 268
   created() {},
@@ -311,11 +283,22 @@ export default {
311 283
       console.log(`当前页: ${val}`);
312 284
     },
313 285
     jumpToDetailPage(id) {
286
+      let type = 'theme'
287
+      if (this.activeName === 'second') {
288
+        type = 'special'
289
+      }
290
+      if (this.activeName === 'third') {
291
+        type = 'target'
292
+      }
293
+      if (this.activeName === 'fourth') {
294
+        type = this.serviceType === 'API' ? 'api' : 'message'
295
+      }
314 296
       this.$router.push({
315 297
         name: "entityDetail",
316 298
         path: "/entityDetail",
317 299
         query: {
318
-          id: id
300
+          id: id,
301
+          type
319 302
         }
320 303
       });
321 304
     },
@@ -336,10 +319,6 @@ export default {
336 319
     batchCancelCollect() {
337 320
 
338 321
     },
339
-    // 批量上架
340
-    batchListing() {},
341
-    // 批量下架
342
-    batchOffShelf() {},
343 322
     checkboxChange(e, id) {
344 323
       console.log('e', e, 'id', id)
345 324
     },
@@ -404,21 +383,9 @@ export default {
404 383
           }
405 384
           .right{
406 385
             float: right;
407
-            font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
408
-            font-weight: 400;
409
-            color: #666666;
410
-            font-size: 14px;
411
-            .right-item{
412
-              img{
413
-                width: 24px;
414
-                height: 21px;
415
-                vertical-align: middle;
416
-              }
417
-              margin-right: 10px;
418
-            }
419
-            .active{
420
-              color: #0000FF;
421
-              z-index: 10;
386
+            img{
387
+              width: 47px;
388
+              height: 26px;
422 389
             }
423 390
           }
424 391
         }

+ 323 - 285
src/pages/index/components/entityDetail.vue

@@ -1,324 +1,362 @@
1 1
 <template>
2
-  <div class="articleDetail">
2
+  <div class="entity-detail">
3 3
     <el-card v-loading="loading">
4
-      <h3 class="first">{{ articleInfo.title }}</h3>
5
-      <!-- <el-divider></el-divider> -->
6
-      <p class="second">
7
-        <span
8
-          >主题分类:<i class="second-content">{{
9
-            articleInfo.classify
10
-          }}</i></span
11
-        >
12
-        <span
13
-          >办文单位:<i class="second-content">{{ articleInfo.unit }}</i></span
14
-        >
15
-        <span v-if="articleInfo.contentNum"
16
-          >文号:<i class="second-content">{{ articleInfo.contentNum }}</i></span
17
-        >
18
-      </p>
19
-      <!-- <el-divider></el-divider> -->
20
-      <div class="third">
21
-        <p class="third-top" v-if="articleInfo.source">
22
-          <span>来源:{{ articleInfo.source }}</span>
23
-        </p>
24
-        <!-- 文本类型显示具体内容 -->
25
-        <div class="content" v-if="articleInfo.type === false">
26
-          <div v-html="articleInfo.content"></div>
27
-        </div>
28
-        <!-- 文件类型显示文件名字 -->
29
-        <div v-if="articleInfo.type === true" class="file-type">
30
-          <div
31
-            v-for="item in articleInfo.fileList"
32
-            :key="item.id"
33
-            class="file-list"
34
-          >
35
-            <el-row style="display: flex;align-items: center;">
36
-              <el-col :span="6" class="file_name">
37
-                <el-tooltip effect="dark" :disabled="isShowTooltip" :content="item.fileName"
38
-                            placement="bottom">
39
-                <p class="over_flow" @mouseover="onMouseOver(item.id)">
40
-                  <span
41
-                  class="file_wrap"
42
-                  v-if="item.suffix === 'png' || item.suffix === 'pdf'"
43
-                  @click="previewFile(item)"
44
-                  :ref="item.id"
45
-                  >{{ item.fileName }}</span
46
-                  >
47
-                  <span v-else :ref="item.id">{{ item.fileName }}</span>
48
-                </p>
49
-                </el-tooltip>
50
-              </el-col>
51
-              <el-col :span="8" style="margin-left: 10px;">
52
-                <el-button
53
-                  size="mini"
54
-                  @click="downloadFile(item)"
55
-                  :disabled="!item.download"
56
-                  >下载</el-button
57
-                >
58
-              </el-col>
59
-            </el-row>
60
-            <!-- png,pdf格式的文件可在浏览器预览 -->
4
+      <div class="back-button" @click="handleReturn">
5
+        <img :src="backIcon" alt="">
6
+        返回
7
+      </div>
8
+      <div class="basic-info">
9
+        <div class="basic-info-content" v-for="(item, index) in basicInfo" :key="index">
10
+          <div class="basic-info-title">
11
+            <div class="left">{{ item.title }}</div>
12
+            <div class="right">
13
+              <span v-if="item.isListing" class="right-item">
14
+                <img src="../../../assets/image/u1723.png" alt="">
15
+                已上架
16
+              </span>
17
+              <span @click.stop="">
18
+                <span v-if="!item.isListing" class="active right-item"  @click="handleUp(item.id)">
19
+                  <img src="../../../assets/image/u1723.png" alt="">
20
+                  上架
21
+                </span>
22
+              </span>
23
+              <span v-if="!item.isListing"  class="right-item">
24
+                <img src="../../../assets/image/u1720.png" alt="">
25
+                已下架
26
+              </span>
27
+              <span @click.stop="">
28
+                <span v-if="item.isListing" class="active right-item" @click="handleDown(item.id)">
29
+                  <img src="../../../assets/image/u1720.png" alt="">
30
+                  下架
31
+                </span>
32
+              </span>
33
+            </div>
61 34
           </div>
35
+          <el-row :gutter="20">
36
+            <el-col :span="12" v-for="(cItem, cIndex) in item.content" :key="cIndex">
37
+              <div class="basic-info-item">
38
+                <div class="basic-info-label">{{ cItem.label }}:</div>
39
+                <div class="bacis-info-value">
40
+                  <template v-if="cItem.key === 'resultNormalSample'">
41
+                    <el-input type="textarea" :value="renderBasicValue(cItem.key)" disabled rows="6"
42
+                      :resize="false"></el-input>
43
+                  </template>
44
+                  <template v-else>
45
+                    {{ renderBasicValue(cItem.key) }}
46
+                  </template>
47
+                </div>
48
+              </div>
49
+            </el-col>
50
+          </el-row>
62 51
         </div>
63 52
       </div>
64
-      <!-- 文本类型显示附件 -->
65
-      <div
66
-        class="forth"
67
-        v-if="
68
-          articleInfo.type === false &&
69
-            articleInfo.fileList &&
70
-            articleInfo.fileList.length > 0
71
-        "
72
-      >
73
-        <el-row>
74
-          <el-col :span="2">附件:</el-col>
75
-          <el-col :span="20">
76
-            <div
77
-              v-for="item in articleInfo.fileList"
78
-              :key="item.id"
79
-              class="file-list"
80
-            >
81
-              <!-- png,pdf格式的文件可在浏览器预览 -->
82
-              <el-row>
83
-                <el-col :span="10" class="file_name">
84
-                  <el-tooltip effect="dark" :disabled="isShowTooltip" :content="item.fileName"
85
-                            placement="bottom">
86
-                    <p class="over_flow" @mouseover="onMouseOver(item.id)">
87
-                      <span
88
-                    class="file_wrap"
89
-                    v-if="item.suffix === 'png' || item.suffix === 'pdf'"
90
-                    @click="previewFile(item)"
91
-                    :ref="item.id"
92
-                    >{{ item.fileName }}</span>
93
-                    <span v-else :ref="item.id">{{ item.fileName }}</span>
94
-                    </p>
95
-                  </el-tooltip>
96
-                </el-col>
97
-                <el-col :span="8">
98
-                  <el-button
99
-                    type="text"
100
-                    @click="downloadFile(item)"
101
-                    :disabled="!item.download"
102
-                    >下载</el-button
103
-                  >
104
-                </el-col>
105
-              </el-row>
106
-            </div>
107
-          </el-col>
108
-        </el-row>
53
+      <div class="table-wrapper" v-if="['theme', 'special', 'api', 'message'].includes(type)">
54
+        <div class="table-wrapper-title">
55
+          <span>{{ type === 'api' ? 'API请求参数列表' : '实体属性' }}</span>
56
+          <span v-if="type === 'theme' || type === 'special'">({{ tableData.length }})</span>
57
+        </div>
58
+        <div class="table-content">
59
+          <el-table :data="tableData">
60
+            <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
61
+              <template slot-scope="scope">
62
+                <span v-if="item.key === 'nameCh'" style="color: #0033FF;">{{ scope.row.nameCh }}</span>
63
+                <span v-else-if="item.key === 'accessPolicy'">{{ scope.row.accessPolicy === 'all' ? '发布+订阅' :
64
+                  scope.row.accessPolicy === 'pub' ? ' 发布' : '订阅' }}</span>
65
+                <span v-else>{{ scope.row[item.key] }}</span>
66
+              </template>
67
+            </el-table-column>
68
+          </el-table>
69
+          <div class="table-pagination">
70
+            <el-pagination layout="prev, pager, next" :total="total" @current-change="handlePageChange"
71
+              :current-page.sync="pageNum" :page-size.sync="pageSize">
72
+            </el-pagination>
73
+          </div>
74
+        </div>
109 75
       </div>
110 76
     </el-card>
111 77
   </div>
112 78
 </template>
113 79
 
114 80
 <script>
115
-import axios from "axios";
116
-import articleApi from "@/api/index/article.js";
81
+import api from "@/api/homepage/entityDetail.js";
82
+import data from './entityDetailData'
83
+import collectPentacle from '@/assets/image/entityDetail/u1517.svg'
84
+import unCollectPentacle from '@/assets/image/entityDetail/u3076.svg'
85
+import backIcon from '@/assets/image/entityDetail/u1522.png'
86
+
117 87
 export default {
118 88
   data() {
89
+    let baseInfo = {}
90
+    if (['theme', 'special'].includes(this.$route.query.type)) {
91
+      baseInfo = data.theme
92
+    } else {
93
+      baseInfo = data[this.$route.query.type]
94
+    }
119 95
     return {
120 96
       loading: false,
121 97
       articleInfo: {},
122
-      articleId: "",
123
-      isShowTooltip: true
98
+      id: this.$route.query.id,
99
+      type: this.$route.query.type, // theme: 主题库,special:专题库,target:指标,api:api服务,message:消息队列
100
+      basicInfo: baseInfo.basic || [],
101
+      columns: baseInfo.columns || [],
102
+      basicData: {},
103
+      tableData: [],
104
+      collectPentacle,
105
+      unCollectPentacle,
106
+      backIcon,
107
+      pageNum: 1,
108
+      pageSize: 10,
109
+      total: 0
124 110
     };
125 111
   },
126
-  watch: {
127
-    "$route.query.id": {
128
-      handler(val) {
129
-        document.documentElement.scrollTop = 0;
130
-        this.articleId = val;
131
-        this.getArticleInfo();
132
-      }
133
-    }
134
-  },
135
-  created() {
136
-    this.articleId = this.$route.query.id;
137
-    this.getArticleInfo();
112
+  watch: {},
113
+  mounted() {
114
+    this.getData()
138 115
   },
139
-  mounted() {},
140 116
   methods: {
141
-    getArticleInfo() {
142
-      this.loading = true;
143
-      articleApi
144
-        .detailIndexContent(this.articleId)
145
-        .then(res => {
146
-          if (res.success) {
147
-            this.articleInfo = res.data;
148
-          } else {
149
-            this.$message.error(res.message);
150
-          }
151
-          this.loading = false;
152
-        })
153
-        .catch(() => {
154
-          this.$message.error("请求获取文章详情接口异常");
155
-          this.loading = false;
156
-        });
117
+    getData() {
118
+      switch (this.type) {
119
+        case 'theme' || 'special':
120
+          this.getThemeData()
121
+          break;
122
+        case 'target':
123
+          this.getTargetData()
124
+          break;
125
+        case 'api':
126
+          this.getApiData()
127
+          break
128
+        case 'message':
129
+          this.getMessageData()
130
+          break
131
+        default:
132
+          break;
133
+      }
157 134
     },
158
-    // 预览文件
159
-    previewFile(file) {
160
-      // const url = `${this.baseUrl}/xyjc/index-files/download/${file.id}`;
161
-      // axios({
162
-      //   url: url
163
-      // })
164
-      //   .then(res => {
165
-      //     console.log(res);
166
-      //   })
167
-      //   .catch(() => {
168
-      //     this.$message.error("请求预览文件接口异常");
169
-      //   });
170
-      window.open(`${this.baseUrl}/xyjc/index-files/view/${file.id}`, "_blank");
171
-      // window.open(`${this.baseUrl}/file/${file.fileNewname}`, "_blank");
135
+    getThemeData() {
136
+      api.getThemeInfo({
137
+        id: this.id
138
+      }).then(res => {
139
+        this.basicData = res.data
140
+      })
141
+      this.getThemeTableData()
172 142
     },
173
-    // 下载文件
174
-    downloadFile(file) {
175
-      console.log(file);
176
-      const id = file.id;
177
-      const url = `${this.baseUrl}/xyjc/index-files/download/${id}`;
178
-      axios({
179
-        url: url,
180
-        headers: {
181
-          "content-type": "application/json"
182
-        },
183
-        responseType: "blob"
143
+    getThemeTableData() {
144
+      api.getThemeAttributesList({
145
+        tableModelId: this.id,
146
+        pageNum: this.pageNum,
147
+        pageSize: this.pageSize
148
+      }).then(res => {
149
+        this.tableData = res.data.records
150
+        this.total = res.data.total
184 151
       })
185
-        .then(res => {
186
-          if (res.status === 200) {
187
-            const data = res.data,
188
-              blob = new Blob([data]),
189
-              fileName = file.fileName;
190
-            if ("download" in document.createElement("a")) {
191
-              // 非IE下载
192
-              const elink = document.createElement("a");
193
-              elink.download = fileName;
194
-              elink.style.display = "none";
195
-              elink.href = URL.createObjectURL(blob);
196
-              document.body.appendChild(elink);
197
-              elink.click();
198
-              URL.revokeObjectURL(elink.href); // 释放URL 对象
199
-              document.body.removeChild(elink);
200
-            } else {
201
-              // IE10+下载
202
-              navigator.msSaveBlob(blob, fileName);
203
-            }
204
-          } else {
205
-            this.$message.error("下载异常");
206
-          }
207
-        })
208
-        .catch(() => {
209
-          this.$message.error("请求下载文件接口异常");
210
-        });
211 152
     },
212
-    onMouseOver(str) {
213
-            let parentWidth = this.$refs[str][0].parentNode.offsetWidth;
214
-            let contentWidth = this.$refs[str][0].offsetWidth;
215
-            // 判断是否开启tooltip功能
216
-            if (contentWidth > parentWidth) {
217
-                this.isShowTooltip = false;
218
-            } else {
219
-                this.isShowTooltip = true;
220
-            }
153
+    getTargetData() {
154
+      api.getIndexInfo({
155
+        id: this.id
156
+      }).then(res => {
157
+        this.basicData = res.data
158
+      })
159
+    },
160
+    getApiData() {
161
+      api.getApiInfo({
162
+        id: this.id
163
+      }).then(res => {
164
+        this.basicData = res.data
165
+      })
166
+      this.getApiTableData()
167
+    },
168
+    getApiTableData() {
169
+      api.getApiReqParamList({
170
+        apiId: this.id,
171
+        pageNum: this.pageNum,
172
+        pageSize: this.pageSize
173
+      }).then(res => {
174
+        this.tableData = res.data.records
175
+        this.total = res.data.total
176
+      })
177
+    },
178
+    getMessageData() {
179
+      api.getMqsInfo({
180
+        id: this.id
181
+      }).then(res => {
182
+        this.basicData = res.data
183
+      })
184
+      this.getMessageTableData()
185
+    },
186
+    getMessageTableData() {
187
+      api.getMqsPrivs({
188
+        mqsName: this.id,
189
+        pageNum: this.pageNum,
190
+        pageSize: this.pageSize
191
+      }).then(res => {
192
+        this.tableData = res.data.records
193
+        this.total = res.data.total
194
+      })
195
+    },
196
+    renderBasicValue(key) {
197
+      if (key === 'l1,l2,l3') {
198
+        let text = `主题域分组:${this.basicData.l1 || '暂无'}>主题域:${this.basicData.l2 || '暂无'}>业务对象:${this.basicData.l3 || '暂无'}`
199
+        return text
200
+      }
201
+      if (key === 'authType') {
202
+        const value = this.basicData.authType
203
+        let text = '暂无'
204
+        switch (value) {
205
+          case 'NONE':
206
+            text = '无认证'
207
+            break;
208
+          case 'APP':
209
+            text = 'APP认证'
210
+            break;
211
+          case 'IAM':
212
+            text = 'IAM认证'
213
+            break;
214
+          case 'AUTHORIZER':
215
+            text = '自定义认证'
216
+            break;
217
+          default:
218
+            break
221 219
         }
220
+        return text
221
+      }
222
+      return this.basicData[key] || '暂无'
223
+    },
224
+    handlePageChange() {
225
+      switch (this.type) {
226
+        case 'theme' || 'special':
227
+          this.getThemeTableData()
228
+          break
229
+        case 'api':
230
+          this.getApiTableData()
231
+          break
232
+        case 'message':
233
+          this.getMessageTableData()
234
+          break
235
+        default:
236
+          break
237
+      }
238
+    },
239
+    handleReturn() {
240
+      this.$router.go(-1)
241
+    },
242
+    handleDown() {
243
+      console.log('down')
244
+    },
245
+    handleUp() {
246
+      console.log('up')
247
+    }
222 248
   }
223 249
 };
224 250
 </script>
225 251
 
226 252
 <style lang="scss" scoped>
227
-.articleDetail {
228
-  font-size: 16px;
229
-  color: #333;
230
-  .first {
231
-    text-align: center;
232
-    font-size: 28px;
233
-    font-family: "PingFangSC-Regular", "PingFang SC";
234
-    font-weight: normal;
235
-    padding: 10px 0;
253
+.back-button {
254
+  padding: 10px;
255
+  cursor: pointer;
256
+  border: 1px solid #333;
257
+  width: fit-content;
258
+  margin-bottom: 10px;
259
+  display: flex;
260
+  align-items: center;
261
+
262
+  img {
263
+    height: 20px;
236 264
   }
237
-  // .el-divider {
238
-  //   margin: 15px 0;
239
-  // }
240
-  .second {
241
-    border-top: 1px solid #e4e4e4;
242
-    border-bottom: 1px solid #e4e4e4;
243
-    padding: 20px 0 40px;
244
-    font-size: 16px;
245
-    display: flex;
246
-    justify-content: space-between;
247
-    color: #333;
248
-    .second-content {
249
-      color: #666;
250
-      font-style: normal;
251
-    }
265
+}
266
+
267
+.basic-info {
268
+  position: relative;
269
+  border: 1px solid #e4e4e4;
270
+  padding: 20px;
271
+}
272
+
273
+.basic-info-title {
274
+  font-size: 20px;
275
+  color: #333;
276
+  font-weight: 700;
277
+  margin-bottom: 10px;
278
+  margin-top: 10px;
279
+  .left{
280
+    float: left;
252 281
   }
253
-  .third {
254
-    border-bottom: 1px solid #e4e4e4;
255
-    padding-bottom: 20px;
256
-    .third-top {
257
-      padding-top: 20px;
258
-      font-size: 16px;
259
-    }
260
-    /deep/ .content {
261
-      margin-top: 25px;
262
-      // .title {
263
-      //   text-align: center;
264
-      //   font-size: 18px;
265
-      //   margin-bottom: 20px;
266
-      //   font-weight: normal;
267
-      // }
268
-      img {
269
-        max-width: 100%;
270
-      }
271
-      video {
272
-        width: 100%;
282
+  .right{
283
+    float: right;
284
+    font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
285
+    font-weight: 400;
286
+    color: #666666;
287
+    font-size: 14px;
288
+    .right-item{
289
+      img{
290
+        width: 24px;
291
+        height: 21px;
292
+        vertical-align: middle;
273 293
       }
294
+      margin-right: 10px;
274 295
     }
275
-    .file-type {
276
-      margin-top: 30px;
277
-      .file-list {
278
-        margin-left: 20px;
279
-        .file_wrap {
280
-          text-decoration: underline;
281
-          color: #0170f0;
282
-        }
283
-        .download {
284
-          margin-left: 15px;
285
-        }
286
-        .file_wrap:hover {
287
-          cursor: pointer;
288
-        }
289
-        .over_flow {
290
-            white-space: nowrap;
291
-            overflow: hidden;
292
-            text-overflow: ellipsis;
293
-        }
294
-      }
296
+    .active{
297
+      color: #0000FF;
298
+      z-index: 10;
295 299
     }
296 300
   }
297
-  .forth {
298
-    line-height: 30px;
299
-    padding: 20px 0 30px;
300
-    .file-list {
301
-      .file_wrap {
302
-        text-decoration: underline;
303
-        color: #0170f0;
304
-      }
305
-      .download {
306
-        margin-left: 15px;
307
-      }
308
-      .file_wrap:hover {
309
-        cursor: pointer;
310
-      }
311
-      // .file_name {
312
-      //   white-space: nowrap;
313
-      //   overflow: hidden;
314
-      //   text-overflow: ellipsis;
315
-      // }
316
-      .over_flow {
317
-        white-space: nowrap;
318
-        overflow: hidden;
319
-        text-overflow: ellipsis;
320
-      }
321
-    }
301
+}
302
+
303
+.collect-button {
304
+  display: flex;
305
+  position: absolute;
306
+  right: 20px;
307
+  top: 20px;
308
+  align-items: center;
309
+  cursor: pointer;
310
+}
311
+
312
+.basic-info-item {
313
+  display: flex;
314
+  align-items: center;
315
+  font-size: 20px;
316
+  color: #333;
317
+}
318
+
319
+.basic-info-label {
320
+  white-space: nowrap;
321
+}
322
+
323
+.bacis-info-value {
324
+  flex: 1;
325
+}
326
+
327
+.table-wrapper-title {
328
+  font-size: 20px;
329
+  padding: 20px;
330
+  border: 1px solid #e4e4e4;
331
+  display: flex;
332
+
333
+  span {
334
+    border-bottom: 2px solid #0066ff;
335
+  }
336
+}
337
+
338
+.table-content {
339
+  border: 1px solid #e4e4e4;
340
+  padding: 20px;
341
+}
342
+
343
+.table-pagination {
344
+  display: flex;
345
+  flex-direction: row-reverse;
346
+}
347
+
348
+/deep/ .el-table th.el-table__cell {
349
+  background-color: #f2f2f2;
350
+}
351
+
352
+/deep/ .el-table {
353
+  font-size: 24px;
354
+}
355
+.clearfix{
356
+  &:after {
357
+    content: "";
358
+    display: table;
359
+    clear: both;
322 360
   }
323 361
 }
324 362
 </style>

+ 271 - 0
src/pages/index/components/entityDetailData.js

@@ -0,0 +1,271 @@
1
+export default {
2
+    theme: {
3
+      basic: [
4
+        {
5
+          title: '基本信息',
6
+          content: [
7
+            {
8
+              label: '实体名称',
9
+              key: 'logicTbName'
10
+            },
11
+            {
12
+              label: '创建人',
13
+              key: 'createBy'
14
+            },
15
+            {
16
+              label: '表英文名称',
17
+              key: 'tbName'
18
+            },
19
+            {
20
+              label: '创建时间',
21
+              key: 'createTime'
22
+            },
23
+            {
24
+              label: '所属主题',
25
+              key: 'l1,l2,l3'
26
+            },
27
+            {
28
+              label: '描述',
29
+              key: 'description'
30
+            },
31
+            {
32
+              label: '逻辑实体编码',
33
+              key: 'code'
34
+            },
35
+            {
36
+              label: '逻辑实体类型',
37
+              key: 'tableType'
38
+            },
39
+          ]
40
+        }
41
+      ],
42
+      columns: [
43
+        {
44
+          label: '字段名',
45
+          key: 'nameCh'
46
+        },
47
+        {
48
+          label: '英文名称',
49
+          key: 'nameEn'
50
+        },
51
+        {
52
+          label: '数据类型',
53
+          key: 'dataType'
54
+        },
55
+        {
56
+          label: '编码',
57
+          key: 'code'
58
+        },
59
+        {
60
+          label: '描述',
61
+          key: 'description'
62
+        }
63
+      ]
64
+    },
65
+    target: {
66
+      basic: [
67
+        {
68
+          title: '基本信息',
69
+          content: [
70
+            {
71
+              label: '标准名称',
72
+              key: 'name'
73
+            },
74
+            {
75
+              label: '指标定义',
76
+              key: 'definition'
77
+            },
78
+            {
79
+              label: '标准编码',
80
+              key: 'code'
81
+            },
82
+            {
83
+              label: '备注',
84
+              key: 'remark'
85
+            },
86
+            {
87
+              label: '标准别名',
88
+              key: 'nameAlias'
89
+            },
90
+            {
91
+              label: '创建时间',
92
+              key: 'createTime'
93
+            },
94
+            {
95
+              label: '归属的流程架构路径/所属目录',
96
+              key: 'l1,l2,l3'
97
+            },
98
+            {
99
+              label: '修改时间',
100
+              key: 'updateTime'
101
+            },
102
+            {
103
+              label: '设置目的',
104
+              key: 'destination'
105
+            },
106
+            {
107
+              label: '审核时间',
108
+              key: 'approvalTime'
109
+            },
110
+          ]
111
+        },
112
+        {
113
+          title: '数据信息',
114
+          content: [
115
+            {
116
+              label: '计算公式',
117
+              key: 'expression'
118
+            },
119
+            {
120
+              label: '刷新频率',
121
+              key: 'intervalType'
122
+            },
123
+            {
124
+              label: '统计周期',
125
+              key: 'timeFilters'
126
+            },
127
+            {
128
+              label: '度量对象',
129
+              key: 'measure'
130
+            },
131
+            {
132
+              label: '统计维度',
133
+              key: 'dimensions'
134
+            },
135
+            {
136
+              label: '关联技术指标',
137
+              key: 'technicalMetricName'
138
+            },
139
+            {
140
+              label: '统计口径和修饰词',
141
+              key: 'generalFilters'
142
+            },
143
+            {
144
+              label: '计量单位',
145
+              key: 'unit'
146
+            },
147
+          ]
148
+        },
149
+        {
150
+          title: '管理信息',
151
+          content: [
152
+            {
153
+              label: '数据来源',
154
+              key: 'dataOrigin'
155
+            },
156
+            {
157
+              label: '指标管理部门',
158
+              key: 'ownerDepartment'
159
+            },
160
+            {
161
+              label: '指标责任人',
162
+              key: 'owner'
163
+            },
164
+          ]
165
+        }
166
+      ]
167
+    },
168
+    api: {
169
+      basic: [
170
+        {
171
+          title: '服务标题',
172
+          content: [
173
+            {
174
+              label: 'API名称',
175
+              key: 'name'
176
+            },
177
+            {
178
+              label: '是否支持跨域',
179
+              key: 'cors'
180
+            },
181
+            {
182
+              label: 'API url',
183
+              key: 'url'
184
+            },
185
+            {
186
+              label: '成功响应示例',
187
+              key: 'resultNormalSample'
188
+            },
189
+            {
190
+              label: 'API的请求方式',
191
+              key: 'reqMethod'
192
+            },
193
+            {
194
+              label: 'API的认证方式',
195
+              key: 'authType'
196
+            },
197
+            {
198
+              label: '使用系统',
199
+              key: 'useDept'
200
+            },
201
+          ]
202
+        }
203
+      ],
204
+      columns: [
205
+        {
206
+          label: '参数名称',
207
+          key: 'name'
208
+        },
209
+        {
210
+          label: '参数类型',
211
+          key: 'type'
212
+        },
213
+        {
214
+          label: '参数位置',
215
+          key: 'location'
216
+        },
217
+        {
218
+          label: '描述信息',
219
+          key: 'remark'
220
+        },
221
+        {
222
+          label: '是否必须',
223
+          key: 'required'
224
+        }
225
+      ]
226
+    },
227
+    message: {
228
+      basic: [
229
+        {
230
+          title: '基础信息',
231
+          content: [
232
+            {
233
+              label: 'Topic名称',
234
+              key: 'name'
235
+            },
236
+            {
237
+              label: '老化时间(小时)',
238
+              key: 'retentionTime'
239
+            },
240
+            {
241
+              label: '集成应用数',
242
+              key: 'appNum'
243
+            },
244
+            {
245
+              label: '描述',
246
+              key: 'description'
247
+            },
248
+            {
249
+              label: 'topic分区数',
250
+              key: 'partitions'
251
+            },
252
+            {
253
+              label: '副本数',
254
+              key: 'replication'
255
+            },
256
+          ]
257
+        }
258
+      ],
259
+      columns: [
260
+        {
261
+          label: '集成应用',
262
+          key: 'appName'
263
+        },
264
+        {
265
+          label: '权限',
266
+          key: 'accessPolicy'
267
+        },
268
+      ]
269
+    }
270
+  }
271
+  

+ 428 - 18
src/pages/index/components/searchPage.vue

@@ -1,41 +1,451 @@
1
-// 详情
1
+// 搜索
2 2
 <template>
3 3
   <div class="detailPage">
4
-    <div class="left">
5
-      <!-- 左侧列表 -->
6
-      <article-detail></article-detail>
4
+    <div class="search-card">
5
+      <el-input class="input-wrapper" v-model="searchWords" placeholder="请输入关键字">
6
+        <el-button slot="append" class="searchbtn" @click="handleSearch">
7
+          <img src="../../../../static/homepage/u432.svg" alt="">
8
+        </el-button>
9
+      </el-input>
7 10
     </div>
11
+    <el-tabs class="bottom-card" v-model="activeName" @tab-click="handleClick">
12
+      <el-tab-pane :key="item.id" v-for="item in tabList" :label="item.name" :name="item.id">
13
+        <div class="flex">
14
+          <div class="tree-wrap">
15
+            <el-button-group v-if="activeName === 'fourth'">
16
+              <el-button :type="serviceType === 'API' ? 'primary' : ''" @click="serviceType = 'API'" size="small">API服务</el-button>
17
+              <el-button :type="serviceType === 'MQ' ? 'primary' : ''" @click="serviceType = 'MQ'" size="small">消息队列</el-button>
18
+            </el-button-group>
19
+            <div>{{item.name}}</div>
20
+            <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
21
+          </div>
22
+          <div class="list-wrap">
23
+            <div>
24
+              <el-button :type="'primary'" @click="batchListing" size="small">批量上架</el-button>
25
+              <el-button :type="'primary'" @click="batchOffShelf" size="small">批量下架</el-button>
26
+            </div>
27
+            <div :class="getCardClass()" v-for="(item, idx) in list" :key="idx" @click="jumpToDetailPage(item.id)">
28
+              <!-- 主题库和专题库块 -->
29
+              <div v-if="activeName === 'first' || activeName === 'second'" class="title title-block clearfix">
30
+                <p class="left">
31
+                  <span  @click.stop="">
32
+                    <el-checkbox class="checkbox" v-model="item.checked" @change="(e) => checkboxChange(e, item.id)"></el-checkbox>
33
+                  </span>
34
+                  <img src="../../../assets/image/u652.svg" alt="">
35
+                  实体名称:{{item.logicTbName}}
36
+                </p>
37
+                <div class="right">
38
+                  <span v-if="item.isListing" class="right-item">
39
+                    <img src="../../../assets/image/u1723.png" alt="">
40
+                    已上架
41
+                  </span>
42
+                  <span @click.stop="">
43
+                    <span v-if="!item.isListing" class="active right-item"  @click="handleUp(item.id)">
44
+                      <img src="../../../assets/image/u1723.png" alt="">
45
+                      上架
46
+                    </span>
47
+                  </span>
48
+                  <span v-if="!item.isListing"  class="right-item">
49
+                    <img src="../../../assets/image/u1720.png" alt="">
50
+                    已下架
51
+                  </span>
52
+                  <span @click.stop="">
53
+                    <span v-if="item.isListing" class="active right-item" @click="handleDown(item.id)">
54
+                      <img src="../../../assets/image/u1720.png" alt="">
55
+                      下架
56
+                    </span>
57
+                  </span>
58
+                </div>
59
+              </div>
60
+              <el-row v-if="activeName === 'first' || activeName === 'second'" style="color: rgb(91,91,91);line-height: 40px;">
61
+                <el-col :span="12">
62
+                  英文名称:{{item.tbName}}
63
+                </el-col>
64
+                <el-col :span="12">
65
+                  更新时间:{{item.updateTime}}
66
+                </el-col>
67
+                <el-col :span="12">
68
+                  所属主题:{{item.topic}}
69
+                </el-col>
70
+              </el-row>
71
+              <!-- 指标编码块 -->
72
+              <p v-if="activeName === 'third'" class="title">
73
+                <span  @click.stop="">
74
+                  <el-checkbox class="checkbox" v-model="item.checked" @click.stop="" @change="(e) => checkboxChange(e, item.id)"></el-checkbox>
75
+                </span>
76
+                <img src="../../../assets/image/u652.svg" alt="">
77
+                指标名称:{{item.logicTbName}}
78
+              </p>
79
+              <el-row v-if="activeName === 'third'" style="color: rgb(91,91,91);line-height: 40px;">
80
+                <el-col :span="12">
81
+                  所属目录:{{item.tbName}}
82
+                </el-col>
83
+                <el-col :span="12">
84
+                  更新时间:{{item.updateTime}}
85
+                </el-col>
86
+              </el-row>
87
+              <el-row v-if="activeName === 'third'" style="color: rgb(91,91,91);line-height: 40px;">
88
+                <el-col :span="12">
89
+                  所属部门:{{item.depart}}
90
+                </el-col>
91
+              </el-row>
92
+              <el-row v-if="activeName === 'third'" style="color: rgb(91,91,91);line-height: 40px;">
93
+                <el-col :span="12">
94
+                  指标编码:{{item.indexCode}}
95
+                </el-col>
96
+              </el-row>
97
+              <!-- 服务块 -->
98
+              <p v-if="activeName === 'fourth'" class="title">
99
+                <span  @click.stop="">
100
+                  <el-checkbox class="checkbox" v-model="item.checked" @click.stop="" @change="(e) => checkboxChange(e, item.id)"></el-checkbox>
101
+                </span>
102
+                <img src="../../../assets/image/u652.svg" alt="">
103
+                {{ serviceType === 'API' ? '序号:' : 'Topic名称:'}}{{item.logicTbName}}
104
+              </p>
105
+              <el-row v-if="activeName === 'fourth'" style="color: rgb(91,91,91);line-height: 40px;">
106
+                <el-col :span="12">
107
+                  {{ serviceType === 'API' ? 'API名称:' : '集成应用:'}}{{item.tbName}}
108
+                </el-col>
109
+                <el-col :span="12">
110
+                  {{ serviceType === 'API' ? '更新时间:' : '提供部门:'}}{{item.updateTime}}
111
+                </el-col>
112
+              </el-row>
113
+              <el-row v-if="activeName === 'fourth'" style="color: rgb(91,91,91);line-height: 40px;">
114
+                <el-col :span="12">
115
+                  {{ serviceType === 'API' ? 'API描述:' : 'topic分区数:'}}{{item.apiDesc}}
116
+                </el-col>
117
+                <el-col :span="12">
118
+                  {{ serviceType === 'API' ? '提供部门:' : '使用部门:'}}{{item.depart}}
119
+                </el-col>
120
+              </el-row>
121
+              <el-row v-if="activeName === 'fourth'" style="color: rgb(91,91,91);line-height: 40px;">
122
+                <el-col :span="12">
123
+                  {{ serviceType === 'API' ? '服务归属系统名称:' : '副本数:'}}{{item.sysName}}
124
+                </el-col>
125
+                <el-col :span="12">
126
+                  {{ serviceType === 'API' ? '使用部门:' : '老化时间(小时):'}}{{item.useDepart}}
127
+                </el-col>
128
+              </el-row>
129
+              <el-row v-if="activeName === 'fourth' && serviceType === 'MQ'" style="color: rgb(91,91,91);line-height: 40px;">
130
+                <el-col :span="12">
131
+                  描述:{{item.desc}}
132
+                </el-col>
133
+              </el-row>
134
+            </div>
135
+            <el-pagination
136
+              style="float: right;margin-bottom: 10px;"
137
+              @size-change="handleSizeChange"
138
+              @current-change="handleCurrentChange"
139
+              :current-page.sync="currentPage"
140
+              :page-size="pageSize"
141
+              layout="total, prev, pager, next"
142
+              :total="total">
143
+            </el-pagination>
144
+            <div style="clear: both;"></div>
145
+          </div>
146
+        </div>
147
+      </el-tab-pane>
148
+    </el-tabs>
8 149
   </div>
9 150
 </template>
10 151
 
11 152
 <script>
12
-import articleDetail from "./entityDetail.vue";
13 153
 export default {
14
-  components: {
15
-    articleDetail,
16
-  },
17 154
   data() {
18
-    return {};
155
+    return {
156
+      activeName: 'first',
157
+      searchWords: this.$route.query.searchword || '',
158
+      tabList: [
159
+        {
160
+          name: '主题库',
161
+          id: 'first',
162
+          num: 0
163
+        },
164
+        {
165
+          name: '专题库',
166
+          id: 'second',
167
+          num: 0},
168
+        {
169
+          name: '指标',
170
+          id: 'third',
171
+          num: 0},
172
+        {
173
+          name: '服务',
174
+          id: 'fourth',
175
+          num: 0}
176
+      ],
177
+      data: [{
178
+        label: '一级 1',
179
+        children: [{
180
+          label: '二级 1-1',
181
+          children: [{
182
+            label: '三级 1-1-1'
183
+          }]
184
+        }]
185
+      }, {
186
+        label: '一级 2',
187
+        children: [{
188
+          label: '二级 2-1',
189
+          children: [{
190
+            label: '三级 2-1-1'
191
+          }]
192
+        }, {
193
+          label: '二级 2-2',
194
+          children: [{
195
+            label: '三级 2-2-1'
196
+          }]
197
+        }]
198
+      }, {
199
+        label: '一级 3',
200
+        children: [{
201
+          label: '二级 3-1',
202
+          children: [{
203
+            label: '三级 3-1-1'
204
+          }]
205
+        }, {
206
+          label: '二级 3-2',
207
+          children: [{
208
+            label: '三级 3-2-1'
209
+          }]
210
+        }]
211
+      }],
212
+      defaultProps: {
213
+        children: 'children',
214
+        label: 'label'
215
+      },
216
+      list: [
217
+        {
218
+          id: '111',
219
+          logicTbName: '周期性维护计划注销信息',
220
+          tbName: 'periodic_maintenance_plan_cancel',
221
+          updateTime: '2022-07-06 09:23:44',
222
+          topic: '人力资源管理',
223
+          indexCode: 'ZB001080',
224
+          depart: 'sunpu',
225
+          apiDesc: 'degegwgwgwg',
226
+          useDepart: '部门XXX',
227
+          sysName: 'app-tfs',
228
+          desc: '暂无',
229
+          isListing: true
230
+        },
231
+        {
232
+          id: '222',
233
+          logicTbName: '周期性维护计划注销信息',
234
+          tbName: 'periodic_maintenance_plan_cancel',
235
+          updateTime: '2022-07-06 09:23:44',
236
+          topic: '人力资源管理',
237
+          indexCode: 'ZB001080',
238
+          depart: 'sunpu',
239
+          apiDesc: 'degegwgwgwg',
240
+          useDepart: '部门XXX',
241
+          sysName: 'app-tfs',
242
+          desc: '暂无',
243
+          isListing: false
244
+        },
245
+        {
246
+          id: '333',
247
+          logicTbName: '周期性维护计划注销信息',
248
+          tbName: 'periodic_maintenance_plan_cancel',
249
+          updateTime: '2022-07-06 09:23:44',
250
+          topic: '人力资源管理',
251
+          indexCode: 'ZB001080',
252
+          depart: 'sunpu',
253
+          apiDesc: 'degegwgwgwg',
254
+          useDepart: '部门XXX',
255
+          sysName: 'app-tfs',
256
+          desc: '暂无',
257
+          isListing: true
258
+        },
259
+        {
260
+          id: '444',
261
+          logicTbName: '周期性维护计划注销信息',
262
+          tbName: 'periodic_maintenance_plan_cancel',
263
+          updateTime: '2022-07-06 09:23:44',
264
+          topic: '人力资源管理',
265
+          indexCode: 'ZB001080',
266
+          depart: 'sunpu',
267
+          apiDesc: 'degegwgwgwg',
268
+          useDepart: '部门XXX',
269
+          sysName: 'app-tfs',
270
+          desc: '暂无',
271
+          isListing: true
272
+        },
273
+        {
274
+          id: '555',
275
+          logicTbName: '周期性维护计划注销信息',
276
+          tbName: 'periodic_maintenance_plan_cancel',
277
+          updateTime: '2022-07-06 09:23:44',
278
+          topic: '人力资源管理',
279
+          indexCode: 'ZB001080',
280
+          depart: 'sunpu',
281
+          apiDesc: 'degegwgwgwg',
282
+          useDepart: '部门XXX',
283
+          sysName: 'app-tfs',
284
+          desc: '暂无',
285
+          isListing: true
286
+        },
287
+      ],
288
+      currentPage: 1,
289
+      pageSize: 5,
290
+      total: 1000,
291
+      serviceType: 'API', // API-API服务,MQ-消息队列
292
+      pageType: this.$route.query.pageType || 'all', // all-全量搜索,theme-只有主题库搜索,topic-只有专题库搜索,index-只有指标搜索,service-只有服务搜索,background-后台管理搜索
293
+    };
19 294
   },
20 295
   created() {},
21 296
   mounted() {
22 297
     document.documentElement.scrollTop = 0;
23 298
   },
24
-  methods: {}
299
+  methods: {
300
+    handleClick(tab, event) {
301
+      this.activeName = tab.name;
302
+    },
303
+    handleNodeClick(data) {
304
+      console.log(data);
305
+    },
306
+    handleSizeChange(val) {
307
+      console.log(`每页 ${val} 条`);
308
+    },
309
+    handleCurrentChange(val) {
310
+      console.log(`当前页: ${val}`);
311
+    },
312
+    jumpToDetailPage(id) {
313
+      let type = 'theme'
314
+      if (this.activeName === 'second') {
315
+        type = 'special'
316
+      }
317
+      if (this.activeName === 'third') {
318
+        type = 'target'
319
+      }
320
+      if (this.activeName === 'fourth') {
321
+        type = this.serviceType === 'API' ? 'api' : 'message'
322
+      }
323
+      this.$router.push({
324
+        name: "entityDetail",
325
+        path: "/entityDetail",
326
+        query: {
327
+          id: id,
328
+          type
329
+        }
330
+      });
331
+    },
332
+    handleSearch() {
333
+      
334
+    },
335
+    getCardClass() {
336
+      let ret = 'entity-card'
337
+      if (this.activeName === 'third') {
338
+        ret = 'entity-card heighten'
339
+      }
340
+      if (this.activeName === 'fourth') {
341
+        ret = this.serviceType === 'API' ? 'entity-card heighten' : 'entity-card mq-heighten'
342
+      }
343
+      return ret
344
+    },
345
+    // 批量上架
346
+    batchListing() {},
347
+    // 批量下架
348
+    batchOffShelf() {},
349
+    checkboxChange(e, id) {
350
+      console.log('e', e, 'id', id)
351
+    },
352
+    handleDown() {
353
+      console.log('down')
354
+    },
355
+    handleUp() {
356
+      console.log('up')
357
+    }
358
+  }
25 359
 };
26 360
 </script>
27 361
 
28 362
 <style lang="scss" scoped>
29 363
 .detailPage {
30
-  display: flex;
31
-  justify-content: space-between;
32
-  margin-bottom: 15px;
33
-  .left {
34
-    width: calc(68% - 15px);
364
+  width: 100%;
365
+  height: 100%;
366
+  box-sizing: border-box;
367
+  background: #fff;
368
+  .search-card {
369
+    height: 100px;
370
+    text-align: center;
371
+    padding-top: 30px;
372
+    border-bottom: 1px solid #ddd;
373
+    .input-wrapper {
374
+      width: 36%;
375
+      height: 53px;
376
+
377
+      /deep/ .el-input__inner {
378
+        height: 53px;
379
+      }
380
+
381
+      /deep/ .el-input-group__append {
382
+        background-color: #fff;
383
+        color: #80c2f7;
384
+        font-size: 18px;
385
+        font-weight: bold;
386
+      }
387
+    }
388
+  }
389
+  .bottom-card {
390
+    padding: 0 10%;
391
+    .tree-wrap {
392
+      width: 25%;
393
+    }
394
+    .list-wrap {
395
+      width: 75%;
396
+      .entity-card {
397
+        cursor: pointer;
398
+        width: 100%;
399
+        height: 140px;
400
+        border: 1px solid #ddd;
401
+        padding: 20px;
402
+        margin-bottom: 10px;
403
+        .title {
404
+          font-size: 18px;
405
+          line-height: 30px;
406
+        }
407
+        .title-block{
408
+          .left{
409
+            float: left;
410
+          }
411
+          .right{
412
+            float: right;
413
+            font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
414
+            font-weight: 400;
415
+            color: #666666;
416
+            font-size: 14px;
417
+            .right-item{
418
+              img{
419
+                width: 24px;
420
+                height: 21px;
421
+                vertical-align: middle;
422
+              }
423
+              margin-right: 10px;
424
+            }
425
+            .active{
426
+              color: #0000FF;
427
+              z-index: 10;
428
+            }
429
+          }
430
+        }
431
+      }
432
+      .heighten{
433
+        height: 190px;
434
+      }
435
+      .mq-heighten{
436
+        height: 220px;
437
+      }
438
+      .checkbox{
439
+        z-index: 10;
440
+      }
441
+    }
35 442
   }
36
-  .right {
37
-    display: inline-block;
38
-    width: calc(32%);
443
+  .clearfix{
444
+    &:after {
445
+      content: "";
446
+      display: table;
447
+      clear: both;
448
+    }
39 449
   }
40 450
 }
41 451
 </style>

+ 1 - 0
src/pages/index/layouts/indexLayout.vue

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
   <div :class="['home-wrapper']">
3 3
     <top-bar />
4
+    <router-view/>
4 5
   </div>
5 6
 </template>
6 7