Browse Source

【市北代码迁移至安宁】【绩效考核】-王童-2020-09-17

redesign
Jackwang 5 years ago
parent
commit
a22d65a071
  1. 2
      src/views/modules/kpi/formula-add-or-update.vue
  2. 30
      src/views/modules/kpi/formula.vue
  3. 208
      src/views/modules/kpi/kpicommunitybuilding-add-or-update.vue
  4. 218
      src/views/modules/kpi/kpicommunitybuilding.vue
  5. 246
      src/views/modules/kpi/kpigridentity-add-or-update.vue
  6. 218
      src/views/modules/kpi/kpigridentity.vue
  7. 217
      src/views/modules/kpi/kpimassevaluation-add-or-update.vue
  8. 222
      src/views/modules/kpi/kpimassevaluation.vue
  9. 217
      src/views/modules/kpi/kpimattersresponse-add-or-update.vue
  10. 171
      src/views/modules/kpi/kpimattersresponse.vue
  11. 208
      src/views/modules/kpi/kpipublicopinion-add-or-update.vue
  12. 218
      src/views/modules/kpi/kpipublicopinion.vue
  13. 258
      src/views/modules/kpi/kpitypicalculture-add-or-update.vue
  14. 202
      src/views/modules/kpi/kpitypicalculture.vue
  15. 2
      src/views/modules/kpi/manualScore-add-or-update.vue
  16. 30
      src/views/modules/kpi/manualScore.vue
  17. 2
      src/views/modules/kpi/manualScoreRule-add-or-update.vue
  18. 26
      src/views/modules/kpi/manualScoreRule.vue
  19. 4
      src/views/modules/kpi/manualscore-add-or-update-zlph.vue
  20. 22
      src/views/modules/kpi/manualscore-zlph.vue
  21. 23
      src/views/modules/kpi/resultGrid.vue
  22. 21
      src/views/modules/kpi/resultSuperior.vue
  23. 1
      src/views/modules/kpi/rule-add-or-update.vue
  24. 1
      src/views/modules/kpi/rule-manualScore-add-or-update.vue
  25. 28
      src/views/modules/kpi/rule.vue
  26. 12
      src/views/modules/kpi/streetpersiongoalmonth.vue
  27. 14
      src/views/modules/kpi/streetpersonbase-add-or-update.vue
  28. 132
      src/views/modules/kpi/streetpersonbase.vue
  29. 2
      src/views/modules/kpi/timeLimitIssue-add-or-update.vue
  30. 36
      src/views/modules/kpi/timeLimitIssue.vue
  31. 1
      src/views/modules/kpi/timeLimitItem-add-or-update.vue
  32. 102
      src/views/modules/kpi/timeLimitItem.vue

2
src/views/modules/kpi/formula-add-or-update.vue

@ -1,6 +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" :label-width="$i18n.locale === 'en-US' ? '120px' : '120px'">
<el-form-item label="公式名称" prop="name">
<el-input v-model="dataForm.name" placeholder="公式名称"></el-input>
</el-form-item>

30
src/views/modules/kpi/formula.vue

@ -1,12 +1,12 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpiformula}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item label="公式名称">
<el-input v-model="dataForm.name" placeholder="" clearable></el-input>
<el-input v-model="dataForm.name" placeholder="请输入公式名称" clearable @keyup.native="btKeyUpName"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpiformula:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
@ -17,13 +17,17 @@
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column type="index" width="50" label="序号"></el-table-column>
<el-table-column prop="name" label="公式名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="code" label="公式编码" header-align="center" align="center"></el-table-column>
<el-table-column prop="functionName" label="方法名" header-align="center" align="center"></el-table-column>
<el-table-column prop="paramAmount" width='50' label="参数数量" header-align="center" align="center" ></el-table-column>
<el-table-column prop="description" width='400' label="公式描述" header-align="center" align="center"></el-table-column>
<el-table-column prop="createdTime" label="创建时间" header-align="center" align="center"></el-table-column>
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="name" label="公式名称" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="code" label="公式编码" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="functionName" label="方法名" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="paramAmount" label="参数数量" header-align="center" align="center" width="100"></el-table-column>
<el-table-column prop="description" label="公式描述" header-align="center" align="center" min-width="400" show-overflow-tooltip></el-table-column>
<el-table-column prop="createdTime" label="创建时间" header-align="center" align="center" width="180"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button v-if="$hasPermission('kpi:kpiformula:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
@ -66,6 +70,12 @@ export default {
},
components: {
AddOrUpdate
},
methods:{
btKeyUpName(e){
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '')
this.dataForm.name = e.target.value
}
}
}
</script>

208
src/views/modules/kpi/kpicommunitybuilding-add-or-update.vue

