Explorar o código

style:修改图表层级问题、图表无数据占位图

443166679@qq.com hai 1 ano
pai
achega
39991b245d

+ 9 - 10
common/chart/circle_chart.vue

@@ -1,8 +1,7 @@
 <template>
 	<view class="charts-box" :style="[{width},{height},]">
-		<qiun-data-charts :canvas2d='isCanvas2d' :canvasId='canvasId' type="arcbar" :errorMessage="errorMessage"
-			:errorReload="false" :opts="opts" :chartData="chartData" />
-
+		<qiun-data-charts canvas2d type="arcbar" errorType="1" :errorMessage="errorMessage" :errorReload="false"
+			:opts="opts" :chartData="chartData" />
 	</view>
 </template>
 
@@ -11,11 +10,11 @@
 		props: {
 			width: {
 				type: String,
-				default: '140rpx'
+				default: '170rpx'
 			},
 			height: {
 				type: String,
-				default: '140rpx'
+				default: '170rpx'
 			},
 			canvasId: {
 				type: String,
@@ -101,10 +100,10 @@
 					this.chartData = JSON.parse(JSON.stringify(res));
 				}, 500);
 			},
-      notServerData(){
-        this.chartData = {};
-        this.errorMessage = '暂无数据'
-      },
+			notServerData() {
+				this.chartData = {};
+				this.errorMessage = '暂无数据'
+			},
 			setServerData(data) {
 				this.opts.subtitle.name = (data * 100) + "%"
 				setTimeout(() => {
@@ -115,7 +114,7 @@
 						}]
 					};
 					this.chartData = JSON.parse(JSON.stringify(res));
-
+					// this.notServerData()
 				}, 100)
 			},
 		}

+ 7 - 2
common/chart/mixture_chart.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="charts-box">
-		<qiun-data-charts type="mix" :opts="opts" :canvas2d='isCanvas2d' :ontouch="true" :canvasId='canvasId'
-			:chartData="chartData" />
+		<qiun-data-charts type="mix" :opts="opts" canvas2d :ontouch="true" :chartData="chartData"
+			:errorMessage="errorMessage" />
 	</view>
 </template>
 
