fix
Showing
3 changed files
with
21 additions
and
9 deletions
| ... | @@ -155,9 +155,9 @@ const tableSelectionChange = (val, tId) => { | ... | @@ -155,9 +155,9 @@ const tableSelectionChange = (val, tId) => { |
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | const tablePageChange = (info) => { | 157 | const tablePageChange = (info) => { |
| 158 | console.log('pageChange') | ||
| 158 | const toChange = checkSave() | 159 | const toChange = checkSave() |
| 159 | const changeCont = () => { | 160 | const changeCont = () => { |
| 160 | console.log('info', info) | ||
| 161 | page.value.curr = Number(info.curr) | 161 | page.value.curr = Number(info.curr) |
| 162 | page.value.limit = Number(info.limit) | 162 | page.value.limit = Number(info.limit) |
| 163 | toSearch({}) | 163 | toSearch({}) |
| ... | @@ -233,26 +233,23 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -233,26 +233,23 @@ const tableBtnClick = (scope, btn) => { |
| 233 | } else if (type == 'save') { | 233 | } else if (type == 'save') { |
| 234 | saveData(scope) | 234 | saveData(scope) |
| 235 | } else if (type == 'cancel') { | 235 | } else if (type == 'cancel') { |
| 236 | console.log('cancel') | ||
| 236 | if (row.guid != undefined) { | 237 | if (row.guid != undefined) { |
| 237 | // row = orginData.value[(page.value.curr - 1) * page.value.limit + scope.$index] | 238 | // row = orginData.value[(page.value.curr - 1) * page.value.limit + scope.$index] |
| 238 | row = JSON.parse(JSON.stringify(orginData.value[scope.$index])) | 239 | row = JSON.parse(JSON.stringify(orginData.value[scope.$index])) |
| 239 | row.STATE = '' | 240 | row.STATE = '' |
| 240 | row.STATUS = '' | 241 | row.STATUS = '' |
| 241 | tableData.value[scope.$index] = row | 242 | tableData.value[scope.$index] = row |
| 243 | console.log('1111') | ||
| 242 | } else { | 244 | } else { |
| 243 | tableData.value.splice(scope.$index, 1) | 245 | tableData.value.splice(scope.$index, 1) |
| 244 | orginData.value.splice(scope.$index, 1) | 246 | orginData.value.splice(scope.$index, 1) |
| 245 | // orginData.value.splice((page.value.curr - 1) * page.value.limit + scope.$index, 1) | 247 | console.log('2222') |
| 246 | // if (scope.$index == 0) { | ||
| 247 | // page.value.curr = (page.value.curr - 1 > 1) ? page.value.curr - 1 : 1 | ||
| 248 | // } | ||
| 249 | // chunkData() | ||
| 250 | } | 248 | } |
| 251 | tableInfo.value.page.rows = tableData.value.length | 249 | tableInfo.value.page.rows = tableData.value.length |
| 252 | // saveDisabled.value = true | ||
| 253 | console.log(tableData.value) | ||
| 254 | let haveState = tableData.value.some(item => item.STATE) | 250 | let haveState = tableData.value.some(item => item.STATE) |
| 255 | saveDisabled.value = !haveState | 251 | saveDisabled.value = !haveState |
| 252 | console.log('3333') | ||
| 256 | } else if (type == 'remove') { | 253 | } else if (type == 'remove') { |
| 257 | open("是否确定删除所选数据?", "warning"); | 254 | open("是否确定删除所选数据?", "warning"); |
| 258 | } | 255 | } | ... | ... |
| ... | @@ -984,7 +984,8 @@ const open = (msg, type, isBatch = false) => { | ... | @@ -984,7 +984,8 @@ const open = (msg, type, isBatch = false) => { |
| 984 | tableInfo.value.loading = true | 984 | tableInfo.value.loading = true |
| 985 | deleteStandardCode(guids).then((res: any) => { | 985 | deleteStandardCode(guids).then((res: any) => { |
| 986 | if (res.code == proxy.$passCode) { | 986 | if (res.code == proxy.$passCode) { |
| 987 | getFirstPageData() | 987 | initTree().then(() => getFirstPageData()) |
| 988 | // getFirstPageData() | ||
| 988 | ElMessage({ | 989 | ElMessage({ |
| 989 | type: "success", | 990 | type: "success", |
| 990 | message: "删除成功", | 991 | message: "删除成功", | ... | ... |
| ... | @@ -514,3 +514,17 @@ const viewGraph = () => { | ... | @@ -514,3 +514,17 @@ const viewGraph = () => { |
| 514 | } | 514 | } |
| 515 | } | 515 | } |
| 516 | </style> | 516 | </style> |
| 517 | |||
| 518 | <style lang="scss"> | ||
| 519 | .tree_panel .el-tree .el-tree-node__content { | ||
| 520 | position: relative; | ||
| 521 | .list-item-text { | ||
| 522 | width: calc(100% - 58px)!important; | ||
| 523 | } | ||
| 524 | .tags-list-right { | ||
| 525 | position: absolute; | ||
| 526 | right: 0; | ||
| 527 | } | ||
| 528 | } | ||
| 529 | |||
| 530 | </style> | ... | ... |
-
Please register or sign in to post a comment