@ -0,0 +1,208 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false" customClass="customWidth">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="部门名称" prop="deptId" label-width="120px">
<el-cascader
ref="name"
v-model="dataForm.joinDeptIdsArr"
:options="options"
:props="{ multiple: false, emitPath: false, checkStrictly: true }"
@visible-change="changeHandle"
style="width:90%;"
:disabled="dataForm.id?true:false"
>
</el-cascader>
</el-form-item>
<el-form-item label="考核年月" prop="monthYear" label-width="120px">
<el-date-picker v-model="dataForm.monthYear" :disabled="dataForm.id?true:false"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM" style="width:40%">
</el-date-picker>
</el-form-item>
<el-form-item label="民主协商机制" prop="democraticConsultationMechanism" label-width="120px">
<el-input-number v-model="dataForm.democraticConsultationMechanism" :min="0" :max="3" label="民主协商机制分数" :precision="1" style="width:40%"></el-input-number>
</el-form-item>
<el-form-item label="居民公约制度" prop="residentConventionSystem" label-width="120px">
<el-input-number v-model="dataForm.residentConventionSystem" :min="0" :max="3" label="居民公约制度分数" :precision="1" style="width:40%"></el-input-number>
</el-form-item>
<el-form-item label="网格协商案例" prop="gridNegotiationCase" label-width="120px">
<el-input-number v-model="dataForm.gridNegotiationCase" :min="0" :max="4" label="网格协商案例分数" :precision="1" style="width:40%"></el-input-number>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
deptId: '',
deptName: '',
deptTypeKey: '',
monthYear: '',
democraticConsultationMechanism: '',
residentConventionSystem: '',
gridNegotiationCase: '',
parentDeptIds: '',
parentDeptNames: '',
allDeptIds: '',
allDeptNames: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
delFlag: '',
joinDeptIdsArr: ''
},
options: [],
isAble: false
}
},
computed: {
dataRule () {
return {
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptTypeKey: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
monthYear: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
democraticConsultationMechanism: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
residentConventionSystem: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
gridNegotiationCase: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
joinDeptIdsArr: [
{ required: false, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
created: function () {
this.getOptions()
},
methods: {
init () {
this.visible = true
this.isAble = false
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
}
})
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
changeHandle (value, selectedData) {
let parentDeptIds = ''
let parentDeptNames = ''
let allDeptIds = ''
let allDeptNames = ''
let deptId = ''
let deptName = ''
if (this.$refs['name'].getCheckedNodes() !== null && this.$refs['name'].getCheckedNodes().length > 0) {
var path = this.$refs['name'].getCheckedNodes()[0].path
var pathLabels = this.$refs['name'].getCheckedNodes()[0].pathLabels
for (var i = 0; i < path.length; i++) {
if (i < path.length - 1) {
parentDeptIds += path[i] + ','
} else {
deptId = path[i]
}
allDeptIds += path[i] + ','
}
for (var j = 0; j < pathLabels.length; j++) {
if (j < pathLabels.length - 1) {
parentDeptNames += pathLabels[j] + '-'
} else {
deptName = pathLabels[j]
}
allDeptNames += pathLabels[j] + '-'
}
}
this.dataForm.parentDeptIds = parentDeptIds.length > 0 ? parentDeptIds.substring(0, parentDeptIds.length - 1) : parentDeptIds
this.dataForm.parentDeptNames = parentDeptNames.length > 0 ? parentDeptNames.substring(0, parentDeptNames.length - 1) : parentDeptNames
this.dataForm.allDeptIds = allDeptIds.length > 0 ? allDeptIds.substring(0, allDeptIds.length - 1) : allDeptIds
this.dataForm.allDeptNames = allDeptNames.length > 0 ? allDeptNames.substring(0, allDeptNames.length - 1) : allDeptNames
this.dataForm.deptId = deptId
this.dataForm.deptName = deptName
},
//
getInfo () {
this.$http.get(`/kpi/kpicommunitybuilding/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
this.dataForm.joinDeptIdsArr = this.dataForm.deptId
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/kpi/kpicommunitybuilding/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style lang="scss">
.customWidth {
width:50%
}
</style>

218
src/views/modules/kpi/kpicommunitybuilding.vue

@ -0,0 +1,218 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpicommunitybuilding}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item>
<el-form-item label="部门" label-width="90px">
<el-cascader
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
filterable
clearable
></el-cascader>
</el-form-item>
</el-form-item>
<el-form-item label="考核年月" label-width="70px">
<el-date-picker v-model="dataForm.monthYear"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM">
</el-date-picker>
</el-form-item>
<br>
<el-form-item label="部门类型" prop="deptTypeKey" label-width="90px">
<el-select v-model="dataForm.deptTypeKey" placeholder="部门类型" clearable>
<el-option v-for="item in paramNameArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" ></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="success" @click="exportTemplate()">导出录入模板</el-button>
</el-form-item>
<el-form-item>
<el-upload class="upload-demo"
ref="upload"
v-loading="dataListLoading"
:action="uploadUrl"
:limit="1"
:on-success='uploadSuccess'
:on-error='errorExceed'
accept=".xls,.xlsx">
<el-button type="primary">导入打分结果</el-button>
</el-upload>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpicommunitybuilding:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="deptName" label="部门" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="deptTypeKey" label="部门类型" header-align="center" align="center" :formatter = "stateFormat" width="120"></el-table-column>
<el-table-column prop="monthYear" label="年月" header-align="center" align="center" width="180"></el-table-column>
<el-table-column prop="democraticConsultationMechanism" label="民主协商机制分数" header-align="center" align="center" width="140"></el-table-column>
<el-table-column prop="residentConventionSystem" label="居民公约制度分数" header-align="center" align="center" width="140"></el-table-column>
<el-table-column prop="gridNegotiationCase" label="网格协商案例分数" header-align="center" align="center" width="140"></el-table-column>
<el-table-column prop="parentDeptNames" label="上级部门" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="allDeptNames" label="所有部门" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('kpi:kpicommunitybuilding:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './kpicommunitybuilding-add-or-update'
import Cookies from 'js-cookie'
import qs from 'qs'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/kpicommunitybuilding/page',
getDataListIsPage: true,
deleteURL: '/kpi/kpicommunitybuilding',
deleteIsBatch: true,
exportTemplateURL: '/kpi/kpicommunitybuilding/exportTemplate'
},
dataForm: {
id: '',
deptTypeKey: '',
monthYear: '',
deptId: ''
},
//
deptIdList: [],
options: [],
paramNameArr: []
}
},
components: {
AddOrUpdate
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else if (val.length > 0) {
this.dataForm.deptId = this.deptIdList[val.length - 1]
}
}
},
created: function () {
this.getOptions()
this.getParamListInfo('dept_type')
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/kpi/kpicommunitybuilding/importManualScoreExcel?token=${Cookies.get('token')}`
},
methods: {
stateFormat (row, column) {
for (var i = 0; i < this.paramNameArr.length; i++) {
if (row.deptTypeKey === this.paramNameArr[i].dictValue) {
return this.paramNameArr[i].dictName
}
}
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
// code
getParamListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'dept_type') {
this.paramNameArr = res.data
}
}).catch(() => {})
},
exportTemplate () {
let remindInfo = ''
let monthYear = this.dataForm.monthYear
let deptTypeKey = this.dataForm.deptTypeKey
let deptId = this.dataForm.deptId
if (!deptId) {
remindInfo += '部门、'
}
if (!monthYear) {
remindInfo += '考核周期起始月、'
}
if (!deptTypeKey) {
remindInfo += '部门类型、'
}
if (remindInfo.length > 0) {
remindInfo = remindInfo.substring(0, remindInfo.length - 1)
return this.$message.error(remindInfo + '不能为空!')
}
let params = qs.stringify({
'token': Cookies.get('token'),
'monthYear': monthYear,
'deptTypeKey': deptTypeKey,
'deptId': deptId
})
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportTemplateURL}?${params}`
},
errorExceed (file, fileList) {
this.$message.error('上传失败请重试')
},
uploadSuccess (response, file, fileList) {
this.dataListLoading = false
this.$refs.upload.clearFiles()
if (response.code !== 0 || (response.data !== null && response.data.length > 0)) {
this.errordataList = response.data
if (this.errordataList != null && this.errordataList.length > 0) {
this.faultDataVisible = true
} else {
this.$message.error(response.msg)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.deptIdList = ''
this.dataForm.deptId = ''
this.getDataList()
}
})
}
}
}
</script>

246
src/views/modules/kpi/kpigridentity-add-or-update.vue

@ -0,0 +1,246 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false" customClass="customWidth">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="部门名称" prop="deptId" label-width="120px">
<el-cascader
ref="name"
v-model="dataForm.joinDeptIdsArr"
:options="options"
:props="{ multiple: false, emitPath: false, checkStrictly: true }"
@visible-change="changeHandle"
style="width:90%;"
:disabled="dataForm.id?true:false"
>
</el-cascader>
</el-form-item>
<el-form-item label="考核年月" prop="monthYear" label-width="120px">
<el-date-picker v-model="dataForm.monthYear" :disabled="dataForm.id?true:false"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM" style="width:40%;">
</el-date-picker>
</el-form-item>
<el-form-item label="边界分数" prop="stationEstablishmentBorder" label-width="120px">
<el-input-number v-model="dataForm.stationEstablishmentBorder" :min="0" :max="1" label="边界分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
<el-form-item label="布局分数" prop="stationEstablishmentLayout" label-width="120px">
<el-input-number v-model="dataForm.stationEstablishmentLayout" :min="0" :max="2" label="布局分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
<el-form-item label="标准分数" prop="stationEstablishmentStandard" label-width="120px">
<el-input-number v-model="dataForm.stationEstablishmentStandard" :min="0" :max="1" label="标准分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
<el-form-item label="工作人员分数" prop="staffingPlacementOfficer" label-width="120px">
<el-input-number v-model="dataForm.staffingPlacementOfficer" :min="0" :max="1" label="工作人员分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
<el-form-item label="信息采集分数" prop="staffingPlacementInformation" label-width="120px">
<el-input-number v-model="dataForm.staffingPlacementInformation" :min="0" :max="1" label="信息采集分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
<el-form-item label="人才储备分数" prop="staffingPlacementPersonnel" label-width="120px">
<el-input-number v-model="dataForm.staffingPlacementPersonnel" :min="0" :max="1" label="人才储备分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
<el-form-item label="工作计划分数" prop="gridOperationWorkplan" label-width="120px">
<el-input-number v-model="dataForm.gridOperationWorkplan" :min="0" :max="1" label="工作计划分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
<el-form-item label="运行机制分数" prop="gridOperationOperational" label-width="120px">
<el-input-number v-model="dataForm.gridOperationOperational" :min="0" :max="2" label="运行机制分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
deptId: '',
deptName: '',
deptTypeKey: '',
monthYear: '',
stationEstablishment: '',
stationEstablishmentBorder: '',
stationEstablishmentLayout: '',
stationEstablishmentStandard: '',
staffingPlacement: '',
staffingPlacementOfficer: '',
staffingPlacementInformation: '',
staffingPlacementPersonnel: '',
gridOperation: '',
gridOperationWorkplan: '',
gridOperationOperational: '',
parentDeptIds: '',
parentDeptNames: '',
allDeptIds: '',
allDeptNames: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
delFlag: '',
joinDeptIdsArr: ''
},
options: [],
isAble: false
}
},
computed: {
dataRule () {
return {
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptTypeKey: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
monthYear: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
stationEstablishmentBorder: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
stationEstablishmentLayout: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
stationEstablishmentStandard: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
staffingPlacementOfficer: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
staffingPlacementInformation: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
staffingPlacementPersonnel: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
gridOperationWorkplan: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
gridOperationOperational: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
joinDeptIdsArr: [
{ required: false, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
created: function () {
this.getOptions()
},
methods: {
init () {
this.visible = true
this.isAble = false
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
}
})
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
changeHandle (value, selectedData) {
let parentDeptIds = ''
let parentDeptNames = ''
let allDeptIds = ''
let allDeptNames = ''
let deptId = ''
let deptName = ''
if (this.$refs['name'].getCheckedNodes() !== null && this.$refs['name'].getCheckedNodes().length > 0) {
var path = this.$refs['name'].getCheckedNodes()[0].path
var pathLabels = this.$refs['name'].getCheckedNodes()[0].pathLabels
for (var i = 0; i < path.length; i++) {
if (i < path.length - 1) {
parentDeptIds += path[i] + ','
} else {
deptId = path[i]
}
allDeptIds += path[i] + ','
}
for (var j = 0; j < pathLabels.length; j++) {
if (j < pathLabels.length - 1) {
parentDeptNames += pathLabels[j] + '-'
} else {
deptName = pathLabels[j]
}
allDeptNames += pathLabels[j] + '-'
}
}
this.dataForm.parentDeptIds = parentDeptIds.length > 0 ? parentDeptIds.substring(0, parentDeptIds.length - 1) : parentDeptIds
this.dataForm.parentDeptNames = parentDeptNames.length > 0 ? parentDeptNames.substring(0, parentDeptNames.length - 1) : parentDeptNames
this.dataForm.allDeptIds = allDeptIds.length > 0 ? allDeptIds.substring(0, allDeptIds.length - 1) : allDeptIds
this.dataForm.allDeptNames = allDeptNames.length > 0 ? allDeptNames.substring(0, allDeptNames.length - 1) : allDeptNames
this.dataForm.deptId = deptId
this.dataForm.deptName = deptName
},
//
getInfo () {
this.$http.get(`/kpi/kpigridentity/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
this.dataForm.joinDeptIdsArr = this.dataForm.deptId
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/kpi/kpigridentity/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style lang="scss">
.customWidth {
width:50%
}
</style>

218
src/views/modules/kpi/kpigridentity.vue

@ -0,0 +1,218 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpigridentity}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item>
<el-form-item label="部门" label-width="90px">
<el-cascader
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
filterable
clearable
></el-cascader>
</el-form-item>
</el-form-item>
<el-form-item label="考核年月" label-width="70px">
<el-date-picker v-model="dataForm.monthYear"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM">
</el-date-picker>
</el-form-item>
<br>
<el-form-item label="部门类型" prop="deptTypeKey" label-width="90px">
<el-select v-model="dataForm.deptTypeKey" placeholder="部门类型" clearable>
<el-option v-for="item in paramNameArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" ></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="success" @click="exportTemplate()">导出录入模板</el-button>
</el-form-item>
<el-form-item>
<el-upload class="upload-demo"
ref="upload"
v-loading="dataListLoading"
:action="uploadUrl"
:limit="1"
:on-success='uploadSuccess'
:on-error='errorExceed'
accept=".xls,.xlsx">
<el-button type="primary">导入打分结果</el-button>
</el-upload>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpigridentity:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="deptName" label="部门名称" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="monthYear" label="年月" header-align="center" align="center" width="180"></el-table-column>
<el-table-column prop="deptTypeKey" label="部门类型" header-align="center" align="center" :formatter = "stateFormat" width="120"></el-table-column>
<el-table-column prop="stationEstablishment" label="建站达标分数" header-align="center" align="center" width="120"></el-table-column>
<el-table-column prop="staffingPlacement" label="人员配备分数" header-align="center" align="center" width="120"></el-table-column>
<el-table-column prop="gridOperation" label="网格运行分数" header-align="center" align="center" width="120"></el-table-column>
<el-table-column prop="parentDeptNames" label="上级部门" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="allDeptNames" label="所有部门" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('kpi:kpigridentity:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './kpigridentity-add-or-update'
import Cookies from 'js-cookie'
import qs from 'qs'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/kpigridentity/page',
getDataListIsPage: true,
deleteURL: '/kpi/kpigridentity',
deleteIsBatch: true,
exportTemplateURL: '/kpi/kpigridentity/exportTemplate'
},
dataForm: {
id: '',
deptTypeKey: '',
monthYear: '',
deptId: ''
},
//
deptIdList: [],
options: [],
paramNameArr: []
}
},
components: {
AddOrUpdate
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else if (val.length > 0) {
this.dataForm.deptId = this.deptIdList[val.length - 1]
}
}
},
created: function () {
this.getOptions()
this.getParamListInfo('dept_type')
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/kpi/kpigridentity/importManualScoreExcel?token=${Cookies.get('token')}`
},
methods: {
stateFormat (row, column) {
for (var i = 0; i < this.paramNameArr.length; i++) {
if (row.deptTypeKey === this.paramNameArr[i].dictValue) {
return this.paramNameArr[i].dictName
}
}
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
// code
getParamListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'dept_type') {
this.paramNameArr = res.data
}
}).catch(() => {})
},
exportTemplate () {
let remindInfo = ''
let monthYear = this.dataForm.monthYear
let deptTypeKey = this.dataForm.deptTypeKey
let deptId = this.dataForm.deptId
if (!deptId) {
remindInfo += '部门、'
}
if (!monthYear) {
remindInfo += '考核周期起始月、'
}
if (!deptTypeKey) {
remindInfo += '部门类型、'
}
if (remindInfo.length > 0) {
remindInfo = remindInfo.substring(0, remindInfo.length - 1)
return this.$message.error(remindInfo + '不能为空!')
}
let params = qs.stringify({
'token': Cookies.get('token'),
'monthYear': monthYear,
'deptTypeKey': deptTypeKey,
'deptId': deptId
})
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportTemplateURL}?${params}`
},
errorExceed (file, fileList) {
this.$message.error('上传失败请重试')
},
uploadSuccess (response, file, fileList) {
this.dataListLoading = false
this.$refs.upload.clearFiles()
if (response.code !== 0 || (response.data !== null && response.data.length > 0)) {
this.errordataList = response.data
if (this.errordataList != null && this.errordataList.length > 0) {
this.faultDataVisible = true
} else {
this.$message.error(response.msg)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.deptIdList = ''
this.dataForm.deptId = ''
this.getDataList()
}
})
}
}
}
</script>

