Explorar o código

接口调用统计

1178232204@qq.com %!s(int64=3) %!d(string=hai) anos
pai
achega
a634caae95
Modificáronse 4 ficheiros con 243 adicións e 119 borrados
  1. 59 57
      src/api/config.js
  2. 5 0
      src/api/knowledgeLib.js
  3. 178 61
      src/components/callRecord/CallRecordManager.vue
  4. 1 1
      vue.config.js

+ 59 - 57
src/api/config.js

@@ -52,16 +52,16 @@ export default {
     'importDrugRecord': '/tran/mappingConfig/importExcel',   //药品-数据导入
     'exportDrugModule': '/tran/mappingConfig/exportExcelModule',   //科室-数据导入模板导出
 
-      'getScalePageCDSS': '/tran/mappingConfig/getPage',   //量表列表
-      'scaleIsExistRecordCDSS': '/tran/mappingConfig/isExistRecord',   //量表-映射关系是否已存在
-      'saveOrUpdateScaleRecordCDSS': '/tran/mappingConfig/saveOrUpdateRecord',   //量表-保存或修改映射关系
-      'deleteScaleRecordCDSS': '/tran/mappingConfig/deleteRecord',   //量表-删除映射关系
-      'exportScaleRecordCDSS': '/tran/mappingConfig/exportExcel',   //量表-数据导出
-      'importScaleRecordCDSS': '/tran/mappingConfig/importExcel',   //量表-数据导入
-      'exportScaleModuleCDSS': '/tran/mappingConfig/exportExcelModule',
+    'getScalePageCDSS': '/tran/mappingConfig/getPage',   //量表列表
+    'scaleIsExistRecordCDSS': '/tran/mappingConfig/isExistRecord',   //量表-映射关系是否已存在
+    'saveOrUpdateScaleRecordCDSS': '/tran/mappingConfig/saveOrUpdateRecord',   //量表-保存或修改映射关系
+    'deleteScaleRecordCDSS': '/tran/mappingConfig/deleteRecord',   //量表-删除映射关系
+    'exportScaleRecordCDSS': '/tran/mappingConfig/exportExcel',   //量表-数据导出
+    'importScaleRecordCDSS': '/tran/mappingConfig/importExcel',   //量表-数据导入
+    'exportScaleModuleCDSS': '/tran/mappingConfig/exportExcelModule',
 
 
-      'getOperationPage': '/tran/mappingConfig/getPage',   //手术/操作列表
+    'getOperationPage': '/tran/mappingConfig/getPage',   //手术/操作列表
     'operationIsExistRecord': '/tran/mappingConfig/isExistRecord',   //手术/操作-映射关系是否已存在
     'saveOrUpdateOperationRecord': '/tran/mappingConfig/saveOrUpdateRecord',   //手术/操作-保存或修改映射关系
     'deleteOperationRecord': '/tran/mappingConfig/deleteRecord',   //手术/操作-删除映射关系
@@ -93,14 +93,14 @@ export default {
     'exportNurseRecord': '/tran/mappingConfig/exportExcel',   //护理-数据导出
     'importNurseRecord': '/tran/mappingConfig/importExcel',   //检验-数据导入
     'exportNurseModule': '/tran/mappingConfig/exportExcelModule',   //护理-数据导入模板导出
-	
-	'getRoutePage': '/tran/mappingConfig/getPage',   //给药途径列表
-	'RouteIsExistRecord': '/tran/mappingConfig/isExistRecord',   //给药途径-映射关系是否已存在
-	'saveOrUpdateRecordRT': '/tran/mappingConfig/saveOrUpdateRecord',   //给药途径列表添加
-	'deleteRouteRecord': '/tran/mappingConfig/deleteRecord',   //给药途径-删除映射关系
-	'exportRouteRecord': '/tran/mappingConfig/exportExcel',   //给药途径-数据导出
-	'importRouteRecord': '/tran/mappingConfig/importExcel',   //给药途径-数据导入
-	'exportRouteModule': '/tran/mappingConfig/exportExcelModule',   //给药途径-数据导入模板导出
+
+    'getRoutePage': '/tran/mappingConfig/getPage',   //给药途径列表
+    'RouteIsExistRecord': '/tran/mappingConfig/isExistRecord',   //给药途径-映射关系是否已存在
+    'saveOrUpdateRecordRT': '/tran/mappingConfig/saveOrUpdateRecord',   //给药途径列表添加
+    'deleteRouteRecord': '/tran/mappingConfig/deleteRecord',   //给药途径-删除映射关系
+    'exportRouteRecord': '/tran/mappingConfig/exportExcel',   //给药途径-数据导出
+    'importRouteRecord': '/tran/mappingConfig/importExcel',   //给药途径-数据导入
+    'exportRouteModule': '/tran/mappingConfig/exportExcelModule',   //给药途径-数据导入模板导出
 
     'getTcmdiseasePage': '/tran/mappingConfig/getPage',   //中医疾病列表
     'tcmIsExistRecord': '/tran/mappingConfig/isExistRecord',   //中医疾病-映射关系是否已存在
@@ -162,11 +162,13 @@ export default {
     'zskSearchConcept': '/klDisease/searchConceptRuleClass', //知识库搜索术语
     'zskUpdateAll': '/cache/clearRuleAll', //更新数据
     'zskgetDict': '/kl/dictionary/getDictionarys', //禁止修改基础规则类型
-	
-	'zskgetRulePage': '/klRule/getRulePage',//查询所有有效的规则
-	'zskgetRuleDetail': '/klRule/getRuleDetail',//根据录入内容查询有效规则的明细
+
+    'zskgetRulePage': '/klRule/getRulePage',//查询所有有效的规则
+    'zskgetRuleDetail': '/klRule/getRuleDetail',//根据录入内容查询有效规则的明细
 
     'importExcelDataVerify': '/tran/mappingConfig/importExcelDataVerify', //数据导入校验
+
+    'getStatistByDept': '/tran/log/getStatistByDept', //根据医院部门查看统计数据
   },
   menuIconList: { //菜单对应图标
     'YH-KZT': 'el-icon-menu',
@@ -187,50 +189,50 @@ export default {
   //   type: 类型:1-诊断、2-药品、3-检验套餐、4-检验明细、5-检查、6-手术和操作
   // contentTypes: 内容类型(多选):1-静态信息、2-注意事项、3-临床路径、4-治疗方案
   emData: [{
-      "name": "诊断",
-      "key": 1
-    },
-    {
-      "name": "检验套餐",
-      "key": 3
-    },
-    {
-      "name": "检验细项",
-      "key": 4
-    },
-    {
-      "name": "检查",
-      "key": 5
-    },
-    {
-      "name": "药品",
-      "key": 2
-    },
-    {
-      "name": "手术和操作",
-      "key": 6
-    },
+    "name": "诊断",
+    "key": 1
+  },
+  {
+    "name": "检验套餐",
+    "key": 3
+  },
+  {
+    "name": "检验细项",
+    "key": 4
+  },
+  {
+    "name": "检查",
+    "key": 5
+  },
+  {
+    "name": "药品",
+    "key": 2
+  },
+  {
+    "name": "手术和操作",
+    "key": 6
+  },
     // {
     //     "name":"科室",
     //     "key":18
     // },
   ],
   contentTypes: [{
-      "name": "静态信息",
-      "key": 1
-    },
-    {
-      "name": "注意事项",
-      "key": 2
-    },
-    {
-      "name": "临床路径",
-      "key": 3
-    },
-    {
-      "name": "一般治疗",
-      "key": 4
-    },
+    "name": "静态信息",
+    "key": 1
+  },
+  {
+    "name": "注意事项",
+    "key": 2
+  },
+  {
+    "name": "临床路径",
+    "key": 3
+  },
+  {
+    "name": "一般治疗",
+    "key": 4
+  },
 
   ],
   drugForm: [

+ 5 - 0
src/api/knowledgeLib.js

@@ -41,5 +41,10 @@ export default {
 	},
     getCallRecord(param){
         return axios.post(urls.getCallRecord, param)
+    },
+    getStatistByDept(param){
+        return axios.post(urls.getStatistByDept, param)
     }
+
+    
 }

+ 178 - 61
src/components/callRecord/CallRecordManager.vue

@@ -1,21 +1,24 @@
 <template>
   <div>
     <crumbs title="调用记录" style="min-width: 980px" class="knowledgeTitle">
+      <el-button size="mini" type="primary" @click="getInterface" class="btn"
+        >各科室接口调用统计</el-button
+      >
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item label="接收时间: ">
           &nbsp;&nbsp;
           <el-date-picker
             v-model="filter.recepDate"
-            type="datetimerange"
+            type="daterange"
             align="right"
             size="small"
             start-placeholder="开始时间"
             end-placeholder="结束时间"
-            style="width: 310px"
-            :default-time="['00:00:00', '23:59:59']"
-            format="yyyy-MM-dd HH:mm"
-            value-format="yyyy-MM-dd HH:mm"
+            style="width: 250px"
             :class="filter.recepDate === null ? 'active' : ''"
+            :default-time="['00:00:00', '23:59:59']"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd"
           >
           </el-date-picker>
         </el-form-item>
@@ -23,18 +26,27 @@
           >&nbsp;&nbsp;
           <el-date-picker
             v-model="filter.resDate"
-            type="datetimerange"
+            type="daterange"
             align="right"
             size="small"
             start-placeholder="开始时间"
             end-placeholder="结束时间"
-            style="width: 310px"
+            style="width: 250px"
             :default-time="['00:00:00', '23:59:59']"
-            format="yyyy-MM-dd HH:mm"
-            value-format="yyyy-MM-dd HH:mm"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd"
             unlink-panels
           >
           </el-date-picker>
+          <el-form-item label="患者标识:" prop="patientId">
+            <el-input
+              size="mini"
+              v-model="filter.patientId"
+              placeholder="请输入患者标识"
+              clearable
+              maxlength="50"
+            ></el-input>
+          </el-form-item>
         </el-form-item>
         <!-- <el-form-item label="状态:">
           <el-select
@@ -64,16 +76,15 @@
         </el-form-item> -->
       </el-form>
       <el-form class="secLine" :inline="true">
-        <el-form-item label="患者标识:" prop="patientId">
+        <el-form-item label="科室:" prop="deptName">
           <el-input
             size="mini"
-            v-model="filter.patientId"
-            placeholder="请输入患者标识"
+            v-model="filter.deptName"
+            placeholder="请输入科室"
             clearable
             maxlength="50"
           ></el-input>
         </el-form-item>
-
         <el-form-item label="服务名:" prop="sceneName">
           <el-input
             size="mini"
@@ -112,8 +123,9 @@
         </el-form-item>
       </el-form>
     </crumbs>
+
     <div class="contents knowledgeContents">
-      <el-table :data="list" border style="width: 100%">
+      <el-table :data="list" border style="width: 100%" size="mini">
         <!-- <el-table-column type="index" :index="indexMethod" label="编号" width="60"></el-table-column> -->
         <el-table-column label="患者标识" align="center" width="200">
           <template slot-scope="scope">
@@ -131,6 +143,11 @@
             }}</span>
           </template>
         </el-table-column>
+        <el-table-column label="科室" align="center">
+          <template slot-scope="scope">{{
+            scope.row.deptName || "-"
+          }}</template>
+        </el-table-column>
         <el-table-column label="服务名" align="center">
           <template slot-scope="scope">{{ scope.row.sceneName }}</template>
         </el-table-column>
@@ -262,6 +279,60 @@
       <el-dialog title="响应日志信息" :visible.sync="respVisible" width="660px">
         <div class="request-item">{{ result }}</div>
       </el-dialog>
+
+      <el-dialog
+        @close="closeInterface"
+        title="收货地址"
+        :visible.sync="dialogTableVisible"
+        width="660px"
+      >
+        <div class="Interface">
+          <el-form :inline="true">
+            <el-form-item label="日期:">
+              <el-date-picker
+                v-model="time"
+                type="daterange"
+                align="right"
+                size="small"
+                start-placeholder="开始时间"
+                end-placeholder="结束时间"
+                style="width: 250px"
+                :default-time="['00:00:00', '23:59:59']"
+                format="yyyy-MM-dd"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item>
+              <el-button size="mini" @click="getSure">检索</el-button>
+            </el-form-item>
+          </el-form>
+          <el-table
+            :data="gridData"
+            border
+            size="mini"
+            style="width: 100%"
+            height="400px"
+          >
+            <el-table-column property="deptName" label="科室">
+              <template slot-scope="scope">
+                <span>
+                  {{ scope.row.deptName || "-" }}
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              property="sums"
+              label="接口调用总次数"
+            ></el-table-column>
+          </el-table>
+        </div>
+        <div class="foot">
+          <el-button size="mini" type="primary" @click="closeInterface"
+            >关闭</el-button
+          >
+        </div>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -288,6 +359,7 @@ export default {
         successFlag: "",
         patientId: "",
         sceneName: "",
+        deptName: "", //科室
         subHospitalName: "", // 子院区
         recepDate: null, // 接收日期
         resDate: null, // 响应日期
@@ -303,7 +375,10 @@ export default {
       respVisible: false,
       params: "",
       result: "",
-      gmtReq: ''
+      gmtReq: "",
+      dialogTableVisible: false,
+      time: null,
+      gridData: [],
     };
   },
   created() {
@@ -312,15 +387,13 @@ export default {
     setTimeout(function () {
       that.getDataList();
     });
-
-    
   },
   computed: {
-  //   pickerOptions: {
-  //       disabledDate(time) {
-  //         return time.getTime() > Date.now()
-  //     }
-  // }
+    //   pickerOptions: {
+    //       disabledDate(time) {
+    //         return time.getTime() > Date.now()
+    //     }
+    // }
   },
   watch: {
     filter: {
@@ -371,7 +444,33 @@ export default {
       this.currentPage = 1;
       this.getDataList(1);
     },
-
+    //各科室接口调用统计
+    getInterface() {
+      this.dialogTableVisible = true;
+    },
+    closeInterface() {
+      this.dialogTableVisible = false;
+      this.time = null;
+      this.gridData = [];
+    },
+    getSure() {
+      let params = {
+        startGmtReq: this.time[0],
+        endGmtReq: this.time[1],
+      };
+      api
+        .getStatistByDept(params)
+        .then((res) => {
+          if (res.data.code == "0") {
+            this.gridData = res.data.data;
+          } else {
+            this.warning(res.data.msg || "获取列表数据失败");
+          }
+        })
+        .catch((error) => {
+          console.log(error);
+        });
+    },
     getDataList(flag, isTurnPage) {
       const params = this.getFilterItems(isTurnPage);
       this.searched = true;
@@ -387,7 +486,7 @@ export default {
           loading.close();
           if (res.data.code == "0") {
             const data = res.data.data;
-            console.log('data???', data);
+            console.log("data???", data);
             for (let j = 0; j < data.records.length; j++) {
               data.records[j].successFlag == "1" ? "成功" : "失败";
             }
@@ -400,7 +499,7 @@ export default {
               this.cacheData = {};
             }
             this.total = data.total;
-            console.log('total????', this.total);
+            console.log("total????", this.total);
             if (this.inCurrentPage !== undefined) {
               this.currentPage = this.inCurrentPage;
               this.inCurrentPage = undefined;
@@ -420,47 +519,51 @@ export default {
         this.clearFilter();
       }
 
-      //  接收时间 开始时间补0  结束时间补59
-      let startGmtReq, endGmtReq, startGmtResp, endGmtResp;
-      if (this.filter.recepDate) {
-        console.log(this.filter.recepDate[0].split(" "));
-        if (this.filter.recepDate[0].split(0, 9) === this.filter.recepDate[1].split(0, 9)) {
-          if (this.filter.recepDate[0]) {
-            startGmtReq = this.filter.recepDate[0] + ":00";
-            endGmtReq = this.filter.recepDate[1] + ":59";
-          }
-        } else {
-          startGmtReq = this.filter.recepDate[0] + ":00";
-          endGmtReq = this.filter.recepDate[1] + ":59";
-        }
-      }
+      // //  接收时间 开始时间补0  结束时间补59
+      // let startGmtReq, endGmtReq, startGmtResp, endGmtResp;
+      // if (this.filter.recepDate) {
+      //   console.log(this.filter.recepDate[0].split(" "));
+      //   if (
+      //     this.filter.recepDate[0].split(0, 9) ===
+      //     this.filter.recepDate[1].split(0, 9)
+      //   ) {
+      //     if (this.filter.recepDate[0]) {
+      //       startGmtReq = this.filter.recepDate[0] + ":00";
+      //       endGmtReq = this.filter.recepDate[1] + ":59";
+      //     }
+      //   } else {
+      //     startGmtReq = this.filter.recepDate[0] + ":00";
+      //     endGmtReq = this.filter.recepDate[1] + ":59";
+      //   }
+      // }
 
-      //  响应时间 开始时间补0  结束时间补59
-      if (this.filter.resDate) {
-        if (
-          this.filter.resDate[0].split(0, 9) ===
-          this.filter.resDate[1].split(0, 9)
-        ) {
-          if (this.filter.resDate[0]) {
-            startGmtResp = this.filter.resDate[0] + ":00";
-            endGmtResp = this.filter.resDate[1] + ":59";
-          }
-        } else {
-          startGmtResp = this.filter.resDate[0] + ":00";
-          endGmtResp = this.filter.resDate[1] + ":59";
-        }
-      }
+      // //  响应时间 开始时间补0  结束时间补59
+      // if (this.filter.resDate) {
+      //   if (
+      //     this.filter.resDate[0].split(0, 9) ===
+      //     this.filter.resDate[1].split(0, 9)
+      //   ) {
+      //     if (this.filter.resDate[0]) {
+      //       startGmtResp = this.filter.resDate[0] + ":00";
+      //       endGmtResp = this.filter.resDate[1] + ":59";
+      //     }
+      //   } else {
+      //     startGmtResp = this.filter.resDate[0] + ":00";
+      //     endGmtResp = this.filter.resDate[1] + ":59";
+      //   }
+      // }
 
       const param = {
         current: this.inCurrentPage || this.currentPage,
         size: this.pageSize,
         patientId: this.filter.patientId.trim(), // 患者标识
         sceneName: this.filter.sceneName.trim(), // 服务名
+        deptName: this.filter.deptName.trim(), // 服务名
         successFlag: this.filter.successFlag,
-        startGmtReq: startGmtReq,
-        endGmtReq: endGmtReq,
-        startGmtResp: startGmtResp,
-        endGmtResp: endGmtResp,
+        startGmtReq: this.filter.recepDate ? this.filter.recepDate[0] : "",
+        endGmtReq: this.filter.recepDate ? this.filter.recepDate[1] : "",
+        startGmtResp: this.filter.resDate ? this.filter.resDate[0] : "",
+        endGmtResp: this.filter.resDate ? this.filter.resDate[1] : "",
         subHospitalName: this.filter.subHospitalName.trim(), // 子院区
       };
       return param;
@@ -657,7 +760,7 @@ export default {
 }
 
 .el-time-panel__footer {
-  /deep/.confirm{
+  /deep/.confirm {
     color: #48c5d7 !important;
   }
 }
@@ -665,6 +768,20 @@ export default {
 .active {
   color: #ff0000;
 }
-
-
+.btn {
+  position: absolute;
+  left: 31px;
+  top: 50px;
+}
+.Interface {
+  padding: 0 24px;
+  .el-table {
+    min-width: 100% !important;
+  }
+}
+.foot {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+}
 </style>

+ 1 - 1
vue.config.js

@@ -1,7 +1,7 @@
 const path = require('path');
 //const proxy_path = 'http://192.168.2.241:80';
 // const proxy_path = 'http://192.168.2.241:84';
-const proxy_path = 'http://192.168.2.241:6060';
+const proxy_path = 'http://192.168.2.236:6060';
 //const proxy_path = 'http://192.168.2.236:88';
 //const proxy_path = 'http://192.168.2.236:6060';
 //const proxy_path = 'http://192.168.2.241:6060';