@@ -15,6 +15,7 @@
 		},
 		data() {
 			return {
+				errorMessage: '',
 				chartData: {},
 				//这里的 opts 是图表类型 type="mix" 的全部配置参数,您可以将此配置复制到 config-ucharts.js 文件中下标为 ['mix'] 的节点中来覆盖全局默认参数。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
 				opts: {
@@ -179,6 +180,10 @@
 		methods: {
 			getServerData() {
 
+			},
+			notServerData() {
+				this.chartData = {};
+				this.errorMessage = '暂无数据'
 			},
 			setServerData(data) {
 				setTimeout(() => {

+ 6 - 6
common/chart/peak_chart.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="charts-box">
-		<qiun-data-charts :canvas2d='isCanvas2d' :canvasId='canvasId' type="mount" :ontouch="true" :opts="opts"
-			:chartData="chartData" :errorMessage="errorMessage" :errorReload="false" />
+		<qiun-data-charts canvas2d type="mount" :ontouch="true" :opts="opts" :chartData="chartData"
+			:errorMessage="errorMessage" :errorReload="false" />
 	</view>
 </template>
 
@@ -165,10 +165,10 @@
 					this.chartData = JSON.parse(JSON.stringify(res));
 				}, 500);
 			},
-      setNoData(){
-        this.chartData = {};
-        this.errorMessage = '暂无数据'
-      },
+			setNoData() {
+				this.chartData = {};
+				this.errorMessage = '暂无数据'
+			},
 			setServerData(data) {
 				setTimeout(() => {
 					//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接

+ 134 - 130
common/chart/pie_chart.vue

@@ -1,137 +1,141 @@
 <template>
-  <view class="charts-box">
-    <qiun-data-charts
-	  :canvas2d='isCanvas2d'
-	  canvasId='cirle'
-      type="pie"
-      :opts="opts"
-      :chartData="chartData"
-    />
-<!-- 	:canvas2d='true'
-	canvasId='pie' -->
-  </view>
+	<view class="charts-box">
+		<qiun-data-charts canvas2d type="pie" errorType="1" :opts="opts" :chartData="chartData"
+			:errorMessage="errorMessage" />
+	</view>
 </template>
 
 <script>
-export default {
-  data() {
-    return {
-      isCanvas2d:process.uniEnv.isCanvas2d,
-      chartData: {},
-      //这里的 opts 是图表类型 type="pie" 的全部配置参数,您可以将此配置复制到 config-ucharts.js 文件中下标为 ['pie'] 的节点中来覆盖全局默认参数。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
-      opts: {
-        timing: "easeOut",
-        duration: 1000,
-        rotate: false,
-        rotateLock: false,
-        color: ["#DE5847","#EF8F27","#3ABF7D"],
-        // padding: [5,5,5,5],
-        fontSize: 13,
-        fontColor: "#666666",
-        dataLabel: false,
-        dataPointShape: true,
-        dataPointShapeType: "solid",
-        touchMoveLimit: 60,
-        enableScroll: false,
-        enableMarkLine: false,
-        legend: {
-          show: false,
-          position: "bottom",
-          float: "center",
-          padding: 5,
-          margin: 5,
-          backgroundColor: "rgba(0,0,0,0)",
-          borderColor: "rgba(0,0,0,0)",
-          borderWidth: 0,
-          fontSize: 13,
-          fontColor: "#666666",
-          lineHeight: 11,
-          hiddenColor: "#CECECE",
-          itemGap: 10
-        },
-        extra: {
-          pie: {
-            activeOpacity: 0.5,
-            activeRadius: 10,
-            offsetAngle: 0,
-            labelWidth: 15,
-            border: true,
-            borderWidth: 3,
-            borderColor: "#FFFFFF",
-            customRadius: 0,
-            linearType: "none"
-          },
-          tooltip: {
-            showBox: true,
-            showArrow: true,
-            showCategory: false,
-            borderWidth: 0,
-            borderRadius: 0,
-            borderColor: "#000000",
-            borderOpacity: 0.7,
-            bgColor: "#000000",
-            bgOpacity: 0.7,
-            gridType: "solid",
-            dashLength: 4,
-            gridColor: "#CCCCCC",
-            boxPadding: 3,
-            fontSize: 13,
-            lineHeight: 20,
-            fontColor: "#FFFFFF",
-            legendShow: true,
-            legendShape: "auto",
-            splitLine: true,
-            horizentalLine: false,
-            xAxisLabel: false,
-            yAxisLabel: false,
-            labelBgColor: "#FFFFFF",
-            labelBgOpacity: 0.7,
-            labelFontColor: "#666666"
-          }
-        }
-      }
-    };
-  },
-  onReady() {
-    // this.getServerData();
-  },
-  methods: {
-    getServerData() {
-      //模拟从服务器获取数据时的延时
-      setTimeout(() => {
-        //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
-        let res = {
-            series: [
-              {
-                data: [{"name":"一班","value":30},{"name":"二班","value":30},{"name":"三班","value":30}]
-              }
-            ]
-          };
-        this.chartData = JSON.parse(JSON.stringify(res));
-      }, 500);
-    },
-    setData(data){
-      console.log(data)
-      setTimeout(() => {
-        //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
-        let res = {
-          series: [
-            {
-              data: data
-            }
-          ]
-        };
-        this.chartData = JSON.parse(JSON.stringify(res));
-      }, 50);
-    }
-  }
-};
+	export default {
+		data() {
+			return {
+				isCanvas2d: process.uniEnv.isCanvas2d,
+				errorMessage: '',
+				chartData: {},
+				//这里的 opts 是图表类型 type="pie" 的全部配置参数,您可以将此配置复制到 config-ucharts.js 文件中下标为 ['pie'] 的节点中来覆盖全局默认参数。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
+				opts: {
+					timing: "easeOut",
+					duration: 1000,
+					rotate: false,
+					rotateLock: false,
+					color: ["#DE5847", "#EF8F27", "#3ABF7D"],
+					// padding: [5,5,5,5],
+					fontSize: 13,
+					fontColor: "#666666",
+					dataLabel: false,
+					dataPointShape: true,
+					dataPointShapeType: "solid",
+					touchMoveLimit: 60,
+					enableScroll: false,
+					enableMarkLine: false,
+					legend: {
+						show: false,
+						position: "bottom",
+						float: "center",
+						padding: 5,
+						margin: 5,
+						backgroundColor: "rgba(0,0,0,0)",
+						borderColor: "rgba(0,0,0,0)",
+						borderWidth: 0,
+						fontSize: 13,
+						fontColor: "#666666",
+						lineHeight: 11,
+						hiddenColor: "#CECECE",
+						itemGap: 10
+					},
+					extra: {
+						pie: {
+							activeOpacity: 0.5,
+							activeRadius: 10,
+							offsetAngle: 0,
+							labelWidth: 15,
+							border: true,
+							borderWidth: 3,
+							borderColor: "#FFFFFF",
+							customRadius: 0,
+							linearType: "none"
+						},
+						tooltip: {
+							showBox: true,
+							showArrow: true,
+							showCategory: false,
+							borderWidth: 0,
+							borderRadius: 0,
+							borderColor: "#000000",
+							borderOpacity: 0.7,
+							bgColor: "#000000",
+							bgOpacity: 0.7,
+							gridType: "solid",
+							dashLength: 4,
+							gridColor: "#CCCCCC",
+							boxPadding: 3,
+							fontSize: 13,
+							lineHeight: 20,
+							fontColor: "#FFFFFF",
+							legendShow: true,
+							legendShape: "auto",
+							splitLine: true,
+							horizentalLine: false,
+							xAxisLabel: false,
+							yAxisLabel: false,
+							labelBgColor: "#FFFFFF",
+							labelBgOpacity: 0.7,
+							labelFontColor: "#666666"
+						}
+					}
+				}
+			};
+		},
+		onReady() {
+			// this.getServerData();
+		},
+		methods: {
+			getServerData() {
+				//模拟从服务器获取数据时的延时
+				setTimeout(() => {
+					//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
+					let res = {
+						series: [{
+							data: [{
+								"name": "一班",
+								"value": 30
+							}, {
+								"name": "二班",
+								"value": 30
+							}, {
+								"name": "三班",
+								"value": 30
+							}]
+						}]
+					};
+					this.chartData = JSON.parse(JSON.stringify(res));
+				}, 500);
+			},
+			setData(data) {
+				console.log(data)
+				setTimeout(() => {
+					//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
+					let res = {
+						series: [{
+							data: data
+						}]
+					};
+					this.chartData = JSON.parse(JSON.stringify(res));
+					this.setNoData()
+				}, 50);
+			},
+			setNoData() {
+				this.chartData = {};
+				this.errorMessage = '暂无数据'
+			},
+		}
+	};
 </script>
 
 <style scoped>
-  /* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
-  .charts-box {
-    width: 135px;
-    height: 135px;
-  }
-</style>
+	/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
+	.charts-box {
+		width: 135px;
+		height: 135px;
+	}
+</style>

+ 6 - 1
common/chart/ring_chart.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="charts-box" :style="[{width},{height},]">
-		<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" />
+		<qiun-data-charts canvas2d type="ring" :opts="opts" :chartData="chartData" :errorMessage="errorMessage" />
 	</view>
 </template>
 
@@ -26,6 +26,7 @@
 		},
 		data() {
 			return {
+				errorMessage: '',
 				chartData: {},
 				//这里的 opts 是图表类型 type="ring" 的全部配置参数,您可以将此配置复制到 config-ucharts.js 文件中下标为 ['ring'] 的节点中来覆盖全局默认参数。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
 				opts: {
@@ -142,6 +143,10 @@
 					this.chartData = JSON.parse(JSON.stringify(res));
 				}, 500);
 			},
+			setNoData() {
+				this.chartData = {};
+				this.errorMessage = '暂无数据'
+			},
 		}
 	};
 </script>

+ 18 - 17
common/chart/rose_chart.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="charts-box">
-		<qiun-data-charts type="rose" :opts="opts" :chartData="chartData" :canvas2d='isCanvas2d' :canvasId='canvasId' />
+		<qiun-data-charts canvas2d type="rose" :opts="opts" :chartData="chartData" :errorMessage="errorMessage" />
 	</view>
 </template>
 
@@ -8,6 +8,7 @@
 	export default {
 		data() {
 			return {
+				errorMessage: '',
 				chartData: {},
 				//这里的 opts 是图表类型 type="rose" 的全部配置参数,您可以将此配置复制到 config-ucharts.js 文件中下标为 ['rose'] 的节点中来覆盖全局默认参数。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
 				opts: {
@@ -120,22 +121,22 @@
 				// 	this.chartData = JSON.parse(JSON.stringify(res));
 				// }, 500);
 			},
-      setNoData(){
-        //设置空数据模板
-        this.errorMessage='暂无数据'
-        this.chartData={}
-      },
-      setServerData(data){
-        setTimeout(() => {
-          //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
-          let res = {
-            series: [{
-              data: data
-            }]
-          };
-          this.chartData = JSON.parse(JSON.stringify(res));
-        }, 50);
-      }
+			setNoData() {
+				//设置空数据模板
+				this.errorMessage = '暂无数据'
+				this.chartData = {}
+			},
+			setServerData(data) {
+				setTimeout(() => {
+					//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
+					let res = {
+						series: [{
+							data: data
+						}]
+					};
+					this.chartData = JSON.parse(JSON.stringify(res));
+				}, 50);
+			}
 		}
 	};
 </script>

+ 17 - 2
components/en-utils/en-search/en-search.vue

@@ -1,6 +1,11 @@
 <template>
 	<view class="">
-		<uni-search-bar radius="30"  :placeholder="placeholder" :bgColor="bgColor" />
+		<view class="row search center sys-background-fff r-100 m-20 p-l16">
+			<uni-icons type="search" size="18" color="#999"></uni-icons>
+			<input class="flex p-l20" type="text" :placeholder="placeholder"
+				placeholder-style="font-size:28rpx;color:#999" />
+			<view class="search-text size-28">搜索</view>
+		</view>
 	</view>
 </template>
 
@@ -32,5 +37,15 @@
 </script>
 
 <style lang="scss" scoped>
-	
+	.search {
+		line-height: 50rpx;
+	}
+
+	.search-text {
+		color: #fff;
+		padding: 0 40rpx;
+		margin: 10rpx;
+		background-color: #0FB160;
+		border-radius: 100rpx;
+	}
 </style>

+ 146 - 143
page_task/apply/components/add-license.vue

@@ -1,155 +1,158 @@
 <template>
-  <view class="license-box">
-    <view class="account-name">
-      上传营业执照图片
-    </view>
-    <view class="credentials-box" @click="showUploadingImg(true)">
-      <view class="credentials-img" v-if="identity_one">
-        <image class="credentials-imgs" :src="identity_one" mode="aspectFill"></image>
-      </view>
-      <view class="credentials-img" v-else>
-        <image class="credentials-imgs" src="/page_task/static/img/scmb.png" mode=""></image>
-      </view>
-    </view>
-    <uni-popup ref="popup" :safeArea="false" type="bottom" @change="closePopup">
-      <view class="popup-block">
-        <view class="popup-row" @click="uploadingImg(1)">拍照</view>
-        <view class="popup-row" @click="uploadingImg(2)">从手机里面选择</view>
-        <view class="popup-row" @click="showUploadingImg(false,0)">取消</view>
-      </view>
-    </uni-popup>
-  </view>
+	<view class="license-box">
+		<view class="account-name">
+			上传营业执照图片
+		</view>
+		<view class="credentials-box" @click="showUploadingImg(true)">
+			<view class="credentials-img" v-if="identity_one">
+				<image class="credentials-imgs" :src="identity_one" mode="aspectFill"></image>
+			</view>
+			<view class="credentials-img" v-else>
+				<image class="credentials-imgs" src="/page_task/static/img/scmb.png" mode=""></image>
+			</view>
+		</view>
+		<uni-popup ref="popup" :safeArea="false" type="bottom" @change="closePopup">
+			<view class="popup-block">
+				<view class="popup-row" @click="uploadingImg(1)">拍照</view>
+				<view class="popup-row" @click="uploadingImg(2)">从手机里面选择</view>
+				<view class="popup-row" @click="showUploadingImg(false,0)">取消</view>
+			</view>
+		</uni-popup>
+	</view>
 </template>
 
 <script>
-import {getBaiDuImgRecognition} from "@/api/common";
-import txUploadFile from "@/service/txOssSts";
-import tools from "@/service/tools";
+	import {
+		getBaiDuImgRecognition
+	} from "@/api/common";
+	import txUploadFile from "@/service/txOssSts";
+	import tools from "@/service/tools";
 
-export default {
-  name: "add-license",
-  components: {},
-  props: {
-    'value': {
-      default: '',
-    },
-    'userName': {
-      default: '',
-    },
-    'idNumber': {
-      default: '',
-    }
-  },
-  data() {
-    return {
-      'identity_one': '',
-      'name': '',
-      'id_number': '',
-    }
-  },
-  watch: {
-    'identity_one': function () {
-      this.$emit("input", this.identity_one);
-    },
-    'value': function () {
-      this.setValue()
-    },
-  },
-  mounted() {
-    this.setValue()
-  },
-  methods: {
-    setValue() {
-      console.log(this.value)
-      this.identity_one = this.value
-    },
-    uploadingImg(sourceType) {
-      uni.chooseMedia({
-        mediaType: 'image',
-        count: 1, //默认9
-        sizeType: "compressed",
-        sourceType: [sourceType === 1 ? 'camera' : 'album'],
-        success: (res) => {
-          if (res.tempFiles.length > 0) {
-            res.tempFiles.forEach((tempFile) => {
-              txUploadFile(tempFile.tempFilePath).then((data) => {
-                if (!data) {
-                  tools.error('图片上传失败')
-                  tools.hideLoading()
-                } else {
-                  tools.showLoading()
-                  getBaiDuImgRecognition({
-                    'imgUrl': data.Location,
-                    'imgType': '3'
-                  }).then((res) => {
-                    tools.hideLoading()
-                    if (res.code === 1) {
-                      this.identity_one = data.Location;
-                      this.name = res.data.name;
-                      this.id_number = res.data.id_number;
-                      this.$emit('update:userName',this.name)
-                      this.$emit('update:idNumber',this.id_number)
-                    } else {
-                      tools.error(res.msg)
-                    }
-                  })
-                }
-              })
-            })
-            this.showUploadingImg(false, 0);
-          } else {
-            tools.error("请选择上传的图片")
-          }
-        },
-      });
-    },
-    showUploadingImg(showImg) {
-      if (showImg) {
-        if (this.isUploading) {
-          return
-        }
-        this.isUploading = true
-        this.$refs.popup.open("bottom");
-      } else {
-        this.$refs.popup.close();
-        this.isUploading = false
-      }
-    },
-    closePopup(e) {
-      if (e.show === false) {
-        this.isUploading = false
-      }
-    },
-  }
-}
+	export default {
+		name: "add-license",
+		components: {},
+		props: {
+			'value': {
+				default: '',
+			},
+			'userName': {
+				default: '',
+			},
+			'idNumber': {
+				default: '',
+			}
+		},
+		data() {
+			return {
+				'identity_one': '',
+				'name': '',
+				'id_number': '',
+			}
+		},
+		watch: {
+			'identity_one': function() {
+				this.$emit("input", this.identity_one);
+			},
+			'value': function() {
+				this.setValue()
+			},
+		},
+		mounted() {
+			this.setValue()
+		},
+		methods: {
+			setValue() {
+				console.log(this.value)
+				this.identity_one = this.value
+			},
+			uploadingImg(sourceType) {
+				uni.chooseMedia({
+					mediaType: 'image',
+					count: 1, //默认9
+					sizeType: "compressed",
+					sourceType: [sourceType === 1 ? 'camera' : 'album'],
+					success: (res) => {
+						if (res.tempFiles.length > 0) {
+							res.tempFiles.forEach((tempFile) => {
+								txUploadFile(tempFile.tempFilePath).then((data) => {
+									if (!data) {
+										tools.error('图片上传失败')
+										tools.hideLoading()
+									} else {
+										tools.showLoading()
+										getBaiDuImgRecognition({
+											'imgUrl': data.Location,
+											'imgType': '3'
+										}).then((res) => {
+											tools.hideLoading()
+											if (res.code === 1) {
+												this.identity_one = data.Location;
+												this.name = res.data.name;
+												this.id_number = res.data.id_number;
+												this.$emit('update:userName', this
+													.name)
+												this.$emit('update:idNumber', this
+													.id_number)
+											} else {
+												tools.error(res.msg)
+											}
+										})
+									}
+								})
+							})
+							this.showUploadingImg(false, 0);
+						} else {
+							tools.error("请选择上传的图片")
+						}
+					},
+				});
+			},
+			showUploadingImg(showImg) {
+				if (showImg) {
+					if (this.isUploading) {
+						return
+					}
+					this.isUploading = true
+					this.$refs.popup.open("bottom");
+				} else {
+					this.$refs.popup.close();
+					this.isUploading = false
+				}
+			},
+			closePopup(e) {
+				if (e.show === false) {
+					this.isUploading = false
+				}
+			},
+		}
+	}
 </script>
 
 <style scoped lang="scss">
-@import "@/static/css/wh-common";
+	@import "@/static/css/wh-common";
 
-.license-box {
-  .account-name {
-    font-size: 32rpx;
-    padding: 16px 0 0 0;
-    color: #232A35;
-  }
+	.license-box {
+		.account-name {
+			font-size: 28rpx;
+			padding: 16px 0 0 0;
+			color: #232A35;
+		}
 
-  .credentials-box {
-    padding: 24rpx 0 0 0;
-    border-bottom: 1px solid #F0F0F0;
+		.credentials-box {
+			padding: 24rpx 0 0 0;
+			border-bottom: 1px solid #F0F0F0;
 
-    .credentials-img {
-      width: 160rpx;
-      height: 160rpx;
-      margin: 0 16rpx 30rpx 0;
+			.credentials-img {
+				width: 160rpx;
+				height: 160rpx;
+				margin: 0 16rpx 30rpx 0;
 
-      .credentials-imgs {
-        width: 100%;
-        height: 100%;
-        display: block;
-      }
-    }
-  }
-}
-
-</style>
+				.credentials-imgs {
+					width: 100%;
+					height: 100%;
+					display: block;
+				}
+			}
+		}
+	}
+</style>

+ 185 - 168
page_task/draft/index.vue

@@ -1,176 +1,193 @@
 <template>
-  <view class="total-page page-box page-env-20 scroll_content task-bg">
-    <Nav :title="'草稿箱'" :genre="1" :back="true" is_fixed></Nav>
-    <view>
-      <Search :placeholder="'客户姓名或电话'"></Search>
-
-    </view>
-    <EnScroll ref="scroll" :navHeight="0" is_tabHeight @onRefresh="onRefresh" @onScrollBottom="onScrollBottom">
-      <view class="draft-item r-40 sys-background-fff" v-for="(item,index) in  list">
-        <view class="item-left">
-          <view class="left-top left-item">
-            <view class="top-name sys-weight-600 size-30 text-color-12">{{item.name}}</view>
-            <view class="top-product sys-weight-400 size-24 text-color-009 r-10">{{item.product_name}}</view>
-          </view>
-          <view class="left-content left-item">
-            <view class="sys-weight-400 size-24 text-color-12">身份证:</view>
-            <view class="sys-weight-600 sys-size-28 text-color-12">{{item.id_number}}</view>
-          </view>
-          <view class="left-bottom left-item">
-            <view class=" size-24 text-color-999">保存时间:</view>
-            <view class=" size-24 text-color-999">{{item.created_at}}</view>
-          </view>
-
-        </view>
-        <view class="item-right">
-          <view class="but-item but-edit size-28 sys-weight-500 text-color-fff button-background sys-radius-100" @click.stop="editDraft(item.id)">编辑</view>
-          <view class="but-item but-del  size-28 sys-weight-500 text-color-666 " @click.stop="delDraft(item.id,index)">删除</view>
-        </view>
-
-      </view>
-      <en-blank v-if="list.length<=0"></en-blank>
-
-    </EnScroll>
-  </view>
+	<view class="total-page page-box page-env-20 scroll_content task-bg">
+		<Nav :title="'草稿箱'" :genre="1" :back="true" is_fixed></Nav>
+		<view>
+			<Search :placeholder="'客户姓名或电话'"></Search>
+		</view>
+		<EnScroll ref="scroll" :navHeight="0" is_tabHeight @onRefresh="onRefresh" @onScrollBottom="onScrollBottom">
+			<view class="draft-item r-40 sys-background-fff" v-for="(item,index) in  list">
+				<view class="item-left">
+					<view class="left-top left-item">
+						<view class="top-name sys-weight-600 size-30 text-color-12">{{item.name}}</view>
+						<view class="top-product sys-weight-400 size-24 text-color-009 r-10">{{item.product_name}}
+						</view>
+					</view>
+					<view class="left-content left-item">
+						<view class="sys-weight-400 size-24 text-color-12">身份证:</view>
+						<view class="sys-weight-600 sys-size-28 text-color-12">{{item.id_number}}</view>
+					</view>
+					<view class="left-bottom left-item">
+						<view class=" size-24 text-color-999">保存时间:</view>
+						<view class=" size-24 text-color-999">{{item.created_at}}</view>
+					</view>
+
+				</view>
+				<view class="item-right">
+					<view
+						class="but-item but-edit size-28 sys-weight-500 text-color-fff button-background sys-radius-100"
+						@click.stop="editDraft(item.id)">编辑</view>
+					<view class="but-item but-del  size-28 sys-weight-500 text-color-666 "
+						@click.stop="delDraft(item.id,index)">删除</view>
+				</view>
+
+			</view>
+			<en-blank v-if="list.length<=0"></en-blank>
+
+		</EnScroll>
+	</view>
 </template>
 
 <script>
+	import {
+		getDraftList
+	} from "@/api/task";
+	import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
+
+	export default {
+		components: {
+			EnBlank
+		},
+		data() {
+			return {
+				list: [],
+				page: 1,
+				total: null,
+				isAjax: false,
+			};
+		},
+		mounted() {
+			uni.$on('setNewDraft', () => {
+				if (this.$refs.draftRef) {
+					this.startList()
+				}
+			})
+			this.startList()
+		},
+		methods: {
+			startList() {
+				this.total = 999;
+				this.list = [];
+				this.page = 1;
+				this.isAjax = false;
+				this.getDraftList();
+
+			},
+			delDraft(draftId, index) {
+				uni.showModal({
+					title: '警告',
+					content: '是否删除当前草稿!',
+					success: (res) => {
+						if (res.confirm) {
+							delDraft({
+								'draftId': draftId
+							}).then((res) => {
+								this.$refs.draftRef.list.splice(index, 1)
+							})
+						}
+					}
+				});
 
-import {getDraftList} from "@/api/task";
-import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
-
-export default {
-  components: {EnBlank},
-  data() {
-    return {
-      list: [],
-      page: 1,
-      total: null,
-      isAjax: false,
-    };
-  },
-  mounted(){
-    uni.$on('setNewDraft',()=>{
-      if(this.$refs.draftRef){
-        this.startList()
-      }
-    })
-    this.startList()
-  },
-  methods: {
-    startList() {
-      this.total = 999;
-      this.list = [];
-      this.page = 1;
-      this.isAjax = false;
-      this.getDraftList();
-
-    },
-    delDraft(draftId,index){
-      uni.showModal({
-        title: '警告',
-        content: '是否删除当前草稿!',
-        success:  (res) =>{
-          if (res.confirm) {
-            delDraft({'draftId':draftId}).then((res)=>{
-              this.$refs.draftRef.list.splice(index,1)
-            })
-          }
-        }
-      });
-
-    },
-    editDraft(id){
-      uni.navigateTo({
-        url: '/page_task/information/information?draftId='+id
-      });
-    },
-    getDraftList(){
-      if (this.isAjax || (this.total <= this.list.length)) {
-        return;
-      }
-      this.isAjax = true;
-      getDraftList({'page':this.page}).then((res)=>{
-        if(res.code===1){
-          this.list.push(...res.data.items)
-          this.total = res.data.total
-          this.isAjax = false
-          ++this.page;
-        }
-      })
-    },
-    // 下拉刷新
-    onRefresh() {
-      // uni.showLoading({
-      // 	title: '数据加载中'
-      // })
-      // setTimeout(() => {
-      // 	uni.showToast({
-      // 		title: '加载完成',
-      // 		icon: 'none'
-      // 	})
-      // 	this.$refs.scroll.onEndPulling()
-      // }, 1000)
-      console.log("下拉刷新");
-      this.startList()
-    },
-    // 滚动到底部
-    onScrollBottom() {
-
-      this.getDraftList();
-
-      console.log("到底部了");
-    },
-  },
-}
+			},
+			editDraft(id) {
+				uni.navigateTo({
+					url: '/page_task/information/information?draftId=' + id
+				});
+			},
+			getDraftList() {
+				if (this.isAjax || (this.total <= this.list.length)) {
+					return;
+				}
+				this.isAjax = true;
+				getDraftList({
+					'page': this.page
+				}).then((res) => {
+					if (res.code === 1) {
+						this.list.push(...res.data.items)
+						this.total = res.data.total
+						this.isAjax = false
+							++this.page;
+					}
+				})
+			},
+			// 下拉刷新
+			onRefresh() {
+				// uni.showLoading({
+				// 	title: '数据加载中'
+				// })
+				// setTimeout(() => {
+				// 	uni.showToast({
+				// 		title: '加载完成',
+				// 		icon: 'none'
+				// 	})
+				// 	this.$refs.scroll.onEndPulling()
+				// }, 1000)
+				console.log("下拉刷新");
+				this.startList()
+			},
+			// 滚动到底部
+			onScrollBottom() {
+
+				this.getDraftList();
+
+				console.log("到底部了");
+			},
+		},
+	}
 </script>
 
 <style lang="scss">
-.draft-item{
-  margin: 20rpx 32rpx 0;
-  padding: 25rpx 30rpx;
-  display: flex;
-  justify-content: space-between;
-  .item-left{
-    .left-item{
-      display: flex;
-      justify-content: left;
-      align-items: center;
-    }
-    .left-top{
-      height: 52rpx;
-      .top-product{
-        background-color: rgba(15, 177, 96, 0.1);
-        padding: 9rpx 22rpx;
-        margin-left: 20rpx;
-      }
-    }
-    .left-content{
-      margin-top: 24rpx;
-      height: 40rpx;
-    }
-    .left-bottom{
-      margin-top: 24rpx;
-      height: 34rpx;
-    }
-
-  }
-  .item-right{
-    padding-top: 20rpx;
-    .but-item{
-      width: 172rpx;
-      height: 70rpx;
-      text-align: center;
-      line-height: 70rpx;
-    }
-    .but-del{
-      margin-top: 15rpx;
-      box-sizing: border-box;
-      border-radius: 99rpx 99rpx 99rpx 99rpx;
-      border: 1rpx solid #666666;
-    }
-  }
-
-}
-
-</style>
+	.draft-item {
+		margin: 20rpx 32rpx 0;
+		padding: 25rpx 30rpx;
+		display: flex;
+		justify-content: space-between;
+
+		.item-left {
+			.left-item {
+				display: flex;
+				justify-content: left;
+				align-items: center;
+			}
+
+			.left-top {
+				height: 52rpx;
+
+				.top-product {
+					background-color: rgba(15, 177, 96, 0.1);
+					padding: 9rpx 22rpx;
+					margin-left: 20rpx;
+				}
+			}
+
+			.left-content {
+				margin-top: 24rpx;
+				height: 40rpx;
+			}
+
+			.left-bottom {
+				margin-top: 24rpx;
+				height: 34rpx;
+			}
+
+		}
+
+		.item-right {
+			padding-top: 20rpx;
+
+			.but-item {
+				width: 172rpx;
+				height: 70rpx;
+				text-align: center;
+				line-height: 70rpx;
+			}
+
+			.but-del {
+				margin-top: 15rpx;
+				box-sizing: border-box;
+				border-radius: 99rpx 99rpx 99rpx 99rpx;
+				border: 1rpx solid #666666;
+			}
+		}
+
+	}
+</style>

+ 223 - 192
page_task/tripartite_info/tripartite_info.vue

@@ -1,118 +1,133 @@
 <template>
 	<view class="total-page page-env-160 page-box task-bg">
 		<Nav :title="title" is_fixed :genre="4" :opacity="scrollTop"></Nav>
-		<view id="apply-info" class="m-t20 m-lr30 text-color-12">
-			<view class="sys-background-fff r-20 p-20 m-b20" v-for="(tripartite,index) in  tripartiteList" :key="index">
+		<view id="apply-info" class="m-t20 text-color-12">
+			<view class="sys-background-fff m-lr30 r-20 p-20 m-b20" v-for="(tripartite,index) in  tripartiteList"
+				:key="index">
 				<!-- 个人担保start -->
 				<view class="" v-if="editIndex!==index">
 					<!-- 个人担保信息start -->
-					<view class="sys-from-background-color p-20 r-20 size-26" >
+					<view class="sys-from-background-color p-20 r-20 size-26">
 						<view class="">
 							<view class="row-justify-sb center">
-								<text class="size-28 sys-weight-600">担保{{tripartite.type*1===1?'人':'企业'}}信息({{index+1}})</text>
+								<text
+									class="size-28 sys-weight-600">担保{{tripartite.type*1===1?'人':'企业'}}信息({{index+1}})</text>
 								<view class="row-c sys-background-fff r-100 p-lr30 p-tb10">
-									<image class="wh-30" src="/page_task/static/img/information/edit.png" mode="aspectFill"
-										@click="onEditInfo(index)"></image>
+									<image class="wh-30" src="/page_task/static/img/information/edit.png"
+										mode="aspectFill" @click="onEditInfo(index)"></image>
 									<view class="title-line m-lr20"></view>
-									<image class="wh-30" src="/page_task/static/img/information/delete.png" mode="aspectFill"
-										@click="delTripartite(index)">
+									<image class="wh-30" src="/page_task/static/img/information/delete.png"
+										mode="aspectFill" @click="delTripartite(index)">
 									</image>
 								</view>
 							</view>
-              <view v-if="tripartite.type*1===1">
-                <view class="row-c p-tb30">
-                  <view class="text-color-666"><text></text>担保类型:</view>
-                  <text>个人</text>
-                </view>
-                <view class="row-c">
-                  <view class="text-color-666"><text></text>担保人姓名:</view>
-                  <text>{{tripartite.name}}</text>
-                </view>
-                <view class="row-c">
-                  <view class="text-color-666"><text></text>身份证号码:</view>
-                  <text>{{tripartite.id_number}}</text>
-                </view>
-                <view class="p-t30">
-                  <view class="wh-text size-28 text-color-666 m-b20">证件照片</view>
-                  <EnImage :img="[tripartite.identity_one,tripartite.identity_two]"></EnImage>
-                </view>
-              </view>
-              <view v-else>
-                <view class="row-c p-tb30">
-                  <view class="text-color-666"><text></text>担保类型:</view>
-                  <text>企业</text>
-                </view>
-                <view class="row-c">
-                  <view class="text-color-666"><text></text>企业名称:</view>
-                  <text>{{tripartite.name}}</text>
-                </view>
-                <view class="row-c">
-                  <view class="text-color-666"><text></text>营业执照编号:</view>
-                  <text>{{tripartite.id_number}}</text>
-                </view>
-                <view class="p-t30">
-                  <view class="wh-text size-28 text-color-666 m-b20">证件照片</view>
-                  <EnImage :img="[tripartite.identity_one]"></EnImage>
-                </view>
-              </view>
-
-							</view>
-						</view>
-						<view class="m-t30" v-for="(bankItem,bIndex) in tripartite.bank_data" :key="bIndex">
-							<text class="size-28 sys-weight-600">银行信息({{key+1}})</text>
-							<view class="row-c p-tb30">
-								<view class="text-color-666"><text></text>账户姓名:</view>
-								<text>{{bankItem.name}}</text>
-							</view>
-							<view class="row-c">
-								<view class="text-color-666"><text></text>所属银行:</view>
-								<text>{{bankItem.bank_name}}</text>
+							<view v-if="tripartite.type*1===1">
+								<view class="row-c p-tb30">
+									<view class="text-color-666"><text></text>担保类型:</view>
+									<text>个人</text>
+								</view>
+								<view class="row-c">
+									<view class="text-color-666"><text></text>担保人姓名:</view>
+									<text>{{tripartite.name}}</text>
+								</view>
+								<view class="row-c">
+									<view class="text-color-666"><text></text>身份证号码:</view>
+									<text>{{tripartite.id_number}}</text>
+								</view>
+								<view class="p-t30">
+									<view class="wh-text size-28 text-color-666 m-b20">证件照片</view>
+									<EnImage :img="[tripartite.identity_one,tripartite.identity_two]"></EnImage>
+								</view>
 							</view>
-							<view class="row-c p-t30">
-								<view class="text-color-666"><text></text>银行卡号:</view>
-								<text>{{bankItem.bank_num}}</text>
+							<view v-else>
+								<view class="row-c p-tb30">
+									<view class="text-color-666"><text></text>担保类型:</view>
+									<text>企业</text>
+								</view>
+								<view class="row-c">
+									<view class="text-color-666"><text></text>企业名称:</view>
+									<text>{{tripartite.name}}</text>
+								</view>
+								<view class="row-c">
+									<view class="text-color-666"><text></text>营业执照编号:</view>
+									<text>{{tripartite.id_number}}</text>
+								</view>
+								<view class="p-t30">
+									<view class="wh-text size-28 text-color-666 m-b20">证件照片</view>
+									<EnImage :img="[tripartite.identity_one]"></EnImage>
+								</view>
 							</view>
+
 						</view>
 					</view>
-					<view  v-else>
-
-            <en-radio label="担保类型" v-model="tripartite.type" @updateData="farming(index)" :list="appliesData"></en-radio>
-            <view v-if="tripartite.type*1===1">
-              <add-identity  v-if="verifyKey('id_number')"  :user-name.sync="tripartite.name" :id-number.sync="tripartite.id_number" :identity-one.sync="tripartite.identity_one" :identity-two.sync="tripartite.identity_two"></add-identity>
-              <en-input label="姓名"  v-if="verifyKey('name')"  v-model="tripartite.name" type="text" placeholder="等待自动录入"></en-input>
-              <en-input label="身份证号" v-if="verifyKey('id_number')"  v-model="tripartite.id_number" type="idcard" placeholder="等待自动录入"></en-input>
-            </view>
-            <view v-else>
-              <en-input label="企业名称" v-if="verifyKey('name')"  v-model="tripartite.name" type="text" placeholder="请输入企业名称"></en-input>
-              <en-input label="营业执照编号" v-if="verifyKey('id_number')"  v-model="tripartite.id_number" type="text" placeholder="请输入营业执照编号"></en-input>
-              <add-license  v-if="verifyKey('identity_one')"  v-model="tripartite.identity_one" :user-name.sync="tripartite.name" :id-number.sync="tripartite.id_number"></add-license>
-            </view>
-						<view class="m-t30" v-for="(bankItem,bIndex) in tripartite.bank_data">
-							<view class="row-justify-sb center">
-								<text class="size-30 sys-weight-600'">银行卡信息({{bIndex+1}})</text>
-								<image class="wh-30" src="/page_task/static/img/information/delete.png" mode="aspectFill"
-                       @click="delBank(index,bIndex)">
-								</image>
-							</view>
-              <en-input label="账户姓名" v-model="bankItem.name" type="text" placeholder="请输开户人姓名" ></en-input>
-              <add-bank :bank-name.sync="bankItem.bank_name" :bank-num.sync="bankItem.bank_num"></add-bank>
+					<view class="m-t30" v-for="(bankItem,bIndex) in tripartite.bank_data" :key="bIndex">
+						<text class="size-28 sys-weight-600">银行信息({{key+1}})</text>
+						<view class="row-c p-tb30">
+							<view class="text-color-666"><text></text>账户姓名:</view>
+							<text>{{bankItem.name}}</text>
 						</view>
-						<view class="row-justify-sb">
-							<button class="size-26 r-10 button-color still-button m-t30" hover-class="is-hover"
-                      @click="addBank(index)">+ 添加还款信息</button>
-							<view class="flex"></view>
+						<view class="row-c">
+							<view class="text-color-666"><text></text>所属银行:</view>
+							<text>{{bankItem.bank_name}}</text>
+						</view>
+						<view class="row-c p-t30">
+							<view class="text-color-666"><text></text>银行卡号:</view>
+							<text>{{bankItem.bank_num}}</text>
 						</view>
-
 					</view>
+				</view>
+				<view v-else>
 
+					<en-radio label="担保类型" v-model="tripartite.type" @updateData="farming(index)"
+						:list="appliesData"></en-radio>
+					<view v-if="tripartite.type*1===1">
+						<add-identity v-if="verifyKey('id_number')" :user-name.sync="tripartite.name"
+							:id-number.sync="tripartite.id_number" :identity-one.sync="tripartite.identity_one"
+							:identity-two.sync="tripartite.identity_two"></add-identity>
+						<en-input label="姓名" v-if="verifyKey('name')" v-model="tripartite.name" type="text"
+							placeholder="等待自动录入"></en-input>
+						<en-input label="身份证号" v-if="verifyKey('id_number')" v-model="tripartite.id_number"
+							type="idcard" placeholder="等待自动录入"></en-input>
+					</view>
+					<view v-else>
+						<en-input label="企业名称" v-if="verifyKey('name')" v-model="tripartite.name" type="text"
+							placeholder="请输入企业名称"></en-input>
+						<!-- 		<en-input label="营业执照编号" v-if="verifyKey('id_number')" v-model="tripartite.id_number"
+							type="text" placeholder="请输入营业执照编号"></en-input> -->
+						<view class="row-justify-sb center p-tb30 bor-bottom-1 size-28">
+							<view class="wh-text">营业执照编号</view>
+							<input class="wh-input sys-size-28 text-color-12 m-l40 flex"
+								placeholder-class="sys-size-28 text-color-999 sys-weight-400" placeholder="请输入营业执照编号"
+								v-model="tripartite.id_number"></input>
+						</view>
+						<add-license v-if="verifyKey('identity_one')" v-model="tripartite.identity_one"
+							:user-name.sync="tripartite.name" :id-number.sync="tripartite.id_number"></add-license>
+					</view>
+					<view class="m-t30" v-for="(bankItem,bIndex) in tripartite.bank_data">
+						<view class="row-justify-sb center">
+							<text class="size-30 sys-weight-600'">银行卡信息({{bIndex+1}})</text>
+							<image class="wh-30" src="/page_task/static/img/information/delete.png" mode="aspectFill"
+								@click="delBank(index,bIndex)">
+							</image>
+						</view>
+						<en-input label="账户姓名" v-model="bankItem.name" type="text" placeholder="请输开户人姓名"></en-input>
+						<add-bank :bank-name.sync="bankItem.bank_name" :bank-num.sync="bankItem.bank_num"></add-bank>
+					</view>
+					<view class="row-justify-sb">
+						<button class="size-26 r-10 button-color still-button m-t30" hover-class="is-hover"
+							@click="addBank(index)">+ 添加还款信息</button>
+						<view class="flex"></view>
+					</view>
 
+				</view>
 			</view>
-      <en-blank message="暂无第三方信息~~" v-if="tripartiteList.length<=0"></en-blank>
-
-			<button class="size-26 r-10 button-color apply-button m-t30" hover-class="is-hover"
+			<view class="m-lr10">
+				<en-blank message="暂无第三方信息~~" v-if="tripartiteList.length<=0"></en-blank>
+			</view>
+			<button class="size-26 r-10 button-color apply-button m-t30 m-lr30" hover-class="is-hover"
 				@click="addItem">+添加第三方信息</button>
 		</view>
-		<EnButton  leftText="保存"  @onSubmit="onSubmit">
+		<EnButton leftText="保存" @onSubmit="onSubmit">
 		</EnButton>
 	</view>
 </template>
@@ -121,20 +136,20 @@
 	import WhInput from "@/components/en-from/en-input/en-input.vue"
 	import EnUpload from "@/components/en-from/en-upload/en-upload.vue"
 	import EnImage from "@/components/en-utils/en-image/en-image.vue"
-  import AddIdentity from "@/page_task/identity_upload/add-identity.vue";
-  import EnInput from "@/components/en-from/en-input/en-input.vue";
-  import AddLicense from "@/page_task/apply/components/add-license.vue";
-  import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
-  import AddBank from "@/page_task/apply/components/add-bank.vue";
-  import tools from "@/service/tools";
+	import AddIdentity from "@/page_task/identity_upload/add-identity.vue";
+	import EnInput from "@/components/en-from/en-input/en-input.vue";
+	import AddLicense from "@/page_task/apply/components/add-license.vue";
+	import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
+	import AddBank from "@/page_task/apply/components/add-bank.vue";
+	import tools from "@/service/tools";
 
 	export default {
 		components: {
-      AddBank,
-      EnBlank,
-      AddLicense,
-      EnInput,
-      AddIdentity,
+			AddBank,
+			EnBlank,
+			AddLicense,
+			EnInput,
+			AddIdentity,
 			WhInput,
 			EnUpload,
 			EnImage
@@ -143,17 +158,23 @@
 			return {
 				title: '',
 				scrollTop: 0,
-        editIndex:0,
-        appliesData:[{'value':1,'text':'个人'},{'value':2,'text':'企业'}],
-        tripartiteList:[],
-        tripartiteItem:{
-          "type": "1",
-          "name": "",
-          "id_number": "",
-          "identity_one": "",
-          "identity_two": "",
-          "bank_data": [],
-        }
+				editIndex: 0,
+				appliesData: [{
+					'value': 1,
+					'text': '个人'
+				}, {
+					'value': 2,
+					'text': '企业'
+				}],
+				tripartiteList: [],
+				tripartiteItem: {
+					"type": "1",
+					"name": "",
+					"id_number": "",
+					"identity_one": "",
+					"identity_two": "",
+					"bank_data": [],
+				}
 			}
 		},
 		onPageScroll(res) {
@@ -161,83 +182,87 @@
 		},
 		onLoad(options) {
 			this.title = options.title
-      let tripartiteList = uni.getStorageSync('tripartiteData')
-      let tripartiteKey = uni.getStorageSync('tripartiteKey')
-      this.tripartiteList=tripartiteList
-      this.showKeys=tripartiteKey
+			let tripartiteList = uni.getStorageSync('tripartiteData')
+			let tripartiteKey = uni.getStorageSync('tripartiteKey')
+			this.tripartiteList = tripartiteList
+			this.showKeys = tripartiteKey
 		},
 		methods: {
-      addItem(){
-        this.tripartiteList.push(this.tripartiteItem)
-      },
-      delTripartite(itemKey){
-        uni.showModal({
-          title: '是否删除当前第三方信息',
-          content: '确定删除?',
-          success: (res) => {
-            if (res.confirm) {
-              this.tripartiteList.splice(itemKey,1)
-            }
-          }
-        })
+			addItem() {
+				this.tripartiteList.push(this.tripartiteItem)
+			},
+			delTripartite(itemKey) {
+				uni.showModal({
+					title: '是否删除当前第三方信息',
+					content: '确定删除?',
+					success: (res) => {
+						if (res.confirm) {
+							this.tripartiteList.splice(itemKey, 1)
+						}
+					}
+				})
 
-      },
-      farming(key) {
-        if(this.tripartiteList[key].type*1===1){
-          this.tripartiteList[key].q_identity_one=this.tripartiteList[key].identity_one
-          this.tripartiteList[key].q_name=this.tripartiteList[key].name
-          this.tripartiteList[key].q_id_number=this.tripartiteList[key].id_number
-          this.tripartiteList[key].name=''
-          this.tripartiteList[key].identity_one=''
-          this.tripartiteList[key].id_number=''
-          if( this.tripartiteList[key].u_identity_one){
-            this.tripartiteList[key].identity_one=this.tripartiteList[key].u_identity_one
-          }
-          if( this.tripartiteList[key].u_name){
-            this.tripartiteList[key].name=this.tripartiteList[key].u_name
-          }
-          if( this.tripartiteList[key].u_id_number){
-            this.tripartiteList[key].id_number=this.tripartiteList[key].u_id_number
-          }
-        }else {
-          this.tripartiteList[key].u_identity_one=this.tripartiteList[key].identity_one
-          this.tripartiteList[key].u_name=this.tripartiteList[key].name
-          this.tripartiteList[key].u_id_number=this.tripartiteList[key].id_number
-          this.tripartiteList[key].name=''
-          this.tripartiteList[key].identity_one=''
-          this.tripartiteList[key].id_number=''
-          if( this.tripartiteList[key].q_identity_one){
-            this.tripartiteList[key].identity_one=this.tripartiteList[key].q_identity_one
-          }
-          if( this.tripartiteList[key].q_name){
-            this.tripartiteList[key].name=this.tripartiteList[key].q_name
-          }
-          if( this.tripartiteList[key].q_id_number){
-            this.tripartiteList[key].id_number=this.tripartiteList[key].q_id_number
-          }
-        }
-      },
-      delBank(applyKey,itemKey){
+			},
+			farming(key) {
+				if (this.tripartiteList[key].type * 1 === 1) {
+					this.tripartiteList[key].q_identity_one = this.tripartiteList[key].identity_one
+					this.tripartiteList[key].q_name = this.tripartiteList[key].name
+					this.tripartiteList[key].q_id_number = this.tripartiteList[key].id_number
+					this.tripartiteList[key].name = ''
+					this.tripartiteList[key].identity_one = ''
+					this.tripartiteList[key].id_number = ''
+					if (this.tripartiteList[key].u_identity_one) {
+						this.tripartiteList[key].identity_one = this.tripartiteList[key].u_identity_one
+					}
+					if (this.tripartiteList[key].u_name) {
+						this.tripartiteList[key].name = this.tripartiteList[key].u_name
+					}
+					if (this.tripartiteList[key].u_id_number) {
+						this.tripartiteList[key].id_number = this.tripartiteList[key].u_id_number
+					}
+				} else {
+					this.tripartiteList[key].u_identity_one = this.tripartiteList[key].identity_one
+					this.tripartiteList[key].u_name = this.tripartiteList[key].name
+					this.tripartiteList[key].u_id_number = this.tripartiteList[key].id_number
+					this.tripartiteList[key].name = ''
+					this.tripartiteList[key].identity_one = ''
+					this.tripartiteList[key].id_number = ''
+					if (this.tripartiteList[key].q_identity_one) {
+						this.tripartiteList[key].identity_one = this.tripartiteList[key].q_identity_one
+					}
+					if (this.tripartiteList[key].q_name) {
+						this.tripartiteList[key].name = this.tripartiteList[key].q_name
+					}
+					if (this.tripartiteList[key].q_id_number) {
+						this.tripartiteList[key].id_number = this.tripartiteList[key].q_id_number
+					}
+				}
+			},
+			delBank(applyKey, itemKey) {
 
-        uni.showModal({
-          title: '是否删除当前还款信息',
-          content: '确定删除?',
-          success: (res) => {
-            if (res.confirm) {
-              this.tripartiteList[applyKey].bank_data.splice(itemKey,1)
-            }
-          }
-        })
-      },
-      addBank(applyKey){
-        if(!this.tripartiteList[applyKey].bank_data){
-          this.tripartiteList[applyKey].bank_data=[];
-        }
-        this.tripartiteList[applyKey].bank_data.push({'name':'','bank_name':'','bank_num':''})
-      },
-      verifyKey(field) {
-        return this.showKeys.indexOf(field) >= 0
-      },
+				uni.showModal({
+					title: '是否删除当前还款信息',
+					content: '确定删除?',
+					success: (res) => {
+						if (res.confirm) {
+							this.tripartiteList[applyKey].bank_data.splice(itemKey, 1)
+						}
+					}
+				})
+			},
+			addBank(applyKey) {
+				if (!this.tripartiteList[applyKey].bank_data) {
+					this.tripartiteList[applyKey].bank_data = [];
+				}
+				this.tripartiteList[applyKey].bank_data.push({
+					'name': '',
+					'bank_name': '',
+					'bank_num': ''
+				})
+			},
+			verifyKey(field) {
+				return this.showKeys.indexOf(field) >= 0
+			},
 
 			// 保存
 			onLeftSubmit() {
@@ -247,16 +272,16 @@
 			},
 			// 提交
 			onSubmit() {
-          uni.$emit('putTripartiteInfo',this.tripartiteList)
-        setTimeout(()=>{
-          tools.leftClick()
-        },50)
-      },
+				uni.$emit('putTripartiteInfo', this.tripartiteList)
+				setTimeout(() => {
+					tools.leftClick()
+				}, 50)
+			},
 
 
 			// 编辑单个信息
 			onEditInfo(index) {
-				this.editIndex=index
+				this.editIndex = index
 			},
 
 		}
@@ -299,4 +324,10 @@
 		background: #FFFFFF;
 		border: 2rpx solid #E83F37;
 	}
-</style>
+
+	.wh-input {
+		width: 100%;
+		text-align: right;
+		direction: rtl;
+	}
+</style>

+ 5 - 4
pages/index/index.vue

@@ -41,7 +41,7 @@
 				</view>
 			</view>
 			<view class="circle_chart column-sb-c m-t10">
-				<CircleChart ref="circleObj" :width="'180rpx'" :height="'180rpx'" bgColor="#0FB160"></CircleChart>
+				<CircleChart ref="circleObj" :width="'185rpx'" :height="'185rpx'" bgColor="#0FB160"></CircleChart>
 				<text class="size-24 text-color-12">任务进度</text>
 			</view>
 		</view>
@@ -122,7 +122,7 @@
 		},
 		onShow() {
 			this.startList()
-      this.$refs.memberObj.getMemberInfo()
+			this.$refs.memberObj.getMemberInfo()
 		},
 		onPageScroll(res) {
 			this.scrollTop = res.scrollTop / 120
@@ -143,7 +143,8 @@
 							this.chartList[1].value = (res.data.lagNum / res.data.totalNum * 100).toFixed(0) * 1;
 							this.chartList[2].value = (res.data.normalNum / res.data.totalNum * 100).toFixed(0) *
 								1;
-							this.$refs.circleObj.setServerData((res.data.endNum / res.data.totalNum).toFixed(2) *1)
+							this.$refs.circleObj.setServerData((res.data.endNum / res.data.totalNum).toFixed(2) *
+								1)
 						} else {
 							this.chartList[0].value = 0;
 							this.chartList[1].value = 0;
@@ -209,4 +210,4 @@
 		height: 16rpx;
 		border-radius: 50%;
 	}
-</style>
+</style>

+ 3 - 3
pages/login/index.vue

@@ -89,9 +89,9 @@
 			return {
 				type: 1,
 				loginData: {
-					phone: '',
+					phone: '18941507050',
 					password: '',
-					code: '',
+					code: '1234',
 				},
 				phoneShake: false,
 				passwordShake: false,
@@ -454,4 +454,4 @@
 		}
 
 	}
-</style>
+</style>

BIN=BIN
static/img/index/chat-error.png


+ 1797 - 1576
uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue

@@ -16,1603 +16,1824 @@
  * 
  -->
 <template>
-  <view class="chartsview" :id="'ChartBoxId'+cid">
-    <view v-if="mixinDatacomLoading">
-      <!-- 自定义加载状态,请改这里 -->
-      <qiun-loading :loadingType="loadingType" />
-    </view>
-    <view v-if="mixinDatacomErrorMessage && errorShow" @tap="reloading">
-      <!-- 自定义错误提示,请改这里 -->
-      <qiun-error :errorMessage="errorMessage" />
-    </view>
-    <!-- APP和H5采用renderjs渲染图表 -->
-    <!-- #ifdef APP-VUE || H5 -->
-    <block v-if="echarts">
-      <view
-        :style="{ background: background }"
-        style="width: 100%;height: 100%;"
-        :data-directory="directory"
-        :id="'EC'+cid" 
-        :prop="echartsOpts" 
-        :change:prop="rdcharts.ecinit" 
-        :resize="echartsResize"
-        :change:resize="rdcharts.ecresize"
-        v-show="showchart"
-      />
-    </block>
-    <block v-else>
-      <view
-        v-on:tap="rdcharts.tap"
-        v-on:mousemove="rdcharts.mouseMove"
-        v-on:mousedown="rdcharts.mouseDown"
-        v-on:mouseup="rdcharts.mouseUp"
-        v-on:touchstart="rdcharts.touchStart"
-        v-on:touchmove="rdcharts.touchMove"
-        v-on:touchend="rdcharts.touchEnd"
-        :id="'UC'+cid"
-        :prop="uchartsOpts"
-        :change:prop="rdcharts.ucinit"
-      >
-        <canvas
-          :id="cid"
-          :canvasId="cid"
-          :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
-          :disable-scroll="disableScroll"
-          @error="_error"
-          v-show="showchart"
-        />
-      </view>
-    </block>
-    <!-- #endif -->
-    <!-- 支付宝小程序 -->
-    <!-- #ifdef MP-ALIPAY -->
-    <block v-if="ontouch">
-      <canvas
-        :id="cid"
-        :canvasId="cid"
-        :width="cWidth * pixel"
-        :height="cHeight * pixel"
-        :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
-        :disable-scroll="disScroll"
-        @tap="_tap"
-        @touchstart="_touchStart"
-        @touchmove="_touchMove"
-        @touchend="_touchEnd"
-        @error="_error"
-        v-show="showchart"
-      />
-    </block>
-    <block v-if="!ontouch">
-      <canvas
-        :id="cid"
-        :canvasId="cid"
-        :width="cWidth * pixel"
-        :height="cHeight * pixel"
-        :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
-        :disable-scroll="disScroll"
-        @tap="_tap"
-        @error="_error"
-        v-show="showchart"
-      />
-    </block>
-    <!-- #endif -->
-    <!-- 其他小程序通过vue渲染图表 -->
-    <!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-KUAISHOU || MP-LARK || MP-JD || MP-360 -->
-    <block v-if="type2d">
-      <view v-if="ontouch" @tap="_tap">
-        <canvas
-          :id="cid"
-          :canvasId="cid"
-          :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
-          type="2d"
-          :disable-scroll="disScroll"
-          @touchstart="_touchStart"
-          @touchmove="_touchMove"
-          @touchend="_touchEnd"
-          @error="_error"
-          v-show="showchart"
-        />
-      </view>
-      <view v-if="!ontouch" @tap="_tap">
-        <canvas
-          :id="cid"
-          :canvasId="cid"
-          :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
-          type="2d"
-          :disable-scroll="disScroll"
-          @error="_error"
-          v-show="showchart"
-        />
-      </view>
-    </block>
-    <block v-if="!type2d">
-      <view v-if="ontouch" @tap="_tap">
-        <canvas
-          :id="cid"
-          :canvasId="cid"
-          :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
-          @touchstart="_touchStart"
-          @touchmove="_touchMove"
-          @touchend="_touchEnd"
-          :disable-scroll="disScroll"
-          @error="_error"
-          v-if="showchart"
-        />
-      </view>
-      <view v-if="!ontouch" >
-        <canvas
-          :id="cid"
-          :canvasId="cid"
-          :style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
-          :disable-scroll="disScroll"
-          @tap="_tap"
-          @error="_error"
-          v-if="showchart"
-        />
-      </view>
-    </block>
-    <!-- #endif -->
-  </view>
+	<view class="chartsview" :id="'ChartBoxId'+cid">
+		<view v-if="mixinDatacomLoading">
+			<!-- 自定义加载状态,请改这里 -->
+			<qiun-loading :loadingType="loadingType" />
+		</view>
+		<view v-if="mixinDatacomErrorMessage && errorShow" @tap="reloading">
+			<!-- 自定义错误提示,请改这里 -->
+			<qiun-error :errorMessage="errorMessage" :errorType="errorType" />
+		</view>
+		<!-- APP和H5采用renderjs渲染图表 -->
+		<!-- #ifdef APP-VUE || H5 -->
+		<block v-if="echarts">
+			<view :style="{ background: background }" style="width: 100%;height: 100%;" :data-directory="directory"
+				:id="'EC'+cid" :prop="echartsOpts" :change:prop="rdcharts.ecinit" :resize="echartsResize"
+				:change:resize="rdcharts.ecresize" v-show="showchart" />
+		</block>
+		<block v-else>
+			<view v-on:tap="rdcharts.tap" v-on:mousemove="rdcharts.mouseMove" v-on:mousedown="rdcharts.mouseDown"
+				v-on:mouseup="rdcharts.mouseUp" v-on:touchstart="rdcharts.touchStart"
+				v-on:touchmove="rdcharts.touchMove" v-on:touchend="rdcharts.touchEnd" :id="'UC'+cid" :prop="uchartsOpts"
+				:change:prop="rdcharts.ucinit">
+				<canvas :id="cid" :canvasId="cid"
+					:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
+					:disable-scroll="disableScroll" @error="_error" v-show="showchart" />
+			</view>
+		</block>
+		<!-- #endif -->
+		<!-- 支付宝小程序 -->
+		<!-- #ifdef MP-ALIPAY -->
+		<block v-if="ontouch">
+			<canvas :id="cid" :canvasId="cid" :width="cWidth * pixel" :height="cHeight * pixel"
+				:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
+				:disable-scroll="disScroll" @tap="_tap" @touchstart="_touchStart" @touchmove="_touchMove"
+				@touchend="_touchEnd" @error="_error" v-show="showchart" />
+		</block>
+		<block v-if="!ontouch">
+			<canvas :id="cid" :canvasId="cid" :width="cWidth * pixel" :height="cHeight * pixel"
+				:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
+				:disable-scroll="disScroll" @tap="_tap" @error="_error" v-show="showchart" />
+		</block>
+		<!-- #endif -->
+		<!-- 其他小程序通过vue渲染图表 -->
+		<!-- #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-KUAISHOU || MP-LARK || MP-JD || MP-360 -->
+		<block v-if="type2d">
+			<view v-if="ontouch" @tap="_tap">
+				<canvas :id="cid" :canvasId="cid"
+					:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" type="2d"
+					:disable-scroll="disScroll" @touchstart="_touchStart" @touchmove="_touchMove" @touchend="_touchEnd"
+					@error="_error" v-show="showchart" />
+			</view>
+			<view v-if="!ontouch" @tap="_tap">
+				<canvas :id="cid" :canvasId="cid"
+					:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }" type="2d"
+					:disable-scroll="disScroll" @error="_error" v-show="showchart" />
+			</view>
+		</block>
+		<block v-if="!type2d">
+			<view v-if="ontouch" @tap="_tap">
+				<canvas :id="cid" :canvasId="cid"
+					:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
+					@touchstart="_touchStart" @touchmove="_touchMove" @touchend="_touchEnd" :disable-scroll="disScroll"
+					@error="_error" v-if="showchart" />
+			</view>
+			<view v-if="!ontouch">
+				<canvas :id="cid" :canvasId="cid"
+					:style="{ width: cWidth + 'px', height: cHeight + 'px', background: background }"
+					:disable-scroll="disScroll" @tap="_tap" @error="_error" v-if="showchart" />
+			</view>
+		</block>
+		<!-- #endif -->
+	</view>
 </template>
 
 <script>
-import uCharts from '../../js_sdk/u-charts/u-charts.js';
-import cfu from '../../js_sdk/u-charts/config-ucharts.js';
-// #ifdef APP-VUE || H5
-import cfe from '../../js_sdk/u-charts/config-echarts.js';
-// #endif
+	import uCharts from '../../js_sdk/u-charts/u-charts.js';
+	import cfu from '../../js_sdk/u-charts/config-ucharts.js';
+	// #ifdef APP-VUE || H5
+	import cfe from '../../js_sdk/u-charts/config-echarts.js';
+	// #endif
 
-function deepCloneAssign(origin = {}, ...args) {
-  for (let i in args) {
-    for (let key in args[i]) {
-      if (args[i].hasOwnProperty(key)) {
-        origin[key] = args[i][key] && typeof args[i][key] === 'object' ? deepCloneAssign(Array.isArray(args[i][key]) ? [] : {}, origin[key], args[i][key]) : args[i][key];
-      }
-    }
-  }
-  return origin;
-}
+	function deepCloneAssign(origin = {}, ...args) {
+		for (let i in args) {
+			for (let key in args[i]) {
+				if (args[i].hasOwnProperty(key)) {
+					origin[key] = args[i][key] && typeof args[i][key] === 'object' ? deepCloneAssign(Array.isArray(args[i][
+						key
+					]) ? [] : {}, origin[key], args[i][key]) : args[i][key];
+				}
+			}
+		}
+		return origin;
+	}
 
-function formatterAssign(args,formatter) {
-  for (let key in args) {
-    if(args.hasOwnProperty(key) && args[key] !== null && typeof args[key] === 'object'){
-      formatterAssign(args[key],formatter)
-    }else if(key === 'format' && typeof args[key] === 'string'){
-      args['formatter'] = formatter[args[key]] ? formatter[args[key]] : undefined;
-    }
-  }
-  return args;
-}
+	function formatterAssign(args, formatter) {
+		for (let key in args) {
+			if (args.hasOwnProperty(key) && args[key] !== null && typeof args[key] === 'object') {
+				formatterAssign(args[key], formatter)
+			} else if (key === 'format' && typeof args[key] === 'string') {
+				args['formatter'] = formatter[args[key]] ? formatter[args[key]] : undefined;
+			}
+		}
+		return args;
+	}
 
-// 时间转换函数,为了匹配uniClinetDB读取出的时间与categories不同
-function getFormatDate(date) {
-	var seperator = "-";
-	var year = date.getFullYear();
-	var month = date.getMonth() + 1;
-	var strDate = date.getDate();
-	if (month >= 1 && month <= 9) {
+	// 时间转换函数,为了匹配uniClinetDB读取出的时间与categories不同
+	function getFormatDate(date) {
+		var seperator = "-";
+		var year = date.getFullYear();
+		var month = date.getMonth() + 1;
+		var strDate = date.getDate();
+		if (month >= 1 && month <= 9) {
 			month = "0" + month;
-	}
-	if (strDate >= 0 && strDate <= 9) {
+		}
+		if (strDate >= 0 && strDate <= 9) {
 			strDate = "0" + strDate;
+		}
+		var currentdate = year + seperator + month + seperator + strDate;
+		return currentdate;
 	}
-	var currentdate = year + seperator + month + seperator + strDate;
-	return currentdate;
-}
 
-var lastMoveTime = null;
-/**
- * 防抖
- *
- * @param { Function } fn 要执行的方法
- * @param { Number } wait  防抖多少毫秒
- *
- * 在 vue 中使用(注意:不能使用箭头函数,否则this指向不对,并且不能再次封装如:
- * move(){  // 错误调用方式
- *   debounce(function () {
- *   console.log(this.title);
- * }, 1000)});
- * 应该直接使用:// 正确调用方式
- * move: debounce(function () {
- *   console.log(this.title);
- * }, 1000)
- */
-function debounce(fn, wait) {
-  let timer = false;
-  return function() {
-    clearTimeout(timer);
-    timer && clearTimeout(timer);
-    timer = setTimeout(() => {
-      timer = false;
-      fn.apply(this, arguments); // 把参数传进去
-    }, wait);
-  };
-}
+	var lastMoveTime = null;
+	/**
+	 * 防抖
+	 *
+	 * @param { Function } fn 要执行的方法
+	 * @param { Number } wait  防抖多少毫秒
+	 *
+	 * 在 vue 中使用(注意:不能使用箭头函数,否则this指向不对,并且不能再次封装如:
+	 * move(){  // 错误调用方式
+	 *   debounce(function () {
+	 *   console.log(this.title);
+	 * }, 1000)});
+	 * 应该直接使用:// 正确调用方式
+	 * move: debounce(function () {
+	 *   console.log(this.title);
+	 * }, 1000)
+	 */
+	function debounce(fn, wait) {
+		let timer = false;
+		return function() {
+			clearTimeout(timer);
+			timer && clearTimeout(timer);
+			timer = setTimeout(() => {
+				timer = false;
+				fn.apply(this, arguments); // 把参数传进去
+			}, wait);
+		};
+	}
 
-export default {
-  name: 'qiun-data-charts',
-  mixins: [uniCloud.mixinDatacom],
-  props: {
-    type: {
-      type: String,
-      default: null
-    },
-    canvasId: {
-      type: String,
-      default: 'uchartsid'
-    },
-    canvas2d: {
-      type: Boolean,
-      default: false
-    },
-    background: {
-      type: String,
-      default: 'rgba(0,0,0,0)'
-    },
-    animation: {
-      type: Boolean,
-      default: true
-    },
-    chartData: {
-      type: Object,
-      default() {
-        return {
-          categories: [],
-          series: []
-        };
-      }
-    },
-    opts: {
-      type: Object,
-      default() {
-        return {};
-      }
-    },
-    eopts: {
-      type: Object,
-      default() {
-        return {};
-      }
-    },
-    loadingType: {
-      type: Number,
-      default: 2
-    },
-    errorShow: {
-      type: Boolean,
-      default: true
-    },
-    errorReload: {
-      type: Boolean,
-      default: true
-    },
-    errorMessage: {
-      type: String,
-      default: null
-    },
-    inScrollView: {
-      type: Boolean,
-      default: false
-    },
-    reshow: {
-      type: Boolean,
-      default: false
-    },
-    reload: {
-      type: Boolean,
-      default: false
-    },
-    disableScroll: {
-      type: Boolean,
-      default: false
-    },
-    optsWatch: {
-      type: Boolean,
-      default: true
-    },
-    onzoom: {
-      type: Boolean,
-      default: false
-    },
-    ontap: {
-      type: Boolean,
-      default: true
-    },
-    ontouch: {
-      type: Boolean,
-      default: false
-    },
-    onmouse: {
-      type: Boolean,
-      default: true
-    },
-    onmovetip: {
-      type: Boolean,
-      default: false
-    },
-    echartsH5: {
-      type: Boolean,
-      default: false
-    },
-    echartsApp: {
-      type: Boolean,
-      default: false
-    },
-    tooltipShow: {
-      type: Boolean,
-      default: true
-    },
-    tooltipFormat: {
-      type: String,
-      default: undefined
-    },
-    tooltipCustom: {
-      type: Object,
-      default: undefined
-    },
-    startDate: {
-      type: String,
-      default: undefined
-    },
-    endDate: {
-      type: String,
-      default: undefined
-    },
-    textEnum: {
-      type: Array,
-      default () {
-        return []
-      }
-    },
-    groupEnum: {
-      type: Array,
-      default () {
-        return []
-      }
-    },
-    pageScrollTop: {
-      type: Number,
-      default: 0
-    },
-    directory: {
-      type: String,
-      default: '/'
-    },
-    tapLegend: {
-      type: Boolean,
-      default: true
-    },
-    menus: {
-      type: Array,
-      default () {
-        return []
-      }
-    }
-  },
-  data() {
-    return {
-      cid: 'uchartsid',
-      inWx: false,
-      inAli: false,
-      inTt: false,
-      inBd: false,
-      inH5: false,
-      inApp: false,
-      inWin: false,
-      type2d: true,
-      disScroll: false,
-      openmouse: false,
-      pixel: 1,
-      cWidth: 375,
-      cHeight: 250,
-      showchart: false,
-      echarts: false,
-      echartsResize:{
-        state:false
-      },
-      uchartsOpts: {},
-      echartsOpts: {},
-      drawData:{},
-      lastDrawTime:null,
-    };
-  },
-  created(){
-    this.cid = this.canvasId
-    if (this.canvasId == 'uchartsid' || this.canvasId == '') {
-      let t = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
-      let len = t.length
-      let id = ''
-      for (let i = 0; i < 32; i++) {
-        id += t.charAt(Math.floor(Math.random() * len))
-      }
-      this.cid = id
-    }
-    const systemInfo = uni.getSystemInfoSync()
-    if(systemInfo.platform === 'windows' || systemInfo.platform === 'mac'){
-      this.inWin = true;
-    }
-    // #ifdef MP-WEIXIN
-    this.inWx = true;
-    if (this.canvas2d === false || systemInfo.platform === 'windows' || systemInfo.platform === 'mac') {
-      this.type2d = false;
-    }else{
-      this.type2d = true;
-      this.pixel = systemInfo.pixelRatio;
-    }
-    // #endif
-    //非微信小程序端强制关闭canvas2d模式
-    // #ifndef MP-WEIXIN
-    this.type2d = false;
-    // #endif
-    // #ifdef  MP-TOUTIAO || MP-LARK || MP-ALIPAY
-    this.type2d = this.canvas2d;
-    // #endif
-    // #ifdef MP-ALIPAY
-    this.inAli = true;
-    this.pixel = systemInfo.pixelRatio;
-    // #endif
-    // #ifdef MP-BAIDU
-    this.inBd = true;
-    // #endif
-    // #ifdef MP-TOUTIAO
-    this.inTt = true;
-    // #endif
-    this.disScroll = this.disableScroll;
-  },
-  mounted() {
-    // #ifdef APP-VUE
-    this.inApp = true;
-    if (this.echartsApp === true) {
-      this.echarts = true;
-      this.openmouse = false;
-    }
-    // #endif
-    // #ifdef APP-NVUE
-    this.inApp = true;
-    this.mixinDatacomLoading = false
-    this.mixinDatacomErrorMessage = "暂不支持NVUE"
-    // #endif
-    // #ifdef H5
-    this.inH5 = true;
-    if(this.inWin === true){
-      this.openmouse = this.onmouse;
-    }
-    if (this.echartsH5 === true) {
-      this.echarts = true;
-    }
-    // #endif
-    this.$nextTick(()=>{
-      this.beforeInit();
-    })
-    // #ifndef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || APP-VUE
-    const time = this.inH5 ? 500 : 200;
-    const _this = this;
-    uni.onWindowResize(
-      debounce(function(res) {
-        if (_this.mixinDatacomLoading == true) {
-          return;
-        }
-        let errmsg = _this.mixinDatacomErrorMessage;
-        if (errmsg !== null && errmsg !== 'null' && errmsg !== '') {
-          return;
-        }
-        if (_this.echarts) {
-          _this.echartsResize.state = !_this.echartsResize.state;
-        } else {
-          _this.resizeHandler();
-        }
-      }, time)
-    );
-    // #endif
-  },
-  destroyed(){
-    if(this.echarts === true){
-      delete cfe.option[this.cid]
-      delete cfe.instance[this.cid]
-    }else{
-      delete cfu.option[this.cid]
-      delete cfu.instance[this.cid]
-    }
-    // #ifndef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
-    uni.offWindowResize(()=>{})
-    // #endif
-  },
-  watch: {
-    chartDataProps: {
-      handler(val, oldval) {
-        if (typeof val === 'object') {
-          if (JSON.stringify(val) !== JSON.stringify(oldval)) {
-            this._clearChart();
-            if (val.series && val.series.length > 0) {
-              this.beforeInit();
-            }else{
-              this.mixinDatacomLoading = true;
-              this.showchart = false;
-              this.mixinDatacomErrorMessage = null;
-            }
-          }
-        } else {
-          this.mixinDatacomLoading = false;
-          this._clearChart();
-          this.showchart = false;
-          this.mixinDatacomErrorMessage = '参数错误:chartData数据类型错误';
-        }
-      },
-      immediate: false,
-      deep: true
-    },
-    localdata:{
-      handler(val, oldval) {
-        if (JSON.stringify(val) !== JSON.stringify(oldval)) {
-          if (val.length > 0) {
-            this.beforeInit();
-          }else{
-            this.mixinDatacomLoading = true;
-            this._clearChart();
-            this.showchart = false;
-            this.mixinDatacomErrorMessage = null;
-          }
-        }
-      },
-      immediate: false,
-      deep: true
-    },
-    optsProps: {
-      handler(val, oldval) {
-        if (typeof val === 'object') {
-          if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === false && this.optsWatch == true) {
-            this.checkData(this.drawData);
-          }
-        } else {
-          this.mixinDatacomLoading = false;
-          this._clearChart();
-          this.showchart = false;
-          this.mixinDatacomErrorMessage = '参数错误:opts数据类型错误';
-        }
-      },
-      immediate: false,
-      deep: true
-    },
-    eoptsProps: {
-      handler(val, oldval) {
-        if (typeof val === 'object') {
-          if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === true) {
-            this.checkData(this.drawData);
-          }
-        } else {
-          this.mixinDatacomLoading = false;
-          this.showchart = false;
-          this.mixinDatacomErrorMessage = '参数错误:eopts数据类型错误';
-        }
-      },
-      immediate: false,
-      deep: true
-    },
-    reshow(val, oldval) {
-      if (val === true && this.mixinDatacomLoading === false) {
-        setTimeout(() => {
-          this.mixinDatacomErrorMessage = null;
-          this.echartsResize.state = !this.echartsResize.state;
-          this.checkData(this.drawData);
-        }, 200);
-      }
-    },
-    reload(val, oldval) {
-      if (val === true) {
-        this.showchart = false;
-        this.mixinDatacomErrorMessage = null;
-        this.reloading();
-      }
-    },
-    mixinDatacomErrorMessage(val, oldval) {
-      if (val) {
-        this.emitMsg({name: 'error', params: {type:"error", errorShow: this.errorShow, msg: val, id: this.cid}});
-        if(this.errorShow){
-          console.log('[秋云图表组件]' + val);
-        }
-      }
-    },
-    errorMessage(val, oldval) {
-      if (val && this.errorShow && val !== null && val !== 'null' && val !== '') {
-        this.showchart = false;
-        this.mixinDatacomLoading = false;
-        this.mixinDatacomErrorMessage = val;
-      } else {
-        this.showchart = false;
-        this.mixinDatacomErrorMessage = null;
-        this.reloading();
-      }
-    }
-  },
-  computed: {
-    optsProps() {
-      return JSON.parse(JSON.stringify(this.opts));
-    },
-    eoptsProps() {
-      return JSON.parse(JSON.stringify(this.eopts));
-    },
-    chartDataProps() {
-      return JSON.parse(JSON.stringify(this.chartData));
-    },
-  },
-  methods: {
-    beforeInit(){
-      this.mixinDatacomErrorMessage = null;
-      if (typeof this.chartData === 'object' && this.chartData != null && this.chartData.series !== undefined && this.chartData.series.length > 0) {
-        //拷贝一下chartData,为了opts变更后统一数据来源
-        this.drawData = deepCloneAssign({}, this.chartData);
-        this.mixinDatacomLoading = false;
-        this.showchart = true;
-        this.checkData(this.chartData);
-      }else if(this.localdata.length>0){
-        this.mixinDatacomLoading = false;
-        this.showchart = true;
-        this.localdataInit(this.localdata);
-      }else if(this.collection !== ''){
-        this.mixinDatacomLoading = false;
-        this.getCloudData();
-      }else{
-        this.mixinDatacomLoading = true;
-      }
-    },
-    localdataInit(resdata){
-      //替换enum类型为正确的描述
-      if(this.groupEnum.length>0){
-        for (let i = 0; i < resdata.length; i++) {
-          for (let j = 0; j < this.groupEnum.length; j++) {
-            if(resdata[i].group === this.groupEnum[j].value){
-              resdata[i].group = this.groupEnum[j].text
-            }
-          }
-        }
-      }
-      if(this.textEnum.length>0){
-        for (let i = 0; i < resdata.length; i++) {
-          for (let j = 0; j < this.textEnum.length; j++) {
-            if(resdata[i].text === this.textEnum[j].value){
-              resdata[i].text = this.textEnum[j].text
-            }
-          }
-        }
-      }
-      let needCategories = false;
-      let tmpData = {categories:[], series:[]}
-      let tmpcategories = []
-      let tmpseries = [];
-      //拼接categories
-      if(this.echarts === true){
-        needCategories = cfe.categories.includes(this.type)
-      }else{
-        needCategories = cfu.categories.includes(this.type)
-      }
-      if(needCategories === true){
-        //如果props中的chartData带有categories,则优先使用chartData的categories
-        if(this.chartData && this.chartData.categories && this.chartData.categories.length>0){
-          tmpcategories = this.chartData.categories
-        }else{
-          //如果是日期类型的数据,不管是本地数据还是云数据,都按起止日期自动拼接categories
-          if(this.startDate && this.endDate){
-            let idate = new Date(this.startDate)
-            let edate = new Date(this.endDate)
-            while (idate <= edate) {
-            	tmpcategories.push(getFormatDate(idate))
-            	idate = idate.setDate(idate.getDate() + 1)
-            	idate = new Date(idate)
-            }
-          //否则从结果中去重并拼接categories
-          }else{
-            let tempckey = {};
-            resdata.map(function(item, index) {
-              if (item.text != undefined && !tempckey[item.text]) {
-                tmpcategories.push(item.text)
-                tempckey[item.text] = true
-              }
-            });
-          }
-        }
-        tmpData.categories = tmpcategories
-      }
-      //拼接series
-      let tempskey = {};
-      resdata.map(function(item, index) {
-        if (item.group != undefined && !tempskey[item.group]) {
-          tmpseries.push({ name: item.group, data: [] });
-          tempskey[item.group] = true;
-        }
-      });
-      //如果没有获取到分组名称(可能是带categories的数据,也可能是不带的饼图类)
-      if (tmpseries.length == 0) {
-        tmpseries = [{ name: '默认分组', data: [] }];
-        //如果是需要categories的图表类型
-        if(needCategories === true){
-          for (let j = 0; j < tmpcategories.length; j++) {
-            let seriesdata = 0;
-            for (let i = 0; i < resdata.length; i++) {
-              if (resdata[i].text == tmpcategories[j]) {
-                seriesdata = resdata[i].value;
-              }
-            }
-            tmpseries[0].data.push(seriesdata);
-          }
-        //如果是饼图类的图表类型
-        }else{
-          for (let i = 0; i < resdata.length; i++) {
-            tmpseries[0].data.push({"name": resdata[i].text,"value": resdata[i].value});
-          }
-        }
-      //如果有分组名
-      } else {
-        for (let k = 0; k < tmpseries.length; k++) {
-          //如果有categories
-          if (tmpcategories.length > 0) {
-            for (let j = 0; j < tmpcategories.length; j++) {
-              let seriesdata = 0;
-              for (let i = 0; i < resdata.length; i++) {
-                if (tmpseries[k].name == resdata[i].group && resdata[i].text == tmpcategories[j]) {
-                  seriesdata = resdata[i].value;
-                }
-              }
-              tmpseries[k].data.push(seriesdata);
-            }
-          //如果传了group而没有传text,即没有categories(正常情况下这种数据是不符合数据要求规范的)
-          } else {
-            for (let i = 0; i < resdata.length; i++) {
-              if (tmpseries[k].name == resdata[i].group) {
-                tmpseries[k].data.push(resdata[i].value);
-              }
-            }
-          }
-        }
-      }
-      tmpData.series = tmpseries
-      //拷贝一下chartData,为了opts变更后统一数据来源
-      this.drawData = deepCloneAssign({}, tmpData);
-      this.checkData(tmpData)
-    },
-    reloading() {
-      if(this.errorReload === false){
-        return;
-      }
-      this.showchart = false;
-      this.mixinDatacomErrorMessage = null;
-      if (this.collection !== '') {
-        this.mixinDatacomLoading = false;
-        this.onMixinDatacomPropsChange(true);
-      } else {
-        this.beforeInit();
-      }
-    },
-    checkData(anyData) {
-      let cid = this.cid
-      //复位opts或eopts
-      if(this.echarts === true){
-        cfe.option[cid] = deepCloneAssign({}, this.eopts);
-        cfe.option[cid].id = cid;
-        cfe.option[cid].type = this.type;
-      }else{
-        if (this.type && cfu.type.includes(this.type)) {
-          cfu.option[cid] = deepCloneAssign({}, cfu[this.type], this.opts);
-          cfu.option[cid].canvasId = cid;
-        } else {
-          this.mixinDatacomLoading = false;
-          this.showchart = false;
-          this.mixinDatacomErrorMessage = '参数错误:props参数中type类型不正确';
-        }
-      }
-      //挂载categories和series
-      let newData = deepCloneAssign({}, anyData);
-      if (newData.series !== undefined && newData.series.length > 0) {
-        this.mixinDatacomErrorMessage = null;
-        if (this.echarts === true) {
-          cfe.option[cid].chartData = newData;
-          this.$nextTick(()=>{
-            this.init()
-          })
-        }else{
-          cfu.option[cid].categories = newData.categories;
-          cfu.option[cid].series = newData.series;
-          this.$nextTick(()=>{
-            this.init()
-          })
-        }
-      }
-    },
-    resizeHandler() {
-      //渲染防抖
-      let currTime = Date.now();
-      let lastDrawTime = this.lastDrawTime?this.lastDrawTime:currTime-3000;
-      let duration = currTime - lastDrawTime;
-      if (duration < 1000) return;
-      let chartdom = uni
-        .createSelectorQuery()
-        // #ifndef MP-ALIPAY
-        .in(this)
-        // #endif
-        .select('#ChartBoxId'+this.cid)
-        .boundingClientRect(data => {
-          this.showchart = true;
-          if (data.width > 0 && data.height > 0) {
-            if (data.width !== this.cWidth || data.height !== this.cHeight) {
-              this.checkData(this.drawData)
-            }
-          }
-        })
-        .exec();
-    },
-    getCloudData() {
-      if (this.mixinDatacomLoading == true) {
-        return;
-      }
-      this.mixinDatacomLoading = true;
-      this.mixinDatacomGet()
-        .then(res => {
-          this.mixinDatacomResData = res.result.data;
-          this.localdataInit(this.mixinDatacomResData);
-        })
-        .catch(err => {
-          this.mixinDatacomLoading = false;
-          this.showchart = false;
-          this.mixinDatacomErrorMessage = '请求错误:' + err;
-        });
-    },
-    onMixinDatacomPropsChange(needReset, changed) {
-      if (needReset == true && this.collection !== '') {
-        this.showchart = false;
-        this.mixinDatacomErrorMessage = null;
-        this._clearChart();
-        this.getCloudData();
-      }
-    },
-    _clearChart() {
-      let cid = this.cid
-      if (this.echarts !== true && cfu.option[cid] && cfu.option[cid].context) {
-        const ctx = cfu.option[cid].context;
-        if(typeof ctx === "object" && !!!cfu.option[cid].update){
-          ctx.clearRect(0, 0, this.cWidth*this.pixel, this.cHeight*this.pixel);
-          ctx.draw();
-        }
-      }
-    },
-    init() {
-      let cid = this.cid
-      let chartdom = uni
-        .createSelectorQuery()
-        // #ifndef MP-ALIPAY
-        .in(this)
-        // #endif
-        .select('#ChartBoxId'+cid)
-        .boundingClientRect(data => {
-          if (data.width > 0 && data.height > 0) {
-            this.mixinDatacomLoading = false;
-            this.showchart = true;
-            this.lastDrawTime = Date.now();
-            this.cWidth = data.width;
-            this.cHeight = data.height;
-            if(this.echarts !== true){
-              cfu.option[cid].background = this.background == 'rgba(0,0,0,0)' ? '#FFFFFF' : this.background;
-              cfu.option[cid].canvas2d = this.type2d;
-              cfu.option[cid].pixelRatio = this.pixel;
-              cfu.option[cid].animation = this.animation;
-              cfu.option[cid].width = data.width * this.pixel;
-              cfu.option[cid].height = data.height * this.pixel;
-              cfu.option[cid].onzoom = this.onzoom;
-              cfu.option[cid].ontap = this.ontap;
-              cfu.option[cid].ontouch = this.ontouch;
-              cfu.option[cid].onmouse = this.openmouse;
-              cfu.option[cid].onmovetip = this.onmovetip;
-              cfu.option[cid].tooltipShow = this.tooltipShow;
-              cfu.option[cid].tooltipFormat = this.tooltipFormat;
-              cfu.option[cid].tooltipCustom = this.tooltipCustom;
-              cfu.option[cid].inScrollView = this.inScrollView;
-              cfu.option[cid].lastDrawTime = this.lastDrawTime;
-              cfu.option[cid].tapLegend = this.tapLegend;
-            }
-            //如果是H5或者App端,采用renderjs渲染图表
-            if (this.inH5 || this.inApp) {
-              if (this.echarts == true) {
-                cfe.option[cid].ontap = this.ontap;
-                cfe.option[cid].onmouse = this.openmouse;
-                cfe.option[cid].tooltipShow = this.tooltipShow;
-                cfe.option[cid].tooltipFormat = this.tooltipFormat;
-                cfe.option[cid].tooltipCustom = this.tooltipCustom;
-                cfe.option[cid].lastDrawTime = this.lastDrawTime;
-                this.echartsOpts = deepCloneAssign({}, cfe.option[cid]);
-              } else {
-                cfu.option[cid].rotateLock = cfu.option[cid].rotate;
-                this.uchartsOpts = deepCloneAssign({}, cfu.option[cid]);
-              }
-            //如果是小程序端,采用uCharts渲染
-            } else {
-              cfu.option[cid] = formatterAssign(cfu.option[cid],cfu.formatter)
-              this.mixinDatacomErrorMessage = null;
-              this.mixinDatacomLoading = false;
-              this.showchart = true;
-              this.$nextTick(()=>{
-                if (this.type2d === true) {
-                  const query = uni.createSelectorQuery().in(this)
-                  query
-                    .select('#' + cid)
-                    .fields({ node: true, size: true })
-                    .exec(res => {
-                      if (res[0]) {
-                        const canvas = res[0].node;
-                        const ctx = canvas.getContext('2d');
-                        cfu.option[cid].context = ctx;
-                        cfu.option[cid].rotateLock = cfu.option[cid].rotate;
-                        if(cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true){
-                          this._updataUChart(cid)
-                        }else{
-                          canvas.width = data.width * this.pixel;
-                          canvas.height = data.height * this.pixel;
-                          canvas._width = data.width * this.pixel;
-                          canvas._height = data.height * this.pixel;
-                          setTimeout(()=>{
-                            cfu.option[cid].context.restore();
-                            cfu.option[cid].context.save();
-                            this._newChart(cid)
-                          },100)
-                        }
-                      } else {
-                        this.showchart = false;
-                        this.mixinDatacomErrorMessage = '参数错误:开启2d模式后,未获取到dom节点,canvas-id:' + cid;
-                      }
-                    });
-                } else {
-                  if(this.inAli){
-                    cfu.option[cid].rotateLock = cfu.option[cid].rotate;
-                  }
-                  cfu.option[cid].context = uni.createCanvasContext(cid, this);
-                  if(cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true){
-                    this._updataUChart(cid)
-                  }else{
-                    setTimeout(()=>{
-                      cfu.option[cid].context.restore();
-                      cfu.option[cid].context.save();
-                      this._newChart(cid)
-                    },100)
-                  }
-                }
-              })
-            }
-          } else {
-            this.mixinDatacomLoading = false;
-            this.showchart = false;
-            if (this.reshow == true) {
-              this.mixinDatacomErrorMessage = '布局错误:未获取到父元素宽高尺寸!canvas-id:' + cid;
-            }
-          }
-        })
-        .exec();
-    },
-    saveImage(){
-    	uni.canvasToTempFilePath({
-    	  canvasId: this.cid,
-    	  success: res=>{
-    	    //#ifdef H5
-    			var a = document.createElement("a");
-    			a.href = res.tempFilePath;
-    			a.download = this.cid;
-    			a.target = '_blank'
-    			a.click();
-    	    //#endif
-    	    //#ifndef H5
-    	      uni.saveImageToPhotosAlbum({
-              filePath: res.tempFilePath,
-              success: function () {
-                uni.showToast({
-                  title: '保存成功',
-                  duration: 2000
-                });
-              }
-    	      });
-    	    //#endif
-    	  } 
-    	},this);
-    },
-    getImage(){
-      if(this.type2d == false){
-        uni.canvasToTempFilePath({
-          canvasId: this.cid,
-          success: res=>{
-            this.emitMsg({name: 'getImage', params: {type:"getImage", base64: res.tempFilePath}});
-          }
-        },this);
-      }else{
-        const query = uni.createSelectorQuery().in(this)
-        query
-          .select('#' + this.cid)
-          .fields({ node: true, size: true })
-          .exec(res => {
-            if (res[0]) {
-              const canvas = res[0].node;
-              this.emitMsg({name: 'getImage', params: {type:"getImage", base64: canvas.toDataURL('image/png')}});
-            }
-          });
-      }
-    },
-    // #ifndef APP-VUE || H5
-    _newChart(cid) {
-      if (this.mixinDatacomLoading == true) {
-        return;
-      }
-      this.showchart = true;
-      cfu.instance[cid] = new uCharts(cfu.option[cid]);
-      cfu.instance[cid].addEventListener('renderComplete', () => {
-        this.emitMsg({name: 'complete', params: {type:"complete", complete: true, id: cid, opts: cfu.instance[cid].opts}});
-        cfu.instance[cid].delEventListener('renderComplete')
-      });
-      cfu.instance[cid].addEventListener('scrollLeft', () => {
-        this.emitMsg({name: 'scrollLeft', params: {type:"scrollLeft", scrollLeft: true, id: cid, opts: cfu.instance[cid].opts}});
-      });
-      cfu.instance[cid].addEventListener('scrollRight', () => {
-        this.emitMsg({name: 'scrollRight', params: {type:"scrollRight", scrollRight: true, id: cid, opts: cfu.instance[cid].opts}});
-      });
-    },
-    _updataUChart(cid) {
-      cfu.instance[cid].updateData(cfu.option[cid])
-    },
-    _tooltipDefault(item, category, index, opts) {
-      if (category) {
-        let data = item.data
-        if(typeof item.data === "object"){
-          data = item.data.value
-        }
-        return category + ' ' + item.name + ':' + data;
-      } else {
-        if (item.properties && item.properties.name) {
-          return item.properties.name;
-        } else {
-          return item.name + ':' + item.data;
-        }
-      }
-    },
-    _showTooltip(e) {
-      let cid = this.cid
-      let tc = cfu.option[cid].tooltipCustom
-      if (tc && tc !== undefined && tc !== null) {
-        let offset = undefined;
-        if (tc.x >= 0 && tc.y >= 0) {
-          offset = { x: tc.x, y: tc.y + 10 };
-        }
-        cfu.instance[cid].showToolTip(e, {
-          index: tc.index,
-          offset: offset,
-          textList: tc.textList,
-          formatter: (item, category, index, opts) => {
-            if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) {
-              return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts);
-            } else {
-              return this._tooltipDefault(item, category, index, opts);
-            }
-          }
-        });
-      } else {
-        cfu.instance[cid].showToolTip(e, {
-          formatter: (item, category, index, opts) => {
-            if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) {
-              return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts);
-            } else {
-              return this._tooltipDefault(item, category, index, opts);
-            }
-          }
-        });
-      }
-    },
-    _tap(e,move) {
-      let cid = this.cid
-      let currentIndex = null;
-      let legendIndex = null;
-      if (this.inScrollView === true || this.inAli) {
-        let chartdom = uni
-          .createSelectorQuery()
-          // #ifndef MP-ALIPAY
-          .in(this)
-          .select('#ChartBoxId'+cid)
-          // #endif
-          // #ifdef MP-ALIPAY
-          .select('#'+this.cid)
-          // #endif
-          .boundingClientRect(data => {
-            e.changedTouches=[];
-            if (this.inAli) {
-              e.changedTouches.unshift({ x: e.detail.clientX - data.left, y: e.detail.clientY - data.top});
-            }else{
-              e.changedTouches.unshift({ x: e.detail.x - data.left, y: e.detail.y - data.top - this.pageScrollTop});
-            }
-            if(move){
-              if (this.tooltipShow === true) {
-                this._showTooltip(e);
-              }
-            }else{
-              currentIndex = cfu.instance[cid].getCurrentDataIndex(e);
-              legendIndex = cfu.instance[cid].getLegendDataIndex(e);
-              if(this.tapLegend === true){
-                cfu.instance[cid].touchLegend(e);
-              }
-              if (this.tooltipShow === true) {
-                this._showTooltip(e);
-              }
-              this.emitMsg({name: 'getIndex', params: { type:"getIndex", event:{ x: e.detail.x - data.left, y: e.detail.y - data.top }, currentIndex: currentIndex, legendIndex: legendIndex, id: cid, opts: cfu.instance[cid].opts}});
-            }
-          })
-          .exec();
-      } else {
-        if(move){
-          if (this.tooltipShow === true) {
-            this._showTooltip(e);
-          }
-        }else{
-          e.changedTouches=[];
-          e.changedTouches.unshift({ x: e.detail.x - e.currentTarget.offsetLeft, y: e.detail.y - e.currentTarget.offsetTop });
-          currentIndex = cfu.instance[cid].getCurrentDataIndex(e);
-          legendIndex = cfu.instance[cid].getLegendDataIndex(e);
-          if(this.tapLegend === true){
-            cfu.instance[cid].touchLegend(e);
-          }
-          if (this.tooltipShow === true) {
-            this._showTooltip(e);
-          }
-          this.emitMsg({name: 'getIndex', params: {type:"getIndex", event:{ x: e.detail.x, y: e.detail.y - e.currentTarget.offsetTop }, currentIndex: currentIndex, legendIndex: legendIndex, id: cid, opts: cfu.instance[cid].opts}});
-        }
-      }
-    },
-    _touchStart(e) {
-      let cid = this.cid
-      lastMoveTime=Date.now();
-      if(cfu.option[cid].enableScroll === true && e.touches.length == 1){
-        cfu.instance[cid].scrollStart(e);
-      }
-      this.emitMsg({name:'getTouchStart', params:{type:"touchStart", event:e.changedTouches[0], id:cid, opts: cfu.instance[cid].opts}});
-    },
-    _touchMove(e) {
-      let cid = this.cid
-      let currMoveTime = Date.now();
-      let duration = currMoveTime - lastMoveTime;
-      let touchMoveLimit = cfu.option[cid].touchMoveLimit || 24;
-      if (duration < Math.floor(1000 / touchMoveLimit)) return;//每秒60帧
-      lastMoveTime = currMoveTime;
-      if(cfu.option[cid].enableScroll === true && e.changedTouches.length == 1){
-        cfu.instance[cid].scroll(e);
-      }
-      if(this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true){
-        this._tap(e,true)
-      }
-      if(this.ontouch === true && cfu.option[cid].enableScroll === true && this.onzoom === true && e.changedTouches.length == 2){
-        cfu.instance[cid].dobuleZoom(e);
-      }
-      this.emitMsg({name: 'getTouchMove', params: {type:"touchMove", event:e.changedTouches[0], id: cid, opts: cfu.instance[cid].opts}});
-    },
-    _touchEnd(e) {
-      let cid = this.cid
-      if(cfu.option[cid].enableScroll === true && e.touches.length == 0){
-        cfu.instance[cid].scrollEnd(e);
-      }
-      this.emitMsg({name:'getTouchEnd', params:{type:"touchEnd", event:e.changedTouches[0], id:cid, opts: cfu.instance[cid].opts}});
-      if(this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true){
-        this._tap(e,true)
-      }
-    },
-    // #endif
-    _error(e) {
-      this.mixinDatacomErrorMessage = e.detail.errMsg;
-    },
-    emitMsg(msg) {
-      this.$emit(msg.name, msg.params);
-    },
-    getRenderType() {
-      //防止如果开启echarts且父元素为v-if的情况renderjs监听不到prop变化的问题
-      if(this.echarts===true && this.mixinDatacomLoading===false){
-        this.beforeInit()
-      }
-    },
-    toJSON(){
-      return this
-    }
-  }
-};
+	export default {
+		name: 'qiun-data-charts',
+		mixins: [uniCloud.mixinDatacom],
+		props: {
+			type: {
+				type: String,
+				default: null
+			},
+			errorType: {
+				type: String,
+				default: null
+			},
+			canvasId: {
+				type: String,
+				default: 'uchartsid'
+			},
+			canvas2d: {
+				type: Boolean,
+				default: false
+			},
+			background: {
+				type: String,
+				default: 'rgba(0,0,0,0)'
+			},
+			animation: {
+				type: Boolean,
+				default: true
+			},
+			chartData: {
+				type: Object,
+				default () {
+					return {
+						categories: [],
+						series: []
+					};
+				}
+			},
+			opts: {
+				type: Object,
+				default () {
+					return {};
+				}
+			},
+			eopts: {
+				type: Object,
+				default () {
+					return {};
+				}
+			},
+			loadingType: {
+				type: Number,
+				default: 2
+			},
+			errorShow: {
+				type: Boolean,
+				default: true
+			},
+			errorReload: {
+				type: Boolean,
+				default: true
+			},
+			errorMessage: {
+				type: String,
+				default: null
+			},
+			inScrollView: {
+				type: Boolean,
+				default: false
+			},
+			reshow: {
+				type: Boolean,
+				default: false
+			},
+			reload: {
+				type: Boolean,
+				default: false
+			},
+			disableScroll: {
+				type: Boolean,
+				default: false
+			},
+			optsWatch: {
+				type: Boolean,
+				default: true
+			},
+			onzoom: {
+				type: Boolean,
+				default: false
+			},
+			ontap: {
+				type: Boolean,
+				default: true
+			},
+			ontouch: {
+				type: Boolean,
+				default: false
+			},
+			onmouse: {
+				type: Boolean,
+				default: true
+			},
+			onmovetip: {
+				type: Boolean,
+				default: false
+			},
+			echartsH5: {
+				type: Boolean,
+				default: false
+			},
+			echartsApp: {
+				type: Boolean,
+				default: false
+			},
+			tooltipShow: {
+				type: Boolean,
+				default: true
+			},
+			tooltipFormat: {
+				type: String,
+				default: undefined
+			},
+			tooltipCustom: {
+				type: Object,
+				default: undefined
+			},
+			startDate: {
+				type: String,
+				default: undefined
+			},
+			endDate: {
+				type: String,
+				default: undefined
+			},
+			textEnum: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			groupEnum: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			pageScrollTop: {
+				type: Number,
+				default: 0
+			},
+			directory: {
+				type: String,
+				default: '/'
+			},
+			tapLegend: {
+				type: Boolean,
+				default: true
+			},
+			menus: {
+				type: Array,
+				default () {
+					return []
+				}
+			}
+		},
+		data() {
+			return {
+				cid: 'uchartsid',
+				inWx: false,
+				inAli: false,
+				inTt: false,
+				inBd: false,
+				inH5: false,
+				inApp: false,
+				inWin: false,
+				type2d: true,
+				disScroll: false,
+				openmouse: false,
+				pixel: 1,
+				cWidth: 375,
+				cHeight: 250,
+				showchart: false,
+				echarts: false,
+				echartsResize: {
+					state: false
+				},
+				uchartsOpts: {},
+				echartsOpts: {},
+				drawData: {},
+				lastDrawTime: null,
+			};
+		},
+		created() {
+			this.cid = this.canvasId
+			if (this.canvasId == 'uchartsid' || this.canvasId == '') {
+				let t = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+				let len = t.length
+				let id = ''
+				for (let i = 0; i < 32; i++) {
+					id += t.charAt(Math.floor(Math.random() * len))
+				}
+				this.cid = id
+			}
+			const systemInfo = uni.getSystemInfoSync()
+			if (systemInfo.platform === 'windows' || systemInfo.platform === 'mac') {
+				this.inWin = true;
+			}
+			// #ifdef MP-WEIXIN
+			this.inWx = true;
+			if (this.canvas2d === false || systemInfo.platform === 'windows' || systemInfo.platform === 'mac') {
+				this.type2d = false;
+			} else {
+				this.type2d = true;
+				this.pixel = systemInfo.pixelRatio;
+			}
+			// #endif
+			//非微信小程序端强制关闭canvas2d模式
+			// #ifndef MP-WEIXIN
+			this.type2d = false;
+			// #endif
+			// #ifdef  MP-TOUTIAO || MP-LARK || MP-ALIPAY
+			this.type2d = this.canvas2d;
+			// #endif
+			// #ifdef MP-ALIPAY
+			this.inAli = true;
+			this.pixel = systemInfo.pixelRatio;
+			// #endif
+			// #ifdef MP-BAIDU
+			this.inBd = true;
+			// #endif
+			// #ifdef MP-TOUTIAO
+			this.inTt = true;
+			// #endif
+			this.disScroll = this.disableScroll;
+		},
+		mounted() {
+			// #ifdef APP-VUE
+			this.inApp = true;
+			if (this.echartsApp === true) {
+				this.echarts = true;
+				this.openmouse = false;
+			}
+			// #endif
+			// #ifdef APP-NVUE
+			this.inApp = true;
+			this.mixinDatacomLoading = false
+			this.mixinDatacomErrorMessage = "暂不支持NVUE"
+			// #endif
+			// #ifdef H5
+			this.inH5 = true;
+			if (this.inWin === true) {
+				this.openmouse = this.onmouse;
+			}
+			if (this.echartsH5 === true) {
+				this.echarts = true;
+			}
+			// #endif
+			this.$nextTick(() => {
+				this.beforeInit();
+			})
+			// #ifndef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || APP-VUE
+			const time = this.inH5 ? 500 : 200;
+			const _this = this;
+			uni.onWindowResize(
+				debounce(function(res) {
+					if (_this.mixinDatacomLoading == true) {
+						return;
+					}
+					let errmsg = _this.mixinDatacomErrorMessage;
+					if (errmsg !== null && errmsg !== 'null' && errmsg !== '') {
+						return;
+					}
+					if (_this.echarts) {
+						_this.echartsResize.state = !_this.echartsResize.state;
+					} else {
+						_this.resizeHandler();
+					}
+				}, time)
+			);
+			// #endif
+		},
+		destroyed() {
+			if (this.echarts === true) {
+				delete cfe.option[this.cid]
+				delete cfe.instance[this.cid]
+			} else {
+				delete cfu.option[this.cid]
+				delete cfu.instance[this.cid]
+			}
+			// #ifndef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
+			uni.offWindowResize(() => {})
+			// #endif
+		},
+		watch: {
+			chartDataProps: {
+				handler(val, oldval) {
+					if (typeof val === 'object') {
+						if (JSON.stringify(val) !== JSON.stringify(oldval)) {
+							this._clearChart();
+							if (val.series && val.series.length > 0) {
+								this.beforeInit();
+							} else {
+								this.mixinDatacomLoading = true;
+								this.showchart = false;
+								this.mixinDatacomErrorMessage = null;
+							}
+						}
+					} else {
+						this.mixinDatacomLoading = false;
+						this._clearChart();
+						this.showchart = false;
+						this.mixinDatacomErrorMessage = '参数错误:chartData数据类型错误';
+					}
+				},
+				immediate: false,
+				deep: true
+			},
+			localdata: {
+				handler(val, oldval) {
+					if (JSON.stringify(val) !== JSON.stringify(oldval)) {
+						if (val.length > 0) {
+							this.beforeInit();
+						} else {
+							this.mixinDatacomLoading = true;
+							this._clearChart();
+							this.showchart = false;
+							this.mixinDatacomErrorMessage = null;
+						}
+					}
+				},
+				immediate: false,
+				deep: true
+			},
+			optsProps: {
+				handler(val, oldval) {
+					if (typeof val === 'object') {
+						if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === false && this.optsWatch ==
+							true) {
+							this.checkData(this.drawData);
+						}
+					} else {
+						this.mixinDatacomLoading = false;
+						this._clearChart();
+						this.showchart = false;
+						this.mixinDatacomErrorMessage = '参数错误:opts数据类型错误';
+					}
+				},
+				immediate: false,
+				deep: true
+			},
+			eoptsProps: {
+				handler(val, oldval) {
+					if (typeof val === 'object') {
+						if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === true) {
+							this.checkData(this.drawData);
+						}
+					} else {
+						this.mixinDatacomLoading = false;
+						this.showchart = false;
+						this.mixinDatacomErrorMessage = '参数错误:eopts数据类型错误';
+					}
+				},
+				immediate: false,
+				deep: true
+			},
+			reshow(val, oldval) {
+				if (val === true && this.mixinDatacomLoading === false) {
+					setTimeout(() => {
+						this.mixinDatacomErrorMessage = null;
+						this.echartsResize.state = !this.echartsResize.state;
+						this.checkData(this.drawData);
+					}, 200);
+				}
+			},
+			reload(val, oldval) {
+				if (val === true) {
+					this.showchart = false;
+					this.mixinDatacomErrorMessage = null;
+					this.reloading();
+				}
+			},
+			mixinDatacomErrorMessage(val, oldval) {
+				if (val) {
+					this.emitMsg({
+						name: 'error',
+						params: {
+							type: "error",
+							errorShow: this.errorShow,
+							msg: val,
+							id: this.cid
+						}
+					});
+					if (this.errorShow) {
+						console.log('[秋云图表组件]' + val);
+					}
+				}
+			},
+			errorMessage(val, oldval) {
+				if (val && this.errorShow && val !== null && val !== 'null' && val !== '') {
+					this.showchart = false;
+					this.mixinDatacomLoading = false;
+					this.mixinDatacomErrorMessage = val;
+				} else {
+					this.showchart = false;
+					this.mixinDatacomErrorMessage = null;
+					this.reloading();
+				}
+			}
+		},
+		computed: {
+			optsProps() {
+				return JSON.parse(JSON.stringify(this.opts));
+			},
+			eoptsProps() {
+				return JSON.parse(JSON.stringify(this.eopts));
+			},
+			chartDataProps() {
+				return JSON.parse(JSON.stringify(this.chartData));
+			},
+		},
+		methods: {
+			beforeInit() {
+				this.mixinDatacomErrorMessage = null;
+				if (typeof this.chartData === 'object' && this.chartData != null && this.chartData.series !== undefined &&
+					this.chartData.series.length > 0) {
+					//拷贝一下chartData,为了opts变更后统一数据来源
+					this.drawData = deepCloneAssign({}, this.chartData);
+					this.mixinDatacomLoading = false;
+					this.showchart = true;
+					this.checkData(this.chartData);
+				} else if (this.localdata.length > 0) {
+					this.mixinDatacomLoading = false;
+					this.showchart = true;
+					this.localdataInit(this.localdata);
+				} else if (this.collection !== '') {
+					this.mixinDatacomLoading = false;
+					this.getCloudData();
+				} else {
+					this.mixinDatacomLoading = true;
+				}
+			},
+			localdataInit(resdata) {
+				//替换enum类型为正确的描述
+				if (this.groupEnum.length > 0) {
+					for (let i = 0; i < resdata.length; i++) {
+						for (let j = 0; j < this.groupEnum.length; j++) {
+							if (resdata[i].group === this.groupEnum[j].value) {
+								resdata[i].group = this.groupEnum[j].text
+							}
+						}
+					}
+				}
+				if (this.textEnum.length > 0) {
+					for (let i = 0; i < resdata.length; i++) {
+						for (let j = 0; j < this.textEnum.length; j++) {
+							if (resdata[i].text === this.textEnum[j].value) {
+								resdata[i].text = this.textEnum[j].text
+							}
+						}
+					}
+				}
+				let needCategories = false;
+				let tmpData = {
+					categories: [],
+					series: []
+				}
+				let tmpcategories = []
+				let tmpseries = [];
+				//拼接categories
+				if (this.echarts === true) {
+					needCategories = cfe.categories.includes(this.type)
+				} else {
+					needCategories = cfu.categories.includes(this.type)
+				}
+				if (needCategories === true) {
+					//如果props中的chartData带有categories,则优先使用chartData的categories
+					if (this.chartData && this.chartData.categories && this.chartData.categories.length > 0) {
+						tmpcategories = this.chartData.categories
+					} else {
+						//如果是日期类型的数据,不管是本地数据还是云数据,都按起止日期自动拼接categories
+						if (this.startDate && this.endDate) {
+							let idate = new Date(this.startDate)
+							let edate = new Date(this.endDate)
+							while (idate <= edate) {
+								tmpcategories.push(getFormatDate(idate))
+								idate = idate.setDate(idate.getDate() + 1)
+								idate = new Date(idate)
+							}
+							//否则从结果中去重并拼接categories
+						} else {
+							let tempckey = {};
+							resdata.map(function(item, index) {
+								if (item.text != undefined && !tempckey[item.text]) {
+									tmpcategories.push(item.text)
+									tempckey[item.text] = true
+								}
+							});
+						}
+					}
+					tmpData.categories = tmpcategories
+				}
+				//拼接series
+				let tempskey = {};
+				resdata.map(function(item, index) {
+					if (item.group != undefined && !tempskey[item.group]) {
+						tmpseries.push({
+							name: item.group,
+							data: []
+						});
+						tempskey[item.group] = true;
+					}
+				});
+				//如果没有获取到分组名称(可能是带categories的数据,也可能是不带的饼图类)
+				if (tmpseries.length == 0) {
+					tmpseries = [{
+						name: '默认分组',
+						data: []
+					}];
+					//如果是需要categories的图表类型
+					if (needCategories === true) {
+						for (let j = 0; j < tmpcategories.length; j++) {
+							let seriesdata = 0;
+							for (let i = 0; i < resdata.length; i++) {
+								if (resdata[i].text == tmpcategories[j]) {
+									seriesdata = resdata[i].value;
+								}
+							}
+							tmpseries[0].data.push(seriesdata);
+						}
+						//如果是饼图类的图表类型
+					} else {
+						for (let i = 0; i < resdata.length; i++) {
+							tmpseries[0].data.push({
+								"name": resdata[i].text,
+								"value": resdata[i].value
+							});
+						}
+					}
+					//如果有分组名
+				} else {
+					for (let k = 0; k < tmpseries.length; k++) {
+						//如果有categories
+						if (tmpcategories.length > 0) {
+							for (let j = 0; j < tmpcategories.length; j++) {
+								let seriesdata = 0;
+								for (let i = 0; i < resdata.length; i++) {
+									if (tmpseries[k].name == resdata[i].group && resdata[i].text == tmpcategories[j]) {
+										seriesdata = resdata[i].value;
+									}
+								}
+								tmpseries[k].data.push(seriesdata);
+							}
+							//如果传了group而没有传text,即没有categories(正常情况下这种数据是不符合数据要求规范的)
+						} else {
+							for (let i = 0; i < resdata.length; i++) {
+								if (tmpseries[k].name == resdata[i].group) {
+									tmpseries[k].data.push(resdata[i].value);
+								}
+							}
+						}
+					}
+				}
+				tmpData.series = tmpseries
+				//拷贝一下chartData,为了opts变更后统一数据来源
+				this.drawData = deepCloneAssign({}, tmpData);
+				this.checkData(tmpData)
+			},
+			reloading() {
+				if (this.errorReload === false) {
+					return;
+				}
+				this.showchart = false;
+				this.mixinDatacomErrorMessage = null;
+				if (this.collection !== '') {
+					this.mixinDatacomLoading = false;
+					this.onMixinDatacomPropsChange(true);
+				} else {
+					this.beforeInit();
+				}
+			},
+			checkData(anyData) {
+				let cid = this.cid
+				//复位opts或eopts
+				if (this.echarts === true) {
+					cfe.option[cid] = deepCloneAssign({}, this.eopts);
+					cfe.option[cid].id = cid;
+					cfe.option[cid].type = this.type;
+				} else {
+					if (this.type && cfu.type.includes(this.type)) {
+						cfu.option[cid] = deepCloneAssign({}, cfu[this.type], this.opts);
+						cfu.option[cid].canvasId = cid;
+					} else {
+						this.mixinDatacomLoading = false;
+						this.showchart = false;
+						this.mixinDatacomErrorMessage = '参数错误:props参数中type类型不正确';
+					}
+				}
+				//挂载categories和series
+				let newData = deepCloneAssign({}, anyData);
+				if (newData.series !== undefined && newData.series.length > 0) {
+					this.mixinDatacomErrorMessage = null;
+					if (this.echarts === true) {
+						cfe.option[cid].chartData = newData;
+						this.$nextTick(() => {
+							this.init()
+						})
+					} else {
+						cfu.option[cid].categories = newData.categories;
+						cfu.option[cid].series = newData.series;
+						this.$nextTick(() => {
+							this.init()
+						})
+					}
+				}
+			},
+			resizeHandler() {
+				//渲染防抖
+				let currTime = Date.now();
+				let lastDrawTime = this.lastDrawTime ? this.lastDrawTime : currTime - 3000;
+				let duration = currTime - lastDrawTime;
+				if (duration < 1000) return;
+				let chartdom = uni
+					.createSelectorQuery()
+					// #ifndef MP-ALIPAY
+					.in(this)
+					// #endif
+					.select('#ChartBoxId' + this.cid)
+					.boundingClientRect(data => {
+						this.showchart = true;
+						if (data.width > 0 && data.height > 0) {
+							if (data.width !== this.cWidth || data.height !== this.cHeight) {
+								this.checkData(this.drawData)
+							}
+						}
+					})
+					.exec();
+			},
+			getCloudData() {
+				if (this.mixinDatacomLoading == true) {
+					return;
+				}
+				this.mixinDatacomLoading = true;
+				this.mixinDatacomGet()
+					.then(res => {
+						this.mixinDatacomResData = res.result.data;
+						this.localdataInit(this.mixinDatacomResData);
+					})
+					.catch(err => {
+						this.mixinDatacomLoading = false;
+						this.showchart = false;
+						this.mixinDatacomErrorMessage = '请求错误:' + err;
+					});
+			},
+			onMixinDatacomPropsChange(needReset, changed) {
+				if (needReset == true && this.collection !== '') {
+					this.showchart = false;
+					this.mixinDatacomErrorMessage = null;
+					this._clearChart();
+					this.getCloudData();
+				}
+			},
+			_clearChart() {
+				let cid = this.cid
+				if (this.echarts !== true && cfu.option[cid] && cfu.option[cid].context) {
+					const ctx = cfu.option[cid].context;
+					if (typeof ctx === "object" && !!!cfu.option[cid].update) {
+						ctx.clearRect(0, 0, this.cWidth * this.pixel, this.cHeight * this.pixel);
+						ctx.draw();
+					}
+				}
+			},
+			init() {
+				let cid = this.cid
+				let chartdom = uni
+					.createSelectorQuery()
+					// #ifndef MP-ALIPAY
+					.in(this)
+					// #endif
+					.select('#ChartBoxId' + cid)
+					.boundingClientRect(data => {
+						if (data.width > 0 && data.height > 0) {
+							this.mixinDatacomLoading = false;
+							this.showchart = true;
+							this.lastDrawTime = Date.now();
+							this.cWidth = data.width;
+							this.cHeight = data.height;
+							if (this.echarts !== true) {
+								cfu.option[cid].background = this.background == 'rgba(0,0,0,0)' ? '#FFFFFF' : this
+									.background;
+								cfu.option[cid].canvas2d = this.type2d;
+								cfu.option[cid].pixelRatio = this.pixel;
+								cfu.option[cid].animation = this.animation;
+								cfu.option[cid].width = data.width * this.pixel;
+								cfu.option[cid].height = data.height * this.pixel;
+								cfu.option[cid].onzoom = this.onzoom;
+								cfu.option[cid].ontap = this.ontap;
+								cfu.option[cid].ontouch = this.ontouch;
+								cfu.option[cid].onmouse = this.openmouse;
+								cfu.option[cid].onmovetip = this.onmovetip;
+								cfu.option[cid].tooltipShow = this.tooltipShow;
+								cfu.option[cid].tooltipFormat = this.tooltipFormat;
+								cfu.option[cid].tooltipCustom = this.tooltipCustom;
+								cfu.option[cid].inScrollView = this.inScrollView;
+								cfu.option[cid].lastDrawTime = this.lastDrawTime;
+								cfu.option[cid].tapLegend = this.tapLegend;
+							}
+							//如果是H5或者App端,采用renderjs渲染图表
+							if (this.inH5 || this.inApp) {
+								if (this.echarts == true) {
+									cfe.option[cid].ontap = this.ontap;
+									cfe.option[cid].onmouse = this.openmouse;
+									cfe.option[cid].tooltipShow = this.tooltipShow;
+									cfe.option[cid].tooltipFormat = this.tooltipFormat;
+									cfe.option[cid].tooltipCustom = this.tooltipCustom;
+									cfe.option[cid].lastDrawTime = this.lastDrawTime;
+									this.echartsOpts = deepCloneAssign({}, cfe.option[cid]);
+								} else {
+									cfu.option[cid].rotateLock = cfu.option[cid].rotate;
+									this.uchartsOpts = deepCloneAssign({}, cfu.option[cid]);
+								}
+								//如果是小程序端,采用uCharts渲染
+							} else {
+								cfu.option[cid] = formatterAssign(cfu.option[cid], cfu.formatter)
+								this.mixinDatacomErrorMessage = null;
+								this.mixinDatacomLoading = false;
+								this.showchart = true;
+								this.$nextTick(() => {
+									if (this.type2d === true) {
+										const query = uni.createSelectorQuery().in(this)
+										query
+											.select('#' + cid)
+											.fields({
+												node: true,
+												size: true
+											})
+											.exec(res => {
+												if (res[0]) {
+													const canvas = res[0].node;
+													const ctx = canvas.getContext('2d');
+													cfu.option[cid].context = ctx;
+													cfu.option[cid].rotateLock = cfu.option[cid].rotate;
+													if (cfu.instance[cid] && cfu.option[cid] && cfu.option[
+															cid].update === true) {
+														this._updataUChart(cid)
+													} else {
+														canvas.width = data.width * this.pixel;
+														canvas.height = data.height * this.pixel;
+														canvas._width = data.width * this.pixel;
+														canvas._height = data.height * this.pixel;
+														setTimeout(() => {
+															cfu.option[cid].context.restore();
+															cfu.option[cid].context.save();
+															this._newChart(cid)
+														}, 100)
+													}
+												} else {
+													this.showchart = false;
+													this.mixinDatacomErrorMessage =
+														'参数错误:开启2d模式后,未获取到dom节点,canvas-id:' + cid;
+												}
+											});
+									} else {
+										if (this.inAli) {
+											cfu.option[cid].rotateLock = cfu.option[cid].rotate;
+										}
+										cfu.option[cid].context = uni.createCanvasContext(cid, this);
+										if (cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update ===
+											true) {
+											this._updataUChart(cid)
+										} else {
+											setTimeout(() => {
+												cfu.option[cid].context.restore();
+												cfu.option[cid].context.save();
+												this._newChart(cid)
+											}, 100)
+										}
+									}
+								})
+							}
+						} else {
+							this.mixinDatacomLoading = false;
+							this.showchart = false;
+							if (this.reshow == true) {
+								this.mixinDatacomErrorMessage = '布局错误:未获取到父元素宽高尺寸!canvas-id:' + cid;
+							}
+						}
+					})
+					.exec();
+			},
+			saveImage() {
+				uni.canvasToTempFilePath({
+					canvasId: this.cid,
+					success: res => {
+						//#ifdef H5
+						var a = document.createElement("a");
+						a.href = res.tempFilePath;
+						a.download = this.cid;
+						a.target = '_blank'
+						a.click();
+						//#endif
+						//#ifndef H5
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath,
+							success: function() {
+								uni.showToast({
+									title: '保存成功',
+									duration: 2000
+								});
+							}
+						});
+						//#endif
+					}
+				}, this);
+			},
+			getImage() {
+				if (this.type2d == false) {
+					uni.canvasToTempFilePath({
+						canvasId: this.cid,
+						success: res => {
+							this.emitMsg({
+								name: 'getImage',
+								params: {
+									type: "getImage",
+									base64: res.tempFilePath
+								}
+							});
+						}
+					}, this);
+				} else {
+					const query = uni.createSelectorQuery().in(this)
+					query
+						.select('#' + this.cid)
+						.fields({
+							node: true,
+							size: true
+						})
+						.exec(res => {
+							if (res[0]) {
+								const canvas = res[0].node;
+								this.emitMsg({
+									name: 'getImage',
+									params: {
+										type: "getImage",
+										base64: canvas.toDataURL('image/png')
+									}
+								});
+							}
+						});
+				}
+			},
+			// #ifndef APP-VUE || H5
+			_newChart(cid) {
+				if (this.mixinDatacomLoading == true) {
+					return;
+				}
+				this.showchart = true;
+				cfu.instance[cid] = new uCharts(cfu.option[cid]);
+				cfu.instance[cid].addEventListener('renderComplete', () => {
+					this.emitMsg({
+						name: 'complete',
+						params: {
+							type: "complete",
+							complete: true,
+							id: cid,
+							opts: cfu.instance[cid].opts
+						}
+					});
+					cfu.instance[cid].delEventListener('renderComplete')
+				});
+				cfu.instance[cid].addEventListener('scrollLeft', () => {
+					this.emitMsg({
+						name: 'scrollLeft',
+						params: {
+							type: "scrollLeft",
+							scrollLeft: true,
+							id: cid,
+							opts: cfu.instance[cid].opts
+						}
+					});
+				});
+				cfu.instance[cid].addEventListener('scrollRight', () => {
+					this.emitMsg({
+						name: 'scrollRight',
+						params: {
+							type: "scrollRight",
+							scrollRight: true,
+							id: cid,
+							opts: cfu.instance[cid].opts
+						}
+					});
+				});
+			},
+			_updataUChart(cid) {
+				cfu.instance[cid].updateData(cfu.option[cid])
+			},
+			_tooltipDefault(item, category, index, opts) {
+				if (category) {
+					let data = item.data
+					if (typeof item.data === "object") {
+						data = item.data.value
+					}
+					return category + ' ' + item.name + ':' + data;
+				} else {
+					if (item.properties && item.properties.name) {
+						return item.properties.name;
+					} else {
+						return item.name + ':' + item.data;
+					}
+				}
+			},
+			_showTooltip(e) {
+				let cid = this.cid
+				let tc = cfu.option[cid].tooltipCustom
+				if (tc && tc !== undefined && tc !== null) {
+					let offset = undefined;
+					if (tc.x >= 0 && tc.y >= 0) {
+						offset = {
+							x: tc.x,
+							y: tc.y + 10
+						};
+					}
+					cfu.instance[cid].showToolTip(e, {
+						index: tc.index,
+						offset: offset,
+						textList: tc.textList,
+						formatter: (item, category, index, opts) => {
+							if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[
+									cid].tooltipFormat]) {
+								return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index,
+									opts);
+							} else {
+								return this._tooltipDefault(item, category, index, opts);
+							}
+						}
+					});
+				} else {
+					cfu.instance[cid].showToolTip(e, {
+						formatter: (item, category, index, opts) => {
+							if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[
+									cid].tooltipFormat]) {
+								return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index,
+									opts);
+							} else {
+								return this._tooltipDefault(item, category, index, opts);
+							}
+						}
+					});
+				}
+			},
+			_tap(e, move) {
+				let cid = this.cid
+				let currentIndex = null;
+				let legendIndex = null;
+				if (this.inScrollView === true || this.inAli) {
+					let chartdom = uni
+						.createSelectorQuery()
+						// #ifndef MP-ALIPAY
+						.in(this)
+						.select('#ChartBoxId' + cid)
+						// #endif
+						// #ifdef MP-ALIPAY
+						.select('#' + this.cid)
+						// #endif
+						.boundingClientRect(data => {
+							e.changedTouches = [];
+							if (this.inAli) {
+								e.changedTouches.unshift({
+									x: e.detail.clientX - data.left,
+									y: e.detail.clientY - data.top
+								});
+							} else {
+								e.changedTouches.unshift({
+									x: e.detail.x - data.left,
+									y: e.detail.y - data.top - this.pageScrollTop
+								});
+							}
+							if (move) {
+								if (this.tooltipShow === true) {
+									this._showTooltip(e);
+								}
+							} else {
+								currentIndex = cfu.instance[cid].getCurrentDataIndex(e);
+								legendIndex = cfu.instance[cid].getLegendDataIndex(e);
+								if (this.tapLegend === true) {
+									cfu.instance[cid].touchLegend(e);
+								}
+								if (this.tooltipShow === true) {
+									this._showTooltip(e);
+								}
+								this.emitMsg({
+									name: 'getIndex',
+									params: {
+										type: "getIndex",
+										event: {
+											x: e.detail.x - data.left,
+											y: e.detail.y - data.top
+										},
+										currentIndex: currentIndex,
+										legendIndex: legendIndex,
+										id: cid,
+										opts: cfu.instance[cid].opts
+									}
+								});
+							}
+						})
+						.exec();
+				} else {
+					if (move) {
+						if (this.tooltipShow === true) {
+							this._showTooltip(e);
+						}
+					} else {
+						e.changedTouches = [];
+						e.changedTouches.unshift({
+							x: e.detail.x - e.currentTarget.offsetLeft,
+							y: e.detail.y - e.currentTarget.offsetTop
+						});
+						currentIndex = cfu.instance[cid].getCurrentDataIndex(e);
+						legendIndex = cfu.instance[cid].getLegendDataIndex(e);
+						if (this.tapLegend === true) {
+							cfu.instance[cid].touchLegend(e);
+						}
+						if (this.tooltipShow === true) {
+							this._showTooltip(e);
+						}
+						this.emitMsg({
+							name: 'getIndex',
+							params: {
+								type: "getIndex",
+								event: {
+									x: e.detail.x,
+									y: e.detail.y - e.currentTarget.offsetTop
+								},
+								currentIndex: currentIndex,
+								legendIndex: legendIndex,
+								id: cid,
+								opts: cfu.instance[cid].opts
+							}
+						});
+					}
+				}
+			},
+			_touchStart(e) {
+				let cid = this.cid
+				lastMoveTime = Date.now();
+				if (cfu.option[cid].enableScroll === true && e.touches.length == 1) {
+					cfu.instance[cid].scrollStart(e);
+				}
+				this.emitMsg({
+					name: 'getTouchStart',
+					params: {
+						type: "touchStart",
+						event: e.changedTouches[0],
+						id: cid,
+						opts: cfu.instance[cid].opts
+					}
+				});
+			},
+			_touchMove(e) {
+				let cid = this.cid
+				let currMoveTime = Date.now();
+				let duration = currMoveTime - lastMoveTime;
+				let touchMoveLimit = cfu.option[cid].touchMoveLimit || 24;
+				if (duration < Math.floor(1000 / touchMoveLimit)) return; //每秒60帧
+				lastMoveTime = currMoveTime;
+				if (cfu.option[cid].enableScroll === true && e.changedTouches.length == 1) {
+					cfu.instance[cid].scroll(e);
+				}
+				if (this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true) {
+					this._tap(e, true)
+				}
+				if (this.ontouch === true && cfu.option[cid].enableScroll === true && this.onzoom === true && e
+					.changedTouches.length == 2) {
+					cfu.instance[cid].dobuleZoom(e);
+				}
+				this.emitMsg({
+					name: 'getTouchMove',
+					params: {
+						type: "touchMove",
+						event: e.changedTouches[0],
+						id: cid,
+						opts: cfu.instance[cid].opts
+					}
+				});
+			},
+			_touchEnd(e) {
+				let cid = this.cid
+				if (cfu.option[cid].enableScroll === true && e.touches.length == 0) {
+					cfu.instance[cid].scrollEnd(e);
+				}
+				this.emitMsg({
+					name: 'getTouchEnd',
+					params: {
+						type: "touchEnd",
+						event: e.changedTouches[0],
+						id: cid,
+						opts: cfu.instance[cid].opts
+					}
+				});
+				if (this.ontap === true && cfu.option[cid].enableScroll === false && this.onmovetip === true) {
+					this._tap(e, true)
+				}
+			},
+			// #endif
+			_error(e) {
+				this.mixinDatacomErrorMessage = e.detail.errMsg;
+			},
+			emitMsg(msg) {
+				this.$emit(msg.name, msg.params);
+			},
+			getRenderType() {
+				//防止如果开启echarts且父元素为v-if的情况renderjs监听不到prop变化的问题
+				if (this.echarts === true && this.mixinDatacomLoading === false) {
+					this.beforeInit()
+				}
+			},
+			toJSON() {
+				return this
+			}
+		}
+	};
 </script>
 
 <!-- #ifdef APP-VUE || H5 -->
 <script module="rdcharts" lang="renderjs">
