Przeglądaj źródła

电子病历报错问题,以及新的指令

xiaochan 1 rok temu
rodzic
commit
1276c2e42d

+ 3 - 19
index.html

@@ -1,10 +1,10 @@
 <!DOCTYPE html>
-<html lang="zh-cmn-Hans">
+<html>
 <head>
     <meta charset="UTF-8"/>
     <link rel="icon" href="/favicon.ico"/>
-    <link rel="stylesheet" href="./src/icons/alicdn/iconfont.css"/>
-    <link rel="stylesheet" href="./src/icons/iconfont.css"/>
+    <link rel="stylesheet" crossorigin href="./src/icons/alicdn/iconfont.css"/>
+    <link rel="stylesheet" crossorigin href="./src/icons/iconfont.css"/>
     <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
     <title>工作集成平台</title>
 </head>
@@ -13,19 +13,3 @@
 <script type="module" src="/src/main.js"></script>
 </body>
 </html>
-
-<style>
-    html {
-        height: 100%
-    }
-
-    .security input {
-        -webkit-text-security: disc
-    }
-
-    body {
-        height: 100%;
-        margin: 0;
-        padding: 0
-    }
-</style>

+ 5 - 0
src/css/app.scss

@@ -2,6 +2,7 @@
 @import "element-plus-modify";
 @import "layout";
 @import "vxe-table-modify";
+@import "waves";
 
 html,
 body,
@@ -17,6 +18,10 @@ body,
   }
 }
 
