地区编辑按钮上传
This commit is contained in:
parent
78c82cab69
commit
81d8c92351
@ -20,8 +20,50 @@
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
default-expand-all
|
||||
node-key="id"
|
||||
highlight-current
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
<!-- default-expand-all -->
|
||||
<span slot-scope="{ node, data }" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)" style="width:100%">
|
||||
<template>
|
||||
<!-- <svg-icon v-if="data.children != undefined" icon-class="category" style="width:13px;color: #909399;margin-right: 2px;"/> -->
|
||||
<svg-icon icon-class="dict" style="width:13px;color: #505050;margin-right:2px;"/>
|
||||
<span style="font-size:13px">{{ data.label }}</span>
|
||||
<span v-show="data.show" style="margin-left: 10px;">
|
||||
<el-button
|
||||
style="margin-left: 2px; width: 19px; padding: 0px"
|
||||
circle
|
||||
type="text"
|
||||
size="medium"
|
||||
:disabled="false"
|
||||
icon="el-icon-edit"
|
||||
@click="() => handleUpdateDictType(data)"
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
style="margin-left: 2px; width: 19px; padding: 0px"
|
||||
circle
|
||||
type="text"
|
||||
size="medium"
|
||||
icon="el-icon-plus"
|
||||
:disabled="false"
|
||||
@click="() => handleAddDictType(data)"
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
circle
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
style="padding: 1px; width: 1px; margin-left: 5px"
|
||||
@click="() => handleDeleteDictType(data)"
|
||||
>
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20" :xs="20" style="border-left:1px solid rgb(248 249 251);">
|
||||
@ -379,6 +421,13 @@ export default {
|
||||
this.domainIdsTree.push(domainTree);
|
||||
//this.getList();
|
||||
});
|
||||
},
|
||||
mouseenter(data) {
|
||||
alert(11);
|
||||
this.$set(data, 'show', true)
|
||||
},
|
||||
mouseleave(data) {
|
||||
this.$set(data, 'show', false)
|
||||
},
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
@ -389,6 +438,29 @@ export default {
|
||||
// this.currentAppName=data.label;
|
||||
this.handleQuery();
|
||||
// }
|
||||
},
|
||||
handleAddDictType(data) {
|
||||
if(data != undefined){
|
||||
this.currentParentDictId = data.id
|
||||
}
|
||||
this.openDictType = true;
|
||||
this.titleDictType = "添加区域";
|
||||
},
|
||||
handleUpdateDictType(data) {
|
||||
this.currentDictId = data.id || this.ids;
|
||||
this.openDictType = true;
|
||||
this.titleDictType = "修改区域";
|
||||
},
|
||||
handleDeleteDictType(data) {
|
||||
console.log(data)
|
||||
const dictIds = data.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
|
||||
return delEmisContinent(dictIds);
|
||||
}).then(() => {
|
||||
console.log("删除成功")
|
||||
this.getContinentList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
saveCacheDomainId(continentId){
|
||||
var jObj = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user