Browse Source

新增组件tabs,优化手术录入

xiaochan 1 năm trước cách đây
mục cha
commit
ddb246f6e1

+ 2 - 0
src/components/cy/dialog/src/CyDialog.vue

@@ -55,10 +55,12 @@ export default defineComponent({
       >
         <div
             ref="boxRef"
+            :style="boxStyle"
             :class="[
             ns.e('box'),
             ns.is('fullScreen' , fullScreen)
         ]"
+
         >
           <header
               ref="headerRef"

+ 11 - 3
src/components/cy/dialog/src/useCyDialog.ts

@@ -69,11 +69,11 @@ export function UseCyDialog(props: IsCyDialog) {
     const bodyHeightStyle = computed(() => {
         if (props.fullScreen) {
             return {
-                height: `calc(100% - ${state.headerHeight}px - ${state.footerHeight}px)`
+                height: `calc(100% - ${state.headerHeight}px - ${state.footerHeight}px)`,
             }
         } else {
             return {
-                height: props.bodyHeight
+                height: props.bodyHeight,
             }
         }
     })
@@ -123,6 +123,13 @@ export function UseCyDialog(props: IsCyDialog) {
         next(null)
     }
 
+
+    const boxStyle = computed(() => {
+        return {
+            width: props.bodyWidth,
+        }
+    })
+
     async function handleCancel() {
         state.cancelLoading = true;
 
@@ -162,6 +169,7 @@ export function UseCyDialog(props: IsCyDialog) {
         state,
         handleConfirm,
         handleCancel,
-        onFocusoutPrevented
+        onFocusoutPrevented,
+        boxStyle
     }
 }

+ 68 - 0
src/components/cy/tabs/src/CyTabPane.vue

@@ -0,0 +1,68 @@
+<template>
+  <transition name="el-zoom-in-center">
+    <div
+        ref="paneRef"
+        v-show="active"
+        v-if="shouldBeRender"
+        :class="[
+          ns.e('pane') ,
+          ns.is('filling' , !tabsRoot?.props?.maxContent)
+      ]"
+    >
+      <slot :width="width" :height="height"/>
+    </div>
+  </transition>
+</template>
+
+<script setup lang="ts">
+import {tabsRootContextKey} from "./index";
+import {onMounted, onUnmounted, ref} from "vue";
+import {TabPaneProps} from "@/components/cy/tabs/src/TabsProps";
+import {useCyNamespace} from "@/utils/xiaochan-element-plus";
+import {useElementSize} from "@vueuse/core";
+
+const props = defineProps(TabPaneProps)
+
+const tabsRoot = inject(tabsRootContextKey)
+const instance = getCurrentInstance()!
+const slots = useSlots()
+const vif = ref(true)
+const ns = useCyNamespace('tabs')
+const paneRef = ref()
+
+const active = computed(() => {
+  return tabsRoot?.props.modelValue === props.name;
+})
+
+const paneName = computed(() => props.name)
+const shouldBeRender = computed(() => {
+  return vif.value
+})
+
+const pane = reactive({
+  uid: instance.uid,
+  slots,
+  props,
+  paneName,
+  active,
+  setVif(val) {
+    vif.value = val
+  },
+  vif: vif
+})
+
+const {width, height} = useElementSize(paneRef)
+
+
+onMounted(() => {
+  tabsRoot?.registerPane(pane)
+})
+
+onUnmounted(() => {
+  tabsRoot?.unregisterPane(pane.uid)
+})
+</script>
+
+<style scoped>
+
+</style>

+ 195 - 0
src/components/cy/tabs/src/CyTabs.vue

@@ -0,0 +1,195 @@
+<template>
+  <div
+  >
+    <div
+        :class="[ns.e('header')]"
+        ref="headerRef"
+    >
+      <template v-for="(value, key) in childList">
+        <div
+            v-if="value.vif"
+            :id="`pane_${value.props.name}`"
+            :class="[
+              ns.e('header-item'),
+              ns.is('activation',  isActivation(value.props.name))
+              ]"
+            @click="headerChildrenClick(value)"
+        >
+          {{ value.props.label }}
+          <el-icon v-if="showClose"
+                   style="margin-left: 5px"
+                   @click.stop="handelClose(value)">
+            <Close/>
+          </el-icon>
+        </div>
+      </template>
+
+      <div
+          :class="[ns.e('active_box')]"
+          :style="activeBoxStyle"
+      />
+    </div>
+
+    <div
+        :class="[ns.e('content')]"
+        ref="contentRef"
+        :style="contentStyle"
+    >
+      <Component :is="renderSlot(slots , 'default')"/>
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import {useCyNamespace} from "@/utils/xiaochan-element-plus";
+import {renderSlot, ref, nextTick, watch, onMounted} from "vue";
+import TabsProps from "@/components/cy/tabs/src/TabsProps";
+import {TabsPaneContext, tabsRootContextKey} from "./index";
+import '../style/index.scss'
+import {Close} from "@element-plus/icons-vue";
+import {ElIcon} from 'element-plus'
+import {useResizeObserver} from "@vueuse/core";
+
+const props = defineProps(TabsProps)
+const emits = defineEmits([
+  'update:modelValue',
+  'change'
+])
+const slots = useSlots()
+
+const ns = useCyNamespace('tabs')
+const headerRef = ref<HTMLDivElement | null>(null)
+const contentRef = ref<HTMLDivElement | null>(null)
+
+const isActivation = (name: string) => {
+  return props.modelValue === name
+}
+
+const headerChildrenClick = (item: TabsPaneContext) => {
+  emits('update:modelValue', item.props.name)
+}
+
+const activeBoxStyle = ref({
+  width: '0px',
+  transform: 'translateX(0px)',
+  height: '0px'
+})
+
+function handleScrolling() {
+  nextTick().then(() => {
+    const current = props.modelValue
+    const currentId = `pane_${current}`
+
+    let scroll = 0;
+    let width = 0;
+    let height = 0;
+    const itemList = headerRef.value?.querySelectorAll('.cy-tabs__header-item')
+
+    for (let i = 0; i < itemList.length; i++) {
+      const item = itemList[i]
+      const id = item.id
+      if (currentId === id) {
+        width = item.clientWidth
+        height = item.clientHeight
+        break
+      }
+      scroll += item.scrollWidth
+    }
+    activeBoxStyle.value = {
+      width: width + 'px',
+      transform: `translateX(${scroll}px)`,
+      height: height + 'px'
+    }
+  })
+}
+
+
+const showClose = computed(() => {
+  return props.closable
+})
+
+const nameList = computed(() => {
+  const list = []
+
+  for (let key in childList.value) {
+    const item = childList.value[key]
+    if (item.vif) {
+      list.push(item.props.name)
+    }
+  }
+
+  return list
+})
+
+const contentStyle = ref({
+  height: 'max-content',
+})
+const handelClose = (data: TabsPaneContext) => {
+  const name = data.props.name
+
+  function update() {
+    if (props.modelValue !== name) return
+    const index = nameList.value.indexOf(name)
+
+    if (index > 0) {
+      emits('update:modelValue', nameList.value[index - 1])
+    } else if (index === 0) {
+      emits('update:modelValue', nameList.value[index + 1])
+    }
+  }
+
+  function next() {
+    update()
+    data.setVif(false)
+  }
+
+  if (props.closeEvent != null) {
+    if (props.closeEvent(name)) {
+      next()
+    }
+    return
+  }
+  next()
+}
+
+watch(() => props.modelValue, () => {
+  handleScrolling()
+  emits('change', props.modelValue)
+}, {flush: 'post', immediate: true})
+
+watch(() => props.closable, () => {
+  handleScrolling()
+}, {flush: 'post'})
+
+const childList = ref<any>({})
+
+const registerPane = (data: TabsPaneContext) => {
+  childList.value[data.uid] = data
+}
+
+const unregisterPane = (id) => {
+  delete childList.value[id]
+}
+
+
+onMounted(() => {
+  if (!props.maxContent) {
+    useResizeObserver(contentRef, (entries) => {
+      const entry = entries[0]
+      const marginTop = 3;
+      const padding = 8 + 3;
+      const height = window.innerHeight - entry.target.getBoundingClientRect().top - marginTop - padding
+      contentStyle.value = {
+        height: `${height}px`
+      }
+    })
+  }
+})
+
+provide(tabsRootContextKey, {
+  props: props,
+  registerPane: registerPane,
+  unregisterPane: unregisterPane,
+  childList: childList
+})
+</script>