+.security input {
+  -webkit-text-security: disc
+}
+
 ul, li {
   list-style: none;
   margin: 0;

+ 94 - 0
src/css/waves.scss

@@ -0,0 +1,94 @@
+.waves-effect {
+	position: relative;
+	cursor: pointer;
+	display: inline-block;
+	overflow: hidden;
+	-webkit-user-select: none;
+	-moz-user-select: none;
+	-ms-user-select: none;
+	user-select: none;
+	-webkit-tap-highlight-color: transparent;
+	vertical-align: middle;
+	z-index: 1;
+	will-change: opacity, transform;
+	transition: all 0.3s ease-out;
+}
+.waves-effect .waves-ripple {
+	position: absolute;
+	border-radius: 50%;
+	width: 20px;
+	height: 20px;
+	margin-top: -10px;
+	margin-left: -10px;
+	opacity: 0;
+	background: rgba(0, 0, 0, 0.2);
+	transition: all 0.7s ease-out;
+	transition-property: opacity, -webkit-transform;
+	transition-property: transform, opacity;
+	transition-property: transform, opacity, -webkit-transform;
+	-webkit-transform: scale(0);
+	transform: scale(0);
+	pointer-events: none;
+}
+.waves-effect.waves-light .waves-ripple {
+	background-color: rgba(255, 255, 255, 0.45);
+}
+.waves-effect.waves-red .waves-ripple {
+	background-color: rgba(244, 67, 54, 0.7);
+}
+.waves-effect.waves-yellow .waves-ripple {
+	background-color: rgba(255, 235, 59, 0.7);
+}
+.waves-effect.waves-orange .waves-ripple {
+	background-color: rgba(255, 152, 0, 0.7);
+}
+.waves-effect.waves-purple .waves-ripple {
+	background-color: rgba(156, 39, 176, 0.7);
+}
+.waves-effect.waves-green .waves-ripple {
+	background-color: rgba(76, 175, 80, 0.7);
+}
+.waves-effect.waves-teal .waves-ripple {
+	background-color: rgba(0, 150, 136, 0.7);
+}
+.waves-effect input[type='button'],
+.waves-effect input[type='reset'],
+.waves-effect input[type='submit'] {
+	border: 0;
+	font-style: normal;
+	font-size: inherit;
+	text-transform: inherit;
+	background: none;
+}
+.waves-notransition {
+	transition: none !important;
+}
+.waves-circle {
+	-webkit-transform: translateZ(0);
+	transform: translateZ(0);
+	-webkit-mask-image: -webkit-radial-gradient(circle, #fff 100%, #000 100%);
+}
+.waves-input-wrapper {
+	border-radius: 0.2em;
+	vertical-align: bottom;
+}
+.waves-input-wrapper .waves-button-input {
+	position: relative;
+	top: 0;
+	left: 0;
+	z-index: 1;
+}
+.waves-circle {
+	text-align: center;
+	width: 2.5em;
+	height: 2.5em;
+	line-height: 2.5em;
+	border-radius: 50%;
+	-webkit-mask-image: none;
+}
+.waves-block {
+	display: block;
+}
+a.waves-effect .waves-ripple {
+	z-index: -1;
+}

+ 0 - 1
src/directives/v-title.ts

@@ -41,7 +41,6 @@ router.beforeResolve((_to, _from, next) => {
 
 let oldEl: HTMLHtmlElement | null = null
 
-
 const VTitle = {
     created(el: HTMLHtmlElement, binding: any, _vnode: any, _prevVnode: any) {
         _vnode.mousemoveStop = useEventListener(el, 'mousemove', (evt) => {

+ 53 - 0
src/directives/v-waves.ts

@@ -0,0 +1,53 @@
+import {DirectiveBinding} from "vue";
+
+const VWaves = {
+    mounted(el: any, binding: DirectiveBinding<any>) {
+        el.classList.add('waves-effect');
+        binding.value && el.classList.add(`waves-${binding.value}`);
+
+        function setConvertStyle(obj: { [key: string]: unknown }) {
+            let style: string = '';
+            for (let i in obj) {
+                if (obj.hasOwnProperty(i)) style += `${i}:${obj[i]};`;
+            }
+            return style;
+        }
+
+        function onCurrentClick(e: { [key: string]: unknown }) {
+            let elDiv = document.createElement('div');
+            elDiv.classList.add('waves-ripple');
+            el.appendChild(elDiv);
+            let styles = {
+                left: `${e.layerX}px`,
+                top: `${e.layerY}px`,
+                opacity: 1,
+                transform: `scale(${(el.clientWidth / 100) * 10})`,
+                'transition-duration': `750ms`,
+                'transition-timing-function': `cubic-bezier(0.250, 0.460, 0.450, 0.940)`,
+            };
+            elDiv.setAttribute('style', setConvertStyle(styles));
+            setTimeout(() => {
+                elDiv.setAttribute(
+                    'style',
+                    setConvertStyle({
+                        opacity: 0,
+                        transform: styles.transform,
+                        left: styles.left,
+                        top: styles.top,
+                    })
+                );
+                setTimeout(() => {
+                    elDiv && el.removeChild(elDiv);
+                }, 750);
+            }, 450);
+        }
+
+        el.addEventListener('mousedown', onCurrentClick, false);
+    },
+    unmounted(el: HTMLElement) {
+        el.addEventListener('mousedown', () => {
+        });
+    },
+}
+
+export default VWaves

+ 2 - 0
src/main.js

@@ -22,6 +22,7 @@ import DomZIndex from 'dom-zindex'
 import initVxeConfig from "@/utils/vxe-formatter";
 import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'
 import ExcelJS from 'exceljs'
+import VWaves from "@/directives/v-waves";
 
 const pinia = createPinia()
 
@@ -58,6 +59,7 @@ app.use(DataVVue3)
 app.directive('el-btn', VElBtn)
 app.directive('title', VTitle)
 app.directive('ClickOutside', ClickOutside)
+app.directive('Waves', VWaves)
 app.use(print)
 app.use(VXETable)
 app.use(JsonViewer);

+ 2 - 2
src/router/modules/dashboard.ts

@@ -23,7 +23,7 @@ const route: Array<RouteRecordRaw> = [
     }, {
         path: '/jumpRedirect',
         name: 'jumpRedirect',
-        component: createNameComponent(() => import('@/views/system/JumpRedirect.vue'),'jumpRedirect'),
+        component: createNameComponent(() => import('@/views/system/JumpRedirect.vue'), 'jumpRedirect'),
         hideMenu: true,
         meta: {title: '跳转重定向', hideTabs: true},
     },
@@ -77,7 +77,7 @@ const route: Array<RouteRecordRaw> = [
     {
         path: '/view/patient360',
         name: 'patient360',
-        component: createNameComponent(() => import('@/views/view/patient360/src/Patient360.vue'), 'patient360'),
+        component: () => import('@/views/view/patient360/src/Patient360.vue'),
         meta: {title: '患者360', hideTabs: true},
     },
     {

+ 2 - 2
src/utils/emr/emr-init-v2.ts

@@ -5,8 +5,8 @@ import {BizException, ExceptionEnum} from "../BizException";
 import {ElMessageBox} from "element-plus";
 import XEUtils from "xe-utils";
 import useDialogToJs from "@/components/js-dialog-comp/useDialogToJs";
-import GenerateSignature
-    from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/GenerateSignature.vue";
+
+const GenerateSignature = defineAsyncComponent(() => import("@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/GenerateSignature.vue"))
 
 type AppContext =
     | any