Browse Source

顶部事件添加点击,弹窗,解析列表

wlf 1 year ago
parent
commit
64a4b96c17

+ 15 - 0
package-lock.json

@@ -3110,6 +3110,21 @@
           "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
           "requires": {
             "lru-cache": "^6.0.0"
+          },
+          "dependencies": {
+            "lru-cache": {
+              "version": "6.0.0",
+              "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+              "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+              "requires": {
+                "yallist": "^4.0.0"
+              }
+            },
+            "yallist": {
+              "version": "4.0.0",
+              "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+              "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
+            }
           }
         },
         "yallist": {

+ 166 - 3
src/layout/components/Navbar.vue

@@ -7,7 +7,7 @@
     <div class='app_name'>
       <!-- <el-button size="mini" type="danger" @click="getFireEvent">{{event_number}}个事件</el-button> -->
       <span>{{appItem.name}}</span>
-      <el-button style="margin-left:10px" size="mini" type="danger">{{event_number}}个事件</el-button>
+      <el-button style="margin-left:10px" size="mini" type="danger" @click="getFireEvent">{{event_number}}个事件</el-button>
     </div>
     <div class="right-menu">
 
@@ -46,6 +46,103 @@
         </el-dropdown-menu>
       </el-dropdown>
     </div>
+
+          <el-drawer
+            :visible.sync="drawerfire"
+            direction="rtl"
+            size="55%"
+            @close="drawerFireClose"
+            :modal='false'
+          >
+          <div style="margin-bottom:16px">
+            <el-table
+              v-loading="fireLoading"
+              :data="fireEventList"
+            >
+              <el-table-column label="事件" header-align="center" align="left" prop="exceptionName" :show-overflow-tooltip="true"/>
+              <el-table-column label="异常状态" header-align="center" align="center" prop="alertStatus" width="100">
+                <template slot-scope="scope">
+                  <el-tag
+                    :type="scope.row.alertStatus === 4 ? 'danger' : 'warning'"
+                    disable-transitions
+                  >{{ scope.row.alertStatus==4?"已告警":"触发异常"}}</el-tag>
+                </template>
+              </el-table-column>
+              <el-table-column label="发生时间" header-align="center" align="center" prop="appendTime" width="160">
+                <template slot-scope="scope">
+                  <span>{{ parseTime(scope.row.appendTime) }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="事件信息" header-align="center" align="left">
+                <template slot-scope="scope">
+                  <span @click="handleOpen(scope.row)" style="cursor: pointer;">
+                    <span v-if="scope.row.rowResult =='UNSET'">
+                      <el-tooltip placement="bottom">
+                          <div
+                            slot="content"
+                            style="width:400px;max-height:200px; overflow-y: scroll;"
+                          >
+                          {{scope.row.rowsResult}}
+                          </div>
+                          <span class="missionBodystyle" style="display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{
+                            scope.row.rowsResult
+                          }}</span>
+                        </el-tooltip>
+                      </span>
+                      <span v-else>{{scope.row.rowResult}}</span>
+                  </span>
+
+
+                  <!-- <span @click="handleOpen(scope.row)" style="cursor: pointer;">
+                    <span v-if="scope.row.rowResult =='UNSET'">
+                      <el-popover
+                          placement="top-start"
+                          title=""
+                          width="50%"
+                          trigger="hover"
+                          popper-class="workorder-remark"
+                      >
+                          <div>{{ scope.row.rowsResult }}</div>
+                          <span slot="reference">
+                            <span style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{ scope.row.rowsResult}}</span>
+                          </span>
+                      </el-popover>
+                    </span>
+                    <span v-else>{{scope.row.rowResult}}</span>
+                  </span> -->
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="操作"
+                align="center"
+                class-name="small-padding fixed-width"
+                width="120"
+              >
+                <template slot-scope="scope">
+                  <el-button
+                    size="mini"
+                    type="text"
+                    @click="handleIsIgnore(scope.row)"
+                  >忽略
+                  </el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    @click="handleIsResolve(scope.row)"
+                  >已解决
+                  </el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+            <pagination
+              v-show="totalFire>0"
+              :total="totalFire"
+              :page.sync="queryFire.pageIndex"
+              :limit.sync="queryFire.pageSize"
+              @pagination="getFireEvent"
+            />
+          </div>
+        </el-drawer>
   </div>
 </template>
 
@@ -58,12 +155,26 @@ import Screenfull from '@/components/Screenfull'
 import Search from '@/components/HeaderSearch'
 import TimeRange from './TimeRange'
 import storage from '@/utils/storage'
