dev
This commit is contained in:
parent
e899aaa2d3
commit
ce371abd82
|
|
@ -69,7 +69,6 @@ const generateCalendarData = (
|
||||||
|
|
||||||
// 使用示例
|
// 使用示例
|
||||||
const calendarData = generateCalendarData(currentYear, currentMonth);
|
const calendarData = generateCalendarData(currentYear, currentMonth);
|
||||||
console.log(calendarData);
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,46 @@
|
||||||
<template>
|
<template>
|
||||||
<el-popover placement="bottom-start" :visible="isVisible" :width="props.width" ref="popoverRef"
|
<el-popover placement="bottom-start" :visible="isVisible" :width="props.width" ref="popoverRef"
|
||||||
@before-enter="beforeShow" @hide="afterShow">
|
@before-enter="beforeShow" @hide="afterShow" popper-class="type-popper">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-input v-model="keyword" style="width: 100%;height: 100%" @input="changeInput" :disabled="disabled" @click="changeInput"
|
<el-input v-model="keyword" style="width: 100%;height: 100%" @input="changeInput" :disabled="disabled" @click="changeInput"
|
||||||
placeholder="诊断选择" ref="inputRef" @focus="focus" @blur="handleBlur"></el-input>
|
placeholder="诊断选择" ref="inputRef" @focus="focus" @blur="handleBlur"></el-input>
|
||||||
</template>
|
</template>
|
||||||
<div class="container">
|
<div class="container" style="height: 300px">
|
||||||
<el-table :data="searchList" style="width: 100%" @row-click="clickRow" :show-header="props.showHeader"
|
<el-scrollbar style="height: 300px">
|
||||||
size="small"
|
<table class="table" style="width: 100%; border-collapse: collapse;max-height: 50px">
|
||||||
max-height="250px">
|
<!-- 表头 -->
|
||||||
<el-table-column v-for="item in showConfig" :prop="item.prop" :label="item.label"
|
<thead>
|
||||||
show-overflow-tooltip></el-table-column>
|
<tr class="table-title">
|
||||||
</el-table>
|
<th
|
||||||
|
v-for="item in showConfig"
|
||||||
|
:key="item.prop"
|
||||||
|
style="background-color: #f5f7fa; padding: 8px;"
|
||||||
|
>
|
||||||
|
{{ item.label }}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<!-- 表体 -->
|
||||||
|
<tbody>
|
||||||
|
<tr class="table-body"
|
||||||
|
v-for="(item, index) in searchList"
|
||||||
|
:key="index"
|
||||||
|
@click="clickRow(item)"
|
||||||
|
style="cursor: pointer; transition: background-color 0.2s;"
|
||||||
|
>
|
||||||
|
<td
|
||||||
|
v-for="showItem in showConfig"
|
||||||
|
:key="showItem.prop"
|
||||||
|
style="vertical-align: middle; padding: 8px;"
|
||||||
|
>
|
||||||
|
{{ item[showItem.prop] }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</el-scrollbar>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -132,4 +161,55 @@ defineExpose({init,clear})
|
||||||
:deep(.el-table--small .el-table__cell) {
|
:deep(.el-table--small .el-table__cell) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
.table {
|
||||||
|
th {
|
||||||
|
background: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-title {
|
||||||
|
height: 52px;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333333;
|
||||||
|
font-style: normal;
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: left;
|
||||||
|
&:nth-child(1) {
|
||||||
|
text-align: left;
|
||||||
|
border-radius: 8px 8px 0 0;
|
||||||
|
padding-left: 24px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-body {
|
||||||
|
height: 52px;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666666;
|
||||||
|
font-style: normal;
|
||||||
|
td {
|
||||||
|
&:nth-child(1) {
|
||||||
|
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 30px !important;
|
||||||
|
white-space: nowrap; /* 防止文本换行 */
|
||||||
|
overflow: hidden; /* 隐藏溢出的文本 */
|
||||||
|
text-overflow: ellipsis; /* 显示省略号 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-radius: 0 0 8px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #4D6DE4;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -82,7 +82,7 @@ const getInfoFor1101 = (params: any) => {
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
});
|
});
|
||||||
emit('socialCardUpdate', socialCard.value)
|
emit('socialCardUpdate', socialCard.value)
|
||||||
}).catch(() => {
|
}).catch((err:any) => {
|
||||||
isReading.value = false;
|
isReading.value = false;
|
||||||
emit('changeLoading', false)
|
emit('changeLoading', false)
|
||||||
ElMessage({
|
ElMessage({
|
||||||
|
|
@ -104,7 +104,7 @@ onUnmounted(() => {
|
||||||
|
|
||||||
})
|
})
|
||||||
const close = () => {
|
const close = () => {
|
||||||
socialCard.value = null
|
socialCard.value = {}
|
||||||
}
|
}
|
||||||
defineExpose({close})
|
defineExpose({close})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -359,7 +359,6 @@ const deleteCard = () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
cardDefaultRef.value?.close()
|
cardDefaultRef.value?.close()
|
||||||
height.value = 470
|
height.value = 470
|
||||||
console.log(socialCard.value,'socialCard')
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue