feat: 多个模块新增功能与优化交互

1.  DictSelect组件新增单选按钮组渲染模式
2.  公告管理页面新增查看公告功能
3.  合同产品内容组件优化产品选择器与表格布局
This commit is contained in:
2026-05-12 10:47:21 +08:00
parent 1e62425fb8
commit 9b2e62916f
4 changed files with 260 additions and 207 deletions

View File

@@ -1,8 +1,8 @@
<template>
<div style="display: flex; align-items: center;" v-loading="loading">
<!-- 下拉选择器绑定计算属性做双向绑定保留原有样式+清空功能 -->
<!-- 下拉选择器 -->
<el-select
v-if="!toolbarOnly"
v-if="!toolbarOnly && renderType === 'select'"
v-model="innerValue"
:placeholder="placeholder"
clearable filterable
@@ -17,6 +17,22 @@
/>
</el-select>
<!-- 单选按钮组 -->
<el-radio-group
v-if="!toolbarOnly && renderType === 'radio'"
v-model="innerValue"
:style="radioStyle"
>
<el-radio-button
v-for="item in radioOptions"
:key="item.dictValue"
:label="item.dictValue"
:disabled="item.disabled"
>
{{ item.dictLabel }}
</el-radio-button>
</el-radio-group>
<!-- 编辑按钮点击打开弹窗 -->
<div
v-if="editable"
@@ -163,6 +179,7 @@ export default {
refresh: { type: Boolean, default: true },
multiple: { type: Boolean, default: false },
disables: { type: String, default: '' },
renderType: { type: String, default: 'select' },
},
data() {
return {
@@ -213,6 +230,16 @@ export default {
}
})
},
radioOptions() {
const options = [{ dictLabel: '全部', dictValue: '', disabled: false }, ...this.dictOptions]
return options.map(item => ({
...item,
disabled: this.disabledFormat(item.dictValue)
}))
},
radioStyle() {
return 'display: flex; align-items: center; flex-wrap: wrap; gap: 8px;'
}
},
watch: {
dictType: {