217
src/views/modules/kpi/kpimassevaluation-add-or-update.vue

@ -0,0 +1,217 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false" customClass="customWidth">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="部门名称" prop="deptId" label-width="120px">
<el-cascader
ref="name"
v-model="dataForm.joinDeptIdsArr"
:options="options"
:props="{ multiple: false, emitPath: false, checkStrictly: true }"
@visible-change="changeHandle"
style="width:90%;"
:disabled="dataForm.id?true:false"
>
</el-cascader>
</el-form-item>
<el-form-item label="考核年份" prop="year" label-width="120px">
<el-date-picker v-model="dataForm.year" :disabled="dataForm.id?true:false"
type="year" clearable placeholder="选择年"
value-format="yyyy" format="yyyy" style="width:45%;">
</el-date-picker>
</el-form-item>
<el-form-item label="满意" prop="satisfied" label-width="120px">
<el-input-number v-model="dataForm.satisfied" :min="0" :max="20" label="满意分数" :precision="1" style="width:45%;"></el-input-number>
</el-form-item>
<el-form-item label="基本满意" prop="basicSatisfaction" label-width="120px">
<el-input-number v-model="dataForm.basicSatisfaction" :min="0" :max="20" label="基本满意分数" :precision="1" style="width:45%;"></el-input-number>
</el-form-item>
<el-form-item label="不满意" prop="dissatisfied" label-width="120px">
<el-input-number v-model="dataForm.dissatisfied" :min="0" :max="20" label="不满意分数" :precision="1" style="width:45%;"></el-input-number>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
deptId: '',
deptName: '',
deptTypeKey: '',
year: '',
satisfied: '',
basicSatisfaction: '',
dissatisfied: '',
parentDeptIds: '',
parentDeptNames: '',
allDeptIds: '',
allDeptNames: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
delFlag: '',
joinDeptIdsArr: ''
},
options: [],
isAble: false
}
},
computed: {
dataRule () {
return {
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptTypeKey: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
year: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
satisfied: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
basicSatisfaction: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
dissatisfied: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
joinDeptIdsArr: [
{ required: false, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
created: function () {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
this.getOptions()
},
methods: {
init () {
this.visible = true
this.isAble = false
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
}
})
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
changeHandle (value, selectedData) {
let parentDeptIds = ''
let parentDeptNames = ''
let allDeptIds = ''
let allDeptNames = ''
let deptId = ''
let deptName = ''
if (this.$refs['name'].getCheckedNodes() !== null && this.$refs['name'].getCheckedNodes().length > 0) {
var path = this.$refs['name'].getCheckedNodes()[0].path
var pathLabels = this.$refs['name'].getCheckedNodes()[0].pathLabels
for (var i = 0; i < path.length; i++) {
if (i < path.length - 1) {
parentDeptIds += path[i] + ','
} else {
deptId = path[i]
}
allDeptIds += path[i] + ','
}
for (var j = 0; j < pathLabels.length; j++) {
if (j < pathLabels.length - 1) {
parentDeptNames += pathLabels[j] + '-'
} else {
deptName = pathLabels[j]
}
allDeptNames += pathLabels[j] + '-'
}
}
this.dataForm.parentDeptIds = parentDeptIds.length > 0 ? parentDeptIds.substring(0, parentDeptIds.length - 1) : parentDeptIds
this.dataForm.parentDeptNames = parentDeptNames.length > 0 ? parentDeptNames.substring(0, parentDeptNames.length - 1) : parentDeptNames
this.dataForm.allDeptIds = allDeptIds.length > 0 ? allDeptIds.substring(0, allDeptIds.length - 1) : allDeptIds
this.dataForm.allDeptNames = allDeptNames.length > 0 ? allDeptNames.substring(0, allDeptNames.length - 1) : allDeptNames
this.dataForm.deptId = deptId
this.dataForm.deptName = deptName
},
//
getInfo () {
this.$http.get(`/kpi/kpimassevaluation/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
this.dataForm.joinDeptIdsArr = this.dataForm.deptId
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
// 20
let satisfied = this.dataForm.satisfied
let basicSatisfaction = this.dataForm.basicSatisfaction
let dissatisfied = this.dataForm.dissatisfied
if ((satisfied + basicSatisfaction + dissatisfied) > 20) {
return this.$message.error('评价分数总和不能超过20分!')
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/kpi/kpimassevaluation/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style lang="scss">
.customWidth {
width:35%
}
</style>

222
src/views/modules/kpi/kpimassevaluation.vue

@ -0,0 +1,222 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpimassevaluation}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item>
<el-form-item label="部门" label-width="68px">
<el-cascader
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
filterable
clearable
></el-cascader>
</el-form-item>
</el-form-item>
<el-form-item label="考核年月">
<el-date-picker v-model="dataForm.year"
type="year" clearable placeholder="选择年"
value-format="yyyy" format="yyyy">
</el-date-picker>
</el-form-item>
<br/>
<el-form-item label="部门类型" prop="deptTypeKey">
<el-select v-model="dataForm.deptTypeKey" placeholder="部门类型" clearable>
<el-option v-for="item in paramNameArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" ></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataListSearch()" type="success">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="success" @click="exportTemplate()">导出录入模板</el-button>
</el-form-item>
<el-form-item>
<el-upload class="upload-demo"
ref="upload"
v-loading="dataListLoading"
:action="uploadUrl"
:limit="1"
:on-success='uploadSuccess'
:on-error='errorExceed'
accept=".xls,.xlsx">
<el-button type="primary">导入打分结果</el-button>
</el-upload>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpimassevaluation:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="deptName" label="部门名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="deptTypeKey" label="部门类型" header-align="center" align="center" :formatter = "stateFormat"></el-table-column>
<el-table-column prop="year" label="年份" header-align="center" align="center"></el-table-column>
<el-table-column prop="satisfied" label="满意分数" header-align="center" align="center"></el-table-column>
<el-table-column prop="basicSatisfaction" label="基本满意分数" header-align="center" align="center"></el-table-column>
<el-table-column prop="dissatisfied" label="不满意分数" header-align="center" align="center"></el-table-column>
<el-table-column prop="parentDeptNames" label="上级部门" header-align="center" align="center"></el-table-column>
<el-table-column prop="allDeptNames" label="所有部门" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('kpi:kpimassevaluation:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './kpimassevaluation-add-or-update'
import Cookies from 'js-cookie'
import qs from 'qs'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/kpimassevaluation/page',
getDataListIsPage: true,
deleteURL: '/kpi/kpimassevaluation',
deleteIsBatch: true,
exportTemplateURL: '/kpi/kpimassevaluation/exportTemplate'
},
dataForm: {
id: '',
deptTypeKey: '',
year: '',
deptId: ''
},
//
deptIdList: [],
options: [],
paramNameArr: []
}
},
components: {
AddOrUpdate
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else if (val.length > 0) {
this.dataForm.deptId = this.deptIdList[val.length - 1]
}
}
},
created: function () {
this.getOptions()
this.getParamListInfo('dept_type')
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/kpi/kpimassevaluation/importManualScoreExcel?token=${Cookies.get('token')}`
},
methods: {
getDataListNew () {
this.page = 1
this.getDataList()
},
stateFormat (row, column) {
for (var i = 0; i < this.paramNameArr.length; i++) {
if (row.deptTypeKey === this.paramNameArr[i].dictValue) {
return this.paramNameArr[i].dictName
}
}
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
// code
getParamListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'dept_type') {
this.paramNameArr = res.data
}
}).catch(() => {})
},
exportTemplate () {
let remindInfo = ''
let year = this.dataForm.year
let deptTypeKey = this.dataForm.deptTypeKey
let deptId = this.dataForm.deptId
if (!deptId) {
remindInfo += '部门、'
}
if (!year) {
remindInfo += '考核周期起始年、'
}
if (!deptTypeKey) {
remindInfo += '部门类型、'
}
if (remindInfo.length > 0) {
remindInfo = remindInfo.substring(0, remindInfo.length - 1)
return this.$message.error(remindInfo + '不能为空!')
}
let params = qs.stringify({
'token': Cookies.get('token'),
'year': year,
'deptTypeKey': deptTypeKey,
'deptId': deptId
})
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportTemplateURL}?${params}`
},
errorExceed (file, fileList) {
this.$message.error('上传失败请重试')
},
uploadSuccess (response, file, fileList) {
this.dataListLoading = false
this.$refs.upload.clearFiles()
if (response.code !== 0 || (response.data !== null && response.data.length > 0)) {
this.errordataList = response.data
if (this.errordataList != null && this.errordataList.length > 0) {
this.faultDataVisible = true
} else {
this.$message.error(response.msg)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.deptIdList = ''
this.dataForm.deptId = ''
this.getDataList()
}
})
}
}
}
</script>

217
src/views/modules/kpi/kpimattersresponse-add-or-update.vue

@ -0,0 +1,217 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false" customClass="customWidth">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="部门名称" prop="deptId">
<el-cascader
ref="name"
v-model="dataForm.joinDeptIdsArr"
:options="options"
:props="{ multiple: false, emitPath: false, checkStrictly: true }"
@visible-change="changeHandle"
style="width:90%;"
:disabled="dataForm.id?true:false"
>
</el-cascader>
</el-form-item>
<el-form-item label="考核年月" prop="monthYear">
<el-date-picker v-model="dataForm.monthYear" :disabled="dataForm.id?true:false"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM" style="width:40%;">
</el-date-picker>
</el-form-item>
<el-form-item label="扣分类别" prop="deductionCategory">
<el-select v-model="dataForm.deductionCategory" placeholder="扣分类别" :disabled="dataForm.id?true:false" style="width:40%;">
<el-option v-for="item in deductionCategoryArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="扣分分值" prop="deduction">
<el-input-number v-model="dataForm.deduction" :min="-1" :max="-0.1" label="扣分分值" :step="0.1" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
deptId: '',
deptName: '',
deptTypeKey: '',
monthYear: '',
deductionCategory: '',
deduction: '-0.1',
parentDeptIds: '',
parentDeptNames: '',
allDeptIds: '',
allDeptNames: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
delFlag: '',
joinDeptIdsArr: ''
},
options: [],
isAble: false,
deductionCategoryArr: []
}
},
computed: {
dataRule () {
return {
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptTypeKey: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
monthYear: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deductionCategory: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deduction: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
joinDeptIdsArr: [
{ required: false, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
created: function () {
this.getOptions()
this.getdeductionCategoryListInfo('deduction_category')
},
methods: {
init () {
this.visible = true
this.isAble = false
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
}
})
},
// code
getdeductionCategoryListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'deduction_category') {
this.deductionCategoryArr = res.data
}
}).catch(() => {})
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
changeHandle (value, selectedData) {
let parentDeptIds = ''
let parentDeptNames = ''
let allDeptIds = ''
let allDeptNames = ''
let deptId = ''
let deptName = ''
if (this.$refs['name'].getCheckedNodes() !== null && this.$refs['name'].getCheckedNodes().length > 0) {
var path = this.$refs['name'].getCheckedNodes()[0].path
var pathLabels = this.$refs['name'].getCheckedNodes()[0].pathLabels
for (var i = 0; i < path.length; i++) {
if (i < path.length - 1) {
parentDeptIds += path[i] + ','
} else {
deptId = path[i]
}
allDeptIds += path[i] + ','
}
for (var j = 0; j < pathLabels.length; j++) {
if (j < pathLabels.length - 1) {
parentDeptNames += pathLabels[j] + '-'
} else {
deptName = pathLabels[j]
}
allDeptNames += pathLabels[j] + '-'
}
}
this.dataForm.parentDeptIds = parentDeptIds.length > 0 ? parentDeptIds.substring(0, parentDeptIds.length - 1) : parentDeptIds
this.dataForm.parentDeptNames = parentDeptNames.length > 0 ? parentDeptNames.substring(0, parentDeptNames.length - 1) : parentDeptNames
this.dataForm.allDeptIds = allDeptIds.length > 0 ? allDeptIds.substring(0, allDeptIds.length - 1) : allDeptIds
this.dataForm.allDeptNames = allDeptNames.length > 0 ? allDeptNames.substring(0, allDeptNames.length - 1) : allDeptNames
this.dataForm.deptId = deptId
this.dataForm.deptName = deptName
},
//
getInfo () {
this.$http.get(`/kpi/kpimattersresponse/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
this.dataForm.joinDeptIdsArr = this.dataForm.deptId
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/kpi/kpimattersresponse/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style lang="scss">
.customWidth {
width:35%
}
</style>

171
src/views/modules/kpi/kpimattersresponse.vue

@ -0,0 +1,171 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpimattersresponse}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item>
<el-form-item label="部门" label-width="80px">
<el-cascader
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
filterable
clearable
></el-cascader>
</el-form-item>
</el-form-item>
<el-form-item label="考核年月" label-width="70px">
<el-date-picker v-model="dataForm.monthYear"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM">
</el-date-picker>
</el-form-item>
<el-form-item label="部门类型" prop="deptTypeKey" label-width="90px">
<el-select v-model="dataForm.deptTypeKey" placeholder="部门类型" clearable>
<el-option v-for="item in paramNameArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="扣分类别" prop="deductionCategory" label-width="80px">
<el-select v-model="dataForm.deductionCategory" placeholder="扣分类别" clearable>
<el-option v-for="item in deductionCategoryArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpimattersresponse:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="deptName" label="部门名称" header-align="center" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="monthYear" label="年月" header-align="center" align="center"></el-table-column>
<el-table-column prop="deptTypeKey" label="部门类型" header-align="center" align="center" :formatter = "deptTypeKeyFormat"></el-table-column>
<el-table-column prop="deductionCategory" label="扣分类别" header-align="center" align="center" :formatter = "stateFormat"></el-table-column>
<el-table-column prop="deduction" label="扣分分值" header-align="center" align="center"></el-table-column>
<el-table-column prop="parentDeptNames" label="上级部门" header-align="center" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="allDeptNames" label="所有部门" header-align="center" align="center" show-overflow-tooltip></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('kpi:kpimattersresponse:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './kpimattersresponse-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/kpimattersresponse/page',
getDataListIsPage: true,
deleteURL: '/kpi/kpimattersresponse',
deleteIsBatch: true
},
dataForm: {
id: '',
deptTypeKey: '',
monthYear: '',
deptId: '',
deductionCategory: ''
},
//
deptIdList: [],
options: [],
paramNameArr: [],
deductionCategoryArr: []
}
},
components: {
AddOrUpdate
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else if (val.length > 0) {
this.dataForm.deptId = this.deptIdList[val.length - 1]
}
}
},
created: function () {
this.getOptions()
this.getParamListInfo('dept_type')
this.getdeductionCategoryListInfo('deduction_category')
},
methods: {
stateFormat (row, column) {
for (var i = 0; i < this.deductionCategoryArr.length; i++) {
if (row.deductionCategory === this.deductionCategoryArr[i].dictValue) {
return this.deductionCategoryArr[i].dictName
}
}
},
deptTypeKeyFormat (row, column) {
for (var i = 0; i < this.paramNameArr.length; i++) {
if (row.deptTypeKey === this.paramNameArr[i].dictValue) {
return this.paramNameArr[i].dictName
}
}
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
// code
getParamListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'dept_type') {
this.paramNameArr = res.data
}
}).catch(() => {})
},
// code
getdeductionCategoryListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'deduction_category') {
this.deductionCategoryArr = res.data
}
}).catch(() => {})
}
}
}
</script>