-import uChartsRD from '../../js_sdk/u-charts/u-charts.js';
-import cfu from '../../js_sdk/u-charts/config-ucharts.js';
-import cfe from '../../js_sdk/u-charts/config-echarts.js';
+	import uChartsRD from '../../js_sdk/u-charts/u-charts.js';
+	import cfu from '../../js_sdk/u-charts/config-ucharts.js';
+	import cfe from '../../js_sdk/u-charts/config-echarts.js';
 
-var that = {};
-var rootdom = null;
+	var that = {};
+	var rootdom = null;
 
-function rddeepCloneAssign(origin = {}, ...args) {
-  for (let i in args) {
-    for (let key in args[i]) {
-      if (args[i].hasOwnProperty(key)) {
-        origin[key] = args[i][key] && typeof args[i][key] === 'object' ? rddeepCloneAssign(Array.isArray(args[i][key]) ? [] : {}, origin[key], args[i][key]) : args[i][key];
-      }
-    }
-  }
-  return origin;
-}
+	function rddeepCloneAssign(origin = {}, ...args) {
+		for (let i in args) {
+			for (let key in args[i]) {
+				if (args[i].hasOwnProperty(key)) {
+					origin[key] = args[i][key] && typeof args[i][key] === 'object' ? rddeepCloneAssign(Array.isArray(args[
+						i][key]) ? [] : {}, origin[key], args[i][key]) : args[i][key];
+				}
+			}
+		}
+		return origin;
+	}
+
+	function rdformatterAssign(args, formatter) {
+		for (let key in args) {
+			if (args.hasOwnProperty(key) && args[key] !== null && typeof args[key] === 'object') {
+				rdformatterAssign(args[key], formatter)
+			} else if (key === 'format' && typeof args[key] === 'string') {
+				args['formatter'] = formatter[args[key]] ? formatter[args[key]] : undefined;
+			}
+		}
+		return args;
+	}
 
