af9094f6 by 任超

style:字典

1 parent 74c61f26
......@@ -16,15 +16,15 @@
</el-col>
</el-row>
</el-form>
<lb-table :column="column" :heightNum="420" :key="key" :expand-row-keys="keyList" row-key="bsmDict"
:tree-props="{ children: 'children' }" :pagination="false" :data="tableData">
<lb-table :column="column" class="loadingtext" :heightNum="420" :key="key" :expand-row-keys="keyList"
row-key="bsmDict" :tree-props="{ children: 'children' }" :pagination="false" :data="tableData">
</lb-table>
</dialogBox>
</template>
<script>
import { getUuid, judgeSort, realMove, findParents, removeTreeListItem } from '@/utils/operation'
import { editDictNode } from '@/api/user'
import { editDictNode, getChildDictList } from '@/api/user'
export default {
props: {
value: { type: Boolean, default: false },
......@@ -177,9 +177,19 @@ export default {
value (val) {
this.myValue = val
},
'details.bsmDict': {
handler: function (newValue) {
this.$startLoading();
getChildDictList(newValue).then(res => {
this.$endLoading();
let { result } = res
this.tableData = result ? result : []
})
},
immediate: true
},
details: {
handler: function (newValue) {
this.tableData = judgeSort(_.cloneDeep(newValue.dataList))
if (newValue.isenable == 2) {
this.column = this.columns.slice(0, 6)
} else {
......
......@@ -52,7 +52,7 @@ export default {
return {
isDialog: false,
details: {
dataList: [],
bsmDict: '',
isenable: 1,
rowData: {}
},
......@@ -107,14 +107,11 @@ export default {
editClick (row, val) {
this.details.rowData = row
this.details.isenable = val
getChildDictList(row.bsmDict).then(res => {
this.isDialog = true
let { result } = res
this.details.dataList = result ? result : []
})
this.details.bsmDict = row.bsmDict
this.isDialog = true
}
}
};
}
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
......