+ 34 - 0
src/components/cy/tabs/src/TabsProps.ts

@@ -0,0 +1,34 @@
+const TabsProps = {
+    modelValue: {
+        type: [String, Array]
+    },
+    closable: {
+        type: [Boolean],
+        default: false
+    },
+    closeEvent: {
+        type: [Function],
+        default: null
+    },
+    maxContent: {
+        type: [Boolean],
+        default: false
+    }
+}
+
+export const TabPaneProps = {
+    name: {
+        type: [String, Number],
+        default: null
+    },
+    label: {
+        type: [String],
+    },
+    showClose: {
+        type: [Boolean],
+        default: false
+    }
+}
+
+
+export default TabsProps

+ 30 - 0
src/components/cy/tabs/src/index.ts

@@ -0,0 +1,30 @@
+import type {
+    ComputedRef,
+    InjectionKey,
+    Ref,
+    Slots,
+    UnwrapRef,
+    ExtractPropTypes,
+} from 'vue'
+import TabsProps, {TabPaneProps} from "@/components/cy/tabs/src/TabsProps";
+
+export type TabsPaneContext = UnwrapRef<{
+    uid: number
+    slots: Slots
+    props: ExtractPropTypes<typeof TabPaneProps>
+    paneName: ComputedRef<string | number | undefined>
+    active: ComputedRef<boolean>;
+    setVif: (val: boolean) => void
+}>
+
+interface TabsRootContext {
+    props: ExtractPropTypes<typeof TabsProps>,
+    registerPane: (pane: TabsPaneContext) => void
+    unregisterPane: (uid: number) => void;
+    childList: any
+}
+
+
+export const tabsRootContextKey: InjectionKey<TabsRootContext> =
+    Symbol('cyTabsRootContextKey')
+

