|
@@ -5,17 +5,16 @@
|
|
|
<div style="background:#F2F3F6;">
|
|
|
<el-container>
|
|
|
<el-aside width="17%" style=" background: #FFF;margin: 1% 0 1% 1%; border-radius:8px;">
|
|
|
- <div class="nav_Input" style="min-height:90vh;" @click="click_fa">
|
|
|
+ <div class="nav_Input" style="min-height:90vh;">
|
|
|
<br>
|
|
|
- <p v-show="node_Data" style="color: #DCDFE6; margin: 100% 0;font-size:14px; text-align:center;" @click="createFolder">新建文件夹</p>
|
|
|
+ <p v-show="node_Data" style="cursor: pointer; margin: 100% 0;font-size:14px; text-align:center;" @click="createFolder">新建文件夹</p>
|
|
|
<el-tree
|
|
|
v-if="dataShow"
|
|
|
+ style="overflow-x:auto; min-width:100%;display:inline-block !important"
|
|
|
:data="data1"
|
|
|
node-key="id"
|
|
|
draggable
|
|
|
:expand-on-click-node="false"
|
|
|
- :default-expanded-keys="[1]"
|
|
|
- :default-checked-keys="[5]"
|
|
|
@node-drag-start="handleDragStart"
|
|
|
@node-drag-enter="handleDragEnter"
|
|
|
@node-drag-leave="handleDragLeave"
|
|
@@ -94,7 +93,7 @@
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
</el-upload>
|
|
|
<el-button type="primary" style="margin-left:1%;width:10%;" @click="uploadFile()">导入</el-button>
|
|
|
- <el-tooltip class="item" effect="light" content="导出勾选项,没有勾选将导出模版" placement="top">
|
|
|
+ <el-tooltip class="item" effect="light" content="导出勾选项,没有勾选将导出excel模版" placement="top">
|
|
|
<el-button style="margin-left:2%;width:10%;" @click="exportExcel">导出</el-button>
|
|
|
</el-tooltip>
|
|
|
<!-- 主页table -->
|
|
@@ -114,7 +113,6 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" min-width="150px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- <el-button size="mini" class="btn_query" plain @click="queryUpdateCreatd(scope.row, 1)">查看</el-button> -->
|
|
|
<el-button size="mini" type="primary" plain @click="queryUpdateCreatd(scope.row, 2)">编辑</el-button>
|
|
|
<el-button size="mini" type="danger" plain @click="deleteCaseData(scope.row.id)">删除</el-button>
|
|
|
</template>
|
|
@@ -172,7 +170,6 @@ export default {
|
|
|
pageSize: 5,
|
|
|
curIndex: 1,
|
|
|
startId: '',
|
|
|
- created_id: '-1',
|
|
|
end: '',
|
|
|
total: 0,
|
|
|
createParticipation: {},
|
|
@@ -183,6 +180,7 @@ export default {
|
|
|
tableData: [],
|
|
|
imFile: '',
|
|
|
failNum: '',
|
|
|
+ o_number: '',
|
|
|
successNum: '',
|
|
|
startKey: '',
|
|
|
obj: '',
|
|
@@ -292,49 +290,40 @@ export default {
|
|
|
|
|
|
// 添加节点
|
|
|
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)
|
|
|
this.formData = {
|
|
|
bizId: this.bizJson,
|
|
|
- folderName: newChild.label,
|
|
|
+ folderName: '新建子节点',
|
|
|
xmindUrl: '',
|
|
|
parentFolderId: this.startId,
|
|
|
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.data1 = []
|
|
|
- // this.AllQueryFolderData(this.bizJson)
|
|
|
- // this.add_Folder = ''
|
|
|
- // } else {
|
|
|
- // this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
|
|
|
- // this.add_Folder = ''
|
|
|
- // }
|
|
|
+ if (res.code === 200) {
|
|
|
+ var id = 1
|
|
|
+ const newChild = { id: id++, label: '新建子节点', children: [] }
|
|
|
+ if (!data.children) {
|
|
|
+ this.$set(data, 'children', [])
|
|
|
+ }
|
|
|
+ data.children.push(newChild)
|
|
|
+ this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
|
|
|
+ this.data1 = []
|
|
|
+ this.AllQueryFolderData(this.bizJson)
|
|
|
+ this.add_Folder = ''
|
|
|
+ } else {
|
|
|
+ this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
|
|
|
+ this.add_Folder = ''
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
|
|
|
// 更新节点
|
|
|
queryNodeName(val, data) {
|
|
|
- var mun = ''
|
|
|
- for (var el of this.data1) { // 最外层id
|
|
|
- if (data.id === el.id) { // 双击获取的ID和最外层的ID匹配
|
|
|
- mun = '-1' // 有赋值为 -1
|
|
|
- } else {
|
|
|
- mun = '' // 没有赋值为点击的父元素
|
|
|
- }
|
|
|
- }
|
|
|
if (val === '') { // 判断用户是否有输入
|
|
|
val = this.label // 没有输入拿之前的label替代
|
|
|
- this.end_Data = { parentFolderId: mun, folderName: val, xmindUrl: '', id: data.id, bizId: localStorage.getItem('key'), modifier: this.userInformation, creator: this.userInformation }
|
|
|
+ this.end_Data = { folderName: val, xmindUrl: '', id: data.id, bizId: localStorage.getItem('key'), modifier: this.userInformation, creator: this.userInformation }
|
|
|
} else {
|
|
|
- this.end_Data = { parentFolderId: mun, folderName: val, xmindUrl: '', id: data.id, bizId: localStorage.getItem('key'), modifier: this.userInformation, creator: this.userInformation }
|
|
|
+ this.end_Data = { folderName: val, xmindUrl: '', id: data.id, bizId: localStorage.getItem('key'), modifier: this.userInformation, creator: this.userInformation }
|
|
|
}
|
|
|
this.$set(data, 'que', false) // 失去焦点隐藏input
|
|
|
this.$set(this.node_Name, 'name', '') // 清空input
|
|
@@ -375,6 +364,8 @@ export default {
|
|
|
// this.moduleTypeStr = res.data
|
|
|
// })
|
|
|
// },
|
|
|
+
|
|
|
+ // 分页信息
|
|
|
handleSizeChange(size) {
|
|
|
this.pageSize = size
|
|
|
this.pageIndex()
|
|
@@ -384,30 +375,18 @@ export default {
|
|
|
this.pageIndex()
|
|
|
},
|
|
|
pageIndex() {
|
|
|
- this.formData = {
|
|
|
- pageSize: this.pageSize,
|
|
|
- curIndex: this.curIndex,
|
|
|
- caseFolderId: this.startId
|
|
|
- }
|
|
|
-
|
|
|
- queryCasesData(this.formData).then(res => {
|
|
|
+ queryCasesData({ caseFolderId: this.startId, curIndex: this.curIndex, pageSize: this.pageSize }).then(res => {
|
|
|
this.gridData = res.data.list
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ // table全选调用查询接口
|
|
|
clickAllData(rows) {
|
|
|
- this.formData = {
|
|
|
- caseFolderId: this.startId
|
|
|
- }
|
|
|
- queryCasesData(this.formData).then(res => {
|
|
|
+ queryCasesData({ caseFolderId: this.startId }).then(res => {
|
|
|
this.tableData = res.data
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- // 点击空白创建最外层nav
|
|
|
- click_fa() {
|
|
|
- this.created_id = '-1'
|
|
|
- },
|
|
|
-
|
|
|
// 新建文件夹
|
|
|
createFolder() {
|
|
|
this.Folder_Show = true
|
|
@@ -419,27 +398,23 @@ 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 = []
|
|
|
this.AllQueryFolderData(this.bizJson)
|
|
|
- this.created_id = ''
|
|
|
} else {
|
|
|
this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
|
|
|
- this.created_id = ''
|
|
|
}
|
|
|
})
|
|
|
this.Folder_Show = false
|
|
@@ -550,16 +525,11 @@ export default {
|
|
|
this.$message({ type: 'success', message: '已取消' })
|
|
|
})
|
|
|
},
|
|
|
- // Nav 当前点击
|
|
|
+
|
|
|
+ // 点击节点
|
|
|
clickFun(e) {
|
|
|
this.startId = e.id
|
|
|
- this.created_id = e.id
|
|
|
- this.formData = {
|
|
|
- pageSize: 5,
|
|
|
- curIndex: 1,
|
|
|
- caseFolderId: e.id
|
|
|
- }
|
|
|
- queryCasesData(this.formData).then(res => {
|
|
|
+ queryCasesData({ pageSize: 5, curIndex: 1, caseFolderId: e.id }).then(res => {
|
|
|
this.gridData = res.data.list
|
|
|
this.total = res.data.total
|
|
|
})
|
|
@@ -602,9 +572,7 @@ export default {
|
|
|
if (this.startId === '') {
|
|
|
this.$message({ message: '提示,👈请选择目录', type: 'success', duration: 1000, offset: 150 })
|
|
|
} else {
|
|
|
- /* generate workbook object from table */
|
|
|
var wb = XLSX.utils.table_to_book(document.querySelector('#out-table'))
|
|
|
- /* get binary string as output */
|
|
|
var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' })
|
|
|
try {
|
|
|
FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), 'sheetjs.xlsx')
|
|
@@ -715,7 +683,6 @@ export default {
|
|
|
.span_el {
|
|
|
display: block;
|
|
|
overflow: hidden;
|
|
|
- /* white-space: nowrap; */
|
|
|
text-overflow: ellipsis;
|
|
|
}
|
|
|
.btn_query .el-button--primary.is-plain {
|
|
@@ -723,8 +690,4 @@ export default {
|
|
|
background: #F9F9FA !important;
|
|
|
border-color: #F9F9FA !important;
|
|
|
}
|
|
|
- .button_query :hover{
|
|
|
- background: #409EFF;
|
|
|
- color: #FFFFFF;
|
|
|
- }
|
|
|
</style>
|