From 793391c23ba45b3dab55657ecd2448d87e17f854 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 16 九月 2025 13:49:53 +0800
Subject: [PATCH] 设备巡检、智能派单
---
src/components/qiun-data-charts/js_sdk/u-charts/config-echarts.js | 422 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 422 insertions(+), 0 deletions(-)
diff --git a/src/components/qiun-data-charts/js_sdk/u-charts/config-echarts.js b/src/components/qiun-data-charts/js_sdk/u-charts/config-echarts.js
new file mode 100644
index 0000000..7b8168f
--- /dev/null
+++ b/src/components/qiun-data-charts/js_sdk/u-charts/config-echarts.js
@@ -0,0 +1,422 @@
+/*
+ * uCharts庐
+ * 楂樻�ц兘璺ㄥ钩鍙板浘琛ㄥ簱锛屾敮鎸丠5銆丄PP銆佸皬绋嬪簭锛堝井淇�/鏀粯瀹�/鐧惧害/澶存潯/QQ/360锛夈�乂ue銆乀aro绛夋敮鎸乧anvas鐨勬鏋跺钩鍙�
+ * Copyright (c) 2021 QIUN庐绉嬩簯 https://www.ucharts.cn All rights reserved.
+ * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+ * 澶嶅埗浣跨敤璇蜂繚鐣欐湰娈垫敞閲婏紝鎰熻阿鏀寔寮�婧愶紒
+ *
+ * uCharts庐瀹樻柟缃戠珯
+ * https://www.uCharts.cn
+ *
+ * 寮�婧愬湴鍧�:
+ * https://gitee.com/uCharts/uCharts
+ *
+ * uni-app鎻掍欢甯傚満鍦板潃锛�
+ * http://ext.dcloud.net.cn/plugin?id=271
+ *
+ */
+
+// 閫氱敤閰嶇疆椤�
+
+// 涓婚棰滆壊閰嶇疆锛氬姣忎釜鍥捐〃绫诲瀷闇�瑕佷笉鍚屼富棰橈紝璇峰湪瀵瑰簲鍥捐〃绫诲瀷涓婃洿鏀筩olor灞炴��
+const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
+
+const cfe = {
+ //demotype涓鸿嚜瀹氫箟鍥捐〃绫诲瀷
+ "type": ["pie", "ring", "rose", "funnel", "line", "column", "area", "radar", "gauge","candle","demotype"],
+ //澧炲姞鑷畾涔夊浘琛ㄧ被鍨嬶紝濡傛灉闇�瑕乧ategories锛岃鍦ㄨ繖閲屽姞鍏ユ偍鐨勫浘琛ㄧ被鍨嬩緥濡傛渶鍚庣殑"demotype"
+ "categories": ["line", "column", "area", "radar", "gauge", "candle","demotype"],
+ //instance涓哄疄渚嬪彉閲忔壙杞藉睘鎬э紝option涓篹opts鎵胯浇灞炴�э紝涓嶈鍒犻櫎
+ "instance": {},
+ "option": {},
+ //涓嬮潰鏄嚜瀹氫箟format閰嶇疆锛屽洜闄5绔鐨勫叾浠栫鏃犳硶閫氳繃props浼犻�掑嚱鏁帮紝鍙兘閫氳繃姝ゅ睘鎬у搴斾笅鏍囩殑鏂瑰紡鏉ユ浛鎹�
+ "formatter":{
+ "tooltipDemo1":function(res){
+ let result = ''
+ for (let i in res) {
+ if (i == 0) {
+ result += res[i].axisValueLabel + '骞撮攢鍞'
+ }
+ let value = '--'
+ if (res[i].data !== null) {
+ value = res[i].data
+ }
+ // #ifdef H5
+ result += '\n' + res[i].seriesName + '锛�' + value + ' 涓囧厓'
+ // #endif
+
+ // #ifdef APP-PLUS
+ result += '<br/>' + res[i].marker + res[i].seriesName + '锛�' + value + ' 涓囧厓'
+ // #endif
+ }
+ return result;
+ },
+ legendFormat:function(name){
+ return "鑷畾涔夊浘渚�+"+name;
+ },
+ yAxisFormatDemo:function (value, index) {
+ return value + '鍏�';
+ },
+ seriesFormatDemo:function(res){
+ return res.name + '骞�' + res.value + '鍏�';
+ }
+ },
+ //杩欓噷婕旂ず浜嗚嚜瀹氫箟鎮ㄧ殑鍥捐〃绫诲瀷鐨刼ption锛屽彲浠ラ殢鎰忓懡鍚嶏紝涔嬪悗鍦ㄧ粍浠朵笂 type="demotype" 鍚庯紝缁勪欢浼氳皟鐢ㄨ繖涓姳鎷彿閲岀殑option锛屽鏋滅粍浠朵笂杩樺瓨鍦╡opts鍙傛暟锛屼細灏哾emotype涓巈opts涓璷ption鍚堝苟鍚庢覆鏌撳浘琛ㄣ��
+ "demotype":{
+ "color": color,
+ //鍦ㄨ繖閲屽~鍐檈charts鐨刼ption鍗冲彲
+
+ },
+ //涓嬮潰鏄嚜瀹氫箟閰嶇疆锛岃娣诲姞椤圭洰鎵�闇�鐨勯�氱敤閰嶇疆
+ "column": {
+ "color": color,
+ "title": {
+ "text": ''
+ },
+ "tooltip": {
+ "trigger": 'axis'
+ },
+ "grid": {
+ "top": 30,
+ "bottom": 50,
+ "right": 15,
+ "left": 40
+ },
+ "legend": {
+ "bottom": 'left',
+ },
+ "toolbox": {
+ "show": false,
+ },
+ "xAxis": {
+ "type": 'category',
+ "axisLabel": {
+ "color": '#666666'
+ },
+ "axisLine": {
+ "lineStyle": {
+ "color": '#CCCCCC'
+ }
+ },
+ "boundaryGap": true,
+ "data": []
+ },
+ "yAxis": {
+ "type": 'value',
+ "axisTick": {
+ "show": false,
+ },
+ "axisLabel": {
+ "color": '#666666'
+ },
+ "axisLine": {
+ "lineStyle": {
+ "color": '#CCCCCC'
+ }
+ },
+ },
+ "seriesTemplate": {
+ "name": '',
+ "type": 'bar',
+ "data": [],
+ "barwidth": 20,
+ "label": {
+ "show": true,
+ "color": "#666666",
+ "position": 'top',
+ },
+ },
+ },
+ "line": {
+ "color": color,
+ "title": {
+ "text": ''
+ },
+ "tooltip": {
+ "trigger": 'axis'
+ },
+ "grid": {
+ "top": 30,
+ "bottom": 50,
+ "right": 15,
+ "left": 40
+ },
+ "legend": {
+ "bottom": 'left',
+ },
+ "toolbox": {
+ "show": false,
+ },
+ "xAxis": {
+ "type": 'category',
+ "axisLabel": {
+ "color": '#666666'
+ },
+ "axisLine": {
+ "lineStyle": {
+ "color": '#CCCCCC'
+ }
+ },
+ "boundaryGap": true,
+ "data": []
+ },
+ "yAxis": {
+ "type": 'value',
+ "axisTick": {
+ "show": false,
+ },
+ "axisLabel": {
+ "color": '#666666'
+ },
+ "axisLine": {
+ "lineStyle": {
+ "color": '#CCCCCC'
+ }
+ },
+ },
+ "seriesTemplate": {
+ "name": '',
+ "type": 'line',
+ "data": [],
+ "barwidth": 20,
+ "label": {
+ "show": true,
+ "color": "#666666",
+ "position": 'top',
+ },
+ },
+ },
+ "area": {
+ "color": color,
+ "title": {
+ "text": ''
+ },
+ "tooltip": {
+ "trigger": 'axis'
+ },
+ "grid": {
+ "top": 30,
+ "bottom": 50,
+ "right": 15,
+ "left": 40
+ },
+ "legend": {
+ "bottom": 'left',
+ },
+ "toolbox": {
+ "show": false,
+ },
+ "xAxis": {
+ "type": 'category',
+ "axisLabel": {
+ "color": '#666666'
+ },
+ "axisLine": {
+ "lineStyle": {
+ "color": '#CCCCCC'
+ }
+ },
+ "boundaryGap": true,
+ "data": []
+ },
+ "yAxis": {
+ "type": 'value',
+ "axisTick": {
+ "show": false,
+ },
+ "axisLabel": {
+ "color": '#666666'
+ },
+ "axisLine": {
+ "lineStyle": {
+ "color": '#CCCCCC'
+ }
+ },
+ },
+ "seriesTemplate": {
+ "name": '',
+ "type": 'line',
+ "data": [],
+ "areaStyle": {},
+ "label": {
+ "show": true,
+ "color": "#666666",
+ "position": 'top',
+ },
+ },
+ },
+ "pie": {
+ "color": color,
+ "title": {
+ "text": ''
+ },
+ "tooltip": {
+ "trigger": 'item'
+ },
+ "grid": {
+ "top": 40,
+ "bottom": 30,
+ "right": 15,
+ "left": 15
+ },
+ "legend": {
+ "bottom": 'left',
+ },
+ "seriesTemplate": {
+ "name": '',
+ "type": 'pie',
+ "data": [],
+ "radius": '50%',
+ "label": {
+ "show": true,
+ "color": "#666666",
+ "position": 'top',
+ },
+ },
+ },
+ "ring": {
+ "color": color,
+ "title": {
+ "text": ''
+ },
+ "tooltip": {
+ "trigger": 'item'
+ },
+ "grid": {
+ "top": 40,
+ "bottom": 30,
+ "right": 15,
+ "left": 15
+ },
+ "legend": {
+ "bottom": 'left',
+ },
+ "seriesTemplate": {
+ "name": '',
+ "type": 'pie',
+ "data": [],
+ "radius": ['40%', '70%'],
+ "avoidLabelOverlap": false,
+ "label": {
+ "show": true,
+ "color": "#666666",
+ "position": 'top',
+ },
+ "labelLine": {
+ "show": true
+ },
+ },
+ },
+ "rose": {
+ "color": color,
+ "title": {
+ "text": ''
+ },
+ "tooltip": {
+ "trigger": 'item'
+ },
+ "legend": {
+ "top": 'bottom'
+ },
+ "seriesTemplate": {
+ "name": '',
+ "type": 'pie',
+ "data": [],
+ "radius": "55%",
+ "center": ['50%', '50%'],
+ "roseType": 'area',
+ },
+ },
+ "funnel": {
+ "color": color,
+ "title": {
+ "text": ''
+ },
+ "tooltip": {
+ "trigger": 'item',
+ "formatter": "{b} : {c}%"
+ },
+ "legend": {
+ "top": 'bottom'
+ },
+ "seriesTemplate": {
+ "name": '',
+ "type": 'funnel',
+ "left": '10%',
+ "top": 60,
+ "bottom": 60,
+ "width": '80%',
+ "min": 0,
+ "max": 100,
+ "minSize": '0%',
+ "maxSize": '100%',
+ "sort": 'descending',
+ "gap": 2,
+ "label": {
+ "show": true,
+ "position": 'inside'
+ },
+ "labelLine": {
+ "length": 10,
+ "lineStyle": {
+ "width": 1,
+ "type": 'solid'
+ }
+ },
+ "itemStyle": {
+ "bordercolor": '#fff',
+ "borderwidth": 1
+ },
+ "emphasis": {
+ "label": {
+ "fontSize": 20
+ }
+ },
+ "data": [],
+ },
+ },
+ "gauge": {
+ "color": color,
+ "tooltip": {
+ "formatter": '{a} <br/>{b} : {c}%'
+ },
+ "seriesTemplate": {
+ "name": '涓氬姟鎸囨爣',
+ "type": 'gauge',
+ "detail": {"formatter": '{value}%'},
+ "data": [{"value": 50, "name": '瀹屾垚鐜�'}]
+ },
+ },
+ "candle": {
+ "xAxis": {
+ "data": []
+ },
+ "yAxis": {},
+ "color": color,
+ "title": {
+ "text": ''
+ },
+ "dataZoom": [{
+ "type": 'inside',
+ "xAxisIndex": [0, 1],
+ "start": 10,
+ "end": 100
+ },
+ {
+ "show": true,
+ "xAxisIndex": [0, 1],
+ "type": 'slider',
+ "bottom": 10,
+ "start": 10,
+ "end": 100
+ }
+ ],
+ "seriesTemplate": {
+ "name": '',
+ "type": 'k',
+ "data": [],
+ },
+ }
+}
+
+export default cfe;
\ No newline at end of file
--
Gitblit v1.9.3