DESKTOP-MINPJAU\29983 3 лет назад
Родитель
Сommit
457173b165

+ 2 - 1
.gitignore

@@ -17,10 +17,11 @@ pnpm-debug.log*
 
 # Editor directories and files
 .idea
-.vscode
 *.suo
 *.ntvs*
 *.njsproj
 *.sln
 *.sw?
 .env.development
+webstorm.config.js
+.gitignore

+ 0 - 2
src/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue

@@ -5,7 +5,6 @@
         <el-col :span="2" style="text-align: right">住院号:</el-col>
         <el-col :span="4">
           {{ huanZheXinXi.inpatientNo }}
-          <span v-if="huanZheXinXi.timesBilled === 1" style="color: red">已出纳</span>
         </el-col>
         <el-col :span="2" style="text-align: right">住院次数:</el-col>
         <el-col :span="4"> {{ huanZheXinXi.admissTimes }}</el-col>
@@ -85,7 +84,6 @@ export default {
   name: "HuanZheXinXi",
   setup(props, cxt) {
     const activeNames = ref('1')
-
     return {huanZheXinXi, activeNames}
   }
 }

+ 85 - 75
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -2,25 +2,27 @@
   <el-container>
     <el-header>
       <el-date-picker
-        v-model="dateRange"
-        :shortcuts="shortcuts"
-        end-placeholder="结束日期"
-        placeholder="选择日期"
-        range-separator="至"
-        size="mini"
-        start-placeholder="开始日期"
-        style="width: 220px"
-        type="daterange"
+          v-model="dateRange"
+          :shortcuts="shortcuts"
+          end-placeholder="结束日期"
+          placeholder="选择日期"
+          range-separator="至"
+          size="mini"
+          start-placeholder="开始日期"
+          style="width: 220px"
+          type="daterange"
       >
       </el-date-picker>
       医嘱名称:
-      <el-select v-model="orderName" :remote-method="remoteMethodChargeCode" clearable filterable remote style="width: 120px">
+      <el-select v-model="orderName" :remote-method="remoteMethodChargeCode" clearable filterable remote
+                 style="width: 120px">
         <el-option v-for="item in yiZhuMingZiData" :key="item.code" :label="item.name" :value="item.code">
           <span>{{ item.name }}</span>
         </el-option>
       </el-select>
       频率:
-      <el-select v-model="pinLv" :disabled="zhuangTai === 8 || zhuangTai === 9" clearable filterable size="mini" style="width: 120px">
+      <el-select v-model="pinLv" :disabled="zhuangTai === 8 || zhuangTai === 9" clearable filterable size="mini"
+                 style="width: 120px">
         <el-option v-for="item in huanZhePinLvData" :key="item.code" :label="item.name" :value="item.code">
           <span>{{ item.name }}</span>
         </el-option>
@@ -41,29 +43,30 @@
       <el-tag effect="dark">执行</el-tag>
       <el-tag effect="dark" type="danger">停止</el-tag>
       <el-divider direction="vertical"></el-divider>
-      <el-button :disabled="huanZheXinXi.timesBilled === 1" icon="el-icon-plus" type="primary" @click="addYiZhuClick"> 添加 </el-button>
-      <el-button :disabled="xuanZhongDeShuJu.length === 0" type="warning" @click="dianJiPiLiangTingZhi">批量停止 </el-button>
+      <el-button icon="el-icon-plus" type="primary" @click="addYiZhuClick"> 添加</el-button>
+      <el-button :disabled="xuanZhongDeShuJu.length === 0" type="warning" @click="dianJiPiLiangTingZhi">批量停止</el-button>
       <el-divider direction="vertical"></el-divider>
-      <el-button :disabled="xuanZhongDeShuJu.length === 0" type="success" @click="dianJiFuZhuXuanZhongYiZhu">复制选中医嘱 </el-button>
+      <el-button :disabled="xuanZhongDeShuJu.length === 0" type="success" @click="dianJiFuZhuXuanZhongYiZhu">复制选中医嘱
+      </el-button>
     </el-header>
     <el-main>
       <el-table
