枚举配置页面修改
This commit is contained in:
parent
34ebafaef1
commit
406d7fca24
@ -3,29 +3,26 @@
|
|||||||
<el-container class="containerPart">
|
<el-container class="containerPart">
|
||||||
<el-aside class="defaultAside">
|
<el-aside class="defaultAside">
|
||||||
<el-main class="treeMain">
|
<el-main class="treeMain">
|
||||||
<!-- <div class="demo-collapse">
|
<!-- <div class="demo-collapse">-->
|
||||||
<el-collapse>
|
<!-- <el-collapse v-model="activeName" accordion>-->
|
||||||
<el-collapse-item class="treeTitle" title="枚举类型配置" name="1" :icon="CaretRight">
|
<!-- <el-collapse-item name="1">-->
|
||||||
<div>
|
<!-- <template #title>-->
|
||||||
<el-tree
|
<!-- <span class="collapse-title">枚举类型配置</span>-->
|
||||||
style="max-width: 600px;margin-top: 2.2%"
|
<!-- </template>-->
|
||||||
ref="TypeTree"
|
<!-- <div>-->
|
||||||
:data="TypeData"
|
<!-- <el-tree-->
|
||||||
:props="defaultProps"
|
<!-- style="max-width: 600px;margin-top: 2.2%"-->
|
||||||
node-key="id"
|
<!-- ref="TypeTree"-->
|
||||||
@node-click="handleNodeClick"
|
<!-- :data="TypeData"-->
|
||||||
/>
|
<!-- :props="defaultProps"-->
|
||||||
</div>
|
<!-- node-key="id"-->
|
||||||
|
<!-- @node-click="handleNodeClick"-->
|
||||||
<!– <template #title>
|
<!-- />-->
|
||||||
枚举类型配置<el-icon class="header-icon" :icon="CaretRight"></el-icon>
|
<!-- </div>-->
|
||||||
</template>–>
|
<!-- </el-collapse-item>-->
|
||||||
<!– <label class="treeTitle">枚举类型配置</label>–>
|
<!-- </el-collapse>-->
|
||||||
|
<!-- </div>-->
|
||||||
</el-collapse-item>
|
<!-- <label class="treeTitle">枚举类型配置</label>-->
|
||||||
</el-collapse>
|
|
||||||
</div>-->
|
|
||||||
<label class="treeTitle">枚举类型配置</label>
|
|
||||||
<el-tree
|
<el-tree
|
||||||
style="max-width: 600px;margin-top: 2.2%"
|
style="max-width: 600px;margin-top: 2.2%"
|
||||||
ref="TypeTree"
|
ref="TypeTree"
|
||||||
@ -192,7 +189,7 @@ import {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const activeName = ref('1')
|
||||||
interface Tree {
|
interface Tree {
|
||||||
enumId: number,
|
enumId: number,
|
||||||
enumName: string,
|
enumName: string,
|
||||||
@ -201,11 +198,18 @@ interface Tree {
|
|||||||
|
|
||||||
|
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
|
children: 'children',
|
||||||
label: 'description',
|
label: 'description',
|
||||||
}
|
}
|
||||||
|
|
||||||
const tableData = ref()
|
const tableData = ref()
|
||||||
const TypeData=ref()
|
//const TypeData=ref()
|
||||||
|
const TypeData=ref([{
|
||||||
|
id: 0,
|
||||||
|
name: "",
|
||||||
|
description: "枚举类型配置",
|
||||||
|
children: []
|
||||||
|
}])
|
||||||
const TypeTree = ref()
|
const TypeTree = ref()
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const enumTypeId=ref()
|
const enumTypeId=ref()
|
||||||
@ -227,10 +231,12 @@ const clickQuery = () => {
|
|||||||
const enumTreeTypeList = () => {
|
const enumTreeTypeList = () => {
|
||||||
enumTreeQuery().then((res) => {
|
enumTreeQuery().then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
TypeData.value = res.data
|
//TypeData.value = res.data
|
||||||
|
TypeData.value[0].children = res.data
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
enumTypeId.value=res.data[0]?.id
|
enumTypeId.value=res.data[0]?.id
|
||||||
TypeTree.value?.setCurrentKey(res.data[0]?.id!, false)
|
//TypeTree.value?.setCurrentKey(res.data[0]?.id!, false)
|
||||||
|
TypeTree.value?.setCurrentKey(TypeData.value[0].id!, false)
|
||||||
queryListData.description =queryName.value
|
queryListData.description =queryName.value
|
||||||
queryListData.enumTypeId = res.data[0].id
|
queryListData.enumTypeId = res.data[0].id
|
||||||
queryListData.pageNum=currentPage.value,
|
queryListData.pageNum=currentPage.value,
|
||||||
@ -379,7 +385,6 @@ const queryenumValueMethod = (data: any) => {
|
|||||||
const onSubmitvalue = () => {
|
const onSubmitvalue = () => {
|
||||||
formRef.value.validate((valid: any) => {
|
formRef.value.validate((valid: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
debugger
|
|
||||||
if(formInlineValue.isActive==true){
|
if(formInlineValue.isActive==true){
|
||||||
formInlineValue.isActive=1
|
formInlineValue.isActive=1
|
||||||
}else{
|
}else{
|
||||||
@ -388,9 +393,7 @@ const onSubmitvalue = () => {
|
|||||||
|
|
||||||
console.log(formInlineValue)
|
console.log(formInlineValue)
|
||||||
enumValueAdd(formInlineValue).then((res: any) => {
|
enumValueAdd(formInlineValue).then((res: any) => {
|
||||||
debugger
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
/* TypeTree.value?.setCurrentKey(res.data[0]?.id!, false)*/
|
|
||||||
queryListData.description =queryName.value
|
queryListData.description =queryName.value
|
||||||
queryListData.enumTypeId = enumTypeId.value
|
queryListData.enumTypeId = enumTypeId.value
|
||||||
queryListData.pageNum=currentPage.value,
|
queryListData.pageNum=currentPage.value,
|
||||||
@ -421,7 +424,6 @@ interface fromDelete {
|
|||||||
row?: any[]
|
row?: any[]
|
||||||
}
|
}
|
||||||
const fromDelete = (data: any) => {
|
const fromDelete = (data: any) => {
|
||||||
debugger
|
|
||||||
dialogVisibleDelete.value = true
|
dialogVisibleDelete.value = true
|
||||||
fromDeleteData.id = data.row.id
|
fromDeleteData.id = data.row.id
|
||||||
}
|
}
|
||||||
@ -487,6 +489,10 @@ const edithandleClosevalue = (done: () => void) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
enumTreeTypeList()
|
enumTreeTypeList()
|
||||||
|
const firstNode = TypeTree.value.store.root.childNodes[0];
|
||||||
|
/*if (firstNode) {
|
||||||
|
handleNodeClick(firstNode.data, null, TypeTree.value);
|
||||||
|
}*/
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -509,6 +515,35 @@ $paginationHeight: 32px;
|
|||||||
width: 260px;
|
width: 260px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-right: 1px solid #eaebed;
|
border-right: 1px solid #eaebed;
|
||||||
|
.el-main{
|
||||||
|
.demo-collapse{
|
||||||
|
.el-collapse{
|
||||||
|
border: none;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
.el-collapse-item{
|
||||||
|
:deep(.el-collapse-item__arrow){
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.collapse-title {
|
||||||
|
flex: 1 0 90%;
|
||||||
|
order: 1;
|
||||||
|
}
|
||||||
|
:deep(.el-collapse-item__header){
|
||||||
|
background: #d0e5f2;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding-left: 10px;
|
||||||
|
text-align:left
|
||||||
|
}
|
||||||
|
:deep(.el-collapse-item__wrap){
|
||||||
|
border: none;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.treeMain{
|
.treeMain{
|
||||||
.treeTitle{
|
.treeTitle{
|
||||||
height:40px;
|
height:40px;
|
||||||
|
Loading…
Reference in New Issue
Block a user