208
src/views/modules/kpi/kpipublicopinion-add-or-update.vue

@ -0,0 +1,208 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false" customClass="customWidth">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="部门名称" prop="deptId" label-width="120px">
<el-cascader
ref="name"
v-model="dataForm.joinDeptIdsArr"
:options="options"
:props="{ multiple: false, emitPath: false, checkStrictly: true }"
@visible-change="changeHandle"
style="width:90%;"
:disabled="dataForm.id?true:false"
>
</el-cascader>
</el-form-item>
<el-form-item label="考核年月" prop="monthYear" label-width="120px">
<el-date-picker v-model="dataForm.monthYear" :disabled="dataForm.id?true:false"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM" style="width:40%;">
</el-date-picker>
</el-form-item>
<el-form-item label="宣传基础" prop="publicityFoundation" label-width="120px">
<el-input-number v-model="dataForm.publicityFoundation" :min="0" :max="5" label="宣传基础分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
<el-form-item label="创新突破" prop="innovationBreakthrough" label-width="120px">
<el-input-number v-model="dataForm.innovationBreakthrough" :min="0" :max="3" label="创新突破分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
<el-form-item label="舆情应对" prop="publicOpinionResponse" label-width="120px">
<el-input-number v-model="dataForm.publicOpinionResponse" :min="0" :max="2" label="舆情应对分数" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
deptId: '',
deptName: '',
deptTypeKey: '',
monthYear: '',
publicityFoundation: '',
innovationBreakthrough: '',
publicOpinionResponse: '',
parentDeptIds: '',
parentDeptNames: '',
allDeptIds: '',
allDeptNames: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
delFlag: '',
joinDeptIdsArr: ''
},
options: [],
isAble: false
}
},
computed: {
dataRule () {
return {
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptTypeKey: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
monthYear: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
publicityFoundation: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
innovationBreakthrough: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
publicOpinionResponse: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
joinDeptIdsArr: [
{ required: false, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
created: function () {
this.getOptions()
},
methods: {
init () {
this.visible = true
this.isAble = false
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
}
})
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
changeHandle (value, selectedData) {
let parentDeptIds = ''
let parentDeptNames = ''
let allDeptIds = ''
let allDeptNames = ''
let deptId = ''
let deptName = ''
if (this.$refs['name'].getCheckedNodes() !== null && this.$refs['name'].getCheckedNodes().length > 0) {
var path = this.$refs['name'].getCheckedNodes()[0].path
var pathLabels = this.$refs['name'].getCheckedNodes()[0].pathLabels
for (var i = 0; i < path.length; i++) {
if (i < path.length - 1) {
parentDeptIds += path[i] + ','
} else {
deptId = path[i]
}
allDeptIds += path[i] + ','
}
for (var j = 0; j < pathLabels.length; j++) {
if (j < pathLabels.length - 1) {
parentDeptNames += pathLabels[j] + '-'
} else {
deptName = pathLabels[j]
}
allDeptNames += pathLabels[j] + '-'
}
}
this.dataForm.parentDeptIds = parentDeptIds.length > 0 ? parentDeptIds.substring(0, parentDeptIds.length - 1) : parentDeptIds
this.dataForm.parentDeptNames = parentDeptNames.length > 0 ? parentDeptNames.substring(0, parentDeptNames.length - 1) : parentDeptNames
this.dataForm.allDeptIds = allDeptIds.length > 0 ? allDeptIds.substring(0, allDeptIds.length - 1) : allDeptIds
this.dataForm.allDeptNames = allDeptNames.length > 0 ? allDeptNames.substring(0, allDeptNames.length - 1) : allDeptNames
this.dataForm.deptId = deptId
this.dataForm.deptName = deptName
},
//
getInfo () {
this.$http.get(`/kpi/kpipublicopinion/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
this.dataForm.joinDeptIdsArr = this.dataForm.deptId
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/kpi/kpipublicopinion/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style lang="scss">
.customWidth {
width:50%
}
</style>

218
src/views/modules/kpi/kpipublicopinion.vue

@ -0,0 +1,218 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpipublicopinion}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item>
<el-form-item label="部门名称" label-width="80px">
<el-cascader
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
filterable
clearable
></el-cascader>
</el-form-item>
</el-form-item>
<el-form-item label="考核年月" label-width="70px">
<el-date-picker v-model="dataForm.monthYear"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM">
</el-date-picker>
</el-form-item>
<br>
<el-form-item label="部门类型" prop="deptTypeKey" label-width="80px">
<el-select v-model="dataForm.deptTypeKey" placeholder="部门类型" clearable>
<el-option v-for="item in paramNameArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" ></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="success" @click="exportTemplate()">导出录入模板</el-button>
</el-form-item>
<el-form-item>
<el-upload class="upload-demo"
ref="upload"
v-loading="dataListLoading"
:action="uploadUrl"
:limit="1"
:on-success='uploadSuccess'
:on-error='errorExceed'
accept=".xls,.xlsx">
<el-button type="primary">导入打分结果</el-button>
</el-upload>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpipublicopinion:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="deptName" label="部门名称" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="deptTypeKey" label="部门类型" header-align="center" align="center" :formatter = "stateFormat" width="120"></el-table-column>
<el-table-column prop="monthYear" label="年月" header-align="center" align="center" width="180"></el-table-column>
<el-table-column prop="publicityFoundation" label="宣传基础分数" header-align="center" align="center" width="120"></el-table-column>
<el-table-column prop="innovationBreakthrough" label="创新突破分数" header-align="center" align="center" width="120"></el-table-column>
<el-table-column prop="publicOpinionResponse" label="舆情应对分数" header-align="center" align="center" width="120"></el-table-column>
<el-table-column prop="parentDeptNames" label="上级部门" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="allDeptNames" label="所有部门" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('kpi:kpipublicopinion:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './kpipublicopinion-add-or-update'
import Cookies from 'js-cookie'
import qs from 'qs'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/kpipublicopinion/page',
getDataListIsPage: true,
deleteURL: '/kpi/kpipublicopinion',
deleteIsBatch: true,
exportTemplateURL: '/kpi/kpipublicopinion/exportTemplate'
},
dataForm: {
id: '',
deptTypeKey: '',
monthYear: '',
deptId: ''
},
//
deptIdList: [],
options: [],
paramNameArr: []
}
},
components: {
AddOrUpdate
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else if (val.length > 0) {
this.dataForm.deptId = this.deptIdList[val.length - 1]
}
}
},
created: function () {
this.getOptions()
this.getParamListInfo('dept_type')
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/kpi/kpipublicopinion/importManualScoreExcel?token=${Cookies.get('token')}`
},
methods: {
stateFormat (row, column) {
for (var i = 0; i < this.paramNameArr.length; i++) {
if (row.deptTypeKey === this.paramNameArr[i].dictValue) {
return this.paramNameArr[i].dictName
}
}
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
// code
getParamListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'dept_type') {
this.paramNameArr = res.data
}
}).catch(() => {})
},
exportTemplate () {
let remindInfo = ''
let monthYear = this.dataForm.monthYear
let deptTypeKey = this.dataForm.deptTypeKey
let deptId = this.dataForm.deptId
if (!deptId) {
remindInfo += '部门、'
}
if (!monthYear) {
remindInfo += '考核周期起始月、'
}
if (!deptTypeKey) {
remindInfo += '部门类型、'
}
if (remindInfo.length > 0) {
remindInfo = remindInfo.substring(0, remindInfo.length - 1)
return this.$message.error(remindInfo + '不能为空!')
}
let params = qs.stringify({
'token': Cookies.get('token'),
'monthYear': monthYear,
'deptTypeKey': deptTypeKey,
'deptId': deptId
})
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportTemplateURL}?${params}`
},
errorExceed (file, fileList) {
this.$message.error('上传失败请重试')
},
uploadSuccess (response, file, fileList) {
this.dataListLoading = false
this.$refs.upload.clearFiles()
if (response.code !== 0 || (response.data !== null && response.data.length > 0)) {
this.errordataList = response.data
if (this.errordataList != null && this.errordataList.length > 0) {
this.faultDataVisible = true
} else {
this.$message.error(response.msg)
}
return
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.deptIdList = ''
this.dataForm.deptId = ''
this.getDataList()
}
})
}
}
}
</script>

258
src/views/modules/kpi/kpitypicalculture-add-or-update.vue

@ -0,0 +1,258 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false" customClass="customWidth">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="部门名称" prop="deptId">
<el-cascader
ref="name"
v-model="dataForm.joinDeptIdsArr"
:options="options"
:props="{ multiple: false, emitPath: false, checkStrictly: true }"
@visible-change="changeHandle"
style="width:90%;"
:disabled="dataForm.id?true:false"
>
</el-cascader>
</el-form-item>
<el-form-item label="考核年" prop="year">
<el-date-picker v-model="dataForm.year" :disabled="dataForm.id?true:false"
type="year" clearable placeholder="选择年"
value-format="yyyy" format="yyyy" style="width:40%;">
</el-date-picker>
</el-form-item>
<el-form-item label="加分类别" prop="bonusCategory">
<el-select v-model="dataForm.bonusCategory" placeholder="加分类别" :disabled="dataForm.id?true:false" style="width:40%;" @change="selectModel($event)">
<el-option v-for="item in bonusCategoryArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" >
</el-option>
</el-select>
</el-form-item>
<el-form-item label="加分级别" prop="bonusLevel" v-if="isShowBonusLevel">
<el-select v-model="dataForm.bonusLevel" placeholder="加分级别" :disabled="dataForm.id?true:false" style="width:40%;">
<el-option v-for="item in bonusLevelArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" >
</el-option>
</el-select>
</el-form-item>
<el-form-item label="加分分值" prop="bonus">
<el-input-number v-model="dataForm.bonus" :min="1" :max="5" label="加分分值" :precision="1" style="width:40%;"></el-input-number>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
deptId: '',
deptName: '',
deptTypeKey: '',
year: '',
bonusCategory: '',
bonus: '1',
bonusLevel: '',
parentDeptIds: '',
parentDeptNames: '',
allDeptIds: '',
allDeptNames: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
delFlag: '',
joinDeptIdsArr: ''
},
options: [],
isAble: false,
bonusCategoryArr: [],
bonusLevelArr: [],
isShowBonusLevel: true
}
},
computed: {
dataRule () {
return {
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptTypeKey: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
year: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
bonusCategory: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
bonus: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
bonusLevel: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
joinDeptIdsArr: [
{ required: false, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
created: function () {
this.getOptions()
this.getBonusCategoryListInfo('bonus_category')
this.getBonusLevelListInfo('bonus_level')
},
methods: {
init () {
this.visible = true
this.isAble = false
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
this.isShowBonusLevel = true
this.dataForm.bonusLevel = ''
}
})
},
//
selectModel (id) {
if (id === '1') {
this.isShowBonusLevel = false
this.dataForm.bonusLevel = ''
} else {
this.isShowBonusLevel = true
}
},
// code
getBonusCategoryListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'bonus_category') {
this.bonusCategoryArr = res.data
}
}).catch(() => {})
},
// code
getBonusLevelListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'bonus_level') {
this.bonusLevelArr = res.data
}
}).catch(() => {})
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
changeHandle (value, selectedData) {
let parentDeptIds = ''
let parentDeptNames = ''
let allDeptIds = ''
let allDeptNames = ''
let deptId = ''
let deptName = ''
if (this.$refs['name'].getCheckedNodes() !== null && this.$refs['name'].getCheckedNodes().length > 0) {
var path = this.$refs['name'].getCheckedNodes()[0].path
var pathLabels = this.$refs['name'].getCheckedNodes()[0].pathLabels
for (var i = 0; i < path.length; i++) {
if (i < path.length - 1) {
parentDeptIds += path[i] + ','
} else {
deptId = path[i]
}
allDeptIds += path[i] + ','
}
for (var j = 0; j < pathLabels.length; j++) {
if (j < pathLabels.length - 1) {
parentDeptNames += pathLabels[j] + '-'
} else {
deptName = pathLabels[j]
}
allDeptNames += pathLabels[j] + '-'
}
}
this.dataForm.parentDeptIds = parentDeptIds.length > 0 ? parentDeptIds.substring(0, parentDeptIds.length - 1) : parentDeptIds
this.dataForm.parentDeptNames = parentDeptNames.length > 0 ? parentDeptNames.substring(0, parentDeptNames.length - 1) : parentDeptNames
this.dataForm.allDeptIds = allDeptIds.length > 0 ? allDeptIds.substring(0, allDeptIds.length - 1) : allDeptIds
this.dataForm.allDeptNames = allDeptNames.length > 0 ? allDeptNames.substring(0, allDeptNames.length - 1) : allDeptNames
this.dataForm.deptId = deptId
this.dataForm.deptName = deptName
},
//
getInfo () {
this.$http.get(`/kpi/kpitypicalculture/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
this.dataForm.joinDeptIdsArr = this.dataForm.deptId
if (this.dataForm.bonusCategory === '1') {
this.isShowBonusLevel = false
this.dataForm.bonusLevel = ''
} else {
this.isShowBonusLevel = true
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/kpi/kpitypicalculture/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.dataForm.joinDeptIdsArr = ''
this.dataForm.deptId = ''
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style lang="scss">
.customWidth {
width:35%
}
</style>

202
src/views/modules/kpi/kpitypicalculture.vue

@ -0,0 +1,202 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpitypicalculture}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<div>
<el-form-item label="部门名称" label-width="80px">
<el-cascader
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
filterable
clearable
style="width:250px;"
></el-cascader>
</el-form-item>
<el-form-item label="考核年月" label-width="90px">
<el-date-picker v-model="dataForm.year"
type="year" clearable placeholder="选择年"
value-format="yyyy" format="yyyy"
style="width:250px;">
</el-date-picker>
</el-form-item>
<el-form-item label="部门类型" prop="deptTypeKey" label-width="90px">
<el-select v-model="dataForm.deptTypeKey" placeholder="部门类型" clearable style="width:250px;">
<el-option v-for="item in paramNameArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" ></el-option>
</el-select>
</el-form-item>
</div>
<el-form-item label="加分类别" prop="bonusCategory" label-width="80px">
<el-select v-model="dataForm.bonusCategory" placeholder="加分类别" clearable style="width:250px;">
<el-option v-for="item in bonusCategoryArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" >
</el-option>
</el-select>
</el-form-item>
<el-form-item label="加分级别" prop="bonusLevel" label-width="90px">
<el-select v-model="dataForm.bonusLevel" placeholder="加分级别" clearable style="width:250px;">
<el-option v-for="item in bonusLevelArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" >
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpitypicalculture:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="deptName" label="部门名称" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="deptTypeKey" label="部门类别" header-align="center" align="center" :formatter = "deptTypeKeyFormat" width="120"></el-table-column>
<el-table-column prop="year" label="年份" header-align="center" align="center" width="180"></el-table-column>
<el-table-column prop="bonusCategory" label="加分类别" header-align="center" align="center" :formatter = "bonusCategoryFormat" width="120"></el-table-column>
<el-table-column prop="bonus" label="加分分值" header-align="center" align="center" width="120"></el-table-column>
<el-table-column prop="bonusLevel" label="加分级别" header-align="center" align="center" :formatter = "bonusLevelFormat" width="120"></el-table-column>
<el-table-column prop="parentDeptNames" label="上级部门" header-align="center" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="allDeptNames" label="所有部门" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('kpi:kpitypicalculture:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './kpitypicalculture-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/kpitypicalculture/page',
getDataListIsPage: true,
deleteURL: '/kpi/kpitypicalculture',
deleteIsBatch: true
},
dataForm: {
id: '',
deptTypeKey: '',
year: '',
deptId: '',
bonusCategory: '',
bonusLevel: ''
},
//
deptIdList: [],
options: [],
paramNameArr: [],
bonusCategoryArr: [],
bonusLevelArr: []
}
},
components: {
AddOrUpdate
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else if (val.length > 0) {
this.dataForm.deptId = this.deptIdList[val.length - 1]
}
}
},
created: function () {
this.getOptions()
this.getParamListInfo('dept_type')
this.getBonusCategoryListInfo('bonus_category')
this.getBonusLevelListInfo('bonus_level')
},
methods: {
deptTypeKeyFormat (row, column) {
for (var i = 0; i < this.paramNameArr.length; i++) {
if (row.deptTypeKey === this.paramNameArr[i].dictValue) {
return this.paramNameArr[i].dictName
}
}
},
bonusCategoryFormat (row, column) {
for (var i = 0; i < this.bonusCategoryArr.length; i++) {
if (row.bonusCategory === this.bonusCategoryArr[i].dictValue) {
return this.bonusCategoryArr[i].dictName
}
}
},
bonusLevelFormat (row, column) {
for (var i = 0; i < this.bonusLevelArr.length; i++) {
if (row.bonusLevel === this.bonusLevelArr[i].dictValue) {
return this.bonusLevelArr[i].dictName
}
}
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getAllDeptPartyByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
// code
getParamListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'dept_type') {
this.paramNameArr = res.data
}
}).catch(() => {})
},
// code
getBonusCategoryListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'bonus_category') {
this.bonusCategoryArr = res.data
}
}).catch(() => {})
},
// code
getBonusLevelListInfo (dictType) {
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (dictType === 'bonus_level') {
this.bonusLevelArr = res.data
}
}).catch(() => {})
}
}
}
</script>

