Commit 48768978ba0db1b583dc49c6db478918ed9c5a06

Authored by fengtao
1 parent e7aed28e

refractor:报表配置 字段请求后端

@@ -5,6 +5,7 @@ import { getOrganizationList } from '/@/api/system/system'; @@ -5,6 +5,7 @@ import { getOrganizationList } from '/@/api/system/system';
5 import { copyTransFun } from '/@/utils/fnUtils'; 5 import { copyTransFun } from '/@/utils/fnUtils';
6 import { screenLinkPageByDeptIdGetDevice } from '/@/api/ruleengine/ruleengineApi'; 6 import { screenLinkPageByDeptIdGetDevice } from '/@/api/ruleengine/ruleengineApi';
7 import { getAttribute } from '/@/api/ruleengine/ruleengineApi'; 7 import { getAttribute } from '/@/api/ruleengine/ruleengineApi';
  8 +import { findDictItemByCode } from '/@/api/system/dict';
8 9
9 export enum TypeEnum { 10 export enum TypeEnum {
10 IS_TIMING = 'TIMING', 11 IS_TIMING = 'TIMING',
@@ -22,7 +23,6 @@ export const isMonth = (type: string) => { @@ -22,7 +23,6 @@ export const isMonth = (type: string) => {
22 return type === TypeEnum.IS_MONTH; 23 return type === TypeEnum.IS_MONTH;
23 }; 24 };
24 25
25 -  
26 export enum AggregateDataEnum { 26 export enum AggregateDataEnum {
27 MIN = 'MIN', 27 MIN = 'MIN',
28 MAX = 'MAX', 28 MAX = 'MAX',
@@ -241,7 +241,7 @@ export const formSchema: QFormSchema[] = [ @@ -241,7 +241,7 @@ export const formSchema: QFormSchema[] = [
241 label: '周期', 241 label: '周期',
242 required: true, 242 required: true,
243 colProps: { span: 24 }, 243 colProps: { span: 24 },
244 - defaultValue: '1', 244 + defaultValue: 'day',
245 componentProps: { 245 componentProps: {
246 placeholder: '请选择周期', 246 placeholder: '请选择周期',
247 options: [ 247 options: [
@@ -253,55 +253,56 @@ export const formSchema: QFormSchema[] = [ @@ -253,55 +253,56 @@ export const formSchema: QFormSchema[] = [
253 ifShow: ({ values }) => isTiming(values.actionS), 253 ifShow: ({ values }) => isTiming(values.actionS),
254 }, 254 },
255 { 255 {
256 - field: '5',  
257 - component: 'Select', 256 + field: '51111',
  257 + component: 'ApiSelect',
258 label: '每周', 258 label: '每周',
259 required: true, 259 required: true,
260 colProps: { span: 24 }, 260 colProps: { span: 24 },
261 - defaultValue: '1', 261 + defaultValue: '0 0 0 ? * MON',
262 componentProps: { 262 componentProps: {
263 placeholder: '请选择周期', 263 placeholder: '请选择周期',
264 - options: [  
265 - { label: '星期一', value: '1' },  
266 - { label: '星期二', value: '2' },  
267 - { label: '星期三', value: '3' },  
268 - { label: '星期四', value: '3' },  
269 - { label: '星期五', value: '3' },  
270 - ], 264 + api: findDictItemByCode,
  265 + params: {
  266 + dictCode: 'every_week',
  267 + },
  268 + labelField: 'itemText',
  269 + valueField: 'itemValue',
271 }, 270 },
272 ifShow: ({ values }) => isWeek(values.timeWeek), 271 ifShow: ({ values }) => isWeek(values.timeWeek),
273 }, 272 },
274 { 273 {
275 - field: '5',  
276 - component: 'Select', 274 + field: '71111',
  275 + component: 'ApiSelect',
277 label: '每月', 276 label: '每月',
278 required: true, 277 required: true,
279 colProps: { span: 24 }, 278 colProps: { span: 24 },
280 - defaultValue: '1', 279 + defaultValue: '0 0 0 1 * ? *',
281 componentProps: { 280 componentProps: {
282 - placeholder: '请选择周期',  
283 - options: [  
284 - { label: '1日', value: '1' },  
285 - { label: '2日', value: '7' },  
286 - { label: '3日', value: '30' },  
287 - ], 281 + placeholder: '请选择月份',
  282 + api: findDictItemByCode,
  283 + params: {
  284 + dictCode: 'every_month',
  285 + },
  286 + labelField: 'itemText',
  287 + valueField: 'itemValue',
288 }, 288 },
289 ifShow: ({ values }) => isMonth(values.timeWeek), 289 ifShow: ({ values }) => isMonth(values.timeWeek),
290 }, 290 },
291 { 291 {
292 - field: '6',  
293 - component: 'Select', 292 + field: '62121',
  293 + component: 'ApiSelect',
294 label: '时间', 294 label: '时间',
295 required: true, 295 required: true,
296 colProps: { span: 24 }, 296 colProps: { span: 24 },
297 - defaultValue: '1', 297 + defaultValue: '0 0 0 ? * *',
298 componentProps: { 298 componentProps: {
299 placeholder: '请选择时间', 299 placeholder: '请选择时间',
300 - options: [  
301 - { label: '00点', value: '1' },  
302 - { label: '01点', value: '2' },  
303 - { label: '02点', value: '3' },  
304 - ], 300 + api: findDictItemByCode,
  301 + params: {
  302 + dictCode: 'every_day',
  303 + },
  304 + labelField: 'itemText',
  305 + valueField: 'itemValue',
305 }, 306 },
306 ifShow: ({ values }) => isTiming(values.actionS), 307 ifShow: ({ values }) => isTiming(values.actionS),
307 }, 308 },