+import {eventNums,fireEvent,notate} from '@/api/event'
 export default {
   data(){
     return {
       avatarUrl:'',
       appItem:{},
       event_number:0,
+      fireLoading:false,
+      drawerfire:false,
+      fireEventList:[],
+      totalFire:0,
+      queryFire:{
+        pageIndex:1,
+        pageSize:10,
+        exceptionName:'',
+        appId:0,
+        isKnow: 0,
+        isResolve: 0,
+        isIgnore: 0 
+      },
     }
   },
   components: {
@@ -102,9 +213,9 @@ export default {
   },
   created(){
     this.appItem=storage.get('appsItem');
-    console.log(this.appItem,'顶部菜单栏')
     if(JSON.stringify(this.appItem) !="{}"){
       this.event_number= this.appItem.exception_num;
+      this.queryFire.appId= this.appItem.id
     }
   },
   methods: {
@@ -123,7 +234,54 @@ export default {
         // this.$router.push('/login');
         // location.reload()
       })
-    }
+    },
+    //忽略
+    handleIsIgnore(row){
+      let obj = {
+        isKnow:0,
+        isResolve:row.isResolve,
+        isIgnore:row.isIgnore==0?row.isIgnore=1:row.isIgnore=0
+      }
+      notate(obj,row.id).then((res)=>{
+        if(res.code == 200){
+          this.msgSuccess(res.msg)
+          this.queryFire.pageIndex = 1;
+           this.getFireEvent();
+        }
+      })
+    },
+    //已解决
+    handleIsResolve(row){
+      let obj = {
+        isKnow:0,
+        isResolve:row.isResolve==0?row.isResolve=1:row.isResolve=0,
+        isIgnore:row.isIgnore
+      }
+      notate(obj,row.id).then((res)=>{
+        if(res.code == 200){
+          this.msgSuccess(res.msg)
+           this.queryFire.pageIndex = 1;
+          this.getFireEvent();
+        }
+      })
+    },
+    cancelevent(){
+      this.openfire = false
+    },
+    getFireEvent(){
+      this.fireLoading=true
+      this.drawerfire=true;
+      fireEvent(this.queryFire).then((res)=>{
+        if(res.code == 200){
+          this.fireLoading = false;
+          this.fireEventList=res.data.list;
+          this.totalFire = res.data.count;
+        }
+      })
+    },
+    drawerFireClose(){
+      this.drawerfire=false;
+    },
   }
 }
 </script>
@@ -222,5 +380,10 @@ export default {
   line-height: 50px;
   font-size: 16px;
   font-weight: 500;
+  display: inline-block;
+}
+.app_name ::v-deep .el-button--mini{
+    font-size: 14px;
+    font-weight: bold;
 }
 </style>

+ 9 - 0
src/styles/block.css

@@ -75,6 +75,15 @@
   font-family: "Roboto,sans-serif";
 }
 