2
src/views/modules/kpi/manualScore-add-or-update.vue

@ -1,6 +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" :label-width="$i18n.locale === 'en-US' ? '120px' : '120px'">
<el-form-item label="考核规则名称" prop="ruleId">
<el-select clearable v-model="dataForm.ruleId" :disabled="dataForm.id?true:false">
<el-option

30
src/views/modules/kpi/manualScore.vue

@ -1,8 +1,8 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpimanualscore}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属机构">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item label="所属机构" label-width="110px">
<el-cascader
v-model="deptIdList"
:options="options"
@ -10,7 +10,7 @@
clearable
></el-cascader>
</el-form-item>
<el-form-item label="考核规则名称">
<el-form-item label="考核规则名称" label-width="110px">
<el-select clearable v-model="dataForm.ruleId">
<el-option
v-for="item in kpiManualRuleList"
@ -20,14 +20,15 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="考核周期起始月">
<br>
<el-form-item label="考核周期起始月" label-width="110px">
<el-date-picker v-model="dataForm.scoreStartDate"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpimanualscore:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
@ -36,7 +37,7 @@
<el-button v-if="$hasPermission('kpi:kpimanualscore:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpimanualscore:export')" type="info" @click="exportTemplate()">导出录入模板</el-button>
<el-button v-if="$hasPermission('kpi:kpimanualscore:export')" type="success" @click="exportTemplate()">导出录入模板</el-button>
</el-form-item>
<el-form-item>
<el-upload class="upload-demo"
@ -52,14 +53,17 @@
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column type="index"
width="50"
label="序号" align="center"></el-table-column>
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="allDeptNames" label="部门名称" header-align="center" align="center" min-width="300" show-overflow-tooltip></el-table-column>
<el-table-column prop="ruleName" width="110" label="考核规则名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="kpiCycle" label="考核周期" header-align="center" align="center" width="100" :formatter="showKpiCycleFormatter"></el-table-column>
<el-table-column prop="scoreStartDate" width="120" label="考核起始日" header-align="center" align="center"></el-table-column>
<el-table-column prop="scoreEndDate" width="120" label="考核终止日" header-align="center" align="center"></el-table-column>
<el-table-column prop="score" label="得分" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="createdTime" width="180" label="打分时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="allDeptNames" label="部门名称" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="ruleName" label="考核规则名称" header-align="center" align="center" width="120"></el-table-column>
<el-table-column prop="kpiCycle" label="考核周期" header-align="center" align="center" width="120" :formatter="showKpiCycleFormatter"></el-table-column>
<el-table-column prop="scoreStartDate" label="考核起始日" header-align="center" align="center" width="180"></el-table-column>
<el-table-column prop="scoreEndDate" label="考核终止日" header-align="center" align="center" width="180"></el-table-column>
<el-table-column prop="score" label="得分" header-align="center" align="center" width="100"></el-table-column>
<el-table-column prop="createdTime" label="打分时间" header-align="center" align="center" width="180"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button v-if="$hasPermission('kpi:kpimanualscore:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>

