分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-07-19 7a4c218909936721fe281737491d10efc7378e09
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
 
import { h, resolveComponent } from 'vue';
let extension = {
  components: {
    //动态扩充组件或组件路径
    //表单header、content、footer对应位置扩充的组件
    gridHeader: '', //{ template: "<div>扩展组xx件</div>" },
    gridBody: {
      render() {
        return [
          h(resolveComponent('el-alert'), {
            style: { 'margin-bottom': '12px' },
            'show-icon': true, type: 'warning',
            closable: false, title: 'onInit中设置this.maxBtnLength = 7;指定按钮显示的个数。见代码:App_TransactionAvgPrice.js'
          }, ''),
        ]
      }
    },
    gridFooter: "",
    //弹出框(修改、编辑、查看)header、content、footer对应位置扩充的组件
    modelHeader: "",
    modelBody: "",
    modelFooter: ""
  },
  text:
    "还没想好",
  buttons: [], //扩展的按钮
  methods: {
    //事件扩展
    onInit() {
      //设置页面上显示的按钮个数(不是必须的)
      this.maxBtnLength = 7;
      //this.boxButtons弹出框的按钮,this.detailOptions.buttons,同样适用上面上方法
      //2021.07.17更新volform.vue组件后才能使用 
      this.editFormOptions.forEach(x => {
        x.forEach(option => {
          if (option.field == "Date") {
            option.min = "2021-07-01 00:00";
            option.max = Date.now();//日期最大值"2021-07-20 00:00" 
          }
 
        })
      })
      this.columns.forEach(option => {
        if (option.field == 'AgeRange') {
          option.normal = true;
        }
      })
      //如果要设置查询的日期范围选择同上 
      //this.searchFormOptions.forEach 
 
      //设置显示所有查询条件
      // this.setFiexdSearchForm(true);
    },
    onInited() {
      //设置表高度
      this.height = this.height - 50;
    },
    rowClick({ row, column, event }) { //查询界面table点击行时选中当前行
      this.$refs.table.$refs.table.toggleRowSelection(row);
    },
  }
};
export default extension;