| | |
| | | :row-key="rowKey" |
| | | :style="tableStyle" |
| | | tooltip-effect="dark" |
| | | :tooltip-options="{ popperOptions: { strategy: 'absolute' } }" |
| | | :expand-row-keys="expandRowKeys" |
| | | :show-summary="isShowSummary" |
| | | :summary-method="summaryMethod" |
| | |
| | | @current-change="currentChange" |
| | | @selection-change="handleSelectionChange" |
| | | @expand-change="expandChange" |
| | | @sort-change="handleSortChange" |
| | | class="lims-table"> |
| | | <el-table-column align="center" |
| | | type="selection" |
| | |
| | | :prop="item.prop" |
| | | :show-overflow-tooltip="item.dataType !== 'action' && item.dataType !== 'slot'" |
| | | :align="item.align" |
| | | :sortable="!!item.sortable" |
| | | :sortable="item.sortable || false" |
| | | :type="item.type" |
| | | :width="item.width" |
| | | :minWidth="item.minWidth"> |
| | |
| | | class="cell link" |
| | | style="width: 100%" |
| | | @click="goLink(scope.row, item.linkMethod)"> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <span v-if="!item.formatData">{{ |
| | | toDateOnly(scope.row[item.prop]) |
| | | }}</span> |
| | | </div> |
| | | <!-- 默认纯展示数据 --> |
| | | <div v-else |
| | | class="cell" |
| | | style="width: 100%"> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <span v-if="!item.formatData">{{ |
| | | toDateOnly(scope.row[item.prop]) |
| | | }}</span> |
| | | <span v-else>{{ |
| | | formatters(scope.row[item.prop], item.formatData) |
| | | toDateOnly(formatters(scope.row[item.prop], item.formatData)) |
| | | }}</span> |
| | | </div> |
| | | </template> |
| | |
| | | import pagination from "./Pagination.vue"; |
| | | import { computed, ref, inject, getCurrentInstance } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { toDateOnly } from "@/utils/dateDisplay"; |
| | | |
| | | // 获取全局的 uploadHeader |
| | | const { proxy } = getCurrentInstance(); |
| | |
| | | "expand-change", |
| | | "selection-change", |
| | | "row-click", |
| | | "sort-change", |
| | | ]); |
| | | |
| | | // Filters |
| | |
| | | const handleSelectionChange = newSelection => { |
| | | emit("selection-change", newSelection); |
| | | }; |
| | | |
| | | const handleSortChange = ({ column, prop, order }) => { |
| | | emit("sort-change", { column, prop, order }); |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |