gaohaiyong 9 ヶ月 前
コミット
63bb2e6dbb

+ 1 - 0
.env.development

@@ -3,3 +3,4 @@ ENV = 'development'
 
 # base api
 VUE_APP_BASE_API = '/dev-api'
+VUE_APP_BASE_API2 = '/bazb'

+ 1 - 0
.env.production

@@ -3,3 +3,4 @@ ENV = 'production'
 
 # base api
 VUE_APP_BASE_API = '/admin'
+VUE_APP_BASE_API2 = '/bazb'

+ 4 - 3
src/api/qc.js

@@ -1,5 +1,5 @@
 import request from '@/utils/request'
-
+import request2 from '@/utils/request_bazb'
 // 病案室-质控列表
 export function getBlZkList(data) {
   return request({
@@ -20,8 +20,9 @@ export function getBlMenuList(data) {
 
 // 病案室-病案详情-右侧质控栏
 export function getCaseQuality(data) {
-  return request({
-    url: '/bl_zk/getCaseQuality',
+  return request2({
+    // url: '/bl_zk/getCaseQuality',
+    url: '/get_case_quality_v2',
     method: 'post',
     data: data
   })

+ 96 - 0
src/utils/request_bazb.js

@@ -0,0 +1,96 @@
+import axios from 'axios'
+import { Message } from 'element-ui'
+import { getToken, removeToken } from '@/utils/auth'
+import router, { resetRouter } from '@/router'
+
+// create an axios instance
+const service = axios.create({
+  baseURL: process.env.VUE_APP_BASE_API2, // url = base url + request url
+  timeout: 10000 // request timeout
+  // transformRequest: [function(data) { // 转换数据
+  //   const form = new FormData()
+  //   if (!data) {
+  //     return form
+  //   }
+  //   Object.keys(data).forEach(k => {
+  //     const v = (data[k] !== 0 && !data[k] || data[k] === null ? '' : data[k])
+  //     if (Array.isArray(v) && v !== null) {
+  //       Object.keys(v).forEach(key => {
+  //         const vv = (!v[key] || v[key] === null ? '' : v[key])
+  //         form.append(`${k}[${key}]`, vv)
+  //       })
+  //     } else {
+  //       form.append(k, v)
+  //     }
+  //   })
+  //   return form
+  // }],
+  // headers: {
+  //   'Content-Type': 'application/x-www-form-urlencoded'
+  // }
+})
+
+// request interceptor
+service.interceptors.request.use(
+  config => {
+    // do something before request is sent
+
+    if (getToken()) {
+      // console.log(config, getToken())
+      // let each request carry token
+      // ['X-Token'] is a custom headers key
+      // please modify it according to the actual situation
+      config.headers['token'] = getToken()
+    }
+    return config
+  },
+  error => {
+    // do something with request error
+    console.log(error) // for debug
+    return Promise.reject(error)
+  }
+)
+
+// response interceptor
+service.interceptors.response.use(
+  /**
+   * If you want to get http information such as headers or status
+   * Please return  response => response
+  */
+
+  /**
+   * Determine the request status by custom code
+   * Here is just an example
+   * You can also judge the status by HTTP Status Code
+   */
+  response => {
+    const res = response.data
+    // if the custom code is not 20000, it is judged as an error.
+    if (res.c !== 0) {
+      Message({
+        message: 'massage: ' + res.m,
+        type: 'error',
+        duration: 3 * 1000
+      })
+      if (res.c === 1004) {
+        removeToken()
+        resetRouter()
+        router.push(`/login`)
+      }
+      return Promise.reject(new Error(res.m || 'Error'))
+    } else {
+      return res
+    }
+  },
+  error => {
+    console.log('err' + error) // for debug
+    Message({
+      message: error.message,
+      type: 'error',
+      duration: 5 * 1000
+    })
+    return Promise.reject(error)
+  }
+)
+
+export default service

+ 5 - 1
src/views/recordsRoom/qc/caseAppeal.vue

@@ -8,7 +8,11 @@
         style="width: 100%"
       >
         <el-table-column type="index" label="序号" width="80" />
-        <el-table-column>
+        <el-table-column
+          prop=""
+          label="审核状态"
+          width="80"
+          show-overflow-tooltip>
           <template slot-scope="scope">
             <span v-if="scope.row.status == 0">待审核</span>
             <span v-if="scope.row.status == 1">通过</span>

+ 18 - 6
src/views/recordsRoom/qc/caseViews.vue

@@ -173,6 +173,7 @@ import DeathText from './components/DeathText.vue'
 import CreateControlResultDialogVue from './components/CreateControlResultDialog.vue'
 import { getBlMenuList, getCaseQuality, getCasePlatform, getAllCase, getLong, getTemporary, getPacsData, getBcData, getHomeData, getSurgeryData, getBlInfo } from '@/api/qc'
 import { getCaseExamineAppeal } from '@/api/admin'
+import { getToken, removeToken } from '@/utils/auth'
 
 export default {
   components: {
@@ -387,12 +388,23 @@ export default {
     },
     // 获取新病案指控结果
     getCaseQualityResults() {
-      const params = {
-        ZYH: Number(this.valData)
-      }
-      getCaseQuality(params).then(res => {
-        const { p } = res
-        this.results = p
+      let that = this;
+      // const params = {
+      //   ZYH: Number(this.valData)
+      // }
+      // getCaseQuality(params).then(res => {
+      //   const { p } = res
+      //   this.results = p
+      // })
+      that.axios({
+        url:'http://10.10.11.65:8081/bazb/get_case_quality_v2',
+        method: 'post',
+        headers: { 'content-type': 'application/json', 'token': getToken() },
+        data: {
+          ZYH: Number(that.valData)
+        }
+      }).then(res => {
+        this.results = res.data
       })
     },
     reload() {

+ 8 - 1
vue.config.js

@@ -46,7 +46,14 @@ module.exports = {
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: '/admin/'
         }
-      }
+      },
+      [process.env.VUE_APP_BASE_API2]: {
+        target: 'http://182.43.50.128:8083',
+        changeOrigin: true,
+        pathRewrite: {
+          ['^' + process.env.VUE_APP_BASE_API2]: '/bazb/'
+        }
+      },
     },
     port: port,
     open: true,