标签内容字典配置
This commit is contained in:
@@ -165,11 +165,10 @@
|
||||
}
|
||||
getAction(`sys/dictItem/page`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.dataFlag=true
|
||||
this.total=res.result.total
|
||||
if(this.dictVal=='list'){
|
||||
|
||||
this.tableData=[...res.result.records]
|
||||
this.dataFlag=true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
:show-total="total => `共 ${total} 条`"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:current="queryParams.pageNo"
|
||||
:page-size.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@change="onChangePage"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<a-table bordered :data-source="tableData" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" class="tag-con-table">
|
||||
|
||||
<template slot="action" slot-scope="text, record">
|
||||
<a class="action-dict" href="javascript:;" @click="handleDicPop(record)">字典配置</a>
|
||||
<a class="action-dict" @click="handleDicPop(record)">字典配置</a>
|
||||
<!-- <a-popover placement="right" v-model="typeVisible[record.id]" trigger="click">-->
|
||||
<!-- <template slot="content" class="type-popover-content">-->
|
||||
<!-- <div class="type-popover">-->
|
||||
@@ -64,7 +64,7 @@
|
||||
<!-- </template>-->
|
||||
<!-- <a class="action-dict" href="javascript:;">字典配置</a>-->
|
||||
<!-- </a-popover>-->
|
||||
<a class="action-edit" href="javascript:;" @click="actionEdit(record)">编辑</a>
|
||||
<a class="action-edit" @click="actionEdit(record)">编辑</a>
|
||||
<a-popconfirm
|
||||
v-if="tableData.length"
|
||||
title="Sure to delete?"
|
||||
@@ -91,7 +91,6 @@
|
||||
placement="right"
|
||||
:closable="true"
|
||||
:visible="dicVisible"
|
||||
v-if="dicVisible"
|
||||
:after-visible-change="afterDicVisibleChange"
|
||||
@close="onDicClose"
|
||||
width="1000px"
|
||||
@@ -177,7 +176,7 @@
|
||||
},
|
||||
// typeVisible:{},
|
||||
dicVisible:false,
|
||||
dictVal:'',
|
||||
dictVal:'list',
|
||||
record: {},
|
||||
isEdit:1,
|
||||
}
|
||||
@@ -233,9 +232,7 @@
|
||||
params.isReadOnly=0
|
||||
postAction(`sys/dict/add`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.$notification.success({
|
||||
message: res.message
|
||||
})
|
||||
this.$message.success( res.message)
|
||||
this.loadData()
|
||||
this.contentVisible=false
|
||||
this.form={}
|
||||
@@ -247,9 +244,7 @@
|
||||
// console.log('editparams',params)
|
||||
putAction(`sys/dict/edit`,params).then(res=>{
|
||||
if(res.success){
|
||||
this.$notification.success({
|
||||
message: res.message
|
||||
})
|
||||
this.$message.success( res.message)
|
||||
this.loadData()
|
||||
this.contentVisible=false
|
||||
this.form={}
|
||||
@@ -299,17 +294,19 @@
|
||||
handleDicPop(record){
|
||||
this.record=record
|
||||
if(record.attributeType=='1'){
|
||||
console.log('attribu',record.attributeType,record.attributeType=='1')
|
||||
// this.typeVisible[record.id]=false
|
||||
this.dictVal='list'
|
||||
this.dicVisible=true
|
||||
|
||||
}else{
|
||||
}else if(record.attributeType=='2'){
|
||||
// this.typeVisible[record.id]=false
|
||||
this.dicVisible=true
|
||||
this.dictVal='tree'
|
||||
this.dicVisible=true
|
||||
}
|
||||
},
|
||||
afterDicVisibleChange(val) {
|
||||
console.log('dicVisible',this.dicVisible)
|
||||
console.log('visible', val);
|
||||
},
|
||||
//字典列表关闭
|
||||
@@ -318,6 +315,7 @@
|
||||
},
|
||||
//点击页数
|
||||
onChangePage(page,pageSize){
|
||||
console.log('page',page)
|
||||
this.queryParams.pageNo = page
|
||||
this.loadData()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user