style:字典
Showing
2 changed files
with
17 additions
and
10 deletions
| ... | @@ -16,15 +16,15 @@ | ... | @@ -16,15 +16,15 @@ |
| 16 | </el-col> | 16 | </el-col> |
| 17 | </el-row> | 17 | </el-row> |
| 18 | </el-form> | 18 | </el-form> |
| 19 | <lb-table :column="column" :heightNum="420" :key="key" :expand-row-keys="keyList" row-key="bsmDict" | 19 | <lb-table :column="column" class="loadingtext" :heightNum="420" :key="key" :expand-row-keys="keyList" |
| 20 | :tree-props="{ children: 'children' }" :pagination="false" :data="tableData"> | 20 | row-key="bsmDict" :tree-props="{ children: 'children' }" :pagination="false" :data="tableData"> |
| 21 | </lb-table> | 21 | </lb-table> |
| 22 | </dialogBox> | 22 | </dialogBox> |
| 23 | </template> | 23 | </template> |
| 24 | 24 | ||
| 25 | <script> | 25 | <script> |
| 26 | import { getUuid, judgeSort, realMove, findParents, removeTreeListItem } from '@/utils/operation' | 26 | import { getUuid, judgeSort, realMove, findParents, removeTreeListItem } from '@/utils/operation' |
| 27 | import { editDictNode } from '@/api/user' | 27 | import { editDictNode, getChildDictList } from '@/api/user' |
| 28 | export default { | 28 | export default { |
| 29 | props: { | 29 | props: { |
| 30 | value: { type: Boolean, default: false }, | 30 | value: { type: Boolean, default: false }, |
| ... | @@ -177,9 +177,19 @@ export default { | ... | @@ -177,9 +177,19 @@ export default { |
| 177 | value (val) { | 177 | value (val) { |
| 178 | this.myValue = val | 178 | this.myValue = val |
| 179 | }, | 179 | }, |
| 180 | 'details.bsmDict': { | ||
| 181 | handler: function (newValue) { | ||
| 182 | this.$startLoading(); | ||
| 183 | getChildDictList(newValue).then(res => { | ||
| 184 | this.$endLoading(); | ||
| 185 | let { result } = res | ||
| 186 | this.tableData = result ? result : [] | ||
| 187 | }) | ||
| 188 | }, | ||
| 189 | immediate: true | ||
| 190 | }, | ||
| 180 | details: { | 191 | details: { |
| 181 | handler: function (newValue) { | 192 | handler: function (newValue) { |
| 182 | this.tableData = judgeSort(_.cloneDeep(newValue.dataList)) | ||
| 183 | if (newValue.isenable == 2) { | 193 | if (newValue.isenable == 2) { |
| 184 | this.column = this.columns.slice(0, 6) | 194 | this.column = this.columns.slice(0, 6) |
| 185 | } else { | 195 | } else { | ... | ... |
| ... | @@ -52,7 +52,7 @@ export default { | ... | @@ -52,7 +52,7 @@ export default { |
| 52 | return { | 52 | return { |
| 53 | isDialog: false, | 53 | isDialog: false, |
| 54 | details: { | 54 | details: { |
| 55 | dataList: [], | 55 | bsmDict: '', |
| 56 | isenable: 1, | 56 | isenable: 1, |
| 57 | rowData: {} | 57 | rowData: {} |
| 58 | }, | 58 | }, |
| ... | @@ -107,14 +107,11 @@ export default { | ... | @@ -107,14 +107,11 @@ export default { |
| 107 | editClick (row, val) { | 107 | editClick (row, val) { |
| 108 | this.details.rowData = row | 108 | this.details.rowData = row |
| 109 | this.details.isenable = val | 109 | this.details.isenable = val |
| 110 | getChildDictList(row.bsmDict).then(res => { | 110 | this.details.bsmDict = row.bsmDict |
| 111 | this.isDialog = true | 111 | this.isDialog = true |
| 112 | let { result } = res | ||
| 113 | this.details.dataList = result ? result : [] | ||
| 114 | }) | ||
| 115 | } | 112 | } |
| 116 | } | 113 | } |
| 117 | }; | 114 | } |
| 118 | </script> | 115 | </script> |
| 119 | <style scoped lang="scss"> | 116 | <style scoped lang="scss"> |
| 120 | @import "~@/styles/public.scss"; | 117 | @import "~@/styles/public.scss"; | ... | ... |
-
Please register or sign in to post a comment