-        ref="tableRef"
-        :data="yiZhuPage.data"
-        :height="windowSize.h / 1.5"
-        :row-class-name="differChildrenRows"
-        border
-        class="eltable"
-        highlight-current-row
-        row-key="actOrderNo"
-        @selection-change="huoQuXuanZhongDeShuJu"
-        @select-all="quanXuanYiZhu"
+          ref="tableRef"
+          :data="yiZhuPage.data"
+          :height="windowSize.h / 1.5"
+          :row-class-name="differChildrenRows"
+          border
+          class="eltable"
+          highlight-current-row
+          row-key="actOrderNo"
+          @selection-change="huoQuXuanZhongDeShuJu"
+          @select-all="quanXuanYiZhu"
       >
         <el-table-column fixed="left" type="index"></el-table-column>
         <el-table-column fixed="left" type="selection"></el-table-column>
         <el-table-column fixed="left" label="医嘱号" prop="actOrderNo" width="120">
           <template #default="scope">
-            <el-tag :type="getYiZhuFlag(scope.row.statusFlag)" effect="dark">{{ scope.row.actOrderNo }} </el-tag>
+            <el-tag :type="getYiZhuFlag(scope.row.statusFlag)" effect="dark">{{ scope.row.actOrderNo }}</el-tag>
           </template>
         </el-table-column>
         <el-table-column fixed="left" label="医嘱名称" prop="orderName" show-overflow-tooltip width="135"></el-table-column>
@@ -116,8 +119,8 @@
                     <span v-if="scope.row.emergencyFlag === '1'">取消紧急</span>
                     <span v-else>设为紧急</span>
                   </el-dropdown-item>
-                  <el-dropdown-item @click="dianJiYiZhuChaoZuo(scope.row, 2, '撤销医嘱')"> 撤销医嘱 </el-dropdown-item>
-                  <el-dropdown-item @click="dianJiYiZhuChaoZuo(scope.row, 3, '停止医嘱')"> 停止医嘱 </el-dropdown-item>
+                  <el-dropdown-item @click="dianJiYiZhuChaoZuo(scope.row, 2, '撤销医嘱')"> 撤销医嘱</el-dropdown-item>
+                  <el-dropdown-item @click="dianJiYiZhuChaoZuo(scope.row, 3, '停止医嘱')"> 停止医嘱</el-dropdown-item>
                 </el-dropdown-menu>
               </template>
             </el-dropdown>
@@ -125,24 +128,26 @@
         </el-table-column>
       </el-table>
       <el-pagination
-        :current-page="yiZhuPage.currentPage"
-        :page-size="yiZhuPage.pageSize"
-        :page-sizes="[10, 20, 30, 40, 50]"
-        :total="yiZhuPage.total"
-        layout="total, sizes, prev, pager, next, jumper"
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
+          :current-page="yiZhuPage.currentPage"
+          :page-size="yiZhuPage.pageSize"
+          :page-sizes="[10, 20, 30, 40, 50]"
+          :total="yiZhuPage.total"
+          layout="total, sizes, prev, pager, next, jumper"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
       >
       </el-pagination>
     </el-main>
-    <el-dialog v-model="yiZhuChaoZuoDialog" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" :title="yiZhuChaoZuoBiaoTi" top="25%" width="30%">
+    <el-dialog v-model="yiZhuChaoZuoDialog" :close-on-click-modal="false" :close-on-press-escape="false"
+               :show-close="false" :title="yiZhuChaoZuoBiaoTi" top="25%" width="30%">
       <div v-if="chaoZuoBiaoZhi === 2">
         撤销原因:
         <el-input v-model="content" maxlength="100" rows="2" show-word-limit type="textarea"></el-input>
       </div>
       <div v-else-if="chaoZuoBiaoZhi === 3 || chaoZuoBiaoZhi === 90">
         停止时间点:
-        <el-date-picker v-model="tingZhiRiQi" format="YYYY-MM-DD HH:mm:ss" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"> </el-date-picker>
+        <el-date-picker v-model="tingZhiRiQi" format="YYYY-MM-DD HH:mm:ss" type="datetime"
+                        value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
       </div>
       <template #footer>
         <span class="dialog-footer">
@@ -155,13 +160,18 @@
 </template>
 
 <script name="YiZhuLuRuZhuJian" setup>
-import { shortcuts } from '@/data/shortcuts'
-import { huoQuYiZhuMingCheng, huoQuYiZhuShuJu, piLiangXiuGaiTingZhiShiJian, yiZhuChaoZuo } from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
-import { fuZhiYiZhu, huanZhePinLvData, huanZheXinXi, youWuXuanZheHuanZhe } from '../public-js/zhu-yuan-yi-sheng'
-import { getDateRangeFormatDate, getFormatDatetime } from '@/utils/date'
+import {shortcuts} from '@/data/shortcuts'
+import {
+  huoQuYiZhuMingCheng,
+  huoQuYiZhuShuJu,
+  piLiangXiuGaiTingZhiShiJian,
+  yiZhuChaoZuo
+} from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
+import {fuZhiYiZhu, huanZhePinLvData, huanZheXinXi, youWuXuanZheHuanZhe} from '../public-js/zhu-yuan-yi-sheng'
+import {getDateRangeFormatDate, getFormatDatetime} from '@/utils/date'
 import store from '@/store'
