mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-05-15 00:00:02 +08:00
字典项 添加上移下移功能,修复样式
This commit is contained in:
@@ -17,9 +17,7 @@
|
||||
:placeholder="it.type.startsWith('datetime') ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'"
|
||||
>
|
||||
</el-date-picker>
|
||||
<span v-if="it.type == 'inputrange'">
|
||||
<mb-inputrange v-model="it.value" />
|
||||
</span>
|
||||
<mb-inputrange v-model="it.value" v-else-if="it.type == 'inputrange'" />
|
||||
<component v-else :is="it.type" v-model="it.value" v-bind="it.properties" />
|
||||
</el-form-item>
|
||||
</span>
|
||||
|
||||
@@ -277,11 +277,14 @@ defineExpose({ reload, exportExcel })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-image >>> .el-image__inner {
|
||||
.el-table :deep(.el-image .el-image__inner) {
|
||||
max-height: 100px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
.el-table :deep(.el-table__cell){
|
||||
z-index: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<el-input v-model="input1" /> - <el-input v-model="input2" />
|
||||
<el-input v-model="input1" />
|
||||
<span>-</span>
|
||||
<el-input v-model="input2" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -26,6 +28,9 @@ watch([input1, input2], () => {
|
||||
<style scoped>
|
||||
.el-input{
|
||||
display: inline-block;
|
||||
width: 48%;
|
||||
width: 47%;
|
||||
}
|
||||
span{
|
||||
margin: 0px 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -87,6 +87,41 @@ const tableOptions = reactive({
|
||||
field: 'sort',
|
||||
label: '排序'
|
||||
},
|
||||
{
|
||||
label: '排序',
|
||||
type: 'btns',
|
||||
width: 150,
|
||||
btns: [
|
||||
{
|
||||
label: '上移',
|
||||
type: 'text',
|
||||
icon: 'ElSortUp',
|
||||
click: (row) => {
|
||||
proxy.$get('/system/dict/items/sort/up',{
|
||||
id: row.id,
|
||||
sort: row.sort,
|
||||
dictId: props.dictId
|
||||
}).then(() => {
|
||||
reloadTable()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '下移',
|
||||
type: 'text',
|
||||
icon: 'ElSortDown',
|
||||
click: (row) => {
|
||||
proxy.$get('/system/dict/items/sort/down',{
|
||||
id: row.id,
|
||||
sort: row.sort,
|
||||
dictId: props.dictId
|
||||
}).then(() => {
|
||||
reloadTable()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
field: 'remarks',
|
||||
label: '备注'
|
||||
|
||||
@@ -27,18 +27,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="temp.sort" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="描述" prop="descRibe">
|
||||
<el-input v-model="temp.descRibe" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remarks">
|
||||
<el-input v-model="temp.remarks" />
|
||||
@@ -99,16 +92,15 @@ const tableOptions = reactive({
|
||||
width: 200,
|
||||
dictType: 'dict_type'
|
||||
},
|
||||
{
|
||||
field: 'createDate',
|
||||
label: '创建时间'
|
||||
},
|
||||
{
|
||||
field: 'remarks',
|
||||
label: '备注',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
field: 'sort',
|
||||
label: '排序',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
label: '操作',
|
||||
type: 'btns',
|
||||
@@ -161,7 +153,6 @@ const dialogTitle = ref('')
|
||||
const rules = reactive({
|
||||
dictType: [{ required: true, message: '请输入标签', trigger: 'change' }],
|
||||
type: [{ required: true, message: '请输入类型', trigger: 'change' }],
|
||||
sort: [{ required: true, message: '请输入排序', trigger: 'change' }],
|
||||
descRibe: [{ required: true, message: '请输入描述', trigger: 'change' }]
|
||||
})
|
||||
const table = ref()
|
||||
@@ -174,7 +165,6 @@ function getTemp() {
|
||||
id: '',
|
||||
dictType: '',
|
||||
type: '',
|
||||
sort: 0,
|
||||
descRibe: '',
|
||||
remarks: ''
|
||||
}
|
||||
@@ -184,15 +174,8 @@ function reloadTable() {
|
||||
table.value.reload()
|
||||
}
|
||||
|
||||
function getSort() {
|
||||
proxy.$get('/system/dict/sort').then(res => {
|
||||
temp.value.sort = res.data
|
||||
})
|
||||
}
|
||||
|
||||
function handleCreate() {
|
||||
temp.value = getTemp()
|
||||
getSort()
|
||||
dialogTitle.value = '添加'
|
||||
dictDialog.value.show()
|
||||
nextTick(() => {
|
||||
|
||||
@@ -84,7 +84,7 @@ const tableOptions = reactive({
|
||||
},
|
||||
{
|
||||
field: 'sort',
|
||||
label: '序号',
|
||||
label: '排序',
|
||||
width: 60
|
||||
},
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="filter-container">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="机构搜索">
|
||||
<el-input v-model="searchValue" @input="searchOffice" placeholder="机构名称、链接、权限标识"></el-input>
|
||||
<el-input v-model="searchValue" @input="searchOffice" placeholder="机构名称、机构编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="filter-item" type="primary" icon="ElSearch" @click="searchOffice">
|
||||
@@ -114,7 +114,7 @@ const tableOptions = reactive({
|
||||
},
|
||||
{
|
||||
field: 'sort',
|
||||
label: '序号',
|
||||
label: '排序',
|
||||
width: 60
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user