刘磊
5 天以前 5eeed44ad21748ed7560a8c688d4e2d2f03555c8
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
65
66
67
68
69
70
71
72
73
74
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/Sys_Role.js此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/system/Sys_Config.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'id',
            footer: "Foots",
            cnName: '参数管理',
            name: 'Sys_Config',
            url: "/Sys_Config/",
            sortName: "id"
        });
        const editFormFields = ref({ "ParentId": [], "RoleName": "", "DeptName": "", "Enable": "", "Creator": "", "CreateDate": "", "Modifier": "", "ModifyDate": "" });
        const editFormOptions = ref([
            [{ "title": "参数名", "field": "configKey" }, { "title": "参数值", "field": "configValue" }],
            [{ "title": "类别", "field": "category" },
            { "dataKey": "enable", "data": [], "title": "是否启用", "field": "status", "type": "switch" }],
            [{ "title": "排序", "field": "sortCode" },]
        ]);
        const searchFormFields = ref({ "configKey": "", "configValue": "", "status": "", "CreateDate": "", "ModifyDate": "" });
        const searchFormOptions = ref([
            [{ "title": "参数名", "field": "configKey", "type": "text" },
            { "title": "参数值", "field": "configValue", "type": "text" },
            { "dataKey": "enable", "data": [], "title": "是否启用", "field": "status", "type": "select" }
            ],
            [{ "title": "备注", "field": "remark", "type": "text" },
            { "title": "类别", "field": "category", "type": "text" }
            ],
            [{ "title": "创建时间", "field": "createDate", "type": "datetime" }, { "title": "修改时间", "field": "modifyDate", "type": "datetime" }]
        ]);
        const columns = ref([
            { field: 'id', title: '主键', type: 'int', width: 70, readonly: true, hidden: true, require: true, align: 'left', sortable: true },
            { field: 'configKey', title: '参数名', type: 'string', width: 100, require: true, align: 'left' },
            { field: 'configValue', title: '参数值', type: 'string', width: 200, require: true, align: 'left' },
            { field: 'category', title: '类别', type: 'string', width: 90, align: 'left' },
            { field: 'remark', title: '备注', type: 'string', width: 90, align: 'left' },
            { field: 'status', title: '是否启用', type: 'byte', bind: { key: 'enable', data: [] }, width: 50, align: 'left' },
            { field: 'sortCode', title: '排序', type: 'int', hidden: true, width: 90, align: 'left' },
            { field: 'creater', title: '创建人', type: 'string', width: 75, readonly: true, align: 'left' },
            { field: 'createDate', title: '创建时间', type: 'datetime', width: 90, readonly: true, align: 'left', sortable: true },
            { field: 'modifier', title: '修改人', type: 'string', width: 75, readonly: true, align: 'left' },
            { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 90, readonly: true, align: 'left', sortable: true }]);
        const detail = ref({
            cnName: "#detailCnName",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>