123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- import { BasicColumn } from '/@/components/Table';
- import { FormSchema } from '/@/components/Table';
- import { rules } from '/@/utils/helper/validator';
- import { render } from '/@/utils/common/renderUtils';
- export const columns: BasicColumn[] = [
- {
- title: '名称',
- dataIndex: 'strname',
- width: 120,
- },
- {
- title: '安装位置',
- dataIndex: 'strinstallpos',
- width: 100,
- },
- {
- title: '读取数据方式',
- dataIndex: 'strtype',
- width: 100,
- },
- {
- title: '分站IP地址',
- dataIndex: 'strip',
- width: 100,
- },
- {
- title: '链接状态',
- dataIndex: 'linkstatus',
- width: 100,
- },
- {
- title: '备注',
- width: 150,
- dataIndex: 'strremark',
- },
- ];
- export const recycleColumns: BasicColumn[] = [
- {
- title: '名称',
- dataIndex: 'strname',
- width: 100,
- },
- {
- title: '安装位置',
- dataIndex: 'strinstallpos',
- width: 100,
- },
- {
- title: '链接状态',
- dataIndex: 'linkstatus',
- width: 80,
- customRender: render.renderAvatar,
- },
- ];
- export const searchFormSchema: FormSchema[] = [
- {
- label: '名称',
- field: 'strname',
- component: 'Input',
- colProps: { span: 6 },
- },
- {
- label: '安装位置',
- field: 'strinstallpos',
- component: 'Input',
- colProps: { span: 6 },
- },
- {
- label: '链接状态',
- field: 'linkstatus',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'user_status',
- placeholder: '请选择读写类型',
- stringToNumber: true,
- },
- colProps: { span: 6 },
- },
- ];
- export const formSchema: FormSchema[] = [
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false,
- },
- {
- label: '名称',
- field: 'strname',
- component: 'Input',
- required: true,
- },
- {
- label: '安装位置',
- field: 'strinstallpos',
- component: 'Input',
- required: true,
- },
- {
- label: '读取数据方式',
- field: 'strtype',
- component: 'JDictSelectTag',
- required: true,
- componentProps: ({ formModel, formActionType, schema }) => {
- return {
- dictCode: 'getdatatype',
- placeholder: '请选择分站用途',
- onChange: (e: any) => {
- const { updateSchema } = formActionType;
- if (e == 'plc' || e == 'modbus') {
- updateSchema({
- field: 'plcType',
- show: true,
- });
- } else {
- updateSchema({
- field: 'plcType',
- show: false,
- });
- if (e == 'http') {
- updateSchema({
- label: '请求参数或读取文件名',
- field: 'reqparam',
- component: 'Input',
- required: false,
- show: true,
- });
- }
- }
- },
- };
- },
- },
- {
- label: '监测类型',
- field: 'monitorparam',
- component: 'MTreeSelect',
- componentProps: {
- virtual: false,
- },
- },
- {
- label: '分站IP或请求地址',
- field: 'strip',
- component: 'Input',
- required: true,
- },
- {
- label: '分站端口',
- field: 'nport',
- component: 'InputNumber',
- },
- {
- label: 'PLC类型',
- field: 'plcType',
- component: 'JDictSelectTag',
- show: true,
- componentProps: {
- dictCode: 'plcType',
- placeholder: '请选择PLC类型',
- },
- },
- {
- label: '分站站号',
- field: 'code ',
- component: 'Input',
- },
- {
- label: '系统缓存点表下标',
- field: 'plcTable',
- component: 'Input',
- },
- {
- label: '请求方式',
- field: 'reqtype',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'reqtype',
- placeholder: '请选择请求方式',
- },
- },
- {
- label: 'reqHeader请求头',
- field: 'reqHeader',
- component: 'Input',
- },
- {
- label: '请求参数或读取文件名',
- field: 'reqparam',
- component: 'Input',
- },
- {
- label: '数据属性字段(json中数据列表的字段-)',
- field: 'dataproperty',
- component: 'Input',
- },
- {
- label: 'ID字段',
- field: 'idcode',
- component: 'Input',
- },
- {
- label: '名称code',
- field: 'namecode',
- component: 'Input',
- },
- {
- label: '连接用户名',
- field: 'remoteUser',
- component: 'Input',
- },
- {
- label: '连接密码',
- field: 'remotePass',
- component: 'Input',
- },
- {
- label: '数据格式化',
- field: 'dataformat',
- component: 'Input',
- },
- {
- label: '字符串分割符',
- field: 'splitchar',
- component: 'Input',
- },
- {
- label: '控制请求地址',
- field: 'controlStrip',
- component: 'Input',
- },
- {
- label: '控制请求类型',
- field: 'controlReqtype',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'reqtype',
- placeholder: '请选择控制请求方式',
- },
- },
- {
- label: '控制请求Header',
- field: 'controlHeader',
- component: 'Input',
- },
- {
- label: '控制请求参数',
- field: 'controlReqparam',
- component: 'Input',
- },
- {
- label: '登录地址',
- field: 'loginUrl',
- component: 'Input',
- },
- {
- label: '登录结果解析(返回的token读取字段)',
- field: 'loginResult',
- component: 'Input',
- },
- {
- label: '备注',
- field: 'strremark',
- component: 'InputTextArea',
- },
- ];
|