ludc
2023-05-29 101e8e9738e4bfe0ef7a5170d117b47bf901b8f6
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1,8 +1,8 @@
<template>
  <avue-crud :data="data" :option="option" @sort-change="sortChange" @row-update="addUpdate"
  <avue-crud :data="ProData" :option="option" @sort-change="sortChange" @row-update="addUpdate"
             @cell-click="handleRowClick">
    <template slot="menuLeft">
      <el-button v-if="attrEditVisible == false" size="small" type="primary" @click="addVisible=true">+ 添加</el-button>
      <el-button v-if="attrEditVisible == false" size="small" type="primary" @click="addVisible=true">+ 添加 {{msg}}</el-button>
      <el-dialog :visible.sync="addVisible" append-to-body title="从业务类型中选择属性">
        <avue-crud :data="businessData" :option="businessOption"></avue-crud>
      </el-dialog>
@@ -176,9 +176,9 @@
<script>
export default {
  name: "attrCrud .vue",
  props: ['ProData'],
  data() {
    return {
      CascadeVisible: false,
      attrEditVisible: false,
      // 级联单选
@@ -539,7 +539,7 @@
            cell: false,
            labelWidth: 110,
            width: 125,
            sortable: true,
            sortable: false,
          },
          {
            label: "属性中文名称",
@@ -753,6 +753,7 @@
  },
  mounted() {
    console.log(this.attrEditVisible)
    console.log(this.ProData)
  },
  methods: {
    addsHandler(){
@@ -760,6 +761,7 @@
    },
    // screenEdit(){
    //   debugger
    //   this.attrEditVisible=true;
    // },
    // outEdit(){
@@ -858,16 +860,17 @@
    },
    // 排序
    sortChange(val) {
      switch (val.order) {
        // case "ascending":
        //   this.data = this.data.sort((a,b) => { return b['name'].localeCompare(a['name']) })
        //   this.data = this.data.sort((a,b) => { return b['id'].localeCompare(a['id']) })
        //   break;
        // case "descending":
        //   this.data = this.data.sort((a,b) => { return a['name'].localeCompare(b['name']) })
        //   this.data = this.data.sort((a,b) => { return a['id'].localeCompare(b['id']) })
        //   break;
      }
      console.log(val)
      // switch (val.order) {
      //   // case "ascending":
      //   //   this.data = this.data.sort((a,b) => { return b['name'].localeCompare(a['name']) })
      //   //   this.data = this.data.sort((a,b) => { return b['id'].localeCompare(a['id']) })
      //   //   break;
      //   // case "descending":
      //   //   this.data = this.data.sort((a,b) => { return a['name'].localeCompare(b['name']) })
      //   //   this.data = this.data.sort((a,b) => { return a['id'].localeCompare(b['id']) })
      //   //   break;
      // }
    }
  }
}