{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\@jiaminghi\\data-view\\lib\\components\\decoration12\\src\\main.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\@jiaminghi\\data-view\\lib\\components\\decoration12\\src\\main.vue","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport autoResize from '../../../mixin/autoResize'\nimport { uuid } from '../../../util/index'\n\nimport { deepMerge } from '@jiaminghi/charts/lib/util/index'\n\nimport { deepClone, getCircleRadianPoint } from '@jiaminghi/c-render/lib/plugin/util'\n\nimport { fade } from '@jiaminghi/color'\n\nexport default {\n name: 'DvDecoration12',\n mixins: [autoResize],\n props: {\n color: {\n type: Array,\n default: () => ([])\n },\n /**\n * @description Scan animation dur\n */\n scanDur: {\n type: Number,\n default: 3\n },\n /**\n * @description Halo animation dur\n */\n haloDur: {\n type: Number,\n default: 2\n }\n },\n data () {\n const id = uuid()\n return {\n ref: 'decoration-12',\n gId: `decoration-12-g-${id}`,\n gradientId: `decoration-12-gradient-${id}`,\n\n defaultColor: ['#2783ce', '#2cf7fe'],\n\n mergedColor: [],\n\n pathD: [],\n\n pathColor: [],\n\n circleR: [],\n\n splitLinePoints: [],\n\n arcD: [],\n\n segment: 30,\n\n sectorAngle: Math.PI / 3,\n\n ringNum: 3,\n\n ringWidth: 1,\n\n showSplitLine: true\n }\n },\n watch: {\n color () {\n const { mergeColor } = this\n\n mergeColor()\n }\n },\n computed: {\n x () {\n const { width } = this\n\n return width / 2\n },\n y () {\n const { height } = this\n\n return height / 2\n }\n },\n methods: {\n init () {\n const { mergeColor, calcPathD, calcPathColor, calcCircleR, calcSplitLinePoints, calcArcD } = this\n\n mergeColor()\n\n calcPathD()\n\n calcPathColor()\n\n calcCircleR()\n\n calcSplitLinePoints()\n\n calcArcD()\n },\n mergeColor () {\n const { color, defaultColor } = this\n\n this.mergedColor = deepMerge(deepClone(defaultColor, true), color || [])\n },\n calcPathD () {\n const { x, y, width, segment, sectorAngle } = this\n\n const startAngle = -Math.PI / 2\n const angleGap = sectorAngle / segment\n const r = width / 4\n let lastEndPoints = getCircleRadianPoint(x, y, r, startAngle)\n\n this.pathD = new Array(segment)\n .fill('')\n .map((_, i) => {\n const endPoints = getCircleRadianPoint(x, y, r, startAngle - (i + 1) * angleGap).map(_ => _.toFixed(5))\n const d = `M${lastEndPoints.join(',')} A${r}, ${r} 0 0 0 ${endPoints.join(',')}`\n lastEndPoints = endPoints\n\n return d\n })\n },\n calcPathColor () {\n const { mergedColor: [color], segment } = this\n\n const colorGap = 100 / (segment - 1)\n\n this.pathColor = new Array(segment)\n .fill(color)\n .map((_, i) => fade(color, 100 - i * colorGap))\n },\n calcCircleR () {\n const { segment, ringNum, width, ringWidth } = this\n\n const radiusGap = (width / 2 - ringWidth / 2) / ringNum\n\n this.circleR = new Array(ringNum)\n .fill(0)\n .map((_, i) => radiusGap * (i + 1))\n },\n calcSplitLinePoints () {\n const { x, y, width } = this\n\n const angleGap = Math.PI / 6\n const r = width / 2\n\n this.splitLinePoints = new Array(6)\n .fill('')\n .map((_, i) => {\n const startAngle = angleGap * (i + 1)\n const endAngle = startAngle + Math.PI\n const startPoint = getCircleRadianPoint(x, y, r, startAngle)\n const endPoint = getCircleRadianPoint(x, y, r, endAngle)\n\n return `${startPoint.join(',')} ${endPoint.join(',')}`\n })\n },\n calcArcD () {\n const { x, y, width } = this\n\n const angleGap = Math.PI / 6\n const r = width / 2 - 1\n\n this.arcD = new Array(4)\n .fill('')\n .map((_, i) => {\n const startAngle = angleGap * (3 * i + 1)\n const endAngle = startAngle + angleGap\n const startPoint = getCircleRadianPoint(x, y, r, startAngle)\n const endPoint = getCircleRadianPoint(x, y, r, endAngle)\n\n return `M${startPoint.join(',')} A${x}, ${y} 0 0 1 ${endPoint.join(',')}`\n })\n },\n afterAutoResizeMixinInit () {\n const { init } = this\n\n init()\n },\n fade\n }\n}\n",null]}