2
src/views/modules/kpi/manualScoreRule-add-or-update.vue

@ -1,6 +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' : '110px'">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '110px'">
<el-form-item label="考核名称" prop="scoreName">
<el-input v-model="dataForm.scoreName" placeholder="打分项名称"></el-input>
</el-form-item>

26
src/views/modules/kpi/manualScoreRule.vue

@ -1,12 +1,12 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpimanualscorerule}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item label="考核名称">
<el-input v-model="dataForm.scoreName" placeholder="考核名称" clearable></el-input>
<el-input v-model="dataForm.scoreName" placeholder="考核名称" clearable @keyup.native="btKeyUpScoreName"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpimanualscorerule:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
@ -17,15 +17,19 @@
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column type="index" width="50" label="序号"></el-table-column>
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="id" label="主键" header-align="center" align="center" v-if="false"></el-table-column>
<el-table-column prop="scoreName" label="考核名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="deptTypeKey" label="考核部门类别" header-align="center" align="center" :formatter="showDeptTypeKeyFormatter"></el-table-column>
<el-table-column prop="scoreCycle" label="考核周期" header-align="center" align="center" :formatter="showScoreCycleFormatter"></el-table-column>
<el-table-column prop="fullMarks" label="满分" header-align="center" align="center"></el-table-column>
<el-table-column prop="scoreName" label="考核名称" header-align="center" align="center" min-width="200" show-overflow-tooltip></el-table-column>
<el-table-column prop="deptTypeKey" label="考核部门类别" header-align="center" align="center" :formatter="showDeptTypeKeyFormatter" width="130"></el-table-column>
<el-table-column prop="scoreCycle" label="考核周期" header-align="center" align="center" :formatter="showScoreCycleFormatter" width="100"></el-table-column>
<el-table-column prop="fullMarks" label="满分" header-align="center" align="center" width="100"></el-table-column>
<el-table-column prop="revision" label="乐观锁" header-align="center" align="center" v-if="false"></el-table-column>
<el-table-column prop="createdBy" label="创建人" header-align="center" align="center" v-if="false"></el-table-column>
<el-table-column prop="createdTime" label="创建时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="createdTime" label="创建时间" header-align="center" align="center" width="180"></el-table-column>
<el-table-column prop="updatedBy" label="更新人" header-align="center" align="center" v-if="false"></el-table-column>
<el-table-column prop="updatedTime" label="更新时间" header-align="center" align="center" v-if="false"></el-table-column>
<el-table-column prop="delFlag" label="删除标记" header-align="center" align="center" v-if="false"></el-table-column>
@ -119,6 +123,10 @@ export default {
}
}
return ''
},
btKeyUpScoreName(e){
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '')
this.dataForm.scoreName= e.target.value
}
}

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

