|
@@ -5,7 +5,7 @@
|
|
|
<div style="position: absolute;width: 100%;">
|
|
|
<div style="background:#F2F3F6;">
|
|
|
<el-container>
|
|
|
- <el-aside width="15%" style=" background: #FFF;margin: 1% 0 1% 1%; border-radius:8px;">
|
|
|
+ <el-aside width="17%" style=" background: #FFF;margin: 1% 0 1% 1%; border-radius:8px;">
|
|
|
<div class="nav_Input" style="min-height:81vh;" @click="click_fa">
|
|
|
<br>
|
|
|
<p v-show="node_Data" style="color: #DCDFE6; margin: 100% 0;font-size:14px; text-align:center;">空空如也</p>
|
|
@@ -19,17 +19,17 @@
|
|
|
<span slot-scope="{ node, data }" style="width:100%;" class="custom-tree-node" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
|
|
|
<span :title="data.label" class="span_el" @dblclick="dblclick(data)">{{ node.label }}</span>
|
|
|
<el-input v-if="data.que" ref="get_Input" v-model="node_Name.name" size="mini" @blur="queryNodeName(node_Name.name, data)">输入框</el-input>
|
|
|
- <el-dropdown style="margin-left:10px" trigger="click">
|
|
|
+ <el-dropdown v-show="data.del" style="margin-left:10px" trigger="click">
|
|
|
<span class="el-dropdown-link">
|
|
|
- ···<i class="el-icon-arrow-down el-icon--right" />
|
|
|
+ ···<i class="el-icon--right" />
|
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item>黄金糕</el-dropdown-item>
|
|
|
- <el-dropdown-item>狮子头</el-dropdown-item>
|
|
|
- <el-dropdown-item>螺蛳粉</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="createFolder">新建节点</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="dblclick(data)">编辑节点</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="() => remove(node, data)">删除节点</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="() => append(data)">新建子节点</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
- <!-- <el-button v-show="data.del" type="text" size="mini" icon="el-icon-delete" @click="() => remove(node, data)" /> -->
|
|
|
</span>
|
|
|
</el-tree>
|
|
|
<el-input v-if="Folder_Show" ref="input1" v-model="add_Folder" size="mini" placeholder="新建文件夹" @blur="hide_input(add_Folder)" />
|
|
@@ -223,7 +223,10 @@ export default {
|
|
|
failNum: '',
|
|
|
successNum: '',
|
|
|
startKey: '',
|
|
|
- obj: ''
|
|
|
+ obj: '',
|
|
|
+ node_Name: {
|
|
|
+ name: ''
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -255,6 +258,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
dblclick(data) {
|
|
|
+ console.log(data)
|
|
|
this.label = data.label// 当前选中的名称
|
|
|
this.id = data.id // 当前选中id
|
|
|
this.$set(data, 'label', '')
|
|
@@ -322,19 +326,17 @@ export default {
|
|
|
// input失去焦点新增(或取消)
|
|
|
hide_input(vel) {
|
|
|
if (vel !== '') {
|
|
|
- this.created_id === '' ? this.created_id = '-1' : ''
|
|
|
this.formData = {
|
|
|
bizId: this.bizJson,
|
|
|
folderName: vel,
|
|
|
xmindUrl: '',
|
|
|
- parentFolderId: this.created_id,
|
|
|
+ parentFolderId: '-1',
|
|
|
creator: this.userInformation,
|
|
|
modifier: this.userInformation
|
|
|
}
|
|
|
createFolderData(this.formData).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
|
|
|
- // this.createCaseCode = false
|
|
|
this.dataShow = true
|
|
|
this.node_Data = false
|
|
|
this.data1 = []
|
|
@@ -349,7 +351,9 @@ export default {
|
|
|
} else {
|
|
|
this.$message({ message: '取消创建文件夹', type: 'success', duration: 1000, offset: 150 })
|
|
|
this.Folder_Show = false
|
|
|
- this.node_Data = true
|
|
|
+ if (this.data1 === []) {
|
|
|
+ this.node_Data = true
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
// 删除
|
|
@@ -378,6 +382,16 @@ export default {
|
|
|
this.$message({ type: 'success', message: '已取消' })
|
|
|
})
|
|
|
},
|
|
|
+ // 添加
|
|
|
+ append(data) {
|
|
|
+ console.log(data)
|
|
|
+ var id = 1
|
|
|
+ const newChild = { id: id++, label: '新建子节点', children: [] }
|
|
|
+ if (!data.children) {
|
|
|
+ this.$set(data, 'children', [])
|
|
|
+ }
|
|
|
+ data.children.push(newChild)
|
|
|
+ },
|
|
|
|
|
|
handleSizeChange(size) {
|
|
|
this.pageSize = size
|
|
@@ -497,15 +511,16 @@ export default {
|
|
|
this.formData = {}
|
|
|
},
|
|
|
clickFun(e) {
|
|
|
+ console.log(e)
|
|
|
this.startId = e.id
|
|
|
this.formData = {
|
|
|
pageSize: 5,
|
|
|
curIndex: 0,
|
|
|
caseFolderId: e.id
|
|
|
}
|
|
|
- queryCasesData(this.formData).then(res => {
|
|
|
- this.gridData = res.data
|
|
|
- })
|
|
|
+ // queryCasesData(this.formData).then(res => {
|
|
|
+ // this.gridData = res.data
|
|
|
+ // })
|
|
|
},
|
|
|
deleteCaseData(e) {
|
|
|
if (this.startId === '') {
|