Browse Source

优化以及修改bug

DESKTOP-MINPJAU\Administrator 3 years ago
parent
commit
9c51cc0bc2

+ 9 - 0
src/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing.js

@@ -117,6 +117,15 @@ export function biaoBenApi(name) {
     })
 }
 
+
+export function viewInspectionItemDetails(orderCode) {
+    return request({
+        url: url + 'viewInspectionItemDetails',
+        method: 'get',
+        params: {orderCode}
+    })
+}
+
 export function shanChuJianChaJianYan(reqNo, patNo, times) {
     return request({
         url: url + 'shanChuJianChaJianYan',

+ 2 - 2
src/components/zhu-yuan-yi-sheng/TianJiaJianChaJianYan.vue → src/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianChaJianYan.vue

@@ -384,8 +384,8 @@ const starAdd = (obj) => {
 }
 
 const deleteInspectionCheck = (index) => {
-  xuanZhongJianCha.data.splice(index, 1)
-  xuanZhongJianCha.weiBianMa.splice(index, 1)
+  xuanZhongJianCha.value.data.splice(index, 1)
+  xuanZhongJianCha.value.weiBianMa.splice(index, 1)
 }
 
 onMounted(() => {

+ 2 - 2
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunMuBan.vue

@@ -36,8 +36,8 @@ const user = computed(() => {
 const dialog = ref(false)
 const title = ref('')
 const flag = ref(1)
-const quanYuanFlag = noNeedRule([1, 38])
-const keZhuRenFlag = noNeedRule([1, 38, 11])
+const quanYuanFlag = noNeedRule(1, 38)
+const keZhuRenFlag = noNeedRule(1, 38, 11)
 // 模板名称
 const patternCode = ref('')
 const patternName = ref('')

+ 2 - 2
src/utils/public.js

@@ -1,6 +1,6 @@
 import store from '@/store'
 
-export function noNeedRule(val) {
+export function noNeedRule(...val) {
     const userRoles = store.state.user.info.roles
     for (let i = 0; i < val.length; i++) {
         if (userRoles.includes(val[i])) {
@@ -10,7 +10,7 @@ export function noNeedRule(val) {
     return true;
 }
 
-export function needRule(val) {
+export function needRule(...val) {
     const userRoles = store.state.user.info.roles
     for (let i = 0; i < val.length; i++) {
         if (userRoles.includes(val[i])) {

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/XinZengShuJu.vue

@@ -11,7 +11,7 @@
 import TianJiaYiZhu from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue";
 import {onActivated, onDeactivated, ref} from "vue";
 import router from '@/router'
-import TianJiaJianChaJianYan from "@/components/zhu-yuan-yi-sheng/TianJiaJianChaJianYan.vue";
+import TianJiaJianChaJianYan from "@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianChaJianYan.vue";
 import XinZengShouShuShenQing
   from "@/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/XinZengShouShuShenQing.vue";
 import XinZhenCaoYao from "@/views/hospitalization/zhu-yuan-yi-sheng/cao-yao-yi-zhu/XinZhengCaoYao.vue";

+ 13 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/BianJiJianChaJianYanShenQing.vue

@@ -202,11 +202,21 @@ const daKaiBenDuiHua = async (val, xiaBiao, zhongShu) => {
   count.value = zhongShu
   bianJiJianChaShuJu.value = val
   if (stringNotBlank(val.diagCode)) {
-    linChuangZhenDuanShuJu.value.push({code: val.diagCode, name: val.diagText})
+    let index = linChuangZhenDuanShuJu.value.findIndex(item => {
+      return item.code === val.diagCode
+    })
+    if (index === -1) {
+      linChuangZhenDuanShuJu.value.push({code: val.diagCode, name: val.diagText});
+    }
   }
   if (!props.jianCha) {
-    if (stringNotBlank(val.inspectStuffName)) {
-      biaoBenShuJu.value.push({code: val.inspectStuff, name: val.inspectStuffName})
+    if (stringNotBlank(val.inspectStuff)) {
+      let index = biaoBenShuJu.value.findIndex(item => {
+        return item.code === val.inspectStuff
+      })
+      if (index === -1) {
+        biaoBenShuJu.value.push({code: val.inspectStuff, name: val.inspectStuffName})
+      }
     }
   }
   enableShortcutKeys()

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianChaShenQing.vue

@@ -73,7 +73,7 @@ import store from '@/store'
 import DaYingJianCha from '@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/da-ying/DaYingJianCha.vue'
 import { getDateRangeFormatDate, huanHangXianShi } from '@/utils/date'
 import { shortcuts } from '@/data/shortcuts'
-import TianJiaJianChaJianYan from '@/components/zhu-yuan-yi-sheng/TianJiaJianChaJianYan.vue'
+import TianJiaJianChaJianYan from '@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/TianJiaJianChaJianYan.vue'
 import router from '@/router'
 import { ElMessageBox } from 'element-plus'
 

+ 71 - 42
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianYanShenQing.vue

@@ -3,24 +3,24 @@
     <el-header style="height: 30px">
       检验名称:
       <el-autocomplete
-        v-model="chaXunJianYanTiaoJian.orderName"
-        :fetch-suggestions="querySearchAsync"
-        clearable
-        style="width: 120px"
-        @keyup.enter="dianJiChaXunJianYan(0)"
+          v-model="chaXunJianYanTiaoJian.orderName"
+          :fetch-suggestions="querySearchAsync"
+          clearable
+          style="width: 120px"
+          @keyup.enter="dianJiChaXunJianYan(0)"
       ></el-autocomplete>
       检验时间:
       <el-date-picker
-        v-model="dateRange"
-        :shortcuts="shortcuts"
-        clearable
-        end-placeholder="结束日期"
-        placeholder="选择日期"
-        range-separator="至"
-        size="small"
-        start-placeholder="开始日期"
-        style="width: 280px"
-        type="daterange"
+          v-model="dateRange"
+          :shortcuts="shortcuts"
+          clearable
+          end-placeholder="结束日期"
+          placeholder="选择日期"
+          range-separator="至"
+          size="small"
+          start-placeholder="开始日期"
+          style="width: 280px"
+          type="daterange"
       ></el-date-picker>
       <el-divider direction="vertical"></el-divider>
       <el-button icon="Search" type="primary" @click="dianJiChaXunJianYan(0)">查询</el-button>
@@ -38,20 +38,36 @@
         <el-table-column label="申请科室" prop="reqDeptName"></el-table-column>
         <el-table-column label="申请医生" prop="reqDoctorName"></el-table-column>
         <el-table-column label="接受" prop="receiveFlagName"></el-table-column>
-        <el-table-column label="操作">
+        <el-table-column label="操作" width="250" fixed="right">
           <template #default="scope">
-            <el-button icon="Delete" type="danger" @click="dianJiShanChu(scope.row, scope.$index)">删除</el-button>
+            <el-popover :width="500"
+                        trigger="click"
+                        placement="left"
+                        title="费用详情">
+              <template #reference>
+                <el-button icon="View" type="primary" text @click="viewFeeDetails(scope.row )">查看详情</el-button>
+              </template>
+              <el-table :data="feeDetailsData">
+                <el-table-column property="orderCode" label="检查编码"/>
+                <el-table-column property="occCode" label="收费编码"/>
+                <el-table-column property="name" label="名字"/>
+                <el-table-column property="amount" label="数量"/>
+                <el-table-column property="chargeAmount" label="金额"/>
+                <el-table-column property="unitPrice" label="单价"/>
+              </el-table>
+            </el-popover>
+            <el-button icon="Delete" type="danger" text @click="dianJiShanChu(scope.row, scope.$index)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
       <el-pagination
-        :current-page="chaXunJianYanTiaoJian.currentPage"
-        :page-size="chaXunJianYanTiaoJian.pageSize"
-        :page-sizes="[10, 20, 30, 40]"
-        :total="chaXunJianYanTiaoJian.currentPage"
-        layout="total, sizes, prev, pager, next, jumper"
-        @size-change="jianYanTiaoShu"
-        @current-change="jianYanFenYe"
+          :current-page="chaXunJianYanTiaoJian.currentPage"
+          :page-size="chaXunJianYanTiaoJian.pageSize"
+          :page-sizes="[10, 20, 30, 40]"
+          :total="chaXunJianYanTiaoJian.currentPage"
+          layout="total, sizes, prev, pager, next, jumper"
+          @size-change="jianYanTiaoShu"
+          @current-change="jianYanFenYe"
       >
       </el-pagination>
     </el-main>
@@ -59,15 +75,19 @@
 </template>
 
 <script name="JianYanShenQing" setup>
-import { computed, ref, watch } from 'vue'
-import { shortcuts } from '@/data/shortcuts'
+import {computed, ref, watch} from 'vue'
+import {shortcuts} from '@/data/shortcuts'
 import store from '@/store'
-import { getDateRangeFormatDate, getFormatDatetime } from '@/utils/date'
-import { huanZheXinXi, youWuXuanZheHuanZhe } from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
-import { huoQuJianYan, huoQuJianYanJianChaMing, shanChuJianChaJianYan } from '@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing'
+import {getDateRangeFormatDate, getFormatDatetime} from '@/utils/date'
+import {huanZheXinXi, youWuXuanZheHuanZhe} from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
+import {
+  huoQuJianYan,
+  huoQuJianYanJianChaMing,
+  shanChuJianChaJianYan, viewInspectionItemDetails
+} from '@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing'
 import router from '@/router'
-import { ElMessageBox } from 'element-plus'
-import { getServerDateApi } from '@/api/public-api'
+import {ElMessageBox} from 'element-plus'
+import {getServerDateApi} from '@/api/public-api'
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -121,21 +141,30 @@ const querySearchAsync = (val, cb) => {
   })
 }
 
+let feeDetailsData = $ref([])
+
+const viewFeeDetails = ({orderCode}) => {
+  viewInspectionItemDetails(orderCode).then((res) => {
+    feeDetailsData = res
+  })
+}
+
 const dianJiShanChu = (row, index) => {
   ElMessageBox.confirm(`您确定要删除【${row.orderName}】吗?`, '提示')
-    .then(() => {
-      shanChuJianChaJianYan(row.reqNo, row.inpatientNo, row.admissTimes).then((res) => {
-        jianYanShuJu.value.splice(index, 1)
+      .then(() => {
+        shanChuJianChaJianYan(row.reqNo, row.inpatientNo, row.admissTimes).then((res) => {
+          jianYanShuJu.value.splice(index, 1)
+        })
+      })
+      .catch(() => {
       })
-    })
-    .catch(() => {})
 }
 
 const dianJiXinZengJianYan = () => {
   router.push({
     name: 'xinZengShuJu',
-    params: { passRule: true, name: '检验' },
-    query: { path: '/inpatient/zhuYuanYiSheng/jianYanShenQing' },
+    params: {passRule: true, name: '检验'},
+    query: {path: '/inpatient/zhuYuanYiSheng/jianYanShenQing'},
   })
 }
 
@@ -157,10 +186,10 @@ const dianJiChaKanHuanZheJianYan = () => {
 }
 
 watch(
-  () => huanZheXinXi.value,
-  () => {
-    dianJiChaXunJianYan(0)
-  }
+    () => huanZheXinXi.value,
+    () => {
+      dianJiChaXunJianYan(0)
+    }
 )
 </script>
 

+ 9 - 13
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue

@@ -104,7 +104,7 @@
       <el-col :span="span">
         <el-form-item label="父医嘱:" prop="orderName">
           <el-select v-model="yiZhuData.parentNo" :disabled="yiZhuData.serial === '00'" clearable
-                     @clear="yiZhuData.parentNo = null" @click="fuYiZhuClick">
+                     @clear="yiZhuData.parentNo = null" @focus="fuYiZhuClick">
             <el-option v-for="item in fuYiZhuData" :key="item.code" :label="item.name" :value="item.code">
               <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
               <el-divider direction="vertical"></el-divider>
@@ -542,11 +542,8 @@ const geiYaoFangShiRemoteMethod = (val) => {
 /* 父医嘱 */
 const fuYiZhuData = ref([])
 const fuYiZhuClick = () => {
-  fuYiZhuData.value = []
-  yiZhuList.value.forEach((item, index) => {
-    if (stringNotBlank(item.drugFlag) && item.drugFlag === 'i' && item.id !== yiZhuData.value.id && stringIsBlank(item.parentNo)) {
-      fuYiZhuData.value.push({code: item.id, name: item.orderName})
-    }
+  fuYiZhuData.value = yiZhuList.value.filter(item => {
+    return stringNotBlank(item.drugFlag) && item.drugFlag === 'i' && item.id !== yiZhuData.value.id && stringIsBlank(item.parentNo)
   })
 }
 
@@ -677,13 +674,12 @@ function baoCunYiZhu() {
     cfType: '1',
     list: yiZhuList.value,
   }
-  if (listNotBlank(list)) {
-    // 合理用药校验
-    jiaoYan(data).then((res) => {
-      console.log(res)
-    })
-  }
-  return
+  // if (listNotBlank(list)) {
+  //   // 合理用药校验
+  //   jiaoYan(data).then((res) => {
+  //     console.log(res)
+  //   })
+  // }
   ElMessageBox.confirm('您确定要保存这些数据吗?请仔细检查数据。', '提示', {
     type: 'warning',
     closeOnClickModal: false,

+ 81 - 69
src/views/med-tec-mod/MenZhenXiangMu.vue

@@ -2,17 +2,18 @@
   <el-container>
     <el-header>
       <el-date-picker
-        v-model="dateRange"
-        :shortcuts="shortcuts"
-        end-placeholder="结束日期"
-        placeholder="选择日期"
-        range-separator="至"
-        start-placeholder="开始日期"
-        style="width: 280px"
-        type="daterange"
+          v-model="dateRange"
+          :shortcuts="shortcuts"
+          end-placeholder="结束日期"
+          placeholder="选择日期"
+          range-separator="至"
+          start-placeholder="开始日期"
+          style="width: 280px"
+          type="daterange"
       ></el-date-picker>
       患者ID:
-      <el-input v-model="patientId" clearable style="width: 120px" @blur="patientId = $event.target.value.trim()" @keyup.enter="getMzPatientClick"></el-input>
+      <el-input v-model="patientId" clearable style="width: 120px" @blur="patientId = $event.target.value.trim()"
+                @keyup.enter="getMzPatientClick"></el-input>
       <el-select v-model="xiangMuZhuangTai" style="width: 90px">
         <el-option v-for="item in xiangMuZhuangTaiData" :key="item.code" :label="item.name" :value="item.code">
           <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
@@ -24,7 +25,7 @@
       <el-button icon="Search" type="primary" @click="kuaiSuChaZhaoClick"> 快速查找</el-button>
       <el-button icon="Search" type="warning" @click="chaoZuoZhiNanDialog = true"> 操作指南</el-button>
       <el-button icon="Upload" type="success" @click="baoCunClick"> 保存</el-button>
-      <br />
+      <br/>
       <el-tag effect="dark" size="small">患者姓名: {{ patient.name }}</el-tag>
       <el-tag effect="dark" size="small" type="warning">性别:{{ cptSex(patient.sex) }}</el-tag>
       <el-tag effect="dark" size="small">出生日期: {{ patient.birthDay }}</el-tag>
@@ -34,14 +35,18 @@
       <el-main>
         <el-row>
           <el-col :span="4">
-            <el-table :data="shouFeiData" :height="windowsHeight / 1.1" highlight-current-row stripe @cell-click="getFeiYongXinXiClick">
+            <el-table :data="shouFeiData" :height="windowsHeight / 1.1" highlight-current-row stripe
+                      @cell-click="getFeiYongXinXiClick">
               <el-table-column label="收费信息">
                 <el-table-column label="缴费日期" prop="chargeDate" width="80"></el-table-column>
                 <el-table-column label="流水号">
                   <template #default="scope">
                     <el-popover :width="800" placement="right" trigger="click">
                       <template #reference>
-                        <el-button type="success" @click="getFeiYongXinXiClick(scope.row)">{{ scope.row.realNo }} </el-button>
+                        <el-button type="success" @click="getFeiYongXinXiClick(scope.row)">{{
+                            scope.row.realNo
+                          }}
+                        </el-button>
                       </template>
                       <el-table :data="feiYongData" :height="windowsHeight / 2" highlight-current-row stripe>
                         <el-table-column label="缴费明细信息">
@@ -71,7 +76,9 @@
                 <el-table-column label="待确认标志" prop="confirmFlag" width="250">
                   <template #default="scope">
                     <el-radio-group v-model="scope.row.confirmFlag">
-                      <el-radio-button :disabled="scope.row.xiangMuZhuangTai === 1 || scope.row.xiangMuZhuangTai === 3" :label="0"> 未确认 </el-radio-button>
+                      <el-radio-button :disabled="scope.row.xiangMuZhuangTai === 1 || scope.row.xiangMuZhuangTai === 3"
+                                       :label="0"> 未确认
+                      </el-radio-button>
                       <el-radio-button :label="1">确认</el-radio-button>
                       <el-radio-button :label="3">取消</el-radio-button>
                     </el-radio-group>
@@ -108,48 +115,54 @@
   </el-container>
   <el-dialog v-model="kuaiSuChaZhaoDialog" title="点击表格中的姓名即可">
     <el-table
-      :data="kuaiSuChaZhaoData.list.slice((kuaiSuChaZhaoData.currentPage - 1) * kuaiSuChaZhaoData.pageSize, kuaiSuChaZhaoData.pageSize * kuaiSuChaZhaoData.currentPage)"
-      :height="windowsHeight / 2"
-      highlight-current-row
-      stripe
-      @cell-click="chaZhaoTable"
+        :data="kuaiSuChaZhaoData.list.slice((kuaiSuChaZhaoData.currentPage - 1) * kuaiSuChaZhaoData.pageSize, kuaiSuChaZhaoData.pageSize * kuaiSuChaZhaoData.currentPage)"
+        :height="windowsHeight / 2"
+        highlight-current-row
+        stripe
+        @cell-click="chaZhaoTable"
     >
       <el-table-column label="姓名" prop="name"></el-table-column>
       <el-table-column label="门诊号" prop="patientId"></el-table-column>
     </el-table>
     <el-pagination
-      :current-page="kuaiSuChaZhaoData.currentPage"
-      :page-size="kuaiSuChaZhaoData.pageSize"
-      :total="kuaiSuChaZhaoData.list.length"
-      background
-      layout="total,  prev, pager, next, jumper"
-      @current-change="kuaiSuChaZhaoCurrent"
+        :current-page="kuaiSuChaZhaoData.currentPage"
+        :page-size="kuaiSuChaZhaoData.pageSize"
+        :total="kuaiSuChaZhaoData.list.length"
+        background
+        layout="total,  prev, pager, next, jumper"
+        @current-change="kuaiSuChaZhaoCurrent"
     >
     </el-pagination>
   </el-dialog>
   <el-dialog v-model="chaoZuoZhiNanDialog" title="操作指南">
-    一、查询<br /><br />
-    1、选择好时间以及患者的门诊号(门诊号或者诊疗卡号),在选择是否查看已经确认的还是未确认的 点击查询即可。<br />
-    2、快速查询,只针对医生开了执行科室为本科室的才有用,没有带执行科室的请手动输入门诊号查询,是根据日期来查询的。<br />
-    3、如果感觉有点卡的话那么就日期范围选择短一些<br /><br />
-    二、数据<br /><br />
-    1、点击右边侧边栏的表格,开在本科室的项目就会显示在左边,点击流水号,能看到这个费用的明细<br />
-    2、点击中间的表格,选择您需要进行的操作。<br />
-    3、点击申请号,可也看见套餐的明细。<br /><br />
-    三、保存<br /><br />
-    1、在选择完数据后点击保存即可。 <br />
+    一、查询<br/><br/>
+    1、选择好时间以及患者的门诊号(门诊号或者诊疗卡号),在选择是否查看已经确认的还是未确认的 点击查询即可。<br/>
+    2、快速查询,只针对医生开了执行科室为本科室的才有用,没有带执行科室的请手动输入门诊号查询,是根据日期来查询的。<br/>
+    3、如果感觉有点卡的话那么就日期范围选择短一些<br/><br/>
+    二、数据<br/><br/>
+    1、点击右边侧边栏的表格,开在本科室的项目就会显示在左边,点击流水号,能看到这个费用的明细<br/>
+    2、点击中间的表格,选择您需要进行的操作。<br/>
+    3、点击申请号,可也看见套餐的明细。<br/><br/>
+    三、保存<br/><br/>
+    1、在选择完数据后点击保存即可。 <br/>
   </el-dialog>
 </template>
 <script>
-import { shortcuts } from '@/data/shortcuts'
-import { ref } from 'vue'
-import { cptSex } from '@/utils/computed'
-import { getFeiYongXinXi, getMzPatient, kuaiSuChaZhao, menZhenXiangMuQuXiaoHuoQueRen } from '@/api/zhu-yuan-yi-ji/men-zhen-xiang-mu'
-import { getDateRangeFormatDate } from '@/utils/date'
+import {shortcuts} from '@/data/shortcuts'
+import {ref} from 'vue'
+import {cptSex} from '@/utils/computed'
+import {
+  getFeiYongXinXi,
+  getMzPatient,
+  kuaiSuChaZhao,
+  menZhenXiangMuQuXiaoHuoQueRen
+} from '@/api/zhu-yuan-yi-ji/men-zhen-xiang-mu'
+import {getDateRangeFormatDate} from '@/utils/date'
 import store from '@/store'
-import { clone } from '@/utils/clone.js'
-import { ElMessage, ElMessageBox } from 'element-plus'
-import { listIsBlank, stringIsBlank } from '@/utils/blank-utils'
+import {clone} from '@/utils/clone.js'
+import {ElMessage, ElMessageBox} from 'element-plus'
+import {listIsBlank, stringIsBlank} from '@/utils/blank-utils'
+import {needRule} from "@/utils/public";
 
 export default {
   setup() {
@@ -177,15 +190,15 @@ export default {
       danGeXingXi.value = []
       let dateR = getDateRangeFormatDate(dateRange.value)
       getMzPatient(patientId.value, xiangMuZhuangTai.value, dateR.startTime, dateR.endTime, store.state.user.info.deptCode)
-        .then((res) => {
-          patientId.value = res.patientId
-          patient.value = res
-          patient.value.birthDay = patient.value.birthDay.split(' ')[0]
-          shouFeiData.value = res.list
-        })
-        .catch(() => {
-          patient.value = {}
-        })
+          .then((res) => {
+            patientId.value = res.patientId
+            patient.value = res
+            patient.value.birthDay = patient.value.birthDay.split(' ')[0]
+            shouFeiData.value = res.list
+          })
+          .catch(() => {
+            patient.value = {}
+          })
     }
 
     const lingShiBaoCunJiaoFeiMingXi = ref({})
@@ -197,10 +210,8 @@ export default {
         feiYongData.value = res
         lingShiBaoCunJiaoFeiMingXi.value = clone(val)
         let dept = store.state.user.info.deptCode
-        if (rolesList.indexOf(1) > -1) {
-          for (let i = 0; i < feiYongData.value.length; i++) {
-            keQueRenData.value.push(clone(feiYongData.value[i]))
-          }
+        if (needRule(1)) {
+          keQueRenData.value = clone(feiYongData.value)
         } else {
           keQueRenData.value = feiYongData.value.filter((item) => {
             return item.execDept === dept || stringIsBlank(item.execDept)
@@ -231,19 +242,20 @@ export default {
       ElMessageBox.confirm('请确认数据', '提示', {
         type: 'warning',
       })
-        .then(() => {
-          let baoCun = {
-            list: list,
-            realNo: lingShiBaoCunJiaoFeiMingXi.value.realNo,
-            patientId: lingShiBaoCunJiaoFeiMingXi.value.patientId,
-            times: lingShiBaoCunJiaoFeiMingXi.value.times,
-            execDept: store.state.user.info.deptCode,
-          }
-          menZhenXiangMuQuXiaoHuoQueRen(baoCun).then((res) => {
-            keQueRenData.value = []
+          .then(() => {
+            let baoCun = {
+              list: list,
+              realNo: lingShiBaoCunJiaoFeiMingXi.value.realNo,
+              patientId: lingShiBaoCunJiaoFeiMingXi.value.patientId,
+              times: lingShiBaoCunJiaoFeiMingXi.value.times,
+              execDept: store.state.user.info.deptCode,
+            }
+            menZhenXiangMuQuXiaoHuoQueRen(baoCun).then((res) => {
+              keQueRenData.value = []
+            })
+          })
+          .catch(() => {
           })
-        })
-        .catch(() => {})
     }
 
     const kuaiSuChaZhaoDialog = ref(false)
@@ -279,8 +291,8 @@ export default {
       patient,
       getMzPatientClick,
       xiangMuZhuangTaiData: ref([
-        { code: 0, name: '未确认' },
-        { code: 1, name: '已确认' },
+        {code: 0, name: '未确认'},
+        {code: 1, name: '已确认'},
       ]),
       xiangMuZhuangTai,
       windowsHeight,

+ 20 - 19
src/views/reports/InquiryOfConsultationFee.vue

@@ -1,7 +1,8 @@
 <template>
   <el-collapse>
     <el-header height="36px" style="margin-top: 8px">
-      <el-date-picker v-model="dateRange" :shortcuts="shortcuts" end-placeholder="结束日期" range-separator="至" size="small" start-placeholder="开始日期" type="daterange">
+      <el-date-picker v-model="dateRange" :shortcuts="shortcuts" end-placeholder="结束日期" range-separator="至" size="small"
+                      start-placeholder="开始日期" type="daterange">
       </el-date-picker>
       <el-select v-if="showDeptList" v-model="queryTerm.dept" clearable filterable>
         <el-option v-for="item in deptList" :key="item.code" :label="item.name" :value="item.code">
@@ -11,7 +12,7 @@
         >
       </el-select>
       <el-button icon="Search" style="margin-left: 5px" type="primary" @click="query">查询</el-button>
-      <el-button v-show="renderData.list.length" icon="Download" type="primary" @click="exportExcel">导出excel </el-button>
+      <el-button v-show="renderData.list.length" icon="Download" type="primary" @click="exportExcel">导出excel</el-button>
     </el-header>
     <el-main>
       <el-table :data="renderData.list" :height="windowSize.h / 1.2 + 40" highlight-current-row stripe>
@@ -31,29 +32,29 @@
     </el-main>
     <el-footer style="height: 20px">
       <el-pagination
-        :current-page="queryTerm.currentPage"
-        :page-size="queryTerm.pageSize"
-        :page-sizes="[20, 30, 40, 50, 100]"
-        :total="renderData.total"
-        layout="total, sizes, prev, pager, next, jumper"
-        style="margin-top: 5px"
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
+          :current-page="queryTerm.currentPage"
+          :page-size="queryTerm.pageSize"
+          :page-sizes="[20, 30, 40, 50, 100]"
+          :total="renderData.total"
+          layout="total, sizes, prev, pager, next, jumper"
+          style="margin-top: 5px"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
       ></el-pagination>
     </el-footer>
   </el-collapse>
 </template>
 
 <script name="InquiryOfConsultationFee" setup>
-import { reactive } from '@vue/reactivity'
-import { shortcuts } from '@/data/shortcuts'
+import {reactive} from '@vue/reactivity'
+import {shortcuts} from '@/data/shortcuts'
 import store from '@/store'
-import { queryInquiryOfConsultationFee } from '@/api/querydata/Inquiry-of-consultationFee'
-import { getDateRangeFormatDate } from '@/utils/date'
-import { downloadExcel } from '@/utils/excel'
-import { ElMessage } from 'element-plus'
-import { getDept } from '@/api/public-api'
-import { needRule } from '@/utils/public'
+import {queryInquiryOfConsultationFee} from '@/api/querydata/Inquiry-of-consultationFee'
+import {getDateRangeFormatDate} from '@/utils/date'
+import {downloadExcel} from '@/utils/excel'
+import {ElMessage} from 'element-plus'
+import {getDept} from '@/api/public-api'
+import {needRule} from '@/utils/public'
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -115,7 +116,7 @@ const exportExcel = () => {
 }
 
 let deptList = $ref([])
-let showDeptList = needRule([1, 2, 32])
+let showDeptList = needRule(1, 2, 32)
 
 onMounted(() => {
   if (showDeptList) {

+ 11 - 13
src/views/reports/JiMuBaoBiao.vue

@@ -2,12 +2,12 @@
   <el-container style="margin-top: 10px">
     <el-header>
       <el-date-picker
-        type="daterange"
-        v-model="zhuYuanShiJianChaoTime"
-        range-separator="至"
-        start-placeholder="开始日期"
-        end-placeholder="结束日期"
-        :shortcuts="shortcuts"
+          type="daterange"
+          v-model="zhuYuanShiJianChaoTime"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :shortcuts="shortcuts"
       ></el-date-picker>
       <el-button type="primary" style="margin-left: 10px" @click="query">查询</el-button>
     </el-header>
@@ -27,19 +27,17 @@
 </template>
 
 <script>
-import { getDateRangeFormatDate } from '@/utils/date'
-import { pieUtils } from '@/utils/echarts-utils'
-import { shortcuts } from '@/data/shortcuts'
+import {getDateRangeFormatDate} from '@/utils/date'
+import {pieUtils} from '@/utils/echarts-utils'
+import {shortcuts} from '@/data/shortcuts'
 import {zhuYuanShiJianChao} from "@/api/querydata/jimubiaobiao";
+
 export default {
   setup() {
     // 引入
 
     // 住院时间超过
-    const zhuYuanShiJianChaoTime = ref([])
-
-    zhuYuanShiJianChaoTime.value[0] = '2020-01-01'
-    zhuYuanShiJianChaoTime.value[1] = '2021-11-01'
+    const zhuYuanShiJianChaoTime = ref(['2020-01-01', '2021-11-01'])
 
     const query = () => {
       let daterange = getDateRangeFormatDate(zhuYuanShiJianChaoTime.value)

+ 55 - 42
src/views/settings/permissions/UserRoleSettings.vue

@@ -4,34 +4,38 @@
       <el-row :gutter="5">
         <el-col :span="4">
           <div style="height: 10px"></div>
-          <el-input v-model="searchDeptContent" placeholder="请输入科室名称" clearable @clear="queryConditions.deptCode = ''" prefix-icon="Search"></el-input>
+          <el-input v-model="searchDeptContent" placeholder="请输入科室名称" clearable @clear="queryConditions.deptCode = ''"
+                    prefix-icon="Search"></el-input>
           <div style="height: 5px"></div>
           <el-tree
-            :data="depts"
-            :props="defaultProps"
-            default-expand-all
-            :filter-node-method="filterNode"
-            :style="{ height: tableHeight + 'px', overflowY: 'scroll' }"
-            ref="tree"
-            @node-click="handleClickDeptTreeNode"
+              :data="depts"
+              :props="defaultProps"
+              default-expand-all
+              :filter-node-method="filterNode"
+              :style="{ height: tableHeight + 'px', overflowY: 'scroll' }"
+              ref="tree"
+              @node-click="handleClickDeptTreeNode"
           >
           </el-tree>
         </el-col>
         <el-col :span="20">
           <div style="height: 10px"></div>
-          <el-input v-model="queryConditions.name" style="width: 300px" placeholder="请输入人员姓名或工号" clearable prefix-icon="Search"></el-input>
+          <el-input v-model="queryConditions.name" style="width: 300px" placeholder="请输入人员姓名或工号" clearable
+                    prefix-icon="Search"></el-input>
           是否停用:
           <el-select v-model="queryConditions.whetherToDisable" style="width: 80px">
-            <el-option v-for="item in dropDownSelection" :key="item.code" :value="item.code" :label="item.name"> </el-option>
+            <el-option v-for="item in dropDownSelection" :key="item.code" :value="item.code"
+                       :label="item.name"></el-option>
           </el-select>
           是否有医保码:
           <el-select v-model="queryConditions.isThereAMedicalInsuranceCode" style="width: 80px">
-            <el-option v-for="item in dropDownSelection" :key="item.code" :value="item.code" :label="item.name"> </el-option>
+            <el-option v-for="item in dropDownSelection" :key="item.code" :value="item.code"
+                       :label="item.name"></el-option>
           </el-select>
           医保码:
           <el-input v-model="queryConditions.ybCode" style="width: 120px" clearable></el-input>
-          <el-button icon="Search" type="primary" @click="clickToQuery"> 查询 </el-button>
-          <el-button icon="Plus" type="success" @click="addEmployees"> 添加 </el-button>
+          <el-button icon="Search" type="primary" @click="clickToQuery"> 查询</el-button>
+          <el-button icon="Plus" type="success" @click="addEmployees"> 添加</el-button>
           <div style="height: 5px"></div>
           <el-table :data="users" border :height="tableHeight - 40" stripe highlight-current-row>
             <el-table-column prop="delFlag" label="停用" width="35">
@@ -67,20 +71,20 @@
             <el-table-column label="操作" fixed="right">
               <template v-slot="scope">
                 <el-button type="primary" text @click="clickToEdit(scope.$index, scope.row)">编辑</el-button>
-                <br />
+                <br/>
                 <el-button text size="small" v-if="competence" @click="viewUserRoles(scope.row)">角色</el-button>
               </template>
             </el-table-column>
           </el-table>
           <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="queryConditions.currentPage"
-            :page-sizes="[30, 50, 75]"
-            :page-size="queryConditions.pageSize"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="queryConditions.total"
-            style="margin-top: 5px"
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="queryConditions.currentPage"
+              :page-sizes="[30, 50, 75]"
+              :page-size="queryConditions.pageSize"
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="queryConditions.total"
+              style="margin-top: 5px"
           ></el-pagination>
         </el-col>
       </el-row>
@@ -107,20 +111,28 @@
       </el-dialog>
     </el-main>
   </el-container>
-  <PersonnelInformationEditing :userInfo="userInfo" v-if="editDialog" @close="editDialog = false" :index="roleIndex" @changeTheData="changeTheData" />
+  <PersonnelInformationEditing :userInfo="userInfo" v-if="editDialog" @close="editDialog = false" :index="roleIndex"
+                               @changeTheData="changeTheData"/>
 </template>
 
 <script setup name="UserRoleSettings">
 import store from '@/store'
-import { addNewRole, getAllRoles, getAllUsers, getDeptTree, getUserRoles, saveUserRoles } from '@/api/settings/permission-settings'
-import { ElMessage, ElMessageBox } from 'element-plus'
+import {
+  addNewRole,
+  getAllRoles,
+  getAllUsers,
+  getDeptTree,
+  getUserRoles,
+  saveUserRoles
+} from '@/api/settings/permission-settings'
+import {ElMessage, ElMessageBox} from 'element-plus'
 import PersonnelInformationEditing from '@/components/settings/permissions/PersonnelInformationEditing.vue'
-import { needRule } from '@/utils/public'
+import {needRule} from '@/utils/public'
 
 const windowSize = store.state.app.windowSize
 const tableHeight = windowSize.h - 45
 
-const competence = needRule([1])
+const competence = needRule(1)
 
 const depts = ref([])
 const users = ref([])
@@ -229,20 +241,21 @@ const beforeAddRole = () => {
     confirmButtonText: '确定',
     cancelButtonText: '取消',
   })
-    .then(({ value }) => {
-      addNewRole(value).then(() => {
-        ElMessage({
-          message: '添加成功。',
-          type: 'success',
-          duration: 2500,
-          showClose: true,
-        })
-        getAllRoles().then((res) => {
-          roles.value = res
+      .then(({value}) => {
+        addNewRole(value).then(() => {
+          ElMessage({
+            message: '添加成功。',
+            type: 'success',
+            duration: 2500,
+            showClose: true,
+          })
+          getAllRoles().then((res) => {
+            roles.value = res
+          })
         })
       })
-    })
-    .catch(() => {})
+      .catch(() => {
+      })
 }
 
 const saveRoles = () => {
@@ -287,8 +300,8 @@ onMounted(() => {
 })
 
 const dropDownSelection = [
-  { code: 0, name: '否' },
-  { code: 1, name: '是' },
-  { code: 9, name: '全部' },
+  {code: 0, name: '否'},
+  {code: 1, name: '是'},
+  {code: 9, name: '全部'},
 ]
 </script>