1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <script setup lang="tsx">
- import { useArchiveKey } from "@/views/archive/index";
- import { magicApi } from "@/utils/database/magic-api-request";
- const root = inject(useArchiveKey);
- async function handleClick(data) {
- const res = await magicApi({
- url: "/intergration/jyjc/getJyImage",
- method: "get",
- params: {
- reportId: data.reportId,
- },
- });
- root.store.mainComponent = (
- <div>
- {...res.items.map(item => {
- return (
- <img
- src={`data:image/png;base64,${item.imgData}`}
- style={{ width: "100%" }}
- alt="null"
- />
- );
- })}
- </div>
- );
- }
- const Table = props => {
- return (
- <div style={{ height: "50%" }}>
- <el-table data={props.data} height="100%" onRowClick={handleClick}>
- <el-table-column label={props.name}>
- <el-table-column prop="trscDate" label="日期" />
- <el-table-column
- prop="examPurpose"
- label="名称"
- show-overflow-tooltip
- />
- </el-table-column>
- </el-table>
- </div>
- );
- };
- </script>
- <template>
- <div style="width: 220px">
- <Table name="常规" :data="root.cache.jianYan.biochemicalSingle" />
- <Table name="生化单" :data="root.cache.jianYan.routine" />
- </div>
- </template>
- <style lang="scss"></style>
|