wcf преди 2 години
родител
ревизия
ab4490ca4a
променени са 7 файла, в които са добавени 168 реда и са изтрити 31 реда
  1. BIN
      public/search/knowledgeapi.pdf
  2. BIN
      public/search/test.pdf
  3. 14 1
      src/assets/styles/search.less
  4. 88 2
      src/views/index.vue
  5. 24 20
      src/views/search/Home.vue
  6. 37 4
      src/views/search/pdf/index.vue
  7. 5 4
      src/views/search/pdf/view.vue

BIN
public/search/knowledgeapi.pdf


BIN
public/search/test.pdf


+ 14 - 1
src/assets/styles/search.less

@@ -1,6 +1,19 @@
+#home {
+  text-align: left;
+  width: 100%;
+  height: 25%;
+
+  img {
+    padding: 0;
+    height: 36px;
+    width: 36px;
+    position: relative;
+    top: 70%;
+  }
+}
 #logo {
   text-align: center;
-  width: 100%;
+  width: 70%;
   height: 25%;
 
   img {

+ 88 - 2
src/views/index.vue

@@ -31,20 +31,22 @@
             <tr>
               <th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
               <th class="el-table__cell is-leaf"><div class="cell">值</div></th>
-              <th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
-              <th class="el-table__cell is-leaf"><div class="cell">值</div></th>
             </tr>
             </thead>
             <tbody>
             <tr>
               <td class="el-table__cell is-leaf"><div class="cell">核心数</div></td>
               <td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.cpuNum }}</div></td>
+            </tr>
+            <tr>
               <td class="el-table__cell is-leaf"><div class="cell">用户使用率</div></td>
               <td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.used }}%</div></td>
             </tr>
             <tr>
               <td class="el-table__cell is-leaf"><div class="cell">系统使用率</div></td>
               <td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.sys }}%</div></td>
+            </tr>
+            <tr>
               <td class="el-table__cell is-leaf"><div class="cell">当前空闲率</div></td>
               <td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.free }}%</div></td>
             </tr>
@@ -326,6 +328,90 @@
             color1: 'green',
             color2: 'green',
           },
+          {
+            id: 13,
+            num: '13',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 14,
+            num: '14',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 15,
+            num: '15',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 16,
+            num: '16',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 17,
+            num: '17',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 18,
+            num: '18',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 19,
+            num: '19',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 20,
+            num: '20',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 21,
+            num: '21',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 22,
+            num: '22',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 23,
+            num: '23',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          },
+          {
+            id: 24,
+            num: '24',
+            name: '健康',
+            color1: 'green',
+            color2: 'green',
+          }
         ],
         numList: []
       }

+ 24 - 20
src/views/search/Home.vue

@@ -1,21 +1,34 @@
 <template>
   <div class="search">
-    <div id="logo">
-      <img alt="数据检索中心" src="../../assets/images/search/620.png"/>
+    <div id="home">
+      <img alt="数据检索中心" src="../../assets/images/search/610.png"/>
+      <router-link to="/">
+        <a >返回后台</a>
+      </router-link>
+
     </div>
+
     <div v-if="engines" id="site-main">
       <div id="search-bar">
         <div id="container">
           <div id="headline-content">
-            <div id="search-tab">
+            <el-row>
+              <div id="logo" style="align-content: center ;    padding-bottom: 40px;">
+                <img alt="数据检索中心" src="../../assets/images/search/620.png"/>
+              </div>
+            </el-row>
+            <el-row>
+              <div id="search-tab">
               <span
                 v-for="engine_name in engine_names"
                 v-bind:key="engine_name"
                 :class="{ active: get_search_engine() === engine_name }"
                 @click="set_search_engine(engine_name)"
-                >{{ engines[engine_name][3] }}</span
+              >{{ engines[engine_name][3] }}</span
               >
-            </div>
+              </div>
+            </el-row>
+
             <form
               id="search-form"
               ref="search_form"
@@ -46,20 +59,8 @@
                 @click="doSearch"
               />
             </form>
-            <!-- <div id="search-hot" :style="search_hot_display">
-              <ul>
-                <li
-                  v-for="(key, index) in keywords"
-                  v-bind:key="key"
-                  :class="{ selected: key_selected === index }"
-                  @click="go_submit(key)"
-                >
-                  <span :class="'search_index' + index">{{ index + 1 }}</span
-                  >{{ key }}
-                </li>
-              </ul>
-            </div> -->
-              <a-spin v-show="search_engine == '图谱'" :spinning="loadingChecked" class="flex1 panel flex-col" style="height: 500px;background-color: transparent;">
+
+              <a-spin v-show="search_engine == '图谱'" :spinning="loadingChecked" class="flex1 panel flex-col" style="height: 600px;">
                 <chart-comp ref="chart"
                           @="getInfoTooltip"
                           :isShowContextMenu="true"