+ 64 - 0
src/components/cy/tabs/style/index.scss

@@ -0,0 +1,64 @@
+
+.cy-tabs__header {
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  background: hsl(240 4.8% 95.9%);
+  padding: 0.25rem 0;
+  outline: none;
+  color: hsl(240 3.8% 46.1%);
+  border-radius: 0.5rem;
+  position: relative;
+  user-select: none;
+  cursor: pointer;
+
+  .cy-tabs__active_box {
+    position: absolute;
+    border-radius: 4px;
+    box-shadow: var(--el-box-shadow-light);
+    transition: all .2s;
+    -webkit-transition: all .2s;
+    background: white;
+  }
+
+  .cy-tabs__header-item {
+    width: max-content;
+    font-size: 14px;
+    box-sizing: border-box;
+    font-weight: 500;
+    padding: 4px 12px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    height: 30px;
+    z-index: 1;
+
+    .el-icon {
+      cursor: pointer;
+    }
+
+    &.is-activation {
+      color: black;
+    }
+  }
+}
+
+.cy-tabs__content {
+  padding: 8px;
+  margin-top: 3px;
+  box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
+  border-width: 1px;
+  border-radius: 4px;
+  background: hsl(0 0% 100%);
+}
+
+.cy-tabs__pane {
+  width: 100%;
+  height: max-content;
+
+
+  &.is-filling {
+    height: 100%;
+    overflow: auto;
+  }
+}

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

@@ -6,7 +6,7 @@
       <iframe :src="rationalUse.ShowUrl" width="100%" height="100%"/>
     </div>
     <template #footer>
-      <el-button type="danger" @click="dialog = false">close</el-button>
+      <el-button type="danger" @click="dialog = false">关闭</el-button>
       <el-button type="primary" @click="continueToSubmit">继续提交</el-button>
     </template>
   </el-dialog>