-function rdformatterAssign(args,formatter) {
-  for (let key in args) {
-    if(args.hasOwnProperty(key) && args[key] !== null && typeof args[key] === 'object'){
-      rdformatterAssign(args[key],formatter)
-    }else if(key === 'format' && typeof args[key] === 'string'){
-      args['formatter'] = formatter[args[key]] ? formatter[args[key]] : undefined;
-    }
-  }
-  return args;
-}
+	export default {
+		data() {
+			return {
+				rid: null
+			}
+		},
+		mounted() {
+			rootdom = {
+				top: 0,
+				left: 0
+			}
+			// #ifdef H5
+			let dm = document.querySelectorAll('uni-main')[0]
+			if (dm === undefined) {
+				dm = document.querySelectorAll('uni-page-wrapper')[0]
+			}
+			rootdom = {
+				top: dm.offsetTop,
+				left: dm.offsetLeft
+			}
+			// #endif
+			setTimeout(() => {
+				if (this.rid === null) {
+					this.$ownerInstance && this.$ownerInstance.callMethod('getRenderType')
+				}
+			}, 200)
+		},
+		destroyed() {
+			delete cfu.option[this.rid]
+			delete cfu.instance[this.rid]
+			delete cfe.option[this.rid]
+			delete cfe.instance[this.rid]
+		},
+		methods: {
+			//==============以下是ECharts的方法====================
+			ecinit(newVal, oldVal, owner, instance) {
+				let cid = JSON.stringify(newVal.id)
+				this.rid = cid
+				that[cid] = this.$ownerInstance || instance
+				let eopts = JSON.parse(JSON.stringify(newVal))
+				let type = eopts.type;
+				//载入并覆盖默认配置
+				if (type && cfe.type.includes(type)) {
+					cfe.option[cid] = rddeepCloneAssign({}, cfe[type], eopts);
+				} else {
+					cfe.option[cid] = rddeepCloneAssign({}, eopts);
+				}
+				let newData = eopts.chartData;
+				if (newData) {
+					//挂载categories和series
+					if (cfe.option[cid].xAxis && cfe.option[cid].xAxis.type && cfe.option[cid].xAxis.type === 'category') {
+						cfe.option[cid].xAxis.data = newData.categories
+					}
+					if (cfe.option[cid].yAxis && cfe.option[cid].yAxis.type && cfe.option[cid].yAxis.type === 'category') {
+						cfe.option[cid].yAxis.data = newData.categories
+					}
+					cfe.option[cid].series = []
+					for (var i = 0; i < newData.series.length; i++) {
+						cfe.option[cid].seriesTemplate = cfe.option[cid].seriesTemplate ? cfe.option[cid].seriesTemplate :
+						{}
+						let Template = rddeepCloneAssign({}, cfe.option[cid].seriesTemplate, newData.series[i])
+						cfe.option[cid].series.push(Template)
+					}
+				}
 
-export default {
-  data() {
-    return {
-      rid:null
-    }
-  },
-  mounted() {
-    rootdom = {top:0,left:0}
-    // #ifdef H5
-    let dm = document.querySelectorAll('uni-main')[0]
-    if(dm === undefined){
-      dm = document.querySelectorAll('uni-page-wrapper')[0]
-    }
-    rootdom = {top:dm.offsetTop,left:dm.offsetLeft}
-    // #endif
-    setTimeout(()=>{
-      if(this.rid === null){
-        this.$ownerInstance && this.$ownerInstance.callMethod('getRenderType')
-      }
-    },200)
-  },
-  destroyed(){
-    delete cfu.option[this.rid]
-    delete cfu.instance[this.rid]
-    delete cfe.option[this.rid]
-    delete cfe.instance[this.rid]
-  },
-  methods: {
-    //==============以下是ECharts的方法====================
-    ecinit(newVal, oldVal, owner, instance){
-      let cid = JSON.stringify(newVal.id)
-      this.rid = cid
-      that[cid] = this.$ownerInstance || instance
-      let eopts = JSON.parse(JSON.stringify(newVal))
-      let type = eopts.type;
-      //载入并覆盖默认配置
-      if (type && cfe.type.includes(type)) {
-        cfe.option[cid] = rddeepCloneAssign({}, cfe[type], eopts);
-      }else{
-        cfe.option[cid] = rddeepCloneAssign({}, eopts);
-      }
-      let newData = eopts.chartData;
-      if(newData){
-        //挂载categories和series
-        if(cfe.option[cid].xAxis && cfe.option[cid].xAxis.type && cfe.option[cid].xAxis.type === 'category'){
-          cfe.option[cid].xAxis.data = newData.categories
-        }
-        if(cfe.option[cid].yAxis && cfe.option[cid].yAxis.type && cfe.option[cid].yAxis.type === 'category'){
-          cfe.option[cid].yAxis.data = newData.categories
-        }
-        cfe.option[cid].series = []
-        for (var i = 0; i < newData.series.length; i++) {
-          cfe.option[cid].seriesTemplate = cfe.option[cid].seriesTemplate ? cfe.option[cid].seriesTemplate : {}
-          let Template = rddeepCloneAssign({},cfe.option[cid].seriesTemplate,newData.series[i])
-          cfe.option[cid].series.push(Template)
-        }
-      }
-      
-      if (typeof window.echarts === 'object') {
-          this.newEChart()
-      }else{
-        const script = document.createElement('script')
-        // #ifdef APP-VUE
-        script.src = './uni_modules/qiun-data-charts/static/app-plus/echarts.min.js'
-        // #endif
-        // #ifdef H5
-        const rooturl = window.location.origin
-        const directory = instance.getDataset().directory
-        script.src = rooturl + directory + 'uni_modules/qiun-data-charts/static/h5/echarts.min.js'
-        // #endif
-        script.onload = this.newEChart
-        document.head.appendChild(script)
-      }
-    },
-    ecresize(newVal, oldVal, owner, instance){
-      if(cfe.instance[this.rid]){
-        cfe.instance[this.rid].resize()
-      }
-    },
-    newEChart(){
-      let cid = this.rid
-      if(cfe.instance[cid] === undefined){
-        cfe.instance[cid] = echarts.init(that[cid].$el.children[0])
-        //ontap开启后才触发click事件
-        if(cfe.option[cid].ontap === true){
-          cfe.instance[cid].on('click', resdata => {
-            let event = JSON.parse(JSON.stringify({
-              x:resdata.event.offsetX,y:resdata.event.offsetY
-            }))
-            that[cid].callMethod('emitMsg',{name:"getIndex", params:{type:"getIndex", event:event, currentIndex:resdata.dataIndex, value:resdata.data, seriesName: resdata.seriesName,id:cid}})
-          })
-          // 增加ECharts的highlight消息,实现按下移动返回索引功能。add by onefish 创建于 2021-12-11 09:50
-          cfe.instance[cid].on('highlight', resdata => {
-            that[cid].callMethod('emitMsg',{name:"getHighlight", params:{type:"highlight", res:resdata, id:cid}})
-          })
-        }
-        this.updataEChart(cid,cfe.option[cid])
-      }else{
-        this.updataEChart(cid,cfe.option[cid])
-      }
-    },
-    updataEChart(cid,option){
-      //替换option内format属性为formatter的预定义方法
-      option = rdformatterAssign(option,cfe.formatter)
-      if(option.tooltip){
-        option.tooltip.show = option.tooltipShow?true:false;
-        option.tooltip.position = this.tooltipPosition()
-        //tooltipFormat方法,替换组件的tooltipFormat为config-echarts.js内对应的方法
-        if (typeof option.tooltipFormat === 'string' && cfe.formatter[option.tooltipFormat]) {
-          option.tooltip.formatter = option.tooltip.formatter ? option.tooltip.formatter : cfe.formatter[option.tooltipFormat]
-        }
-      }
-      // 颜色渐变添加的方法
-      if (option.series) {
-      	for (let i in option.series) {
-      		let linearGradient = option.series[i].linearGradient
-      		if (linearGradient) {
-      			option.series[i].color = new echarts.graphic.LinearGradient(linearGradient[0],linearGradient[1],linearGradient[2],linearGradient[3],linearGradient[4])
-      		}
-      	}
-      }
-      cfe.instance[cid].setOption(option, option.notMerge)
-      cfe.instance[cid].on('finished', function(){
-        that[cid].callMethod('emitMsg',{name:"complete",params:{type:"complete",complete:true,id:cid}})
-        if(cfe.instance[cid]){
-          cfe.instance[cid].off('finished')
-        }
-      });
+				if (typeof window.echarts === 'object') {
+					this.newEChart()
+				} else {
+					const script = document.createElement('script')
+					// #ifdef APP-VUE
+					script.src = './uni_modules/qiun-data-charts/static/app-plus/echarts.min.js'
+					// #endif
+					// #ifdef H5
+					const rooturl = window.location.origin
+					const directory = instance.getDataset().directory
+					script.src = rooturl + directory + 'uni_modules/qiun-data-charts/static/h5/echarts.min.js'
+					// #endif
+					script.onload = this.newEChart
+					document.head.appendChild(script)
+				}
+			},
+			ecresize(newVal, oldVal, owner, instance) {
+				if (cfe.instance[this.rid]) {
+					cfe.instance[this.rid].resize()
+				}
+			},
+			newEChart() {
+				let cid = this.rid
+				if (cfe.instance[cid] === undefined) {
+					cfe.instance[cid] = echarts.init(that[cid].$el.children[0])
+					//ontap开启后才触发click事件
+					if (cfe.option[cid].ontap === true) {
+						cfe.instance[cid].on('click', resdata => {
+							let event = JSON.parse(JSON.stringify({
+								x: resdata.event.offsetX,
+								y: resdata.event.offsetY
+							}))
+							that[cid].callMethod('emitMsg', {
+								name: "getIndex",
+								params: {
+									type: "getIndex",
+									event: event,
+									currentIndex: resdata.dataIndex,
+									value: resdata.data,
+									seriesName: resdata.seriesName,
+									id: cid
+								}
+							})
+						})
+						// 增加ECharts的highlight消息,实现按下移动返回索引功能。add by onefish 创建于 2021-12-11 09:50
+						cfe.instance[cid].on('highlight', resdata => {
+							that[cid].callMethod('emitMsg', {
+								name: "getHighlight",
+								params: {
+									type: "highlight",
+									res: resdata,
+									id: cid
+								}
+							})
+						})
+					}
+					this.updataEChart(cid, cfe.option[cid])
+				} else {
+					this.updataEChart(cid, cfe.option[cid])
+				}
+			},
+			updataEChart(cid, option) {
+				//替换option内format属性为formatter的预定义方法
+				option = rdformatterAssign(option, cfe.formatter)
+				if (option.tooltip) {
+					option.tooltip.show = option.tooltipShow ? true : false;
+					option.tooltip.position = this.tooltipPosition()
+					//tooltipFormat方法,替换组件的tooltipFormat为config-echarts.js内对应的方法
+					if (typeof option.tooltipFormat === 'string' && cfe.formatter[option.tooltipFormat]) {
+						option.tooltip.formatter = option.tooltip.formatter ? option.tooltip.formatter : cfe.formatter[
+							option.tooltipFormat]
+					}
+				}
+				// 颜色渐变添加的方法
+				if (option.series) {
+					for (let i in option.series) {
+						let linearGradient = option.series[i].linearGradient
+						if (linearGradient) {
+							option.series[i].color = new echarts.graphic.LinearGradient(linearGradient[0], linearGradient[
+								1], linearGradient[2], linearGradient[3], linearGradient[4])
+						}
+					}
+				}
+				cfe.instance[cid].setOption(option, option.notMerge)
+				cfe.instance[cid].on('finished', function() {
+					that[cid].callMethod('emitMsg', {
+						name: "complete",
+						params: {
+							type: "complete",
+							complete: true,
+							id: cid
+						}
+					})
+					if (cfe.instance[cid]) {
+						cfe.instance[cid].off('finished')
+					}
+				});
 
-      //修复init初始化实例获取宽高不正确问题
-      if(
-        typeof that[cid].$el.children[0].clientWidth != 'undefined' &&
-          (
-            Math.abs( that[cid].$el.children[0].clientWidth - cfe.instance[cid].getWidth() )>3 ||
-            Math.abs( that[cid].$el.children[0].clientHeight - cfe.instance[cid].getHeight() )>3
-          )
-      ){this.ecresize();}
-    },
-    tooltipPosition(){
-      return (point, params, dom, rect, size) => {
-      	let x = point[0]
-      	let y = point[1]
-      	let viewWidth = size.viewSize[0]
-      	let viewHeight = size.viewSize[1]
-      	let boxWidth = size.contentSize[0]
-      	let boxHeight = size.contentSize[1]
-      	let posX = x + 30 
-      	let posY = y + 30 
-      	if (posX + boxWidth > viewWidth) { 
-      		posX = x - boxWidth - 30
-      	}
-      	if (posY + boxHeight > viewHeight) {
-      		posY = y - boxHeight - 30
-      	}
-      	return [posX, posY]
-      }
-    },
-    //==============以下是uCharts的方法====================
-    ucinit(newVal, oldVal, owner, instance){
-      if(JSON.stringify(newVal) == JSON.stringify(oldVal)){
-        return;
-      }
-      if(!newVal.canvasId){
-        return;
-      }
-      let cid = JSON.parse(JSON.stringify(newVal.canvasId))
-      this.rid = cid
-      that[cid] = this.$ownerInstance || instance
-      cfu.option[cid] = JSON.parse(JSON.stringify(newVal))
-      cfu.option[cid] = rdformatterAssign(cfu.option[cid],cfu.formatter)
-      let canvasdom = document.getElementById(cid)
-      if(canvasdom && canvasdom.children[0]){
-        cfu.option[cid].context = canvasdom.children[0].getContext("2d")
-        if(cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true){
-          this.updataUChart()
-        }else{
-          setTimeout(()=>{
-            cfu.option[cid].context.restore();
-            cfu.option[cid].context.save();
-            this.newUChart()
-          },100)
-        }
-      }
-    },
-    newUChart() {
-      let cid = this.rid
-      cfu.instance[cid] = new uChartsRD(cfu.option[cid])
-      cfu.instance[cid].addEventListener('renderComplete', () => {
-        that[cid].callMethod('emitMsg',{name:"complete",params:{type:"complete",complete:true,id:cid, opts: cfu.instance[cid].opts}})
-        cfu.instance[cid].delEventListener('renderComplete')
-      });
-      cfu.instance[cid].addEventListener('scrollLeft', () => {
-        that[cid].callMethod('emitMsg',{name:"scrollLeft",params:{type:"scrollLeft",scrollLeft:true,id:cid, opts: cfu.instance[cid].opts}})
-      });
-      cfu.instance[cid].addEventListener('scrollRight', () => {
-        that[cid].callMethod('emitMsg',{name:"scrollRight",params:{type:"scrollRight",scrollRight:true,id:cid, opts: cfu.instance[cid].opts}})
-      });
-    },
-    updataUChart() {
-      let cid = this.rid
-      cfu.instance[cid].updateData(cfu.option[cid])
-    },
-    tooltipDefault(item, category, index, opts) {
-      if (category) {
-        let data = item.data
-        if(typeof item.data === "object"){
-          data = item.data.value
-        }
-        return category + ' ' + item.name + ':' + data;
-      } else {
-        if (item.properties && item.properties.name) {
-          return item.properties.name ;
-        } else {
-          return item.name + ':' + item.data;
-        }
-      }
-    },
-    showTooltip(e,cid) {
-      let tc = cfu.option[cid].tooltipCustom
-      if (tc && tc !== undefined && tc !== null) {
-        let offset = undefined;
-        if (tc.x >= 0 && tc.y >= 0) {
-          offset = { x: tc.x, y: tc.y + 10 };
-        }
-        cfu.instance[cid].showToolTip(e, {
-          index: tc.index,
-          offset: offset,
-          textList: tc.textList,
-          formatter: (item, category, index, opts) => {
-            if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) {
-              return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts);
-            } else {
-              return this.tooltipDefault(item, category, index, opts);
-            }
-          }
-        });
-      } else {
-        cfu.instance[cid].showToolTip(e, {
-          formatter: (item, category, index, opts) => {
-            if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[cid].tooltipFormat]) {
-              return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index, opts);
-            } else {
-              return this.tooltipDefault(item, category, index, opts);
-            }
-          }
-        });
-      }
-    },
-    tap(e) {
-      let cid = this.rid
-      let ontap = cfu.option[cid].ontap
-      let tooltipShow = cfu.option[cid].tooltipShow
-      let tapLegend = cfu.option[cid].tapLegend
-      if(ontap == false) return;
-      let currentIndex=null
-      let legendIndex=null
-      let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect()
-      let tmpe = {}
-      if(e.detail.x){//tap或者click的事件
-        tmpe = { x: e.detail.x - rchartdom.left, y:e.detail.y - rchartdom.top + rootdom.top}
-      }else{//mouse的事件
-        tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top}
-      }
-      e.changedTouches = [];
-      e.changedTouches.unshift(tmpe)
-      currentIndex=cfu.instance[cid].getCurrentDataIndex(e)
-      legendIndex=cfu.instance[cid].getLegendDataIndex(e)
-      if(tapLegend === true){
-        cfu.instance[cid].touchLegend(e);
-      }
-      if(tooltipShow==true){
-        this.showTooltip(e,cid)
-      }
-      that[cid].callMethod('emitMsg',{name:"getIndex",params:{type:"getIndex",event:tmpe,currentIndex:currentIndex,legendIndex:legendIndex,id:cid, opts: cfu.instance[cid].opts}})
-    },
-    touchStart(e) {
-      let cid = this.rid
-      let ontouch = cfu.option[cid].ontouch
-      if(ontouch == false) return;
-      if(cfu.option[cid].enableScroll === true && e.touches.length == 1){
-        cfu.instance[cid].scrollStart(e);
-      }
-      that[cid].callMethod('emitMsg',{name:"getTouchStart",params:{type:"touchStart",event:e.changedTouches[0],id:cid, opts: cfu.instance[cid].opts}})
-    },
-    touchMove(e) {
-      let cid = this.rid
-      let ontouch = cfu.option[cid].ontouch
-      if(ontouch == false) return;
-      if(cfu.option[cid].enableScroll === true && e.changedTouches.length == 1){
-        cfu.instance[cid].scroll(e);
-      }
-      if(cfu.option[cid].ontap === true && cfu.option[cid].enableScroll === false && cfu.option[cid].onmovetip === true){
-        let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect()
-        let tmpe = { x: e.changedTouches[0].clientX - rchartdom.left, y:e.changedTouches[0].clientY - rchartdom.top + rootdom.top}
-        e.changedTouches.unshift(tmpe)
-        if(cfu.option[cid].tooltipShow === true){
-          this.showTooltip(e,cid)
-        }
-      }
-      if(ontouch === true && cfu.option[cid].enableScroll === true && cfu.option[cid].onzoom === true && e.changedTouches.length == 2){
-        cfu.instance[cid].dobuleZoom(e);
-      }
-      that[cid].callMethod('emitMsg',{name:"getTouchMove",params:{type:"touchMove",event:e.changedTouches[0],id:cid, opts: cfu.instance[cid].opts}})
-    },
-    touchEnd(e) {
-      let cid = this.rid
-      let ontouch = cfu.option[cid].ontouch
-      if(ontouch == false) return;
-      if(cfu.option[cid].enableScroll === true && e.touches.length == 0){
-        cfu.instance[cid].scrollEnd(e);
-      }
-      that[cid].callMethod('emitMsg',{name:"getTouchEnd",params:{type:"touchEnd",event:e.changedTouches[0],id:cid, opts: cfu.instance[cid].opts}})
-    },
-    mouseDown(e) {
-      let cid = this.rid
-      let onmouse = cfu.option[cid].onmouse
-      if(onmouse == false) return;
-      let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect()
-      let tmpe = {}
-      tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top}
-      e.changedTouches = [];
-      e.changedTouches.unshift(tmpe)
-      cfu.instance[cid].scrollStart(e)
-      cfu.option[cid].mousedown=true;
-      that[cid].callMethod('emitMsg',{name:"getTouchStart",params:{type:"mouseDown",event:tmpe,id:cid, opts: cfu.instance[cid].opts}})
-    },
-    mouseMove(e) {
-      let cid = this.rid
-      let onmouse = cfu.option[cid].onmouse
-      let tooltipShow = cfu.option[cid].tooltipShow
-      if(onmouse == false) return;
-      let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect()
-      let tmpe = {}
-      tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top}
-      e.changedTouches = [];
-      e.changedTouches.unshift(tmpe)
-      if(cfu.option[cid].mousedown){
-        cfu.instance[cid].scroll(e)
-        that[cid].callMethod('emitMsg',{name:"getTouchMove",params:{type:"mouseMove",event:tmpe,id:cid, opts: cfu.instance[cid].opts}})
-      }else if(cfu.instance[cid]){
-        if(tooltipShow==true){
-          this.showTooltip(e,cid)
-        }
-      }
-    },
-    mouseUp(e) {
-      let cid = this.rid
-      let onmouse = cfu.option[cid].onmouse
-      if(onmouse == false) return;
-      let rchartdom = document.getElementById('UC'+cid).getBoundingClientRect()
-      let tmpe = {}
-      tmpe = { x: e.clientX - rchartdom.left, y:e.clientY - rchartdom.top + rootdom.top}
-      e.changedTouches = [];
-      e.changedTouches.unshift(tmpe)
-      cfu.instance[cid].scrollEnd(e)
-      cfu.option[cid].mousedown=false;
-      that[cid].callMethod('emitMsg',{name:"getTouchEnd",params:{type:"mouseUp",event:tmpe,id:cid, opts: cfu.instance[cid].opts}})
-    },
-  }
-}
+				//修复init初始化实例获取宽高不正确问题
+				if (
+					typeof that[cid].$el.children[0].clientWidth != 'undefined' &&
+					(
+						Math.abs(that[cid].$el.children[0].clientWidth - cfe.instance[cid].getWidth()) > 3 ||
+						Math.abs(that[cid].$el.children[0].clientHeight - cfe.instance[cid].getHeight()) > 3
+					)
+				) {
+					this.ecresize();
+				}
+			},
+			tooltipPosition() {
+				return (point, params, dom, rect, size) => {
+					let x = point[0]
+					let y = point[1]
+					let viewWidth = size.viewSize[0]
+					let viewHeight = size.viewSize[1]
+					let boxWidth = size.contentSize[0]
+					let boxHeight = size.contentSize[1]
+					let posX = x + 30
+					let posY = y + 30
+					if (posX + boxWidth > viewWidth) {
+						posX = x - boxWidth - 30
+					}
+					if (posY + boxHeight > viewHeight) {
+						posY = y - boxHeight - 30
+					}
+					return [posX, posY]
+				}
+			},
+			//==============以下是uCharts的方法====================
+			ucinit(newVal, oldVal, owner, instance) {
+				if (JSON.stringify(newVal) == JSON.stringify(oldVal)) {
+					return;
+				}
+				if (!newVal.canvasId) {
+					return;
+				}
+				let cid = JSON.parse(JSON.stringify(newVal.canvasId))
+				this.rid = cid
+				that[cid] = this.$ownerInstance || instance
+				cfu.option[cid] = JSON.parse(JSON.stringify(newVal))
+				cfu.option[cid] = rdformatterAssign(cfu.option[cid], cfu.formatter)
+				let canvasdom = document.getElementById(cid)
+				if (canvasdom && canvasdom.children[0]) {
+					cfu.option[cid].context = canvasdom.children[0].getContext("2d")
+					if (cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true) {
+						this.updataUChart()
+					} else {
+						setTimeout(() => {
+							cfu.option[cid].context.restore();
+							cfu.option[cid].context.save();
+							this.newUChart()
+						}, 100)
+					}
+				}
+			},
+			newUChart() {
+				let cid = this.rid
+				cfu.instance[cid] = new uChartsRD(cfu.option[cid])
+				cfu.instance[cid].addEventListener('renderComplete', () => {
+					that[cid].callMethod('emitMsg', {
+						name: "complete",
+						params: {
+							type: "complete",
+							complete: true,
+							id: cid,
+							opts: cfu.instance[cid].opts
+						}
+					})
+					cfu.instance[cid].delEventListener('renderComplete')
+				});
+				cfu.instance[cid].addEventListener('scrollLeft', () => {
+					that[cid].callMethod('emitMsg', {
+						name: "scrollLeft",
+						params: {
+							type: "scrollLeft",
+							scrollLeft: true,
+							id: cid,
+							opts: cfu.instance[cid].opts
+						}
+					})
+				});
+				cfu.instance[cid].addEventListener('scrollRight', () => {
+					that[cid].callMethod('emitMsg', {
+						name: "scrollRight",
+						params: {
+							type: "scrollRight",
+							scrollRight: true,
+							id: cid,
+							opts: cfu.instance[cid].opts
+						}
+					})
+				});
+			},
+			updataUChart() {
+				let cid = this.rid
+				cfu.instance[cid].updateData(cfu.option[cid])
+			},
+			tooltipDefault(item, category, index, opts) {
+				if (category) {
+					let data = item.data
+					if (typeof item.data === "object") {
+						data = item.data.value
+					}
+					return category + ' ' + item.name + ':' + data;
+				} else {
+					if (item.properties && item.properties.name) {
+						return item.properties.name;
+					} else {
+						return item.name + ':' + item.data;
+					}
+				}
+			},
+			showTooltip(e, cid) {
+				let tc = cfu.option[cid].tooltipCustom
+				if (tc && tc !== undefined && tc !== null) {
+					let offset = undefined;
+					if (tc.x >= 0 && tc.y >= 0) {
+						offset = {
+							x: tc.x,
+							y: tc.y + 10
+						};
+					}
+					cfu.instance[cid].showToolTip(e, {
+						index: tc.index,
+						offset: offset,
+						textList: tc.textList,
+						formatter: (item, category, index, opts) => {
+							if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[
+									cid].tooltipFormat]) {
+								return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index,
+									opts);
+							} else {
+								return this.tooltipDefault(item, category, index, opts);
+							}
+						}
+					});
+				} else {
+					cfu.instance[cid].showToolTip(e, {
+						formatter: (item, category, index, opts) => {
+							if (typeof cfu.option[cid].tooltipFormat === 'string' && cfu.formatter[cfu.option[
+									cid].tooltipFormat]) {
+								return cfu.formatter[cfu.option[cid].tooltipFormat](item, category, index,
+									opts);
+							} else {
+								return this.tooltipDefault(item, category, index, opts);
+							}
+						}
+					});
+				}
+			},
+			tap(e) {
+				let cid = this.rid
+				let ontap = cfu.option[cid].ontap
+				let tooltipShow = cfu.option[cid].tooltipShow
+				let tapLegend = cfu.option[cid].tapLegend
+				if (ontap == false) return;
+				let currentIndex = null
+				let legendIndex = null
+				let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
+				let tmpe = {}
+				if (e.detail.x) { //tap或者click的事件
+					tmpe = {
+						x: e.detail.x - rchartdom.left,
+						y: e.detail.y - rchartdom.top + rootdom.top
+					}
+				} else { //mouse的事件
+					tmpe = {
+						x: e.clientX - rchartdom.left,
+						y: e.clientY - rchartdom.top + rootdom.top
+					}
+				}
+				e.changedTouches = [];
+				e.changedTouches.unshift(tmpe)
+				currentIndex = cfu.instance[cid].getCurrentDataIndex(e)
+				legendIndex = cfu.instance[cid].getLegendDataIndex(e)
+				if (tapLegend === true) {
+					cfu.instance[cid].touchLegend(e);
+				}
+				if (tooltipShow == true) {
+					this.showTooltip(e, cid)
+				}
+				that[cid].callMethod('emitMsg', {
+					name: "getIndex",
+					params: {
+						type: "getIndex",
+						event: tmpe,
+						currentIndex: currentIndex,
+						legendIndex: legendIndex,
+						id: cid,
+						opts: cfu.instance[cid].opts
+					}
+				})
+			},
+			touchStart(e) {
+				let cid = this.rid
+				let ontouch = cfu.option[cid].ontouch
+				if (ontouch == false) return;
+				if (cfu.option[cid].enableScroll === true && e.touches.length == 1) {
+					cfu.instance[cid].scrollStart(e);
+				}
+				that[cid].callMethod('emitMsg', {
+					name: "getTouchStart",
+					params: {
+						type: "touchStart",
+						event: e.changedTouches[0],
+						id: cid,
+						opts: cfu.instance[cid].opts
+					}
+				})
+			},
+			touchMove(e) {
+				let cid = this.rid
+				let ontouch = cfu.option[cid].ontouch
+				if (ontouch == false) return;
+				if (cfu.option[cid].enableScroll === true && e.changedTouches.length == 1) {
+					cfu.instance[cid].scroll(e);
+				}
+				if (cfu.option[cid].ontap === true && cfu.option[cid].enableScroll === false && cfu.option[cid]
+					.onmovetip === true) {
+					let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
+					let tmpe = {
+						x: e.changedTouches[0].clientX - rchartdom.left,
+						y: e.changedTouches[0].clientY - rchartdom.top + rootdom.top
+					}
+					e.changedTouches.unshift(tmpe)
+					if (cfu.option[cid].tooltipShow === true) {
+						this.showTooltip(e, cid)
+					}
+				}
+				if (ontouch === true && cfu.option[cid].enableScroll === true && cfu.option[cid].onzoom === true && e
+					.changedTouches.length == 2) {
+					cfu.instance[cid].dobuleZoom(e);
+				}
+				that[cid].callMethod('emitMsg', {
+					name: "getTouchMove",
+					params: {
+						type: "touchMove",
+						event: e.changedTouches[0],
+						id: cid,
+						opts: cfu.instance[cid].opts
+					}
+				})
+			},
+			touchEnd(e) {
+				let cid = this.rid
+				let ontouch = cfu.option[cid].ontouch
+				if (ontouch == false) return;
+				if (cfu.option[cid].enableScroll === true && e.touches.length == 0) {
+					cfu.instance[cid].scrollEnd(e);
+				}
+				that[cid].callMethod('emitMsg', {
+					name: "getTouchEnd",
+					params: {
+						type: "touchEnd",
+						event: e.changedTouches[0],
+						id: cid,
+						opts: cfu.instance[cid].opts
+					}
+				})
+			},
+			mouseDown(e) {
+				let cid = this.rid
+				let onmouse = cfu.option[cid].onmouse
+				if (onmouse == false) return;
+				let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
+				let tmpe = {}
+				tmpe = {
+					x: e.clientX - rchartdom.left,
+					y: e.clientY - rchartdom.top + rootdom.top
+				}
+				e.changedTouches = [];
+				e.changedTouches.unshift(tmpe)
+				cfu.instance[cid].scrollStart(e)
+				cfu.option[cid].mousedown = true;
+				that[cid].callMethod('emitMsg', {
+					name: "getTouchStart",
+					params: {
+						type: "mouseDown",
+						event: tmpe,
+						id: cid,
+						opts: cfu.instance[cid].opts
+					}
+				})
+			},
+			mouseMove(e) {
+				let cid = this.rid
+				let onmouse = cfu.option[cid].onmouse
+				let tooltipShow = cfu.option[cid].tooltipShow
+				if (onmouse == false) return;
+				let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
+				let tmpe = {}
+				tmpe = {
+					x: e.clientX - rchartdom.left,
+					y: e.clientY - rchartdom.top + rootdom.top
+				}
+				e.changedTouches = [];
+				e.changedTouches.unshift(tmpe)
+				if (cfu.option[cid].mousedown) {
+					cfu.instance[cid].scroll(e)
+					that[cid].callMethod('emitMsg', {
+						name: "getTouchMove",
+						params: {
+							type: "mouseMove",
+							event: tmpe,
+							id: cid,
+							opts: cfu.instance[cid].opts
+						}
+					})
+				} else if (cfu.instance[cid]) {
+					if (tooltipShow == true) {
+						this.showTooltip(e, cid)
+					}
+				}
+			},
+			mouseUp(e) {
+				let cid = this.rid
+				let onmouse = cfu.option[cid].onmouse
+				if (onmouse == false) return;
+				let rchartdom = document.getElementById('UC' + cid).getBoundingClientRect()
+				let tmpe = {}
+				tmpe = {
+					x: e.clientX - rchartdom.left,
+					y: e.clientY - rchartdom.top + rootdom.top
+				}
+				e.changedTouches = [];
+				e.changedTouches.unshift(tmpe)
+				cfu.instance[cid].scrollEnd(e)
+				cfu.option[cid].mousedown = false;
+				that[cid].callMethod('emitMsg', {
+					name: "getTouchEnd",
+					params: {
+						type: "mouseUp",
+						event: tmpe,
+						id: cid,
+						opts: cfu.instance[cid].opts
+					}
+				})
+			},
+		}
+	}
 </script>
 <!-- #endif -->
 
 <style scoped>
