Browse Source

报表模块

master
mch 2 years ago
parent
commit
51c99f380f
  1. 28
      src/components/customerOrg/customerOrgTree.vue

28
src/components/customerOrg/customerOrgTree.vue

@ -2,8 +2,7 @@
<el-tree
:data="customerOrg.customerOrgTree"
:props="customerOrg.treeprops"
@node-click="treeclick"
/>
@node-click="treeclick"/>
</template>
<script>
import { mapState, mapMutations } from "vuex";
@ -16,10 +15,10 @@ export default {
},
//<el-tree :data="$store.state.customerOrg.customerOrgTree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree>
computed: {
...mapState(["customerOrg", "window"]),
...mapState(["customerOrg","window"]),
},
//
created() { },
created() {},
//
mounted() {
@ -48,20 +47,18 @@ export default {
//console.log('getCustomerOrgTree start')
// api/app/organization-units/organization-unit-by-is-peis // api/app/customer-org/by-code-all
getapi("/api/app/customer-org/by-code-all").then((res) => {
if(res.code != -1){
//customerOrgTree = res.data;
console.log("res.data", res.data);
this.setData({ key: "customerOrg.customerOrgTree", value: res.data });
tcdate(this.customerOrg.customerOrgTree);
}
});
},
//
getCustomerOrgRd(id) {
getapi(`/api/app/customer-org/${id}`).then((res) => {
if(res.code != -1){
//console.log("res.data", res.data);
this.customerOrg.customerOrgRd = res.data;
}
});
},
@ -70,9 +67,8 @@ export default {
getapi(
`/api/app/customer-org-register/in-customer-org-id/${customerOrgId}`
).then((res) => {
if(res.code != -1){
//console.log('res.data',res.data)
this.customerOrg.customerOrgRegisterList = res.data;
}
});
},
@ -81,9 +77,8 @@ export default {
getapi(
`/api/app/contact-person/in-customer-org-id/${customerOrgId}`
).then((res) => {
if(res.code != -1){
//console.log('res.data',res.data)
this.customerOrg.contactPersonList = res.data;
}
if (res.data.length > 0) {
this.getContactMethodList(res.data[0].id);
} else {
@ -98,26 +93,21 @@ export default {
getapi("/api/app/contact-method/in-contact-person-id", {
ContactPersonId,
}).then((res) => {
if(res.code != -1){
//console.log('res.data',res.data)
this.customerOrg.contactMethodList = res.data;
}
});
},
//
treeclick(data) {
//this.$message.success(data.id + " " + data.displayName);// api/app/customer-org/3a0c0439-a5ca-8a63-b2b9-e0eb24cb58b1
console.log('data',data);
this.customerOrg.customerOrgId = data.id;
this.getCustomerOrgRd(data.id);
//
if(!data.parentId){
this.getCustomerOrgRegisterList(data.id);
}
this.getContactPersonList(data.id);
},
},
};
</script>
<style scoped>

Loading…
Cancel
Save