更换手机端法规库标准体系树接口
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<van-icon name="cross" size="22px" @click="handleCancel" />
|
||||
</h3>
|
||||
<div class="popup-main">
|
||||
<standardSystemTree ref="standardSystemTreeRef" @checkedKey="getCheckedKey"></standardSystemTree>
|
||||
<standardSystemTree ref="standardSystemTreeRef" :data="standardSystemTreeData" :loading="loading" @checkedKey="getCheckedKey"></standardSystemTree>
|
||||
</div>
|
||||
<div class="popup-footer">
|
||||
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="handleOk">确定</el-button>
|
||||
@@ -30,6 +30,8 @@ export default {
|
||||
return {
|
||||
popupShow: true,
|
||||
checkedKeys: [], // 选择的标准体系
|
||||
standardSystemTreeData: [],
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -39,8 +41,12 @@ export default {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.getData()
|
||||
this.$refs.standardSystemTreeRef.setCheckedKeys(this.initKeys)
|
||||
this.popupShow = true
|
||||
},
|
||||
@@ -68,6 +74,17 @@ export default {
|
||||
// this.open()
|
||||
// }
|
||||
},
|
||||
async getData () {
|
||||
const res = await this.$http._getData('lawss/sarMenuStandardLimit/getListStandLimit',{
|
||||
dicId:'9m4qqqaansxmox5e82zm'
|
||||
},{
|
||||
_this:this,
|
||||
loading: 'loading'
|
||||
})
|
||||
if (res.ok && res.data) {
|
||||
this.standardSystemTreeData = res.data
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
<template>
|
||||
<el-tree class="popup-tree" ref="tree" :data="data" :props="defaultProps"
|
||||
<div>
|
||||
<loading :loading="loading">加载中...</loading>
|
||||
<el-tree
|
||||
class="popup-tree"
|
||||
ref="tree"
|
||||
:data="data"
|
||||
:props="defaultProps"
|
||||
:lazy="false"
|
||||
:show-checkbox="true"
|
||||
node-key="id"
|
||||
:default-expanded-keys="['aaaaaaaaaaaaaaaaaaaaaa']"
|
||||
:check-strictly="true"
|
||||
:expand-on-click-node="false"
|
||||
:check-on-click-node="true"
|
||||
@@ -11,6 +18,7 @@
|
||||
@node-click="handleNodeClick"
|
||||
@check-change="handleCheckChange">
|
||||
</el-tree>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -18,7 +26,7 @@ export default {
|
||||
name: "standardSystemTree",
|
||||
data () {
|
||||
return {
|
||||
data: [],
|
||||
// data: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'menuName'
|
||||
@@ -27,17 +35,17 @@ export default {
|
||||
checkedKeys: []
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getStandardSystem()
|
||||
props: {
|
||||
data: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getStandardSystem () {
|
||||
this.$http._getData('sys/dictype/getDicTypeListCode').then(res => {
|
||||
if (res.ok && res.data) {
|
||||
this.data = res.data.TXLBBUSS // 标准体系
|
||||
}
|
||||
})
|
||||
},
|
||||
handleNodeClick (data, node, element) {
|
||||
// console.log(data, node, element)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user