-import { stringIsBlank, stringNotBlank } from '@/utils/blank-utils'
-import { getServerDateApi } from '@/api/public-api'
+import {stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
+import {getServerDateApi} from '@/api/public-api'
 import router from '@/router'
 
 const windowSize = computed(() => {
@@ -200,15 +210,15 @@ const remoteMethodChargeCode = (val) => {
 
 // 根据医嘱的名字来进行搜索 结束
 const zhuangTaiList = ref([
-  { code: 0, name: '全部' },
-  { code: 1, name: '录入' },
-  { code: 2, name: '确认' },
-  { code: 3, name: '执行' },
-  { code: 5, name: '停止' },
-  { code: 6, name: '可停止' },
-  { code: 7, name: '可撤销' },
-  { code: 8, name: '临时医嘱' },
-  { code: 9, name: '长期医嘱' },
+  {code: 0, name: '全部'},
+  {code: 1, name: '录入'},
+  {code: 2, name: '确认'},
+  {code: 3, name: '执行'},
+  {code: 5, name: '停止'},
+  {code: 6, name: '可停止'},
+  {code: 7, name: '可撤销'},
+  {code: 8, name: '临时医嘱'},
+  {code: 9, name: '长期医嘱'},
 ])
 
 const zhuangTaiXuanZhe = (val) => {
@@ -234,14 +244,14 @@ const chaXunYiZhuClick = (total) => {
     zhuangTai: zhuangTai.value,
   }
   huoQuYiZhuShuJu(data)
-    .then((res) => {
-      yiZhuPage.value.total = res.total
-      yiZhuPage.value.data = res.records
-    })
-    .catch((e) => {
-      yiZhuPage.value.total = 0
-      yiZhuPage.value.data = []
-    })
+      .then((res) => {
+        yiZhuPage.value.total = res.total
+        yiZhuPage.value.data = res.records
+      })
+      .catch((e) => {
+        yiZhuPage.value.total = 0
+        yiZhuPage.value.data = []
+      })
 }
 
 const handleSizeChange = (val) => {
@@ -254,7 +264,7 @@ const handleCurrentChange = (val) => {
   chaXunYiZhuClick(yiZhuPage.value.total)
 }
 /* 添加子医嘱的背景颜色 */
-const differChildrenRows = ({ row }) => {
+const differChildrenRows = ({row}) => {
   if (row.isChildren) {
     return 'children-row'
   }
@@ -276,7 +286,7 @@ const addYiZhuClick = () => {
   })
 }
 
-const dianJiYiZhuChaoZuo = ({ actOrderNo, orderName }, flag, name) => {
+const dianJiYiZhuChaoZuo = ({actOrderNo, orderName}, flag, name) => {
   chaoZuoBiaoZhi.value = flag
   yiZhuHao.value = actOrderNo
   if (flag === 1) {
@@ -379,20 +389,20 @@ onActivated(() => {
 })
 
 watch(
-  () => huanZheXinXi.value,
-  () => {
-    getServerDateApi().then((res) => {
-      if (dateRange.value === null) {
-        dateRange.value = []
-        dateRange.value.push(getFormatDatetime(res, 'YYYY-MM-DD'))
-        dateRange.value.push(getFormatDatetime(res, 'YYYY-MM-DD'))
-      } else {
-        dateRange.value[0] = getFormatDatetime(res, 'YYYY-MM-DD')
-        dateRange.value[1] = getFormatDatetime(res, 'YYYY-MM-DD')
-      }
-      chaXunYiZhuClick(0)
-    })
-  }
+    () => huanZheXinXi.value,
+    () => {
+      getServerDateApi().then((res) => {
+        if (dateRange.value === null) {
+          dateRange.value = []
+          dateRange.value.push(getFormatDatetime(res, 'YYYY-MM-DD'))
+          dateRange.value.push(getFormatDatetime(res, 'YYYY-MM-DD'))
+        } else {
+          dateRange.value[0] = getFormatDatetime(res, 'YYYY-MM-DD')
+          dateRange.value[1] = getFormatDatetime(res, 'YYYY-MM-DD')
+        }
+        chaXunYiZhuClick(0)
+      })
+    }
 )
 
 function getYiZhuFlag(val) {