Merge branch 'master-500-dev' of http://192.168.1.136:82/monitor_v3/anji-plus-re…
…port into dev-500-lzc
Showing
47 changed files
with
3822 additions
and
108 deletions
Too many changes to show.
To preserve performance only 47 of 47+ files are displayed.
1 | +package com.anjiplus.template.gaea.business.base; | ||
2 | + | ||
3 | +import com.anji.plus.gaea.bean.ResponseBean; | ||
4 | +import com.anjiplus.template.gaea.business.config.SystemConfig; | ||
5 | +import org.springframework.web.bind.annotation.GetMapping; | ||
6 | +import org.springframework.web.bind.annotation.RestController; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author Wang | ||
10 | + * @description 描述 | ||
11 | + * @create 2022-04-13 11:43 | ||
12 | + */ | ||
13 | +@RestController | ||
14 | +public class ConfigController { | ||
15 | + | ||
16 | + private final SystemConfig systemConfig; | ||
17 | + | ||
18 | + public ConfigController(SystemConfig systemConfig) { | ||
19 | + this.systemConfig = systemConfig; | ||
20 | + } | ||
21 | + | ||
22 | + @GetMapping("getConfig") | ||
23 | + public ResponseBean getConfig() { | ||
24 | + return ResponseBean.builder().data(systemConfig).build(); | ||
25 | + } | ||
26 | +} |
1 | +package com.anjiplus.template.gaea.business.config; | ||
2 | + | ||
3 | +import lombok.Data; | ||
4 | +import org.springframework.boot.context.properties.ConfigurationProperties; | ||
5 | +import org.springframework.stereotype.Component; | ||
6 | + | ||
7 | +@Component | ||
8 | +@ConfigurationProperties(prefix = "hg.config") | ||
9 | +@Data | ||
10 | +public class SystemConfig { | ||
11 | + | ||
12 | + // AJ服务地址 | ||
13 | + private String serverAddr; | ||
14 | + | ||
15 | + // 监控网关地址 | ||
16 | + private String monitorGateWay; | ||
17 | + | ||
18 | + @Override | ||
19 | + public String toString() { | ||
20 | + return "配置信息: {" + "服务地址 = '" + serverAddr + '\'' + ", 监控网关地址 = '" + monitorGateWay + '\'' + '}'; | ||
21 | + } | ||
22 | +} |
1 | - | ||
2 | package com.anjiplus.template.gaea.business.modules.dashboard.controller; | 1 | package com.anjiplus.template.gaea.business.modules.dashboard.controller; |
3 | 2 | ||
4 | import com.anji.plus.gaea.annotation.Permission; | 3 | import com.anji.plus.gaea.annotation.Permission; |
5 | import com.anji.plus.gaea.annotation.log.GaeaAuditLog; | 4 | import com.anji.plus.gaea.annotation.log.GaeaAuditLog; |
6 | import com.anji.plus.gaea.bean.ResponseBean; | 5 | import com.anji.plus.gaea.bean.ResponseBean; |
7 | -import com.anjiplus.template.gaea.business.modules.dashboard.service.ReportDashboardService; | ||
8 | import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; | 6 | import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; |
9 | import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardObjectDto; | 7 | import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardObjectDto; |
8 | +import com.anjiplus.template.gaea.business.modules.dashboard.service.ReportDashboardService; | ||
10 | import io.swagger.annotations.Api; | 9 | import io.swagger.annotations.Api; |
10 | +import lombok.extern.slf4j.Slf4j; | ||
11 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
12 | import org.springframework.http.ResponseEntity; | 12 | import org.springframework.http.ResponseEntity; |
13 | import org.springframework.web.bind.annotation.*; | 13 | import org.springframework.web.bind.annotation.*; |
@@ -17,11 +17,12 @@ import javax.servlet.http.HttpServletRequest; | @@ -17,11 +17,12 @@ import javax.servlet.http.HttpServletRequest; | ||
17 | import javax.servlet.http.HttpServletResponse; | 17 | import javax.servlet.http.HttpServletResponse; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | -* @desc 大屏设计 controller | ||
21 | -* @website https://gitee.com/anji-plus/gaea | ||
22 | -* @author Raod | ||
23 | -* @date 2021-04-12 14:52:21.761 | ||
24 | -**/ | 20 | + * @author Raod |
21 | + * @desc 大屏设计 controller | ||
22 | + * @website https://gitee.com/anji-plus/gaea | ||
23 | + * @date 2021-04-12 14:52:21.761 | ||
24 | + **/ | ||
25 | +@Slf4j | ||
25 | @RestController | 26 | @RestController |
26 | @Api(tags = "大屏设计管理") | 27 | @Api(tags = "大屏设计管理") |
27 | @Permission(code = "bigScreenManage", name = "大屏报表") | 28 | @Permission(code = "bigScreenManage", name = "大屏报表") |
@@ -33,6 +34,7 @@ public class ReportDashboardController { | @@ -33,6 +34,7 @@ public class ReportDashboardController { | ||
33 | 34 | ||
34 | /** | 35 | /** |
35 | * 预览、查询大屏详情 | 36 | * 预览、查询大屏详情 |
37 | + * | ||
36 | * @param reportCode | 38 | * @param reportCode |
37 | * @return | 39 | * @return |
38 | */ | 40 | */ |
@@ -44,6 +46,7 @@ public class ReportDashboardController { | @@ -44,6 +46,7 @@ public class ReportDashboardController { | ||
44 | 46 | ||
45 | /** | 47 | /** |
46 | * 保存大屏设计 | 48 | * 保存大屏设计 |
49 | + * | ||
47 | * @param dto | 50 | * @param dto |
48 | * @return | 51 | * @return |
49 | */ | 52 | */ |
@@ -58,30 +61,35 @@ public class ReportDashboardController { | @@ -58,30 +61,35 @@ public class ReportDashboardController { | ||
58 | 61 | ||
59 | /** | 62 | /** |
60 | * 获取去单个图层数据 | 63 | * 获取去单个图层数据 |
64 | + * | ||
61 | * @param dto | 65 | * @param dto |
62 | * @return | 66 | * @return |
63 | */ | 67 | */ |
64 | @PostMapping("/getData") | 68 | @PostMapping("/getData") |
65 | @Permission(code = "view", name = "查看大屏") | 69 | @Permission(code = "view", name = "查看大屏") |
66 | public ResponseBean getData(@RequestBody ChartDto dto) { | 70 | public ResponseBean getData(@RequestBody ChartDto dto) { |
71 | + log.info(" ******************************************************* /n******************************************************* /n"); | ||
72 | + log.info("请求参数:{}", dto); | ||
73 | + log.info(" ******************************************************* /n******************************************************* /n"); | ||
67 | return ResponseBean.builder().data(reportDashboardService.getChartData(dto)).build(); | 74 | return ResponseBean.builder().data(reportDashboardService.getChartData(dto)).build(); |
68 | } | 75 | } |
69 | 76 | ||
70 | 77 | ||
71 | /** | 78 | /** |
72 | * 导出大屏 | 79 | * 导出大屏 |
80 | + * | ||
73 | * @param reportCode | 81 | * @param reportCode |
74 | * @return | 82 | * @return |
75 | */ | 83 | */ |
76 | @GetMapping("/export") | 84 | @GetMapping("/export") |
77 | @Permission(code = "export", name = "导出大屏") | 85 | @Permission(code = "export", name = "导出大屏") |
78 | - public ResponseEntity<byte[]> exportDashboard(HttpServletRequest request, HttpServletResponse response, | ||
79 | - @RequestParam("reportCode") String reportCode, @RequestParam(value = "showDataSet",required = false, defaultValue = "1") Integer showDataSet) { | 86 | + public ResponseEntity<byte[]> exportDashboard(HttpServletRequest request, HttpServletResponse response, @RequestParam("reportCode") String reportCode, @RequestParam(value = "showDataSet", required = false, defaultValue = "1") Integer showDataSet) { |
80 | return reportDashboardService.exportDashboard(request, response, reportCode, showDataSet); | 87 | return reportDashboardService.exportDashboard(request, response, reportCode, showDataSet); |
81 | } | 88 | } |
82 | 89 | ||
83 | /** | 90 | /** |
84 | * 导入大屏 | 91 | * 导入大屏 |
92 | + * | ||
85 | * @param file 导入的zip文件 | 93 | * @param file 导入的zip文件 |
86 | * @param reportCode | 94 | * @param reportCode |
87 | * @return | 95 | * @return |
1 | - | ||
2 | package com.anjiplus.template.gaea.business.modules.dashboard.service.impl; | 1 | package com.anjiplus.template.gaea.business.modules.dashboard.service.impl; |
3 | 2 | ||
4 | import com.alibaba.fastjson.JSONObject; | 3 | import com.alibaba.fastjson.JSONObject; |
@@ -101,11 +100,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | @@ -101,11 +100,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | ||
101 | } | 100 | } |
102 | GaeaBeanUtils.copyAndFormatter(reportDashboard, reportDashboardDto); | 101 | GaeaBeanUtils.copyAndFormatter(reportDashboard, reportDashboardDto); |
103 | 102 | ||
104 | - List<ReportDashboardWidget> list = reportDashboardWidgetService.list( | ||
105 | - new QueryWrapper<ReportDashboardWidget>().lambda() | ||
106 | - .eq(ReportDashboardWidget::getReportCode, reportCode) | ||
107 | - .orderByAsc(ReportDashboardWidget::getSort) | ||
108 | - ); | 103 | + List<ReportDashboardWidget> list = reportDashboardWidgetService.list(new QueryWrapper<ReportDashboardWidget>().lambda().eq(ReportDashboardWidget::getReportCode, reportCode).orderByAsc(ReportDashboardWidget::getSort)); |
109 | List<ReportDashboardWidgetDto> reportDashboardWidgetDtoList = new ArrayList<>(); | 104 | List<ReportDashboardWidgetDto> reportDashboardWidgetDtoList = new ArrayList<>(); |
110 | list.forEach(reportDashboardWidget -> { | 105 | list.forEach(reportDashboardWidget -> { |
111 | ReportDashboardWidgetDto reportDashboardWidgetDto = new ReportDashboardWidgetDto(); | 106 | ReportDashboardWidgetDto reportDashboardWidgetDto = new ReportDashboardWidgetDto(); |
@@ -155,8 +150,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | @@ -155,8 +150,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | ||
155 | } | 150 | } |
156 | 151 | ||
157 | //删除reportDashboardWidget | 152 | //删除reportDashboardWidget |
158 | - reportDashboardWidgetService.delete(new QueryWrapper<ReportDashboardWidget>() | ||
159 | - .lambda().eq(ReportDashboardWidget::getReportCode, reportCode)); | 153 | + reportDashboardWidgetService.delete(new QueryWrapper<ReportDashboardWidget>().lambda().eq(ReportDashboardWidget::getReportCode, reportCode)); |
160 | List<ReportDashboardWidgetDto> widgets = dto.getWidgets(); | 154 | List<ReportDashboardWidgetDto> widgets = dto.getWidgets(); |
161 | 155 | ||
162 | // List<ReportDashboardWidget> reportDashboardWidgetList = new ArrayList<>(); | 156 | // List<ReportDashboardWidget> reportDashboardWidgetList = new ArrayList<>(); |
@@ -191,6 +185,9 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | @@ -191,6 +185,9 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | ||
191 | DataSetDto setDto = new DataSetDto(); | 185 | DataSetDto setDto = new DataSetDto(); |
192 | setDto.setSetCode(dto.getSetCode()); | 186 | setDto.setSetCode(dto.getSetCode()); |
193 | setDto.setContextData(dto.getContextData()); | 187 | setDto.setContextData(dto.getContextData()); |
188 | + | ||
189 | + log.info("请求数据参数:{}", setDto); | ||
190 | + | ||
194 | OriginalDataDto result = dataSetService.getData(setDto); | 191 | OriginalDataDto result = dataSetService.getData(setDto); |
195 | List<JSONObject> data = result.getData(); | 192 | List<JSONObject> data = result.getData(); |
196 | //处理时间轴 | 193 | //处理时间轴 |
@@ -224,9 +221,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | @@ -224,9 +221,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | ||
224 | //将涉及到的图片保存下来(1.背景图,2.组件为图片的) | 221 | //将涉及到的图片保存下来(1.背景图,2.组件为图片的) |
225 | String backgroundImage = detail.getDashboard().getBackgroundImage(); | 222 | String backgroundImage = detail.getDashboard().getBackgroundImage(); |
226 | zipLoadImage(backgroundImage, path); | 223 | zipLoadImage(backgroundImage, path); |
227 | - detail.getWidgets().stream() | ||
228 | - .filter(reportDashboardWidgetDto -> "widget-image".equals(reportDashboardWidgetDto.getType())) | ||
229 | - .forEach(reportDashboardWidgetDto -> { | 224 | + detail.getWidgets().stream().filter(reportDashboardWidgetDto -> "widget-image".equals(reportDashboardWidgetDto.getType())).forEach(reportDashboardWidgetDto -> { |
230 | String imageAddress = reportDashboardWidgetDto.getValue().getSetup().getString("imageAdress"); | 225 | String imageAddress = reportDashboardWidgetDto.getValue().getSetup().getString("imageAdress"); |
231 | zipLoadImage(imageAddress, path); | 226 | zipLoadImage(imageAddress, path); |
232 | }); | 227 | }); |
@@ -332,9 +327,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | @@ -332,9 +327,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | ||
332 | //将涉及到的图片路径替换(1.背景图,2.组件为图片的) | 327 | //将涉及到的图片路径替换(1.背景图,2.组件为图片的) |
333 | String backgroundImage = detail.getDashboard().getBackgroundImage(); | 328 | String backgroundImage = detail.getDashboard().getBackgroundImage(); |
334 | detail.getDashboard().setBackgroundImage(replaceUrl(backgroundImage, fileMap)); | 329 | detail.getDashboard().setBackgroundImage(replaceUrl(backgroundImage, fileMap)); |
335 | - detail.getWidgets().stream() | ||
336 | - .filter(reportDashboardWidgetDto -> "widget-image".equals(reportDashboardWidgetDto.getType())) | ||
337 | - .forEach(reportDashboardWidgetDto -> { | 330 | + detail.getWidgets().stream().filter(reportDashboardWidgetDto -> "widget-image".equals(reportDashboardWidgetDto.getType())).forEach(reportDashboardWidgetDto -> { |
338 | String imageAddress = reportDashboardWidgetDto.getValue().getSetup().getString("imageAdress"); | 331 | String imageAddress = reportDashboardWidgetDto.getValue().getSetup().getString("imageAdress"); |
339 | String address = replaceUrl(imageAddress, fileMap); | 332 | String address = replaceUrl(imageAddress, fileMap); |
340 | reportDashboardWidgetDto.getValue().getSetup().put("imageAdress", address); | 333 | reportDashboardWidgetDto.getValue().getSetup().put("imageAdress", address); |
@@ -365,6 +358,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | @@ -365,6 +358,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi | ||
365 | 358 | ||
366 | /** | 359 | /** |
367 | * 将大屏涉及到的图片存入指定文件夹 | 360 | * 将大屏涉及到的图片存入指定文件夹 |
361 | + * | ||
368 | * @param imageAddress | 362 | * @param imageAddress |
369 | * @param path | 363 | * @param path |
370 | */ | 364 | */ |
1 | - | ||
2 | package com.anjiplus.template.gaea.business.modules.dataset.service.impl; | 1 | package com.anjiplus.template.gaea.business.modules.dataset.service.impl; |
3 | 2 | ||
4 | import cn.hutool.json.JSONUtil; | 3 | import cn.hutool.json.JSONUtil; |
@@ -42,8 +41,8 @@ import java.util.Map; | @@ -42,8 +41,8 @@ import java.util.Map; | ||
42 | import java.util.stream.Collectors; | 41 | import java.util.stream.Collectors; |
43 | 42 | ||
44 | /** | 43 | /** |
45 | - * @desc DataSet 数据集服务实现 | ||
46 | * @author Raod | 44 | * @author Raod |
45 | + * @desc DataSet 数据集服务实现 | ||
47 | * @date 2021-03-18 12:11:31.150755900 | 46 | * @date 2021-03-18 12:11:31.150755900 |
48 | **/ | 47 | **/ |
49 | @Service | 48 | @Service |
@@ -99,11 +98,7 @@ public class DataSetServiceImpl implements DataSetService { | @@ -99,11 +98,7 @@ public class DataSetServiceImpl implements DataSetService { | ||
99 | 98 | ||
100 | public DataSetDto getDetailSet(DataSetDto dto, String setCode) { | 99 | public DataSetDto getDetailSet(DataSetDto dto, String setCode) { |
101 | //查询参数 | 100 | //查询参数 |
102 | - List<DataSetParam> dataSetParamList = dataSetParamService.list( | ||
103 | - new QueryWrapper<DataSetParam>() | ||
104 | - .lambda() | ||
105 | - .eq(DataSetParam::getSetCode, setCode) | ||
106 | - ); | 101 | + List<DataSetParam> dataSetParamList = dataSetParamService.list(new QueryWrapper<DataSetParam>().lambda().eq(DataSetParam::getSetCode, setCode)); |
107 | List<DataSetParamDto> dataSetParamDtoList = new ArrayList<>(); | 102 | List<DataSetParamDto> dataSetParamDtoList = new ArrayList<>(); |
108 | dataSetParamList.forEach(dataSetParam -> { | 103 | dataSetParamList.forEach(dataSetParam -> { |
109 | DataSetParamDto dataSetParamDto = new DataSetParamDto(); | 104 | DataSetParamDto dataSetParamDto = new DataSetParamDto(); |
@@ -114,12 +109,7 @@ public class DataSetServiceImpl implements DataSetService { | @@ -114,12 +109,7 @@ public class DataSetServiceImpl implements DataSetService { | ||
114 | 109 | ||
115 | //数据转换 | 110 | //数据转换 |
116 | 111 | ||
117 | - List<DataSetTransform> dataSetTransformList = dataSetTransformService.list( | ||
118 | - new QueryWrapper<DataSetTransform>() | ||
119 | - .lambda() | ||
120 | - .eq(DataSetTransform::getSetCode, setCode) | ||
121 | - .orderByAsc(DataSetTransform::getOrderNum) | ||
122 | - ); | 112 | + List<DataSetTransform> dataSetTransformList = dataSetTransformService.list(new QueryWrapper<DataSetTransform>().lambda().eq(DataSetTransform::getSetCode, setCode).orderByAsc(DataSetTransform::getOrderNum)); |
123 | List<DataSetTransformDto> dataSetTransformDtoList = new ArrayList<>(); | 113 | List<DataSetTransformDto> dataSetTransformDtoList = new ArrayList<>(); |
124 | dataSetTransformList.forEach(dataSetTransform -> { | 114 | dataSetTransformList.forEach(dataSetTransform -> { |
125 | DataSetTransformDto dataSetTransformDto = new DataSetTransformDto(); | 115 | DataSetTransformDto dataSetTransformDto = new DataSetTransformDto(); |
@@ -134,11 +124,11 @@ public class DataSetServiceImpl implements DataSetService { | @@ -134,11 +124,11 @@ public class DataSetServiceImpl implements DataSetService { | ||
134 | boolean isObj = JSONUtil.isJsonObj(caseResult); | 124 | boolean isObj = JSONUtil.isJsonObj(caseResult); |
135 | JSONArray jsonArray = null; | 125 | JSONArray jsonArray = null; |
136 | JSONObject jsonObject = null; | 126 | JSONObject jsonObject = null; |
137 | - if(isObj){ | 127 | + if (isObj) { |
138 | JSONObject result = JSONObject.parseObject(caseResult); | 128 | JSONObject result = JSONObject.parseObject(caseResult); |
139 | Object data = result.get("data"); | 129 | Object data = result.get("data"); |
140 | if (data instanceof JSONObject) { | 130 | if (data instanceof JSONObject) { |
141 | - jsonObject = (JSONObject)data; | 131 | + jsonObject = (JSONObject) data; |
142 | } else { | 132 | } else { |
143 | jsonArray = jsonObject.getJSONArray("data"); | 133 | jsonArray = jsonObject.getJSONArray("data"); |
144 | jsonObject = jsonArray.getJSONObject(0); | 134 | jsonObject = jsonArray.getJSONObject(0); |
@@ -149,7 +139,7 @@ public class DataSetServiceImpl implements DataSetService { | @@ -149,7 +139,7 @@ public class DataSetServiceImpl implements DataSetService { | ||
149 | } | 139 | } |
150 | dto.setSetParamList(jsonObject.keySet()); | 140 | dto.setSetParamList(jsonObject.keySet()); |
151 | } catch (Exception e) { | 141 | } catch (Exception e) { |
152 | - log.error("error",e); | 142 | + log.error("error", e); |
153 | } | 143 | } |
154 | } | 144 | } |
155 | return dto; | 145 | return dto; |
@@ -215,18 +205,10 @@ public class DataSetServiceImpl implements DataSetService { | @@ -215,18 +205,10 @@ public class DataSetServiceImpl implements DataSetService { | ||
215 | deleteById(id); | 205 | deleteById(id); |
216 | 206 | ||
217 | //2.删除查询参数 | 207 | //2.删除查询参数 |
218 | - dataSetParamService.delete( | ||
219 | - new QueryWrapper<DataSetParam>() | ||
220 | - .lambda() | ||
221 | - .eq(DataSetParam::getSetCode, setCode) | ||
222 | - ); | 208 | + dataSetParamService.delete(new QueryWrapper<DataSetParam>().lambda().eq(DataSetParam::getSetCode, setCode)); |
223 | 209 | ||
224 | //3.删除数据转换 | 210 | //3.删除数据转换 |
225 | - dataSetTransformService.delete( | ||
226 | - new QueryWrapper<DataSetTransform>() | ||
227 | - .lambda() | ||
228 | - .eq(DataSetTransform::getSetCode, setCode) | ||
229 | - ); | 211 | + dataSetTransformService.delete(new QueryWrapper<DataSetTransform>().lambda().eq(DataSetTransform::getSetCode, setCode)); |
230 | } | 212 | } |
231 | 213 | ||
232 | /** | 214 | /** |
@@ -242,44 +224,58 @@ public class DataSetServiceImpl implements DataSetService { | @@ -242,44 +224,58 @@ public class DataSetServiceImpl implements DataSetService { | ||
242 | String setCode = dto.getSetCode(); | 224 | String setCode = dto.getSetCode(); |
243 | //1.获取数据集、参数替换、数据转换 | 225 | //1.获取数据集、参数替换、数据转换 |
244 | DataSetDto dataSetDto = detailSet(setCode); | 226 | DataSetDto dataSetDto = detailSet(setCode); |
227 | + log.info("数据集详情:{}", dataSetDto); | ||
245 | String dynSentence = dataSetDto.getDynSentence(); | 228 | String dynSentence = dataSetDto.getDynSentence(); |
246 | //2.获取数据源 | 229 | //2.获取数据源 |
247 | DataSource dataSource; | 230 | DataSource dataSource; |
248 | - if (StringUtils.isNotBlank(dataSetDto.getSetType()) | ||
249 | - && dataSetDto.getSetType().equals(SetTypeEnum.HTTP.getCodeValue())) { | 231 | + |
232 | + if (StringUtils.isNotBlank(dataSetDto.getSetType()) && dataSetDto.getSetType().equals(SetTypeEnum.HTTP.getCodeValue())) { | ||
250 | //http不需要数据源,兼容已有的逻辑,将http所需要的数据塞进DataSource | 233 | //http不需要数据源,兼容已有的逻辑,将http所需要的数据塞进DataSource |
251 | dataSource = new DataSource(); | 234 | dataSource = new DataSource(); |
252 | dataSource.setSourceConfig(dynSentence); | 235 | dataSource.setSourceConfig(dynSentence); |
253 | dataSource.setSourceType(JdbcConstants.HTTP); | 236 | dataSource.setSourceType(JdbcConstants.HTTP); |
254 | - String body = JSONObject.parseObject(dynSentence).getString("body"); | 237 | + JSONObject jsonObject = JSONObject.parseObject(dynSentence); |
238 | + String body = jsonObject.getString("body"); | ||
255 | if (StringUtils.isNotBlank(body)) { | 239 | if (StringUtils.isNotBlank(body)) { |
240 | + // 替换动态参数,body中的内容与传入的参数比较,有相同的key则替换 | ||
241 | + Map<String, Object> contextData = dto.getContextData(); | ||
242 | + if (contextData != null && !contextData.isEmpty()) { | ||
243 | + JSONObject bodyObj = jsonObject.getJSONObject("body"); | ||
244 | + bodyObj.forEach((k, v) -> { | ||
245 | + Object o = contextData.get(k); | ||
246 | + if (o != null) { | ||
247 | + bodyObj.put(k, o); | ||
248 | + } | ||
249 | + }); | ||
250 | + dynSentence = bodyObj.toJSONString(); | ||
251 | + } else{ | ||
256 | dynSentence = body; | 252 | dynSentence = body; |
257 | - }else { | 253 | + } |
254 | + } else { | ||
258 | dynSentence = "{}"; | 255 | dynSentence = "{}"; |
259 | } | 256 | } |
260 | - | ||
261 | - }else { | 257 | + } else { |
262 | dataSource = dataSourceService.selectOne("source_code", dataSetDto.getSourceCode()); | 258 | dataSource = dataSourceService.selectOne("source_code", dataSetDto.getSourceCode()); |
263 | } | 259 | } |
264 | 260 | ||
261 | + log.info("数据源详情:{}", dataSource); | ||
262 | + | ||
265 | //3.参数替换 | 263 | //3.参数替换 |
266 | //3.1参数校验 | 264 | //3.1参数校验 |
267 | - log.debug("参数校验替换前:{}", dto.getContextData()); | 265 | +// log.info("参数校验替换前:{}", dto.getContextData()); |
268 | boolean verification = dataSetParamService.verification(dataSetDto.getDataSetParamDtoList(), dto.getContextData()); | 266 | boolean verification = dataSetParamService.verification(dataSetDto.getDataSetParamDtoList(), dto.getContextData()); |
269 | if (!verification) { | 267 | if (!verification) { |
270 | throw BusinessExceptionBuilder.build(ResponseCode.RULE_FIELDS_CHECK_ERROR); | 268 | throw BusinessExceptionBuilder.build(ResponseCode.RULE_FIELDS_CHECK_ERROR); |
271 | } | 269 | } |
272 | dynSentence = dataSetParamService.transform(dto.getContextData(), dynSentence); | 270 | dynSentence = dataSetParamService.transform(dto.getContextData(), dynSentence); |
273 | - log.debug("参数校验替换后:{}", dto.getContextData()); | 271 | +// log.info("参数校验替换后:{}", dynSentence); |
274 | //4.获取数据 | 272 | //4.获取数据 |
275 | DataSourceDto dataSourceDto = new DataSourceDto(); | 273 | DataSourceDto dataSourceDto = new DataSourceDto(); |
276 | BeanUtils.copyProperties(dataSource, dataSourceDto); | 274 | BeanUtils.copyProperties(dataSource, dataSourceDto); |
277 | dataSourceDto.setDynSentence(dynSentence); | 275 | dataSourceDto.setDynSentence(dynSentence); |
278 | dataSourceDto.setContextData(dto.getContextData()); | 276 | dataSourceDto.setContextData(dto.getContextData()); |
279 | //获取total,判断contextData中是否传入分页参数 | 277 | //获取total,判断contextData中是否传入分页参数 |
280 | - if (null != dto.getContextData() | ||
281 | - && dto.getContextData().containsKey("pageNumber") | ||
282 | - && dto.getContextData().containsKey("pageSize")) { | 278 | + if (null != dto.getContextData() && dto.getContextData().containsKey("pageNumber") && dto.getContextData().containsKey("pageSize")) { |
283 | long total = dataSourceService.total(dataSourceDto, dto); | 279 | long total = dataSourceService.total(dataSourceDto, dto); |
284 | originalDataDto.setTotal(total); | 280 | originalDataDto.setTotal(total); |
285 | } | 281 | } |
@@ -310,11 +306,11 @@ public class DataSetServiceImpl implements DataSetService { | @@ -310,11 +306,11 @@ public class DataSetServiceImpl implements DataSetService { | ||
310 | String body = JSONObject.parseObject(dynSentence).getString("body"); | 306 | String body = JSONObject.parseObject(dynSentence).getString("body"); |
311 | if (StringUtils.isNotBlank(body)) { | 307 | if (StringUtils.isNotBlank(body)) { |
312 | dynSentence = body; | 308 | dynSentence = body; |
313 | - }else { | 309 | + } else { |
314 | dynSentence = "{}"; | 310 | dynSentence = "{}"; |
315 | } | 311 | } |
316 | 312 | ||
317 | - }else { | 313 | + } else { |
318 | dataSource = dataSourceService.selectOne("source_code", sourceCode); | 314 | dataSource = dataSourceService.selectOne("source_code", sourceCode); |
319 | } | 315 | } |
320 | 316 | ||
@@ -356,18 +352,13 @@ public class DataSetServiceImpl implements DataSetService { | @@ -356,18 +352,13 @@ public class DataSetServiceImpl implements DataSetService { | ||
356 | @Override | 352 | @Override |
357 | public List<DataSet> queryAllDataSet() { | 353 | public List<DataSet> queryAllDataSet() { |
358 | LambdaQueryWrapper<DataSet> wrapper = Wrappers.lambdaQuery(); | 354 | LambdaQueryWrapper<DataSet> wrapper = Wrappers.lambdaQuery(); |
359 | - wrapper.select(DataSet::getSetCode, DataSet::getSetName, DataSet::getSetDesc, DataSet::getId) | ||
360 | - .eq(DataSet::getEnableFlag, Enabled.YES.getValue()); | 355 | + wrapper.select(DataSet::getSetCode, DataSet::getSetName, DataSet::getSetDesc, DataSet::getId).eq(DataSet::getEnableFlag, Enabled.YES.getValue()); |
361 | wrapper.orderByDesc(DataSet::getUpdateTime); | 356 | wrapper.orderByDesc(DataSet::getUpdateTime); |
362 | return dataSetMapper.selectList(wrapper); | 357 | return dataSetMapper.selectList(wrapper); |
363 | } | 358 | } |
364 | 359 | ||
365 | - public void dataSetParamBatch(List<DataSetParamDto> dataSetParamDtoList,String setCode){ | ||
366 | - dataSetParamService.delete( | ||
367 | - new QueryWrapper<DataSetParam>() | ||
368 | - .lambda() | ||
369 | - .eq(DataSetParam::getSetCode, setCode) | ||
370 | - ); | 360 | + public void dataSetParamBatch(List<DataSetParamDto> dataSetParamDtoList, String setCode) { |
361 | + dataSetParamService.delete(new QueryWrapper<DataSetParam>().lambda().eq(DataSetParam::getSetCode, setCode)); | ||
371 | if (null == dataSetParamDtoList || dataSetParamDtoList.size() <= 0) { | 362 | if (null == dataSetParamDtoList || dataSetParamDtoList.size() <= 0) { |
372 | return; | 363 | return; |
373 | } | 364 | } |
@@ -384,12 +375,8 @@ public class DataSetServiceImpl implements DataSetService { | @@ -384,12 +375,8 @@ public class DataSetServiceImpl implements DataSetService { | ||
384 | 375 | ||
385 | } | 376 | } |
386 | 377 | ||
387 | - public void dataSetTransformBatch(List<DataSetTransformDto> dataSetTransformDtoList,String setCode){ | ||
388 | - dataSetTransformService.delete( | ||
389 | - new QueryWrapper<DataSetTransform>() | ||
390 | - .lambda() | ||
391 | - .eq(DataSetTransform::getSetCode, setCode) | ||
392 | - ); | 378 | + public void dataSetTransformBatch(List<DataSetTransformDto> dataSetTransformDtoList, String setCode) { |
379 | + dataSetTransformService.delete(new QueryWrapper<DataSetTransform>().lambda().eq(DataSetTransform::getSetCode, setCode)); | ||
393 | if (null == dataSetTransformDtoList || dataSetTransformDtoList.size() <= 0) { | 380 | if (null == dataSetTransformDtoList || dataSetTransformDtoList.size() <= 0) { |
394 | return; | 381 | return; |
395 | } | 382 | } |
@@ -408,10 +395,11 @@ public class DataSetServiceImpl implements DataSetService { | @@ -408,10 +395,11 @@ public class DataSetServiceImpl implements DataSetService { | ||
408 | 395 | ||
409 | /** | 396 | /** |
410 | * dataSetParamDtoList转map | 397 | * dataSetParamDtoList转map |
398 | + * | ||
411 | * @param dataSetParamDtoList | 399 | * @param dataSetParamDtoList |
412 | * @return | 400 | * @return |
413 | */ | 401 | */ |
414 | - public Map<String, Object> setContextData(List<DataSetParamDto> dataSetParamDtoList){ | 402 | + public Map<String, Object> setContextData(List<DataSetParamDto> dataSetParamDtoList) { |
415 | Map<String, Object> map = new HashMap<>(); | 403 | Map<String, Object> map = new HashMap<>(); |
416 | if (null != dataSetParamDtoList && dataSetParamDtoList.size() > 0) { | 404 | if (null != dataSetParamDtoList && dataSetParamDtoList.size() > 0) { |
417 | dataSetParamDtoList.forEach(dataSetParamDto -> map.put(dataSetParamDto.getParamName(), dataSetParamDto.getSampleItem())); | 405 | dataSetParamDtoList.forEach(dataSetParamDto -> map.put(dataSetParamDto.getParamName(), dataSetParamDto.getSampleItem())); |
@@ -323,6 +323,7 @@ public class DataSourceServiceImpl implements DataSourceService { | @@ -323,6 +323,7 @@ public class DataSourceServiceImpl implements DataSourceService { | ||
323 | ResponseEntity<Object> exchange; | 323 | ResponseEntity<Object> exchange; |
324 | List<JSONObject> result = new ArrayList<>(); | 324 | List<JSONObject> result = new ArrayList<>(); |
325 | try { | 325 | try { |
326 | + log.info("== 发送请求:\n\t\t apiUrl:{}\n\t\t httpMethod:{}\n\t\t entity:{}\n\t\t ",apiUrl, httpMethod, dto.getDynSentence()); | ||
326 | exchange = restTemplate.exchange(apiUrl, httpMethod, entity, Object.class); | 327 | exchange = restTemplate.exchange(apiUrl, httpMethod, entity, Object.class); |
327 | } catch (HttpClientErrorException error) { | 328 | } catch (HttpClientErrorException error) { |
328 | int rawStatusCode = error.getRawStatusCode(); | 329 | int rawStatusCode = error.getRawStatusCode(); |
1 | package com.anjiplus.template.gaea.business.runner; | 1 | package com.anjiplus.template.gaea.business.runner; |
2 | 2 | ||
3 | +import com.anjiplus.template.gaea.business.config.SystemConfig; | ||
3 | import com.anjiplus.template.gaea.business.modules.accessauthority.service.AccessAuthorityService; | 4 | import com.anjiplus.template.gaea.business.modules.accessauthority.service.AccessAuthorityService; |
4 | import com.anjiplus.template.gaea.business.modules.dict.service.GaeaDictService; | 5 | import com.anjiplus.template.gaea.business.modules.dict.service.GaeaDictService; |
6 | +import lombok.extern.slf4j.Slf4j; | ||
5 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
6 | import org.springframework.boot.ApplicationArguments; | 8 | import org.springframework.boot.ApplicationArguments; |
7 | import org.springframework.boot.ApplicationRunner; | 9 | import org.springframework.boot.ApplicationRunner; |
@@ -11,6 +13,7 @@ import org.springframework.boot.ApplicationRunner; | @@ -11,6 +13,7 @@ import org.springframework.boot.ApplicationRunner; | ||
11 | * @author WongBin <abc13579d@163.com> | 13 | * @author WongBin <abc13579d@163.com> |
12 | * @date 2019-02-17 08:50:10.009 | 14 | * @date 2019-02-17 08:50:10.009 |
13 | **/ | 15 | **/ |
16 | +@Slf4j | ||
14 | public class ApplicationInitRunner implements ApplicationRunner { | 17 | public class ApplicationInitRunner implements ApplicationRunner { |
15 | 18 | ||
16 | @Autowired | 19 | @Autowired |
@@ -19,6 +22,9 @@ public class ApplicationInitRunner implements ApplicationRunner { | @@ -19,6 +22,9 @@ public class ApplicationInitRunner implements ApplicationRunner { | ||
19 | @Autowired | 22 | @Autowired |
20 | private AccessAuthorityService accessAuthorityService; | 23 | private AccessAuthorityService accessAuthorityService; |
21 | 24 | ||
25 | + @Autowired | ||
26 | + private SystemConfig systemConfig; | ||
27 | + | ||
22 | @Override | 28 | @Override |
23 | public void run(ApplicationArguments args) throws Exception { | 29 | public void run(ApplicationArguments args) throws Exception { |
24 | 30 | ||
@@ -27,5 +33,9 @@ public class ApplicationInitRunner implements ApplicationRunner { | @@ -27,5 +33,9 @@ public class ApplicationInitRunner implements ApplicationRunner { | ||
27 | 33 | ||
28 | //2. 建立url权限拦截体系 | 34 | //2. 建立url权限拦截体系 |
29 | accessAuthorityService.scanGaeaSecurityAuthorities(); | 35 | accessAuthorityService.scanGaeaSecurityAuthorities(); |
36 | + | ||
37 | + // 打印配置信息: | ||
38 | + log.info(systemConfig.toString()); | ||
39 | + | ||
30 | } | 40 | } |
31 | } | 41 | } |
@@ -9,3 +9,7 @@ customer: | @@ -9,3 +9,7 @@ customer: | ||
9 | file: | 9 | file: |
10 | dist-path: D:\Workspace\AJ-Report\report-core\upload | 10 | dist-path: D:\Workspace\AJ-Report\report-core\upload |
11 | downloadPath: http://127.0.0.1:9095/file/download | 11 | downloadPath: http://127.0.0.1:9095/file/download |
12 | +hg: | ||
13 | + config: | ||
14 | + server-addr: http://127.0.0.1:9095 | ||
15 | + monitor-gate-way: http://192.168.0.75:8080 |
@@ -75,7 +75,7 @@ customer: | @@ -75,7 +75,7 @@ customer: | ||
75 | downloadPath: http://127.0.0.1:9095/file/download | 75 | downloadPath: http://127.0.0.1:9095/file/download |
76 | 76 | ||
77 | # 跳过token验证和权限验证的url清单 | 77 | # 跳过token验证和权限验证的url清单 |
78 | - skip-authenticate-urls: /gaeaDict/all, /login, /static, /file/download/, /index.html, /favicon.ico, /reportShare/detailByCode | 78 | + skip-authenticate-urls: /gaeaDict/all, /login, /static, /file/download/, /index.html, /favicon.ico, /reportShare/detailByCode,/getConfig |
79 | user: | 79 | user: |
80 | ##新增用户默认密码 | 80 | ##新增用户默认密码 |
81 | default: | 81 | default: |
report-ui/config/dev.env.gz.js
0 → 100644
1 | +'use strict' | ||
2 | +const merge = require('webpack-merge') | ||
3 | +const prodEnv = require('./prod.env') | ||
4 | + | ||
5 | +module.exports = merge(prodEnv, { | ||
6 | + NODE_ENV: '"gz"', | ||
7 | + BASE_API: '"http://89.12.88.128:9095"', | ||
8 | + MONITOR_GATEWAY: '"http://89.12.88.128:8080"' | ||
9 | + // BASE_API: '"http://192.168.1.50:9095"', | ||
10 | + // MONITOR_GATEWAY: '"http://192.168.1.50:8080"' | ||
11 | + | ||
12 | +}) |
@@ -4,10 +4,15 @@ const prodEnv = require('./prod.env') | @@ -4,10 +4,15 @@ const prodEnv = require('./prod.env') | ||
4 | 4 | ||
5 | module.exports = merge(prodEnv, { | 5 | module.exports = merge(prodEnv, { |
6 | NODE_ENV: '"development"', | 6 | NODE_ENV: '"development"', |
7 | - BASE_API: '"http://192.168.0.59:9095"', | ||
8 | - MONITOR_GATEWAY: '"http://192.168.0.59:8080"' | ||
9 | - /* BASE_API: '"http://192.168.0.75:9095"', | 7 | + BASE_API: '"https://69.12.93.116:8089"', |
8 | + MONITOR_GATEWAY: '"https://69.12.93.116:8080"' | ||
9 | + // BASE_API: '"http://127.0.0.1:8089"', | ||
10 | + // MONITOR_GATEWAY: '"http://127.0.0.1:8080"' | ||
11 | + | ||
12 | + /*BASE_API: '"http://192.168.0.75:9095"', | ||
10 | MONITOR_GATEWAY: '"http://192.168.0.75:8080"'*/ | 13 | MONITOR_GATEWAY: '"http://192.168.0.75:8080"'*/ |
14 | + /* BASE_API: '"https://192.168.0.248:8089"', | ||
15 | + MONITOR_GATEWAY: '"https://192.168.0.248:8080"'*/ | ||
11 | /*BASE_API: '"http://192.168.1.52:8089"', | 16 | /*BASE_API: '"http://192.168.1.52:8089"', |
12 | MONITOR_GATEWAY: '"http://192.168.1.52:8080"'*/ | 17 | MONITOR_GATEWAY: '"http://192.168.1.52:8080"'*/ |
13 | 18 |
report-ui/config/dev.env1.51.js
0 → 100644
1 | +'use strict' | ||
2 | +const merge = require('webpack-merge') | ||
3 | +const prodEnv = require('./prod.env') | ||
4 | + | ||
5 | +module.exports = merge(prodEnv, { | ||
6 | + NODE_ENV: '"dev151"', | ||
7 | + BASE_API: '"http://192.168.0.75:9095"', | ||
8 | + MONITOR_GATEWAY: '"http://192.168.0.75:8080"' | ||
9 | + // BASE_API: '"http://192.168.1.50:9095"', | ||
10 | + // MONITOR_GATEWAY: '"http://192.168.1.50:8080"' | ||
11 | + | ||
12 | +}) |
report-ui/config/dev50.env.js
0 → 100644
@@ -4,5 +4,6 @@ const prodEnv = require('./prod.env') | @@ -4,5 +4,6 @@ const prodEnv = require('./prod.env') | ||
4 | 4 | ||
5 | module.exports = merge(prodEnv, { | 5 | module.exports = merge(prodEnv, { |
6 | NODE_ENV: '"testing"', | 6 | NODE_ENV: '"testing"', |
7 | - BASE_API: '"./"' | 7 | + BASE_API: '"./"', |
8 | + MONITOR_GATEWAY: '"./"' | ||
8 | }) | 9 | }) |
@@ -8,6 +8,9 @@ | @@ -8,6 +8,9 @@ | ||
8 | "start": "npm run dev", | 8 | "start": "npm run dev", |
9 | "build": "cross-env NODE_ENV=production node build/build.js", | 9 | "build": "cross-env NODE_ENV=production node build/build.js", |
10 | "build:dev": "cross-env NODE_ENV=development node build/build.js", | 10 | "build:dev": "cross-env NODE_ENV=development node build/build.js", |
11 | + "build:dev50": "cross-env NODE_ENV=dev50 node build/build.js", | ||
12 | + "build:dev151": "cross-env NODE_ENV=dev151 node build/build.js", | ||
13 | + "build:devgz": "cross-env NODE_ENV=gz node build/build.js", | ||
11 | "build:test": "cross-env NODE_ENV=testing node build/build.js", | 14 | "build:test": "cross-env NODE_ENV=testing node build/build.js", |
12 | "build:prod": "cross-env NODE_ENV=production node build/build.js" | 15 | "build:prod": "cross-env NODE_ENV=production node build/build.js" |
13 | }, | 16 | }, |
@@ -101,3 +101,15 @@ input:-webkit-autofill { | @@ -101,3 +101,15 @@ input:-webkit-autofill { | ||
101 | -webkit-line-clamp: 1; | 101 | -webkit-line-clamp: 1; |
102 | -webkit-box-orient: vertical; | 102 | -webkit-box-orient: vertical; |
103 | } | 103 | } |
104 | +.tree-div .el-tree-node.is-current>.el-tree-node__content{ | ||
105 | + color:#fff; | ||
106 | + background-color: #1e9fff; | ||
107 | +} | ||
108 | +.tree-div .el-tree-node__content:hover{ | ||
109 | + color:#fff; | ||
110 | + background-color: #1e9fff; | ||
111 | +} | ||
112 | +.el-tabs__item.is-active{ | ||
113 | + background-color: #1e9fff; | ||
114 | + color: #ffffff; | ||
115 | +} |
@@ -23,6 +23,11 @@ import 'echarts/lib/component/tooltip' | @@ -23,6 +23,11 @@ import 'echarts/lib/component/tooltip' | ||
23 | // import 'echarts-gl' | 23 | // import 'echarts-gl' |
24 | Vue.component('v-chart', ECharts) | 24 | Vue.component('v-chart', ECharts) |
25 | 25 | ||
26 | + | ||
27 | +import echartsbd from 'echarts'; | ||
28 | +Vue.prototype.$echarts=echartsbd; | ||
29 | +Vue.use(echartsbd) | ||
30 | + | ||
26 | // anji component | 31 | // anji component |
27 | import anjiCrud from '@/components/AnjiPlus/anji-crud/anji-crud' | 32 | import anjiCrud from '@/components/AnjiPlus/anji-crud/anji-crud' |
28 | import anjiSelect from '@/components/AnjiPlus/anji-select' | 33 | import anjiSelect from '@/components/AnjiPlus/anji-select' |
@@ -49,15 +49,16 @@ export default { | @@ -49,15 +49,16 @@ export default { | ||
49 | } | 49 | } |
50 | return '' | 50 | return '' |
51 | }, | 51 | }, |
52 | - isBlank (val) { | ||
53 | - if (typeof val === 'undefined') { | ||
54 | - return true | ||
55 | - } | ||
56 | - if (val == null || val === '') { | ||
57 | - return true | ||
58 | - } | ||
59 | - return false | ||
60 | - }, | 52 | + // 重复方法 |
53 | + // isBlank (val) { | ||
54 | + // if (typeof val === 'undefined') { | ||
55 | + // return true | ||
56 | + // } | ||
57 | + // if (val == null || val === '') { | ||
58 | + // return true | ||
59 | + // } | ||
60 | + // return false | ||
61 | + // }, | ||
61 | // 封装定制删除数组中的值 | 62 | // 封装定制删除数组中的值 |
62 | contains (a, obj) { | 63 | contains (a, obj) { |
63 | var i = a.length | 64 | var i = a.length |
report-ui/src/mixins/commonWeight.js
0 → 100644
1 | +import {mapGetters} from "vuex" | ||
2 | + | ||
3 | +export default { | ||
4 | + data() { | ||
5 | + return { | ||
6 | + options: {}, | ||
7 | + optionsSetUp: {}, | ||
8 | + optionsPosition: {}, | ||
9 | + optionsData: {}, | ||
10 | + id: (new Date()).getTime(), | ||
11 | + customState: {}, | ||
12 | + // value 历史变更内容,页面加载发送多次重复提交信息 | ||
13 | + valueChangeArr:[] | ||
14 | + } | ||
15 | + }, | ||
16 | + props: { | ||
17 | + config: Object, | ||
18 | + value: Object, | ||
19 | + ispreview: Boolean | ||
20 | + }, | ||
21 | + watch: { | ||
22 | + /** | ||
23 | + * 监听组件参数 | ||
24 | + */ | ||
25 | + value: { | ||
26 | + handler(val) { | ||
27 | + let that = this; | ||
28 | + if(that.valueChangeArr.indexOf(val) != -1){ | ||
29 | + return; | ||
30 | + } | ||
31 | + that.options = val; | ||
32 | + that.optionsSetUp = val.setup; | ||
33 | + that.optionsPosition = val.position; | ||
34 | + that.valueChangeArr.push(val); | ||
35 | + that.reloadPage(); | ||
36 | + }, | ||
37 | + deep: true | ||
38 | + }, | ||
39 | + | ||
40 | + /** | ||
41 | + * 监听组件状态数据 | ||
42 | + */ | ||
43 | + getLastUpdateEvent: { | ||
44 | + handler(val) { | ||
45 | + if(!val){ | ||
46 | + return; | ||
47 | + } | ||
48 | + let that = this; | ||
49 | + let key = val.split('###')[0]; | ||
50 | + let obj = that.getCustomState[key]; | ||
51 | + let eventIds = that.subEvent(); | ||
52 | + if(eventIds && typeof [] === 'object' && eventIds.length > 0){ | ||
53 | + if(eventIds.indexOf(key) != -1){ | ||
54 | + that.getCustomEventData(key,obj); | ||
55 | + } | ||
56 | + } | ||
57 | + }, | ||
58 | + deep: true | ||
59 | + } | ||
60 | + }, | ||
61 | + mounted() { | ||
62 | + let that = this; | ||
63 | + that.options = that.value; | ||
64 | + that.optionsSetUp = that.value.setup; | ||
65 | + that.optionsPosition = that.value.position; | ||
66 | + // 挂在完 执行页面初始化函数 | ||
67 | + that.pageInit(); | ||
68 | + }, | ||
69 | + computed: { | ||
70 | + ...mapGetters(['getCustomState','getLastUpdateEventId']), | ||
71 | + | ||
72 | + /** | ||
73 | + * 最后更新的事件id | ||
74 | + * @returns {number} | ||
75 | + */ | ||
76 | + getLastUpdateEvent(){ | ||
77 | + return this.getLastUpdateEventId | ||
78 | + }, | ||
79 | + // 计算样式 | ||
80 | + getStyle() { | ||
81 | + let that = this; | ||
82 | + // 位置信息 | ||
83 | + const position = this.optionsPosition; | ||
84 | + let css = {}; | ||
85 | + let baseCss = {} | ||
86 | + if (position && Object.keys(position).length > 0) { | ||
87 | + baseCss = { | ||
88 | + position: this.ispreview ? "absolute" : "static", | ||
89 | + width: position.width + "px", | ||
90 | + height: position.height + "px", | ||
91 | + left: position.left + "px", | ||
92 | + top: position.top + "px" | ||
93 | + }; | ||
94 | + } | ||
95 | + | ||
96 | + // 属性信息 | ||
97 | + const setup = that.optionsSetUp; | ||
98 | + const config = that.config; | ||
99 | + | ||
100 | + const items = []; | ||
101 | + if (config && config.setup) { | ||
102 | + let setupArr = config.setup; | ||
103 | + setupArr.forEach(function (v) { | ||
104 | + if (Array.isArray(v)) { | ||
105 | + v.forEach(function (v1) { | ||
106 | + if (v1.list) { | ||
107 | + v1.list.forEach(function (v2) { | ||
108 | + items.push(v2); | ||
109 | + }) | ||
110 | + } | ||
111 | + }) | ||
112 | + } else { | ||
113 | + items.push(v); | ||
114 | + } | ||
115 | + }); | ||
116 | + } | ||
117 | + | ||
118 | + for (const key in setup) { | ||
119 | + let arr = items.filter(function (v) { | ||
120 | + if (v.name == key) { | ||
121 | + return v | ||
122 | + } | ||
123 | + }) | ||
124 | + if (arr && arr.length == 1) { | ||
125 | + let val = setup[key]; | ||
126 | + // css模板 | ||
127 | + let cssTemplate = arr[0].cssTemplate; | ||
128 | + // css 分组 | ||
129 | + let cssGroup = arr[0].cssGroup; | ||
130 | + if (cssTemplate) { | ||
131 | + let split = cssTemplate.replace("%s", val).split(":"); | ||
132 | + if (cssGroup) { | ||
133 | + if (!css[cssGroup]) { | ||
134 | + css[cssGroup] = baseCss; | ||
135 | + } | ||
136 | + css[cssGroup][split[0]] = split[1]; | ||
137 | + } else { | ||
138 | + if (Object.keys(css).length == 0) { | ||
139 | + css = baseCss; | ||
140 | + } | ||
141 | + css[split[0]] = split[1]; | ||
142 | + } | ||
143 | + } | ||
144 | + } | ||
145 | + } | ||
146 | + return css; | ||
147 | + } | ||
148 | + }, | ||
149 | + methods: { | ||
150 | + /** | ||
151 | + * 页面初始化 | ||
152 | + */ | ||
153 | + pageInit() { | ||
154 | + console.log("页面初始化,如需自定义,需要定义函数:pageInit()") | ||
155 | + }, | ||
156 | + | ||
157 | + /** | ||
158 | + * 页面重新加载 | ||
159 | + */ | ||
160 | + reloadPage() { | ||
161 | + console.log("页面重新加载函数,如需自定义,需要定义函数:reloadPage()") | ||
162 | + }, | ||
163 | + | ||
164 | + /** | ||
165 | + * 订阅事件 | ||
166 | + */ | ||
167 | + subEvent(){ | ||
168 | + console.log("页面订阅事件id集合,如需自定义,需要定义函数:subEvent()") | ||
169 | + return []; | ||
170 | + }, | ||
171 | + | ||
172 | + /** | ||
173 | + * 获取订阅事件的数据 | ||
174 | + * @param eventId 事件Id | ||
175 | + * @param data 数据 | ||
176 | + */ | ||
177 | + getCustomEventData(eventId, data) { | ||
178 | + console.log("组件状态订阅事件数据,如需自定义,需要定义函数:getCustomEventData(事件Id,事件数据)") | ||
179 | + console.log(`事件ID:${eventId},事件数据:`,JSON.stringify(data)); | ||
180 | + }, | ||
181 | + | ||
182 | + /** | ||
183 | + * 推送事件数据 | ||
184 | + */ | ||
185 | + pushEventData(evebtId, obj) { | ||
186 | + let data = { | ||
187 | + eventId: evebtId, | ||
188 | + data: obj | ||
189 | + } | ||
190 | + this.$store.dispatch('customEventAction', data); | ||
191 | + }, | ||
192 | + | ||
193 | + /** | ||
194 | + * 字符串转换函数 | ||
195 | + */ | ||
196 | + toFunc(funStr){ | ||
197 | + return new Function(`return ${funStr}`)(); | ||
198 | + }, | ||
199 | + | ||
200 | + /** | ||
201 | + * 执行js字符串函数,返回Boolean值,错误返回false | ||
202 | + * @param funStr js函数字符串 | ||
203 | + * @returns {*} | ||
204 | + */ | ||
205 | + runJSFunc(funStr, params) { | ||
206 | + try { | ||
207 | + var dom = this.toFunc(funStr); | ||
208 | + return dom && dom(params); | ||
209 | + } catch (e) { | ||
210 | + console.error(e) | ||
211 | + } | ||
212 | + return undefined; | ||
213 | + }, | ||
214 | + | ||
215 | + /** | ||
216 | + * 获取配置项的默认值 | ||
217 | + */ | ||
218 | + getOptionDefaultValue(name) { | ||
219 | + let that = this; | ||
220 | + if (!name) { | ||
221 | + return undefined; | ||
222 | + } | ||
223 | + | ||
224 | + let arr = that.config.setup.filter(function (v) { | ||
225 | + if (v.name == name) { | ||
226 | + return v | ||
227 | + } | ||
228 | + }) | ||
229 | + if (arr && arr.length == 1) { | ||
230 | + return arr[0].value; | ||
231 | + } | ||
232 | + | ||
233 | + return undefined; | ||
234 | + }, | ||
235 | + | ||
236 | + /** | ||
237 | + * 获取x天后的日期 | ||
238 | + * @param day | ||
239 | + * @returns {string} yyyy-MM-mm | ||
240 | + */ | ||
241 | + getOffsetDate(day) { | ||
242 | + var doHandMonth = (month) => { | ||
243 | + var m = month | ||
244 | + if (month.toString().length == 1) { | ||
245 | + m = "0" + month | ||
246 | + } | ||
247 | + return m | ||
248 | + } | ||
249 | + var today = new Date() | ||
250 | + var targetday = today.getTime() + 1000 * 60 * 60 * 24 * day | ||
251 | + today.setTime(targetday) | ||
252 | + var tYear = today.getFullYear() | ||
253 | + var tMonth = today.getMonth() | ||
254 | + var tDate = today.getDate() | ||
255 | + tMonth = doHandMonth(tMonth + 1) | ||
256 | + tDate = doHandMonth(tDate) | ||
257 | + return tYear + "-" + tMonth + "-" + tDate | ||
258 | + }, | ||
259 | + | ||
260 | + /** | ||
261 | + * 获取URL所有的参数 | ||
262 | + */ | ||
263 | + getUrlParam() { | ||
264 | + let url = window.location.href; | ||
265 | + let arrObj = url.split("?"); | ||
266 | + let params = Object.create(null) | ||
267 | + if (arrObj.length > 1) { | ||
268 | + arrObj = arrObj[1].split("&"); | ||
269 | + arrObj.forEach(item => { | ||
270 | + item = item.split("="); | ||
271 | + params[item[0]] = item[1] | ||
272 | + }) | ||
273 | + } | ||
274 | + return params; | ||
275 | + }, | ||
276 | + /** | ||
277 | + * 请求接口数据 | ||
278 | + * @param params 扩展参数 | ||
279 | + * @param dynamicDataKey 动态数据源,一般是:dynamicData | ||
280 | + * @param staticDataType 静态数据源类型,一般是:staticData | ||
281 | + * @returns {Promise<unknown>} | ||
282 | + */ | ||
283 | + handlerData(params,dynamicDataKey,staticDataType) { | ||
284 | + let that = this; | ||
285 | + const optionsData = this.value.data; | ||
286 | + if(!staticDataType){ | ||
287 | + staticDataType = 'staticData'; | ||
288 | + } | ||
289 | + if(!dynamicDataKey){ | ||
290 | + dynamicDataKey = 'dynamicData'; | ||
291 | + } | ||
292 | + | ||
293 | + // 返回Promise对象 | ||
294 | + return new Promise(async (resolve) => { | ||
295 | + if (optionsData.dataType == staticDataType) { | ||
296 | + // 返回静态数据 | ||
297 | + let staticData = { | ||
298 | + code: 0, | ||
299 | + success: true, | ||
300 | + data: optionsData[staticDataType] | ||
301 | + } | ||
302 | + resolve(staticData); | ||
303 | + } else { | ||
304 | + // 获取动态数据 start | ||
305 | + if (optionsData[dynamicDataKey]) { | ||
306 | + let contextData = optionsData[dynamicDataKey].contextData; | ||
307 | + // 合并url参数 | ||
308 | + let paramsObj = that.getUrlParam(); | ||
309 | + if (paramsObj) { | ||
310 | + for (let key of Object.keys(paramsObj)) { | ||
311 | + let paramVal = paramsObj[key]; | ||
312 | + contextData[key] = paramVal; | ||
313 | + } | ||
314 | + } | ||
315 | + // 合并自定义的参数 | ||
316 | + if (params) { | ||
317 | + for (let key of Object.keys(params)) { | ||
318 | + let paramVal = params[key]; | ||
319 | + if(typeof paramVal == 'object'){ | ||
320 | + paramVal = JSON.stringify(paramVal); | ||
321 | + } | ||
322 | + contextData[key] = paramVal; | ||
323 | + } | ||
324 | + } | ||
325 | + // 请求接口 | ||
326 | + that.queryEchartsData( | ||
327 | + optionsData[dynamicDataKey], | ||
328 | + optionsData.refreshTime, | ||
329 | + that.optionsSetup, | ||
330 | + optionsData.isRefresh | ||
331 | + ).then(res => { | ||
332 | + let data = res[0]; | ||
333 | + if (data && (data.code == 200 || data.code == 0)) { | ||
334 | + resolve(data); | ||
335 | + } else if (data && data.code == 401) { | ||
336 | + let msg = 'token过期,请重新登录!'; | ||
337 | + let data401 = { | ||
338 | + code: 401, | ||
339 | + success: false, | ||
340 | + msg:msg | ||
341 | + } | ||
342 | + resolve(data401); | ||
343 | + console.log(msg, data); | ||
344 | + } | ||
345 | + }); | ||
346 | + } | ||
347 | + // 获取动态数据 end | ||
348 | + } | ||
349 | + }).catch(e => { | ||
350 | + console.error("数据请求异常:", e); | ||
351 | + }) | ||
352 | + }, | ||
353 | + } | ||
354 | +} |
@@ -140,7 +140,7 @@ export default { | @@ -140,7 +140,7 @@ export default { | ||
140 | LineChartFnCustomTrend(chartProperties, data) { | 140 | LineChartFnCustomTrend(chartProperties, data) { |
141 | const ananysicData = {}; | 141 | const ananysicData = {}; |
142 | let series = []; | 142 | let series = []; |
143 | - if(data && data[0] && data[0].code==200 && data[0].data){ | 143 | + if(data && data[0] && (data[0].code==200 || data[0].code==0) && data[0].data){ |
144 | series = data[0].data; | 144 | series = data[0].data; |
145 | } | 145 | } |
146 | ananysicData["series"] = series; | 146 | ananysicData["series"] = series; |
@@ -152,8 +152,8 @@ export default { | @@ -152,8 +152,8 @@ export default { | ||
152 | let xAxisList = []; | 152 | let xAxisList = []; |
153 | let series = []; | 153 | let series = []; |
154 | let kpiUnit=''; | 154 | let kpiUnit=''; |
155 | - if(data && data[0] ){ | ||
156 | - if(data[0].data){ | 155 | + if(data && data[0]){ |
156 | + if(data[0].data && data[0].series){ | ||
157 | if(data[0].data.names && data[0].data.names.length>0){ | 157 | if(data[0].data.names && data[0].data.names.length>0){ |
158 | xAxisList=data[0].data.names; | 158 | xAxisList=data[0].data.names; |
159 | }else{ | 159 | }else{ |
@@ -173,42 +173,122 @@ export default { | @@ -173,42 +173,122 @@ export default { | ||
173 | }]; | 173 | }]; |
174 | } | 174 | } |
175 | }else{ | 175 | }else{ |
176 | + let dataData=''; | ||
177 | + if(data[0].data && data[0].data.length>=0){ | ||
178 | + dataData=data[0].data; | ||
179 | + }else{ | ||
180 | + dataData=data; | ||
181 | + } | ||
182 | + if(dataData.length>0){ | ||
176 | //容量分析柱线图数据结构 | 183 | //容量分析柱线图数据结构 |
177 | let seriesCapacityData=[];//容量 | 184 | let seriesCapacityData=[];//容量 |
178 | let seriesUsageRateData=[];//使用率 | 185 | let seriesUsageRateData=[];//使用率 |
179 | let seriesUsageValueData=[];//使用量 | 186 | let seriesUsageValueData=[];//使用量 |
180 | - data.map(item=>{ | 187 | + let seriesGrowthData=[];//增长量 |
188 | + dataData.map(item=>{ | ||
181 | xAxisList.push(item.periodVal); | 189 | xAxisList.push(item.periodVal); |
190 | + if(item.capacityValue || item.capacityValue==0){ | ||
182 | seriesCapacityData.push(item.capacityValue) | 191 | seriesCapacityData.push(item.capacityValue) |
192 | + } | ||
193 | + if(item.usageRate || item.usageRate==0){ | ||
183 | seriesUsageRateData.push(item.usageRate) | 194 | seriesUsageRateData.push(item.usageRate) |
195 | + } | ||
196 | + if(item.usageValue || item.usageValue==0){ | ||
184 | seriesUsageValueData.push(item.usageValue) | 197 | seriesUsageValueData.push(item.usageValue) |
185 | - | 198 | + } |
199 | + //增长量 | ||
200 | + if(item.growth || item.growth==0){ | ||
201 | + seriesGrowthData.push(item.growth); | ||
202 | + } | ||
186 | }) | 203 | }) |
204 | + if(seriesUsageValueData.length>0){ | ||
187 | series.push({ | 205 | series.push({ |
188 | type:'bar', | 206 | type:'bar', |
189 | name:'使用量', | 207 | name:'使用量', |
190 | data:seriesUsageValueData | 208 | data:seriesUsageValueData |
191 | }) | 209 | }) |
210 | + }else{ | ||
192 | series.push({ | 211 | series.push({ |
193 | - type:'line', | 212 | + type:'bar', |
213 | + name:'', | ||
214 | + data:seriesUsageValueData | ||
215 | + }) | ||
216 | + } | ||
217 | + if(seriesCapacityData.length>0){ | ||
218 | + series.push({ | ||
219 | + type:'bar', | ||
194 | name:'容量', | 220 | name:'容量', |
195 | data:seriesCapacityData | 221 | data:seriesCapacityData |
196 | }) | 222 | }) |
223 | + }else{ | ||
224 | + series.push({ | ||
225 | + type:'bar', | ||
226 | + name:'', | ||
227 | + data:seriesCapacityData | ||
228 | + }) | ||
229 | + } | ||
230 | + if(seriesGrowthData.length>0){ | ||
231 | + series.push({ | ||
232 | + type:'bar', | ||
233 | + name:'增长量', | ||
234 | + data:seriesGrowthData | ||
235 | + }) | ||
236 | + }else{ | ||
237 | + series.push({ | ||
238 | + type:'bar', | ||
239 | + name:'', | ||
240 | + data:seriesGrowthData | ||
241 | + }) | ||
242 | + } | ||
243 | + if(seriesUsageRateData.length>0){ | ||
197 | series.push({ | 244 | series.push({ |
198 | type:'line', | 245 | type:'line', |
199 | name:'使用率', | 246 | name:'使用率', |
200 | data:seriesUsageRateData | 247 | data:seriesUsageRateData |
201 | }) | 248 | }) |
249 | + }else{ | ||
250 | + series.push({ | ||
251 | + type:'line', | ||
252 | + name:'', | ||
253 | + data:seriesUsageRateData | ||
254 | + }) | ||
202 | } | 255 | } |
203 | 256 | ||
204 | }else{ | 257 | }else{ |
258 | + xAxisList=[]; | ||
259 | + series=[]; | ||
260 | + /* series = [{ | ||
261 | + name: "使用量", | ||
262 | + type:'bar', | ||
263 | + data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | ||
264 | + },{ | ||
265 | + name: "容量", | ||
266 | + type:'line', | ||
267 | + data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | ||
268 | + },{ | ||
269 | + name: "使用率", | ||
270 | + type:'line', | ||
271 | + data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | ||
272 | + }];*/ | ||
273 | + } | ||
274 | + } | ||
275 | + }else{ | ||
205 | // xAxisList=['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00'] | 276 | // xAxisList=['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00'] |
206 | - xAxisList=[] | ||
207 | - series = [{ | ||
208 | - name: "", | 277 | + xAxisList=[]; |
278 | + series=[]; | ||
279 | + /*series = [{ | ||
280 | + name: "使用量", | ||
209 | type:'bar', | 281 | type:'bar', |
210 | data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | 282 | data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
211 | - }]; | 283 | + },{ |
284 | + name: "容量", | ||
285 | + type:'line', | ||
286 | + data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | ||
287 | + },{ | ||
288 | + name: "使用率", | ||
289 | + type:'line', | ||
290 | + data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | ||
291 | + }];*/ | ||
212 | } | 292 | } |
213 | ananysicData["xAxis"] = xAxisList; | 293 | ananysicData["xAxis"] = xAxisList; |
214 | ananysicData["series"] = series; | 294 | ananysicData["series"] = series; |
@@ -2,6 +2,7 @@ import cacheView from "./modules/cachaView" | @@ -2,6 +2,7 @@ import cacheView from "./modules/cachaView" | ||
2 | import tableHead from "./modules/tableHead" | 2 | import tableHead from "./modules/tableHead" |
3 | import buttonVal from "./modules/button"; | 3 | import buttonVal from "./modules/button"; |
4 | import elTreeData from "./modules/elTree"; | 4 | import elTreeData from "./modules/elTree"; |
5 | +import select from "./modules/select"; | ||
5 | 6 | ||
6 | const getters = { | 7 | const getters = { |
7 | sidebar: state => state.app.sidebar, | 8 | sidebar: state => state.app.sidebar, |
@@ -16,6 +17,11 @@ const getters = { | @@ -16,6 +17,11 @@ const getters = { | ||
16 | //按钮月季度年切换 | 17 | //按钮月季度年切换 |
17 | buttonVals:state => state.buttonVal.buttonValData, | 18 | buttonVals:state => state.buttonVal.buttonValData, |
18 | //树形控件点击切换 | 19 | //树形控件点击切换 |
19 | - elTreeDatas:state => state.elTreeData.treeDatas | 20 | + elTreeDatas:state => state.elTreeData.treeDatas, |
21 | + //进度条的数据 | ||
22 | + progressDatas:state => state.progress.progressData, | ||
23 | + //下拉选择列表选中数据- | ||
24 | + selectValues:state => state.select.selectValArr, | ||
25 | + | ||
20 | } | 26 | } |
21 | export default getters | 27 | export default getters |
@@ -11,6 +11,10 @@ import help from './modules/help' | @@ -11,6 +11,10 @@ import help from './modules/help' | ||
11 | import tableHead from './modules/tableHead' | 11 | import tableHead from './modules/tableHead' |
12 | import buttonVal from "./modules/button"; | 12 | import buttonVal from "./modules/button"; |
13 | import elTreeData from "./modules/elTree"; | 13 | import elTreeData from "./modules/elTree"; |
14 | +import progress from "./modules/progress"; | ||
15 | +import select from "./modules/select"; | ||
16 | + | ||
17 | +import common from "./modules/common"; | ||
14 | 18 | ||
15 | Vue.use(Vuex) | 19 | Vue.use(Vuex) |
16 | 20 | ||
@@ -25,7 +29,10 @@ const store = new Vuex.Store({ | @@ -25,7 +29,10 @@ const store = new Vuex.Store({ | ||
25 | help, | 29 | help, |
26 | tableHead, | 30 | tableHead, |
27 | buttonVal, | 31 | buttonVal, |
28 | - elTreeData | 32 | + elTreeData, |
33 | + progress, | ||
34 | + select, | ||
35 | + common | ||
29 | }, | 36 | }, |
30 | state: { }, | 37 | state: { }, |
31 | plugins: [initPlugin], | 38 | plugins: [initPlugin], |
report-ui/src/store/modules/common.js
0 → 100644
1 | +const common = { | ||
2 | + state: { | ||
3 | + /** | ||
4 | + * 自定义状态数据 | ||
5 | + */ | ||
6 | + customState: {}, | ||
7 | + updateEventId:0 | ||
8 | + }, | ||
9 | + | ||
10 | + mutations: { | ||
11 | + CUSTOM_TOGGLE_EVENT: (state, obj) => { | ||
12 | + let eventId = obj.eventId; | ||
13 | + let data = obj.data; | ||
14 | + state.customState[eventId] = data | ||
15 | + state.updateEventId = eventId+'###'+(new Date()).getTime() | ||
16 | + }, | ||
17 | + }, | ||
18 | + | ||
19 | + getters: { | ||
20 | + /** | ||
21 | + * 获取数据 | ||
22 | + * @param state | ||
23 | + * @returns {*} | ||
24 | + */ | ||
25 | + getCustomState(state) { | ||
26 | + return state.customState | ||
27 | + }, | ||
28 | + | ||
29 | + getLastUpdateEventId(state) { | ||
30 | + return state.updateEventId | ||
31 | + }, | ||
32 | + }, | ||
33 | + | ||
34 | + actions: { | ||
35 | + /** | ||
36 | + * 自定义组件,事件订阅函数 | ||
37 | + * @param commit | ||
38 | + * @param obj { | ||
39 | + * eventId:uuid, | ||
40 | + * data:{} | ||
41 | + * } | ||
42 | + */ | ||
43 | + customEventAction({commit}, obj) { | ||
44 | + commit('CUSTOM_TOGGLE_EVENT', obj) | ||
45 | + }, | ||
46 | + | ||
47 | + | ||
48 | + } | ||
49 | +} | ||
50 | + | ||
51 | +export default common |
report-ui/src/store/modules/progress.js
0 → 100644
report-ui/src/store/modules/select.js
0 → 100644
1 | + | ||
2 | +const select = { | ||
3 | + state: { | ||
4 | + selectVal: '', | ||
5 | + selectValArr:[] | ||
6 | + }, | ||
7 | + | ||
8 | + mutations: { | ||
9 | + SELECT_VAL: (state, val) => { | ||
10 | + state.selectVal=val; | ||
11 | + }, | ||
12 | + SELECT_VAL_ARR: (state, val) => { | ||
13 | + state.selectValArr=val; | ||
14 | + } | ||
15 | + }, | ||
16 | + actions: { | ||
17 | + | ||
18 | + } | ||
19 | +} | ||
20 | + | ||
21 | +export default select |
@@ -154,9 +154,9 @@ export default { | @@ -154,9 +154,9 @@ export default { | ||
154 | echoDynamicData(val) { | 154 | echoDynamicData(val) { |
155 | const chartProperties = this.deepClone(val.chartProperties); | 155 | const chartProperties = this.deepClone(val.chartProperties); |
156 | this.chartProperties = chartProperties; | 156 | this.chartProperties = chartProperties; |
157 | - if (this.userNameList.length > 0) { | 157 | + if (this.setParamList && this.userNameList.length > 0) { |
158 | } | 158 | } |
159 | - if (this.setParamList.length > 0) { | 159 | + if (this.setParamList && this.setParamList.length > 0) { |
160 | for (let i = 0; i < this.setParamList.length; i++) { | 160 | for (let i = 0; i < this.setParamList.length; i++) { |
161 | const item = this.setParamList[i]; | 161 | const item = this.setParamList[i]; |
162 | if (chartProperties.hasOwnProperty(item)) { | 162 | if (chartProperties.hasOwnProperty(item)) { |
1 | +<template> | ||
2 | + <div> | ||
3 | + <el-button | ||
4 | + type="primary" | ||
5 | + size="small" | ||
6 | + icon="el-icon-plus" | ||
7 | + plain | ||
8 | + @click="handleAddClick">新增 | ||
9 | + </el-button> | ||
10 | + <el-table :data="formData" style="width: 100%"> | ||
11 | + <!-- 表格标题--> | ||
12 | + <el-table-column prop="name" label="名称" width="120"/> | ||
13 | + <!-- 关联的数据表示--> | ||
14 | + <el-table-column prop="key" label="key值" width="70"/> | ||
15 | + <el-table-column prop="width" label="宽度" width="100"/> | ||
16 | + <el-table-column prop="sort" label="排序" width="80"/> | ||
17 | + <el-table-column prop="bgColor" label="表头背景色" width="100"/> | ||
18 | + <el-table-column prop="component" label="组件" width="100"/> | ||
19 | +<!-- | ||
20 | + <el-table-column prop="successState" label="成功状态标识" width="100"/> | ||
21 | +--> | ||
22 | + <el-table-column prop="drill" label="下探" width="120"/> | ||
23 | + <el-table-column prop="ddic" label="转移字典Code" width="120"/> | ||
24 | + <el-table-column prop="isSearch" label="搜索" width="100"/> | ||
25 | + | ||
26 | + <el-table-column label="操作" width="100" fixed="right"> | ||
27 | + <template slot-scope="scope"> | ||
28 | + <div class="button-group"> | ||
29 | + <el-button | ||
30 | + @click="handleEditorClick(scope.$index, scope.row)" | ||
31 | + type="text" | ||
32 | + size="small" | ||
33 | + >编辑 | ||
34 | + </el-button | ||
35 | + > | ||
36 | + <el-button | ||
37 | + type="text" | ||
38 | + size="small" | ||
39 | + @click="handleDeleteClick(scope.$index, scope.row)" | ||
40 | + >删除 | ||
41 | + </el-button | ||
42 | + > | ||
43 | + </div> | ||
44 | + </template> | ||
45 | + </el-table-column> | ||
46 | + </el-table> | ||
47 | + | ||
48 | + <el-dialog | ||
49 | + title="新增" | ||
50 | + :visible.sync="dialogVisible" | ||
51 | + width="30%" | ||
52 | + :before-close="handleClose" | ||
53 | + > | ||
54 | + <el-form :model="rowFormData" label-width="100px"> | ||
55 | + <el-form-item label="名称:"> | ||
56 | + <el-input | ||
57 | + v-model.trim="rowFormData['name']" | ||
58 | + placeholder="请输入名称" | ||
59 | + size="mini"></el-input> | ||
60 | + </el-form-item> | ||
61 | + <el-form-item label="key值:"> | ||
62 | + <el-input | ||
63 | + v-model.trim="rowFormData['key']" | ||
64 | + placeholder="请输入key值" | ||
65 | + size="mini"></el-input> | ||
66 | + </el-form-item> | ||
67 | + <el-form-item label="宽度:"> | ||
68 | + <el-input | ||
69 | + v-model.trim="rowFormData['width']" | ||
70 | + placeholder="请输入宽度" | ||
71 | + size="mini"></el-input> | ||
72 | + </el-form-item> | ||
73 | + | ||
74 | + <el-form-item label="排序:"> | ||
75 | + <el-input | ||
76 | + v-model.trim="rowFormData['sort']" | ||
77 | + placeholder="请输入排序" | ||
78 | + type="number" | ||
79 | + size="mini"></el-input> | ||
80 | + </el-form-item> | ||
81 | + | ||
82 | + <el-form-item label="背景色:"> | ||
83 | + <el-input | ||
84 | + v-model.trim="rowFormData['bgColor']" | ||
85 | + placeholder="背景色" | ||
86 | + size="mini"></el-input> | ||
87 | + </el-form-item> | ||
88 | + <el-form-item label="组件:"> | ||
89 | + <el-select v-model="rowFormData['component']" placeholder="请输入下探类型"> | ||
90 | + <el-option label="无" value=""> </el-option> | ||
91 | + <el-option label="进度条" value="progress"> </el-option> | ||
92 | + <el-option label="状态组件" value="status"> </el-option> | ||
93 | + </el-select> | ||
94 | + | ||
95 | + </el-form-item> | ||
96 | + <el-form-item label="下探:"> | ||
97 | + <el-select multiple v-model="rowFormData['drill']" placeholder="请输入下探类型"> | ||
98 | + <el-option label="无" value=""> </el-option> | ||
99 | + <el-option label="详情页" value="detail"> </el-option> | ||
100 | + <el-option label="拓扑" value="topology"> </el-option> | ||
101 | + <el-option label="报表" value="openJimu"> </el-option> | ||
102 | + <el-option label="设计页面" value="openAJ"> </el-option> | ||
103 | + </el-select> | ||
104 | + </el-form-item> | ||
105 | + <el-form-item label="转义:"> | ||
106 | + <el-input | ||
107 | + v-model.trim="rowFormData['ddic']" | ||
108 | + placeholder="请输入字典code" | ||
109 | + size="mini"></el-input> | ||
110 | + </el-form-item> | ||
111 | + <el-form-item label="是否是搜索:"> | ||
112 | + <el-switch | ||
113 | + v-model="rowFormData['isSearch']" | ||
114 | + active-text="是" | ||
115 | + inactive-text="否"> | ||
116 | + </el-switch> | ||
117 | + </el-form-item> | ||
118 | + | ||
119 | + </el-form> | ||
120 | + <span slot="footer" class="dialog-footer"> | ||
121 | + <el-button size="mini" @click="dialogVisible = false">取 消</el-button> | ||
122 | + <el-button size="mini" type="primary" @click="handleSaveClick">确 定</el-button> | ||
123 | + </span> | ||
124 | + </el-dialog> | ||
125 | + </div> | ||
126 | +</template> | ||
127 | +<script> | ||
128 | +export default { | ||
129 | + model: { | ||
130 | + prop: "formData", | ||
131 | + event: "input" | ||
132 | + }, | ||
133 | + props: { | ||
134 | + formData: Array | ||
135 | + }, | ||
136 | + data() { | ||
137 | + return { | ||
138 | + dialogVisible: false, | ||
139 | + rowFormData: { | ||
140 | + name: "", | ||
141 | + key: "", | ||
142 | + width: "" | ||
143 | + }, | ||
144 | + flag: true, // true 新增, false 编辑 | ||
145 | + indexEditor: -1, // 编辑第几个数据 | ||
146 | + tableData: [] | ||
147 | + }; | ||
148 | + }, | ||
149 | + methods: { | ||
150 | + // 新增 | ||
151 | + handleAddClick() { | ||
152 | + this.rowFormData = {}; | ||
153 | + this.flag = true; | ||
154 | + this.dialogVisible = true; | ||
155 | + }, | ||
156 | + // 编辑 | ||
157 | + handleEditorClick(index, row) { | ||
158 | + this.flag = false; | ||
159 | + this.rowFormData = this.deepClone(row); | ||
160 | + this.indexEditor = index; | ||
161 | + this.dialogVisible = true; | ||
162 | + }, | ||
163 | + // 关闭 | ||
164 | + handleClose() { | ||
165 | + this.dialogVisible = false; | ||
166 | + }, | ||
167 | + // 保存 | ||
168 | + handleSaveClick() { | ||
169 | + if (this.flag) { | ||
170 | + // 新增 | ||
171 | + this.formData.push(this.rowFormData); | ||
172 | + this.dialogVisible = false; | ||
173 | + } else { | ||
174 | + // 编辑 | ||
175 | + this.formData[this.indexEditor] = this.rowFormData; | ||
176 | + this.$set(this.formData, this.indexEditor, this.rowFormData); | ||
177 | + this.dialogVisible = false; | ||
178 | + } | ||
179 | + this.$emit("input", this.formData); | ||
180 | + this.$emit("change", this.formData); | ||
181 | + }, | ||
182 | + // 删除 | ||
183 | + handleDeleteClick(index) { | ||
184 | + this.formData.splice(index, 1); | ||
185 | + this.$emit("input", this.formData); | ||
186 | + this.$emit("change", this.formData); | ||
187 | + } | ||
188 | + } | ||
189 | +}; | ||
190 | +</script> | ||
191 | +<style lang="scss" scoped> | ||
192 | +/deep/ ::-webkit-scrollbar-track-piece { | ||
193 | + background-color: transparent; | ||
194 | +} | ||
195 | + | ||
196 | +/deep/ .el-table__body-wrapper::-webkit-scrollbar { | ||
197 | + width: 0; // 横向滚动条 | ||
198 | + height: 8px; // 纵向滚动条 必写 | ||
199 | +} | ||
200 | + | ||
201 | +// 滚动条的滑块 | ||
202 | +/deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb { | ||
203 | + border-radius: 5px; | ||
204 | + background-color: rgba(144, 146, 152, 0.3); | ||
205 | +} | ||
206 | + | ||
207 | +/deep/ .el-table, | ||
208 | +/deep/ .el-table__expanded-cell, | ||
209 | +/deep/ .el-table th, | ||
210 | +/deep/ .el-table tr { | ||
211 | + background-color: transparent !important; | ||
212 | + color: #859094 !important; | ||
213 | + font-size: 12px !important; | ||
214 | +} | ||
215 | + | ||
216 | +/deep/ .el-table td, | ||
217 | +/deep/ .el-table th.is-leaf { | ||
218 | + border-bottom: none; | ||
219 | + line-height: 26px; | ||
220 | +} | ||
221 | + | ||
222 | +/deep/ .el-table tbody tr:hover { | ||
223 | + background-color: #263445 !important; | ||
224 | +} | ||
225 | + | ||
226 | +/deep/ .el-table tbody tr:hover > td { | ||
227 | + background-color: #263445 !important; | ||
228 | +} | ||
229 | + | ||
230 | +/deep/ .el-table::before { | ||
231 | + height: 0; | ||
232 | +} | ||
233 | + | ||
234 | +.button-group .el-button { | ||
235 | + padding: 0; | ||
236 | +} | ||
237 | +</style> |
@@ -157,6 +157,12 @@ | @@ -157,6 +157,12 @@ | ||
157 | :chart-type="item.chartType" | 157 | :chart-type="item.chartType" |
158 | @change="changed($event, item.name)" | 158 | @change="changed($event, item.name)" |
159 | /> | 159 | /> |
160 | + <dynamic-custom-table | ||
161 | + v-if="item.type == 'dynamic-custom-table' && inputShow[item.name]" | ||
162 | + v-model="formData[item.name]" | ||
163 | + :chart-type="item.chartType" | ||
164 | + @change="changed($event, item.name)" | ||
165 | + /> | ||
160 | </div> | 166 | </div> |
161 | <div v-else-if="isShowForm(item, '[object Array]')" :key="'a-' + index"> | 167 | <div v-else-if="isShowForm(item, '[object Array]')" :key="'a-' + index"> |
162 | <el-collapse accordion> | 168 | <el-collapse accordion> |
@@ -289,6 +295,9 @@ import customColorComponents from "./customColorComponents"; | @@ -289,6 +295,9 @@ import customColorComponents from "./customColorComponents"; | ||
289 | import dynamicAddTable from "./dynamicAddTable.vue"; | 295 | import dynamicAddTable from "./dynamicAddTable.vue"; |
290 | import customUpload from "./customUpload.vue"; | 296 | import customUpload from "./customUpload.vue"; |
291 | 297 | ||
298 | +// 自定i表格扩展 | ||
299 | +import dynamicCustomTable from "./dynamicCustomTable"; | ||
300 | + | ||
292 | import configureIndicators from "./configureIndicators.vue"; | 301 | import configureIndicators from "./configureIndicators.vue"; |
293 | import configureIndicatorsInformation from "./configureIndicatorsInformation.vue"; | 302 | import configureIndicatorsInformation from "./configureIndicatorsInformation.vue"; |
294 | 303 | ||
@@ -302,7 +311,8 @@ export default { | @@ -302,7 +311,8 @@ export default { | ||
302 | dynamicAddTable, | 311 | dynamicAddTable, |
303 | customUpload, | 312 | customUpload, |
304 | configureIndicators, | 313 | configureIndicators, |
305 | - configureIndicatorsInformation | 314 | + configureIndicatorsInformation, |
315 | + dynamicCustomTable | ||
306 | }, | 316 | }, |
307 | model: { | 317 | model: { |
308 | prop: "value", | 318 | prop: "value", |
@@ -250,6 +250,7 @@ | @@ -250,6 +250,7 @@ | ||
250 | v-model="widget.value" | 250 | v-model="widget.value" |
251 | :index="index" | 251 | :index="index" |
252 | :step="step" | 252 | :step="step" |
253 | + :options="widget.options" | ||
253 | :type="widget.type" | 254 | :type="widget.type" |
254 | :bigscreen="{ bigscreenWidth, bigscreenHeight }" | 255 | :bigscreen="{ bigscreenWidth, bigscreenHeight }" |
255 | @onActivated="setOptionsOnClickWidget" | 256 | @onActivated="setOptionsOnClickWidget" |
1 | +/** | ||
2 | + * 积木报表按钮跳转到积木报表 | ||
3 | + */ | ||
4 | +export const monitorAjButton = { | ||
5 | + code: 'monitor-aj-button', | ||
6 | + type: 'html', | ||
7 | + label: 'AJ报表', | ||
8 | + icon: 'iconbiaoge', | ||
9 | + options: { | ||
10 | + setup: [ | ||
11 | + { | ||
12 | + type: 'el-input-text', | ||
13 | + label: '图层名称', | ||
14 | + name: 'layerName', | ||
15 | + required: false, | ||
16 | + placeholder: '', | ||
17 | + value: 'AJ报表按钮', | ||
18 | + }, | ||
19 | + { | ||
20 | + type: 'el-input-text', | ||
21 | + label: '按钮文本', | ||
22 | + name: 'buttonText', | ||
23 | + required: false, | ||
24 | + placeholder: '', | ||
25 | + value: '报表', | ||
26 | + }, | ||
27 | + { | ||
28 | + type: 'el-input-text', | ||
29 | + label: '报表编号', | ||
30 | + name: 'ajCode', | ||
31 | + required: false, | ||
32 | + placeholder: '', | ||
33 | + value: '' | ||
34 | + }, | ||
35 | + { | ||
36 | + type: 'el-input-text', | ||
37 | + label: '指标Id', | ||
38 | + name: 'kpiId', | ||
39 | + required: false, | ||
40 | + placeholder: '', | ||
41 | + value: '' | ||
42 | + }, | ||
43 | + { | ||
44 | + type: 'el-input-text', | ||
45 | + label: 'flag', | ||
46 | + name: 'flag', | ||
47 | + required: false, | ||
48 | + placeholder: '', | ||
49 | + value: '' | ||
50 | + } | ||
51 | + ], | ||
52 | + data: [], | ||
53 | + position: [ | ||
54 | + { | ||
55 | + type: 'el-input-number', | ||
56 | + label: '左边距', | ||
57 | + name: 'left', | ||
58 | + required: false, | ||
59 | + placeholder: '', | ||
60 | + value: 0, | ||
61 | + }, | ||
62 | + { | ||
63 | + type: 'el-input-number', | ||
64 | + label: '上边距', | ||
65 | + name: 'top', | ||
66 | + required: false, | ||
67 | + placeholder: '', | ||
68 | + value: 0, | ||
69 | + }, | ||
70 | + { | ||
71 | + type: 'el-input-number', | ||
72 | + label: '宽度', | ||
73 | + name: 'width', | ||
74 | + required: false, | ||
75 | + placeholder: '该容器在1920px大屏中的宽度', | ||
76 | + value: 30, | ||
77 | + }, | ||
78 | + { | ||
79 | + type: 'el-input-number', | ||
80 | + label: '高度', | ||
81 | + name: 'height', | ||
82 | + required: false, | ||
83 | + placeholder: '该容器在1080px大屏中的高度', | ||
84 | + value: 30, | ||
85 | + }, | ||
86 | + ], | ||
87 | + } | ||
88 | +} |
@@ -26,6 +26,14 @@ export const monitorBgBorder = { | @@ -26,6 +26,14 @@ export const monitorBgBorder = { | ||
26 | placeholder: '', | 26 | placeholder: '', |
27 | value: require("../../../../../../../assets/images/monitor/capacityAnalysis/icon-plat-info.png"), | 27 | value: require("../../../../../../../assets/images/monitor/capacityAnalysis/icon-plat-info.png"), |
28 | }, | 28 | }, |
29 | + { | ||
30 | + type: 'el-input-text', | ||
31 | + label: 'kpiId', | ||
32 | + name: 'vuexFlagKpiId', | ||
33 | + required: false, | ||
34 | + placeholder: '', | ||
35 | + value: '', | ||
36 | + }, | ||
29 | [{ | 37 | [{ |
30 | name: '标题设置', | 38 | name: '标题设置', |
31 | list: [ | 39 | list: [ |
1 | +/* | ||
2 | + * @Descripttion: 业务卡片 | ||
3 | + * @version: | ||
4 | + * @Author: lsq | ||
5 | + * @Date: 2022-05-18 | ||
6 | + * @LastEditors: lsq | ||
7 | + * @LastEditTime: 2022-05-18 | ||
8 | + */ | ||
9 | +export const monitorBusCard = { | ||
10 | + code: 'monitor-bus-card', | ||
11 | + type: 'chart', | ||
12 | + label: '业务-卡片', | ||
13 | + icon: 'iconbaifenbi', | ||
14 | + options: { | ||
15 | + // 配置 | ||
16 | + setup: [ | ||
17 | + { | ||
18 | + type: 'el-input-text', | ||
19 | + label: '图层名称', | ||
20 | + name: 'layerName', | ||
21 | + required: false, | ||
22 | + placeholder: '', | ||
23 | + value: '业务-卡片', | ||
24 | + }, | ||
25 | + { | ||
26 | + type: 'vue-color', | ||
27 | + label: '背景颜色', | ||
28 | + name: 'background', | ||
29 | + required: false, | ||
30 | + placeholder: '', | ||
31 | + value: '' | ||
32 | + }, | ||
33 | + { | ||
34 | + type: 'el-switch', | ||
35 | + label: '是否显示拓扑', | ||
36 | + name: 'isToop', | ||
37 | + required: false, | ||
38 | + placeholder: '', | ||
39 | + value: true | ||
40 | + }, | ||
41 | + { | ||
42 | + type: 'el-select', | ||
43 | + label: '拓扑图标', | ||
44 | + name: 'toop', | ||
45 | + required: false, | ||
46 | + placeholder: '', | ||
47 | + selectOptions: [ | ||
48 | + {code: 'el-icon-my-toop', name: '蓝色图标'}, | ||
49 | + {code: 'el-icon-my-toop-white', name: '白色图标'}, | ||
50 | + {code: 'el-icon-my-toop-yellow', name: '黄色图标'}, | ||
51 | + ], | ||
52 | + value: 'el-icon-my-toop' | ||
53 | + }, | ||
54 | + { | ||
55 | + type: 'el-switch', | ||
56 | + label: '是否有跳转', | ||
57 | + name: 'isNextPage', | ||
58 | + required: false, | ||
59 | + placeholder: '', | ||
60 | + value: true, | ||
61 | + }, | ||
62 | + { | ||
63 | + type: 'el-input-text', | ||
64 | + label: '跳转路由', | ||
65 | + name: 'nextRouter', | ||
66 | + required: false, | ||
67 | + placeholder: '', | ||
68 | + value: '', | ||
69 | + }, | ||
70 | + [ | ||
71 | + { | ||
72 | + name: '卡片设置', | ||
73 | + list: [ | ||
74 | + { | ||
75 | + type: 'vue-color', | ||
76 | + label: '卡片背景颜色', | ||
77 | + name: 'backgroundItem', | ||
78 | + required: false, | ||
79 | + placeholder: '', | ||
80 | + value: '#fff' | ||
81 | + }, | ||
82 | + { | ||
83 | + type: 'el-switch', | ||
84 | + label: '加边框', | ||
85 | + name: 'isBorder', | ||
86 | + required: false, | ||
87 | + placeholder: '', | ||
88 | + value: true | ||
89 | + }, | ||
90 | + { | ||
91 | + type: 'el-input-number', | ||
92 | + label: '边框宽度', | ||
93 | + name: 'borderWidth', | ||
94 | + required: false, | ||
95 | + placeholder: '', | ||
96 | + value: 1, | ||
97 | + }, | ||
98 | + { | ||
99 | + type: 'vue-color', | ||
100 | + label: '边框颜色', | ||
101 | + name: 'borderColor', | ||
102 | + required: false, | ||
103 | + placeholder: '', | ||
104 | + value: 'rgba(151, 151, 151, 0.13)', | ||
105 | + }, | ||
106 | + { | ||
107 | + type: 'el-input-number', | ||
108 | + label: '边框圆角', | ||
109 | + name: 'radiusCard', | ||
110 | + required: false, | ||
111 | + placeholder: '', | ||
112 | + value: 3, | ||
113 | + }, | ||
114 | + { | ||
115 | + type: 'el-input-number', | ||
116 | + label: '宽度', | ||
117 | + name: 'widthCard', | ||
118 | + required: false, | ||
119 | + placeholder: '', | ||
120 | + value: 450, | ||
121 | + }, | ||
122 | + { | ||
123 | + type: 'el-input-number', | ||
124 | + label: '高度', | ||
125 | + name: 'heightCard', | ||
126 | + required: false, | ||
127 | + placeholder: '', | ||
128 | + value: 200, | ||
129 | + }, | ||
130 | + { | ||
131 | + type: 'vue-color', | ||
132 | + label: '小圆点优颜色', | ||
133 | + name: 'normalColor', | ||
134 | + required: false, | ||
135 | + placeholder: '', | ||
136 | + value: '#0BAC33', | ||
137 | + }, | ||
138 | + { | ||
139 | + type: 'vue-color', | ||
140 | + label: '小圆点良颜色', | ||
141 | + name: 'worseColor', | ||
142 | + required: false, | ||
143 | + placeholder: '', | ||
144 | + value: '#FF7E00', | ||
145 | + }, | ||
146 | + { | ||
147 | + type: 'vue-color', | ||
148 | + label: '小圆点中颜色', | ||
149 | + name: 'worstColor', | ||
150 | + required: false, | ||
151 | + placeholder: '', | ||
152 | + value: '#d81e06', | ||
153 | + }, | ||
154 | + ] | ||
155 | + }, | ||
156 | + { | ||
157 | + name: '标题设置', | ||
158 | + list: [ | ||
159 | + { | ||
160 | + type: 'el-switch', | ||
161 | + label: '是否有标题', | ||
162 | + name: 'isTitle', | ||
163 | + required: false, | ||
164 | + placeholder: '', | ||
165 | + value: true, | ||
166 | + }, | ||
167 | + { | ||
168 | + type: 'el-input-text', | ||
169 | + label: '标题名称', | ||
170 | + name: 'titleName', | ||
171 | + required: false, | ||
172 | + placeholder: '', | ||
173 | + value: 'vmware-80.12.89.77', | ||
174 | + }, | ||
175 | + { | ||
176 | + type: 'vue-color', | ||
177 | + label: '背景颜色', | ||
178 | + name: 'titleBgColor', | ||
179 | + required: false, | ||
180 | + placeholder: '', | ||
181 | + value: 'rgb(244, 245, 250)' | ||
182 | + | ||
183 | + }, | ||
184 | + | ||
185 | + { | ||
186 | + type: 'el-select', | ||
187 | + label: '字体位置', | ||
188 | + name: 'textAlign', | ||
189 | + required: false, | ||
190 | + placeholder: '', | ||
191 | + selectOptions: [ | ||
192 | + {code: 'center', name: '居中'}, | ||
193 | + {code: 'left', name: '左对齐'}, | ||
194 | + {code: 'right', name: '右对齐'}, | ||
195 | + ], | ||
196 | + value: 'center' | ||
197 | + }, | ||
198 | + | ||
199 | + { | ||
200 | + type: 'el-input-number', | ||
201 | + label: '字体大小', | ||
202 | + name: 'titleFontSize', | ||
203 | + required: false, | ||
204 | + placeholder: '', | ||
205 | + value: '18' | ||
206 | + }, | ||
207 | + { | ||
208 | + type: 'vue-color', | ||
209 | + label: '字体颜色', | ||
210 | + name: 'titleColor', | ||
211 | + required: false, | ||
212 | + placeholder: '', | ||
213 | + value: '#666' | ||
214 | + }, | ||
215 | + { | ||
216 | + type: 'el-select', | ||
217 | + label: '字体粗细', | ||
218 | + name: 'titleFontWeight', | ||
219 | + required: false, | ||
220 | + placeholder: '', | ||
221 | + selectOptions: [ | ||
222 | + {code: 'normal', name: '正常'}, | ||
223 | + {code: 'bold', name: '粗体'}, | ||
224 | + {code: 'bolder', name: '特粗体'}, | ||
225 | + {code: 'lighter', name: '细体'} | ||
226 | + ], | ||
227 | + value: 'normal' | ||
228 | + }, | ||
229 | + ] | ||
230 | + }, | ||
231 | + { | ||
232 | + name: '数值设置', | ||
233 | + list: [ | ||
234 | + { | ||
235 | + type: 'el-input-number', | ||
236 | + label: '数值字体大小', | ||
237 | + name: 'textNumFontSize', | ||
238 | + required: false, | ||
239 | + placeholder: '', | ||
240 | + value: 20 | ||
241 | + }, | ||
242 | + { | ||
243 | + type: 'el-select', | ||
244 | + label: '字体粗细', | ||
245 | + name: 'textNumFontWeight', | ||
246 | + required: false, | ||
247 | + placeholder: '', | ||
248 | + selectOptions: [ | ||
249 | + {code: 'normal', name: '正常'}, | ||
250 | + {code: 'bold', name: '粗体'}, | ||
251 | + {code: 'bolder', name: '特粗体'}, | ||
252 | + {code: 'lighter', name: '细体'} | ||
253 | + ], | ||
254 | + value: 'normal' | ||
255 | + } | ||
256 | + ], | ||
257 | + }, | ||
258 | + { | ||
259 | + name: '数值名称设置', | ||
260 | + list: [ | ||
261 | + { | ||
262 | + type: 'el-input-number', | ||
263 | + label: '数值字体大小', | ||
264 | + name: 'textNameFontSize', | ||
265 | + required: false, | ||
266 | + placeholder: '', | ||
267 | + value: 20 | ||
268 | + }, | ||
269 | + { | ||
270 | + type: 'el-select', | ||
271 | + label: '字体粗细', | ||
272 | + name: 'textNameFontWeight', | ||
273 | + required: false, | ||
274 | + placeholder: '', | ||
275 | + selectOptions: [ | ||
276 | + {code: 'normal', name: '正常'}, | ||
277 | + {code: 'bold', name: '粗体'}, | ||
278 | + {code: 'bolder', name: '特粗体'}, | ||
279 | + {code: 'lighter', name: '细体'} | ||
280 | + ], | ||
281 | + value: 'normal' | ||
282 | + } | ||
283 | + ], | ||
284 | + } | ||
285 | + ], | ||
286 | + ], | ||
287 | + // 数据 | ||
288 | + data: [ | ||
289 | + { | ||
290 | + type: 'el-radio-group', | ||
291 | + label: '数据类型', | ||
292 | + name: 'dataType', | ||
293 | + require: false, | ||
294 | + placeholder: '', | ||
295 | + selectValue: true, | ||
296 | + selectOptions: [ | ||
297 | + { | ||
298 | + code: 'staticData', | ||
299 | + name: '静态数据', | ||
300 | + }, | ||
301 | + { | ||
302 | + code: 'dynamicData', | ||
303 | + name: '动态数据', | ||
304 | + }, | ||
305 | + ], | ||
306 | + value: 'staticData', | ||
307 | + }, | ||
308 | + { | ||
309 | + type: 'el-input-number', | ||
310 | + label: '刷新时间(毫秒)', | ||
311 | + name: 'refreshTime', | ||
312 | + relactiveDom: 'dataType', | ||
313 | + relactiveDomValue: 'dynamicData', | ||
314 | + value: 5000 | ||
315 | + }, | ||
316 | + { | ||
317 | + type: 'el-button', | ||
318 | + label: '静态数据', | ||
319 | + name: 'staticData', | ||
320 | + required: false, | ||
321 | + placeholder: '', | ||
322 | + relactiveDom: 'dataType', | ||
323 | + relactiveDomValue: 'staticData', | ||
324 | + value:[ | ||
325 | + { | ||
326 | + "busId": "b64bd18a248c4f08ae14a5d67d64a2c1", | ||
327 | + "parentId": "0", | ||
328 | + "busTypeCode": "xianbus", | ||
329 | + "busTypeName": "西安公司业务", | ||
330 | + "busTypeDesc": "西安公司业务", | ||
331 | + "admin": "wanganjun", | ||
332 | + "adminTel": null, | ||
333 | + "createTime": "2022-03-03 10:55:55", | ||
334 | + "streamId": null, | ||
335 | + "isUse": 1, | ||
336 | + "important": 1, | ||
337 | + "sort": 100, | ||
338 | + "isLeaf": 1, | ||
339 | + "nickname": "王安军", | ||
340 | + "result": null, | ||
341 | + "resourceId": null, | ||
342 | + "healthStatus": null, | ||
343 | + "healthStatusName": null, | ||
344 | + "jtopoId": null, | ||
345 | + "businessNum": null, | ||
346 | + "successRate": null, | ||
347 | + "responseRate": null, | ||
348 | + "score": null, | ||
349 | + "resNum": null, | ||
350 | + "normal": 4, | ||
351 | + "worse": 0, | ||
352 | + "worst": 4, | ||
353 | + "total": 8, | ||
354 | + "resType": "b64bd18a248c4f08ae14a5d67d64a2c1", | ||
355 | + "resTypeName": "西安公司业务", | ||
356 | + "useable": null, | ||
357 | + "child": null, | ||
358 | + "alarmNum": null, | ||
359 | + "hostNum": null, | ||
360 | + "databaseNum": null, | ||
361 | + "middwareNum": null, | ||
362 | + "parentName": null, | ||
363 | + "userCount": null, | ||
364 | + "showType": null, | ||
365 | + "isOps": 0, | ||
366 | + "taskType": null, | ||
367 | + "isvirtual": null, | ||
368 | + "system_type": null, | ||
369 | + "principal": null, | ||
370 | + "principalName": null | ||
371 | + }, { | ||
372 | + "busId": "1d4ff0198a2e440ea42e0d9099aca133", | ||
373 | + "parentId": "0", | ||
374 | + "busTypeCode": "fdchj", | ||
375 | + "busTypeName": "房地产核价系统", | ||
376 | + "busTypeDesc": "房地产核价系统", | ||
377 | + "admin": "童浏靓", | ||
378 | + "adminTel": "18997480219", | ||
379 | + "createTime": "2019-09-04 18:49:17", | ||
380 | + "streamId": null, | ||
381 | + "isUse": 1, | ||
382 | + "important": 1, | ||
383 | + "sort": 100, | ||
384 | + "isLeaf": 1, | ||
385 | + "nickname": "童浏靓", | ||
386 | + "result": null, | ||
387 | + "resourceId": null, | ||
388 | + "healthStatus": null, | ||
389 | + "healthStatusName": null, | ||
390 | + "jtopoId": null, | ||
391 | + "businessNum": null, | ||
392 | + "successRate": null, | ||
393 | + "responseRate": null, | ||
394 | + "score": null, | ||
395 | + "resNum": null, | ||
396 | + "normal": 1, | ||
397 | + "worse": 0, | ||
398 | + "worst": 5, | ||
399 | + "total": 6, | ||
400 | + "resType": "1d4ff0198a2e440ea42e0d9099aca133", | ||
401 | + "resTypeName": "房地产核价系统", | ||
402 | + "useable": null, | ||
403 | + "child": null, | ||
404 | + "alarmNum": null, | ||
405 | + "hostNum": null, | ||
406 | + "databaseNum": null, | ||
407 | + "middwareNum": null, | ||
408 | + "parentName": null, | ||
409 | + "userCount": null, | ||
410 | + "showType": null, | ||
411 | + "isOps": 0, | ||
412 | + "taskType": null, | ||
413 | + "isvirtual": null, | ||
414 | + "system_type": null, | ||
415 | + "principal": null, | ||
416 | + "principalName": null | ||
417 | + } | ||
418 | + ] | ||
419 | + }, | ||
420 | + { | ||
421 | + type: 'dycustComponents', | ||
422 | + label: '', | ||
423 | + name: 'dynamicData', | ||
424 | + required: false, | ||
425 | + placeholder: '', | ||
426 | + relactiveDom: 'dataType', | ||
427 | + chartType: 'widget-table', | ||
428 | + dictKey: 'TEXT_PROPERTIES', | ||
429 | + relactiveDomValue: 'dynamicData', | ||
430 | + value: '', | ||
431 | + }, | ||
432 | + ], | ||
433 | + // 坐标 | ||
434 | + position: [ | ||
435 | + { | ||
436 | + type: 'el-input-number', | ||
437 | + label: '左边距', | ||
438 | + name: 'left', | ||
439 | + required: false, | ||
440 | + placeholder: '', | ||
441 | + value: 0, | ||
442 | + }, | ||
443 | + { | ||
444 | + type: 'el-input-number', | ||
445 | + label: '上边距', | ||
446 | + name: 'top', | ||
447 | + required: false, | ||
448 | + placeholder: '', | ||
449 | + value: 0, | ||
450 | + }, | ||
451 | + { | ||
452 | + type: 'el-input-number', | ||
453 | + label: '宽度', | ||
454 | + name: 'width', | ||
455 | + required: false, | ||
456 | + placeholder: '该容器在1920px大屏中的宽度', | ||
457 | + value: 1800, | ||
458 | + }, | ||
459 | + { | ||
460 | + type: 'el-input-number', | ||
461 | + label: '高度', | ||
462 | + name: 'height', | ||
463 | + required: false, | ||
464 | + placeholder: '该容器在1080px大屏中的高度', | ||
465 | + value: 240, | ||
466 | + }, | ||
467 | + ], | ||
468 | + } | ||
469 | +} |
1 | +/** | ||
2 | + * 忙时分析页面 | ||
3 | + */ | ||
4 | +export const monitorJimuButton = { | ||
5 | + code: 'monitor-busy-analysis', | ||
6 | + type: 'html', | ||
7 | + label: '忙时分析报表', | ||
8 | + icon: 'iconbiaoge', | ||
9 | + options: { | ||
10 | + setup: [ | ||
11 | + { | ||
12 | + type: 'el-input-text', | ||
13 | + label: '图层名称', | ||
14 | + name: 'layerName', | ||
15 | + required: false, | ||
16 | + placeholder: '', | ||
17 | + value: '忙时分析报表', | ||
18 | + }, | ||
19 | + { | ||
20 | + type: 'el-input-text', | ||
21 | + label: '按钮文本', | ||
22 | + name: 'buttonText', | ||
23 | + required: false, | ||
24 | + placeholder: '', | ||
25 | + value: '报表', | ||
26 | + }, | ||
27 | + { | ||
28 | + type: 'el-input-text', | ||
29 | + label: '报表编号', | ||
30 | + name: 'reportCode', | ||
31 | + required: false, | ||
32 | + placeholder: '', | ||
33 | + value: '' | ||
34 | + }, | ||
35 | + { | ||
36 | + type: 'el-input-text', | ||
37 | + label: '指标Id', | ||
38 | + name: 'kpiId', | ||
39 | + required: false, | ||
40 | + placeholder: '', | ||
41 | + value: '' | ||
42 | + }, | ||
43 | + { | ||
44 | + type: 'el-input-text', | ||
45 | + label: 'flag', | ||
46 | + name: 'flag', | ||
47 | + required: false, | ||
48 | + placeholder: '', | ||
49 | + value: '' | ||
50 | + } | ||
51 | + ], | ||
52 | + data: [], | ||
53 | + position: [ | ||
54 | + { | ||
55 | + type: 'el-input-number', | ||
56 | + label: '左边距', | ||
57 | + name: 'left', | ||
58 | + required: false, | ||
59 | + placeholder: '', | ||
60 | + value: 0, | ||
61 | + }, | ||
62 | + { | ||
63 | + type: 'el-input-number', | ||
64 | + label: '上边距', | ||
65 | + name: 'top', | ||
66 | + required: false, | ||
67 | + placeholder: '', | ||
68 | + value: 0, | ||
69 | + }, | ||
70 | + { | ||
71 | + type: 'el-input-number', | ||
72 | + label: '宽度', | ||
73 | + name: 'width', | ||
74 | + required: false, | ||
75 | + placeholder: '该容器在1920px大屏中的宽度', | ||
76 | + value: 30, | ||
77 | + }, | ||
78 | + { | ||
79 | + type: 'el-input-number', | ||
80 | + label: '高度', | ||
81 | + name: 'height', | ||
82 | + required: false, | ||
83 | + placeholder: '该容器在1080px大屏中的高度', | ||
84 | + value: 30, | ||
85 | + }, | ||
86 | + ], | ||
87 | + } | ||
88 | +} |
1 | +/* | ||
2 | + * @Descripttion: 柱线图 | ||
3 | + * @version: | ||
4 | + * @Author: lsq | ||
5 | + * @Date: 2022-03-01 | ||
6 | + * @LastEditors: lsq | ||
7 | + * @LastEditTime: 2022-03-01 | ||
8 | + */ | ||
9 | +export const monitorCustomBarLineChartArray = { | ||
10 | + code: 'monitor-custom-bar-line-chart-array', | ||
11 | + type: 'chart', | ||
12 | + label: '柱线图-双线-循环', | ||
13 | + icon: 'iconzhuxiantu', | ||
14 | + options: { | ||
15 | + // 配置 | ||
16 | + setup: [ | ||
17 | + { | ||
18 | + type: 'el-input-text', | ||
19 | + label: '图层名称', | ||
20 | + name: 'layerName', | ||
21 | + required: false, | ||
22 | + placeholder: '', | ||
23 | + value: '柱线图', | ||
24 | + }, | ||
25 | + { | ||
26 | + type: 'vue-color', | ||
27 | + label: '背景颜色', | ||
28 | + name: 'background', | ||
29 | + required: false, | ||
30 | + placeholder: '', | ||
31 | + value: '' | ||
32 | + }, | ||
33 | + { | ||
34 | + type: 'el-switch', | ||
35 | + label: '与按钮组件联动', | ||
36 | + name: 'isVuex', | ||
37 | + required: false, | ||
38 | + placeholder: '', | ||
39 | + value: true, | ||
40 | + }, | ||
41 | + { | ||
42 | + type: 'el-switch', | ||
43 | + label: '与flag联动', | ||
44 | + name: 'isFlag', | ||
45 | + required: false, | ||
46 | + placeholder: '', | ||
47 | + value: true, | ||
48 | + }, | ||
49 | + { | ||
50 | + type: 'el-input-number', | ||
51 | + label: '柱线图高度', | ||
52 | + name: 'itemHeight', | ||
53 | + required: false, | ||
54 | + placeholder: '', | ||
55 | + value: 250 | ||
56 | + }, | ||
57 | + { | ||
58 | + type: 'el-input-number', | ||
59 | + label: '柱线图下边距', | ||
60 | + name: 'itemMarginBottom', | ||
61 | + required: false, | ||
62 | + placeholder: '', | ||
63 | + value: 5 | ||
64 | + }, | ||
65 | + { | ||
66 | + type: 'vue-color', | ||
67 | + label: '每组柱线图背景色', | ||
68 | + name: 'itemBackground', | ||
69 | + required: false, | ||
70 | + placeholder: '', | ||
71 | + value: '#fff' | ||
72 | + }, | ||
73 | + [ | ||
74 | + { | ||
75 | + name: '折线设置', | ||
76 | + list: [ | ||
77 | + { | ||
78 | + type: 'el-switch', | ||
79 | + label: '标记点', | ||
80 | + name: 'markPoint', | ||
81 | + required: false, | ||
82 | + placeholder: '', | ||
83 | + value: true, | ||
84 | + }, | ||
85 | + { | ||
86 | + type: 'el-slider', | ||
87 | + label: '点大小', | ||
88 | + name: 'pointSize', | ||
89 | + required: false, | ||
90 | + placeholder: '', | ||
91 | + value: 5, | ||
92 | + }, | ||
93 | + { | ||
94 | + type: 'el-switch', | ||
95 | + label: '平滑曲线', | ||
96 | + name: 'smoothCurve', | ||
97 | + required: false, | ||
98 | + placeholder: '', | ||
99 | + value: true, | ||
100 | + }, | ||
101 | + { | ||
102 | + type: 'el-switch', | ||
103 | + label: '面积堆积', | ||
104 | + name: 'area', | ||
105 | + required: false, | ||
106 | + placeholder: '', | ||
107 | + value: true, | ||
108 | + }, | ||
109 | + { | ||
110 | + type: 'el-slider', | ||
111 | + label: '面积厚度', | ||
112 | + name: 'areaThickness', | ||
113 | + required: false, | ||
114 | + placeholder: '', | ||
115 | + value: 5, | ||
116 | + }, | ||
117 | + { | ||
118 | + type: 'el-slider', | ||
119 | + label: '线条宽度', | ||
120 | + name: 'lineWidth', | ||
121 | + required: false, | ||
122 | + placeholder: '', | ||
123 | + value: 2, | ||
124 | + }, | ||
125 | + ], | ||
126 | + }, | ||
127 | + { | ||
128 | + name: '柱体设置', | ||
129 | + list: [ | ||
130 | + { | ||
131 | + type: 'el-slider', | ||
132 | + label: '最大宽度', | ||
133 | + name: 'maxWidth', | ||
134 | + required: false, | ||
135 | + placeholder: '', | ||
136 | + value: 10, | ||
137 | + }, | ||
138 | + { | ||
139 | + type: 'el-slider', | ||
140 | + label: '圆角', | ||
141 | + name: 'radius', | ||
142 | + require: false, | ||
143 | + placeholder: '', | ||
144 | + value: 5, | ||
145 | + }, | ||
146 | + { | ||
147 | + type: 'el-slider', | ||
148 | + label: '最小高度', | ||
149 | + name: 'minHeight', | ||
150 | + require: false, | ||
151 | + placeholder: '', | ||
152 | + value: 0, | ||
153 | + }, | ||
154 | + ], | ||
155 | + }, | ||
156 | + { | ||
157 | + name: '标题设置', | ||
158 | + list: [ | ||
159 | + { | ||
160 | + type: 'el-switch', | ||
161 | + label: '标题', | ||
162 | + name: 'isNoTitle', | ||
163 | + required: false, | ||
164 | + placeholder: '', | ||
165 | + value: true | ||
166 | + }, | ||
167 | + { | ||
168 | + type: 'el-input-text', | ||
169 | + label: '标题', | ||
170 | + name: 'titleText', | ||
171 | + required: false, | ||
172 | + placeholder: '', | ||
173 | + value: '' | ||
174 | + }, | ||
175 | + { | ||
176 | + type: 'vue-color', | ||
177 | + label: '字体颜色', | ||
178 | + name: 'textColor', | ||
179 | + required: false, | ||
180 | + placeholder: '', | ||
181 | + value: '#1e9fff' | ||
182 | + }, | ||
183 | + { | ||
184 | + type: 'el-select', | ||
185 | + label: '字体粗细', | ||
186 | + name: 'textFontWeight', | ||
187 | + required: false, | ||
188 | + placeholder: '', | ||
189 | + selectOptions: [ | ||
190 | + {code: 'normal', name: '正常'}, | ||
191 | + {code: 'bold', name: '粗体'}, | ||
192 | + {code: 'bolder', name: '特粗体'}, | ||
193 | + {code: 'lighter', name: '细体'} | ||
194 | + ], | ||
195 | + value: 'bold' | ||
196 | + }, | ||
197 | + { | ||
198 | + type: 'el-input-number', | ||
199 | + label: '字体大小', | ||
200 | + name: 'textFontSize', | ||
201 | + required: false, | ||
202 | + placeholder: '', | ||
203 | + value: 16 | ||
204 | + }, | ||
205 | + { | ||
206 | + type: 'el-select', | ||
207 | + label: '字体位置', | ||
208 | + name: 'textAlign', | ||
209 | + required: false, | ||
210 | + placeholder: '', | ||
211 | + selectOptions: [ | ||
212 | + {code: 'center', name: '居中'}, | ||
213 | + {code: 'left', name: '左对齐'}, | ||
214 | + {code: 'right', name: '右对齐'}, | ||
215 | + ], | ||
216 | + value: 'left' | ||
217 | + }, | ||
218 | + { | ||
219 | + type: 'el-select', | ||
220 | + label: '标题垂直位置', | ||
221 | + name: 'textAlignVertical', | ||
222 | + required: false, | ||
223 | + placeholder: '', | ||
224 | + selectOptions: [ | ||
225 | + {code: 'top', name: '靠上'}, | ||
226 | + {code: 'bottom', name: '靠下'}, | ||
227 | + ], | ||
228 | + value: 'top' | ||
229 | + }, | ||
230 | + { | ||
231 | + type: 'el-input-text', | ||
232 | + label: '副标题', | ||
233 | + name: 'subText', | ||
234 | + required: false, | ||
235 | + placeholder: '', | ||
236 | + value: '' | ||
237 | + }, | ||
238 | + { | ||
239 | + type: 'vue-color', | ||
240 | + label: '字体颜色', | ||
241 | + name: 'subTextColor', | ||
242 | + required: false, | ||
243 | + placeholder: '', | ||
244 | + value: '#fff' | ||
245 | + }, | ||
246 | + { | ||
247 | + type: 'el-select', | ||
248 | + label: '字体粗细', | ||
249 | + name: 'subTextFontWeight', | ||
250 | + required: false, | ||
251 | + placeholder: '', | ||
252 | + selectOptions: [ | ||
253 | + {code: 'normal', name: '正常'}, | ||
254 | + {code: 'bold', name: '粗体'}, | ||
255 | + {code: 'bolder', name: '特粗体'}, | ||
256 | + {code: 'lighter', name: '细体'} | ||
257 | + ], | ||
258 | + value: 'normal' | ||
259 | + }, | ||
260 | + { | ||
261 | + type: 'el-input-number', | ||
262 | + label: '字体大小', | ||
263 | + name: 'subTextFontSize', | ||
264 | + required: false, | ||
265 | + placeholder: '', | ||
266 | + value: 20 | ||
267 | + }, | ||
268 | + ], | ||
269 | + }, | ||
270 | + { | ||
271 | + name: 'X轴设置', | ||
272 | + list: [ | ||
273 | + { | ||
274 | + type: 'el-switch', | ||
275 | + label: '显示', | ||
276 | + name: 'hideX', | ||
277 | + required: false, | ||
278 | + placeholder: '', | ||
279 | + value: true, | ||
280 | + }, | ||
281 | + { | ||
282 | + type: 'el-input-text', | ||
283 | + label: '坐标名', | ||
284 | + name: 'xName', | ||
285 | + required: false, | ||
286 | + placeholder: '', | ||
287 | + value: '' | ||
288 | + }, | ||
289 | + { | ||
290 | + type: 'vue-color', | ||
291 | + label: '坐标名颜色', | ||
292 | + name: 'nameColorX', | ||
293 | + required: false, | ||
294 | + placeholder: '', | ||
295 | + value: '#fff', | ||
296 | + }, | ||
297 | + { | ||
298 | + type: 'el-input-number', | ||
299 | + label: '坐标字号', | ||
300 | + name: 'nameFontSizeX', | ||
301 | + required: false, | ||
302 | + placeholder: '', | ||
303 | + value: 14, | ||
304 | + }, | ||
305 | + { | ||
306 | + type: 'vue-color', | ||
307 | + label: '数值颜色', | ||
308 | + name: 'Xcolor', | ||
309 | + required: false, | ||
310 | + placeholder: '', | ||
311 | + value: '#666', | ||
312 | + }, | ||
313 | + { | ||
314 | + type: 'el-input-number', | ||
315 | + label: '数值字号', | ||
316 | + name: 'fontSizeX', | ||
317 | + required: false, | ||
318 | + placeholder: '', | ||
319 | + value: 14, | ||
320 | + }, | ||
321 | + { | ||
322 | + type: 'el-slider', | ||
323 | + label: '数值角度', | ||
324 | + name: 'textAngle', | ||
325 | + required: false, | ||
326 | + placeholder: '', | ||
327 | + value: 0 | ||
328 | + }, | ||
329 | + { | ||
330 | + type: 'el-input-number', | ||
331 | + label: '数值间隔', | ||
332 | + name: 'textInterval', | ||
333 | + required: false, | ||
334 | + placeholder: '', | ||
335 | + value: '' | ||
336 | + }, | ||
337 | + { | ||
338 | + type: 'el-switch', | ||
339 | + label: '轴反转', | ||
340 | + name: 'reversalX', | ||
341 | + required: false, | ||
342 | + placeholder: '', | ||
343 | + value: false | ||
344 | + }, | ||
345 | + { | ||
346 | + type: 'vue-color', | ||
347 | + label: '轴颜色', | ||
348 | + name: 'lineColorX', | ||
349 | + required: false, | ||
350 | + placeholder: '', | ||
351 | + value: '#c9c9c9', | ||
352 | + }, | ||
353 | + { | ||
354 | + type: 'el-switch', | ||
355 | + label: '分割线显示', | ||
356 | + name: 'isShowSplitLineX', | ||
357 | + require: false, | ||
358 | + placeholder: '', | ||
359 | + value: false, | ||
360 | + }, | ||
361 | + { | ||
362 | + type: 'vue-color', | ||
363 | + label: '分割线颜色', | ||
364 | + name: 'splitLineColorX', | ||
365 | + required: false, | ||
366 | + placeholder: '', | ||
367 | + value: '#fff', | ||
368 | + } | ||
369 | + ], | ||
370 | + }, | ||
371 | + { | ||
372 | + name: 'Y轴设置', | ||
373 | + list: [ | ||
374 | + { | ||
375 | + type: 'el-switch', | ||
376 | + label: '左显示', | ||
377 | + name: 'isShowYLeft', | ||
378 | + require: false, | ||
379 | + placeholder: '', | ||
380 | + value: true, | ||
381 | + }, | ||
382 | + { | ||
383 | + type: 'el-input-text', | ||
384 | + label: '左坐标名', | ||
385 | + name: 'textNameYLeft', | ||
386 | + require: false, | ||
387 | + placeholder: '', | ||
388 | + value: '' | ||
389 | + }, | ||
390 | + { | ||
391 | + type: 'vue-color', | ||
392 | + label: '左坐标名颜色', | ||
393 | + name: 'nameColorYLeft', | ||
394 | + required: false, | ||
395 | + placeholder: '', | ||
396 | + value: '#fff', | ||
397 | + }, | ||
398 | + { | ||
399 | + type: 'el-input-number', | ||
400 | + label: '左坐标字号', | ||
401 | + name: 'namefontSizeYLeft', | ||
402 | + required: false, | ||
403 | + placeholder: '', | ||
404 | + value: 14, | ||
405 | + }, | ||
406 | + { | ||
407 | + type: 'el-input-number', | ||
408 | + label: '左均分', | ||
409 | + name: 'splitNumberLeft', | ||
410 | + required: false, | ||
411 | + placeholder: '', | ||
412 | + value: '' | ||
413 | + }, | ||
414 | + { | ||
415 | + type: 'el-switch', | ||
416 | + label: '右显示', | ||
417 | + name: 'isShowYRight', | ||
418 | + require: false, | ||
419 | + placeholder: '', | ||
420 | + value: true, | ||
421 | + }, | ||
422 | + { | ||
423 | + type: 'el-input-text', | ||
424 | + label: '右坐标名', | ||
425 | + name: 'textNameYRight', | ||
426 | + require: false, | ||
427 | + placeholder: '', | ||
428 | + value: '' | ||
429 | + }, | ||
430 | + { | ||
431 | + type: 'vue-color', | ||
432 | + label: '右坐标名颜色', | ||
433 | + name: 'nameColorYRight', | ||
434 | + required: false, | ||
435 | + placeholder: '', | ||
436 | + value: '#fff', | ||
437 | + }, | ||
438 | + { | ||
439 | + type: 'el-input-number', | ||
440 | + label: '右坐标字号', | ||
441 | + name: 'namefontSizeYRight', | ||
442 | + required: false, | ||
443 | + placeholder: '', | ||
444 | + value: 14, | ||
445 | + }, | ||
446 | + { | ||
447 | + type: 'el-input-number', | ||
448 | + label: '右均分', | ||
449 | + name: 'splitNumberRight', | ||
450 | + required: false, | ||
451 | + placeholder: '', | ||
452 | + value: '' | ||
453 | + }, | ||
454 | + { | ||
455 | + type: 'vue-color', | ||
456 | + label: '数值颜色', | ||
457 | + name: 'colorY', | ||
458 | + required: false, | ||
459 | + placeholder: '', | ||
460 | + value: '#666', | ||
461 | + }, | ||
462 | + { | ||
463 | + type: 'el-input-number', | ||
464 | + label: '数值字号', | ||
465 | + name: 'fontSizeY', | ||
466 | + required: false, | ||
467 | + placeholder: '', | ||
468 | + value: 14, | ||
469 | + }, | ||
470 | + { | ||
471 | + type: 'el-switch', | ||
472 | + label: '轴反转', | ||
473 | + name: 'reversalY', | ||
474 | + required: false, | ||
475 | + placeholder: '', | ||
476 | + value: false | ||
477 | + }, | ||
478 | + { | ||
479 | + type: 'vue-color', | ||
480 | + label: '轴颜色', | ||
481 | + name: 'lineColorY', | ||
482 | + required: false, | ||
483 | + placeholder: '', | ||
484 | + value: '#c9c9c9', | ||
485 | + }, | ||
486 | + ], | ||
487 | + }, | ||
488 | + { | ||
489 | + name: '折线数值设定', | ||
490 | + list: [ | ||
491 | + { | ||
492 | + type: 'el-switch', | ||
493 | + label: '显示', | ||
494 | + name: 'isShowLine', | ||
495 | + required: false, | ||
496 | + placeholder: '', | ||
497 | + value: false | ||
498 | + }, | ||
499 | + { | ||
500 | + type: 'el-input-number', | ||
501 | + label: '距离', | ||
502 | + name: 'distanceLine', | ||
503 | + required: false, | ||
504 | + placeholder: '', | ||
505 | + value: 5 | ||
506 | + }, | ||
507 | + { | ||
508 | + type: 'el-input-number', | ||
509 | + label: '字体字号', | ||
510 | + name: 'fontSizeLine', | ||
511 | + required: false, | ||
512 | + placeholder: '', | ||
513 | + value: 14 | ||
514 | + }, | ||
515 | + { | ||
516 | + type: 'vue-color', | ||
517 | + label: '字体颜色', | ||
518 | + name: 'subTextColorLine', | ||
519 | + required: false, | ||
520 | + placeholder: '', | ||
521 | + value: '#666' | ||
522 | + }, | ||
523 | + { | ||
524 | + type: 'el-select', | ||
525 | + label: '字体粗细', | ||
526 | + name: 'fontWeightLine', | ||
527 | + required: false, | ||
528 | + placeholder: '', | ||
529 | + selectOptions: [ | ||
530 | + {code: 'normal', name: '正常'}, | ||
531 | + {code: 'bold', name: '粗体'}, | ||
532 | + {code: 'bolder', name: '特粗体'}, | ||
533 | + {code: 'lighter', name: '细体'} | ||
534 | + ], | ||
535 | + value: 'normal' | ||
536 | + }, | ||
537 | + ], | ||
538 | + }, | ||
539 | + { | ||
540 | + name: '柱体数值设定', | ||
541 | + list: [ | ||
542 | + { | ||
543 | + type: 'el-switch', | ||
544 | + label: '显示', | ||
545 | + name: 'isShowBar', | ||
546 | + required: false, | ||
547 | + placeholder: '', | ||
548 | + value: false | ||
549 | + }, | ||
550 | + { | ||
551 | + type: 'el-input-number', | ||
552 | + label: '距离', | ||
553 | + name: 'distanceBar', | ||
554 | + required: false, | ||
555 | + placeholder: '', | ||
556 | + value: 5 | ||
557 | + }, | ||
558 | + { | ||
559 | + type: 'el-input-number', | ||
560 | + label: '字体字号', | ||
561 | + name: 'fontSizeBar', | ||
562 | + required: false, | ||
563 | + placeholder: '', | ||
564 | + value: 14 | ||
565 | + }, | ||
566 | + { | ||
567 | + type: 'vue-color', | ||
568 | + label: '字体颜色', | ||
569 | + name: 'subTextColorBar', | ||
570 | + required: false, | ||
571 | + placeholder: '', | ||
572 | + value: '#666' | ||
573 | + }, | ||
574 | + { | ||
575 | + type: 'el-select', | ||
576 | + label: '字体粗细', | ||
577 | + name: 'fontWeightBar', | ||
578 | + required: false, | ||
579 | + placeholder: '', | ||
580 | + selectOptions: [ | ||
581 | + {code: 'normal', name: '正常'}, | ||
582 | + {code: 'bold', name: '粗体'}, | ||
583 | + {code: 'bolder', name: '特粗体'}, | ||
584 | + {code: 'lighter', name: '细体'} | ||
585 | + ], | ||
586 | + value: 'normal' | ||
587 | + }, | ||
588 | + ], | ||
589 | + }, | ||
590 | + { | ||
591 | + name: '提示语设置', | ||
592 | + list: [ | ||
593 | + { | ||
594 | + type: 'el-input-number', | ||
595 | + label: '字体大小', | ||
596 | + name: 'tipFontSize', | ||
597 | + required: false, | ||
598 | + placeholder: '', | ||
599 | + value: 12 | ||
600 | + }, | ||
601 | + { | ||
602 | + type: 'vue-color', | ||
603 | + label: '字体颜色', | ||
604 | + name: 'lineColor', | ||
605 | + required: false, | ||
606 | + placeholder: '', | ||
607 | + value: '#e68b55' | ||
608 | + }, | ||
609 | + ], | ||
610 | + }, | ||
611 | + { | ||
612 | + name: '坐标轴边距设置', | ||
613 | + list: [ | ||
614 | + { | ||
615 | + type: 'el-slider', | ||
616 | + label: '左边距(像素)', | ||
617 | + name: 'marginLeft', | ||
618 | + required: false, | ||
619 | + placeholder: '', | ||
620 | + value: 10, | ||
621 | + }, { | ||
622 | + type: 'el-slider', | ||
623 | + label: '顶边距(像素)', | ||
624 | + name: 'marginTop', | ||
625 | + required: false, | ||
626 | + placeholder: '', | ||
627 | + value: 50, | ||
628 | + }, { | ||
629 | + type: 'el-slider', | ||
630 | + label: '右边距(像素)', | ||
631 | + name: 'marginRight', | ||
632 | + required: false, | ||
633 | + placeholder: '', | ||
634 | + value: 40, | ||
635 | + }, { | ||
636 | + type: 'el-slider', | ||
637 | + label: '底边距(像素)', | ||
638 | + name: 'marginBottom', | ||
639 | + required: false, | ||
640 | + placeholder: '', | ||
641 | + value: 10, | ||
642 | + }, | ||
643 | + ], | ||
644 | + }, | ||
645 | + { | ||
646 | + name: '图例操作', | ||
647 | + list: [ | ||
648 | + { | ||
649 | + type: 'el-switch', | ||
650 | + label: '显示', | ||
651 | + name: 'isShowLegend', | ||
652 | + required: false, | ||
653 | + placeholder: '', | ||
654 | + value: true, | ||
655 | + }, | ||
656 | + { | ||
657 | + type: 'el-switch', | ||
658 | + label: '图例文字显示', | ||
659 | + name: 'isShowLegendText', | ||
660 | + required: false, | ||
661 | + placeholder: '', | ||
662 | + value: true, | ||
663 | + }, | ||
664 | + { | ||
665 | + type: 'vue-color', | ||
666 | + label: '字体颜色', | ||
667 | + name: 'lengedColor', | ||
668 | + required: false, | ||
669 | + placeholder: '', | ||
670 | + value: '#666', | ||
671 | + }, | ||
672 | + { | ||
673 | + type: 'el-input-number', | ||
674 | + label: '字体大小', | ||
675 | + name: 'lengedFontSize', | ||
676 | + required: false, | ||
677 | + placeholder: '', | ||
678 | + value: 14, | ||
679 | + }, | ||
680 | + { | ||
681 | + type: 'el-input-number', | ||
682 | + label: '图例宽度', | ||
683 | + name: 'lengedWidth', | ||
684 | + required: false, | ||
685 | + placeholder: '', | ||
686 | + value: 15, | ||
687 | + }, | ||
688 | + { | ||
689 | + type: 'el-select', | ||
690 | + label: '横向位置', | ||
691 | + name: 'lateralPosition', | ||
692 | + required: false, | ||
693 | + placeholder: '', | ||
694 | + selectOptions: [ | ||
695 | + {code: 'center', name: '居中'}, | ||
696 | + {code: 'left', name: '左对齐'}, | ||
697 | + {code: 'right', name: '右对齐'}, | ||
698 | + ], | ||
699 | + value: 'center' | ||
700 | + }, | ||
701 | + { | ||
702 | + type: 'el-select', | ||
703 | + label: '纵向位置', | ||
704 | + name: 'longitudinalPosition', | ||
705 | + required: false, | ||
706 | + placeholder: '', | ||
707 | + selectOptions: [ | ||
708 | + {code: 'top', name: '顶部'}, | ||
709 | + {code: 'bottom', name: '底部'}, | ||
710 | + ], | ||
711 | + value: 'top' | ||
712 | + }, | ||
713 | + { | ||
714 | + type: 'el-select', | ||
715 | + label: '布局前置', | ||
716 | + name: 'layoutFront', | ||
717 | + required: false, | ||
718 | + placeholder: '', | ||
719 | + selectOptions: [ | ||
720 | + {code: 'vertical', name: '竖排'}, | ||
721 | + {code: 'horizontal', name: '横排'}, | ||
722 | + ], | ||
723 | + value: 'horizontal' | ||
724 | + }, | ||
725 | + ], | ||
726 | + }, | ||
727 | + { | ||
728 | + name: '自定义配色', | ||
729 | + list: [ | ||
730 | + { | ||
731 | + type: 'customColor', | ||
732 | + label: '', | ||
733 | + name: 'customColor', | ||
734 | + required: false, | ||
735 | + value: [{color: '#3b91ff'}, {color: '#ff1111'}, {color: '#2c2f90'}], | ||
736 | + }, | ||
737 | + ], | ||
738 | + }, | ||
739 | + ], | ||
740 | + ], | ||
741 | + // 数据 | ||
742 | + data: [ | ||
743 | + { | ||
744 | + type: 'el-radio-group', | ||
745 | + label: '数据类型', | ||
746 | + name: 'dataType', | ||
747 | + require: false, | ||
748 | + placeholder: '', | ||
749 | + selectValue: true, | ||
750 | + selectOptions: [ | ||
751 | + { | ||
752 | + code: 'staticData', | ||
753 | + name: '静态数据', | ||
754 | + }, | ||
755 | + { | ||
756 | + code: 'dynamicData', | ||
757 | + name: '动态数据', | ||
758 | + }, | ||
759 | + ], | ||
760 | + value: 'staticData', | ||
761 | + }, | ||
762 | + { | ||
763 | + type: 'el-input-number', | ||
764 | + label: '刷新时间(毫秒)', | ||
765 | + name: 'refreshTime', | ||
766 | + relactiveDom: 'dataType', | ||
767 | + relactiveDomValue: 'dynamicData', | ||
768 | + value: 5000 | ||
769 | + }, | ||
770 | + { | ||
771 | + type: 'el-button', | ||
772 | + label: '静态数据', | ||
773 | + name: 'staticData', | ||
774 | + required: false, | ||
775 | + placeholder: '', | ||
776 | + relactiveDom: 'dataType', | ||
777 | + relactiveDomValue: 'staticData', | ||
778 | + value: [ | ||
779 | + {"axis": "1月", "bar": 2.6, "line": 2}, | ||
780 | + {"axis": "2月", "bar": 5.9, "line": 2.2}, | ||
781 | + {"axis": "3月", "bar": 9, "line": 3.3}, | ||
782 | + {"axis": "4月", "bar": 26.4, "line": 4.5}, | ||
783 | + {"axis": "5月", "bar": 28.7, "line": 6.3}, | ||
784 | + {"axis": "6月", "bar": 70.7, "line": 10.2}, | ||
785 | + {"axis": "7月", "bar": 175.6, "line": 20.3}, | ||
786 | + {"axis": "8月", "bar": 182.2, "line": 23.4}, | ||
787 | + {"axis": "9月", "bar": 48.7, "line": 23}, | ||
788 | + {"axis": "10月", "bar": 18.8, "line": 16.5}, | ||
789 | + {"axis": "11月", "bar": 6, "line": 12}, | ||
790 | + {"axis": "12月", "bar": 2.3, "line": 6.2}, | ||
791 | + ] | ||
792 | + }, | ||
793 | + { | ||
794 | + type: 'dycustComponents', | ||
795 | + label: '', | ||
796 | + name: 'dynamicData', | ||
797 | + required: false, | ||
798 | + placeholder: '', | ||
799 | + relactiveDom: 'dataType', | ||
800 | + chartType: 'custom-barlinechart', | ||
801 | + dictKey: 'BAR_LINE_PROPERTIES', | ||
802 | + relactiveDomValue: 'dynamicData', | ||
803 | + }, | ||
804 | + ], | ||
805 | + // 坐标 | ||
806 | + position: [ | ||
807 | + { | ||
808 | + type: 'el-input-number', | ||
809 | + label: '左边距', | ||
810 | + name: 'left', | ||
811 | + required: false, | ||
812 | + placeholder: '', | ||
813 | + value: 0, | ||
814 | + }, | ||
815 | + { | ||
816 | + type: 'el-input-number', | ||
817 | + label: '上边距', | ||
818 | + name: 'top', | ||
819 | + required: false, | ||
820 | + placeholder: '', | ||
821 | + value: 0, | ||
822 | + }, | ||
823 | + { | ||
824 | + type: 'el-input-number', | ||
825 | + label: '宽度', | ||
826 | + name: 'width', | ||
827 | + required: false, | ||
828 | + placeholder: '该容器在1920px大屏中的宽度', | ||
829 | + value: 1403, | ||
830 | + }, | ||
831 | + { | ||
832 | + type: 'el-input-number', | ||
833 | + label: '高度', | ||
834 | + name: 'height', | ||
835 | + required: false, | ||
836 | + placeholder: '该容器在1080px大屏中的高度', | ||
837 | + value: 800, | ||
838 | + }, | ||
839 | + ], | ||
840 | + } | ||
841 | +} |
@@ -38,6 +38,65 @@ export const monitorCustomBarLineChart = { | @@ -38,6 +38,65 @@ export const monitorCustomBarLineChart = { | ||
38 | placeholder: '', | 38 | placeholder: '', |
39 | value: true, | 39 | value: true, |
40 | }, | 40 | }, |
41 | + { | ||
42 | + type: 'el-switch', | ||
43 | + label: '与下拉列表联动', | ||
44 | + name: 'isVuexSelect', | ||
45 | + required: false, | ||
46 | + placeholder: '', | ||
47 | + value: false, | ||
48 | + }, | ||
49 | + { | ||
50 | + type: 'el-input-text', | ||
51 | + label: '下拉列表联动kpi', | ||
52 | + name: 'vuexFlagKpiId', | ||
53 | + required: false, | ||
54 | + placeholder: '', | ||
55 | + value: '', | ||
56 | + }, | ||
57 | + [ | ||
58 | + { | ||
59 | + name: '工具栏设置', | ||
60 | + list: [ | ||
61 | + { | ||
62 | + type: 'el-switch', | ||
63 | + label: '数据视图', | ||
64 | + name: 'dataView', | ||
65 | + required: false, | ||
66 | + placeholder: '', | ||
67 | + value: true, | ||
68 | + }, | ||
69 | + { | ||
70 | + type: 'el-switch', | ||
71 | + label: '导出', | ||
72 | + name: 'download', | ||
73 | + required: false, | ||
74 | + placeholder: '', | ||
75 | + value: true, | ||
76 | + }, | ||
77 | + { | ||
78 | + type: 'el-select', | ||
79 | + label: '工具栏位置', | ||
80 | + name: 'toolBoxOrient', | ||
81 | + required: false, | ||
82 | + placeholder: '', | ||
83 | + selectOptions: [ | ||
84 | + {code: 'vertical', name: '垂直'}, | ||
85 | + {code: 'horizontal', name: '水平'} | ||
86 | + ], | ||
87 | + value: 'vertical' | ||
88 | + }, | ||
89 | + { | ||
90 | + type: 'el-input-number', | ||
91 | + label: '工具栏右边距', | ||
92 | + name: 'rightMargin', | ||
93 | + required: false, | ||
94 | + placeholder: '', | ||
95 | + value: 150 | ||
96 | + }, | ||
97 | + ] | ||
98 | + }, | ||
99 | + ], | ||
41 | [ | 100 | [ |
42 | { | 101 | { |
43 | name: '折线设置', | 102 | name: '折线设置', |
@@ -119,6 +178,19 @@ export const monitorCustomBarLineChart = { | @@ -119,6 +178,19 @@ export const monitorCustomBarLineChart = { | ||
119 | placeholder: '', | 178 | placeholder: '', |
120 | value: 0, | 179 | value: 0, |
121 | }, | 180 | }, |
181 | + { | ||
182 | + type: 'el-select', | ||
183 | + label: '叠加类型', | ||
184 | + name: 'stackStype', | ||
185 | + required: false, | ||
186 | + placeholder: '', | ||
187 | + selectOptions: [ | ||
188 | + {code: 'total', name: '堆叠'}, | ||
189 | + {code: 'barGap', name: '叠加'}, | ||
190 | + {code: 'noStack', name: '不堆叠'}, | ||
191 | + ], | ||
192 | + value: 'total' | ||
193 | + }, | ||
122 | ], | 194 | ], |
123 | }, | 195 | }, |
124 | { | 196 | { |
@@ -679,6 +751,14 @@ export const monitorCustomBarLineChart = { | @@ -679,6 +751,14 @@ export const monitorCustomBarLineChart = { | ||
679 | value: 'top' | 751 | value: 'top' |
680 | }, | 752 | }, |
681 | { | 753 | { |
754 | + type: 'el-input-number', | ||
755 | + label: '距离顶部/底部距离', | ||
756 | + name: 'legendHeight', | ||
757 | + required: false, | ||
758 | + placeholder: '', | ||
759 | + value: 30, | ||
760 | + }, | ||
761 | + { | ||
682 | type: 'el-select', | 762 | type: 'el-select', |
683 | label: '布局前置', | 763 | label: '布局前置', |
684 | name: 'layoutFront', | 764 | name: 'layoutFront', |
@@ -700,7 +780,7 @@ export const monitorCustomBarLineChart = { | @@ -700,7 +780,7 @@ export const monitorCustomBarLineChart = { | ||
700 | label: '', | 780 | label: '', |
701 | name: 'customColor', | 781 | name: 'customColor', |
702 | required: false, | 782 | required: false, |
703 | - value: [{color: '#3b91ff'}, {color: '#ff1111'}, {color: '#2c2f90'}], | 783 | + value: [{color: '#FF795D'}, {color: '#24AAFF'}, {color: '#ff1111'}], |
704 | }, | 784 | }, |
705 | ], | 785 | ], |
706 | }, | 786 | }, |
@@ -728,6 +808,14 @@ export const monitorCustomBarLineChart = { | @@ -728,6 +808,14 @@ export const monitorCustomBarLineChart = { | ||
728 | value: 'staticData', | 808 | value: 'staticData', |
729 | }, | 809 | }, |
730 | { | 810 | { |
811 | + type: 'el-switch', | ||
812 | + label: '是否刷新', | ||
813 | + name: 'isRefresh', | ||
814 | + relactiveDom: 'dataType', | ||
815 | + relactiveDomValue: 'dynamicData', | ||
816 | + value: false | ||
817 | + }, | ||
818 | + { | ||
731 | type: 'el-input-number', | 819 | type: 'el-input-number', |
732 | label: '刷新时间(毫秒)', | 820 | label: '刷新时间(毫秒)', |
733 | name: 'refreshTime', | 821 | name: 'refreshTime', |
@@ -646,6 +646,14 @@ export const monitorCustomLineTrend = { | @@ -646,6 +646,14 @@ export const monitorCustomLineTrend = { | ||
646 | value: 'staticData', | 646 | value: 'staticData', |
647 | }, | 647 | }, |
648 | { | 648 | { |
649 | + type: 'el-switch', | ||
650 | + label: '是否刷新', | ||
651 | + name: 'isRefresh', | ||
652 | + relactiveDom: 'dataType', | ||
653 | + relactiveDomValue: 'dynamicData', | ||
654 | + value: false | ||
655 | + }, | ||
656 | + { | ||
649 | type: 'el-input-number', | 657 | type: 'el-input-number', |
650 | label: '刷新时间(毫秒)', | 658 | label: '刷新时间(毫秒)', |
651 | name: 'refreshTime', | 659 | name: 'refreshTime', |
@@ -42,6 +42,14 @@ export const monitorCustomLiquidFillChart = { | @@ -42,6 +42,14 @@ export const monitorCustomLiquidFillChart = { | ||
42 | ], | 42 | ], |
43 | value: 'column' | 43 | value: 'column' |
44 | }, | 44 | }, |
45 | + { | ||
46 | + type: 'el-input-text', | ||
47 | + label: '提示信息', | ||
48 | + name: 'formula', | ||
49 | + required: false, | ||
50 | + placeholder: '', | ||
51 | + value: '增长率=(本次值-上次值)/上次值;平均增长率 = 总增长率/总增长次数', | ||
52 | + }, | ||
45 | [ | 53 | [ |
46 | { | 54 | { |
47 | name: '水球设置', | 55 | name: '水球设置', |
@@ -332,6 +340,14 @@ export const monitorCustomLiquidFillChart = { | @@ -332,6 +340,14 @@ export const monitorCustomLiquidFillChart = { | ||
332 | value: 'staticData', | 340 | value: 'staticData', |
333 | }, | 341 | }, |
334 | { | 342 | { |
343 | + type: 'el-switch', | ||
344 | + label: '是否刷新', | ||
345 | + name: 'isRefresh', | ||
346 | + relactiveDom: 'dataType', | ||
347 | + relactiveDomValue: 'dynamicData', | ||
348 | + value: false | ||
349 | + }, | ||
350 | + { | ||
335 | type: 'el-input-number', | 351 | type: 'el-input-number', |
336 | label: '刷新时间(毫秒)', | 352 | label: '刷新时间(毫秒)', |
337 | name: 'refreshTime', | 353 | name: 'refreshTime', |
1 | +/** | ||
2 | + * 三点图 | ||
3 | + */ | ||
4 | +export const monitorCustomScatterWeight = { | ||
5 | + code: 'monitor-custom-scatter-weight', | ||
6 | + type: 'chart', | ||
7 | + label: '散点图', | ||
8 | + icon: 'iconduidietu', | ||
9 | + options: { | ||
10 | + // 配置 | ||
11 | + setup: [ | ||
12 | + { | ||
13 | + type: 'el-input-text', | ||
14 | + label: '图层名称', | ||
15 | + name: 'layerName', | ||
16 | + required: false, | ||
17 | + placeholder: '', | ||
18 | + value: '散点图', | ||
19 | + }, | ||
20 | + { | ||
21 | + type: 'el-switch', | ||
22 | + label: '是否刷新', | ||
23 | + name: 'isRefresh', | ||
24 | + relactiveDom: 'dataType', | ||
25 | + relactiveDomValue: 'dynamicData', | ||
26 | + value: false | ||
27 | + }, | ||
28 | + { | ||
29 | + type: 'el-switch', | ||
30 | + label: '竖展示', | ||
31 | + name: 'verticalShow', | ||
32 | + required: false, | ||
33 | + placeholder: '', | ||
34 | + value: false, | ||
35 | + }, | ||
36 | + { | ||
37 | + type: 'vue-color', | ||
38 | + label: '背景颜色', | ||
39 | + name: 'background', | ||
40 | + required: false, | ||
41 | + placeholder: '', | ||
42 | + value: '' | ||
43 | + }, | ||
44 | + { | ||
45 | + type: 'el-select', | ||
46 | + label: 'kpiId', | ||
47 | + name: 'kpiId', | ||
48 | + required: false, | ||
49 | + placeholder: '', | ||
50 | + selectOptions: [ | ||
51 | + {code: 'KPI449F5365', name: 'KPI449F5365(文件系统使用率)'}, | ||
52 | + {code: 'KPI97373ED0', name: 'KPI97373ED0(磁盘IO读速率)'}, | ||
53 | + {code: 'KPI95378FE0', name: 'KPI95378FE0(磁盘IO写速率)'}, | ||
54 | + {code: 'KPI66BD013F', name: 'KPI66BD013F(磁盘IO处理时间)'}, | ||
55 | + {code: 'KPI3E6ED38B', name: 'KPI3E6ED38B(磁盘IO响应时间)'} | ||
56 | + ], | ||
57 | + value: 'KPI449F5365', | ||
58 | + }, | ||
59 | + [ | ||
60 | + { | ||
61 | + name: '折线设置', | ||
62 | + list: [ | ||
63 | + { | ||
64 | + type: 'el-switch', | ||
65 | + label: '标记点', | ||
66 | + name: 'markPoint', | ||
67 | + required: false, | ||
68 | + placeholder: '', | ||
69 | + value: true, | ||
70 | + }, | ||
71 | + { | ||
72 | + type: 'el-slider', | ||
73 | + label: '点大小', | ||
74 | + name: 'pointSize', | ||
75 | + required: false, | ||
76 | + placeholder: '', | ||
77 | + value: 6, | ||
78 | + }, | ||
79 | + { | ||
80 | + type: 'el-switch', | ||
81 | + label: '平滑曲线', | ||
82 | + name: 'smoothCurve', | ||
83 | + required: false, | ||
84 | + placeholder: '', | ||
85 | + value: true, | ||
86 | + }, | ||
87 | + { | ||
88 | + type: 'el-switch', | ||
89 | + label: '面积堆积', | ||
90 | + name: 'area', | ||
91 | + required: false, | ||
92 | + placeholder: '', | ||
93 | + value: true, | ||
94 | + }, | ||
95 | + { | ||
96 | + type: 'el-slider', | ||
97 | + label: '面积厚度', | ||
98 | + name: 'areaThickness', | ||
99 | + required: false, | ||
100 | + placeholder: '', | ||
101 | + value: 5, | ||
102 | + }, | ||
103 | + { | ||
104 | + type: 'el-slider', | ||
105 | + label: '线条宽度', | ||
106 | + name: 'lineWidth', | ||
107 | + required: false, | ||
108 | + placeholder: '', | ||
109 | + value: 1, | ||
110 | + }, | ||
111 | + ], | ||
112 | + }, | ||
113 | + { | ||
114 | + name: '标题设置', | ||
115 | + list: [ | ||
116 | + { | ||
117 | + type: 'el-switch', | ||
118 | + label: '标题', | ||
119 | + name: 'isNoTitle', | ||
120 | + required: false, | ||
121 | + placeholder: '', | ||
122 | + value: true, | ||
123 | + }, | ||
124 | + { | ||
125 | + type: 'el-input-text', | ||
126 | + label: '标题', | ||
127 | + name: 'titleText', | ||
128 | + required: false, | ||
129 | + placeholder: '', | ||
130 | + value: '文件系统使用率', | ||
131 | + }, | ||
132 | + { | ||
133 | + type: 'vue-color', | ||
134 | + label: '字体颜色', | ||
135 | + name: 'textColor', | ||
136 | + required: false, | ||
137 | + placeholder: '', | ||
138 | + value: '#1e9fff' | ||
139 | + }, | ||
140 | + { | ||
141 | + type: 'el-select', | ||
142 | + label: '字体粗细', | ||
143 | + name: 'textFontWeight', | ||
144 | + required: false, | ||
145 | + placeholder: '', | ||
146 | + selectOptions: [ | ||
147 | + {code: 'normal', name: '正常'}, | ||
148 | + {code: 'bold', name: '粗体'}, | ||
149 | + {code: 'bolder', name: '特粗体'}, | ||
150 | + {code: 'lighter', name: '细体'} | ||
151 | + ], | ||
152 | + value: 'bold' | ||
153 | + }, | ||
154 | + { | ||
155 | + type: 'el-input-number', | ||
156 | + label: '字体大小', | ||
157 | + name: 'textFontSize', | ||
158 | + required: false, | ||
159 | + placeholder: '', | ||
160 | + value: 16 | ||
161 | + }, | ||
162 | + { | ||
163 | + type: 'el-select', | ||
164 | + label: '字体位置', | ||
165 | + name: 'textAlign', | ||
166 | + required: false, | ||
167 | + placeholder: '', | ||
168 | + selectOptions: [ | ||
169 | + {code: 'center', name: '居中'}, | ||
170 | + {code: 'left', name: '左对齐'}, | ||
171 | + {code: 'right', name: '右对齐'}, | ||
172 | + ], | ||
173 | + value: 'left' | ||
174 | + }, | ||
175 | + { | ||
176 | + type: 'el-input-text', | ||
177 | + label: '副标题', | ||
178 | + name: 'subText', | ||
179 | + required: false, | ||
180 | + placeholder: '', | ||
181 | + value: '' | ||
182 | + }, | ||
183 | + { | ||
184 | + type: 'vue-color', | ||
185 | + label: '字体颜色', | ||
186 | + name: 'subTextColor', | ||
187 | + required: false, | ||
188 | + placeholder: '', | ||
189 | + value: 'rgba(30, 144, 255, 1)' | ||
190 | + }, | ||
191 | + { | ||
192 | + type: 'el-select', | ||
193 | + label: '字体粗细', | ||
194 | + name: 'subTextFontWeight', | ||
195 | + required: false, | ||
196 | + placeholder: '', | ||
197 | + selectOptions: [ | ||
198 | + {code: 'normal', name: '正常'}, | ||
199 | + {code: 'bold', name: '粗体'}, | ||
200 | + {code: 'bolder', name: '特粗体'}, | ||
201 | + {code: 'lighter', name: '细体'} | ||
202 | + ], | ||
203 | + value: 'normal' | ||
204 | + }, | ||
205 | + { | ||
206 | + type: 'el-input-number', | ||
207 | + label: '字体大小', | ||
208 | + name: 'subTextFontSize', | ||
209 | + required: false, | ||
210 | + placeholder: '', | ||
211 | + value: 20 | ||
212 | + }, | ||
213 | + ], | ||
214 | + }, | ||
215 | + { | ||
216 | + name: 'X轴设置', | ||
217 | + list: [ | ||
218 | + { | ||
219 | + type: 'el-switch', | ||
220 | + label: '显示', | ||
221 | + name: 'hideX', | ||
222 | + required: false, | ||
223 | + placeholder: '', | ||
224 | + value: true, | ||
225 | + }, | ||
226 | + { | ||
227 | + type: 'el-input-text', | ||
228 | + label: 'X轴别名', | ||
229 | + name: 'xName', | ||
230 | + required: false, | ||
231 | + placeholder: '', | ||
232 | + value: '' | ||
233 | + }, | ||
234 | + { | ||
235 | + type: 'vue-color', | ||
236 | + label: '别名颜色', | ||
237 | + name: 'xNameColor', | ||
238 | + required: false, | ||
239 | + placeholder: '', | ||
240 | + value: '#fff' | ||
241 | + }, | ||
242 | + { | ||
243 | + type: 'el-input-number', | ||
244 | + label: '别名字号', | ||
245 | + name: 'xNameFontSize', | ||
246 | + required: false, | ||
247 | + placeholder: '', | ||
248 | + value: 14 | ||
249 | + }, | ||
250 | + { | ||
251 | + type: 'el-switch', | ||
252 | + label: '轴反转', | ||
253 | + name: 'reversalX', | ||
254 | + required: false, | ||
255 | + placeholder: '', | ||
256 | + value: false | ||
257 | + }, | ||
258 | + { | ||
259 | + type: 'el-slider', | ||
260 | + label: '文字角度', | ||
261 | + name: 'textAngleX', | ||
262 | + required: false, | ||
263 | + placeholder: '', | ||
264 | + value: 0 | ||
265 | + }, | ||
266 | + { | ||
267 | + type: 'el-input-number', | ||
268 | + label: '文字间隔', | ||
269 | + name: 'textInterval', | ||
270 | + required: false, | ||
271 | + placeholder: '', | ||
272 | + value: '' | ||
273 | + }, | ||
274 | + { | ||
275 | + type: 'vue-color', | ||
276 | + label: '文字颜色', | ||
277 | + name: 'Xcolor', | ||
278 | + required: false, | ||
279 | + placeholder: '', | ||
280 | + value: '#666', | ||
281 | + }, | ||
282 | + { | ||
283 | + type: 'el-input-number', | ||
284 | + label: '文字字号', | ||
285 | + name: 'fontSizeX', | ||
286 | + required: false, | ||
287 | + placeholder: '', | ||
288 | + value: 14, | ||
289 | + }, | ||
290 | + { | ||
291 | + type: 'vue-color', | ||
292 | + label: '轴颜色', | ||
293 | + name: 'lineColorX', | ||
294 | + required: false, | ||
295 | + placeholder: '', | ||
296 | + value: '#c9c9c9', | ||
297 | + }, | ||
298 | + { | ||
299 | + type: 'el-switch', | ||
300 | + label: '分割线显示', | ||
301 | + name: 'isShowSplitLineX', | ||
302 | + require: false, | ||
303 | + placeholder: '', | ||
304 | + value: false, | ||
305 | + }, | ||
306 | + { | ||
307 | + type: 'vue-color', | ||
308 | + label: '分割线颜色', | ||
309 | + name: 'splitLineColorX', | ||
310 | + required: false, | ||
311 | + placeholder: '', | ||
312 | + value: '#fff', | ||
313 | + | ||
314 | + }, | ||
315 | + { | ||
316 | + type: 'el-switch', | ||
317 | + label: '分割区显示', | ||
318 | + name: 'splitArea', | ||
319 | + require: false, | ||
320 | + placeholder: '', | ||
321 | + value: true, | ||
322 | + }, | ||
323 | + { | ||
324 | + type: 'vue-color', | ||
325 | + label: '分割区颜色', | ||
326 | + name: 'splitAreaColor', | ||
327 | + required: false, | ||
328 | + placeholder: '', | ||
329 | + value: 'rgba(200,200,200,0.1)', | ||
330 | + }, | ||
331 | + ], | ||
332 | + }, | ||
333 | + { | ||
334 | + name: 'Y轴设置', | ||
335 | + list: [ | ||
336 | + { | ||
337 | + type: 'el-switch', | ||
338 | + label: '显示', | ||
339 | + name: 'isShowY', | ||
340 | + require: false, | ||
341 | + placeholder: '', | ||
342 | + value: true, | ||
343 | + }, | ||
344 | + { | ||
345 | + type: 'el-input-text', | ||
346 | + label: 'Y轴别名', | ||
347 | + name: 'textNameY', | ||
348 | + require: false, | ||
349 | + placeholder: '', | ||
350 | + value: '' | ||
351 | + }, | ||
352 | + { | ||
353 | + type: 'vue-color', | ||
354 | + label: '别名颜色', | ||
355 | + name: 'NameColorY', | ||
356 | + required: false, | ||
357 | + placeholder: '', | ||
358 | + value: '#fff', | ||
359 | + }, | ||
360 | + { | ||
361 | + type: 'el-input-number', | ||
362 | + label: '别名字号', | ||
363 | + name: 'NameFontSizeY', | ||
364 | + required: false, | ||
365 | + placeholder: '', | ||
366 | + value: 14, | ||
367 | + }, | ||
368 | + { | ||
369 | + type: 'el-switch', | ||
370 | + label: '轴反转', | ||
371 | + name: 'reversalY', | ||
372 | + required: false, | ||
373 | + placeholder: '', | ||
374 | + value: false | ||
375 | + }, | ||
376 | + { | ||
377 | + type: 'el-slider', | ||
378 | + label: '文字角度', | ||
379 | + name: 'textAngleY', | ||
380 | + required: false, | ||
381 | + placeholder: '', | ||
382 | + value: 0 | ||
383 | + }, | ||
384 | + { | ||
385 | + type: 'vue-color', | ||
386 | + label: '文字颜色', | ||
387 | + name: 'colorY', | ||
388 | + required: false, | ||
389 | + placeholder: '', | ||
390 | + value: '#666', | ||
391 | + }, | ||
392 | + { | ||
393 | + type: 'el-input-number', | ||
394 | + label: '文字字号', | ||
395 | + name: 'fontSizeY', | ||
396 | + required: false, | ||
397 | + placeholder: '', | ||
398 | + value: 14, | ||
399 | + }, | ||
400 | + { | ||
401 | + type: 'vue-color', | ||
402 | + label: '轴颜色', | ||
403 | + name: 'lineColorY', | ||
404 | + required: false, | ||
405 | + placeholder: '', | ||
406 | + value: '#c9c9c9', | ||
407 | + }, { | ||
408 | + type: 'el-switch', | ||
409 | + label: '分割线显示', | ||
410 | + name: 'isShowSplitLineY', | ||
411 | + require: false, | ||
412 | + placeholder: '', | ||
413 | + value: false, | ||
414 | + }, { | ||
415 | + type: 'vue-color', | ||
416 | + label: '分割线颜色', | ||
417 | + name: 'splitLineColorY', | ||
418 | + required: false, | ||
419 | + placeholder: '', | ||
420 | + value: '#fff', | ||
421 | + | ||
422 | + } | ||
423 | + ], | ||
424 | + }, | ||
425 | + { | ||
426 | + name: '数值设定', | ||
427 | + list: [ | ||
428 | + { | ||
429 | + type: 'el-switch', | ||
430 | + label: '显示', | ||
431 | + name: 'isShow', | ||
432 | + required: false, | ||
433 | + placeholder: '', | ||
434 | + value: false | ||
435 | + }, | ||
436 | + { | ||
437 | + type: 'el-input-number', | ||
438 | + label: '字体大小', | ||
439 | + name: 'fontSize', | ||
440 | + required: false, | ||
441 | + placeholder: '', | ||
442 | + value: 14 | ||
443 | + }, | ||
444 | + { | ||
445 | + type: 'vue-color', | ||
446 | + label: '字体颜色', | ||
447 | + name: 'subTextColor', | ||
448 | + required: false, | ||
449 | + placeholder: '', | ||
450 | + value: '#666' | ||
451 | + }, | ||
452 | + { | ||
453 | + type: 'el-select', | ||
454 | + label: '字体粗细', | ||
455 | + name: 'fontWeight', | ||
456 | + required: false, | ||
457 | + placeholder: '', | ||
458 | + selectOptions: [ | ||
459 | + {code: 'normal', name: '正常'}, | ||
460 | + {code: 'bold', name: '粗体'}, | ||
461 | + {code: 'bolder', name: '特粗体'}, | ||
462 | + {code: 'lighter', name: '细体'} | ||
463 | + ], | ||
464 | + value: 'normal' | ||
465 | + }, | ||
466 | + ], | ||
467 | + }, | ||
468 | + { | ||
469 | + name: '提示语设置', | ||
470 | + list: [ | ||
471 | + { | ||
472 | + type: 'el-input-number', | ||
473 | + label: '字体大小', | ||
474 | + name: 'tipsFontSize', | ||
475 | + required: false, | ||
476 | + placeholder: '', | ||
477 | + value: 16 | ||
478 | + }, | ||
479 | + { | ||
480 | + type: 'vue-color', | ||
481 | + label: '字体颜色', | ||
482 | + name: 'lineColor', | ||
483 | + required: false, | ||
484 | + placeholder: '', | ||
485 | + }, | ||
486 | + ], | ||
487 | + }, | ||
488 | + { | ||
489 | + name: '坐标轴边距设置', | ||
490 | + list: [ | ||
491 | + { | ||
492 | + type: 'el-slider', | ||
493 | + label: '左边距(像素)', | ||
494 | + name: 'marginLeft', | ||
495 | + required: false, | ||
496 | + placeholder: '', | ||
497 | + value: 10, | ||
498 | + }, { | ||
499 | + type: 'el-slider', | ||
500 | + label: '顶边距(像素)', | ||
501 | + name: 'marginTop', | ||
502 | + required: false, | ||
503 | + placeholder: '', | ||
504 | + value: 50, | ||
505 | + }, { | ||
506 | + type: 'el-slider', | ||
507 | + label: '右边距(像素)', | ||
508 | + name: 'marginRight', | ||
509 | + required: false, | ||
510 | + placeholder: '', | ||
511 | + value: 40, | ||
512 | + }, { | ||
513 | + type: 'el-slider', | ||
514 | + label: '底边距(像素)', | ||
515 | + name: 'marginBottom', | ||
516 | + required: false, | ||
517 | + placeholder: '', | ||
518 | + value: 10, | ||
519 | + }, | ||
520 | + ], | ||
521 | + }, | ||
522 | + { | ||
523 | + name: '图例操作', | ||
524 | + list: [ | ||
525 | + { | ||
526 | + type: 'el-switch', | ||
527 | + label: '显示', | ||
528 | + name: 'isShowLegend', | ||
529 | + required: false, | ||
530 | + placeholder: '', | ||
531 | + value: true, | ||
532 | + }, | ||
533 | + { | ||
534 | + type: 'el-switch', | ||
535 | + label: '图例文字显示', | ||
536 | + name: 'isShowLegendText', | ||
537 | + required: false, | ||
538 | + placeholder: '', | ||
539 | + value: false, | ||
540 | + }, | ||
541 | + { | ||
542 | + type: 'vue-color', | ||
543 | + label: '字体颜色', | ||
544 | + name: 'lengedColor', | ||
545 | + required: false, | ||
546 | + placeholder: '', | ||
547 | + value: '#666', | ||
548 | + }, | ||
549 | + { | ||
550 | + type: 'el-input-number', | ||
551 | + label: '字体大小', | ||
552 | + name: 'lengedFontSize', | ||
553 | + required: false, | ||
554 | + placeholder: '', | ||
555 | + value: 14, | ||
556 | + }, | ||
557 | + { | ||
558 | + type: 'el-input-number', | ||
559 | + label: '图例宽度', | ||
560 | + name: 'lengedWidth', | ||
561 | + required: false, | ||
562 | + placeholder: '', | ||
563 | + value: 15, | ||
564 | + }, | ||
565 | + { | ||
566 | + type: 'el-select', | ||
567 | + label: '横向位置', | ||
568 | + name: 'lateralPosition', | ||
569 | + required: false, | ||
570 | + placeholder: '', | ||
571 | + selectOptions: [ | ||
572 | + {code: 'center', name: '居中'}, | ||
573 | + {code: 'left', name: '左对齐'}, | ||
574 | + {code: 'right', name: '右对齐'}, | ||
575 | + ], | ||
576 | + value: 'center' | ||
577 | + }, | ||
578 | + { | ||
579 | + type: 'el-select', | ||
580 | + label: '纵向位置', | ||
581 | + name: 'longitudinalPosition', | ||
582 | + required: false, | ||
583 | + placeholder: '', | ||
584 | + selectOptions: [ | ||
585 | + {code: 'top', name: '顶部'}, | ||
586 | + {code: 'bottom', name: '底部'}, | ||
587 | + ], | ||
588 | + value: 'top' | ||
589 | + }, | ||
590 | + { | ||
591 | + type: 'el-select', | ||
592 | + label: '布局前置', | ||
593 | + name: 'layoutFront', | ||
594 | + required: false, | ||
595 | + placeholder: '', | ||
596 | + selectOptions: [ | ||
597 | + {code: 'vertical', name: '竖排'}, | ||
598 | + {code: 'horizontal', name: '横排'}, | ||
599 | + ], | ||
600 | + value: 'horizontal' | ||
601 | + }, | ||
602 | + ], | ||
603 | + }, | ||
604 | + { | ||
605 | + name: '自定义配色', | ||
606 | + list: [ | ||
607 | + { | ||
608 | + type: 'customColor', | ||
609 | + label: '', | ||
610 | + name: 'customColor', | ||
611 | + required: false, | ||
612 | + value: [{color: '#facf5b'}, {color: '#C04DD8'}, {color: '#F5A1EB'}, {color: '#F36093'}, | ||
613 | + {color: '#C2E74D'},{color:'#3DC3FF'},{color:'#B850ED'}], | ||
614 | + }, | ||
615 | + ], | ||
616 | + }, | ||
617 | + ], | ||
618 | + ], | ||
619 | + // 数据 | ||
620 | + data: [ | ||
621 | + { | ||
622 | + type: 'el-radio-group', | ||
623 | + label: '数据类型', | ||
624 | + name: 'dataType', | ||
625 | + require: false, | ||
626 | + placeholder: '', | ||
627 | + selectValue: true, | ||
628 | + selectOptions: [ | ||
629 | + { | ||
630 | + code: 'staticData', | ||
631 | + name: '静态数据', | ||
632 | + }, | ||
633 | + { | ||
634 | + code: 'dynamicData', | ||
635 | + name: '动态数据', | ||
636 | + }, | ||
637 | + ], | ||
638 | + value: 'staticData', | ||
639 | + }, | ||
640 | + { | ||
641 | + type: 'el-input-number', | ||
642 | + label: '刷新时间(毫秒)', | ||
643 | + name: 'refreshTime', | ||
644 | + relactiveDom: 'dataType', | ||
645 | + relactiveDomValue: 'dynamicData', | ||
646 | + value: 5000 | ||
647 | + }, | ||
648 | + { | ||
649 | + type: 'el-button', | ||
650 | + label: '静态数据', | ||
651 | + name: 'staticData', | ||
652 | + required: false, | ||
653 | + placeholder: '静态数据源', | ||
654 | + relactiveDom: 'dataType', | ||
655 | + relactiveDomValue: 'staticData', | ||
656 | + value: [{ | ||
657 | + "year": 2022, | ||
658 | + "month": 4, | ||
659 | + "day": 28, | ||
660 | + "hour": 10, | ||
661 | + "kpiName": "内存分配率", | ||
662 | + "kpiUnit": "%", | ||
663 | + "valMin": 67.94, | ||
664 | + "valAvg": 67.94, | ||
665 | + "valMax": 67.94 | ||
666 | + }], | ||
667 | + }, | ||
668 | + { | ||
669 | + type: 'dycustComponents', | ||
670 | + label: '', | ||
671 | + name: 'dynamicData', | ||
672 | + required: false, | ||
673 | + placeholder: '动态数据源', | ||
674 | + relactiveDom: 'dataType', | ||
675 | + relactiveDomValue: 'dynamicData', | ||
676 | + chartType: '', | ||
677 | + dictKey: 'STACK_PROPERTIES', | ||
678 | + value: '', | ||
679 | + }, | ||
680 | + ], | ||
681 | + // 坐标 | ||
682 | + position: [ | ||
683 | + { | ||
684 | + type: 'el-input-number', | ||
685 | + label: '左边距', | ||
686 | + name: 'left', | ||
687 | + required: false, | ||
688 | + placeholder: '', | ||
689 | + value: 0, | ||
690 | + }, | ||
691 | + { | ||
692 | + type: 'el-input-number', | ||
693 | + label: '上边距', | ||
694 | + name: 'top', | ||
695 | + required: false, | ||
696 | + placeholder: '', | ||
697 | + value: 0, | ||
698 | + }, | ||
699 | + { | ||
700 | + type: 'el-input-number', | ||
701 | + label: '宽度', | ||
702 | + name: 'width', | ||
703 | + required: false, | ||
704 | + placeholder: '该容器在1920px大屏中的宽度', | ||
705 | + value: 400, | ||
706 | + }, | ||
707 | + { | ||
708 | + type: 'el-input-number', | ||
709 | + label: '高度', | ||
710 | + name: 'height', | ||
711 | + required: false, | ||
712 | + placeholder: '该容器在1080px大屏中的高度', | ||
713 | + value: 200, | ||
714 | + }, | ||
715 | + ], | ||
716 | + } | ||
717 | +} |
1 | +/** | ||
2 | + * 积木报表按钮跳转到积木报表 | ||
3 | + */ | ||
4 | +export const monitorJimuButton = { | ||
5 | + code: 'monitor-jimu-button', | ||
6 | + type: 'html', | ||
7 | + label: '积木报表', | ||
8 | + icon: 'iconbiaoge', | ||
9 | + options: { | ||
10 | + setup: [ | ||
11 | + { | ||
12 | + type: 'el-input-text', | ||
13 | + label: '图层名称', | ||
14 | + name: 'layerName', | ||
15 | + required: false, | ||
16 | + placeholder: '', | ||
17 | + value: '积木报表按钮', | ||
18 | + }, | ||
19 | + { | ||
20 | + type: 'el-input-text', | ||
21 | + label: '按钮文本', | ||
22 | + name: 'buttonText', | ||
23 | + required: false, | ||
24 | + placeholder: '', | ||
25 | + value: '报表', | ||
26 | + }, | ||
27 | + { | ||
28 | + type: 'el-input-text', | ||
29 | + label: '报表编号', | ||
30 | + name: 'reportCode', | ||
31 | + required: false, | ||
32 | + placeholder: '', | ||
33 | + value: '' | ||
34 | + }, | ||
35 | + { | ||
36 | + type: 'el-input-text', | ||
37 | + label: '指标Id', | ||
38 | + name: 'kpiId', | ||
39 | + required: false, | ||
40 | + placeholder: '', | ||
41 | + value: '' | ||
42 | + }, | ||
43 | + { | ||
44 | + type: 'el-input-text', | ||
45 | + label: 'flag', | ||
46 | + name: 'flag', | ||
47 | + required: false, | ||
48 | + placeholder: '', | ||
49 | + value: '' | ||
50 | + } | ||
51 | + ], | ||
52 | + data: [], | ||
53 | + position: [ | ||
54 | + { | ||
55 | + type: 'el-input-number', | ||
56 | + label: '左边距', | ||
57 | + name: 'left', | ||
58 | + required: false, | ||
59 | + placeholder: '', | ||
60 | + value: 0, | ||
61 | + }, | ||
62 | + { | ||
63 | + type: 'el-input-number', | ||
64 | + label: '上边距', | ||
65 | + name: 'top', | ||
66 | + required: false, | ||
67 | + placeholder: '', | ||
68 | + value: 0, | ||
69 | + }, | ||
70 | + { | ||
71 | + type: 'el-input-number', | ||
72 | + label: '宽度', | ||
73 | + name: 'width', | ||
74 | + required: false, | ||
75 | + placeholder: '该容器在1920px大屏中的宽度', | ||
76 | + value: 30, | ||
77 | + }, | ||
78 | + { | ||
79 | + type: 'el-input-number', | ||
80 | + label: '高度', | ||
81 | + name: 'height', | ||
82 | + required: false, | ||
83 | + placeholder: '该容器在1080px大屏中的高度', | ||
84 | + value: 30, | ||
85 | + }, | ||
86 | + ], | ||
87 | + } | ||
88 | +} |
@@ -74,6 +74,15 @@ export const monitorProgressInformation = { | @@ -74,6 +74,15 @@ export const monitorProgressInformation = { | ||
74 | ], | 74 | ], |
75 | value: 'column' | 75 | value: 'column' |
76 | }, | 76 | }, |
77 | + | ||
78 | + { | ||
79 | + type: 'el-input-number', | ||
80 | + label: '每组进度条高度', | ||
81 | + name: 'itemHeight', | ||
82 | + required: false, | ||
83 | + placeholder: '', | ||
84 | + value: '250' | ||
85 | + }, | ||
77 | [ | 86 | [ |
78 | { | 87 | { |
79 | name: '标题设置', | 88 | name: '标题设置', |
1 | +/* | ||
2 | +* 下拉列表 | ||
3 | +* author lsq | ||
4 | +* 2022/05/17 | ||
5 | +* */ | ||
6 | +export const monitorSelectOption = { | ||
7 | + code: 'monitor-select-option', | ||
8 | + type: 'html', | ||
9 | + label: '下拉列表', | ||
10 | + icon: 'iconchaolianjie', | ||
11 | + options: { | ||
12 | + setup: [ | ||
13 | + { | ||
14 | + type: 'el-input-text', | ||
15 | + label: '图层名称', | ||
16 | + name: 'layerName', | ||
17 | + required: false, | ||
18 | + placeholder: '', | ||
19 | + value: '背景', | ||
20 | + }, | ||
21 | + { | ||
22 | + type: 'el-input-text', | ||
23 | + label: 'placeholder', | ||
24 | + name: 'placeholderVal', | ||
25 | + required: false, | ||
26 | + placeholder: '', | ||
27 | + value: '请选择', | ||
28 | + }, | ||
29 | + { | ||
30 | + type: 'el-input-text', | ||
31 | + label: '全部的值', | ||
32 | + name: 'allValue', | ||
33 | + required: false, | ||
34 | + placeholder: '', | ||
35 | + value: 'disk-all', | ||
36 | + }, | ||
37 | + { | ||
38 | + type: 'el-switch', | ||
39 | + label: '是否可清空', | ||
40 | + name: 'clearable', | ||
41 | + required: false, | ||
42 | + placeholder: '', | ||
43 | + value: true | ||
44 | + }, | ||
45 | + { | ||
46 | + type: 'el-switch', | ||
47 | + label: '是否可筛选', | ||
48 | + name: 'filterable', | ||
49 | + required: false, | ||
50 | + placeholder: '', | ||
51 | + value: true | ||
52 | + }, | ||
53 | + /* { | ||
54 | + type: 'el-switch', | ||
55 | + label: '是否可多选', | ||
56 | + name: 'multiple', | ||
57 | + required: false, | ||
58 | + placeholder: '', | ||
59 | + value: false | ||
60 | + },*/ | ||
61 | + { | ||
62 | + type: 'el-switch', | ||
63 | + label: '是否加全部', | ||
64 | + name: 'isAll', | ||
65 | + required: false, | ||
66 | + placeholder: '', | ||
67 | + value: true | ||
68 | + }, | ||
69 | + { | ||
70 | + type: 'el-input-number', | ||
71 | + label: '下拉列表宽度', | ||
72 | + name: 'selectWidth', | ||
73 | + required: false, | ||
74 | + placeholder: '', | ||
75 | + value: '160' | ||
76 | + }, | ||
77 | + /* { | ||
78 | + type: 'el-input-number', | ||
79 | + label: '下拉列表高度', | ||
80 | + name: 'selectHeight', | ||
81 | + required: false, | ||
82 | + placeholder: '', | ||
83 | + value: '28' | ||
84 | + },*/ | ||
85 | + { | ||
86 | + type: 'el-switch', | ||
87 | + label: '加边框', | ||
88 | + name: 'isBorder', | ||
89 | + required: false, | ||
90 | + placeholder: '', | ||
91 | + value: true | ||
92 | + }, | ||
93 | + { | ||
94 | + type: 'vue-color', | ||
95 | + label: '边框颜色', | ||
96 | + name: 'borderColor', | ||
97 | + required: false, | ||
98 | + placeholder: '', | ||
99 | + value: 'rgba(151, 151, 151, 0.13)', | ||
100 | + }, | ||
101 | + { | ||
102 | + type: 'custom-upload', | ||
103 | + label: '标题图标', | ||
104 | + name: 'titleIcon', | ||
105 | + required: false, | ||
106 | + placeholder: '', | ||
107 | + value: require("../../../../../../../assets/images/monitor/capacityAnalysis/icon-trend.png"), | ||
108 | + }, | ||
109 | + { | ||
110 | + type: 'vue-color', | ||
111 | + label: '背景颜色', | ||
112 | + name: 'bgColor', | ||
113 | + required: false, | ||
114 | + placeholder: '', | ||
115 | + value: '', | ||
116 | + }, | ||
117 | + { | ||
118 | + type: 'custom-upload', | ||
119 | + label: '背景图片', | ||
120 | + name: 'imageAdress', | ||
121 | + required: false, | ||
122 | + placeholder: '', | ||
123 | + value: '', | ||
124 | + }, | ||
125 | + { | ||
126 | + type: 'el-input-number', | ||
127 | + label: '字体大小', | ||
128 | + name: 'fontSize', | ||
129 | + required: false, | ||
130 | + placeholder: '', | ||
131 | + value: '14' | ||
132 | + }, | ||
133 | + [ | ||
134 | + { | ||
135 | + name: '标题设置', | ||
136 | + list: [ | ||
137 | + { | ||
138 | + type: 'el-switch', | ||
139 | + label: '是否有标题', | ||
140 | + name: 'isTitle', | ||
141 | + required: false, | ||
142 | + placeholder: '', | ||
143 | + value: false, | ||
144 | + }, | ||
145 | + { | ||
146 | + type: 'el-input-text', | ||
147 | + label: '标题名称', | ||
148 | + name: 'titleName', | ||
149 | + required: false, | ||
150 | + placeholder: '', | ||
151 | + value: '系统信息', | ||
152 | + }, | ||
153 | + | ||
154 | + { | ||
155 | + type: 'el-select', | ||
156 | + label: '字体位置', | ||
157 | + name: 'textAlign', | ||
158 | + required: false, | ||
159 | + placeholder: '', | ||
160 | + selectOptions: [ | ||
161 | + {code: 'center', name: '居中'}, | ||
162 | + {code: 'left', name: '左对齐'}, | ||
163 | + {code: 'right', name: '右对齐'}, | ||
164 | + ], | ||
165 | + value: 'left' | ||
166 | + }, | ||
167 | + | ||
168 | + { | ||
169 | + type: 'el-input-number', | ||
170 | + label: '字体大小', | ||
171 | + name: 'titleFontSize', | ||
172 | + required: false, | ||
173 | + placeholder: '', | ||
174 | + value: '18' | ||
175 | + }, | ||
176 | + { | ||
177 | + type: 'vue-color', | ||
178 | + label: '字体颜色', | ||
179 | + name: 'titleColor', | ||
180 | + required: false, | ||
181 | + placeholder: '', | ||
182 | + value: '#666' | ||
183 | + }, | ||
184 | + { | ||
185 | + type: 'el-select', | ||
186 | + label: '字体粗细', | ||
187 | + name: 'titleFontWeight', | ||
188 | + required: false, | ||
189 | + placeholder: '', | ||
190 | + selectOptions: [ | ||
191 | + {code: 'normal', name: '正常'}, | ||
192 | + {code: 'bold', name: '粗体'}, | ||
193 | + {code: 'bolder', name: '特粗体'}, | ||
194 | + {code: 'lighter', name: '细体'} | ||
195 | + ], | ||
196 | + value: 'normal' | ||
197 | + }, | ||
198 | + ] | ||
199 | + }, | ||
200 | + { | ||
201 | + name: '按钮组设置', | ||
202 | + list: [ | ||
203 | + { | ||
204 | + type: 'el-switch', | ||
205 | + label: '年是否显示', | ||
206 | + name: 'isYear', | ||
207 | + required: false, | ||
208 | + placeholder: '', | ||
209 | + value: true, | ||
210 | + }, | ||
211 | + { | ||
212 | + type: 'el-switch', | ||
213 | + label: '季度是否显示', | ||
214 | + name: 'isQuarter', | ||
215 | + required: false, | ||
216 | + placeholder: '', | ||
217 | + value: true, | ||
218 | + }, | ||
219 | + { | ||
220 | + type: 'el-switch', | ||
221 | + label: '月是否显示', | ||
222 | + name: 'isMonth', | ||
223 | + required: false, | ||
224 | + placeholder: '', | ||
225 | + value: true, | ||
226 | + }, | ||
227 | + ] | ||
228 | + }, | ||
229 | + | ||
230 | + ], | ||
231 | + | ||
232 | + ], | ||
233 | + data: [ | ||
234 | + { | ||
235 | + type: 'el-radio-group', | ||
236 | + label: '数据类型', | ||
237 | + name: 'dataType', | ||
238 | + require: false, | ||
239 | + placeholder: '', | ||
240 | + selectValue: true, | ||
241 | + selectOptions: [ | ||
242 | + { | ||
243 | + code: 'staticData', | ||
244 | + name: '静态数据', | ||
245 | + }, | ||
246 | + { | ||
247 | + code: 'dynamicData', | ||
248 | + name: '动态数据', | ||
249 | + }, | ||
250 | + ], | ||
251 | + value: 'staticData', | ||
252 | + }, | ||
253 | + { | ||
254 | + type: 'el-switch', | ||
255 | + label: '是否刷新', | ||
256 | + name: 'isRefresh', | ||
257 | + relactiveDom: 'dataType', | ||
258 | + relactiveDomValue: 'dynamicData', | ||
259 | + value: false | ||
260 | + }, | ||
261 | + { | ||
262 | + type: 'el-input-number', | ||
263 | + label: '刷新时间(毫秒)', | ||
264 | + name: 'refreshTime', | ||
265 | + relactiveDom: 'dataType', | ||
266 | + relactiveDomValue: 'dynamicData', | ||
267 | + value: 30000 | ||
268 | + }, | ||
269 | + { | ||
270 | + type: 'el-button', | ||
271 | + label: '静态数据', | ||
272 | + name: 'staticData', | ||
273 | + required: false, | ||
274 | + placeholder: '', | ||
275 | + relactiveDom: 'dataType', | ||
276 | + relactiveDomValue: 'staticData', | ||
277 | + value: [{value:1,label:'选项1',disabled:false},{value:2,label:'选项3',disabled:true}], | ||
278 | + }, | ||
279 | + { | ||
280 | + type: 'dycustComponents', | ||
281 | + label: '', | ||
282 | + name: 'dynamicData', | ||
283 | + required: false, | ||
284 | + placeholder: '', | ||
285 | + relactiveDom: 'dataType', | ||
286 | + relactiveDomValue: 'dynamicData', | ||
287 | + chartType: 'widget-table', | ||
288 | + dictKey: 'TEXT_PROPERTIES', //表格的暂不起作用 | ||
289 | + value: '', | ||
290 | + }, | ||
291 | + ], | ||
292 | + position: [ | ||
293 | + { | ||
294 | + type: 'el-input-number', | ||
295 | + label: '左边距', | ||
296 | + name: 'left', | ||
297 | + required: false, | ||
298 | + placeholder: '', | ||
299 | + value: 0, | ||
300 | + }, | ||
301 | + { | ||
302 | + type: 'el-input-number', | ||
303 | + label: '上边距', | ||
304 | + name: 'top', | ||
305 | + required: false, | ||
306 | + placeholder: '', | ||
307 | + value: 0, | ||
308 | + }, | ||
309 | + { | ||
310 | + type: 'el-input-number', | ||
311 | + label: '宽度', | ||
312 | + name: 'width', | ||
313 | + required: false, | ||
314 | + placeholder: '该容器在1920px大屏中的宽度', | ||
315 | + value: 550, | ||
316 | + }, | ||
317 | + { | ||
318 | + type: 'el-input-number', | ||
319 | + label: '高度', | ||
320 | + name: 'height', | ||
321 | + required: false, | ||
322 | + placeholder: '该容器在1080px大屏中的高度', | ||
323 | + value: 50, | ||
324 | + }, | ||
325 | + ] | ||
326 | + } | ||
327 | +} |
@@ -206,6 +206,14 @@ export const monitorSystemInformation = { | @@ -206,6 +206,14 @@ export const monitorSystemInformation = { | ||
206 | value: 'staticData', | 206 | value: 'staticData', |
207 | }, | 207 | }, |
208 | { | 208 | { |
209 | + type: 'el-switch', | ||
210 | + label: '是否刷新', | ||
211 | + name: 'isRefresh', | ||
212 | + relactiveDom: 'dataType', | ||
213 | + relactiveDomValue: 'dynamicData', | ||
214 | + value: false | ||
215 | + }, | ||
216 | + { | ||
209 | type: 'el-input-number', | 217 | type: 'el-input-number', |
210 | label: '刷新时间(毫秒)', | 218 | label: '刷新时间(毫秒)', |
211 | name: 'refreshTime', | 219 | name: 'refreshTime', |
@@ -291,6 +291,14 @@ export const monitorTablePage = { | @@ -291,6 +291,14 @@ export const monitorTablePage = { | ||
291 | value: 'staticData', | 291 | value: 'staticData', |
292 | }, | 292 | }, |
293 | { | 293 | { |
294 | + type: 'el-switch', | ||
295 | + label: '是否刷新', | ||
296 | + name: 'isRefresh', | ||
297 | + relactiveDom: 'dataType', | ||
298 | + relactiveDomValue: 'dynamicData', | ||
299 | + value: false | ||
300 | + }, | ||
301 | + { | ||
294 | type: 'el-input-number', | 302 | type: 'el-input-number', |
295 | label: '刷新时间(毫秒)', | 303 | label: '刷新时间(毫秒)', |
296 | name: 'refreshTime', | 304 | name: 'refreshTime', |
@@ -48,6 +48,22 @@ export const monitorTreeShape = { | @@ -48,6 +48,22 @@ export const monitorTreeShape = { | ||
48 | }, | 48 | }, |
49 | { | 49 | { |
50 | type: 'el-input-text', | 50 | type: 'el-input-text', |
51 | + label: '业务二级页不同类型相关页面编码', | ||
52 | + name: 'serviceSecondCode', | ||
53 | + required: false, | ||
54 | + placeholder: '', | ||
55 | + value: 'service_capacity_analysis_second,service_capacity_analysis_second_mem,service_capacity_analysis_second_tps', | ||
56 | + }, | ||
57 | + { | ||
58 | + type: 'el-input-text', | ||
59 | + label: '业务三级页不同类型相关页面编码', | ||
60 | + name: 'serviceTertiaryCode', | ||
61 | + required: false, | ||
62 | + placeholder: '', | ||
63 | + value: 'service_capacity_analysis_tertiary,service_capacity_analysis_tertiary,service_capacity_analysis_tertiary_tps', | ||
64 | + }, | ||
65 | + { | ||
66 | + type: 'el-input-text', | ||
51 | label: '资源系统相关页面编码', | 67 | label: '资源系统相关页面编码', |
52 | name: 'resourceCode', | 68 | name: 'resourceCode', |
53 | required: false, | 69 | required: false, |
@@ -55,6 +71,38 @@ export const monitorTreeShape = { | @@ -55,6 +71,38 @@ export const monitorTreeShape = { | ||
55 | value: 'resource_capacity_analysis', | 71 | value: 'resource_capacity_analysis', |
56 | }, | 72 | }, |
57 | { | 73 | { |
74 | + type: 'el-input-text', | ||
75 | + label: '资源二级页不同类型相关页面编码', | ||
76 | + name: 'resourceSecondCode', | ||
77 | + required: false, | ||
78 | + placeholder: '', | ||
79 | + value: 'resource_capacity_analysis,service_capacity_analysis_second_mem,service_capacity_analysis_second_tps', | ||
80 | + }, | ||
81 | + { | ||
82 | + type: 'el-input-text', | ||
83 | + label: '资源三级页不同类型相关页面编码', | ||
84 | + name: 'resourceTertiaryCode', | ||
85 | + required: false, | ||
86 | + placeholder: '', | ||
87 | + value: 'service_capacity_analysis_tertiary,service_capacity_analysis_tertiary,service_capacity_analysis_tertiary_tps', | ||
88 | + }, | ||
89 | + { | ||
90 | + type: 'el-input-text', | ||
91 | + label: '字树节点', | ||
92 | + name: 'propsChildren', | ||
93 | + required: false, | ||
94 | + placeholder: '', | ||
95 | + value: 'children', | ||
96 | + }, | ||
97 | + { | ||
98 | + type: 'el-input-text', | ||
99 | + label: '节点标签', | ||
100 | + name: 'propsLabel', | ||
101 | + required: false, | ||
102 | + placeholder: '', | ||
103 | + value: 'label', | ||
104 | + }, | ||
105 | + { | ||
58 | type: 'el-switch', | 106 | type: 'el-switch', |
59 | label: '加边框', | 107 | label: '加边框', |
60 | name: 'isBorder', | 108 | name: 'isBorder', |
@@ -140,6 +188,14 @@ export const monitorTreeShape = { | @@ -140,6 +188,14 @@ export const monitorTreeShape = { | ||
140 | value: 'staticData', | 188 | value: 'staticData', |
141 | }, | 189 | }, |
142 | { | 190 | { |
191 | + type: 'el-switch', | ||
192 | + label: '是否刷新', | ||
193 | + name: 'isRefresh', | ||
194 | + relactiveDom: 'dataType', | ||
195 | + relactiveDomValue: 'dynamicData', | ||
196 | + value: true | ||
197 | + }, | ||
198 | + { | ||
143 | type: 'el-input-number', | 199 | type: 'el-input-number', |
144 | label: '刷新时间(毫秒)', | 200 | label: '刷新时间(毫秒)', |
145 | name: 'refreshTime', | 201 | name: 'refreshTime', |
@@ -242,7 +298,7 @@ export const monitorTreeShape = { | @@ -242,7 +298,7 @@ export const monitorTreeShape = { | ||
242 | required: false, | 298 | required: false, |
243 | placeholder: '', | 299 | placeholder: '', |
244 | relactiveDom: 'dataType', | 300 | relactiveDom: 'dataType', |
245 | - chartType: 'widget-piechart', | 301 | + chartType: 'widget-table', |
246 | dictKey: 'TEXT_PROPERTIES', | 302 | dictKey: 'TEXT_PROPERTIES', |
247 | relactiveDomValue: 'dynamicData', | 303 | relactiveDomValue: 'dynamicData', |
248 | value: '', | 304 | value: '', |
-
Please register or login to post a comment