xiaochan 3 月之前
父節點
當前提交
90c4d39aa5

+ 54 - 48
src/components/cy/floating-frame/FloatingFrame.vue

@@ -1,36 +1,39 @@
 <script setup lang="ts">
-import {useDraggable, useZIndex} from "element-plus";
+import { useDraggable, useZIndex } from "element-plus";
 import XEUtils from "xe-utils";
-import {Close} from "@element-plus/icons-vue";
-
-const props = withDefaults(defineProps<{
-  width?: string | number,
-  height?: string | number,
-  x?: string | number,
-  y?: string | number,
-  title?: string,
-  modelValue: boolean
-}>(), {
-  width: '300px',
-  height: '400px',
-  x: 30,
-  y: 40,
-  title: '标题'
-})
+import { Close } from "@element-plus/icons-vue";
+
+const props = withDefaults(
+  defineProps<{
+    width?: string | number;
+    height?: string | number;
+    x?: string | number;
+    y?: string | number;
+    title?: string;
+    modelValue: boolean;
+  }>(),
+  {
+    width: "300px",
+    height: "400px",
+    x: 30,
+    y: 40,
+    title: "标题",
+  }
+);
 
 const emits = defineEmits<{
-  (e: "update:modelValue", value: boolean): void,
-  (e: 'closed'): void
-}>()
+  (e: "update:modelValue", value: boolean): void;
+  (e: "closed"): void;
+}>();
 
-const vodyRef = ref()
-const vRef = ref()
-const zIndex = ref(useZIndex().nextZIndex())
+const vodyRef = ref();
+const vRef = ref();
+const zIndex = ref(useZIndex().nextZIndex());
 const draggable = computed(() => {
-  return true
-})
+  return true;
+});
 
-const addUnit = (val: number | string) => XEUtils.addUnit(val)
+const addUnit = (val: number | string) => XEUtils.addUnit(val);
 
 const boxStyle = computed(() => {
   return {
@@ -38,52 +41,55 @@ const boxStyle = computed(() => {
     width: addUnit(props.width),
     left: addUnit(props.x),
     top: addUnit(props.y),
-    zIndex: zIndex.value
+    zIndex: zIndex.value,
+  };
+});
+
+watch(
+  () => props.modelValue,
+  value => {
+    if (value) zIndex.value = useZIndex().nextZIndex();
   }
-})
-
-watch(() => props.modelValue, (value) => {
-  if (value)
-    zIndex.value = useZIndex().nextZIndex()
-})
+);
 
 function closed() {
-  emits('update:modelValue', false)
+  emits("update:modelValue", false);
   setTimeout(() => {
-    emits('closed')
-  }, 200)
+    emits("closed");
+  }, 200);
 }
 
-useDraggable(vodyRef, vRef, draggable)
+useDraggable(vodyRef, vRef, draggable);
 
 onDeactivated(() => {
-  emits('update:modelValue', false)
-})
+  emits("update:modelValue", false);
+});
 
 onUnmounted(() => {
-  emits('update:modelValue', false)
-})
-
+  emits("update:modelValue", false);
+});
 </script>
 
 <template>
   <transition name="el-fade-in-linear">
-    <div class="floating_frame-box"
-         :style="boxStyle"
-         v-show="props.modelValue"
-         ref="vodyRef">
+    <div
+      class="floating_frame-box"
+      :style="boxStyle"
+      v-show="props.modelValue"
+      ref="vodyRef"
+    >
       <header class="floating_frame-drag_reference" ref="vRef">
         <div class="floating_frame-title">
           {{ props.title }}
         </div>
         <div class="floating_frame-close_icon">
           <el-icon :size="16" @click="closed">
-            <Close/>
+            <Close />
           </el-icon>
         </div>
       </header>
       <div class="floating_frame-body">
-        <slot/>
+        <slot />
       </div>
     </div>
   </transition>

+ 30 - 43
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCuoXinXi.vue

@@ -1,42 +1,33 @@
 <template>