@ -1,6 +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" :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
@ -187,4 +187,4 @@ export default {
.el-input--suffix .el-input__inner {
padding-right: 50px
}
</style>
</style>

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

@ -1,9 +1,9 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-__manualscore}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item>
<el-form-item label="所属机构">
<el-form-item label="所属机构" label-width="120px">
<el-cascader
v-model="deptIdList"
:options="options"
@ -13,13 +13,14 @@
></el-cascader>
</el-form-item>
</el-form-item>
<el-form-item label="考核周期起始月">
<el-form-item label="考核周期起始月" label-width="120px">
<el-date-picker v-model="dataForm.month"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM">
</el-date-picker>
</el-form-item>
<el-form-item label="被打分机构类型">
<br>
<el-form-item label="被打分机构类型" label-width="120px">
<el-select v-model="dataForm.deptType">
<el-option
v-for="item in kpiManualRuleList"
@ -30,13 +31,13 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('manualscore-zlph:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="info" @click="exportTemplate()">导出录入模板</el-button>
<el-button type="success" @click="exportTemplate()">导出录入模板</el-button>
</el-form-item>
<el-form-item>
<el-upload class="upload-demo"
@ -53,12 +54,15 @@
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column type="index"
width="50"
label="序号" align="center"></el-table-column>
<el-table-column prop="deptName" label="被打分部门" header-align="center" align="center"></el-table-column>
<el-table-column prop="month" :formatter="showMonthYMD" label="考核起始日" header-align="center" align="center"></el-table-column>
<el-table-column prop="month" :formatter="showMonthYMD" label="考核起始日" header-align="center" align="center" width="180"></el-table-column>
<!-- <el-table-column prop="year" label="考核年度" header-align="center" align="center"></el-table-column> -->
<el-table-column prop="scoreType" label="考核打分类型" header-align="center" align="center"></el-table-column>
<el-table-column prop="scoreType" label="考核打分类型" header-align="center" align="center" width="120"></el-table-column>
<el-table-column prop="creatorDeptName" label="打分的部门名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="score" label="得分" header-align="center" align="center"></el-table-column>
<el-table-column prop="score" label="得分" header-align="center" align="center" width="120"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button></template>

23
src/views/modules/kpi/resultGrid.vue

@ -1,7 +1,7 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpiresultgrid}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item label="所属机构">
<el-cascader
v-model="deptIdList"
@ -17,21 +17,24 @@
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:gridResult:export')" type="primary" @click="tableExport()">{{ $t('export') }}</el-button>
<el-button v-if="$hasPermission('kpi:gridResult:export')" type="success" @click="tableExport()">{{ $t('export') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column prop="allDeptNames" label="所属机构" header-align="center" align="center" min-width="300" show-overflow-tooltip></el-table-column>
<el-table-column prop="leaderName" label="网格长" header-align="center" align="center"></el-table-column>
<el-table-column prop="startDate" width="120" label="考核周期开始日" header-align="center" align="center" :formatter="startDateFormat"></el-table-column>
<el-table-column prop="endDate" width="120" label="考核周期结束日" header-align="center" align="center" :formatter="endDateFormat"></el-table-column>
<el-table-column type="index"
width="50"
label="序号" align="center"></el-table-column>
<el-table-column prop="allDeptNames" label="所属机构" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="leaderName" label="网格长" header-align="center" align="center" width="130"></el-table-column>
<el-table-column prop="startDate" label="考核周期开始日" header-align="center" align="center" :formatter="startDateFormat" width="180"></el-table-column>
<el-table-column prop="endDate" label="考核周期结束日" header-align="center" align="center" :formatter="endDateFormat" width="180"></el-table-column>
<!-- 手动打分 -->
<el-table-column prop="manualScore" width="165" label="基层党建工作职责得分" header-align="center" align="center"></el-table-column>
<el-table-column prop="workScore" label="平时工作得分" header-align="center" align="center" width="160"></el-table-column>
<el-table-column prop="finalScore" label="总分" header-align="center" align="center" width="160"></el-table-column>
<el-table-column prop="manualScore" label="基层党建工作职责得分" header-align="center" align="center" width="170"></el-table-column>
<el-table-column prop="workScore" label="平时工作得分" header-align="center" align="center" width="150"></el-table-column>
<el-table-column prop="finalScore" label="总分" header-align="center" align="center" width="120"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="detailQuery(scope.row.id)">详情</el-button>

21
src/views/modules/kpi/resultSuperior.vue

@ -1,7 +1,7 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-kpi__kpiresultsuperior}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item label="所属机构">
<el-cascader
v-model="deptIdList"
@ -17,19 +17,22 @@
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:gridResult:export')" type="primary" @click="tableExport()">{{ $t('export') }}</el-button>
<el-button v-if="$hasPermission('kpi:gridResult:export')" type="success" @click="tableExport()">{{ $t('export') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column prop="allDeptNames" label="所属机构" header-align="center" align="center" min-width="300" show-overflow-tooltip></el-table-column>
<el-table-column prop="finalScore" label="最终得分" header-align="center" align="center"></el-table-column>
<el-table-column prop="startDate" width="120" label="考核周期开始日" header-align="center" :formatter="startDateFormat" align="center"></el-table-column>
<el-table-column prop="endDate" width="120" label="考核周期结束日" header-align="center" :formatter="endDateFormat" align="center"></el-table-column>
<el-table-column prop="kpiCycle" label="考核周期" header-align="center" :formatter="kpiCycleFormat" align="center"></el-table-column>
<el-table-column prop="deptTypeKey" label="机构类别" header-align="center" :formatter="deptTypeKeyFormat" align="center"></el-table-column>
<el-table-column type="index"
width="50"
label="序号" align="center"></el-table-column>
<el-table-column prop="allDeptNames" label="所属机构" header-align="center" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="finalScore" label="最终得分" header-align="center" align="center" width="120"></el-table-column>
<el-table-column prop="startDate" label="考核周期开始日" header-align="center" :formatter="startDateFormat" align="center" width="180"></el-table-column>
<el-table-column prop="endDate" label="考核周期结束日" header-align="center" :formatter="endDateFormat" align="center" width="180"></el-table-column>
<el-table-column prop="kpiCycle" label="考核周期" header-align="center" :formatter="kpiCycleFormat" align="center" width="120"></el-table-column>
<el-table-column prop="deptTypeKey" label="机构类别" header-align="center" :formatter="deptTypeKeyFormat" align="center" width="120"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="detailQuery(scope.row.id)">详情</el-button>

1
src/views/modules/kpi/rule-add-or-update.vue

@ -6,7 +6,6 @@
<el-form :model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '120px'">
<el-form-item label="考核规则名称"
prop="ruleName">

1
src/views/modules/kpi/rule-manualScore-add-or-update.vue

@ -6,7 +6,6 @@
<el-form :model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '120px'">
<el-form-item label="考核规则名称"
prop="ruleName">

28
src/views/modules/kpi/rule.vue

@ -4,14 +4,14 @@
<div class="mod-kpi__kpirule}">
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()">
@keyup.enter.native="getDataListSearch()">
<el-form-item label="考核规则名称">
<el-input v-model="dataForm.ruleName"
placeholder="考核规则名称"
clearable></el-input>
clearable @keyup.native="btKeyUpRuleName"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('kpi:kpirule:save')"
@ -40,15 +40,18 @@
width="50"></el-table-column>
<el-table-column type="index"
width="50"
align="center"
label="序号"></el-table-column>
<el-table-column prop="ruleName"
label="规则名称"
header-align="center"
align="center"></el-table-column>
align="center"
min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="ruleName"
label="考核类别"
header-align="center"
align="center"></el-table-column>
align="center"
min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="ruleMode"
width="100"
label="生成方式"
@ -58,9 +61,10 @@
<el-table-column prop="referenceName"
label="引用"
header-align="center"
align="center"></el-table-column>
align="center"
min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="kpiCycle"
width="50"
width="100"
label="考核周期"
header-align="center"
align="center"
@ -69,11 +73,13 @@
label="考核部门类别"
header-align="center"
align="center"
:formatter="showDeptTypeKeyFormatter"></el-table-column>
:formatter="showDeptTypeKeyFormatter"
min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="createdTime"
label="创建时间"
header-align="center"
align="center"></el-table-column>
align="center"
width="180"></el-table-column>
<el-table-column :label="$t('handle')"
fixed="right"
header-align="center"
@ -227,6 +233,10 @@ export default {
// }
// }
return ''
},
btKeyUpRuleName(e){
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '')
this.dataForm.ruleName= e.target.value
}
}
}