@@ -15,6 +15,7 @@
 <script setup>
 import {auditingInterface, rationalUseOfMedicine} from "@/api/heliyongyao/rational-use";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
+import {BizException, ExceptionEnum} from "@/utils/BizException";
 
 const emit = defineEmits(['submit'])
 
@@ -23,7 +24,9 @@ const rationalUse = ref({})
 
 const check = async (patNo, times) => {
   rationalUse.value = await rationalUseOfMedicine(patNo, times).catch(() => {
-    return true;
+    return {
+      result_lv: 0
+    };
   });
   if (rationalUse.value.result_lv > 0) {
     dialog.value = true
@@ -38,7 +41,11 @@ const continueToSubmit = async () => {
       .catch(() => {
         emit('submit')
         dialog.value = false
+        return null
       })
+  if (temp == null) {
+    return
+  }
   if ((temp.success && temp.resultcode === 0) || temp.resultcode === -1) {
     // 审核通过
     xcMessage.success(temp.sh_msg ? temp.sh_msg : '审核通过。');

+ 16 - 11
src/directives/v-title.ts

@@ -1,5 +1,6 @@
 import {useZIndex} from "element-plus";
 import router from '../router'
+import {useEventListener} from "@vueuse/core";
 
 const setDivLeftAndTop = (div: HTMLDivElement, evt: MouseEvent) => {
     // 获取window窗口的大小
@@ -38,11 +39,12 @@ router.beforeResolve((_to, _from, next) => {
     next()
 })
 
-let oldEl = null
+let oldEl: HTMLHtmlElement | null = null
+
 
 const VTitle = {
     created(el: HTMLHtmlElement, binding: any, _vnode: any, _prevVnode: any) {
-        el.addEventListener('mousemove', (evt) => {
+        _vnode.mousemoveStop = useEventListener(el, 'mousemove', (evt) => {
             evt.preventDefault();
             evt.stopPropagation();
             div.style.display = 'block';
@@ -52,19 +54,22 @@ const VTitle = {
                 div.style.zIndex = useZIndex().nextZIndex().toString();
             }
             setDivLeftAndTop(div, evt);
-        });
-
+        })
 
-        el.addEventListener('mouseleave', (evt) => {
+        _vnode.mouseleaveStop = useEventListener(el, 'mouseleave', () => {
             div.style.display = 'none';
-        });
+        })
     },
-    unmounted(el: HTMLHtmlElement) {
-        el.removeEventListener('mousemove')
-        el.removeEventListener('mouseleave')
-        div.style.display = 'none';
-    }
+    beforeUnmount(el: HTMLHtmlElement, binding: any, _vnode: any, _prevVnode: any) {
+        try {
+            _vnode?.mousemoveStop();
+            _vnode?.mouseleaveStop();
+        } catch {
 
+        } finally {
+            div.style.display = 'none';
+        }
+    }
 }
 
 

+ 1 - 1
src/layout/HeaderV2/RouteNavigation.vue

@@ -16,7 +16,7 @@
   </div>
 </template>
 
-<script setup name='RouteNavigation'>
+<script setup>
 import {ref} from "vue";
 import tabsHook from "@/layout/HeaderV2/tabs-hook";
 import {useRouter} from "vue-router";

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

@@ -32,7 +32,8 @@ export interface PatInfo {
     sex?: number
     age?: number
     admissWard?: string
-    name?: string
+    name?: string;
+    smallDept?: string
 }
 
 // 患者信息

+ 39 - 50
src/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/src/ShouShu.vue

@@ -6,24 +6,22 @@ import {
 import {
   huanZheXinXi,
   onChangePatient,
-  yzHeaderSize
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {getOpRecord, getSurgeryDetail, shanChuShouShu} from "@/api/zhu-yuan-yi-sheng/shou-shu-shen-qing";
 import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
-import {windowSizeStore} from "@/utils/store-public";
 import {CyMessageBox} from "@/components/cy/message-box";
 import AddShouShu from "@/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/src/components/AddShouShu.vue";
 import {ssMitt} from "@/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/src/shou-shu";
 import ShouShuDetails
   from "@/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/src/components/ShouShuDetails.vue";
-import {OpRecord} from "@/ts-type/op-record";
 import AllSurgeries from "@/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/src/components/AllSurgeries.vue";
+import CyTabs from "@/components/cy/tabs/src/CyTabs.vue";
+import CyTabPane from "@/components/cy/tabs/src/CyTabPane.vue";
+import setDialogToJs from "@/components/js-dialog-comp/useDialogToJs";
 
 const operationData = ref([])
 const tabs = ref('ss-lishi')
 
-const details = ref<OpRecord>()
-const dialog = ref(false)
 
 const queryOperation = async () => {
   if (huanZheXinXi.value.inpatientNo) {
@@ -44,8 +42,9 @@ const delClick = async (row, index) => {
 
 const viewDetails = ({inpatientNo, admissTimes, recordId}) => {
   getSurgeryDetail(inpatientNo, admissTimes, recordId).then(res => {
-    details.value = res
-    dialog.value = true
+    setDialogToJs(ShouShuDetails, {
+      data: res
+    })
   })
 }
 
@@ -59,53 +58,43 @@ onMounted(async () => {
 <template>
   <el-container>
     <el-main>
-      <ShouShuDetails v-model:dialog="dialog" :data="details"/>
-      <el-tabs v-model="tabs" type="border-card" class="shou_shu">
-        <el-tab-pane label="历史信息" name="ss-lishi">
-          <xc-table :final-height="windowSizeStore.h / 1.1 - 30 - yzHeaderSize"
-                    :local-data="operationData">
-            <el-table-column label="申请号" prop="recordId" width="50" show-overflow-tooltip></el-table-column>
-            <el-table-column label="状态" width="40" prop="statusName" show-overflow-tooltip></el-table-column>
-            <el-table-column label="情况" width="40" prop="urgentClinicName" show-overflow-tooltip></el-table-column>
-            <el-table-column label="手术名" prop="opName" show-overflow-tooltip></el-table-column>
-            <el-table-column label="手术时间" prop="opDatetime" show-overflow-tooltip></el-table-column>
-            <el-table-column label="术前诊断" prop="diagBeforeOp" show-overflow-tooltip width="90"></el-table-column>
-            <el-table-column label="主刀" prop="doctorZdName" show-overflow-tooltip width="90"></el-table-column>
-            <el-table-column label="1助" prop="doctor1Name" show-overflow-tooltip width="90"></el-table-column>
-            <el-table-column label="麻醉方式" prop="hocusName" show-overflow-tooltip width="90"></el-table-column>
-            <el-table-column label="操作" fixed="right">
-              <template #header>
-                <el-button @click="queryOperation" type="primary">查询</el-button>
-              </template>
-              <template #default="{row,$index}">
-                <el-button @click="viewDetails(row)">查看</el-button>
-                <el-button icon="Delete" type="danger" @click.stop="delClick(row, $index)">删除</el-button>
-              </template>
-            </el-table-column>
-          </xc-table>
-        </el-tab-pane>
+      <CyTabs v-model="tabs">
+        <CyTabPane label="历史信息" name="ss-lishi">
+          <template #default="{height}">
+            <xc-table :final-height="height  - (53)"
+                      :local-data="operationData">
+              <el-table-column label="申请号" prop="recordId" width="50" show-overflow-tooltip></el-table-column>
+              <el-table-column label="状态" width="40" prop="statusName" show-overflow-tooltip></el-table-column>
+              <el-table-column label="情况" width="40" prop="urgentClinicName" show-overflow-tooltip></el-table-column>
+              <el-table-column label="手术名" prop="opName" show-overflow-tooltip></el-table-column>
+              <el-table-column label="手术时间" prop="opDatetime" show-overflow-tooltip></el-table-column>
+              <el-table-column label="术前诊断" prop="diagBeforeOp" show-overflow-tooltip width="90"></el-table-column>
+              <el-table-column label="主刀" prop="doctorZdName" show-overflow-tooltip width="90"></el-table-column>
+              <el-table-column label="1助" prop="doctor1Name" show-overflow-tooltip width="90"></el-table-column>
+              <el-table-column label="麻醉方式" prop="hocusName" show-overflow-tooltip width="90"></el-table-column>
+              <el-table-column label="操作" fixed="right">
+                <template #header>
+                  <el-button @click="queryOperation" type="primary">查询</el-button>
+                </template>
+                <template #default="{row,$index}">
+                  <el-button @click="viewDetails(row)">查看</el-button>
+                  <el-button icon="Delete" type="danger" @click.stop="delClick(row, $index)">删除</el-button>
+                </template>
+              </el-table-column>
+            </xc-table>
+          </template>
+        </CyTabPane>
 
-        <el-tab-pane label="新增" name="ss-add">
-          <div :style="{height: windowSizeStore.h / 1.6 + 'px'} " style="overflow:auto;">
-            <AddShouShu/>
-          </div>
-        </el-tab-pane>
+        <CyTabPane label="新增" name="ss-add">
+          <AddShouShu/>
+        </CyTabPane>
 
-        <el-tab-pane label="汇总" name="ss-all">
-          <div :style="{height: windowSizeStore.h / 1.1 - 30 + 'px'} " style="overflow:auto;">
-            <AllSurgeries/>
-          </div>
-        </el-tab-pane>
+        <CyTabPane label="汇总" name="ss-all">
+          <AllSurgeries/>
+        </CyTabPane>
 
-      </el-tabs>
+      </CyTabs>
     </el-main>
   </el-container>
 </template>
 
-<style lang="scss">
-.shou_shu {
-  .el-tabs__content {
-    padding: 5;
-  }
-}
-</style>

+ 4 - 11
src/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/src/components/AddShouShuEditor.vue

@@ -10,7 +10,9 @@ import {
   huoQuShouShuBuWei,
   preoperativeDiscussion
 } from "@/api/zhu-yuan-yi-sheng/shou-shu-shen-qing";
-import {getRenYuan, maZuiFangShi} from "@/api/public-api";
+import {
+  maZuiFangShi
+} from "@/api/public-api";
 import {useCompRef} from "@/utils/useCompRef";
 import {ElForm} from "element-plus";
 import moment from 'moment'
@@ -19,12 +21,10 @@ import {
   huanZheXinXi
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {userInfoStore} from "@/utils/store-public";
-import XEUtils from "xe-utils";
 import {formatDateToStr} from "@/utils/moment-utils";
 import {
   ssMitt,
   anestheticMode,
-  personnelList,
   surgicalSiteList
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/src/shou-shu";
 import SystemStaffSelect from '@/components/system/staff-select/SystemStaffSelect.vue'
@@ -43,7 +43,6 @@ const smallCodeTableHeader = [
   {code: 'label', name: '名称', width: '135px'}
 ]
 
-
 const buildOrderName = () => {
   dataModel.value.orderName =
       `拟于${getFormatDatetime(dataModel.value.opDatetime, 'YYYY-MM-DD HH:mm')}在${dataModel.value.hocusCodeName === null ? '' : dataModel.value.hocusCodeName}下行${dataModel.value.opName}`
@@ -136,15 +135,9 @@ onMounted(() => {
     })
   }
 
-  if (personnelList.value.length === 0) {
-    getRenYuan('').then(res => {
-      personnelList.value = res as any
-    })
-  }
-
   if (surgicalSiteList.value.length === 0) {
     huoQuShouShuBuWei('').then(res => {
-      surgicalSiteList.value = res
+      surgicalSiteList.value = res as any
     });
   }
 

+ 3 - 9
src/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/src/components/ShouShuDetails.vue

@@ -1,21 +1,16 @@
 <script setup lang="ts">
 import {OpRecord} from "@/ts-type/op-record";
-import {useVModels} from '@vueuse/core'
+import CyDialog from "@/components/cy/dialog/src/CyDialog.vue";
 
 const props = defineProps<{
   data: OpRecord,
-  dialog: boolean
 }>()
 
-const emits = defineEmits(['update:dialog', 'update:data'])
-const uvm = useVModels(props, emits)
-
 </script>
 
 <template>
-  <el-dialog v-model="uvm.dialog.value" title="手术详情" width="60%">
+  <CyDialog title="手术详情" body-width="60%" ignore-error>
     <div class="details_body">
-
       <div>
         <el-table :data="data.opCodeList">
           <el-table-column :label="`手术名称`" prop="name" width="120">
@@ -44,7 +39,6 @@ const uvm = useVModels(props, emits)
 
       <div>
         <el-form>
-
           <el-row :gutter="5">
             <el-col :span="12">
               <el-form-item label="手术时间" prop="opDatetime">
@@ -161,7 +155,7 @@ const uvm = useVModels(props, emits)
       </div>
 
     </div>
-  </el-dialog>
+  </CyDialog>
 </template>
 
 <style lang="scss">

+ 0 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/src/shou-shu.ts

@@ -9,8 +9,5 @@ export const ssMitt = new EventBus<SsMitt>();
 // 麻醉方式
 export const anestheticMode = ref([])
 
-// 人员
-export const personnelList = ref([])
-
 // 手术部位
 export const surgicalSiteList = ref([])

+ 6 - 10
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -46,18 +46,16 @@ import {
   clickOnThePatient,
   confirmLoading,
   errorMsgFunc,
-  getYzIndex,
   huanZheXinXi,
   queryParam,
   setYzOrderGroup,
   youWuXuanZheHuanZhe,
   yzData,
-  YzErrTypeEnum,
   yzMitt,
   YzType,
   zkList
 } from '../public-js/zhu-yuan-yi-sheng'
-import {stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
+import {stringIsBlank} from '@/utils/blank-utils'
 import {getTheTransferList} from '@/api/public-api'
 import router from '@/router'
 import sleep from "@/utils/sleep";
@@ -66,10 +64,8 @@ import {ElMessageBox} from "element-plus";
 import YzQueryCondition from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-header/YzQueryCondition";
 import YzEditor from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-edit/YzEditor.vue";
 import HuoQuMuBan from '@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/HuoQuMuBan.vue'
-import {xcMessage} from "@/utils/xiaochan-element-plus";
 import AllergenEntry from "@/components/zhu-yuan-yi-sheng/AllergenEntry.vue";
 import RationalDrugUseWindow from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/RationalDrugUseWindow.vue";
-import YzTableV2 from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/table/YzTableV2.vue";
 import FeeTable from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/FeeTable.vue";
 import {applicationForRevocation} from "@/api/zhu-yuan-yi-sheng/qrder-quash";
 import XEUtils from 'xe-utils'
@@ -77,7 +73,6 @@ import {nextTick, onActivated, onMounted, ref} from 'vue'
 import {CyMessageBox} from "@/components/cy/message-box";
 import DoctorSOrderFee from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/DoctorSOrderFee.vue";
 import YzTableV3 from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/table/YzTableV3.vue";
-import {isDev} from "@/utils/public";
 
 let allergen = ref({
   dialog: false,
@@ -91,16 +86,17 @@ let allergen = ref({
 // 医嘱编辑
 const yzEditorRef = ref(null)
 
+
 const reasonableRef = ref(null)
 
 /**
  * 确认医嘱 , 已经做过无患者的判断了
  */
 const confirmOrdersClick = async () => {
-  if (isDev) {
-    await confirmOrder()
-    return
-  }
+  // if (isDev) {
+  //   await confirmOrder()
+  //   return
+  // }
   // 如果没有问题就可以直接确认医嘱了。
   let temp = await reasonableRef.value.check(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes);
   if (temp) {

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

@@ -91,7 +91,7 @@ const submit = () => {
     password: form.password,
   }
   store.dispatch('user/login', params).then(() => {
-    if (!checkPasswordStrength(params.password)) {
+    if (!checkPasswordStrength(params.password) && !isDev) {
       changePassword(false).then(newPassword => {
         form.password = newPassword
         submit()