DESKTOP-MINPJAU\Administrator 3 роки тому
батько
коміт
10e9da3462

+ 8 - 4
src/App.vue

@@ -1,15 +1,15 @@
 <template>
   <router-view v-slot="{ Component }">
     <keep-alive>
-      <component :is="Component" />
+      <component :is="Component"/>
     </keep-alive>
   </router-view>
 </template>
 
 <script>
-import { defineComponent } from 'vue'
+import {defineComponent} from 'vue'
 import locale from 'element-plus/lib/locale/lang/zh-cn'
-import { useStore } from 'vuex'
+import {useStore} from 'vuex'
 
 export default defineComponent({
   name: 'App',
@@ -36,7 +36,7 @@ export default defineComponent({
 function getWindowSize() {
   const w = window.innerWidth
   const h = window.innerHeight - 96
-  return { w, h }
+  return {w, h}
 }
 </script>
 
@@ -169,6 +169,10 @@ function getWindowSize() {
   justify-content: center;
 }
 
+.finger:hover {
+  cursor: pointer;
+}
+
 .component-content-box__dialog-like {
   width: 60%;
   padding: 20px;

+ 45 - 0
src/components/xc/input-and-dialog/InputAndDialog.vue

@@ -0,0 +1,45 @@
+<template>
+  <el-input v-model="props.modelValue"
+            @focus="getFocus"
+            style="width: 120px"
+            @click="getFocus"/>
+
+  <XcDiaLog :data="props" v-if="dialog"></XcDiaLog>
+
+</template>
+
+<script setup name='InputAndDialog'>
+import XcDiaLog from "@/components/xc/input-and-dialog/XcDiaLog.vue";
+
+const props = defineProps({
+  modelValue: {
+    type: String,
+    default: ''
+  },
+  title: {
+    type: String,
+    default: '数据搜索'
+  },
+  data: {
+    type: Object,
+    default: {
+      currentPage: 1,
+      total: 0,
+      data: []
+    }
+  }
+})
+
+const emit = defineEmits(['focus', 'change'])
+
+let dialog = $ref(false)
+
+const getFocus = () => {
+  dialog = !dialog
+}
+
+</script>
+
+<style scoped>
+
+</style>

+ 16 - 0
src/components/xc/input-and-dialog/VDialog.js

@@ -0,0 +1,16 @@
+const dialog = {
+    mounted(el, binding, vnode) {
+        // console.log(vnode.children[0].focus())
+        console.log(el, binding, vnode)
+        // document.body.innerHTML = `<span>123123</span>`
+    }
+}
+
+const handler = (MouseEvent) => {
+    console.log(MouseEvent)
+}
+
+window.addEventListener('click', handler)
+
+
+export default dialog

+ 52 - 0
src/components/xc/input-and-dialog/XcDiaLog.vue

@@ -0,0 +1,52 @@
+<template>
+  <el-dialog v-model="dialog" :title="data.title">
+    <el-container>
+
+      <el-main>
+
+        <div style="display: flex">
+          搜索方式:
+          <div v-for="item in searchMethod">
+            <div style="width: 60px;line-height: 20px;
+            text-align: center" class="finger">{{ item.name }}
+            </div>
+          </div>
+        </div>
+
+      </el-main>
+
+    </el-container>
+    <slot/>
+  </el-dialog>
+</template>
+
+<script setup name='XcDiaLog'>
+const props = defineProps({
+  data: {
+    type: Object,
+  }
+})
+
+let dialog = $ref(true)
+let data = props.data
+
+let searchMethod = $ref([
+  {code: 'alpha', name: '拼音'},
+  {code: 'code', name: '编码'},
+  {code: 'name', name: '名称'},
+])
+
+onMounted(() => {
+  console.log(data)
+})
+
+
+</script>
+
+<style scoped lang="scss">
+.finger:hover {
+  background-color: #0a84fd;
+  color: white;
+}
+
+</style>

+ 34 - 0
src/components/xc/xc-table/XcTable.vue

@@ -0,0 +1,34 @@
+<template>
+  <el-table
+      :data="props.data.data"
+      style="width: 100%"
+      :height="props.height">
+    <slot/>
+  </el-table>
+</template>
+
+<script setup name='XcTable'>
+const props = defineProps({
+  data: {
+    type: Array,
+    default: {
+      data: [],
+      currentPage: 1,
+      pageSize: 30
+    },
+    height: {
+      type: Number,
+      default: 300,
+    },
+    openPaging: {
+      type: Boolean,
+      default: true
+    }
+  },
+})
+
+</script>
+
+<style scoped>
+
+</style>

+ 7 - 7
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue

@@ -796,11 +796,11 @@ const dianJiXiuGaiZhiXingKeShi = () => {
   if (listIsBlank(xuanZhongShuJu.value)) {
     return ElMessage.error('请先选择数据。')
   } else {
-    zhiXingKeShiData.value.forEach((item) => {
-      if (item.code === yiZhuData.value.execUnit) {
-        yiZhuData.value.execUnitName = item.name
-      }
-    })
+    // zhiXingKeShiData.value.forEach((item) => {
+    //   if (item.code === yiZhuData.value.execUnit) {
+    //     yiZhuData.value.execUnitName = item.name
+    //   }
+    // })
     xuanZhongShuJu.value.forEach((item) => {
       item.execUnit = yiZhuData.value.execUnit
       item.execUnitName = yiZhuData.value.execUnitName
@@ -1046,8 +1046,8 @@ onMounted(() => {
   if (stringNotBlank(huanZheXinXi.value.inpatientNo)) {
     zhiXingKeShiData.value = [
       {
-        code: huanZheXinXi.value.smallDept,
-        name: huanZheXinXi.value.smallDeptName,
+        value: huanZheXinXi.value.smallDept,
+        label: huanZheXinXi.value.smallDeptName,
       },
     ]
   }

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

@@ -394,9 +394,9 @@ const dianJiFuZhuXuanZhongYiZhu = () => {
 }
 
 onMounted(async () => {
-  setTimeout(() => {
-    addYiZhuClick()
-  }, 300)
+  // setTimeout(() => {
+  //   addYiZhuClick()
+  // }, 300)
   zkList.value = await getTheTransferList()
 })
 

+ 46 - 6
src/views/settings/Test.vue

@@ -6,12 +6,39 @@
   <el-button @click="test1">清空</el-button>
   <el-button @click="generateData">生成数据</el-button>
 
-  <el-button @click="testApi">API</el-button>
+  <!--  <InputAndTable v-model="tableValue" :data="tableData" :realPagination="false">-->
+  <!--    <template #aside>-->
+  <!--      <span @click="searchMethod = 'py'" label="1">拼音</span>-->
+  <!--      <span @click="te('bm')">编码</span>-->
+  <!--      <span @click="te('mc')">名称</span>-->
+  <!--    </template>-->
+  <!--    <template #tableItem>-->
+  <!--      <el-table-column label="编码" prop="code">-->
+  <!--        <template #default="scope">-->
+  <!--          <el-button @click="te( scope.row.code)">{{ scope.row.code }}</el-button>-->
+  <!--        </template>-->
+  <!--      </el-table-column>-->
+  <!--      <el-table-column label="名称" prop="name"></el-table-column>-->
+  <!--      <el-table-column label="其他" prop="qita"></el-table-column>-->
+  <!--    </template>-->
+  <!--  </InputAndTable>-->
+  <!--  <InputAndDialog v-model="inputdialog"/>-->
+  <xc-table></xc-table>
+
 </template>
 
 <script setup name='Test'>
 import sleep from "@/utils/sleep";
-import {huoQuLinChuangZhenDuan} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
+import XcTable from "@/components/xc/xc-table/XcTable.vue";
+
+
+// const
+
+
+const vChange = (val) => {
+  console.log(val)
+}
+
 
 const obj = $ref({
   tcode: '',
@@ -59,16 +86,29 @@ const test1 = async () => {
   console.log(obj.tcode)
 }
 
-
+let searchMethod = $ref('')
 const te = (val) => {
+  searchMethod = val
   console.log(val)
 }
 
-const testApi = () => {
-  huoQuLinChuangZhenDuan('123', 1).then((res) => {
-    console.log(res)
+let tableValue = $ref('')
+
+let tableData = $ref({
+  data: [],
+  currentPage: 1,
+  total: 1000
+})
+
+for (let i = 0; i < 1000; i++) {
+  tableData.data.push({
+    code: 'code' + i,
+    name: 'name' + i,
+    qita: 'qita' + 12,
   })
 }
+
+
 </script>
 
 <style scoped>