feat: 标准库 统一组织结构树组件
This commit is contained in:
@@ -267,6 +267,7 @@
|
||||
:wrapperClosable="false"
|
||||
size="800px"
|
||||
@close="resetForm"
|
||||
append-to-body
|
||||
>
|
||||
<!-- 新增样式 -->
|
||||
<div class="demo-drawer-content">
|
||||
@@ -397,11 +398,7 @@
|
||||
class="add-form-item"
|
||||
>
|
||||
<template slot="label">标准体系</template>
|
||||
<tree-select
|
||||
width = "593"
|
||||
:data="standSystemOptions"
|
||||
:defaultProps="defaultProps" :checkedKeys="defaultCheckedKeys"
|
||||
:nodeKey="nodeKey" @popoverHide="popoverHide"></tree-select>
|
||||
<el-input v-model="sarStandardsInfoEO.standSystem" placeholder="选择标准体系" @click.native="choiceZRR1('standSystem', '标准体系', sarStandardsInfoEO.standSystem)"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-for="field in displayLocation.child">
|
||||
@@ -453,12 +450,7 @@
|
||||
class="add-form-item"
|
||||
>
|
||||
<template slot="label">乘用车VPPS编码</template>
|
||||
<tree-select
|
||||
:disabled="false"
|
||||
width = "340"
|
||||
:data="busVppsOptions"
|
||||
:defaultProps="defaultCodeProps" :checkedKeys="defaultCheckedKeys1"
|
||||
:nodeKey="nodeKeyCode" @popoverHide="popoverHideBusVs"></tree-select>
|
||||
<el-input v-model="sarStandardsInfoEO.CYCVPPSBM" placeholder="选择乘用车VPPS编码" @click.native="choiceZRR2('cycvppsbm', '乘用车VPPS', sarStandardsInfoEO.cycvppsbm)"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="field.attrField === 'KCCVPPSBM'">
|
||||
@@ -468,12 +460,7 @@
|
||||
class="add-form-item"
|
||||
>
|
||||
<template slot="label">卡车VPPS编码</template>
|
||||
<tree-select
|
||||
:disabled="false"
|
||||
width = "340"
|
||||
:data="busVppsOptions"
|
||||
:defaultProps="defaultCodeProps" :checkedKeys="defaultCheckedKeys2"
|
||||
:nodeKey="nodeKeyCode" @popoverHide="popoverHideCarVs"></tree-select>
|
||||
<el-input v-model="sarStandardsInfoEO.KCCVPPSBM" placeholder="选择卡车VPPS编码" @click.native="choiceZRR3('kccvppsbm', '卡车VPPS', sarStandardsInfoEO.kccvppsbm)"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="field.attrField === 'DYBXH'">
|
||||
@@ -483,12 +470,7 @@
|
||||
class="add-form-item"
|
||||
>
|
||||
<template slot="label">模块结构单元变型号</template>
|
||||
<tree-select
|
||||
width = "340"
|
||||
:disabled="false"
|
||||
:data="modelOptions"
|
||||
:defaultProps="defaultModelProps" :checkedKeys="defaultCheckedKeys3"
|
||||
:nodeKey="nodeKeyModel" @popoverHide="popoverHideModel"></tree-select>
|
||||
<el-input v-model="sarStandardsInfoEO.DYBXH" placeholder="选择模块结构单元变型号" @click.native="choiceZRR4('dybxh', '模块结构单元', sarStandardsInfoEO.dybxh)"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="field.attrField === 'CYCVPPSCN'">
|
||||
@@ -980,6 +962,46 @@
|
||||
@click="closeModal">取消</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<!-- 组件树-->
|
||||
<tree-select-new
|
||||
:multiple=false
|
||||
:lazy=false
|
||||
:modalShowFlag="modalShowFlag1"
|
||||
:drawerTitle="drawerTitle"
|
||||
width = "500"
|
||||
:data="standSystemOptions"
|
||||
:defaultProps="defaultProps" :checkedKeys="defaultCheckedKeys"
|
||||
:nodeKey="nodeKey" @popoverHide="popoverHide"></tree-select-new>
|
||||
<tree-select-new
|
||||
width = "500"
|
||||
:lazy=true
|
||||
:multiple=false
|
||||
:modalShowFlag="modalShowFlag2"
|
||||
:drawerTitle="drawerTitle"
|
||||
:url="url"
|
||||
:urlChild="urlChild"
|
||||
:defaultProps="defaultCodeProps" :checkedKeys="defaultCheckedKeys1"
|
||||
:nodeKey="nodeKeyCode" @popoverHide="popoverHideBusVs"></tree-select-new>
|
||||
<tree-select-new
|
||||
width = "500"
|
||||
:lazy=true
|
||||
:multiple=false
|
||||
:modalShowFlag="modalShowFlag3"
|
||||
:drawerTitle="drawerTitle"
|
||||
:url="url"
|
||||
:urlChild="urlChild"
|
||||
:defaultProps="defaultCodeProps" :checkedKeys="defaultCheckedKeys2"
|
||||
:nodeKey="nodeKeyCode" @popoverHide="popoverHideCarVs"></tree-select-new>
|
||||
<tree-select-new
|
||||
width = "500"
|
||||
:lazy=true
|
||||
:multiple=false
|
||||
:modalShowFlag="modalShowFlag4"
|
||||
:drawerTitle="drawerTitle"
|
||||
:url="url"
|
||||
:urlChild="urlChild"
|
||||
:defaultProps="defaultModelProps" :checkedKeys="defaultCheckedKeys3"
|
||||
:nodeKey="nodeKeyModel" @popoverHide="popoverHideModel"></tree-select-new>
|
||||
<!-- 导入失败-->
|
||||
<el-dialog :visible.sync="importFailed" :close-on-click-modal="false" width="400px">
|
||||
<p slot="title" style="color:#f60">
|
||||
@@ -1234,6 +1256,7 @@ import Bus from '@/common/eventHub'
|
||||
import CustomDatePickWithText2 from '@/components/CustomFormComponents/DatePickerWithText2'
|
||||
import { interfaceUrl } from '@/sysConfig'
|
||||
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
|
||||
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
|
||||
|
||||
export default {
|
||||
name: 'domesticStandardsAndRegulations',
|
||||
@@ -1254,7 +1277,8 @@ export default {
|
||||
CustomSVPPS,
|
||||
CustomRoleTree,
|
||||
CustomDatePickWithText2,
|
||||
TreeSelect
|
||||
TreeSelect,
|
||||
TreeSelectNew
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
@@ -1267,6 +1291,13 @@ export default {
|
||||
children: 'children',
|
||||
label: 'menuName'
|
||||
},
|
||||
modalShowFlag1: false, // drawer开关
|
||||
modalShowFlag2: false, // drawer开关
|
||||
modalShowFlag3: false, // drawer开关
|
||||
modalShowFlag4: false, // drawer开关
|
||||
url:'',
|
||||
urlChild:'',
|
||||
drawerTitle: '', //drawer标题
|
||||
nodeKey: 'id',
|
||||
nodeKeyCode: 'code',
|
||||
nodeKeyModel: 'model',
|
||||
@@ -1903,27 +1934,83 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
popoverHideBusVs (checkedIds, checkedData) {
|
||||
if(checkedData){
|
||||
this.sarStandardsInfoEO.CYCVPPSBM = checkedData.code
|
||||
this.sarStandardsInfoEO.CYCVPPSCN = checkedData.chineseName
|
||||
this.$forceUpdate()
|
||||
}
|
||||
choiceZRR1 (type, title, id) {
|
||||
this.drawerTitle = title
|
||||
this.modalShowFlag1 = true
|
||||
},
|
||||
popoverHideCarVs (checkedIds, checkedData) {
|
||||
if(checkedData){
|
||||
this.sarStandardsInfoEO.KCCVPPSBM = checkedData.code
|
||||
this.sarStandardsInfoEO.KCCVPPSCN = checkedData.chineseName
|
||||
this.$forceUpdate()
|
||||
}
|
||||
|
||||
choiceZRR2 (type, title, id) {
|
||||
this.drawerTitle = title
|
||||
this.modalShowFlag2 = true
|
||||
this.url = ''
|
||||
this.urlChild = ''
|
||||
this.url="sarVppsTree/list"
|
||||
this.urlChild="sarVppsTree/childByList"
|
||||
},
|
||||
popoverHideModel (checkedIds, checkedData) {
|
||||
if(checkedData){
|
||||
this.sarStandardsInfoEO.DYBXH = checkedData.model
|
||||
this.sarStandardsInfoEO.DYMC = checkedData.name
|
||||
this.$forceUpdate()
|
||||
choiceZRR3 (type, title, id) {
|
||||
this.drawerTitle = title
|
||||
this.modalShowFlag3 = true
|
||||
this.url = ''
|
||||
this.urlChild = ''
|
||||
this.url="sarVppsTree/list"
|
||||
this.urlChild="sarVppsTree/childByList"
|
||||
},
|
||||
choiceZRR4 (type, title, id) {
|
||||
this.drawerTitle = title
|
||||
this.modalShowFlag4 = true
|
||||
this.url = ''
|
||||
this.urlChild = ''
|
||||
this.url="sarModelTree/list"
|
||||
this.urlChild="sarModelTree/childByList"
|
||||
},
|
||||
popoverHide (checkedIds, checkedData,isShow,isLoadChild,topId) {
|
||||
if(checkedData) {
|
||||
if(checkedData.length > 0){
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.map(item => item.menuName).join(",")
|
||||
}else {
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.menuName
|
||||
}
|
||||
}
|
||||
this.modalShowFlag1 = false
|
||||
this.$forceUpdate()
|
||||
},
|
||||
popoverHideBusVs (checkedIds, checkedData,isShow,isLoadChild,topId) {
|
||||
if(checkedData) {
|
||||
if(checkedData.length > 0){
|
||||
this.sarStandardsInfoEO.CYCVPPSBM = checkedData.map(item => item.code).join(",")
|
||||
this.sarStandardsInfoEO.CYCVPPSCN = checkedData.map(item => item.chineseName).join(",")
|
||||
}else {
|
||||
this.sarStandardsInfoEO.CYCVPPSBM = checkedData.code
|
||||
this.sarStandardsInfoEO.CYCVPPSCN = checkedData.chineseName
|
||||
}
|
||||
}
|
||||
this.modalShowFlag2 = false
|
||||
this.$forceUpdate()
|
||||
},
|
||||
popoverHideCarVs (checkedIds, checkedData,isShow,isLoadChild,topId) {
|
||||
if(checkedData) {
|
||||
if(checkedData.length > 0){
|
||||
this.sarStandardsInfoEO.KCCVPPSBM = checkedData.map(item => item.code).join(",")
|
||||
this.sarStandardsInfoEO.KCCVPPSCN = checkedData.map(item => item.chineseName).join(",")
|
||||
}else {
|
||||
this.sarStandardsInfoEO.KCCVPPSBM = checkedData.code
|
||||
this.sarStandardsInfoEO.KCCVPPSCN = checkedData.chineseName
|
||||
}
|
||||
}
|
||||
this.modalShowFlag3 = false
|
||||
this.$forceUpdate()
|
||||
},
|
||||
popoverHideModel (checkedIds, checkedData,isShow,isLoadChild,topId) {
|
||||
if(checkedData) {
|
||||
if(checkedData.length > 0){
|
||||
this.sarStandardsInfoEO.DYBXH = checkedData.map(item => item.model).join(",")
|
||||
this.sarStandardsInfoEO.DYMC = checkedData.map(item => item.name).join(",")
|
||||
}else {
|
||||
this.sarStandardsInfoEO.DYBXH = checkedData.model
|
||||
this.sarStandardsInfoEO.DYMC = checkedData.name
|
||||
}
|
||||
}
|
||||
this.modalShowFlag4 = false
|
||||
this.$forceUpdate()
|
||||
},
|
||||
busVsFunc(){
|
||||
this.$http.get('sarVppsTree/list', '', {
|
||||
@@ -1939,11 +2026,6 @@ export default {
|
||||
this.modelOptions = res.data
|
||||
})
|
||||
},
|
||||
popoverHide (checkedIds, checkedData) {
|
||||
if(checkedData){
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.id
|
||||
}
|
||||
},
|
||||
closeModal () {
|
||||
this.productModal = false
|
||||
this.closeDrawer()
|
||||
@@ -4259,7 +4341,6 @@ export default {
|
||||
this.syzrOptions = res.data.SYRZCLASS // 适用认证
|
||||
this.getGzzOption()
|
||||
this.setMap(this.standStateOptions)
|
||||
console.log(this.standStateOptions, '文本状态')
|
||||
}, e => {
|
||||
})
|
||||
this.getDomesticStandardTable(this.tableFlag)
|
||||
|
||||
Reference in New Issue
Block a user