qx
qx
2025-02-13 6efb6de42127cd36d893ae0c6a0f55dcae457754
qx
5个文件已修改
47 ■■■■■ 已修改文件
src/api/jmreport/jimu.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/permission.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/checkAll/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/jmreport/jmreport/index.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/jmreport/jimu.js
@@ -1,14 +1,23 @@
import request from '@/utils/request'
import Cookies from "js-cookie"
export function indexUrl(query) {
  return request({
    url: '/report/jmreport/index',
    headers: {
      hospId:Cookies.get("hospId")
    },
    method: 'get'
  })
}
// 预览
export function view(query) {
  return request({
    url: '/report/jmreport/view',
    headers: {
      hospId:Cookies.get("hospId")
    },
    method: 'get'
  })
}
src/permission.js
@@ -45,6 +45,7 @@
      // 在免登录白名单,直接进入
      next()
    } else {
      // next(`/login?redirect=${to.fullPath}}`)
      // next(`/login?redirect=${to.fullPath}&hospId=${to.meta.routerType}`) // 否则全部重定向到登录页
      next({
        path:"/login",
src/utils/request.js
@@ -28,7 +28,6 @@
  const isRepeatSubmit = (config.headers || {}).repeatSubmit === false
  if (getToken() && !isToken) {
    config.headers['Authorization'] = 'Bearer ' + getToken()
    console.log(store)
    config.headers['hospId'] = Cookies.get("hospId");
  }
  if (config.method === 'get' && config.params) {
src/views/doctor/checkAll/index.vue
@@ -745,6 +745,14 @@
                      width="78"
                    >
                    </el-table-column>
                    <el-table-column
      fixed="right"
      label="操作"
      width="100">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)"  type="danger" size="small">删除</el-button>
      </template>
    </el-table-column>
                  </el-table>
                </template>
                <template v-if="item.jyjc == '1'">
src/views/jmreport/jmreport/index.vue
@@ -1,6 +1,8 @@
<template>
  <div v-loading="loading" :style="'height:'+ height">
    <iframe :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto" />
    <!-- <iframe :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto" /> -->
    <iframe :src="srcs" frameborder="no" style="width: 100%;height: 100%" scrolling="auto" />
  </div>
</template>
<script>
@@ -10,18 +12,40 @@
  import {
    indexUrl
  } from '@/api/jmreport/jimu'
  import Cookies from "js-cookie"
  import axios from 'axios';
  export default {
    name: "Ureport",
    data() {
      return {
        src: "",
        srcs:"",
        height: document.documentElement.clientHeight - 94.5 + "px;",
        loading: true,
      };
    },
    created() {
      indexUrl().then(res => {
        this.src = res + "?token=Bearer " + getToken();
        this.srcs = res + "?token=Bearer " + getToken();
        try{
          axios({
            method:"get",
            url: this.srcs,
            headers: {
                  hospId:Cookies.get("hospId")
            }
          }).then(res => {
            this.src=res
          })
          // const response =  axios.get("this.src",{
          //   headers: {
          //         hospId:Cookies.get("hospId")
          //   }
          // });
        }catch(error){
          console.log(error)
        }
      })
    },