@@ -194,6 +195,9 @@ export default {
     })
   },
   methods: {
+    goHome(){
+      this.$router.replace("index");
+    },
     set_search_engine(engine) {
       this.search_engine = engine;
       this.keyword = ''
@@ -345,7 +349,7 @@ export default {
         this.loadingTree = false
       })
     },
-  },
+  }
 };
 </script>
 <style lang="less" scoped>

+ 37 - 4
src/views/search/pdf/index.vue

@@ -1,8 +1,41 @@
 <template>
     <span>
-        <ul style="color:#c5a1a1">
+        <ul style="margin-top: 5px">
             <li v-for="(file, index) in fileList" :key="index" @click="showPdf(file)">
             {{ file.name }}
+              <div style="margin-bottom: 15px;">
+                <a>提供单位: <span id="department">xxx</span></a>
+                <a>提供人: <span id="author"></span>xxx</a>
+                <a>提交日期: <span id="submitDate">2020.02.02</span></a>
+                <a>格式: <span id="format"></span>pdf</a>
+              </div>
+            </li>
+          <li v-for="(file, index) in fileList" :key="index" @click="showPdf(file)">
+            {{ file.name }}
+              <div style="margin-bottom: 15px;">
+                <a>提供单位: <span id="department">xxx</span></a>
+                <a>提供人: <span id="author"></span>xxx</a>
+                <a>提交日期: <span id="submitDate">2020.02.02</span></a>
+                <a>格式: <span id="format"></span>pdf</a>
+              </div>
+            </li>
+          <li v-for="(file, index) in fileList" :key="index" @click="showPdf(file)">
+            {{ file.name }}
+              <div style="margin-bottom: 15px;">
+                <a>提供单位: <span id="department">xxx</span></a>
+                <a>提供人: <span id="author"></span>xxx</a>
+                <a>提交日期: <span id="submitDate">2020.02.02</span></a>
+                <a>格式: <span id="format"></span>pdf</a>
+              </div>
+            </li>
+          <li v-for="(file, index) in fileList" :key="index" @click="showPdf(file)">
+            {{ file.name }}
+              <div style="margin-bottom: 15px;">
+                <a>提供单位: <span id="department">xxx</span></a>
+                <a>提供人: <span id="author"></span>xxx</a>
+                <a>提交日期: <span id="submitDate">2020.02.02</span></a>
+                <a>格式: <span id="format"></span>pdf</a>
+              </div>
             </li>
         </ul>
         <el-dialog
@@ -12,7 +45,7 @@
             :before-close="handleClose">
             <ViewPdf :src="showPdfPath"/>
         </el-dialog>
-    </span>  
+    </span>
 </template>
 <script>
 import ViewPdf from '@/views/search/pdf/view'
@@ -26,7 +59,7 @@ export default {
             fileList:[
                 {
                     name:'知识图谱API',
-                    path:'/search/knowledgeapi.pdf'
+                    path:'/search/test.pdf'
                 }
             ]
         }
@@ -41,4 +74,4 @@ export default {
         }
     }
 }
-</script>
+</script>

+ 5 - 4
src/views/search/pdf/view.vue

@@ -1,5 +1,6 @@
 <template>
     <div class="ins-submit-docs-content ins-submit-docs-pdf">
+
         <pdf ref="morePDF" :src="src" :page="i" v-for="i in numPages" :key="i"></pdf>
     </div>
 </template>
@@ -8,7 +9,7 @@
 <script>
 
 import pdf from 'vue-pdf'
- 
+
 export default {
     name : 'ins-docs-pdf',
     props : {
@@ -23,7 +24,7 @@ export default {
             publicPath: process.env.BASE_URL,
             loading : true,    //加载中
             loadingError : false,    //加载失败
-            numPages : 0,        
+            numPages : 0,
         }
     },
     watch : {
@@ -49,7 +50,7 @@ export default {
             let loadURL = pdf.createLoadingTask({
                   url: url,//你的pdf地址
             })
- 
+
             loadURL.promise.then(pdf => {
                 this.numPages = pdf.numPages
                 this.$set(this, 'docsPDF.numPages', pdf.numPages)
@@ -61,4 +62,4 @@ export default {
         }
     }
 }
-</script>
+</script>