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
75
76
77
78
79
80
81
82
| <!--
| *Author:jxx
| *Contact:283591387@qq.com
| *代码由框架生成,任何更改都可能导致被代码生成器覆盖
| *业务请在@/extension/widesea_wcs/wcs/dt_plcinfohead.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/widesea_wcs/wcs/dt_plcinfohead.js";
| import { ref, defineComponent } from "vue";
| export default defineComponent({
| setup() {
| const table = ref({
| key: 'plcinfo_iotyep',
| footer: "Foots",
| cnName: 'PLC管理',
| name: 'wcs/dt_plcinfohead',
| url: "/dt_plcinfohead/",
| sortName: "plcinfo_id"
| });
| const editFormFields = ref({
| 'plcinfo_name': "",
| 'plcinfo_ip': "",
| 'plcinfo_port': "",
| 'plcinfo_slot': "",
| 'plcinfo_type': ""
| });
| const editFormOptions = ref([
| [
| { field: 'plcinfo_name', title: '名称', type: 'string', width: 110, align: 'left', readonly: true },
| { field: 'plcinfo_ip', title: 'ip', type: 'string', width: 110, align: 'left', readonly: true },
| { field: 'plcinfo_port', title: '端口', type: 'string', width: 110, align: 'left', readonly: true },
| { field: 'plcinfo_slot', title: '插槽', type: 'string', width: 110, align: 'left', readonly: true },
| ],
| [
| { field: 'plcinfo_type', title: 'plc类型', type: 'string', width: 110, align: 'left', readonly: true },
| ]
| ]);
| const searchFormFields = ref({ "plcinfo_name": "", "plcinfo_ip": "", "plcinfo_type": "", "plcinfo_remark": "" });
| const searchFormOptions = ref([[{ "title": "名称", "field": "plcinfo_name", "type": "like" }, { "title": "ip", "field": "plcinfo_ip", "type": "like" }, { "title": "plc类型", "field": "plcinfo_type", "type": "select", dataKey: "PLCType" }], [{ "title": "备注", "field": "plcinfo_remark", "type": "like" }]]);
| const columns = ref([{ field: 'plcinfo_id', title: 'plcinfo_id', type: 'guid', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
| { field: 'plcinfo_name', title: '名称', type: 'string', width: 110, align: 'left', sort: true },
| { field: 'plcinfo_ip', title: 'ip', type: 'string', width: 110, align: 'left' },
| { field: 'plcinfo_port', title: '端口', type: 'int', width: 50, align: 'left' },
| { field: 'plcinfo_slot', title: '插槽', type: 'int', width: 50, align: 'left' },
| { field: 'plcinfo_iotyep', title: '协议类型', link: true, type: 'string', width: 110, align: 'left' },
| { field: 'plcinfo_type', title: 'plc类型', type: 'string', width: 110, align: 'left' },
| { field: 'plcinfo_remark', title: '备注', type: 'string', width: 220, align: 'left' }]);
| const detail = ref({
| cnName: "协议明细",
| table: "dt_plcinfodetail",
| columns: [{ field: 'plcdetail_iotype', title: '协议类型', type: 'string', width: 90, readonly: true, align: 'left' },
| { field: 'plcdetail_name', title: '信号名称', type: 'string', width: 130, readonly: true, align: 'left' },
| { field: 'plcdetail_db', title: 'DB块', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
| { field: 'plcdetail_value', title: '偏移地址', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
| { field: 'plcdetail_valtype', title: '数据类型', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
| { field: 'plcdetail_len', title: '长度', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
| // { field: 'plcdetail_number', title: '设备名称', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
| { field: 'plcdetail_opratortype', title: '处理方法', type: 'string', width: 90, readonly: true, align: 'left', sort: true },
| { field: 'plcdetail_remark', title: '备注', type: 'string', width: 90, readonly: true, align: 'left' },
| ],
| sortName: "plcdetail_iotype",
| key: "plcdetail_id"
| });
| return {
| table,
| extend,
| editFormFields,
| editFormOptions,
| searchFormFields,
| searchFormOptions,
| columns,
| detail,
| };
| },
| });
| </script>
|
|