feat: 多个模块新增功能与优化交互
1. DictSelect组件新增单选按钮组渲染模式 2. 公告管理页面新增查看公告功能 3. 合同产品内容组件优化产品选择器与表格布局
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user