| | |
| | | <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> |
| | |
| | | <script> |
| | | export default { |
| | | name: "attrCrud .vue", |
| | | props: ['ProData'], |
| | | data() { |
| | | return { |
| | | |
| | | CascadeVisible: false, |
| | | attrEditVisible: false, |
| | | // 级联单选 |
| | |
| | | cell: false, |
| | | labelWidth: 110, |
| | | width: 125, |
| | | sortable: true, |
| | | sortable: false, |
| | | }, |
| | | { |
| | | label: "属性中文名称", |
| | |
| | | }, |
| | | mounted() { |
| | | console.log(this.attrEditVisible) |
| | | console.log(this.ProData) |
| | | }, |
| | | methods: { |
| | | addsHandler(){ |
| | |
| | | }, |
| | | // screenEdit(){ |
| | | // debugger |
| | | |
| | | // this.attrEditVisible=true; |
| | | // }, |
| | | // outEdit(){ |
| | |
| | | }, |
| | | // 排序 |
| | | 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; |
| | | // } |
| | | } |
| | | } |
| | | } |