Commit 1d897c75 authored by huai.li's avatar huai.li

修复图标

parent d8354aee
...@@ -62,4 +62,11 @@ ...@@ -62,4 +62,11 @@
.ec-page-wrapper .el-form-item__label { .ec-page-wrapper .el-form-item__label {
color: white; color: white;
} }
.chart-avatar {
width: 34px;
height: 34px;
}
.img-circle {
}
} }
...@@ -142,10 +142,19 @@ export default { ...@@ -142,10 +142,19 @@ export default {
val.forEach(item => { val.forEach(item => {
this.$set(this.list, item.key, this.list[item.key] || item.value) this.$set(this.list, item.key, this.list[item.key] || item.value)
}) })
this.$emit('update:list', this.list) // this.$emit('update:list', this.list)
}, {deep: true}) }, {deep: true})
}, },
watch: {
'list': {
handler (newVal, oldVal) {
this.$emit('update:list', newVal)
},
deep: true
}
},
mounted () { mounted () {
}, },
...@@ -156,6 +165,11 @@ export default { ...@@ -156,6 +165,11 @@ export default {
remove (key) { remove (key) {
let _index = this.quantityArr.findIndex(ele => ele.key === key) let _index = this.quantityArr.findIndex(ele => ele.key === key)
this.quantityArr.splice(_index, 1) this.quantityArr.splice(_index, 1)
this.list = {}
this.quantityArr.forEach(item => {
this.$set(this.list, item.key, this.list[item.key] || item.value)
})
this.$emit('update:list', this.list)
}, },
getNew () { getNew () {
......
...@@ -44,16 +44,16 @@ export default { ...@@ -44,16 +44,16 @@ export default {
alarm_before: '', alarm_before: '',
engineer_id: '', engineer_id: '',
description: '', description: '',
quantity: [] caseServices: []
} }
} }
}, },
methods: { methods: {
formatList (val) { formatList (val) {
this.model.quantity = [] this.model.caseServices = []
Object.keys(val).forEach(item => { Object.keys(val).forEach(item => {
this.model.quantity[item] = val[item] this.model.caseServices[item] = val[item]
}) })
}, },
show (model) { show (model) {
...@@ -79,13 +79,9 @@ export default { ...@@ -79,13 +79,9 @@ export default {
}, },
save () { save () {
debugger let _params = Object.assign({}, setModule(this.model, 'Cases'))
let _model = Object.assign({}, this.model) _params['CaseAssignments[engineer_id]'] = _params['Cases[engineer_id]']
let _params = Object.assign({}, setModule({quantity: this.model.quantity}, 'CaseServices')) delete _params['Cases[engineer_id]']
delete _model['quantity']
let _params1 = Object.assign(_params, setModule(_model, 'Cases'))
_params1['CaseAssignments[engineer_id]'] = _params1['Cases[engineer_id]']
delete _params1['Cases[engineer_id]']
let _apiUrl = !this.model.id ? api.saveCaseNew : api.saveCaseEdit let _apiUrl = !this.model.id ? api.saveCaseNew : api.saveCaseEdit
!this.model.id && delete _params['Cases[id]'] !this.model.id && delete _params['Cases[id]']
this.$refs['form']._validate(() => { this.$refs['form']._validate(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment