田源
2023-04-14 6c4d4b494ef9c8fb134ece79e3993038a0358639
Source/UBCS-WEB/src/views/modeling/Relations.vue
@@ -1,13 +1,241 @@
<template>
<p>对象关系类型</p>
  <el-container>
    <el-aside width="240px">
      <basic-container >
        <avue-tree id="basic" :data="treeData" :option="treeOption" @node-click="nodeClick"></avue-tree>
      </basic-container>
    </el-aside>
    <el-main>
      <basic-container>
        <p style="margin-top: 10px;font-weight: 570;font-size: 19px">链接类型列表</p>
        <avue-crud
          v-model="obj"
          :data="loadData"
          :option="loadOption"
        >
          <template slot-scope="scope" slot="defaultForm">
            <Relationpackage></Relationpackage>
          </template>
          <template slot-scope="scope" slot="TodefaultForm">
            <Torelationpackage></Torelationpackage>
          </template>
        </avue-crud>
      </basic-container>
      <basic-container>
        <p style="margin-top: 10px;font-weight: 570;font-size: 19px">属性列表</p>
        <avue-crud
        v-model="objs"
        :data="attrData"
        :option="attrOption"
        >
        </avue-crud>
      </basic-container>
    </el-main>
  </el-container>
</template>
<script>
export default {
  name: "Relations"
  name: "Relations",
  data() {
    return {
      //  左树数据
      treeOption: {
        defaultExpandAll: true,
      },
      treeData: [
        {
          value: 0,
          label: '链接类型列表',
          children: [
            {
              value: 1,
              label: 'input',
            },
            {
              value: 2,
              label: 'checkbox',
            },
          ]
        }
      ],
      //  右侧表格基本信息数据
      obj: {},
      loadData: [],
      loadOption: {
        border: true,
        editBtn: false,
        height: 200,
        tabs:true,
        column: [
          {
            label: "名称",
            prop: "name",
            display:false
          },
          {
            label: "标签",
            prop: "tag",
            display:false
          },
          {
            label: "形状",
            prop: "shape",
            display:false
          },
          {
            label: "描述",
            prop: "desc",
            display:false
          },
          {
            label: "Form端类型",
            prop: "FormType",
            display:false
          },
          {
            label: "To端类型",
            prop: "ToType",
            display:false
          }
        ],
        group:[
          {
            label:"链接类型",
            column:[
              {
                label: "名称",
                prop: "name"
              },
              {
                label: "标签",
                prop: "tag"
              },
              {
                label: "形状",
                prop: "shape"
              },
              {
                label: "描述",
                prop: "desc"
              },
            ]
          },
          {
            label: "Form端类型",
            column: [
              {
                label: "主类型",
                type:"select",
                prop:"PrimType",
                dicData:[
                  {
                    label:"测试1",
                    value:0
                  },
                  {
                    label:"测试2",
                    value:1
                  }
                ]
              },
              {
                type:"radio",
                prop:"primRadio",
                dicData:[
                  {
                    label:"N",
                    value:0
                  },
                  {
                    label:"1",
                    value:1
                  }
                ]
              },
              {
                //默认插槽
                prop:"default",
                span:24,
                labelWidth:5
              }
            ]
          },
          {
            label: "To端类型",
            column: [
              {
                label: "主类型",
                type:"select",
                prop:"toType",
                dicData:[
                  {
                    label:"测试1",
                    value:0
                  },
                  {
                    label:"测试2",
                    value:1
                  }
                ]
              },
              {
                type:"radio",
                prop:"toRadio",
                dicData:[
                  {
                    label:"N",
                    value:0
                  },
                  {
                    label:"1",
                    value:1
                  }
                ]
              },
              {
                //默认插槽
                prop:"Todefault",
                span:24,
                labelWidth:5
              }
            ]
          }
        ]
      },
    //  右侧底部数据列表数据
      objs:{},
      attrData:[],
      attrOption:{
        height: 310,
        border: true,
        column: [
          {
            label:"属性名",
            prop:"attrName"
          },
          {
            label:"属性类型",
            prop:"attrType"
          },
          {
            label: "初始值",
            prop:"Invalue"
          },
          {
            label: "说明",
            prop:"explain"
          }
        ]
      }
    }
  }
}
</script>
<style scoped>
<style lang="scss">
#basic {
  height: 770px;
  border-radius: 10px;
}
</style>