-.chartsview {
-  width: 100%;
-  height: 100%;
-  display: flex;
-  flex: 1;
-  justify-content: center;
-  align-items: center;
-}
-</style>
+	.chartsview {
+		width: 100%;
+		height: 100%;
+		display: flex;
+		flex: 1;
+		justify-content: center;
+		align-items: center;
+	}
+</style>

+ 14 - 2
uni_modules/qiun-data-charts/components/qiun-error/qiun-error.vue

@@ -1,7 +1,10 @@
 <template>
 	<view class="chartsview">
-		<view class="charts-error"></view>
-		<view class="charts-font">{{errorMessage==null?'请点击重试':errorMessage}}</view>
+		<view class="" v-if="!errorType">
+			<view class="charts-error"></view>
+			<view class="charts-font">{{errorMessage==null?'请点击重试':errorMessage}}</view>
+		</view>
+		<image class="charts-error-image" src="/static/img/index/chat-error.png" mode="aspectFill" v-else></image>
 	</view>
 </template>
 
@@ -9,6 +12,10 @@
 	export default {
 		name: 'qiun-error',
 		props: {
+			errorType: {
+				type: String,
+				default: null
+			},
 			errorMessage: {
 				type: String,
 				default: null
@@ -46,4 +53,9 @@
 		background-size: 150px 80px;
 		background-position: center;
 	}
+
+	.charts-error-image {
+		width: 120rpx;
+		height: 100rpx;
+	}
 </style>