refactor(system): 优化系统模块代码结构和功能

- 修改 MyMetaObjectHandler 中的时间处理方式,使用 Date 类型替代 Timestamp
- 新增 AnyQueryTool 工具类,提供通用的 MyBatis Plus 查询方法
- 优化 YamlEdit 组件,增加只读模式和默认高度设置
-修复 CuteDeptTree 组件中的数据获取方法名称
- 调整系统菜单组件中的输入框宽度
This commit is contained in:
2025-05-15 19:57:36 +08:00
parent facce307b6
commit a65d33716f
5 changed files with 90 additions and 32 deletions
@@ -1,7 +1,5 @@
<template>
<div class="json-editor">
<textarea ref="textarea" />
</div>
<textarea ref="textarea" />
</template>
<script>
@@ -18,7 +16,13 @@ export default {
},
height: {
type: String,
required: true
required: false,
default: '450px'
},
readOnly: {
type: Boolean,
required: false,
default: false
}
},
data() {
@@ -33,8 +37,8 @@ export default {
this.editor.setValue(this.value)
}
},
height(value) {
this.editor.setSize('auto', this.height)
height(newHeight) {
this.editor.setSize('auto', newHeight)
}
},
mounted() {
@@ -49,7 +53,10 @@ export default {
theme: 'idea'
})
this.editor.setSize('auto', this.height)
this.editor.setValue(this.value)
if (this.value) {
this.editor.setValue(this.value)
}
this.editor.setOption('readOnly', this.readOnly)
this.editor.on('change', cm => {
this.$emit('changed', cm.getValue())
this.$emit('input', cm.getValue())
@@ -62,20 +69,3 @@ export default {
}
}
</script>
<style scoped>
.json-editor{
height: 100%;
margin-bottom: 10px;
}
.json-editor >>> .CodeMirror {
font-size: 13px;
overflow-y:auto;
font-weight:normal
}
.json-editor >>> .CodeMirror-scroll{
}
.json-editor >>> .cm-s-rubyblue span.cm-string {
color: #F08047;
}
</style>
@@ -8,7 +8,7 @@
placeholder="输入部门名称搜索"
prefix-icon="el-icon-search"
class="filter-item"
@input="getDeptDatas"
@input="getDeptData"
/>
</div>
<el-tree
@@ -64,7 +64,7 @@ export default {
if (resolve) {
resolve(res.content)
} else {
this.deptDatas = res.content
this.deptData = res.content
}
})
}, 100)
@@ -68,10 +68,10 @@
<el-input-number v-model.number="form.menuSort" :min="0" :max="999" controls-position="right" style="width: 178px;" />
</el-form-item>
<el-form-item v-show="form.iFrame.toString() !== 'true' && form.type.toString() === '1'" label="组件名称" prop="componentName">
<el-input v-model="form.componentName" style="width: 178px;" placeholder="匹配组件内Name字段" />
<el-input v-model="form.componentName" style="width: 450px;" placeholder="匹配组件内Name字段" />
</el-form-item>
<el-form-item v-show="form.iFrame.toString() !== 'true' && form.type.toString() === '1'" label="组件路径" prop="component">
<el-input v-model="form.component" style="width: 178px;" placeholder="组件路径" />
<el-input v-model="form.component" style="width: 450px;" placeholder="组件路径" />
</el-form-item>
<el-form-item label="上级类目" prop="pid">
<treeselect