Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/sumifcc-bchart into dev
正在显示
4 个修改的文件
包含
118 行增加
和
10 行删除
| @@ -117,9 +117,11 @@ type ChartProperty struct { | @@ -117,9 +117,11 @@ type ChartProperty struct { | ||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | type Other struct { | 119 | type Other struct { |
| 120 | - Quarter *Quarter `json:"quarter,optional,omitempty"` // 四分图 | ||
| 121 | - Divider *Divider `json:"divider,optional,omitempty"` // 分割线 | ||
| 122 | - Rank *Rank `json:"rank,optional,omitempty"` // 排名图 | 120 | + Quarter *Quarter `json:"quarter,optional,omitempty"` // 四分图 |
| 121 | + Divider *Divider `json:"divider,optional,omitempty"` // 分割线 | ||
| 122 | + Rank *Rank `json:"rank,optional,omitempty"` // 排名图 | ||
| 123 | + Deviation *Deviation `json:"deviation,optional,omitempty"` // 偏差图 | ||
| 124 | + Notepaper *Notepaper `json:"notepaper,optional,omitempty"` // 便签(富文本) | ||
| 123 | } | 125 | } |
| 124 | 126 | ||
| 125 | type Quarter struct { | 127 | type Quarter struct { |
| @@ -214,6 +216,41 @@ type Dimension struct { | @@ -214,6 +216,41 @@ type Dimension struct { | ||
| 214 | Value string `json:"dimensionVal,optional"` | 216 | Value string `json:"dimensionVal,optional"` |
| 215 | } | 217 | } |
| 216 | 218 | ||
| 219 | +type Deviation struct { | ||
| 220 | + XAxisLabel string `json:"xAxisLabel,optional,omitempty"` // 分类标签 | ||
| 221 | + TopChart TopChart `json:"topChart,optional,omitempty"` | ||
| 222 | + MidChart MidChart `json:"midChart,optional,omitempty"` | ||
| 223 | + BotChart []BotChart `json:"botChart,optional,omitempty"` | ||
| 224 | +} | ||
| 225 | + | ||
| 226 | +type Notepaper struct { | ||
| 227 | + Text string `json:"text,optional,omitempty"` // 富文本内容 | ||
| 228 | + Theme string `json:"theme,optional,omitempty"` // 主题风格 | ||
| 229 | +} | ||
| 230 | + | ||
| 231 | +type TopChart struct { | ||
| 232 | + SeriesValue string `json:"seriesValue,optional,omitempty"` // 系列 | ||
| 233 | + Legend string `json:"legend,optional,omitempty"` // 图例 | ||
| 234 | + FormatType string `json:"formatType,optional,omitempty"` // | ||
| 235 | + FormatPoint string `json:"formatPoint,optional,omitempty"` // | ||
| 236 | +} | ||
| 237 | + | ||
| 238 | +type MidChart struct { | ||
| 239 | + SeriesValue string `json:"seriesValue,optional,omitempty"` // 系列 | ||
| 240 | + Legend string `json:"legend,optional,omitempty"` // 图例 | ||
| 241 | + FormatType string `json:"formatType,optional,omitempty"` // | ||
| 242 | + FormatPoint string `json:"formatPoint,optional,omitempty"` // | ||
| 243 | +} | ||
| 244 | + | ||
| 245 | +type BotChart struct { | ||
| 246 | + SeriesSwitch bool `json:"seriesSwitch,optional,omitempty"` // 是否显示 | ||
| 247 | + Type string `json:"type,optional,omitempty"` // 图表类型 | ||
| 248 | + SeriesValue string `json:"seriesValue,optional,omitempty"` // 系列 | ||
| 249 | + Legend string `json:"legend,optional,omitempty"` // 图例 | ||
| 250 | + FormatType string `json:"formatType,optional,omitempty"` // | ||
| 251 | + FormatPoint string `json:"formatPoint,optional,omitempty"` // | ||
| 252 | +} | ||
| 253 | + | ||
| 217 | type SearchTableByModuleRequest struct { | 254 | type SearchTableByModuleRequest struct { |
| 218 | Token string `header:"x-mmm-accesstoken,optional"` | 255 | Token string `header:"x-mmm-accesstoken,optional"` |
| 219 | } | 256 | } |
| @@ -27,9 +27,11 @@ type ChartProperty struct { | @@ -27,9 +27,11 @@ type ChartProperty struct { | ||
| 27 | //YAxis interface{} `json:"yAxis"` // Y轴 | 27 | //YAxis interface{} `json:"yAxis"` // Y轴 |
| 28 | } | 28 | } |
| 29 | type Other struct { | 29 | type Other struct { |
| 30 | - Quarter *Quarter `json:"quarter,optional,omitempty"` // 四分图 | ||
| 31 | - Divider *Divider `json:"divider,optional,omitempty"` // 分割线 | ||
| 32 | - Rank *Rank `json:"rank,optional,omitempty"` // 排名图 | 30 | + Quarter *Quarter `json:"quarter,optional,omitempty"` // 四分图 |
| 31 | + Divider *Divider `json:"divider,optional,omitempty"` // 分割线 | ||
| 32 | + Rank *Rank `json:"rank,optional,omitempty"` // 排名图 | ||
| 33 | + Deviation *Deviation `json:"deviation,optional,omitempty"` // 偏差图 | ||
| 34 | + Notepaper *Notepaper `json:"notepaper,optional,omitempty"` // 便签(富文本) | ||
| 33 | } | 35 | } |
| 34 | type Quarter struct { | 36 | type Quarter struct { |
| 35 | XAxisLabel string `json:"xAxisLabel"` // x轴标签名 | 37 | XAxisLabel string `json:"xAxisLabel"` // x轴标签名 |
| @@ -119,6 +121,39 @@ type Expression struct { | @@ -119,6 +121,39 @@ type Expression struct { | ||
| 119 | ToValue string `json:"toValue"` // 显示值(转为) | 121 | ToValue string `json:"toValue"` // 显示值(转为) |
| 120 | } | 122 | } |
| 121 | 123 | ||
| 124 | +type ( | ||
| 125 | + Deviation struct { | ||
| 126 | + XAxisLabel string `json:"xAxisLabel,optional,omitempty"` // 分类标签 | ||
| 127 | + TopChart TopChart `json:"topChart,optional,omitempty"` | ||
| 128 | + MidChart MidChart `json:"midChart,optional,omitempty"` | ||
| 129 | + BotChart []BotChart `json:"botChart,optional,omitempty"` | ||
| 130 | + } | ||
| 131 | + Notepaper struct { | ||
| 132 | + Text string `json:"text,optional,omitempty"` // 富文本内容 | ||
| 133 | + Theme string `json:"theme,optional,omitempty"` // 主题风格 | ||
| 134 | + } | ||
| 135 | + TopChart struct { | ||
| 136 | + SeriesValue string `json:"seriesValue,optional,omitempty"` // 系列 | ||
| 137 | + Legend string `json:"legend,optional,omitempty"` // 图例 | ||
| 138 | + FormatType string `json:"formatType,optional,omitempty"` // | ||
| 139 | + FormatPoint string `json:"formatPoint,optional,omitempty"` // | ||
| 140 | + } | ||
| 141 | + MidChart struct { | ||
| 142 | + SeriesValue string `json:"seriesValue,optional,omitempty"` // 系列 | ||
| 143 | + Legend string `json:"legend,optional,omitempty"` // 图例 | ||
| 144 | + FormatType string `json:"formatType,optional,omitempty"` // | ||
| 145 | + FormatPoint string `json:"formatPoint,optional,omitempty"` // | ||
| 146 | + } | ||
| 147 | + BotChart struct { | ||
| 148 | + SeriesSwitch bool `json:"seriesSwitch,optional,omitempty"` // 是否显示 | ||
| 149 | + Type string `json:"type,optional,omitempty"` // 图表类型 | ||
| 150 | + SeriesValue string `json:"seriesValue,optional,omitempty"` // 系列 | ||
| 151 | + Legend string `json:"legend,optional,omitempty"` // 图例 | ||
| 152 | + FormatType string `json:"formatType,optional,omitempty"` // | ||
| 153 | + FormatPoint string `json:"formatPoint,optional,omitempty"` // | ||
| 154 | + } | ||
| 155 | +) | ||
| 156 | + | ||
| 122 | func (exp Expression) Match(value string) (result bool, toValue string) { | 157 | func (exp Expression) Match(value string) (result bool, toValue string) { |
| 123 | fValue, ferr := strconv.ParseFloat(value, 64) | 158 | fValue, ferr := strconv.ParseFloat(value, 64) |
| 124 | cValue, cerr := strconv.ParseFloat(exp.CompareValue, 64) | 159 | cValue, cerr := strconv.ParseFloat(exp.CompareValue, 64) |
| @@ -156,9 +156,11 @@ type ( | @@ -156,9 +156,11 @@ type ( | ||
| 156 | Other Other `json:"other,optional"` // 其他额外配置 | 156 | Other Other `json:"other,optional"` // 其他额外配置 |
| 157 | } | 157 | } |
| 158 | Other { | 158 | Other { |
| 159 | - Quarter *Quarter `json:"quarter,optional,omitempty"` // 四分图 | ||
| 160 | - Divider *Divider `json:"divider,optional,omitempty"` // 分割线 | ||
| 161 | - Rank *Rank `json:"rank,optional,omitempty"` // 排名图 | 159 | + Quarter *Quarter `json:"quarter,optional,omitempty"` // 四分图 |
| 160 | + Divider *Divider `json:"divider,optional,omitempty"` // 分割线 | ||
| 161 | + Rank *Rank `json:"rank,optional,omitempty"` // 排名图 | ||
| 162 | + Deviation *Deviation `json:"deviation,optional,omitempty"` // 偏差图 | ||
| 163 | + Notepaper *Notepaper `json:"notepaper,optional,omitempty"` // 便签(富文本) | ||
| 162 | } | 164 | } |
| 163 | Quarter { | 165 | Quarter { |
| 164 | XAxisLabel string `json:"xAxisLabel"` // x轴标签名 | 166 | XAxisLabel string `json:"xAxisLabel"` // x轴标签名 |
| @@ -241,4 +243,37 @@ type ( | @@ -241,4 +243,37 @@ type ( | ||
| 241 | Name string `json:"name,optional,omitempty"` | 243 | Name string `json:"name,optional,omitempty"` |
| 242 | Value string `json:"dimensionVal,optional"` | 244 | Value string `json:"dimensionVal,optional"` |
| 243 | } | 245 | } |
| 246 | +) | ||
| 247 | + | ||
| 248 | +type ( | ||
| 249 | + Deviation struct { | ||
| 250 | + XAxisLabel string `json:"xAxisLabel,optional,omitempty"` // 分类标签 | ||
| 251 | + TopChart TopChart `json:"topChart,optional,omitempty"` | ||
| 252 | + MidChart MidChart `json:"midChart,optional,omitempty"` | ||
| 253 | + BotChart []BotChart `json:"botChart,optional,omitempty"` | ||
| 254 | + } | ||
| 255 | + Notepaper struct { | ||
| 256 | + Text string `json:"text,optional,omitempty"` // 富文本内容 | ||
| 257 | + Theme string `json:"theme,optional,omitempty"` // 主题风格 | ||
| 258 | + } | ||
| 259 | + TopChart struct { | ||
| 260 | + SeriesValue string `json:"seriesValue,optional,omitempty"` // 系列 | ||
| 261 | + Legend string `json:"legend,optional,omitempty"` // 图例 | ||
| 262 | + FormatType string `json:"formatType,optional,omitempty"` // | ||
| 263 | + FormatPoint string `json:"formatPoint,optional,omitempty"` // | ||
| 264 | + } | ||
| 265 | + MidChart struct { | ||
| 266 | + SeriesValue string `json:"seriesValue,optional,omitempty"` // 系列 | ||
| 267 | + Legend string `json:"legend,optional,omitempty"` // 图例 | ||
| 268 | + FormatType string `json:"formatType,optional,omitempty"` // | ||
| 269 | + FormatPoint string `json:"formatPoint,optional,omitempty"` // | ||
| 270 | + } | ||
| 271 | + BotChart struct { | ||
| 272 | + SeriesSwitch bool `json:"seriesSwitch,optional,omitempty"` // 是否显示 | ||
| 273 | + Type string `json:"type,optional,omitempty"` // 图表类型 | ||
| 274 | + SeriesValue string `json:"seriesValue,optional,omitempty"` // 系列 | ||
| 275 | + Legend string `json:"legend,optional,omitempty"` // 图例 | ||
| 276 | + FormatType string `json:"formatType,optional,omitempty"` // | ||
| 277 | + FormatPoint string `json:"formatPoint,optional,omitempty"` // | ||
| 278 | + } | ||
| 244 | ) | 279 | ) |
| @@ -39,7 +39,8 @@ func OpenGormPGDB(source string, logMode string) *gorm.DB { | @@ -39,7 +39,8 @@ func OpenGormPGDB(source string, logMode string) *gorm.DB { | ||
| 39 | DSN: source, | 39 | DSN: source, |
| 40 | PreferSimpleProtocol: true, // disables implicit prepared statement usage | 40 | PreferSimpleProtocol: true, // disables implicit prepared statement usage |
| 41 | }), &gorm.Config{ | 41 | }), &gorm.Config{ |
| 42 | - Logger: NewLogger(logMode), //newLogger, | 42 | + Logger: NewLogger(logMode), //newLogger, |
| 43 | + DisableAutomaticPing: true, | ||
| 43 | }) | 44 | }) |
| 44 | if err != nil { | 45 | if err != nil { |
| 45 | panic(err) | 46 | panic(err) |
-
请 注册 或 登录 后发表评论