xiaochan 2 年之前
父节点
当前提交
4a6bf4ee32

+ 15 - 7
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/table/YzTableV2.vue

@@ -13,8 +13,7 @@
   <right-click-menu :mouse-position="mousePosition" :config="opt"/>
 </template>
 
-
-<script setup name='Test' lang="jsx">
+<script setup lang="jsx">
 import {onMounted, ref} from 'vue'
 import XcTableV2 from "@/components/xiao-chan/xc-table-v2/XcTableV2.vue";
 import {stringIsBlank} from "@/utils/blank-utils";
@@ -254,8 +253,6 @@ const rowClass = (data) => {
       delete twinkleList.value[data.actOrderNo]
     })
     return 'animation_hzfirst'
-
-
   } else if (typeof twinkleList.value[data.parentNo] !== 'undefined') {
     return 'animation_hzfirst'
   }
@@ -385,13 +382,25 @@ onMounted(() => {
 
   yzMitt.on('scrollEndAndTwinkle', async (val) => {
     twinkleList.value = val;
-    await nextTick()
-    await scrollToEnd()
+    await nextTick();
+    await scrollToEnd();
   });
 
 
   yzMitt.on('setOrderNoTwinkle', async (val) => {
     twinkleList.value[val] = true
+    let index = -1
+
+    try {
+      XEUtils.lastArrayEach(tempYzData.value, (item, key) => {
+        if (val === item.actOrderNo) {
+          index = key
+          throw new Error("循环结束")
+        }
+      })
+    } catch {
+    }
+    tableRef.value.scrollTo(index);
   })
 
   yzMitt.on('getSelectedData', () => {
@@ -399,7 +408,6 @@ onMounted(() => {
   })
 
 })
-
 </script>
 
 <style lang="scss">

+ 6 - 6
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue

@@ -41,7 +41,7 @@
               ref="pingLvRef"
               key="frequCode"
               v-model="yiZhuData.frequCode"
-              :disabled="queryParam.frequCode === frequCodeEnum.temporary "
+              :disabled="queryParam.frequCode === frequCodeEnum.temporary"
               style="width: 120px"/>
         </div>
         <div>
@@ -607,11 +607,11 @@ const setTheTemporaryVariableMedicalOrder = () => {
 }
 
 const qingKong = () => {
-  yaoPinJiLiangData.value = []
-  jiLiangValue.value = 0
-  tiShiBiaoTi.value = []
-  tempData = null
-  yiZhuDataInit()
+  yaoPinJiLiangData.value = [];
+  jiLiangValue.value = 0;
+  tiShiBiaoTi.value = [];
+  tempData = null;
+  yiZhuDataInit();
 }
 
 // 判断是否可以编辑

+ 2 - 3
src/utils/request.js

@@ -5,7 +5,6 @@ import store from '@/store'
 import {startLoading, endLoading} from './loading'
 
 let loginBox = null
-
 let popUps = null
 
 const createAPopup = (message = '错误信息') => {
@@ -100,9 +99,9 @@ service.interceptors.response.use(
                     type: 'warning',
                     confirmButtonText: '确定',
                     showClose: false,
-                }).then(() => {
+                }).then(async () => {
                     loginBox = null
-                    router.push('/login')
+                    await router.push('/login')
                 })
             }
         } else if (response.data.code === 5001) {

+ 2 - 2
src/utils/xckeydown.ts

@@ -9,9 +9,9 @@ document.onkeydown = function (event: KeyboardEvent): void {
 }
 
 const preventDefault = (event: Event) => {
-    event.returnValue = false
+    event.returnValue = false;
     try {
-        event.preventDefault()
+        event.preventDefault();
     } catch {
     }
 }

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng.ts

@@ -1,4 +1,3 @@
-// 判断是否选择了患者
 import {stringIsBlank, stringNotBlank} from "../../../../utils/blank-utils";
 import {ElMessage} from "element-plus";
 import {getPatientInfo} from "../../../../api/inpatient/patient";
@@ -168,6 +167,7 @@ export interface yzType {
     associationFlag?: boolean
     doctorName: string
 }
+
 // 医嘱数据
 export const yiZhuData = ref<yzType>({
     actOrderNo: addTempOrderNo,

+ 12 - 5
src/views/settings/Test.vue

@@ -1,4 +1,5 @@
 <template>
+
   <el-button v-el-btn="el1">不传参数</el-button>
   <el-button v-el-btn="{func:el1, value: 23}">单个传参</el-button>
   <el-button v-el-btn="{func:el1, value: {a: 1 ,b: 2}}" type="danger">多个传参</el-button>
@@ -6,11 +7,22 @@
   <div style="border: 1px solid; height: 200px; width: 200px"
        v-loading="loading"/>
 
+  <el-button :loading="lo" @click="te1">123</el-button>
+
 </template>
 
 <script setup>
 import sleep from "@/utils/sleep";
 
+
+const lo = ref(false)
+const te1 = async () => {
+  lo.value = true
+  await sleep(3000)
+  lo.value = false
+}
+
+
 const loading = ref(false)
 
 const el1 = async (val) => {
@@ -19,11 +31,6 @@ const el1 = async (val) => {
   await sleep(3000)
   loading.value = false
 }
-
-const 上面 = () => {
-  console.log('上面')
-}
-
 </script>
 
 <style lang="scss">