|
@@ -0,0 +1,362 @@
|
|
|
+<template>
|
|
|
+ <div class="dialog_container">
|
|
|
+ <div class="dialog_container_header">
|
|
|
+ <div class="dialog_container_header_title">
|
|
|
+ <img :src="getImgSrc(dialogOptions.imgName)" alt="icon" />
|
|
|
+ <div>{{ dialogOptions.title }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="dialog_container_header_btn">
|
|
|
+ <div class="btn_box">
|
|
|
+ <div class="img_close" @click="handleClose">
|
|
|
+ <img src="../../../../../assets/img/弹窗关闭.png" alt="close" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-input v-model="time" placeholder="请输入要查询的内容"></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="tab_box">
|
|
|
+ <div v-for="(item, index) in dialogOptions.buttons" :key="item.id" class="right_btn" :class="{ right_btn_active: btnActiveIndex === index }" @click="handleButtonClick(index)">
|
|
|
+ {{ item.title }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ :data="dialogOptions.tableData"
|
|
|
+ class="dialog_table"
|
|
|
+ @row-click="handleRowClick"
|
|
|
+ :header-cell-style="{ backgroundColor: 'transparent', color: '#ffffff' }"
|
|
|
+ :row-class-name="tableRowClassName"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ v-for="(column, colIndex) in dialogOptions.tableColumns"
|
|
|
+ :key="`col_${colIndex}_${column.prop}`"
|
|
|
+ :type="column.type"
|
|
|
+ :prop="column.prop"
|
|
|
+ :label="column.label"
|
|
|
+ :width="column.width"
|
|
|
+ :align="column.align || 'center'"
|
|
|
+ :formatter="column.formatter"
|
|
|
+ >
|
|
|
+ <!-- 支持自定义列模板 -->
|
|
|
+ <template v-if="column.slot" #default="scope">
|
|
|
+ <slot :name="column.slot" :row="scope.row"></slot>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { ref, watch } from 'vue'
|
|
|
+import { useDialogStore } from '@/store/dialog'
|
|
|
+let dialogStore = useDialogStore()
|
|
|
+const emit = defineEmits(['close', 'button-click', 'row-click'])
|
|
|
+
|
|
|
+// const props = defineProps({
|
|
|
+// options: {
|
|
|
+// type: Object,
|
|
|
+// required: true,
|
|
|
+// default: () => ({
|
|
|
+// imgName: '小标题',
|
|
|
+// title: '检测结果',
|
|
|
+// buttons: [],
|
|
|
+// tableData: [],
|
|
|
+// tableColumns: [
|
|
|
+// // 添加默认列配置
|
|
|
+// // { type: 'index', label: '序号', width: '80' },
|
|
|
+// // { prop: 'name', label: '姓名' },
|
|
|
+// // { prop: 'type', label: '类型' },
|
|
|
+// // { prop: 'address', label: '现住址' },
|
|
|
+// // { prop: 'relation', label: '与病例关系' },
|
|
|
+// // { prop: 'lastContact', label: '末次接触日期' },
|
|
|
+// // { prop: 'status', label: '管理状态' }
|
|
|
+// ],
|
|
|
+// activeIndex: {
|
|
|
+// default: 0
|
|
|
+// }
|
|
|
+// }),
|
|
|
+// validator: value => {
|
|
|
+// return [
|
|
|
+// 'imgName',
|
|
|
+// 'title',
|
|
|
+// 'tableData',
|
|
|
+// 'tableColumns' // 添加列配置验证
|
|
|
+// ].every(key => key in value)
|
|
|
+// }
|
|
|
+// }
|
|
|
+// })
|
|
|
+
|
|
|
+const dialogOptions = ref({
|
|
|
+ imgName: '小标题',
|
|
|
+ title: '病例列表',
|
|
|
+ activeIndex: 0,
|
|
|
+ buttons: [
|
|
|
+ { id: 0, title: '病例', active: true },
|
|
|
+ { id: 1, title: '密接', active: false },
|
|
|
+ { id: 2, title: '次密接', active: false }
|
|
|
+ ],
|
|
|
+ tableColumns: [
|
|
|
+ { type: 'index', label: '序号', width: '80' },
|
|
|
+ { prop: 'code', label: '病例编号' },
|
|
|
+ { prop: 'name', label: '姓名' }
|
|
|
+ ],
|
|
|
+ tableData: [
|
|
|
+ // 数据...
|
|
|
+ { code: '18-2024-1207-01-猴痘' ,name:'张嘉佳'},
|
|
|
+ { code: '05-2024-1207-01-猴痘' ,name:'孙忆枫'},
|
|
|
+ { code: '31-2024-1207-01-疟疾', name: '杨静云' },
|
|
|
+ { code: '31-2024-1207-01-疟疾' ,name:'王乐康'},
|
|
|
+ { code: '01-2024-1207-01-猩红热' ,name:'李怡悦'},
|
|
|
+ { code: '01-2024-1207-01-猩红热' ,name:'庞慧'},
|
|
|
+ { code: '01-2024-1207-01-猩红热' ,name:'李书易'},
|
|
|
+ { code: '01-2024-1207-01-猩红热' ,name:'胡小小'},
|
|
|
+ { code: '01-2024-1207-01-猩红热' ,name:'周乐心'},
|
|
|
+ { code: '01-2024-1207-01-猩红热' ,name:'杨松生'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'顾伦'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'王漫'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'尹丽娜'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'池子仪'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'李赫'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'傅彭薄'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻', name: '裴谊育' },
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'鲍业宝'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'黄隆心'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'侯彩蕊'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻04-2024-1207-01-聚集性呕吐腹泻' ,name:'冯立俏'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'宫臻'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'毛妹莲'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'孔崧谊'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'宁淑曼'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'明忱冶'},
|
|
|
+ { code: '04-2024-1207-01-聚集性呕吐腹泻' ,name:'叶洵歆'},
|
|
|
+
|
|
|
+ ]
|
|
|
+})
|
|
|
+
|
|
|
+const btnActiveIndex = ref(0)
|
|
|
+
|
|
|
+// 图片路径处理方法
|
|
|
+const getImgSrc = picName => {
|
|
|
+ return new URL(`../../../../../assets/img/${picName}.png`, import.meta.url).href
|
|
|
+}
|
|
|
+
|
|
|
+// 关闭弹窗
|
|
|
+const handleClose = () => {
|
|
|
+ // emit('close')
|
|
|
+ dialogStore.setLaboratoryTestNodeDialogOpen(false)
|
|
|
+}
|
|
|
+
|
|
|
+// 表格行点击
|
|
|
+const handleRowClick = row => {
|
|
|
+ emit('row-click', row)
|
|
|
+}
|
|
|
+
|
|
|
+// 按钮点击处理
|
|
|
+const handleButtonClick = index => {
|
|
|
+ btnActiveIndex.value = index
|
|
|
+ // emit('button-click', {
|
|
|
+ // index,
|
|
|
+ // button: props.options.buttons[index]
|
|
|
+ // })
|
|
|
+}
|
|
|
+
|
|
|
+const tableRowClassName = ({ row, rowIndex }) => {
|
|
|
+ return rowIndex % 2 === 0 ? 'single-row' : 'double-row'
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.dialog_container {
|
|
|
+ position: absolute;
|
|
|
+ right: -400px;
|
|
|
+ top: -20px;
|
|
|
+ width: 396px;
|
|
|
+ height: 768px;
|
|
|
+ background: url(../../../../../assets/img/弹框-小.png) no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ padding: 40px 50px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ // background-color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_container_header {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ width: 100%;
|
|
|
+ height: 50px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ // padding: 0 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_container_header_title {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 24px;
|
|
|
+ font-style: normal;
|
|
|
+ text-transform: none;
|
|
|
+ background: linear-gradient(to bottom, #ffffff 0%, #a4e9ff 100%);
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ -webkit-text-fill-color: transparent;
|
|
|
+ > img {
|
|
|
+ width: 22px;
|
|
|
+ height: 22px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.tab_box {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ height: 60px;
|
|
|
+ padding: 0 30px;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.right_btn {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ // padding: 0 10px;
|
|
|
+ font-family: Alimama ShuHeiTi;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #8dbfee;
|
|
|
+ font-style: italic;
|
|
|
+ background: linear-gradient(0deg, rgba(239, 251, 255, 0.34) 0%, rgba(0, 0, 0, 0.34) 11.9140625%, rgba(255, 254, 254, 0.34) 100%);
|
|
|
+ opacity: 0.85;
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ // margin-right: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+.right_btn_active {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 90px;
|
|
|
+ height: 32px;
|
|
|
+ text-align: center;
|
|
|
+ background: url(../../../../../assets/img/tab选中.png) no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ // border-radius: 4px 4px 4px 4px;
|
|
|
+ // border: 1px solid #6fe5ff;
|
|
|
+ font-family: Alimama ShuHeiTi;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 18px;
|
|
|
+ color: #daedff;
|
|
|
+ font-style: italic;
|
|
|
+}
|
|
|
+
|
|
|
+.img_close {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_table {
|
|
|
+ width: 100%;
|
|
|
+ height: 540px;
|
|
|
+}
|
|
|
+
|
|
|
+// 表格行间距
|
|
|
+// :deep(.el-table__body) {
|
|
|
+// -webkit-border-vertical-spacing: 6px;
|
|
|
+// }
|
|
|
+
|
|
|
+/* 防止文字模糊 */
|
|
|
+
|
|
|
+
|
|
|
+:deep(.el-table__inner-wrapper:before) {
|
|
|
+ height: 0;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-select__wrapper) {
|
|
|
+ min-height: 32px !important;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+</style>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+//下拉框背景色
|
|
|
+.el-popper.is-light.dialog_custom-select {
|
|
|
+ // background-color: rgba(16,104,179, 0.3) !important;
|
|
|
+ background-color: rgba(16, 104, 179, 0.3) !important;
|
|
|
+ // border: 1px solid #1d85a9 !important;
|
|
|
+ border: 1px solid #1d85a9 !important;
|
|
|
+ background: #003861 !important;
|
|
|
+ box-shadow: inset 0px 0px 8px 0px rgba(64, 211, 255, 0.5) !important;
|
|
|
+ border-radius: 4px 4px 4px 4px;
|
|
|
+}
|
|
|
+
|
|
|
+.el-select-dropdown__empty,
|
|
|
+.el-select-dropdown__loading {
|
|
|
+ color: #ffffff !important;
|
|
|
+}
|
|
|
+
|
|
|
+.el-select__placeholder {
|
|
|
+ color: #ffffff !important;
|
|
|
+}
|
|
|
+
|
|
|
+//下拉框的链接小方块
|
|
|
+.dialog_custom-select.el-popper[data-popper-placement^='bottom'] .el-popper__arrow::before {
|
|
|
+ // background: rgba(1, 28, 82, 0.8) !important;
|
|
|
+ // background-color: rgba(16,104,179, 0.3) !important;
|
|
|
+ display: none;
|
|
|
+ // border: 1px solid #1d85a9 !important;
|
|
|
+}
|
|
|
+
|
|
|
+.dialog_custom-select.el-popper[data-popper-placement^='top'] .el-popper__arrow::before {
|
|
|
+ // background: #254277 !important;
|
|
|
+ // background-color: rgba(16,104,179, 0.3)!important;
|
|
|
+ // border: 1px solid #1d85a9 !important;
|
|
|
+}
|
|
|
+
|
|
|
+//鼠标移动上去的选中色
|
|
|
+.dialog_custom-select {
|
|
|
+ .el-select-dropdown__item.is-hovering {
|
|
|
+ background: linear-gradient(270deg, rgba(6, 195, 255, 0.1) 0%, rgba(6, 195, 255, 0.68) 100%) !important;
|
|
|
+ border-radius: 2px 2px 2px 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ //下拉框的文本颜色
|
|
|
+ .dialog_custom-select .el-select-dropdown__item {
|
|
|
+ // color: #B3BCCE !important;
|
|
|
+ // color: var(--SelectrColor) !important;
|
|
|
+ color: #ffffff !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ //选中之后的颜色
|
|
|
+ .el-select-dropdown__item.selected {
|
|
|
+ // background: var(--SelectredBgc2) !important;
|
|
|
+ // color: var(--SelectredColor) !important;
|
|
|
+
|
|
|
+ background: linear-gradient(270deg, rgba(6, 195, 255, 0.1) 0%, rgba(6, 195, 255, 0.68) 100%) !important;
|
|
|
+ border-radius: 2px 2px 2px 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ padding: 0 2px !important;
|
|
|
+}
|
|
|
+
|
|
|
+.el-select {
|
|
|
+ --el-border-color-hover: rgba(10, 192, 246, 1);
|
|
|
+ --el-border-color: rgba(111, 229, 255, 0.3);
|
|
|
+}
|
|
|
+
|
|
|
+/* 单行背景色 */
|
|
|
+.dialog_table .single-row {
|
|
|
+ background-color: rgba(27, 130, 183, 0.22) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 双行背景色 */
|
|
|
+.dialog_table .double-row {
|
|
|
+ background-color: rgba(27, 130, 183, 0.12) !important;
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|