田源
2023-07-10 740caba0bd53bda276846028e9c620c23ffdb7ea
主题库实施bug以及样式
已修改3个文件
106 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/Tree/attrCrud.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag">
    <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag" class="app">
      <el-button-group>
      <!--新增-->
      <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" icon="el-icon-plus" @click="busineHandle">添加 {{ msg }}</el-button>
@@ -242,7 +242,7 @@
    </div>
    <el-table :data="ProData"
              style="width: 100%"
              height="280"
              :height='attrEditVisible == false && attrFlagChiledren==false?400 :750'
              @cell-click="handleCellClicks"
              @select="selectHandle"
              @selection-change="selectionChange"
@@ -936,11 +936,13 @@
        column: [
          {
            label: "属性英文名称",
            prop: "id"
            prop: "id",
            width:110
          },
          {
            label: "属性中文名称",
            prop: "name"
            prop: "name",
            width:110
          },
          {
            label: "长度",
@@ -1484,6 +1486,7 @@
    //业务类型选择
    businessSelect(selection, row) {
      this.busineSelectList = selection
      console.log(selection)
    },
    // 从业务类型中选择数据弹窗
    busineHandle() {
@@ -1813,7 +1816,11 @@
</script>
<style scoped lang="scss" >
/deep/ .el-button {
  margin: 0 10px 10px 0;
///deep/ .el-button {
//  margin: 0 10px 10px 0;
//}
.app el-button{
  z-index: 1;
  margin: 0 10px 10px 0 !important;
}
</style>
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -110,7 +110,7 @@
import {TreeEditSave} from '@/api/template/templateAttr'
export default {
  name: "classifyTreeform.vue",
  props: ['loneTreeNewForm','flag','Editclose','TreeFlag'],
  props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'],
  data() {
    return {
      SelectFInd:"",
@@ -288,7 +288,7 @@
            labelWidth:128,
            focus:this.btmFoucus,
            readonly: true,
            hide:this.TreeFlag,
            display:false,
            rules: [{
              required: true,
              message: "存储的业务类型",
@@ -326,15 +326,16 @@
      btmSelectList:[]
    }
  },
  created() {
  },
  watch:{
    // TreeFlag:{
    //   handler(newval){
    //     const falg=newval;
    //     this.findObject(this.)
    //   }
    // }
    nodeClickList:{
      handler(newval,oldval){
        console.log('newVal',newval,oldval)
      },
      deep:true,
      immediate:true
    }
  },
  created() {
  },
  methods: {
    submits(form,done){
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -2,8 +2,9 @@
<template>
  <el-container>
    <!--    左侧菜单-->
    <el-aside>
      <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;">
    <el-aside >
      <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;"@click.native="handleClickOutside" >
        <div @click.native="handleClickOutside">
        <div>
          <div style="display: flex;justify-content: space-around">
            <el-button plain size="small" type="primary" @click="TreeAdd">添加</el-button>
@@ -51,7 +52,7 @@
        </el-dialog>
        <!--        修改对话框-->
        <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlag"></classifyTreeform>
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlag" ::nodeClickList="nodeClickList"></classifyTreeform>
        </el-dialog>
        <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
                   :option="Treeoption"
@@ -60,6 +61,7 @@
                   @check-change="checkChange"
        >
        </avue-tree>
        </div>
      </basic-container>
    </el-aside>
    <el-main>
@@ -67,7 +69,7 @@
        <!--        右侧表格-->
        <avue-tabs :option="tabOption" @change="handleChange"></avue-tabs>
        <span v-if="type.prop==='tab1'">
           <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'renonly'"></classifyTreeform>
           <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'renonly'" ></classifyTreeform>
        </span>
        <span v-else-if="type.prop==='tab2'">
            <basic-container>
@@ -117,7 +119,7 @@
                    <el-aside width="300px">
                      <div style="margin-bottom: 5px"><el-tag>主题库分类</el-tag></div>
                      <!--                      克隆模板的树 沿用首页树的loading和option,但是data和v-model绑定的数据创建一个新的变量,另外点击方法也是重新获取来操作克隆模板的数据-->
                        <avue-tree ref="tree" v-model="TreeAvueform" v-loading="loading" :data="Treedata"
                        <avue-tree  v-model="TreeAvueform" v-loading="loading" :data="Treedata"
                                   :defaultExpandAll="false"
                                   :option="Treeoption"
                                   style="height: 50.5vh;margin-right: 10px"
@@ -286,7 +288,7 @@
          </template>
          <avue-crud :data="BtmData" :option="masterOption" @select="btmSelect"></avue-crud>
          <div style="height: 30px">
            <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.TreeAddform.btmtypename}}]</div>
            <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.TreeAddform.btmTypeName}}]</div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
              <el-button type="primary" size="small" @click="btmHandlerClick">确定</el-button>
              <el-button  size="small" @click="BtmdialogVisible=false">取消</el-button>
@@ -540,11 +542,21 @@
        column: [
          {
            label: "模板编号",
            prop: "id"
            prop: "id",
            rules: [{
              required: true,
              message: "模板编号",
              trigger: "blur"
            }]
          },
          {
            label: "模板名称",
            prop: "name",
            rules: [{
              required: true,
              message: "模板名称",
              trigger: "blur"
            }]
          },
          {
            label: "模板描述",
@@ -628,11 +640,21 @@
        column: [
          {
            label: "模板编号",
            prop: "id"
            prop: "id",
            rules: [{
              required: true,
              message: "模板编号",
              trigger: "blur"
            }]
          },
          {
            label:"模板名称",
            prop:"name"
            label: "模板名称",
            prop: "name",
            rules: [{
              required: true,
              message: "模板名称",
              trigger: "blur"
            }]
          },
          {
            label: "模板描述",
@@ -653,6 +675,18 @@
    }
  },
  methods: {
    //树节点失去焦点
    handleClickOutside(event) {
      const treeElement = this.$refs.tree.$el;
      const targetElement = event.target;
      if (!treeElement.contains(targetElement)) {
        // 在树组件外部点击,清空选择状态
        // this.nodeClickList=[];
        // this.CloneTreeAvueform={}
        console.log(this.nodeClickList  )
        console.log(this.CloneTreeAvueform)
      }
    },
    //编码规则失焦
    CodeFoucus(){
      this.MasterdialogVisible=true;
@@ -829,8 +863,8 @@
      }else {
        this.BtmdialogVisible=false;
        this.btmSelectList=[]
        this.$set(this.loneTreeNewForm,'btmtypename',this.btmName ||this.btmOid)
        this.$set(this.loneTreeNewForm,'btmtypeid',this.btmOid)
        this.$set(this.TreeAddform,'btmTypeName',this.btmName)
        this.$set(this.TreeAddform,'btmTypeId',this.btmOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
@@ -918,18 +952,20 @@
    //树节点添加事件
    TreeAddHandler() {
      const data = this.TreeAddform;
      data.btmTypeName= this.TreeList.btmtypename
      // data.btmtypename= this.TreeList.btmtypename
      this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
      // console.log("data", data);
      console.log("data", data);
      TreeSave(data)
        .then(() => {
          this.$message({
            type: "success",
            message: "添加成功!",
          });
          Object.keys(this.TreeAddform).forEach(key => {
            this.TreeAddform[key] = "";
          });
          this.getAttr();
          this.TreeAddFormVisible = false;
          this.TreeAddform = "";
        })
        .catch((res) => {
          this.$message({