fix(ui): 用户验收反馈 R2——单卡片骨架+实测高度对齐 Notice、应用管理启用/停用、Tag 真组件、科室行 deptKey、成员多选、顶栏去房子图标钮
build / build (push) Successful in 4m4s
build / build (push) Successful in 4m4s
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<Table :columns="columns" :data="list" :height="tableH" :loading="loading" no-data-text="暂无数据"
|
||||
class="link-table table-bottom-box" @on-selection-change="selectChange">
|
||||
<template #loading>
|
||||
<div class="table-spin-load">加载中</div>
|
||||
</template>
|
||||
<template v-for="slotName in tableSlotNames" :key="slotName" v-slot:[slotName]="slotProps">
|
||||
<slot :name="slotName" v-bind="slotProps" />
|
||||
</template>
|
||||
</Table>
|
||||
<div class="table-region" ref="regionRef">
|
||||
<Table :columns="columns" :data="list" :height="tableH" :loading="loading" no-data-text="暂无数据"
|
||||
class="link-table table-bottom-box" @on-selection-change="selectChange">
|
||||
<template #loading>
|
||||
<div class="table-spin-load">加载中</div>
|
||||
</template>
|
||||
<template v-for="slotName in tableSlotNames" :key="slotName" v-slot:[slotName]="slotProps">
|
||||
<slot :name="slotName" v-bind="slotProps" />
|
||||
</template>
|
||||
</Table>
|
||||
</div>
|
||||
|
||||
<div class="page-panel">
|
||||
<div class="fl ml-15 align-middle">
|
||||
@@ -22,7 +24,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, useSlots, watch } from 'vue'
|
||||
import Utils from '@/utils'
|
||||
import { useElementHeight } from '@/utils/hook/useElementHeight'
|
||||
import { OperatorEnum } from '@/types'
|
||||
|
||||
interface Props {
|
||||
@@ -44,7 +46,10 @@ const emit = defineEmits<{
|
||||
}>()
|
||||
const slots = useSlots()
|
||||
|
||||
const tableH = ref(props.tableHeight ?? Utils.useTableHeight())
|
||||
const regionRef = ref<HTMLElement | null>(null)
|
||||
const measuredH = useElementHeight(regionRef)
|
||||
// 显式传 tableHeight 则尊重之;否则实测 .table-region(flex:1)高度喂固定表头,首帧未测出前用 undefined(auto)
|
||||
const tableH = computed(() => props.tableHeight ?? (measuredH.value || undefined))
|
||||
const tableSlotNames = computed(() => Object.keys(slots).filter(name => !['default', 'loading'].includes(name)))
|
||||
|
||||
const selectList = ref<number[]>([])
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
<template>
|
||||
<!-- 单选用户输入(参照 Notice 自定义组选人范式):readonly Input + 选择按钮 + 清空;
|
||||
v-model=用户 id;display-name 回显姓名快照(调用方已知姓名时随值下传) -->
|
||||
<div class="sel-user-box">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="nameText"
|
||||
readonly
|
||||
placeholder="点击「选择」指定用户"
|
||||
class="input"
|
||||
></Input>
|
||||
<Button icon="md-add" @click="openModal">选择</Button>
|
||||
<Button icon="md-trash" v-if="modelValue" @click="reset"></Button>
|
||||
<UserCheckModal
|
||||
ref="userCheckModal"
|
||||
:sources="sources"
|
||||
:multiple="false"
|
||||
@on-submit="onSubmit"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import UserCheckModal from "@/components/UserCheckModal.vue";
|
||||
import { flowApi } from "@/api/module/flow";
|
||||
|
||||
export default {
|
||||
name: "UserSelectInput",
|
||||
components: { UserCheckModal },
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
/** 当前 id 的姓名快照(编辑回显/选中即得,避免 #id 兜底) */
|
||||
displayName: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
emits: ["update:modelValue", "update:displayName", "on-change"],
|
||||
data() {
|
||||
return {
|
||||
nameText: this.displayName,
|
||||
sources: [
|
||||
{
|
||||
name: "基础平台",
|
||||
loader: () => flowApi.adminTeacherTree().send() as Promise<any[]>,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openModal() {
|
||||
(this.$refs.userCheckModal as any).show();
|
||||
},
|
||||
/** 单选弹窗提交:数组恒为 1 条(多选复用同组件) */
|
||||
onSubmit(arr: any[]) {
|
||||
if (!arr || !arr.length) return;
|
||||
const u = arr[0];
|
||||
this.nameText = u.name + "(" + u.id + ")";
|
||||
this.$emit("update:modelValue", u.id);
|
||||
this.$emit("update:displayName", u.name);
|
||||
this.$emit("on-change", u);
|
||||
},
|
||||
reset() {
|
||||
this.nameText = "";
|
||||
this.$emit("update:modelValue", null);
|
||||
this.$emit("update:displayName", "");
|
||||
this.$emit("on-change", null);
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
modelValue(val: number) {
|
||||
// 外部清空/重置时同步清姓名
|
||||
if (!val) this.nameText = "";
|
||||
else if (!this.nameText) this.nameText = "#" + val;
|
||||
},
|
||||
displayName(val: string) {
|
||||
this.nameText = val;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sel-user-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
.input {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -191,11 +191,6 @@ function linkHomePage() {
|
||||
<header class="header-container fix">
|
||||
<!-- 云海 logo 徽标(结构与 Notice layout 对齐,皮肤见通道 base.layout.css .logo-badge) -->
|
||||
<span class="logo-badge fl"><img :src="logoUrl" alt="云海" @error="onLogoError" /></span>
|
||||
<div class="fl align-middle icon-box">
|
||||
<div title="首页" class="icon-btn" @click="linkHomePage">
|
||||
<i class="iconfont icon-shouye"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="delimiter fl align-middle"></div>
|
||||
<h4 class="fl align-middle">{{ appName }}</h4>
|
||||
<div class="school-bg"></div>
|
||||
|
||||
Reference in New Issue
Block a user