123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443 |
- import { BasicColumn } from '/@/components/Table';
- import { FormSchema } from '/@/components/Table';
- import { rules } from '/@/utils/helper/validator';
- import { reactive } from 'vue';
- import { defineAsyncComponent } from 'vue';
- export const resultColumns: BasicColumn[] = [
- // {
- // title: '测风描述',
- // dataIndex: 'strremark',
- // width: 120,
- // align: 'center',
- // },
- {
- title: '测风设备数量',
- dataIndex: 'totalcount',
- width: 100,
- align: 'center',
- },
- {
- title: '同时运行数量',
- dataIndex: 'count',
- width: 100,
- align: 'center',
- },
- {
- title: '总时长',
- dataIndex: 'runtime',
- width: 100,
- align: 'center',
- },
- {
- title: '开始测风时间',
- dataIndex: 'begintime',
- width: 80,
- align: 'center',
- },
- {
- title: '结束测风时间',
- dataIndex: 'endtime',
- width: 100,
- align: 'center',
- sorter: (a: any, b: any) => new Date(a.endtime) - new Date(b.endtime),
- },
- {
- title: '用时(s)',
- dataIndex: 'runtime',
- width: 100,
- align: 'center',
- },
- {
- title: '操作人员',
- dataIndex: 'updateBy',
- width: 100,
- align: 'center',
- },
- {
- title: '操作',
- dataIndex: 'action',
- width: 100,
- align: 'center',
- },
- ];
- export const innerResultColumns: BasicColumn[] = [
- {
- title: '设备名称',
- dataIndex: 'strname',
- align: 'center',
- width: 120,
- },
- {
- title: '平均风速',
- dataIndex: 'va',
- align: 'center',
- width: 100,
- },
- {
- title: '风量',
- dataIndex: 'm3',
- align: 'center',
- width: 100,
- },
- {
- title: '用时(s)',
- dataIndex: 'runtime',
- align: 'center',
- width: 80,
- },
- ];
- export const columns: BasicColumn[] = [
- {
- title: '名称',
- dataIndex: 'strname',
- width: 120,
- },
- {
- title: '安装位置',
- dataIndex: 'strinstallpos',
- width: 100,
- },
- {
- title: '是否为常闭型',
- dataIndex: 'bnormalclose',
- width: 100,
- // customRender: render.renderAvatar,
- },
- {
- title: '净宽',
- dataIndex: 'fclearwidth',
- width: 80,
- },
- {
- title: '净高',
- dataIndex: 'fclearheight',
- width: 100,
- },
- {
- title: '风门道数',
- dataIndex: 'ndoorcount',
- width: 100,
- },
- {
- title: '所属分站',
- width: 150,
- dataIndex: 'stationname',
- },
- {
- title: '点表',
- width: 100,
- dataIndex: 'strtype',
- },
- {
- title: '监测类型',
- dataIndex: 'monitorflag',
- width: 100,
- },
- {
- title: '是否模拟数据',
- dataIndex: 'testflag',
- width: 100,
- },
- ];
- export const recycleColumns: BasicColumn[] = [
- {
- title: '名称',
- dataIndex: 'strname',
- width: 100,
- },
- {
- title: '是否为常闭型',
- dataIndex: 'bnormalclose',
- width: 100,
- },
- ];
- export const searchFormSchema: FormSchema[] = [
- {
- label: '名称',
- field: 'strname',
- component: 'Input',
- colProps: { span: 6 },
- },
- {
- label: '安装位置',
- field: 'strinstallpos',
- component: 'Input',
- colProps: { span: 6 },
- },
- {
- label: '是否为常闭型',
- field: 'bnormalclose',
- 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',
- },
- {
- label: '安装位置',
- field: 'strinstallpos',
- component: 'Input',
- },
- {
- label: '是否为常闭型',
- field: 'bnormalclose',
- component: 'RadioGroup',
- defaultValue: 1,
- componentProps: () => {
- return {
- options: [
- { label: '是', value: 1, key: '1' },
- { label: '否', value: 0, key: '2' },
- ],
- };
- },
- },
- {
- label: '净宽',
- field: 'fclearwidth',
- component: 'Input',
- },
- {
- label: '净高',
- field: 'fclearheight',
- component: 'Input',
- },
- {
- label: '风门道数',
- field: 'ndoorcount',
- component: 'Input',
- },
- {
- label: '所属分站',
- field: 'stationname',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'user_status',
- placeholder: '请选择状态',
- stringToNumber: true,
- },
- },
- {
- label: '点表',
- field: 'strtype',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'user_status',
- placeholder: '请选择状态',
- stringToNumber: true,
- },
- },
- {
- label: '监测类型',
- field: 'monitorflag',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'user_status',
- placeholder: '请选择状态',
- stringToNumber: true,
- },
- },
- {
- label: '是否模拟数据',
- field: 'testflag',
- component: 'RadioGroup',
- defaultValue: 1,
- componentProps: () => {
- return {
- options: [
- { label: '是', value: 1, key: '1' },
- { label: '否', value: 0, key: '2' },
- ],
- };
- },
- },
- ];
- export const formPasswordSchema: FormSchema[] = [
- {
- label: '用户账号',
- field: 'username',
- component: 'Input',
- componentProps: { readOnly: true },
- },
- {
- label: '登录密码',
- field: 'password',
- component: 'StrengthMeter',
- componentProps: {
- placeholder: '请输入登录密码',
- },
- rules: [
- {
- required: true,
- message: '请输入登录密码',
- },
- ],
- },
- {
- label: '确认密码',
- field: 'confirmPassword',
- component: 'InputPassword',
- dynamicRules: ({ values }) => rules.confirmPassword(values, true),
- },
- ];
- export const formAgentSchema: FormSchema[] = [
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false,
- },
- {
- field: 'userName',
- label: '用户名',
- component: 'Input',
- componentProps: {
- readOnly: true,
- allowClear: false,
- },
- },
- {
- field: 'agentUserName',
- label: '代理人用户名',
- required: true,
- component: 'JSelectUser',
- componentProps: {
- rowKey: 'username',
- labelKey: 'realname',
- maxSelectCount: 10,
- },
- },
- {
- field: 'startTime',
- label: '代理开始时间',
- component: 'DatePicker',
- required: true,
- componentProps: {
- showTime: true,
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- placeholder: '请选择代理开始时间',
- },
- },
- {
- field: 'endTime',
- label: '代理结束时间',
- component: 'DatePicker',
- required: true,
- componentProps: {
- showTime: true,
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- placeholder: '请选择代理结束时间',
- },
- },
- {
- field: 'status',
- label: '状态',
- component: 'JDictSelectTag',
- defaultValue: '1',
- componentProps: {
- dictCode: 'valid_status',
- type: 'radioButton',
- },
- },
- ];
- export const chartsColumns = [
- {
- legend: '风量',
- seriesName: 'm³/min',
- ymax: 10000,
- yname: 'm³/min',
- linetype: 'line',
- yaxispos: 'left',
- color: '#3DF6FF',
- sort: 1,
- xRotate: 0,
- dataIndex: 'm3',
- },
- {
- legend: '风速',
- seriesName: '(m/s)',
- ymax: 10,
- yname: 'm/s',
- linetype: 'line',
- yaxispos: 'right',
- color: '#cd5fff',
- sort: 2,
- xRotate: 0,
- dataIndex: 'va',
- },
- ];
- export const chartsColumnsHistory = [
- {
- legend: '风量',
- seriesName: 'm³/min',
- ymax: 10000,
- yname: 'm³/min',
- linetype: 'line',
- yaxispos: 'left',
- color: '#3DF6FF',
- sort: 1,
- xRotate: 0,
- dataIndex: 'FL',
- },
- {
- legend: '风速',
- seriesName: '(m/s)',
- ymax: 10,
- yname: 'm/s',
- linetype: 'line',
- yaxispos: 'right',
- color: '#cd5fff',
- sort: 2,
- xRotate: 0,
- dataIndex: 'windSpeed',
- },
- ];
- export const option = {
- xAxis: {
- type: 'category',
- boundaryGap: false,
- axisLine: { lineStyle: { color: '#57617B' } },
- axisLabel: { color: '#ffffffcc' },
- splitLine: { show: true, lineStyle: { color: '#57617B22', type: 'dashed' } },
- interval: 0,
- rotate: 40,
- },
- };
- export function getModelComponent(is2DModel: boolean = false, sysOrgCode?: string) {
- // @ts-ignore
- return defineAsyncComponent(() => {
- if (!is2DModel) return import('./components/entryThree.vue');
- switch (sysOrgCode) {
- // case '000000':
- // return import('./components/scanSVG.vue');
- default:
- // return import('./components/fixedSVG.vue');
- return import('./components/scanSVG.vue');
- }
- });
- }
|