-  <FloatingFrame v-model="errorMsg.dialog"
-                 title="错误信息"
-                 :x="77"
-                 :y="494"
-                 width="420px">
+  <FloatingFrame
+    v-model="errorMsg.dialog"
+    title="错误信息"
+    :x="77"
+    :y="494"
+    width="420px"
+  >
     <TransitionGroup name="list" tag="div" class="box">
       <div
-          v-for="(value, key) in  errorMsg.data "
-          class="message"
-          :key="`error-${key}`"
-          :class="yiZhuData.actOrderNo == key ? 'current_selected' : '' "
-          @click="divClick(key,value)">
+        v-for="(value, key) in errorMsg.data"
+        class="message"
+        :key="`error-${key}`"
+        :class="yiZhuData.actOrderNo == key ? 'current_selected' : ''"
+        @click="divClick(key, value)"
+      >
         <div class="name">
-          <span
-              @click.stop.prevent="errorMsgFunc.delByOrder(key)">
-            移除
-          </span>
-          医嘱号: {{ key }}
-          序号:{{ getYzIndex(key) + 1 }}
+          <span @click.stop.prevent="errorMsgFunc.delByOrder(key)"> 移除 </span>
+          医嘱号: {{ key }} 序号:{{ getYzIndex(key) + 1 }}
         </div>
-        <div v-if="value?.error"
-             class="error">
-          <div>
-            错误信息:
-          </div>
-          <div
-              v-for="(item,index) in value?.error">
+        <div v-if="value?.error" class="error">
+          <div>错误信息:</div>
+          <div v-for="(item, index) in value?.error">
             {{ index + 1 }}、 {{ item }}
           </div>
         </div>
 
-        <div v-if="value?.warning"
-             class="warning">
-          <div>
-            警告信息:
-          </div>
-          <div
-              v-for="(item,index) in value?.warning">
+        <div v-if="value?.warning" class="warning">
+          <div>警告信息:</div>
+          <div v-for="(item, index) in value?.warning">
             {{ index + 1 }}、 {{ item }}
           </div>
         </div>
@@ -50,28 +41,27 @@ import {
   errorMsg,
   errorMsgFunc,
   getYzIndex,
-  yiZhuData
+  yiZhuData,
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
-import XEUtils from 'xe-utils'
+import XEUtils from "xe-utils";
 import FloatingFrame from "@/components/cy/floating-frame/FloatingFrame.vue";
 
-
 const emit = defineEmits<{
-  (e: "clickError", orderNo: number): void
-}>()
+  (e: "clickError", orderNo: number): void;
+}>();
 
 function divClick(key: any, data: any) {
   if (data?.isDel) {
-    errorMsgFunc.delByOrder(key)
+    errorMsgFunc.delByOrder(key);
   } else {
-    clickToModify(key)
+    clickToModify(key);
   }
 }
 
 const clickToModify = (key: any) => {
-  if (yiZhuData.value.actOrderNo === key) return
-  emit('clickError', XEUtils.toNumber(key))
-}
+  if (yiZhuData.value.actOrderNo === key) return;
+  emit("clickError", XEUtils.toNumber(key));
+};
 </script>
 
 <style scoped lang="scss">
@@ -87,7 +77,6 @@ const clickToModify = (key: any) => {
     .name {
       background-color: #0a84fd !important;
     }
-
   }
 
   .message {
@@ -122,7 +111,6 @@ const clickToModify = (key: any) => {
       border-radius: 5px;
       background-color: #f5e1b8;
     }
-
   }
 }
 
@@ -145,5 +133,4 @@ const clickToModify = (key: any) => {
   opacity: 0;
   transform: translateX(30px);
 }
-
 </style>

+ 1 - 1
src/views/system/login.vue

@@ -108,7 +108,7 @@ const submit = () => {
     localStorage.clear();
     userStore.setUserInfo(res);
     systemConfig.setConfig(res.userConfigJson);
-    if (!checkPasswordStrength(params.password) && !isDev) {
+    if (!checkPasswordStrength(params.password)) {
       changePassword(false).then(newPassword => {
         form.password = newPassword;
         submit();