|
@@ -0,0 +1,113 @@
|
|
|
+<template>
|
|
|
+ <!-- 指标溯源页 -->
|
|
|
+ <div class="edb-history-page-wrap">
|
|
|
+ <div class="edb-title">aaa</div>
|
|
|
+ <div class="edb-source-wrap">
|
|
|
+ <vue2-org-tree
|
|
|
+ :data="treeData"
|
|
|
+ :props="{
|
|
|
+ label: 'EdbName',
|
|
|
+ children: 'Child',
|
|
|
+ }"
|
|
|
+ :horizontal="false"
|
|
|
+ :render-content="renderContent"
|
|
|
+ @on-node-click="handleClickNode"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { dataBaseInterface } from '@/api/api.js';
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ treeData:{}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ renderContent(h, data) {
|
|
|
+ return (
|
|
|
+ <el-tooltip content={data.RuleTitle} placement='top' popper-class='node-tooltip'>
|
|
|
+ <span class='node'>{data.EdbName}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ )
|
|
|
+ },
|
|
|
+ handleClickNode(e, data) {
|
|
|
+ //EdbInfoType=1 跳预测指标详情,=0跳指标库详情
|
|
|
+ const { ClassifyId, UniqueCode, EdbInfoId, EdbInfoType } = data
|
|
|
+ let { href } =
|
|
|
+ this.$router.resolve({ path: EdbInfoType === 1 ? '/predictEdb' : '/database', query: { code: UniqueCode, id:
|
|
|
+ EdbInfoId, classifyId: ClassifyId } });
|
|
|
+ window.open(href, '_blank');
|
|
|
+ },
|
|
|
+ async getData() {
|
|
|
+ const res = await dataBaseInterface.getEdbCreateHistory({ EdbInfoId: Number(this.$route.query.edbId) })
|
|
|
+ if (res.Ret !== 200) return
|
|
|
+ this.treeData = res.Data;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted(){
|
|
|
+ if(this.$route.query.edbId){
|
|
|
+ this.getData()
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.edb-history-page-wrap{
|
|
|
+ min-height: calc(100vh - 120px);
|
|
|
+ overflow-y: auto;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 4px;
|
|
|
+ border:1px solid #C8CDD9;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding:30px;
|
|
|
+ .edb-source-wrap{
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+<style lang="scss">
|
|
|
+.edb-history-page-wrap{
|
|
|
+ .org-tree-container {
|
|
|
+ margin: 0 auto;
|
|
|
+ /* .org-tree-node-label { } */
|
|
|
+ .org-tree-node-label-inner{
|
|
|
+ cursor: pointer;
|
|
|
+ background-color: #F2F6FA;
|
|
|
+ color: #333333;
|
|
|
+ padding:20px;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 16px;
|
|
|
+ &:hover{
|
|
|
+ color:#0052D9;
|
|
|
+ text-decoration: underline;
|
|
|
+ background-color: #ECF5FF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .org-tree{
|
|
|
+ >.org-tree-node{
|
|
|
+ >.org-tree-node-label{
|
|
|
+ .org-tree-node-label-inner{
|
|
|
+ background-color: #0052D9;
|
|
|
+ color: white;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .org-tree-node-children {
|
|
|
+ .org-tree-node ~ .org-tree-node{
|
|
|
+ padding-left: 40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+.node-tooltip{
|
|
|
+ font-size: 14px;
|
|
|
+ padding:10px;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+</style>
|