+.dot {
+  display: inline-block !important;
+  width: 8px !important;
+  height: 8px !important;
+  border-radius: 50% !important;
+  background: #1976d2 !important;
+  margin-right: 4px !important;
+}
+
 .px-3 {
   padding-right: 12px !important;
   padding-left: 12px !important;

+ 1 - 1
src/styles/block.min.css

@@ -1 +1 @@
-.block-container{width:100%;padding:12px;margin-right:auto;margin-left:auto}.block-container .row{display:flex;flex-wrap:wrap;flex:1 1 auto;margin:-12px;justify-content:center}.block-container .row .col{max-width:250px;flex:0 0 auto;width:auto;padding:12px}.block-container .row .border-bottom{width:150px;min-width:120px;background-color:#fff;border:thin solid rgba(0,0,0,0.12);border-bottom:6px solid #1976d2;color:rgba(0,0,0,0.87);position:relative;border-radius:8px;display:block;max-width:100%;outline:none;text-decoration:none;transition-property:box-shadow,opacity;overflow-wrap:break-word;white-space:normal}.block-container .row .border-bottom .col-tit{text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;letter-spacing:0.009378px;line-height:20px;font-weight:400;font-family:"Roboto,sans-serif";color:#90a4ae;caret-color:#90a4ae;text-align:left}.block-container .row .border-bottom .col-con{line-height:32px;font-family:Roboto,sans-serif;font-size:24px;font-weight:400;letter-spacing:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:16px}.block-container .row .border-bottom .col-con .col-con-unit{color:#b0bec5;caret-color:#b0bec5;font-size:16px;font-weight:400;line-height:28px;letter-spacing:.0014px;font-family:"Roboto,sans-serif"}.px-3{padding-right:12px !important;padding-left:12px !important}.py-4{padding-top:16px !important;padding-bottom:16px !important}
+.block-container{width:100%;padding:12px;margin-right:auto;margin-left:auto}.block-container .row{display:flex;flex-wrap:wrap;flex:1 1 auto;margin:-12px;justify-content:center}.block-container .row .col{max-width:250px;flex:0 0 auto;width:auto;padding:12px}.block-container .row .border-bottom{width:150px;min-width:120px;background-color:#fff;border:thin solid rgba(0,0,0,0.12);border-bottom:6px solid #1976d2;color:rgba(0,0,0,0.87);position:relative;border-radius:8px;display:block;max-width:100%;outline:none;text-decoration:none;transition-property:box-shadow,opacity;overflow-wrap:break-word;white-space:normal}.block-container .row .border-bottom .col-tit{text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;letter-spacing:0.009378px;line-height:20px;font-weight:400;font-family:"Roboto,sans-serif";color:#90a4ae;caret-color:#90a4ae;text-align:left}.block-container .row .border-bottom .col-con{line-height:32px;font-family:Roboto,sans-serif;font-size:24px;font-weight:400;letter-spacing:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:16px}.block-container .row .border-bottom .col-con .col-con-unit{color:#b0bec5;caret-color:#b0bec5;font-size:16px;font-weight:400;line-height:28px;letter-spacing:.0014px;font-family:"Roboto,sans-serif"}.dot{display:inline-block !important;width:8px !important;height:8px !important;border-radius:50% !important;background:#1976d2 !important;margin-right:4px !important}.px-3{padding-right:12px !important;padding-left:12px !important}.py-4{padding-top:16px !important;padding-bottom:16px !important}

+ 8 - 0
src/styles/block.scss

@@ -74,6 +74,14 @@
     }
   }
 }
