Browse Source

代码优化

master
zhangyongzhangyong 6 years ago
parent
commit
22775eb558
  1. 26
      src/views/modules/kpi/manualscore-add-or-update-zlph.vue
  2. 16
      src/views/modules/kpi/manualscore-zlph.vue

26
src/views/modules/kpi/manualscore-add-or-update-zlph.vue

@ -1,7 +1,6 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '120px'">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '120px'">
<el-form-item>
<el-form-item label="被打分部门" prop="deptId" v-if="!dataForm.id" style="margin-left: -120px; width: 400px;">
<el-cascader
@ -76,20 +75,20 @@ export default {
options: [],
manualScoreType: [
{
"id": '优',
"name": '优'
'id': '优',
'name': '优'
},
{
"id": '良',
"name": '良'
'id': '良',
'name': '良'
},
{
"id": '中',
"name": '中'
'id': '中',
'name': '中'
},
{
"id": '差',
"name": '差'
'id': '差',
'name': '差'
}
]
}
@ -170,7 +169,7 @@ export default {
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}, 1000, { 'leading': true, 'trailing': false })
},
watch: {
'deptIdList': function (val) {
@ -183,3 +182,8 @@ export default {
}
}
</script>
<style type="text/css">
.el-input--suffix .el-input__inner {
padding-right: 50px
}
</style>

16
src/views/modules/kpi/manualscore-zlph.vue

@ -107,16 +107,16 @@ export default {
options: [],
kpiManualRuleList: [
{
"id": 'street_party',
"deptName": '街道'
'id': 'street_party',
'deptName': '街道'
},
{
"id": 'community_party',
"deptName": '社区'
'id': 'community_party',
'deptName': '社区'
},
{
"id": 'grid_party',
"deptName": '网格'
'id': 'grid_party',
'deptName': '网格'
}
]
}
@ -165,7 +165,7 @@ export default {
// if (res.code !== 0) {
// return this.$message.error(res.msg)
// } else {
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportTemplateURL}?${params}`
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportTemplateURL}?${params}`
// }
// }).catch(() => { })
},
@ -195,7 +195,7 @@ export default {
},
showMonthYMD (row, column) {
return row.month.substring(0, 10)
},
}
},
watch: {
'deptIdList': function (val) {

Loading…
Cancel
Save