分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-06-26 54ed2050bacec14a51ff96c6e0e2ec7033cd727a
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
 
import { h, resolveComponent } from 'vue';
let extension = {
  components: {//动态扩充组件或组件路径
    //表单header、content、footer对应位置扩充的组件
    gridHeader: '',
    gridBody: {
      render() {
        return h(resolveComponent('ElAlert'), {
          style: { 'margin-bottom': '12px' },
          'show-icon': true,
          type: 'success',
          closable: false,
        }, [h('p', {}, '1、 onInited中重新定义表头数据,2021.01.08更新voltable.vue后才能使用'),
        h('p', {}, ' 2、具体见:App_Appointment2.js中配置(现在只支持到二级表头、不支持编辑与复杂操作)')]);
      }
    },
    gridFooter: '',
    //弹出框(修改、编辑、查看)header、content、footer对应位置扩充的组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
  },
  tableAction:"App_Appointment",
  text: "页面全部由代码生成器生成,只需要在onInited中重新配置表头数据",
  methods: {//事件扩展
    onInit() {
      //设置表的最大高度
      this.tableMaxHeight = 300;
    },
    onInited() {
      this.columns.splice(0);
      this.columns.push(...[
        {
          field: 'Name', title: '基础信息', type: 'string', align: 'center',
          children: [
            { field: 'Name', title: '用户姓名', type: 'string', link: true, width: 100, sortable: true },
            { field: 'PhoneNo', title: '电话', type: 'string', width: 130 },
            { field: 'Describe', title: '描述信息', type: 'string', width: 180 },
          ]
        },
        {
          field: 'Name', title: '创建人信息', type: 'string', align: 'center',
          children: [
            { field: 'Id', title: '主键ID', type: 'string', width: 90, hidden: true },
            { field: 'CreateDate', title: '创建时间', type: 'datetime', width: 120, sortable: true },
            { field: 'Creator', title: '创建人', type: 'string', width: 130, align: 'left' }]
        },
        {
          field: 'Name', title: '修改人信息', type: 'string', align: 'center',
          children: [
            { field: 'Modifier', title: '修 改 人', type: 'string', width: 130, align: 'left' },
            { field: 'ModifyDate', title: '修改时间', type: 'datetime', width: 150, sortable: true }]
        }
      ]
      )
    }
  }
};
export default extension;