+.dot{
+  display: inline-block !important;
+  width:8px !important;
+  height: 8px !important;
+  border-radius: 50% !important;
+  background: #1976d2 !important;
+  margin-right: 4px !important;
+}
 .px-3{
   padding-right: 12px!important;
   padding-left: 12px!important;

+ 6 - 5
src/views/apps/index.vue

@@ -131,11 +131,10 @@
             <Settings/>
           </el-tab-pane>
         </el-tabs>
-        <div class="app_name">
-          <!-- <span class="event">{{event_number}}个事件</span> -->
+        <!-- <div class="app_name">
           <el-button size="mini" type="danger" @click="getFireEvent">{{event_number}}个事件</el-button>
           <span style="margin-left:10px">{{Item.name}}</span>
-        </div>
+        </div> -->
 
         <el-drawer
             :visible.sync="drawerfire"
@@ -870,7 +869,8 @@ export default {
 ::v-deep .el-tabs__header{
   position: fixed;
   top:50.5px;
-  z-index: 99;
+  // z-index: 99;
+  z-index: 2;
   background: #fff;
   width: 91.3%;
   padding-top:16px;
@@ -897,7 +897,8 @@ export default {
     position: fixed;;
     top: 67px;
     right: 28px;
-    z-index: 101;
+    // z-index: 101;
+    z-index:3;
     height: 40px;
     line-height: 40px;
     text-align: right;

+ 64 - 44
src/views/business-analysis/analysis/components/ServiceMap.vue

@@ -1,6 +1,6 @@
 <template>
     <div style="padding:16px;">
-        <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px" @submit.native.prevent>
+        <!-- <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px" @submit.native.prevent>
           <el-form-item label="" prop="url">
               <el-input
                 v-model="queryParams.url"
@@ -10,19 +10,18 @@
                 @keyup.enter.native="handleQuery"
               />
             </el-form-item>
-        </el-form>
+        </el-form> -->
 
-        <el-row :gutter="10" class="mb8">
+        <!-- <el-row :gutter="10" class="mb8">
           <el-col :span="1.5">
             <el-button
-              v-permisaction="['disposition:index:add']"
               type="primary"
               icon="el-icon-plus"
               size="mini"
               @click="handleAdd"
             >新增</el-button>
           </el-col>
-        </el-row>
+        </el-row> -->
 
         <div>
           <!-- v-el-table-infinite-scroll="loadMore"  :height="tableHeight"-->
@@ -33,10 +32,14 @@
             @row-click="handleRowClick" 
           >
             <el-table-column header-align="left" label="接口名" prop="name" align="left" :show-overflow-tooltip="true"/>
-            <el-table-column header-align="left" label="URL组" prop="url" align="left" :show-overflow-tooltip="true">
+            <el-table-column header-align="left" label="ServiceName" prop="service_name" align="left" :show-overflow-tooltip="true">
               <template slot-scope="scope">
-                <!-- <span style="cursor:pointer" @click="toogleExpand(row,$index)">{{scope.row.url}}</span> -->
-                <span>{{scope.row.url}}</span>
+                <span>{{scope.row.service_name}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column header-align="left" label="SpanName" prop="span_name" align="left" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                <span>{{scope.row.span_name}}</span>
               </template>
             </el-table-column>
             <el-table-column header-align="center" label="rpm" sortable prop="rpm" align="center" :show-overflow-tooltip="true">
@@ -71,12 +74,12 @@
                 <el-tag v-if="scope.row.avg<2000">{{ Number(scope.row.avg).toFixed(2) }}</el-tag>
               </template>
             </el-table-column>
-            <el-table-column header-align="center" label="延迟比例" prop="duration_stats" align="center">
+            <!-- <el-table-column header-align="center" label="延迟比例" prop="duration_stats" align="center">
                 <template slot-scope="scope">
                   {{ drawEchartsp5(scope.row, scope.$index, 'five') }}
                   <div :id="`tiger-five-trend-index` + scope.$index" class="tiger-trend-charts"></div>
                 </template>
-            </el-table-column>
+            </el-table-column> -->
             <el-table-column
               label="操作"
               align="center"
@@ -123,7 +126,7 @@
           :total="total"
           :page.sync="childQueryParams.pageIndex"
           :limit.sync="childQueryParams.pageSize"
-          @pagination="handelgetUrlMappingRange"
+          @pagination="handelgetBizDetail"
         /> -->
 
         <!-- 添加或修改应用配置对话框 -->
@@ -232,7 +235,7 @@
               :total="total"
               :page.sync="childQueryParams.pageIndex"
               :limit.sync="childQueryParams.pageSize"
-              @pagination="handelgetUrlMappingRange"
+              @pagination="handelgetBizDetail"
             />
           </div>
         </el-drawer>
@@ -293,13 +296,11 @@ export default {
       queryParams: {
         // start_time:Math.round((new Date().getTime())/1000 - (5*60)),
         // end_time:Math.round(new Date().getTime()/1000),
-        start_time:0,
-        end_time:0,
-        app_id:undefined,
-        favor:'',
-        url:'',
-        pageIndex: 1,
-        pageSize: 50,
+        app_id:'',
+        start_time:'',
+        end_time:'',
+        pageIndex:1,
+        pageSize:10,
       },
       // 表单参数
       form: {
@@ -323,10 +324,7 @@ export default {
         // end_time:Math.round(new Date().getTime()/1000),
         start_time:0,
         end_time:0,
-        id:0,
-        app_id:0,
-        kind:'',
-        only_error:0,
+        biz_id:1,
         pageIndex: 1,
         pageSize: 10,
       },
@@ -337,6 +335,7 @@ export default {
         start_time:'',
         end_time:'',
       },
+      tempList:[],
     }
   },
    watch: {
@@ -345,6 +344,8 @@ export default {
             if(newValue){
               this.queryParams.start_time = newValue.startTime;
               this.queryParams.end_time = newValue.endTime
+              this.BizStatsQuery.start_time= newValue.start_time;
+              this.BizStatsQuery.end_time= newValue.end_time;
               this.childQueryParams.start_time = newValue.startTime;
               this.childQueryParams.end_time = newValue.endTime
               this.queryParams.pageIndex = 1
@@ -384,11 +385,13 @@ export default {
 
      this.appItem=storage.get('appsItem');
     if(JSON.stringify(this.appItem) !="{}"){
-      this.queryTrace.app_id = this.appItem.id;
-      this.queryTrace.start_time = this.appItem.start_time;
-      this.queryTrace.end_time = this.appItem.end_time;
-      // this.BizStatsQuery.start_time= this.appItem.start_time;
-      // this.BizStatsQuery.end_time= this.appItem.end_time;
+      this.queryParams.app_id = this.appItem.id;
+      this.queryParams.start_time = this.appItem.start_time;
+      this.queryParams.end_time = this.appItem.end_time;
+      this.BizStatsQuery.start_time= this.appItem.start_time;
+      this.BizStatsQuery.end_time= this.appItem.end_time;
+      this.childQueryParams.start_time = this.appItem.start_time;
+      this.childQueryParams.end_time = this.appItem.end_time;
       this.getList()
     }
     // this.columnChange();
@@ -418,7 +421,7 @@ export default {
       console.log(row,'点击展开行');
       this.drawer=true;
       this.childQueryParams.id = row.id;
-      this.handelgetUrlMappingRange();
+      this.handelgetBizDetail();
     },
     handleRowClick(row, column, event){
       console.log(row,'点击行');
@@ -429,14 +432,14 @@ export default {
       setTimeout(()=>{
         
         // this.childQueryParams.id = row.id;
-        this.childQueryParams.kind = row.kind;
-        this.handelgetUrlMappingRange();
+        this.childQueryParams.biz_id = row.id;
+        this.handelgetBizDetail();
       },0)
     },
-    handelgetUrlMappingRange(){
+    handelgetBizDetail(){
       this.tableLoading = true
       console.log(this.childQueryParams,'this.childQueryParams')
-      getUrlMappingRange(this.childQueryParams).then(res => {
+      getBizDetail(this.childQueryParams).then(res => {
           if(res.code == 200){
             this.tableLoading = false;
             console.log(res.data.list,'业务映射获取行的数据')
@@ -491,12 +494,24 @@ export default {
       this.loading = true
       listBiz(this.queryParams).then(res => {
           if(res.code == 200){
-            console.log(res.data.list,'业务映射')
+            console.log(res.data.list,'解析列表')
             this.loading = false;
             this.serveceMapList= this.serveceMapList.concat(res.data.list);
-            console.log(this.serveceMapList,'this.serveceMapList 所有接口映射内容')
+            console.log(this.serveceMapList,'this.serveceMapList 解析列表')
             this.tableCount = res.data.count;
             this.queryParams.pageIndex = res.data.pageIndex;
+
+            this.tempList = this.tempList.concat(res.data.list);
+            if(this.tempList.length>0){
+              for(let i=0;i<this.tempList.length;i++){
+                this.BizStatsQuery.biz_id = this.tempList[i].id
+                listBizStats(this.BizStatsQuery).then(resq=>{
+                  console.log(resq,'第二次获取数据,用于拼接')
+                  this.tempList[i] = {...this.tempList[i],...resq.data}
+                })
+              }
+              this.serveceMapList = this.tempList;
+            }
           }
       })
     },
@@ -533,6 +548,7 @@ export default {
     handleQuery() {
       this.queryParams.pageIndex = 1
       this.serveceMapList=[];
+      this.tempList=[];
       this.getList()
       // this.getList()
       // if(this.queryParams.url != ''){
@@ -608,6 +624,7 @@ export default {
                 this.open = false
                 this.queryParams.pageIndex =1;
                 this.serveceMapList=[];
+                this.tempList=[];
                 this.getList()
               } else {
                 this.msgError(response.msg)
@@ -620,6 +637,7 @@ export default {
                 this.open = false
                 this.queryParams.pageIndex =1;
                 this.serveceMapList=[];
+                this.tempList=[];
                 this.getList()
               } else {
                 this.msgError(response.msg)
@@ -642,6 +660,7 @@ export default {
       }).then((response) => {
         this.queryParams.pageIndex =1;
         this.serveceMapList=[];
+        this.tempList=[];
         this.msgSuccess(response.msg);
         this.getList()
       }).catch(function() {})
@@ -658,6 +677,7 @@ export default {
             this.msgSuccess(res.msg);
             this.queryParams.pageIndex =1;
             this.serveceMapList=[];
+             this.tempList=[];
             this.getList()
           }
       })
@@ -720,7 +740,7 @@ export default {
           type: 'category',
           boundaryGap: false,
           // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
-          data: row.duration_stats.time,
+          data: row.quantiles.time,
           show:false
         },
         yAxis: {
@@ -735,7 +755,7 @@ export default {
             symbol: 'none',
             // // data: [120, 132, 101, 134, 90, 230, 210]
             // data: Number(row.duration_stats.p50).toFixed(2)
-            data:row.duration_stats.p50
+            data:row.quantiles.p50
           },
           {
             name: 'P.95',
@@ -744,7 +764,7 @@ export default {
             symbol: 'none',
             // data: [320, 332, 301, 334, 390, 330, 320]
             // data: Number(row.duration_stats.p90).toFixed(2)
-            data:row.duration_stats.p90
+            data:row.quantiles.p90
           },
           {
             name: 'P.99',
@@ -753,7 +773,7 @@ export default {
             symbol: 'none',
             // data: [820, 932, 901, 934, 1290, 1330, 1320]
             // data: Number(row.duration_stats.p99).toFixed(2)
-            data:row.duration_stats.p99
+            data:row.quantiles.p99
           }
         ]
       };
@@ -810,7 +830,7 @@ export default {
         xAxis: {
           type: 'category',
           boundaryGap: false,
-          data: row.duration_stats.time,
+          data: row.quantiles.time,
           // show:true
         },
         yAxis: {
@@ -837,7 +857,7 @@ export default {
             stack: 'Total',
             symbol: 'none',
             // symbol: 'emptyCircle',//拐点
-            data:row.duration_stats.p50
+            data:row.quantiles.p50
           },
           {
             name: 'P.95',
@@ -845,7 +865,7 @@ export default {
             stack: 'Total',
             symbol: 'none',//拐点
             // symbol: 'emptyCircle',//拐点
-            data:row.duration_stats.p90
+            data:row.quantiles.p90
           },
           {
             name: 'P.99',
@@ -853,7 +873,7 @@ export default {
             stack: 'Total',
             symbol: 'none',//拐点
             // symbol: 'emptyCircle',//拐点
-            data:row.duration_stats.p99
+            data:row.quantiles.p99
           }
         ]
       };
@@ -882,7 +902,7 @@ export default {
         
         _this.childQueryParams.start_time = timestamp
         _this.childQueryParams.end_time =timestamp
-        _this.handelgetUrlMappingRange();
+        _this.handelgetBizDetail();
       })
     },
     drawEchartsp99() {

+ 55 - 22
src/views/business-analysis/analysis/index.vue

@@ -5,8 +5,11 @@
         <div class="block-container" style="margin-bottom:20px">
           <div class="row">
             <div class="col">
-              <el-tooltip placement="bottom" effect="light">
-                <div slot="content">{{9}}</div>
+              <el-tooltip placement="bottom" effect="dark" :visible-arrow='false'>
+                <div slot="content">
+                  <i class="dot"></i>
+                  <span>{{0}}</span>
+                </div>
                 <div class="border-bottom">
                   <div class="block-box px-3 py-4">
                     <div class="col-tit">应用系统总量</div>
@@ -16,8 +19,11 @@
               </el-tooltip>
             </div>
             <div class="col">
-              <el-tooltip placement="bottom" effect="light">
-                <div slot="content">{{10}}</div>
+              <el-tooltip placement="bottom" effect="dark" :visible-arrow='false'>
+                <div slot="content">
+                  <i class="dot"></i>
+                  <span>10</span>
+                </div>
                 <div class="border-bottom">
                   <div class="block-box px-3 py-4">
                     <div class="col-tit">Trace总量</div>
@@ -27,8 +33,11 @@
               </el-tooltip>
             </div>
             <div class="col">
-              <el-tooltip placement="bottom" effect="light">
-                <div slot="content">{{12}}</div>
+              <el-tooltip placement="bottom" effect="dark" :visible-arrow='false'>
+                <div slot="content">
+                  <i class="dot"></i>
+                  <span>12</span>
+                </div>
                 <div class="border-bottom">
                   <div class="block-box px-3 py-4">
                     <div class="col-tit">日志总量</div>
@@ -38,8 +47,11 @@
               </el-tooltip>
             </div>
             <div class="col">
-              <el-tooltip placement="bottom" effect="light">
-                <div slot="content">{{13}}</div>
+              <el-tooltip placement="bottom" effect="dark" :visible-arrow='false'>
+                <div slot="content">
+                  <i class="dot"></i>
+                  <span>13</span>
+                </div>
                 <div class="border-bottom">
                   <div class="block-box px-3 py-4">
                     <div class="col-tit">用户总量</div>
@@ -49,8 +61,11 @@
               </el-tooltip>
             </div>
             <div class="col">
-              <el-tooltip placement="bottom" effect="light">
-                <div slot="content">{{23}}</div>
+              <el-tooltip placement="bottom" effect="dark" :visible-arrow='false'>
+                <div slot="content">
+                  <i class="dot"></i>
+                  <span>23</span>
+                </div>
                 <div class="border-bottom">
                   <div class="block-box px-3 py-4">
                     <div class="col-tit">服务总量</div>
@@ -74,7 +89,7 @@
           </el-tab-pane>
           <el-tab-pane label="解析列表" name="second">
             <!-- <Biz/> -->
-            <!-- <service-map></service-map> -->
+            <service-map></service-map>
           </el-tab-pane>
         </el-tabs>
       </el-card>
@@ -126,7 +141,10 @@ export default {
     }
   },
   created(){
+    // 说明
+    // appItem中的id和app_id是一样的
     this.appItem=storage.get('appsItem');
+    console.log(this.appItem,'this.appItem 业务解析页面')
     if(JSON.stringify(this.appItem) !="{}"){
       this.errorQuery.app_id = this.appItem.id;
       this.errorQuery.start_time = this.appItem.start_time;
@@ -165,7 +183,7 @@ export default {
         console.log(res,'res quality-------')
         if(res.code == 200){
           this.qualityObj = res.data;
-          console.log(this.qualityObj)
+          console.log(this.qualityObj,'对外接口质量')
         }
       })
     },
@@ -363,18 +381,33 @@ export default {
         ]
       })
     },
-    getListBiz(){
-      listBiz(this.bizQuery).then(res=>{
-        if(res.code == 200){
-          this.bizList = res.data.list;
-          console.log(this.bizList)
+    // getListBiz(){
+    //   listBiz(this.bizQuery).then(res=>{
+    //     if(res.code == 200){
+    //       this.bizList = res.data.list;
+    //       console.log(this.bizList)
+    //     }
+    //   })
+    // },
+    handlerNumber(num){
+      // let str = num.toString();
+      let str = num
+      let result;
+        if(str.length<=4){
+          result = num;
+        }else if(str.length>4&&str.length<7){
+          result = (num /1000 ).toFixed(2)+"K"
+        }else if(str.length>=7&&str.length<10){
+          // result = Math.round(num/1000000) + 'M'
+          result = (num/1000000).toFixed(2) + 'M'
+        }else{
+          result= (num/1000000000).toFixed(2)+ 'B'
         }
-      })
+      return result;
+    },
+    handelerNumberjoin(num){
+        return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
     },
-    handleRowClick(row, column, event){
-
-      
-     },
   }
 }
 </script>

+ 3 - 1
src/views/business-analysis/panel/index.vue

@@ -264,13 +264,15 @@ export default {
   },
   created(){
     this.appItem=storage.get('appsItem');
+    console.log(this.appItem,'面板----')
     if(JSON.stringify(this.appItem) !="{}"){
       console.log(this.appItem)
       this.appId = this.appItem.id;
       this.form.appId=this.appItem.id;
       this.iframeQuery.appId = this.appItem.id;
 
-      this.ApdexNum = this.appItem.apdex;  
+      this.ApdexNum =parseFloat(this.appItem.apdex).toFixed(2); 
+
       // this.queryNums.start_time = this.appItem.start_time;
       // this.queryNums.end_time = this.appItem.end_time;
       this.getList();

+ 7 - 1
src/views/business-analysis/topology/index.vue

@@ -25,7 +25,9 @@
                       </div>
                 </div>
             </el-tab-pane>
-            <el-tab-pane label="部署拓扑" name="second">部署拓扑</el-tab-pane>
+            <el-tab-pane label="部署拓扑" name="second">
+              <NoData/>
+            </el-tab-pane>
           </el-tabs>
        
         <div class="topoWrap">
@@ -54,7 +56,11 @@
 
 <script>
 import storage from '@/utils/storage'
+import NoData from "@/views/NoData/nodata"
 export default {
+  components:{
+    NoData
+  },
   data(){
     return {
       activeName:'first',

+ 45 - 19
src/views/index/index.vue

@@ -39,8 +39,11 @@
         <div class="block-container">
           <div class="row">
             <div class="col">
-              <el-tooltip placement="bottom" effect="light">
-                <div slot="content">{{appList.length}}</div>
+              <el-tooltip placement="bottom" effect="dark" :visible-arrow='false'>
+                <div slot="content">
+                  <i class="dot"></i>
+                  <span>{{appList.length}}</span>
+                </div>
                 <div class="border-bottom">
                   <div class="block-box px-3 py-4">
                     <div class="col-tit">应用系统总量</div>
@@ -50,8 +53,8 @@
               </el-tooltip>
             </div>
             <div class="col">
-              <el-tooltip placement="bottom" effect="light">
-                <div slot="content">{{rawdata.traces}}</div>
+              <el-tooltip placement="bottom" effect="dark" :visible-arrow='false'>
+                <div slot="content"><i class="dot"></i><span>{{rawdata.traces}}</span></div>
                 <div class="border-bottom">
                   <div class="block-box px-3 py-4">
                     <div class="col-tit">Trace总量</div>
@@ -61,8 +64,8 @@
               </el-tooltip>
             </div>
             <div class="col">
-              <el-tooltip placement="bottom" effect="light">
-                <div slot="content">{{rawdata.logs}}</div>
+              <el-tooltip placement="bottom" effect="dark" :visible-arrow='false'>
+                <div slot="content"><i class="dot"></i>{{rawdata.logs}}</div>
                 <div class="border-bottom">
                   <div class="block-box px-3 py-4">
                     <div class="col-tit">日志总量</div>
@@ -72,8 +75,8 @@
               </el-tooltip>
             </div>
             <div class="col">
-              <el-tooltip placement="bottom" effect="light">
-                <div slot="content">{{rawdata.users}}</div>
+              <el-tooltip placement="bottom" effect="dark" :visible-arrow='false'>
+                <div slot="content"><i class="dot"></i>{{rawdata.users}}</div>
                 <div class="border-bottom">
                   <div class="block-box px-3 py-4">
                     <div class="col-tit">用户总量</div>
@@ -83,8 +86,8 @@
               </el-tooltip>
             </div>
             <div class="col">
-              <el-tooltip placement="bottom" effect="light">
-                <div slot="content">{{rawdata.services}}</div>
+              <el-tooltip placement="bottom" effect="dark" :visible-arrow='false'>
+                <div slot="content"><i class="dot"></i>{{rawdata.services}}</div>
                 <div class="border-bottom">
                   <div class="block-box px-3 py-4">
                     <div class="col-tit">服务总量</div>
@@ -169,10 +172,10 @@ export default {
       },
       appList:[],
       times:{
-        // start_time:Math.round((new Date().getTime())/1000 - (5*60)),
-        // end_time:Math.round(new Date().getTime()/1000),
-        start_time:0,
-        end_time:0,
+        start_time:Math.round((new Date().getTime())/1000 - (5*60)),
+        end_time:Math.round(new Date().getTime()/1000),
+        // start_time:0,
+        // end_time:0,
         live:false
       },
       statusData:{},
@@ -182,8 +185,10 @@ export default {
         req_applist:[],
       },
       queryNums:{
-        start_time:0,
-        end_time:0,
+        start_time:Math.round((new Date().getTime())/1000 - (5*60)),
+        end_time:Math.round(new Date().getTime()/1000),
+        // start_time:0,
+        // end_time:0,
         pageSize:10,
         pageIndex:1,
         app_ids:0,
@@ -234,12 +239,20 @@ export default {
         }
       return result;
     },
+    handelerNumberjoin(num){
+        return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+    },
     getData(){
       listStats().then(res=>{
         console.log(res,'res')
         if(res.code == 200){
-         let statusData = res.data;
-          this.rawdata = res.data;
+          let statusData = res.data;
+          let rawdata = res.data;
+          this.rawdata.traces = this.handelerNumberjoin(rawdata.traces);
+          this.rawdata.logs=this.handelerNumberjoin(rawdata.logs)
+          this.rawdata.users = this.handelerNumberjoin(rawdata.users)
+          this.rawdata.services = this.handelerNumberjoin(rawdata.services)
+
           this.statusData.traces=this.handlerNumber(statusData.traces)
           this.statusData.logs=this.handlerNumber(statusData.logs)
           this.statusData.users = this.handlerNumber(statusData.users)
@@ -253,7 +266,7 @@ export default {
       },timeOut)
     },
     handChange(val){
-      console.log(val)
+      console.log(val,'存起来的appsItem')
       if(val){
           const start_time=this.times.start_time
           const end_time=this.times.end_time
@@ -263,6 +276,7 @@ export default {
           obj.live = this.times.live
           obj.start_time = this.times.start_time
           obj.end_time=this.times.end_time
+          
           storage.set('appsItem',obj);
 
           this.$router.push({
@@ -341,6 +355,8 @@ export default {
             }
               
           }
+
+          console.log(this.appList,'appList')
         }
       )
     },
@@ -557,6 +573,7 @@ export default {
           flex: 0 0 auto;
           width: auto;
           padding: 12px;
+          
       }
       .border-bottom{
             width: 150px;
@@ -616,6 +633,7 @@ export default {
         // margin:0;
       }
     }
+    
   }
   .px-3{
     padding-right: 12px!important;
@@ -625,5 +643,13 @@ export default {
     padding-top: 16px!important;
     padding-bottom: 16px!important;
   }
+  .dot{
+      display: inline-block !important;
+      width:8px !important;
+      height: 8px !important;
+      border-radius: 50% !important;
+      background: #1976d2 !important;
+      margin-right: 4px !important;
+    }
 </style>>