|
@@ -545,7 +545,9 @@ export default {
|
|
this.startId = e.id
|
|
this.startId = e.id
|
|
queryCasesData({ pageSize: 8, curIndex: 1, caseFolderId: e.id }).then(res => {
|
|
queryCasesData({ pageSize: 8, curIndex: 1, caseFolderId: e.id }).then(res => {
|
|
this.gridData = res.data.list
|
|
this.gridData = res.data.list
|
|
- this.grid_xmind = res.data.subList
|
|
|
|
|
|
+ if (res.data.subList) {
|
|
|
|
+ this.grid_xmind = res.data.subList
|
|
|
|
+ }
|
|
this.total = res.data.total
|
|
this.total = res.data.total
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -617,19 +619,20 @@ export default {
|
|
var formData_s = new FormData()
|
|
var formData_s = new FormData()
|
|
formData_s.append('file', f)
|
|
formData_s.append('file', f)
|
|
axios.post('http://star.xiaojukeji.com/upload/img.node', formData_s, { withCredentials: false, headers: { 'Content-Type': 'multipart/form-data' }}).then(res => {
|
|
axios.post('http://star.xiaojukeji.com/upload/img.node', formData_s, { withCredentials: false, headers: { 'Content-Type': 'multipart/form-data' }}).then(res => {
|
|
- // if (res) {
|
|
|
|
- this.grid_xmind.push({ 'name': f.name, 'url': 'http:' + res.data.url })
|
|
|
|
- var xmind_code = {
|
|
|
|
- id: this.startId,
|
|
|
|
- xmindUrl: JSON.stringify(this.grid_xmind),
|
|
|
|
- modifier: this.userInformation
|
|
|
|
- }
|
|
|
|
- updateXmindUrl(xmind_code).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({ type: 'success', message: '导入成功' })
|
|
|
|
|
|
+ if (res) {
|
|
|
|
+ console.log(typeof (this.grid_xmind))
|
|
|
|
+ this.grid_xmind.push({ 'name': f.name, 'url': 'http:' + res.data.url })
|
|
|
|
+ var xmind_code = {
|
|
|
|
+ id: this.startId,
|
|
|
|
+ xmindUrl: JSON.stringify(this.grid_xmind),
|
|
|
|
+ modifier: this.userInformation
|
|
}
|
|
}
|
|
- })
|
|
|
|
- // }
|
|
|
|
|
|
+ updateXmindUrl(xmind_code).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message({ type: 'success', message: '导入成功' })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|