commit
9a840328aa
|
@ -63,7 +63,7 @@ export default {
|
||||||
{{.FieldJson}}: '',
|
{{.FieldJson}}: '',
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .FieldType "int" }}
|
{{- if eq .FieldType "int" }}
|
||||||
{{.FieldJson}}: 0,
|
{{.FieldJson}}: {{- if .DictType }} undefined{{ else }} 0{{- end }},
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .FieldType "time.Time" }}
|
{{- if eq .FieldType "time.Time" }}
|
||||||
{{.FieldJson}}: new Date(),
|
{{.FieldJson}}: new Date(),
|
||||||
|
|
|
@ -158,7 +158,7 @@ export default {
|
||||||
{{.FieldJson}}: '',
|
{{.FieldJson}}: '',
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .FieldType "int" }}
|
{{- if eq .FieldType "int" }}
|
||||||
{{.FieldJson}}: 0,
|
{{.FieldJson}}: {{- if .DictType}} undefined{{ else }} 0{{- end }},
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .FieldType "time.Time" }}
|
{{- if eq .FieldType "time.Time" }}
|
||||||
{{.FieldJson}}: new Date(),
|
{{.FieldJson}}: new Date(),
|
||||||
|
@ -249,7 +249,7 @@ export default {
|
||||||
{{.FieldJson}}: '',
|
{{.FieldJson}}: '',
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .FieldType "int" }}
|
{{- if eq .FieldType "int" }}
|
||||||
{{.FieldJson}}: 0,
|
{{.FieldJson}}: {{- if .DictType }} undefined{{ else }} 0{{- end }},
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .FieldType "time.Time" }}
|
{{- if eq .FieldType "time.Time" }}
|
||||||
{{.FieldJson}}: new Date(),
|
{{.FieldJson}}: new Date(),
|
||||||
|
|
|
@ -68,7 +68,7 @@ func (dictionaryService *DictionaryService) UpdateSysDictionary(sysDictionary *s
|
||||||
//@return: err error, sysDictionary model.SysDictionary
|
//@return: err error, sysDictionary model.SysDictionary
|
||||||
|
|
||||||
func (dictionaryService *DictionaryService) GetSysDictionary(Type string, Id uint) (err error, sysDictionary system.SysDictionary) {
|
func (dictionaryService *DictionaryService) GetSysDictionary(Type string, Id uint) (err error, sysDictionary system.SysDictionary) {
|
||||||
err = global.GVA_DB.Where("type = ? OR id = ?", Type, Id).Preload("SysDictionaryDetails").First(&sysDictionary).Error
|
err = global.GVA_DB.Where("type = ? OR id = ? and status = ?", Type, Id, true).Preload("SysDictionaryDetails", "status = ?", true).First(&sysDictionary).Error
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ func (d *dictionaryDetail) Init() error {
|
||||||
{global.GVA_MODEL{ID: 21, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "longblob", 8, status, 8, 5},
|
{global.GVA_MODEL{ID: 21, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "longblob", 8, status, 8, 5},
|
||||||
{global.GVA_MODEL{ID: 22, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "longtext", 9, status, 9, 5},
|
{global.GVA_MODEL{ID: 22, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "longtext", 9, status, 9, 5},
|
||||||
{global.GVA_MODEL{ID: 23, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "tinyint", 0, status, 0, 6},
|
{global.GVA_MODEL{ID: 23, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "tinyint", 0, status, 0, 6},
|
||||||
|
{global.GVA_MODEL{ID: 24, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "男", 0, status, 0, 1},
|
||||||
|
{global.GVA_MODEL{ID: 25, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "女", 1, status, 1, 1},
|
||||||
}
|
}
|
||||||
return global.GVA_DB.Transaction(func(tx *gorm.DB) error {
|
return global.GVA_DB.Transaction(func(tx *gorm.DB) error {
|
||||||
if tx.Where("id IN ?", []int{1, 23}).Find(&[]system.SysDictionaryDetail{}).RowsAffected == 2 {
|
if tx.Where("id IN ?", []int{1, 23}).Find(&[]system.SysDictionaryDetail{}).RowsAffected == 2 {
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
|
import { toRaw } from 'vue'
|
||||||
import 'echarts/theme/macarons'
|
import 'echarts/theme/macarons'
|
||||||
|
|
||||||
var dataAxis = []
|
var dataAxis = []
|
||||||
|
@ -64,7 +65,7 @@ export default {
|
||||||
this.setOptions()
|
this.setOptions()
|
||||||
},
|
},
|
||||||
setOptions() {
|
setOptions() {
|
||||||
this.chart.setOption({
|
toRaw(this.chart).setOption({
|
||||||
grid: {
|
grid: {
|
||||||
left: '40',
|
left: '40',
|
||||||
right: '20',
|
right: '20',
|
||||||
|
|
Loading…
Reference in New Issue