12
src/views/modules/kpi/streetpersiongoalmonth.vue

@ -1,19 +1,19 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-__streetpersiongoalmonth}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="streetGoalScore" border @selection-change="dataListSelectionChangeHandle" @cell-click="clickCell" style="width: 100%;">
<el-table-column prop='monthYear' label="日期" width="100" header-align="center"></el-table-column>
<el-table-column prop='monthYear' label="日期" width="120" header-align="center" align="center"></el-table-column>
<el-table-column v-for="(header, index) in headerContent" :key="index" :label="header.street" header-align="center">
<el-table-column :prop="header.streetId+'-ResidentGoalNum'" label="群众目标数" header-align="center"></el-table-column>
<el-table-column :prop="header.streetId+'-PartyGoalNum'" label="党员目标数" header-align="center"></el-table-column>
<el-table-column :prop="header.streetId+'-CompanyGoalNum'" label="企业目标数" header-align="center"></el-table-column>
<el-table-column :prop="header.streetId+'-ResidentGoalNum'" label="群众目标数" header-align="center" align="center" width="100"></el-table-column>
<el-table-column :prop="header.streetId+'-PartyGoalNum'" label="党员目标数" header-align="center" align="center" width="100"></el-table-column>
<el-table-column :prop="header.streetId+'-CompanyGoalNum'" label="企业目标数" header-align="center" align="center" width="100"></el-table-column>
</el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="100">
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.monthYear)" :disabled="scope.row.isDisabled=='0'">批量设置</el-button>
</template>

14
src/views/modules/kpi/streetpersonbase-add-or-update.vue

@ -1,6 +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' : '80px'">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="所属机构" prop="streetId" v-if="!dataForm.id">
<el-cascader
v-model="deptIdList"
@ -10,18 +10,18 @@
></el-cascader>
</el-form-item>
<el-form-item label="群众底数" prop="residentBaseNum">
<el-input-number v-model="dataForm.residentBaseNum" :min="0" label="群众底数"></el-input-number>
<el-input-number v-model="dataForm.residentBaseNum" :min="0" :max="100000000" label="群众底数"></el-input-number>
</el-form-item>
<el-form-item label="党员底数" prop="partyBaseNum">
<el-input-number v-model="dataForm.partyBaseNum" :min="0" label="群众底数"></el-input-number>
<el-input-number v-model="dataForm.partyBaseNum" :min="0" :max="100000000" label="群众底数"></el-input-number>
</el-form-item>
<el-form-item label="企业底数" prop="companyBaseNum">
<el-input-number v-model="dataForm.companyBaseNum" :min="0" label="群众底数"></el-input-number>
<el-input-number v-model="dataForm.companyBaseNum" :min="0" :max="100000000" label="群众底数"></el-input-number>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()" :disabled="isAble">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
@ -41,6 +41,7 @@ export default {
partyBaseNum: '',
companyBaseNum: ''
},
isAble:false,
//
deptIdOptions: [],
deptIdList: []
@ -90,6 +91,7 @@ export default {
methods: {
init () {
this.visible = true
this.isAble = false
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
@ -116,8 +118,10 @@ export default {
if (!valid) {
return false
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/kpi/streetpersonbase/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isAble = false
return this.$message.error(res.msg)
}
this.$message({

132
src/views/modules/kpi/streetpersonbase.vue

@ -4,10 +4,10 @@
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
<el-form-item label="街道">
<el-cascader
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
clearable
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
clearable
></el-cascader>
</el-form-item>
<el-form-item>
@ -19,9 +19,9 @@
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="street" label="街道" header-align="center" align="center"></el-table-column>
<el-table-column prop="residentBaseNum" label="群众底数" header-align="center" align="center"></el-table-column>
@ -35,13 +35,13 @@
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
@ -50,60 +50,60 @@
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './streetpersonbase-add-or-update'
import Cookies from 'js-cookie'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/streetpersonbase/page',
getDataListIsPage: true,
deleteURL: '/kpi/streetpersonbase',
deleteIsBatch: true
},
dataForm: {
id: '',
streetId: ''
},
//
deptIdList: [],
options: [],
streetList: []
}
},
components: {
AddOrUpdate
},
created () {
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/kpi/manualScore/importManualScoreExcel?token=${Cookies.get('token')}`
//
this.$http
.get(`/sys/user/deptOptions/getStreetByLoginUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.streetId = ''
}
if (val.length === 1) {
this.dataForm.streetId = this.deptIdList[0]
}
if (val.length === 2) {
this.dataForm.streetId = this.deptIdList[0]
}
if (val.length === 3) {
this.dataForm.streetId = this.deptIdList[0]
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './streetpersonbase-add-or-update'
import Cookies from 'js-cookie'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/streetpersonbase/page',
getDataListIsPage: true,
deleteURL: '/kpi/streetpersonbase',
deleteIsBatch: true
},
dataForm: {
id: '',
streetId: ''
},
//
deptIdList: [],
options: [],
streetList: []
}
},
components: {
AddOrUpdate
},
created () {
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/kpi/manualScore/importManualScoreExcel?token=${Cookies.get('token')}`
//
this.$http
.get(`/sys/user/deptOptions/getStreetByLoginUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.streetId = ''
}
if (val.length === 1) {
this.dataForm.streetId = this.deptIdList[0]
}
if (val.length === 2) {
this.dataForm.streetId = this.deptIdList[0]
}
if (val.length === 3) {
this.dataForm.streetId = this.deptIdList[0]
}
}
}
}
</script>

2
src/views/modules/kpi/timeLimitIssue-add-or-update.vue

@ -1,6 +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' : '125px'">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '125px'">
<el-form-item label="有效响应时间(h)" prop="validRespondTime">
<el-input-number v-model="dataForm.validRespondTime" :min="1"></el-input-number>
</el-form-item>

36
src/views/modules/kpi/timeLimitIssue.vue

@ -104,25 +104,25 @@
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './timeLimitIssue-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/timeLimitIssue/page',
getDataListIsPage: true,
deleteURL: '/kpi/timeLimitIssue',
deleteIsBatch: true
},
dataForm: {
id: ''
}
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './timeLimitIssue-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/timeLimitIssue/page',
getDataListIsPage: true,
deleteURL: '/kpi/timeLimitIssue',
deleteIsBatch: true
},
dataForm: {
id: ''
}
},
components: {
AddOrUpdate
}
},
components: {
AddOrUpdate
}
}
</script>

1
src/views/modules/kpi/timeLimitItem-add-or-update.vue

@ -6,7 +6,6 @@
<el-form :model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '125px'">
<el-form-item label="有效响应时间(h)"
prop="validRespondTime">

102
src/views/modules/kpi/timeLimitItem.vue

@ -20,9 +20,9 @@
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column label="序号" header-align="center" align="center" width="50px">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="allCategoryNames" label="所属类别" header-align="center" align="center" min-width="250" show-overflow-tooltip></el-table-column>
<el-table-column prop="validRespondTime" label="有效响应时间(h)" header-align="center" align="center" width="180"></el-table-column>
@ -36,13 +36,13 @@
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
@ -51,49 +51,49 @@
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './timeLimitItem-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/timeLimitItem/page',
getDataListIsPage: true,
deleteURL: '/kpi/timeLimitItem',
deleteIsBatch: true
},
dataForm: {
categoryId: ''
},
categoryIds: [],
categoryOptions: []
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './timeLimitItem-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/timeLimitItem/page',
getDataListIsPage: true,
deleteURL: '/kpi/timeLimitItem',
deleteIsBatch: true
},
dataForm: {
categoryId: ''
},
categoryIds: [],
categoryOptions: []
}
},
components: {
AddOrUpdate
},
created () {
this.getCategoryList()
},
watch: {
'categoryIds': function (val) {
if (val.length === 0) {
this.dataForm.categoryId = ''
} else if (val.length > 0) {
this.dataForm.categoryId = this.categoryIds[this.categoryIds.length - 1]
}
},
components: {
AddOrUpdate
},
created () {
this.getCategoryList()
},
watch: {
'categoryIds': function (val) {
if (val.length === 0) {
this.dataForm.categoryId = ''
} else if (val.length > 0) {
this.dataForm.categoryId = this.categoryIds[this.categoryIds.length - 1]
}
},
methods: {
getCategoryList () {
return this.$http.get('/events/category/getCategoryTree').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
}
},
methods: {
getCategoryList () {
return this.$http.get('/events/category/getCategoryTree').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.categoryOptions = res.data.options
}).catch(() => { })
}
this.categoryOptions = res.data.options
}).catch(() => { })
}
}
}
</script>

Loading…
Cancel
Save