|
@@ -269,6 +269,9 @@ export default {
|
|
|
components: {
|
|
|
StyleType
|
|
|
},
|
|
|
+ props:{
|
|
|
+ type:{},
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
activeNames: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
|
|
@@ -276,26 +279,48 @@ export default {
|
|
|
positionList: [],
|
|
|
}
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ type(val){
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.chartIcon = JSON.parse(JSON.stringify(this.$constants.chartType))
|
|
|
- this.chartIcon.map(item => {
|
|
|
- let { op, cg } = detectionChartType(item, this.form)
|
|
|
- if (op && cg) {
|
|
|
- cg = false
|
|
|
- this.$store.dispatch('resetSettingColor')
|
|
|
- }
|
|
|
- if (op) {
|
|
|
- this.$set(item, 'disable', true)
|
|
|
- this.$set(item, 'active', false)
|
|
|
- }
|
|
|
- if (cg) {
|
|
|
- this.$set(item, 'disable', false)
|
|
|
- this.$set(item, 'active', true)
|
|
|
- }
|
|
|
- })
|
|
|
+ this.init()
|
|
|
this.getPositionList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ init(){
|
|
|
+
|
|
|
+ var disable = true
|
|
|
+ if(this.form.schema.y.field){
|
|
|
+ disable = false
|
|
|
+ }
|
|
|
+
|
|
|
+ this.chartIcon.map(item => {
|
|
|
+ // let { op, cg } = detectionChartType(item, this.form)
|
|
|
+ // if (op && cg) {
|
|
|
+ // cg = false
|
|
|
+ // this.$store.dispatch('resetSettingColor')
|
|
|
+ // }
|
|
|
+ // if (op) {
|
|
|
+ // this.$set(item, 'disable', true)
|
|
|
+ // this.$set(item, 'active', false)
|
|
|
+ // }
|
|
|
+ // if (cg) {
|
|
|
+ // this.$set(item, 'disable', false)
|
|
|
+ // this.$set(item, 'active', true)
|
|
|
+ // }
|
|
|
+ if(item.value == this.form.setting.type){
|
|
|
+ this.$set(item, 'active', true)
|
|
|
+ }
|
|
|
+ if(item.type == 2){
|
|
|
+ this.$set(item, 'disable', disable)
|
|
|
+ }else{
|
|
|
+ this.$set(item, 'disable', !disable)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getColorName(name){
|
|
|
if(this.form.schema['y'].fieldKind == 0){
|
|
|
var data = this.form.source['y']
|