Browse Source

同步最新代码

feature/yujt_analysis_pc v1.0.0.200507.Standard
yujt 5 years ago
parent
commit
47f805484d
  1. 20
      src/views/modules/custom/evaluateinfo.vue
  2. 190
      src/views/modules/kpi/manualscore-add-or-update-zlph.vue
  3. 211
      src/views/modules/kpi/manualscore-zlph.vue
  4. 103
      src/views/modules/kpi/streetpersiongoalmonth-add-or-update.vue
  5. 195
      src/views/modules/kpi/streetpersiongoalmonth.vue
  6. 137
      src/views/modules/kpi/streetpersonbase-add-or-update.vue
  7. 104
      src/views/modules/kpi/streetpersonbase.vue
  8. 0
      src/views/modules/leader/epdc.gitkeep
  9. 295
      src/views/modules/leader/partycase-add-or-update.vue
  10. 2
      src/views/modules/organize/deptofficer-add-or-update.vue
  11. 2
      src/views/modules/organize/deptofficer-add.vue
  12. 8
      src/views/modules/workRecord/dailyrecordinfo.vue
  13. 83
      src/views/modules/workRecord/dailyrecordinfoDetail.vue
  14. 29
      src/views/modules/workRecord/monthexcellentcase.vue
  15. 28
      src/views/modules/workRecord/monthexcellentcaseDetail.vue
  16. 31
      src/views/modules/workRecord/monthexcellentgrid.vue
  17. 78
      src/views/modules/workRecord/monthexcellentgridDetail.vue
  18. 172
      src/views/modules/workRecord/monthexcellentperson.vue
  19. 328
      src/views/modules/workRecord/monthexcellentpersonDetail.vue
  20. 29
      src/views/modules/workRecord/monthexcellentpersonroute.vue
  21. 143
      src/views/modules/workRecord/monthgridsort.vue
  22. 219
      src/views/modules/workRecord/monthgridsortDetail.vue
  23. 29
      src/views/modules/workRecord/monthgridsortroute.vue
  24. 41
      src/views/modules/workRecord/monthrecordinfo.vue
  25. 80
      src/views/modules/workRecord/monthrecordinfoDetail.vue
  26. 6
      src/views/modules/workRecord/monthrecordinforoute.vue
  27. 2
      src/views/modules/workRecord/weekrecordinfo.vue
  28. 19
      src/views/modules/workRecord/weekrecordinfoDetail.vue

20
src/views/modules/custom/evaluateinfo.vue

@ -59,7 +59,7 @@
align="center"
show-overflow-tooltip>
<template slot-scope="scope">
<div v-for="(item) in scope.row.optionsList" :key="item">
<div v-for="(item, index) in scope.row.optionsList" :key="index">
<div v-if="item.optionId == option.optionId">
<div v-if="item.selectFlag == 1 && item.roleCode == 1">
<img src="@/assets/img/like.png">
@ -72,9 +72,11 @@
</div>
</template>
</el-table-column>
<el-table-column prop="anonymousFlag" label="匿名标识" :formatter="formatAnonymousFlag" header-align="center" align="center"></el-table-column>
<el-table-column prop="content" label="评价内容" :show-overflow-tooltip="true" min-width="150" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="60">
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="120">
<template slot-scope="scope">
<el-button v-if="$hasPermission('custom:evaluateinfo:delete')" type="text" size="small" @click="open(scope.row.content)">{{ '查看内容' }}</el-button>
<el-button v-if="$hasPermission('custom:evaluateinfo:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
@ -143,6 +145,12 @@ export default {
this.getDataList()
},
methods: {
open (content) {
this.$alert(content, '内容', {
confirmButtonText: '确定',
callback: action => {}
})
},
getOptionsList () {
this.$http.get(`/custom/evaluateoption/optionShowList`).then(({ data: res }) => {
if (res.code !== 0) {
@ -171,6 +179,14 @@ export default {
} else if (state === 2) {
return '吐槽'
}
},
formatAnonymousFlag: function (row) {
let state = row.anonymousFlag
if (state === '1') {
return '是'
} else if (state === '0') {
return '否'
}
}
}
}

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

@ -0,0 +1,190 @@
<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-item>
<el-form-item label="被打分部门" prop="deptId" v-if="!dataForm.id" style="margin-left: -120px; width: 400px;">
<el-cascader
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
filterable
clearable
></el-cascader>
</el-form-item>
</el-form-item>
<el-form-item label="考核起始日" prop="monthString" style="width: 200px">
<el-date-picker v-model="dataForm.monthString" :disabled="dataForm.id?true:false"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="考核年度" prop="year">
<el-input v-model="dataForm.year" placeholder="考核年度"></el-input>
</el-form-item> -->
<!-- <el-form-item label="考核打分类型 0-月,1-年" prop="scoreType">
<el-input v-model="dataForm.scoreType" placeholder="考核打分类型 0-月,1-年"></el-input>
</el-form-item> -->
<el-form-item label="得分" prop="manualScore" style="width: 400px">
<el-select v-model="dataForm.manualScore">
<el-option
v-for="item in manualScoreType"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</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>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
deptId: '',
deptName: '',
month: '',
monthString: '',
year: '',
scoreType: 0,
creatorDeptId: '',
creatorDeptName: '',
score: 0,
manualScore: '',
parentDeptIds: '',
parentDeptNames: '',
allDeptIds: '',
allDeptNames: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
delFlag: ''
},
//
deptIdList: [],
options: [],
manualScoreType: [
{
'id': '优',
'name': '优'
},
{
'id': '良',
'name': '良'
},
{
'id': '中',
'name': '中'
},
{
'id': '差',
'name': '差'
}
]
}
},
computed: {
dataRule () {
return {
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
monthString: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
manualScoreType: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
manualScore: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
created () {
//
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.dataForm.allDeptNames = ''
this.dataForm.deptId = ''
if (this.dataForm.id) {
this.getInfo()
}
this.deptIdList = []
})
},
//
getInfo () {
this.$http.get(`/kpi/manualscore-zlph/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/kpi/manualscore-zlph/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else if (val.length > 0) {
this.dataForm.deptId = this.deptIdList[val.length - 1]
}
}
}
}
</script>
<style type="text/css">
.el-input--suffix .el-input__inner {
padding-right: 50px
}
</style>

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

@ -0,0 +1,211 @@
<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-item>
<el-form-item label="所属机构">
<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.month"
type="month" clearable placeholder="选择月"
value-format="yyyy-MM" format="yyyy-MM">
</el-date-picker>
</el-form-item>
<el-form-item label="被打分机构类型">
<el-select v-model="dataForm.deptType">
<el-option
v-for="item in kpiManualRuleList"
:key="item.id"
:label="item.deptName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $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-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>
<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 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="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="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 :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>
</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 './manualscore-add-or-update-zlph'
import Cookies from 'js-cookie'
import qs from 'qs'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/kpi/manualscore-zlph/page',
getDataListIsPage: true,
deleteURL: '/kpi/manualscore-zlph',
deleteIsBatch: true,
exportTemplateURL: '/kpi/manualscore-zlph/exportTemplate'
},
dataForm: {
id: '',
deptType: 'street_party', //
month: '',
deptId: '',
scoreType: '0' // 0-1-
},
upLoadUrl: '',
//
deptIdList: [],
options: [],
kpiManualRuleList: [
{
'id': 'street_party',
'deptName': '街道'
},
{
'id': 'community_party',
'deptName': '社区'
},
{
'id': 'grid_party',
'deptName': '网格'
}
]
}
},
components: {
AddOrUpdate
},
created () {
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/kpi/manualscore-zlph/importManualScoreExcel?token=${Cookies.get('token')}`
//
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
methods: {
//
exportTemplate () {
let month = this.dataForm.month
let deptType = this.dataForm.deptType
let scoreType = this.dataForm.scoreType
let deptId = this.dataForm.deptId
let params = qs.stringify({
'token': Cookies.get('token'),
'month': month,
'deptType': deptType,
'scoreType': scoreType,
'deptId': deptId
})
// let paramsJson = {
// 'month': month, 'deptType': deptType, 'scoreType': scoreType
// }
if (!deptType) {
return this.$message.error('考核规则不能为空')
}
if (!month) {
return this.$message.error('考核周期起始月不能为空')
}
//
// this.$http.get(`/kpi/manualscore-zlph/checkExportTemplate`, { params: paramsJson }).then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg)
// } else {
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportTemplateURL}?${params}`
// }
// }).catch(() => { })
},
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.getDataList()
}
})
},
showMonthYMD (row, column) {
return row.month.substring(0, 10)
}
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else if (val.length > 0) {
this.dataForm.deptId = this.deptIdList[val.length - 1]
}
}
}
}
</script>

103
src/views/modules/kpi/streetpersiongoalmonth-add-or-update.vue

@ -0,0 +1,103 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false" width="30%" center>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '130px' : '130px'">
<el-form-item label="年月" prop="monthYear">
<el-date-picker v-model="dataForm.monthYear"
type="month" clearable placeholder="选择月" :disabled="dataForm.id?true:false"
value-format="yyyy-MM" format="yyyy-MM">
</el-date-picker>
</el-form-item>
<el-form-item label="群众目标比例 %" prop="residentGoalNum">
<el-input-number v-model="dataForm.residentGoalNum" :min="0" label="群众目标数"></el-input-number>
</el-form-item>
<el-form-item label="党员目标比例 %" prop="partyGoalNum">
<el-input-number v-model="dataForm.partyGoalNum" :min="0" label="党员目标数"></el-input-number>
</el-form-item>
<el-form-item label="企业目标比例 %" prop="companyGoalNum">
<el-input-number v-model="dataForm.companyGoalNum" :min="0" 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()" :loading="loadingbut">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
street: '',
streetId: '',
monthYear: '',
residentGoalNum: '',
partyGoalNum: '',
companyGoalNum: ''
},
loadingbut: false, //
loadingbuttext: '确定'
}
},
computed: {
dataRule () {
return {
monthYear: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
residentGoalNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
partyGoalNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
companyGoalNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
// this.dataForm.id
this.dataForm.monthYear = this.dataForm.id
})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.loadingbut = true
this.loadingbuttext = '审核中...'
this.$http[!this.dataForm.id ? 'post' : 'put']('/kpi/streetpersiongoalmonth/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.loadingbut = false
this.loadingbuttext = '确定'
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
this.loadingbut = false
this.loadingbuttext = '确定'
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

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

@ -0,0 +1,195 @@
<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-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 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>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.monthYear)" :disabled="scope.row.isDisabled=='0'">批量设置</el-button>
</template>
</el-table-column>
</el-table>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getStreetGoalScore"></add-or-update>
</div>
<div>
<el-dialog title="街道目标数设定" :visible.sync="dialogFormVisible" width="30%" center>
<el-form :model="dataForm">
<el-form-item label="目标比例" label-width="120px">
<el-input-number v-model="goalProportion" :min="0" v-on:change="watchGoalProportion(goalProportion)"></el-input-number>
<span style="margin-left: 10px;">%</span>
</el-form-item>
<el-form-item label="目标人数" label-width="120px">
<el-input-number v-model="goalNumber" :min="0" v-on:change="watchGoalNumbern(goalNumber)"></el-input-number>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="upCellGoalNumber"> </el-button>
</div>
</el-dialog>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './streetpersiongoalmonth-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getStreetGoalName: '/kpi/streetpersiongoalmonth/queryStreetGoalName',
getDataListURL: '/kpi/streetpersiongoalmonth/streetGoalScore',
getDataListIsPage: true,
deleteURL: '/kpi/streetpersiongoalmonth',
deleteIsBatch: true
},
dataForm: {
id: '',
streetId: '',
monthYear: ''
},
isAddOrUpdateHandle: true,
headerContent: [], //
streetGoalScore: [], //
dialogFormVisible: false, // dialog
goalProportion: '', //
goalNumber: '', //
personBasicNumber: '', // //
personBasicNumberKey: '' // key{//}
}
},
created () {
this.getStreetName()
this.getStreetGoalScore()
},
methods: {
// 1
watchGoalProportion (goalProportion) {
if (this.goalProportion === 0) {
this.goalNumber = 0
} else {
this.goalNumber = Math.round(this.personBasicNumber * (this.goalProportion / 100))
}
},
// 2
watchGoalNumbern (goalNumber) {
if (this.goalNumber === 0) {
this.goalProportion = 0
} else {
this.goalProportion = Math.round(this.goalNumber / this.personBasicNumber * 100)
}
},
//
getStreetName () {
this.$http
.get(`/kpi/streetpersiongoalmonth/queryStreetGoalName`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.headerContent = res.data
})
.catch(() => {})
},
//
getStreetGoalScore () {
this.$http
.get(`/kpi/streetpersiongoalmonth/streetGoalScore`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.streetGoalScore = res.data
})
.catch(() => {})
},
//
clickCell (row, column, event, cell) {
this.goalProportion = ''
this.goalNumber = ''
var columnId = column.property
if (columnId === 'monthYear') {
return false
}
if (column.property === undefined || column.property === '') {
return false
}
if (row.isDisabled === '0') {
return false
}
this.dialogFormVisible = true
this.dataForm.streetId = columnId // ID1202869594882400257-PartyGoalNum
// this.personBasicNumber = row[columnId] //
this.dataForm.monthYear = row.monthYear //
this.getStreetPersonBase(this.dataForm.streetId)
},
//
getStreetPersonBase (splicedStreetId) {
var streetId = splicedStreetId.split('-')
//
this.$http
.get(`/kpi/streetpersonbase/getStreetPersonBase/${streetId[0]}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (streetId[1] === 'CompanyGoalNum') {
this.personBasicNumber = res.data.companyBaseNum
this.personBasicNumberKey = 'CompanyGoalNum'
} else if (streetId[1] === 'ResidentGoalNum') {
this.personBasicNumber = res.data.residentBaseNum
this.personBasicNumberKey = 'ResidentGoalNum'
} else if (streetId[1] === 'PartyGoalNum') {
this.personBasicNumber = res.data.partyBaseNum
this.personBasicNumberKey = 'PartyGoalNum'
}
})
.catch(() => {})
},
//
upCellGoalNumber () {
if (this.goalProportion.length === 0) {
return this.$message.error('请输入目标比例')
}
var streetId = this.dataForm.streetId.split('-')
var upCellForm = {
'streetId': streetId[0],
'monthYear': this.dataForm.monthYear,
'personBasicNumberKey': this.personBasicNumberKey,
'goalNumber': this.goalNumber
}
this.$http['post'](
'/kpi/streetpersiongoalmonth/updateStreetGoalScore', upCellForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.dialogFormVisible = false
this.getStreetGoalScore()
}
})
}).catch(() => {})
}
},
components: {
AddOrUpdate
}
}
</script>

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

@ -0,0 +1,137 @@
<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-item label="所属机构" prop="streetId" v-if="!dataForm.id">
<el-cascader
v-model="deptIdList"
:options="deptIdOptions"
clearable
ref="name"
></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-form-item>
<el-form-item label="党员底数" prop="partyBaseNum">
<el-input-number v-model="dataForm.partyBaseNum" :min="0" 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-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>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
import Cookies from 'js-cookie'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
street: '',
streetId: '',
residentBaseNum: '',
partyBaseNum: '',
companyBaseNum: ''
},
//
deptIdOptions: [],
deptIdList: []
}
},
computed: {
dataRule () {
return {
streetId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
residentBaseNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
partyBaseNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
companyBaseNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
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.deptIdOptions = res.data.options
})
.catch(() => {})
},
watch: {
'deptIdList': function (val) {
if (val.length === 0) {
this.dataForm.streetId = ''
} else if (val.length > 0) {
this.dataForm.streetId = this.deptIdList[val.length - 1]
this.dataForm.street = this.$refs['name'].getCheckedNodes()[0].label
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
this.deptIdList = []
})
},
//
getInfo () {
this.$http.get(`/kpi/streetpersonbase/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/kpi/streetpersonbase/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

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

@ -0,0 +1,104 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-__streetpersonbase}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属机构">
<el-cascader
v-model="deptIdList"
:options="options"
:props="{ checkStrictly: true }"
clearable
></el-cascader>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('streetpersonbase:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</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="street" label="街道" header-align="center" align="center"></el-table-column>
<el-table-column prop="residentBaseNum" label="群众底数" header-align="center" align="center"></el-table-column>
<el-table-column prop="partyBaseNum" label="党员底数" header-align="center" align="center"></el-table-column>
<el-table-column prop="companyBaseNum" 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 v-if="$hasPermission('streetpersonbase:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('streetpersonbase: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 './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>

0
src/views/modules/leader/epdc.gitkeep

295
src/views/modules/leader/partycase-add-or-update.vue

@ -0,0 +1,295 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div v-loading="loading">
<el-form :inline="true" :model="dataForm" :rules="dataRule" ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<div>
<el-form-item label="党员基本情况:" label-width="120px" prop="partyCaseCategoryDTOList.0.categoryInfo"
:rules="dataRule.categoryInfo0">
<el-input type="textarea" v-model="dataForm.partyCaseCategoryDTOList[0].categoryInfo"
style="width:800px" maxLength="200"
placeholder="请输入党员基本内容,限制200字以内"></el-input>
</el-form-item>
</div>
<div style="padding-left: 120px">
<span class="line-h-40" style="font-weight: bold">各个街道党员人数图表内容</span>
<el-form-item label="全区党员人数:" label-width="150px" prop="partyCaseCategoryDTOList.0.parytAmount"
:rules="dataRule.parytAmount">
<el-input v-model="dataForm.partyCaseCategoryDTOList[0].parytAmount"
oninput="value=value.replace(/[^\d]/g,'')"
@change="parytAmountNumberChange()"></el-input>
</el-form-item>
<span class="line-h-40"></span>
</div>
<div style="padding-left: 120px">
<div style="width: 50%;display: inline-block;" v-for="(item,i) in dataForm.partyCaseNumberDTOList"
:key="i">
<el-form-item :label="item.streetName" label-width="150px"
:prop="'partyCaseNumberDTOList.'+i+'.partyCount'" :rules="dataRule.countNum">
<el-input class="input-count" @change="streetNumberChange(i,item.streetId)"
oninput="value=value.replace(/[^\d]/g,'')"
v-model="dataForm.partyCaseNumberDTOList[i].partyCount"></el-input>
</el-form-item>
<el-form-item label="占党员总数" label-width="90px" prop="categoryInfo">
<el-input class="input-percent" :readonly="true"
v-model="dataForm.partyCaseNumberDTOList[i].partyCountPercent"></el-input>
</el-form-item>
<span class="line-h-40">%</span>
<el-form-item label="排序" label-width="50px" :prop="'partyCaseNumberDTOList.'+i+'.sort'"
:rules="dataRule.sort">
<el-input class="input-sort" oninput="value=value.replace(/[^\d]/g,'')"
v-model="dataForm.partyCaseNumberDTOList[i].sort"></el-input>
</el-form-item>
</div>
</div>
<div>
<el-form-item label="党员年龄分布:" label-width="120px" prop="partyCaseCategoryDTOList.1.categoryInfo"
:rules="dataRule.categoryInfo1">
<el-input type="textarea" v-model="dataForm.partyCaseCategoryDTOList[1].categoryInfo"
style="width:800px" maxLength="100"
placeholder="请输入党员年龄介绍内容,限制100字以内"></el-input>
</el-form-item>
<div style="padding-left: 120px">
<span class="line-h-40" style="font-weight: bold">党员年龄分布图表内容</span></div>
</div>
<div style="padding-left: 120px" v-for="(item,i) in dataForm.partyCaseDisrtibutionDTOList"
v-if="item.type==='0'" :key="i">
<el-form-item :label="item.distributionName" label-width="120px"
:prop="'partyCaseDisrtibutionDTOList.'+i+'.distributionInfoCount'"
:rules="dataRule.countNum">
<el-input class="input-count" @change="disrtibutionNumberChange(i,item.type)"
oninput="value=value.replace(/[^\d]/g,'')"
v-model="dataForm.partyCaseDisrtibutionDTOList[i].distributionInfoCount"></el-input>
</el-form-item>
<el-form-item label="占党员总数" label-width="100px" prop="categoryInfo">
<el-input class="input-percent" :readonly="true"
v-model="dataForm.partyCaseDisrtibutionDTOList[i].distributionInfoPercent"></el-input>
</el-form-item>
<span class="line-h-40">%</span>
</div>
<div>
<el-form-item label="党员职业分布:" label-width="120px" prop="partyCaseCategoryDTOList.2.categoryInfo"
:rules="dataRule.categoryInfo2">
<el-input type="textarea" v-model="dataForm.partyCaseCategoryDTOList[2].categoryInfo"
style="width:800px" maxLength="100"
placeholder="请输入党员职业介绍内容,限制100字以内"></el-input>
</el-form-item>
<div style="padding-left: 120px">
<span class="line-h-40" style="font-weight: bold">党员职业分布图表内容</span>
</div>
</div>
<div style="padding-left: 120px" v-for="(item,i) in dataForm.partyCaseDisrtibutionDTOList"
v-if="item.type==='1'" :key="i">
<el-form-item :label="item.distributionName" label-width="120px"
:prop="'partyCaseDisrtibutionDTOList.'+i+'.distributionInfoCount'"
:rules="dataRule.countNum">
<el-input class="input-count" @change="disrtibutionNumberChange(i,item.type)"
v-model="dataForm.partyCaseDisrtibutionDTOList[i].distributionInfoCount"></el-input>
</el-form-item>
<el-form-item label="占党员总数" label-width="100px" prop="categoryInfo">
<el-input class="input-percent" :readonly="true"
v-model="dataForm.partyCaseDisrtibutionDTOList[i].distributionInfoPercent"></el-input>
</el-form-item>
<span class="line-h-40">%</span>
</div>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</el-form>
</div>
</el-card>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
dataForm: {
partyCaseCategoryDTOList: [
{
type: '-1',
categoryInfo: '',
parytAmount: 0
}, {
type: '0',
categoryInfo: ''
}, {
type: '1',
categoryInfo: ''
}],
partyCaseDisrtibutionDTOList: [
{
distributionName: '30岁以下:',
distributionInfoCount: 0,
distributionInfoPercent: 0,
type: '0'
}, {
distributionName: '31至50岁:',
distributionInfoCount: 0,
distributionInfoPercent: 0,
type: '0'
}, {
distributionName: '51至60岁:',
distributionInfoCount: 0,
distributionInfoPercent: 0,
type: '0'
}, {
distributionName: '61至70岁:',
distributionInfoCount: 0,
distributionInfoPercent: 0,
type: '0'
}, {
distributionName: '70岁以上:',
distributionInfoCount: 0,
distributionInfoPercent: 0,
type: '0'
}, {
distributionName: '在岗职工:',
distributionInfoCount: 0,
distributionInfoPercent: 0,
type: '1'
},
{
distributionName: '离退休人员:',
distributionInfoCount: 0,
distributionInfoPercent: 0,
type: '1'
},
{
distributionName: '其他职业:',
distributionInfoCount: 0,
distributionInfoPercent: 0,
type: '1'
}],
partyCaseNumberDTOList: []
},
loading: true
}
},
computed: {
dataRule () {
return {
categoryInfo0: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
categoryInfo1: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
categoryInfo2: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
parytAmount: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
countNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
sort: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
mounted () {
this.init()
},
methods: {
init () {
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.getInfo()
})
},
//
getInfo () {
this.$http.get(`/cloudAnalysis/partycasecategory/getDetail`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (res.data.partyCaseCategoryDTOList.length > 0) {
this.dataForm.partyCaseCategoryDTOList = res.data.partyCaseCategoryDTOList
}
if (res.data.partyCaseDisrtibutionDTOList.length > 0) {
this.dataForm.partyCaseDisrtibutionDTOList = res.data.partyCaseDisrtibutionDTOList
}
if (res.data.partyCaseNumberDTOList.length > 0) {
this.dataForm.partyCaseNumberDTOList = res.data.partyCaseNumberDTOList
} else {
this.getStreetInfo()
}
this.loading = false
}).catch(() => {
this.loading = false
})
},
//
getStreetInfo () {
this.$http.get(`/cloudAnalysis/partycasenumber/getStreet`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm.partyCaseNumberDTOList = res.data
}).catch(() => {
})
},
//
streetNumberChange (i, streetId) {
this.dataForm.partyCaseNumberDTOList[i].partyCountPercent = parseInt(Math.round(100 * this.dataForm.partyCaseNumberDTOList[i].partyCount / this.dataForm.partyCaseCategoryDTOList[0].parytAmount))
},
disrtibutionNumberChange (i, type) {
this.dataForm.partyCaseDisrtibutionDTOList[i].distributionInfoPercent = parseFloat((100 * this.dataForm.partyCaseDisrtibutionDTOList[i].distributionInfoCount / this.dataForm.partyCaseCategoryDTOList[0].parytAmount).toFixed(2))
},
parytAmountNumberChange () {
for (const i of this.dataForm.partyCaseNumberDTOList) {
i.partyCountPercent = parseInt(Math.round(100 * i.partyCount / this.dataForm.partyCaseCategoryDTOList[0].parytAmount))
}
for (const i of this.dataForm.partyCaseDisrtibutionDTOList) {
i.distributionInfoPercent = parseFloat((100 * i.distributionInfoCount / this.dataForm.partyCaseCategoryDTOList[0].parytAmount).toFixed(2))
}
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.partyCaseCategoryDTOList[0].id ? 'post' : 'put']('/cloudAnalysis/partycasecategory/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.$emit('refreshDataList')
}
})
}).catch(() => {
})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style scoped>
.line-h-40 {
line-height: 40px;
}
.input-count {
width: 80px;
}
.input-percent {
width: 70px;
}
.input-sort {
width: 50px;
}
</style>

2
src/views/modules/organize/deptofficer-add-or-update.vue

@ -80,7 +80,7 @@ export default {
],
mobile: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
{ pattern: /^[1][3,4,5,7,8,9][0-9]{9}$/, message: '请输入正确号码格式', trigger: 'blur' }
{ pattern: /^[1][1,2,3,4,5,6,7,8,9][0-9]{9}$/, message: '请输入正确号码格式', trigger: 'blur' }
],
sort: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }

2
src/views/modules/organize/deptofficer-add.vue

@ -83,7 +83,7 @@ export default {
],
mobile: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
{ pattern: /^[1][3,4,5,7,8,9][0-9]{9}$/, message: '请输入正确号码格式', trigger: 'blur' }
{ pattern: /^[1][1,2,3,4,5,6,7,8,9][0-9]{9}$/, message: '请输入正确号码格式', trigger: 'blur' }
],
sort: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }

8
src/views/modules/workRecord/dailyrecordinfo.vue

@ -225,3 +225,11 @@ export default {
}
}
</script>
<style>
.el-tooltip__popper {
max-width: 80%;
color: #353434 !important;
background:#e6eaebf3 !important;
word-break:break-all;
}
</style>

83
src/views/modules/workRecord/dailyrecordinfoDetail.vue

@ -1,7 +1,7 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-__masteruserrelation}">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :disabled="pageDisabled">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :disabled="pageDisabled">
<el-form-item v-if="dailyTypeArr.length > 0" label="随手记类型" prop="dailyType" label-width="100px">
<el-select v-model="dataForm.dailyType" placeholder="随手记类型" @change="selectModel($event)" clearable style="width:50%">
<el-option v-for="item in dailyTypeArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" >
@ -14,6 +14,18 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="参与部门" prop="joinDeptIdsArr" label-width="100px">
<el-cascader
ref="name"
v-model="dataForm.joinDeptIdsArr"
:options="options"
:props="{ multiple: true, emitPath: false, checkStrictly: false }"
@visible-change="changeHandle"
@remove-tag="removeTagHandle"
style="width:50%;"
>
</el-cascader>
</el-form-item>
<el-form-item label="会议时间" prop="dailyDate" label-width="100px">
<el-date-picker v-model="dataForm.dailyDate"
type="datetime"
@ -24,8 +36,6 @@
</el-date-picker>
</el-form-item>
<el-form-item label="地址" prop="address" label-width="100px">
<!-- <el-input v-model="dataForm.address" placeholder="地址" maxlength="60" style="width:50%"></el-input>
<div><font color="gray">默认定位可手动修改</font></div> -->
<el-input v-model="dataForm.address"
type="text"
clearable
@ -50,6 +60,7 @@
</el-form-item>
<el-form-item label="添加图片" v-loading="loading" prop="images" label-width="100px">
<el-upload
ref="upload"
:action="uploadUrl"
:class="{hide:hideUpload}"
list-type="picture-card"
@ -100,6 +111,9 @@ export default {
userFace: '',
deptName: '',
deptId: '',
joinDeptIds: '',
joinDeptIdsArr: [],
joinDeptNames: '',
dailyType: '',
meetType: '',
resourceId: '',
@ -124,7 +138,8 @@ export default {
uploadUrl: '',
loading: false,
dialogImageUrl: '',
dialogVisible: false
dialogVisible: false,
options: []
}
},
computed: {
@ -153,11 +168,15 @@ export default {
],
content: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
joinDeptIdsArr: [
{ required: false, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
created: function () {
this.getOptions()
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/uploadImg?token=${Cookies.get('token')}`
// this.uploadUrl = `http://219.146.91.110:10000/epdc-api/oss/file/uploadImg?token=${Cookies.get('token')}`
},
@ -173,6 +192,45 @@ export default {
}
},
methods: {
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
changeHandle (value, selectedData) {
let joinDeptIds = ''
let joinDeptNames = ''
if (this.$refs['name'].getCheckedNodes() !== null) {
for (var i = 0; i < this.$refs['name'].getCheckedNodes().length; i++) {
if (!this.$refs['name'].getCheckedNodes()[i].hasChildren) {
joinDeptIds += this.$refs['name'].getCheckedNodes()[i].value + ','
joinDeptNames += this.$refs['name'].getCheckedNodes()[i].label + '、'
}
}
}
this.dataForm.joinDeptIds = joinDeptIds.length > 0 ? joinDeptIds.substring(0, joinDeptIds.length - 1) : joinDeptIds
this.dataForm.joinDeptNames = joinDeptNames.length > 0 ? joinDeptNames.substring(0, joinDeptNames.length - 1) : joinDeptNames
},
removeTagHandle (value) {
let joinDeptIds = ''
let joinDeptNames = ''
if (this.$refs['name'].getCheckedNodes() !== null) {
for (var i = 0; i < this.$refs['name'].getCheckedNodes().length; i++) {
if (!this.$refs['name'].getCheckedNodes()[i].hasChildren && this.$refs['name'].getCheckedNodes()[i].value !== value) {
joinDeptIds += this.$refs['name'].getCheckedNodes()[i].value + ','
joinDeptNames += this.$refs['name'].getCheckedNodes()[i].label + '、'
}
}
}
this.dataForm.joinDeptIds = joinDeptIds.length > 0 ? joinDeptIds.substring(0, joinDeptIds.length - 1) : joinDeptIds
this.dataForm.joinDeptNames = joinDeptNames.length > 0 ? joinDeptNames.substring(0, joinDeptNames.length - 1) : joinDeptNames
},
init () {
this.dataForm.id = this.$route.query.id
this.visible = true
@ -207,15 +265,31 @@ export default {
if (!isJPG && !isPNG) {
this.$message.error('上传文件必须是jpg、png格式!')
this.loading = false
this.isAble = false
return false
}
},
handleAvatarSuccess (res, file) {
this.loading = false
this.isAble = false
if (res === null || res.data === null || res.data.imgUrl === null) {
this.$message.error('文件上传失败!')
this.handleErrorRemove(file)
return false
}
this.dataForm.images.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 1 })
this.hideUpload = this.dataForm.images.length >= 9
},
handleErrorRemove (file) {
//
let fileList = this.$refs.upload.uploadFiles
for (var i = 0; i < fileList.length; i++) {
let item = fileList[i]
if (item.url === file.url) {
fileList.splice(i, 1)
}
}
},
handelError () {
this.loading = false
this.isAble = false
@ -265,6 +339,7 @@ export default {
return false
}
this.isAble = true
console.log(this.dataForm)
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/dailyrecordinfo/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.isAble = false

29
src/views/modules/workRecord/monthexcellentcase.vue

@ -3,8 +3,8 @@
<div class="mod-news__monthexcellentcase}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<div>
<el-form-item label="月报内容" prop="content" label-width="90px">
<el-input v-model="dataForm.content" placeholder="月报内容" clearable maxlength="20" @keyup.native="btKeyUpContent" style="width:200px"></el-input>
<el-form-item label="案例内容" prop="content" label-width="90px">
<el-input v-model="dataForm.content" placeholder="案例内容" clearable maxlength="20" @keyup.native="btKeyUpContent" style="width:200px"></el-input>
</el-form-item>
<el-form-item label="发布人" prop="nickName" label-width="90px">
<el-input v-model="dataForm.nickName" placeholder="发布人" clearable maxlength="10" @keyup.native="btKeyUpNickName" style="width:200px"></el-input>
@ -58,9 +58,10 @@
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="nickName" label="发布人" header-align="center" align="center"></el-table-column>
<el-table-column prop="content" 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 prop="month" label="月份" header-align="center" align="center" width="150"></el-table-column>
<el-table-column prop="content" label="内容" header-align="center" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="nickName" label="发布人" header-align="center" align="center" width="250"></el-table-column>
<el-table-column prop="createdTime" label="发布时间" header-align="center" align="center" width="250"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button :disabled="scope.row.isUpdate == '0'" type="text" size="small" @click="addHandle(scope.row.id,'0')">{{ $t('update') }}</el-button>
@ -151,7 +152,7 @@ export default {
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -159,7 +160,23 @@ export default {
this.options = res.data.options
})
.catch(() => {})
},
btKeyUpContent (e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '')
this.dataForm.content = e.target.value
},
btKeyUpNickName (e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '')
this.dataForm.nickName = e.target.value
}
}
}
</script>
<style>
.el-tooltip__popper {
max-width: 80%;
color: #353434 !important;
background:#e6eaebf3 !important;
word-break:break-all;
}
</style>

28
src/views/modules/workRecord/monthexcellentcaseDetail.vue

@ -1,7 +1,7 @@
<template>
<el-card shadow="never" class="aui-card--fill" v-loading="pageloading">
<div class="mod-__masteruserrelation}">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :disabled="pageDisabled">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :disabled="pageDisabled">
<el-form-item label="会议内容" prop="content" label-width="100px">
<el-input
type="textarea"
@ -12,7 +12,7 @@
style="width:50%">
</el-input>
</el-form-item>
<el-form-item label="添加图片" v-loading="loading" prop="images" label-width="90px">
<el-form-item label="添加图片" v-loading="loading" prop="images" label-width="100px">
<el-upload
:action="uploadUrl"
:class="{hide:hideUpload}"
@ -32,9 +32,11 @@
</el-dialog>
<div><font color="gray">1~9张图</font></div>
</el-form-item>
<el-form-item label="添加文件" v-loading="fileloading" prop="files" label-width="90px">
<el-form-item label="添加文件" v-loading="fileloading" prop="files" label-width="100px">
<el-upload
class="upload-demo"
ref="upload"
:disabled="isAble"
:action="uploadFileUrl"
:before-remove="beforeFileRemove"
:file-list="dataForm.files"
@ -44,7 +46,7 @@
:on-error="handelError"
:on-preview="handleFileCardPreview"
style="width:480px">
<el-button size="small">点击上传</el-button>
<el-button size="small" :disabled="isAble">点击上传</el-button>
<div slot="tip" class="el-upload__tip">支持.wordPDFExcel文件</div>
</el-upload>
</el-form-item>
@ -96,7 +98,8 @@ export default {
dialogVisible: false,
isAutoRemoveFile: true,
fileloading: false,
pageloading: true
pageloading: true,
isGoToInfo: '0' // 01
}
},
computed: {
@ -133,6 +136,7 @@ export default {
}
if (this.$route.query.infoId !== '' && this.$route.query.infoId != null) {
this.dataForm.infoId = this.$route.query.infoId
this.isGoToInfo = '1'
}
},
methods: {
@ -159,6 +163,7 @@ export default {
if (!isJPG && !isPNG) {
this.$message.error('上传文件必须是jpg、png格式!')
this.loading = false
this.isAble = false
return false
}
},
@ -217,11 +222,22 @@ export default {
}
}
},
handleErrorRemove (file) {
//
let fileList = this.$refs.upload.uploadFiles
for (var i = 0; i < fileList.length; i++) {
let item = fileList[i]
if (item.url === file.url) {
fileList.splice(i, 1)
}
}
},
handleAvatarFileSuccess (res, file) {
this.fileloading = false
this.isAble = false
if (res === null || res.data === null || res.data.imgUrl === null) {
this.$message.error('文件上传失败!')
this.handleErrorRemove(file)
return false
}
this.dataForm.files.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 2, recordType: 2, fileName: res.data.fileName, name: res.data.fileName })
@ -229,7 +245,7 @@ export default {
//
backToUserRelationList () {
this.$emit('refreshDataList')
if (this.$route.query.infoId !== '' && this.$route.query.infoId != null) {
if (this.isGoToInfo === '1') {
this.$parent.selectComponent = 'Monthrecordinfo'
this.$router.push({ path: '/workRecord-Monthrecordinforoute' })
} else {

31
src/views/modules/workRecord/monthexcellentgrid.vue

@ -3,8 +3,8 @@
<div class="mod-news__monthexcellentgrid}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<div>
<el-form-item label="月报内容" prop="content" label-width="90px">
<el-input v-model="dataForm.content" placeholder="月报内容" clearable maxlength="20" @keyup.native="btKeyUpContent" style="width:200px"></el-input>
<el-form-item label="网格内容" prop="content" label-width="90px">
<el-input v-model="dataForm.content" placeholder="网格内容" clearable maxlength="20" @keyup.native="btKeyUpContent" style="width:200px"></el-input>
</el-form-item>
<el-form-item label="发布人" prop="nickName" label-width="90px">
<el-input v-model="dataForm.nickName" placeholder="发布人" clearable maxlength="10" @keyup.native="btKeyUpNickName" style="width:200px"></el-input>
@ -58,10 +58,11 @@
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="nickName" label="发布人" header-align="center" align="center"></el-table-column>
<el-table-column prop="deptName" label="部门名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="content" 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 prop="month" label="月份" header-align="center" align="center" width="150"></el-table-column>
<el-table-column prop="nickName" label="发布人" header-align="center" align="center" width="250"></el-table-column>
<el-table-column prop="deptName" label="部门名称" header-align="center" align="center" width="350"></el-table-column>
<el-table-column prop="content" label="内容" header-align="center" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="createdTime" label="发布时间" header-align="center" align="center" width="250"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button :disabled="scope.row.isUpdate == '0'" type="text" size="small" @click="addHandle(scope.row.id,'0')">{{ $t('update') }}</el-button>
@ -152,7 +153,7 @@ export default {
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -160,7 +161,23 @@ export default {
this.options = res.data.options
})
.catch(() => {})
},
btKeyUpContent (e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '')
this.dataForm.content = e.target.value
},
btKeyUpNickName (e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '')
this.dataForm.nickName = e.target.value
}
}
}
</script>
<style>
.el-tooltip__popper {
max-width: 80%;
color: #353434 !important;
background:#e6eaebf3 !important;
word-break:break-all;
}
</style>

78
src/views/modules/workRecord/monthexcellentgridDetail.vue

@ -1,18 +1,20 @@
<template>
<el-card shadow="never" class="aui-card--fill" v-loading="pageloading">
<div class="mod-__masteruserrelation}">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :disabled="pageDisabled">
<el-form-item label="选择网格" label-width="90px">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :disabled="pageDisabled">
<el-form-item label="选择网格" prop="deptId" label-width="90px">
<el-cascader
ref="name"
v-model="ids"
v-model="dataForm.deptId"
:options="options"
:props="{ checkStrictly: true }"
:props="{ emitPath: false }"
@change="changeHandle"
clearable
style="width:50%"
>
</el-cascader>
</el-form-item>
<el-form-item label="会议内容" prop="content" label-width="100px">
<el-form-item label="会议内容" prop="content" label-width="90px">
<el-input
type="textarea"
:rows="6"
@ -45,6 +47,8 @@
<el-form-item label="添加文件" v-loading="fileloading" prop="files" label-width="90px">
<el-upload
class="upload-demo"
ref="upload"
:disabled="isAble"
:action="uploadFileUrl"
:before-remove="beforeFileRemove"
:file-list="dataForm.files"
@ -54,7 +58,7 @@
:on-error="handelError"
:on-preview="handleFileCardPreview"
style="width:480px">
<el-button size="small">点击上传</el-button>
<el-button size="small" :disabled="isAble">点击上传</el-button>
<div slot="tip" class="el-upload__tip">支持.wordPDFExcel文件</div>
</el-upload>
</el-form-item>
@ -93,6 +97,7 @@ export default {
endDate: '',
content: '',
state: '',
allDeptIds: '',
images: [],
files: []
},
@ -107,8 +112,8 @@ export default {
isAutoRemoveFile: true,
fileloading: false,
pageloading: true,
ids: [],
options: []
options: [],
isGoToInfo: '0' // 01
}
},
computed: {
@ -116,26 +121,19 @@ export default {
return {
content: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
watch: {
ids: function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else {
this.dataForm.deptId = this.ids[val.length - 1]
}
this.dataForm.deptName = this.$refs['name'].getCheckedNodes()[0].label
}
},
created: function () {
this.getOptions()
// this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/uploadImg?token=${Cookies.get('token')}`
// this.uploadFileUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/uploadAllFile?token=${Cookies.get('token')}`
this.uploadUrl = `http://219.146.91.110:10000/epdc-api/oss/file/uploadImg?token=${Cookies.get('token')}`
this.uploadFileUrl = `http://219.146.91.110:10000/epdc-api/oss/file/uploadAllFile?token=${Cookies.get('token')}`
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/uploadImg?token=${Cookies.get('token')}`
this.uploadFileUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/uploadAllFile?token=${Cookies.get('token')}`
// this.uploadUrl = `http://219.146.91.110:10000/epdc-api/oss/file/uploadImg?token=${Cookies.get('token')}`
// this.uploadFileUrl = `http://219.146.91.110:10000/epdc-api/oss/file/uploadAllFile?token=${Cookies.get('token')}`
},
components: {
MapSelect
@ -156,16 +154,30 @@ export default {
}
if (this.$route.query.infoId !== '' && this.$route.query.infoId != null) {
this.dataForm.infoId = this.$route.query.infoId
this.isGoToInfo = '1'
}
},
methods: {
changeHandle (value, selectedData) {
this.dataForm.deptName = this.$refs['name'].getCheckedNodes()[0].label
this.dataForm.deptId = this.$refs['name'].getCheckedNodes()[0].value
let path = this.$refs['name'].getCheckedNodes()[0].path
let allDeptIds = ''
for (var i = 0; i < path.length; i++) {
allDeptIds += path[i] + ','
}
if (allDeptIds.length > 0) {
allDeptIds = allDeptIds.substring(0, allDeptIds.length - 1)
}
this.dataForm.allDeptIds = allDeptIds
},
init () {
this.dataForm.id = this.$route.query.id
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
// this.getInfo()
}
})
},
@ -182,6 +194,7 @@ export default {
if (!isJPG && !isPNG) {
this.$message.error('上传文件必须是jpg、png格式!')
this.loading = false
this.isAble = false
return false
}
},
@ -212,8 +225,8 @@ export default {
},
// -------------------------------
handleFileCardPreview (file) {
// window.location.href = `${window.SITE_CONFIG['apiURL']}/oss/file/download?fileUrl=${file.url}`
window.location.href = `http://219.146.91.110:10000/epdc-api/oss/file/download?fileUrl=${file.url}`
window.location.href = `${window.SITE_CONFIG['apiURL']}/oss/file/download?fileUrl=${file.url}`
// window.location.href = `http://219.146.91.110:10000/epdc-api/oss/file/download?fileUrl=${file.url}`
},
beforeFileRemove (file, fileList) {
if (this.isAutoRemoveFile) {
@ -240,11 +253,22 @@ export default {
}
}
},
handleErrorRemove (file) {
//
let fileList = this.$refs.upload.uploadFiles
for (var i = 0; i < fileList.length; i++) {
let item = fileList[i]
if (item.url === file.url) {
fileList.splice(i, 1)
}
}
},
handleAvatarFileSuccess (res, file) {
this.fileloading = false
this.isAble = false
if (res === null || res.data === null || res.data.imgUrl === null) {
this.$message.error('文件上传失败!')
this.handleErrorRemove(file)
return false
}
this.dataForm.files.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 2, recordType: 4, fileName: res.data.fileName, name: res.data.fileName })
@ -252,7 +276,7 @@ export default {
//
backToUserRelationList () {
this.$emit('refreshDataList')
if (this.$route.query.infoId !== '' && this.$route.query.infoId != null) {
if (this.isGoToInfo === '1') {
this.$parent.selectComponent = 'Monthrecordinfo'
this.$router.push({ path: '/workRecord-Monthrecordinforoute' })
} else {
@ -306,7 +330,7 @@ export default {
}, 1000, { 'leading': true, 'trailing': false }),
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)

172
src/views/modules/workRecord/monthexcellentperson.vue

@ -2,12 +2,63 @@
<el-card shadow="never" class="aui-card--fill">
<div class="mod-news__monthexcellentperson}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<div>
<el-form-item label="榜样姓名" prop="name" label-width="90px">
<el-input v-model="dataForm.name" placeholder="榜样姓名" clearable maxlength="20" @keyup.native="btKeyUpName" style="width:200px"></el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile" label-width="90px">
<el-input v-model="dataForm.mobile" placeholder="手机号" clearable maxlength="10" @keyup.native="btKeyUpMobile" style="width:200px"></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="发布人" prop="nickName" label-width="90px">
<el-input v-model="dataForm.nickName" placeholder="发布人" clearable maxlength="20" @keyup.native="btKeyUpNickName" style="width:200px"></el-input>
</el-form-item>
<el-form-item label="榜样身份" prop="partyFlag" label-width="90px">
<el-select v-model="dataForm.partyFlag" placeholder="榜样身份" style="width:200px" clearable>
<el-option v-for="item in partyFlagArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</div>
<el-form-item label="所属机构" label-width="90px">
<el-cascader
v-model="ids"
:options="options"
:props="{ checkStrictly: true }"
clearable
>
</el-cascader>
</el-form-item>
<el-form-item label="发布时间" prop="startTime" label-width="90px">
<el-date-picker v-model="dataForm.startTime"
type="date"
:picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间"
style="width:200px">
</el-date-picker>
</el-form-item>
<el-form-item label="至" prop="endTime">
<el-date-picker v-model="dataForm.endTime"
type="date"
:picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间"
style="width:200px">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
<el-button @click="getDataListOverWrite()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button type="primary" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item>
<!-- <el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item> -->
<el-form-item>
<el-button v-if="$hasPermission('news:monthexcellentperson:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
@ -16,21 +67,22 @@
</el-form-item>
</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 prop="id" label="主键" header-align="center" align="center"></el-table-column>
<el-table-column prop="infoId" label="信息ID" header-align="center" align="center"></el-table-column>
<el-table-column prop="name" label="榜样姓名" header-align="center" align="center"></el-table-column>
<el-table-column prop="mobile" label="联系电话" header-align="center" align="center"></el-table-column>
<el-table-column prop="partyFlag" label="党员标识" header-align="center" align="center"></el-table-column>
<el-table-column prop="content" label="内容" header-align="center" align="center"></el-table-column>
<el-table-column prop="delFlag" label="逻辑删除标识" header-align="center" align="center"></el-table-column>
<el-table-column prop="revision" label="乐观锁" header-align="center" align="center"></el-table-column>
<el-table-column prop="createdBy" 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 prop="updatedBy" label="更新人" header-align="center" align="center"></el-table-column>
<el-table-column prop="updatedTime" 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="month" label="月份" header-align="center" align="center" width="150"></el-table-column>
<el-table-column prop="name" label="榜样姓名" header-align="center" align="center" width="200"></el-table-column>
<el-table-column prop="mobile" label="联系电话" header-align="center" align="center" width="200"></el-table-column>
<el-table-column prop="partyFlag" label="党员标识" header-align="center" align="center" width="150"></el-table-column>
<el-table-column prop="content" label="内容" header-align="center" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="nickName" label="发布人" header-align="center" align="center" width="200"></el-table-column>
<el-table-column prop="createdTime" label="发布时间" header-align="center" align="center" width="250"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button :disabled="scope.row.isUpdate == '0'" type="text" size="small" @click="addHandle(scope.row.id,'0')">{{ $t('update') }}</el-button>
<el-button type="text" size="small" @click="addHandle(scope.row.id,'1')">{{ '查看' }}</el-button>
<el-button v-if="$hasPermission('news:monthexcellentperson:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('news:monthexcellentperson:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
@ -59,18 +111,100 @@ export default {
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/news/monthexcellentperson/page',
getDataListURL: '/workRecord/monthexcellentperson/page',
getDataListIsPage: true,
deleteURL: '/news/monthexcellentperson',
deleteIsBatch: true
deleteURL: '/workRecord/monthexcellentperson',
deleteIsBatch: true,
exportURL: '/workRecord/monthexcellentperson/export'
},
dataForm: {
id: ''
id: '',
name: '',
mobile: '',
partyFlag: '',
content: '',
nickName: ''
},
partyFlagArr: [
{ dictValue: '0', dictName: '居民' },
{ dictValue: '1', dictName: '党员' }
],
pickerBeginDateBefore: {
disabledDate: (time) => {
let beginDateVal = this.dataForm.endTime
if (beginDateVal) {
return time.getTime() > new Date(beginDateVal + ' 00:00:00').getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: (time) => {
let EndDateVal = this.dataForm.startTime
if (EndDateVal) {
return time.getTime() < new Date(EndDateVal + ' 00:00:00').getTime()
}
}
},
ids: [],
options: []
}
},
watch: {
ids: function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else {
this.dataForm.deptId = this.ids[val.length - 1]
}
}
},
created: function () {
this.getDataList()
this.getOptions()
},
components: {
AddOrUpdate
},
methods: {
addHandle (id, disabled) {
this.$parent.selectComponent = 'MonthexcellentpersonDetail'
this.$router.push({ path: '/workRecord-Monthexcellentpersonroute', query: { id: id, disabled: disabled } })
},
getDataListOverWrite () {
this.page = 1
this.getDataList()
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
btKeyUpName (e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '')
this.dataForm.name = e.target.value
},
btKeyUpNickName (e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '')
this.dataForm.nickName = e.target.value
},
btKeyUpMobile (e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '')
this.dataForm.mobile = e.target.value
}
}
}
</script>
<style>
.el-tooltip__popper {
max-width: 80%;
color: #353434 !important;
background:#e6eaebf3 !important;
word-break:break-all;
}
</style>

328
src/views/modules/workRecord/monthexcellentpersonDetail.vue

@ -0,0 +1,328 @@
<template>
<el-card shadow="never" class="aui-card--fill" v-loading="pageloading">
<div class="mod-__masteruserrelation}">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :disabled="pageDisabled">
<el-form-item label="榜样身份" prop="partyFlag" label-width="100px">
<el-select v-model="dataForm.partyFlag" placeholder="榜样身份" style="width:300px" clearable>
<el-option v-for="item in partyFlagArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="榜样名称" prop="name" label-width="100px">
<el-input v-model="dataForm.name" placeholder="榜样名称" clearable maxlength="20" @keyup.native="btKeyUpContent" style="width:300px"></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="mobile" label-width="100px">
<el-input v-model="dataForm.mobile" placeholder="联系电话" clearable maxlength="20" @keyup.native="btKeyUpContent" style="width:300px"></el-input>
</el-form-item>
<el-form-item label="会议内容" prop="content" label-width="100px">
<el-input
type="textarea"
:rows="6"
placeholder="请输入会议内容,2000字以内"
v-model="dataForm.content"
maxlength="2000"
style="width:50%">
</el-input>
</el-form-item>
<el-form-item label="添加图片" v-loading="loading" prop="images" label-width="100px">
<el-upload
:action="uploadUrl"
:class="{hide:hideUpload}"
list-type="picture-card"
:file-list="dataForm.images"
:limit=9
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-success="handleAvatarSuccess"
:on-error="handelError"
:before-upload="beforeAvatarUpload"
style="width:480px">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
<div><font color="gray">1~9张图</font></div>
</el-form-item>
<el-form-item label="添加文件" v-loading="fileloading" prop="files" label-width="100px">
<el-upload
class="upload-demo"
ref="upload"
:disabled="isAble"
:action="uploadFileUrl"
:before-remove="beforeFileRemove"
:file-list="dataForm.files"
:before-upload="beforeAvatarFileUpload"
:on-remove="handleFileRemove"
:on-success="handleAvatarFileSuccess"
:on-error="handelError"
:on-preview="handleFileCardPreview"
style="width:480px">
<el-button size="small" :disabled="isAble">点击上传</el-button>
<div slot="tip" class="el-upload__tip">支持.wordPDFExcel文件</div>
</el-upload>
</el-form-item>
</el-form>
<el-form>
<el-form-item style="margin-left:35px;">
<el-button type="primary" @click="backToUserRelationList">{{"返回"}}</el-button>
<el-button v-if="!pageDisabled" type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</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>
</template>
</div>
</el-card>
</template>
<script>
import debounce from 'lodash/debounce'
import Cookies from 'js-cookie'
import 'quill/dist/quill.snow.css'
import MapSelect from './map-select'
export default {
data () {
return {
visible: false,
dataForm: {
name: '',
mobile: '',
partyFlag: '',
content: '',
state: '',
images: [],
files: []
},
partyFlagArr: [
{ dictValue: '0', dictName: '居民' },
{ dictValue: '1', dictName: '党员' }
],
isAble: false,
hideUpload: false,
pageDisabled: false,
uploadUrl: '',
uploadFileUrl: '',
loading: false,
dialogImageUrl: '',
dialogVisible: false,
isAutoRemoveFile: true,
fileloading: false,
pageloading: true,
isGoToInfo: '0' // 01
}
},
computed: {
dataRule () {
return {
name: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
mobile: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
{ pattern: /^[1][3,4,5,7,8,9][0-9]{9}$/, message: '请输入正确号码格式', trigger: 'blur' }
],
partyFlag: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
content: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
created: function () {
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/uploadImg?token=${Cookies.get('token')}`
this.uploadFileUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/uploadAllFile?token=${Cookies.get('token')}`
// this.uploadUrl = `http://219.146.91.110:10000/epdc-api/oss/file/uploadImg?token=${Cookies.get('token')}`
// this.uploadFileUrl = `http://219.146.91.110:10000/epdc-api/oss/file/uploadAllFile?token=${Cookies.get('token')}`
},
components: {
MapSelect
},
mounted () {
if (this.$route.query.disabled === '0') {
this.pageDisabled = false
this.hideUpload = false
} else {
this.pageDisabled = true
this.hideUpload = true
}
if (this.$route.query.id !== '' && this.$route.query.id != null) {
this.dataForm.id = this.$route.query.id
this.getInfo()
} else {
this.pageloading = false
}
if (this.$route.query.infoId !== '' && this.$route.query.infoId != null) {
this.dataForm.infoId = this.$route.query.infoId
this.isGoToInfo = '1'
}
},
methods: {
init () {
this.dataForm.id = this.$route.query.id
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
beforeAvatarUpload (file) {
if (this.dataForm.length === 9) {
this.$message.error('最多上传9张图片!')
return false
}
this.loading = true
this.isAble = true
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
//
if (!isJPG && !isPNG) {
this.$message.error('上传文件必须是jpg、png格式!')
this.loading = false
this.isAble = false
return false
}
},
handleAvatarSuccess (res, file) {
this.loading = false
this.isAble = false
this.dataForm.images.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 1, recordType: 3, fileName: res.data.fileName })
this.hideUpload = this.dataForm.images.length >= 9
},
handelError () {
this.loading = false
this.fileloading = false
this.isAble = false
this.$message.error('上传文件失败!')
},
handleRemove (file, fileList) {
for (var i = 0; i < this.dataForm.images.length; i++) {
let item = this.dataForm.images[i]
if (item.url === file.url) {
this.dataForm.images.splice(i, 1)
}
}
this.hideUpload = this.dataForm.images.length >= 9
},
handlePictureCardPreview (file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
// -------------------------------
handleFileCardPreview (file) {
window.location.href = `${window.SITE_CONFIG['apiURL']}/oss/file/download?fileUrl=${file.url}`
// window.location.href = `http://219.146.91.110:10000/epdc-api/oss/file/download?fileUrl=${file.url}`
},
beforeFileRemove (file, fileList) {
if (this.isAutoRemoveFile) {
return this.$confirm(`确定移除${file.name}`)
}
this.isAutoRemoveFile = true
},
beforeAvatarFileUpload (file) {
this.fileloading = true
this.isAble = true
if (file.size === 0) {
this.isAutoRemoveFile = false
this.$message.error('文件为空文件,请上传非空文件!')
this.fileloading = false
this.isAble = false
return false
}
},
handleFileRemove (file, fileList) {
for (var i = 0; i < this.dataForm.files.length; i++) {
let item = this.dataForm.files[i]
if (item.url === file.url) {
this.dataForm.files.splice(i, 1)
}
}
},
handleErrorRemove (file) {
//
let fileList = this.$refs.upload.uploadFiles
for (var i = 0; i < fileList.length; i++) {
let item = fileList[i]
if (item.url === file.url) {
fileList.splice(i, 1)
}
}
},
handleAvatarFileSuccess (res, file) {
this.fileloading = false
this.isAble = false
if (res === null || res.data === null || res.data.imgUrl === null) {
this.$message.error('文件上传失败!')
this.handleErrorRemove(file)
return false
}
this.dataForm.files.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 2, recordType: 3, fileName: res.data.fileName, name: res.data.fileName })
},
//
backToUserRelationList () {
this.$emit('refreshDataList')
if (this.isGoToInfo === '1') {
this.$parent.selectComponent = 'Monthrecordinfo'
this.$router.push({ path: '/workRecord-Monthrecordinforoute' })
} else {
this.$parent.selectComponent = 'Monthexcellentperson'
this.$router.push({ path: '/workRecord-Monthexcellentpersonroute' })
}
},
//
getInfo () {
this.$http.get(`/workRecord/monthexcellentperson/${this.dataForm.id}`).then(({ data: res }) => {
this.pageloading = false
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
// ()
if (this.$route.query.disabled === '0') {
this.hideUpload = this.dataForm.images.length >= 9
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/monthexcellentperson/', 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.isAble = false
this.visible = false
this.$emit('refreshDataList')
//
this.backToUserRelationList()
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style>
.hide .el-upload--picture-card {
display: none;
}
</style>

29
src/views/modules/workRecord/monthexcellentpersonroute.vue

@ -0,0 +1,29 @@
<template>
<keep-alive include="monthexcellentperson">
<component :is="selectComponent"></component>
</keep-alive>
</template>
<script>
import Monthexcellentperson from './monthexcellentperson'
import MonthexcellentpersonDetail from './monthexcellentpersonDetail'
export default {
data () {
return {
selectComponent: Monthexcellentperson
}
},
components: {
Monthexcellentperson,
MonthexcellentpersonDetail
},
methods: {
init () {
this.selectComponent = Monthexcellentperson
}
}
}
</script>
<style lang="scss" scoped>
</style>

143
src/views/modules/workRecord/monthgridsort.vue

@ -2,11 +2,48 @@
<el-card shadow="never" class="aui-card--fill">
<div class="mod-news__monthgridsort}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<div>
<!-- <el-form-item label="网格名称" prop="deptName" label-width="90px">
<el-input v-model="dataForm.deptName" placeholder="网格名称" clearable maxlength="20" @keyup.native="btKeyUpDeptName" style="width:200px"></el-input>
</el-form-item> -->
<el-form-item label="所属机构" label-width="90px">
<el-cascader
v-model="ids"
:options="options"
:props="{ checkStrictly: true }"
clearable
>
</el-cascader>
</el-form-item>
<el-form-item label="发布人" prop="nickName" label-width="90px">
<el-input v-model="dataForm.nickName" placeholder="发布人" clearable maxlength="10" @keyup.native="btKeyUpNickName" style="width:200px"></el-input>
</el-form-item>
</div>
<el-form-item label="发布时间" prop="startTime" label-width="90px">
<el-date-picker v-model="dataForm.startTime"
type="date"
:picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间"
style="width:200px">
</el-date-picker>
</el-form-item>
<el-form-item label="至" prop="endTime">
<el-date-picker v-model="dataForm.endTime"
type="date"
:picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间"
style="width:200px">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
<el-button @click="getDataListOverWrite()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button type="primary" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('news:monthgridsort:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
@ -16,20 +53,19 @@
</el-form-item>
</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 prop="id" label="主键" header-align="center" align="center"></el-table-column>
<el-table-column prop="infoId" label="信息ID" header-align="center" align="center"></el-table-column>
<el-table-column prop="deptId" label="部门ID" header-align="center" align="center"></el-table-column>
<el-table-column prop="deptName" label="部门名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="sort" label="排序" header-align="center" align="center"></el-table-column>
<el-table-column prop="revision" label="乐观锁" header-align="center" align="center"></el-table-column>
<el-table-column prop="delFlag" label="逻辑删除标识" header-align="center" align="center"></el-table-column>
<el-table-column prop="createdBy" 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 prop="updatedBy" label="更新人" header-align="center" align="center"></el-table-column>
<el-table-column prop="updatedTime" 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="month" label="月份" header-align="center" align="center" width="150"></el-table-column>
<el-table-column prop="deptNames" label="网格排序" header-align="center" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="nickName" label="发布人" header-align="center" align="center" width="250"></el-table-column>
<el-table-column prop="createdTime" label="发布时间" header-align="center" align="center" width="250"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button :disabled="scope.row.isUpdate == '0'" type="text" size="small" @click="addHandle(scope.row.infoId,'0')">{{ $t('update') }}</el-button>
<el-button type="text" size="small" @click="addHandle(scope.row.infoId,'1')">{{ '查看' }}</el-button>
<el-button v-if="$hasPermission('news:monthgridsort:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('news:monthgridsort:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
@ -58,18 +94,89 @@ export default {
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/news/monthgridsort/page',
getDataListURL: '/workRecord/monthgridsort/page',
getDataListIsPage: true,
deleteURL: '/news/monthgridsort',
deleteIsBatch: true
deleteURL: '/workRecord/monthgridsort',
deleteIsBatch: true,
exportURL: '/workRecord/monthgridsort/export'
},
dataForm: {
id: ''
id: '',
deptName: '',
nickName: ''
},
pickerBeginDateBefore: {
disabledDate: (time) => {
let beginDateVal = this.dataForm.endTime
if (beginDateVal) {
return time.getTime() > new Date(beginDateVal + ' 00:00:00').getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: (time) => {
let EndDateVal = this.dataForm.startTime
if (EndDateVal) {
return time.getTime() < new Date(EndDateVal + ' 00:00:00').getTime()
}
}
},
ids: [],
options: []
}
},
watch: {
ids: function (val) {
if (val.length === 0) {
this.dataForm.deptId = ''
} else {
this.dataForm.deptId = this.ids[val.length - 1]
}
}
},
components: {
AddOrUpdate
},
created: function () {
this.getDataList()
this.getOptions()
},
methods: {
addHandle (infoId, disabled) {
this.$parent.selectComponent = 'MonthgridsortDetail'
this.$router.push({ path: '/workRecord-Monthgridsortroute', query: { isAdd: '0', disabled: disabled, infoId: infoId } })
},
getDataListOverWrite () {
this.page = 1
this.getDataList()
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
btKeyUpDeptName (e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '')
this.dataForm.deptName = e.target.value
},
btKeyUpNickName (e) {
e.target.value = e.target.value.replace(/[`~!@#$%^&*()_+=<>?:"{}|·~!@#¥%……&*()——+={}|《》?:“”【】、;‘’,。、]/g, '')
this.dataForm.nickName = e.target.value
}
}
}
</script>
<style>
.el-tooltip__popper {
max-width: 80%;
color: #353434 !important;
background:#e6eaebf3 !important;
word-break:break-all;
}
</style>

219
src/views/modules/workRecord/monthgridsortDetail.vue

@ -0,0 +1,219 @@
<template>
<el-card shadow="never" class="aui-card--fill" v-loading="pageloading">
<div class="mod-__masteruserrelation}">
<!-- <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :disabled="pageDisabled"> -->
<div v-for="(item, index) in this.dataForm.sortList" :key="index">
<el-form :inline="true" :rules="dataRule" ref="item" :model="item" :disabled="pageDisabled">
<el-form-item prop="deptId" :label="'第'+(index+1)+'名:'" label-width="90px">
<el-cascader
:show-all-levels="true"
ref="name"
v-model="item.deptId"
:options="options"
:props="{ emitPath: false }"
@change="(value,selectedData)=>{changeHandle(value,selectedData,index)}"
style="width:500px;"
>
</el-cascader>&emsp;
<el-button @click="deleteUserMethod(index)">{{"删除"}}</el-button>
</el-form-item>
</el-form>
</div>
<!-- </el-form> -->
<el-form>
<el-form-item style="margin-left:250px;">
<el-button type="primary" @click="addSort" v-if="!pageDisabled" :disabled="isAble">{{"添加排名-名额"}}</el-button>
</el-form-item>
</el-form>
<el-form>
<el-form-item style="margin-left:18px;">
<el-button type="primary" @click="backToUserRelationList">{{"返回"}}</el-button>
<el-button v-if="!pageDisabled" type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</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>
</template>
</div>
</el-card>
</template>
<script>
import debounce from 'lodash/debounce'
import 'quill/dist/quill.snow.css'
export default {
data () {
return {
visible: false,
dataForm: {
infoId: '',
sortList: [ { deptId: '', deptName: '', sort: '0' }, { deptId: '', deptName: '', sort: '1' },
{ deptId: '', deptName: '', sort: '2' }, { deptId: '', deptName: '', sort: '3' }, { deptId: '', deptName: '', sort: '4' } ]
},
isAble: false,
pageDisabled: false,
pageloading: true,
options: [],
isAdd: '0' // 01
}
},
computed: {
dataRule () {
return {
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
created: function () {
this.getOptions()
},
components: {},
mounted () {
this.isAdd = this.$route.query.isAdd
if (this.$route.query.infoId !== '' && this.$route.query.infoId != null) {
this.dataForm.infoId = this.$route.query.infoId
}
if (this.$route.query.disabled === '0') {
this.pageDisabled = false
} else {
this.pageDisabled = true
}
if (this.$route.query.isAdd === '1') {
this.pageloading = false
} else {
this.getInfo()
}
},
methods: {
changeHandle (value, selectedData, index) {
this.dataForm.sortList[index].deptId = this.$refs['name'][index].getCheckedNodes()[0].value
let pathLabels = this.$refs['name'][index].getCheckedNodes()[0].pathLabels
let labels = ''
for (var i = 0; i < pathLabels.length; i++) {
labels += pathLabels[i] + '/'
}
if (labels.length > 0) {
labels = labels.substring(0, labels.length - 1)
}
this.dataForm.sortList[index].deptName = labels
// ID
let path = this.$refs['name'][index].getCheckedNodes()[0].path
let allDeptIds = ''
for (var j = 0; j < path.length; j++) {
allDeptIds += path[j] + ','
}
if (allDeptIds.length > 0) {
allDeptIds = allDeptIds.substring(0, allDeptIds.length - 1)
}
this.dataForm.sortList[index].allDeptIds = allDeptIds
},
//
addSort () {
this.dataForm.sortList.push({ deptId: '', deptName: '', sort: '' })
},
//
deleteUserMethod (index) {
if (this.dataForm.sortList.length === 1) {
this.dataForm.sortList = [{ deptId: '', deptName: '', sort: '' }]
} else {
this.dataForm.sortList.splice(index, 1)
}
},
init () {
this.dataForm.id = this.$route.query.id
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
// this.getInfo()
}
})
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
})
.catch(() => {})
},
//
backToUserRelationList () {
this.$emit('refreshDataList')
if (this.isAdd === '1' || this.isAdd === '2') {
this.$parent.selectComponent = 'Monthrecordinfo'
this.$router.push({ path: '/workRecord-Monthrecordinforoute' })
} else {
this.$parent.selectComponent = 'Monthgridsort'
this.$router.push({ path: '/workRecord-Monthgridsortroute' })
}
},
//
getInfo () {
this.$http.get(`/workRecord/monthgridsort/${this.dataForm.infoId}`).then(({ data: res }) => {
this.pageloading = false
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
let remindInfo = ''
var deptIdArr = []
for (var i = 0; i < this.dataForm.sortList.length; i++) {
this.dataForm.sortList[i].sort = i
if (this.dataForm.sortList[i].deptId === '' || this.dataForm.sortList[i].deptId === null) {
remindInfo += '第' + (i + 1) + '名、'
}
}
if (remindInfo.length > 0) {
remindInfo = remindInfo.substring(0, remindInfo.length - 1)
this.$message.error(remindInfo + '信息不完善,请完善后提交!')
return false
}
for (var j = 0; j < this.dataForm.sortList.length; j++) {
let deptId = this.dataForm.sortList[j].deptId
let deptName = this.dataForm.sortList[j].deptName
let data = deptIdArr.find(function (value) {
return value === deptId
})
if (data) {
this.$message.error('第' + (j + 1) + '名:' + deptName + '已存在,请更换网格!')
return false
}
deptIdArr.push(this.dataForm.sortList[j].deptId)
}
this.isAble = true
this.$http[this.$route.query.isAdd === '1' ? 'post' : 'put']('/workRecord/monthgridsort/', 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.isAble = false
this.visible = false
this.$emit('refreshDataList')
//
this.backToUserRelationList()
}
})
}).catch(() => {})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

29
src/views/modules/workRecord/monthgridsortroute.vue

@ -0,0 +1,29 @@
<template>
<keep-alive include="monthgridsort">
<component :is="selectComponent"></component>
</keep-alive>
</template>
<script>
import Monthgridsort from './monthgridsort'
import MonthgridsortDetail from './monthgridsortDetail'
export default {
data () {
return {
selectComponent: Monthgridsort
}
},
components: {
Monthgridsort,
MonthgridsortDetail
},
methods: {
init () {
this.selectComponent = Monthgridsort
}
}
}
</script>
<style lang="scss" scoped>
</style>

41
src/views/modules/workRecord/monthrecordinfo.vue

@ -49,7 +49,7 @@
<el-button v-if="$hasPermission('news:monthrecordinfo:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="addHandle('','0')">{{ $t('add') }}</el-button>
<el-button type="primary" @click="addHandle('','0','','','','')">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="exportHandle()">{{ $t('export') }}</el-button>
@ -71,13 +71,26 @@
<el-table-column prop="content" label="内容" header-align="center" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="state" 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="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="250">
<template slot-scope="scope">
<el-button :disabled="scope.row.isUpdate == '0'" type="text" size="small" @click="addHandle(scope.row.id,'0')">{{ $t('update') }}</el-button>
<el-button type="text" size="small" @click="addHandle(scope.row.id,'1')">{{ '查看' }}</el-button>
<el-button :disabled="scope.row.isUpdate == '0'" type="text" size="small" @click="addCaseHandle(scope.row.id,'0')">{{ '新建优秀案例' }}</el-button>
<el-button :disabled="scope.row.isUpdate == '0'" type="text" size="small" @click="addGridHandle(scope.row.id,'0')">{{ '新建示范网格' }}</el-button>
<div>
<el-button size="mini" type="primary" icon="el-icon-plus" :disabled="scope.row.isUpdate == '0' || scope.row.isHavePerson == '1'" @click="addPersonHandle(scope.row.id,'0')">{{ '身边榜样' }}</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" :disabled="scope.row.isUpdate == '0' || scope.row.isHaveCase == '1'" @click="addCaseHandle(scope.row.id,'0')">{{ '优秀案例' }}</el-button>
</div>
<div style="width:1px;height:5px;"></div>
<div>
<el-button size="mini" type="primary" icon="el-icon-plus" :disabled="scope.row.isUpdate == '0' || scope.row.isHaveGrid == '1'" @click="addGridHandle(scope.row.id,'0')">{{ '示范网格' }}</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" :disabled="scope.row.isUpdate == '0' || scope.row.isHaveSort == '1'" @click="addSortHandle(scope.row.id,'0')">{{ '网格排序' }}</el-button>
</div>
<div style="width:1px;height:5px;"></div>
<!-- <div>
<el-button v-if="$hasPermission('news:monthrecordinfo:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</div>
<div style="width:1px;height:1px;"></div> -->
<div>
<el-button size="mini" type="primary" icon="el-icon-edit" :disabled="scope.row.isUpdate == '0'" @click="addHandle(scope.row.id,'0',scope.row.caseId,scope.row.gridId,scope.row.personId,scope.row.isHaveSort)">{{ '修改月报' }}</el-button>
<el-button size="mini" type="primary" icon="el-icon-search" @click="addHandle(scope.row.id,'1',scope.row.caseId,scope.row.gridId,scope.row.personId,scope.row.isHaveSort)">{{ '查看月报' }}</el-button>
</div>
</template>
</el-table-column>
</el-table>
@ -152,9 +165,9 @@ export default {
this.getOptions()
},
methods: {
addHandle (id, disabled) {
addHandle (id, disabled, caseId, gridId, personId, isHaveSort) {
this.$parent.selectComponent = 'MonthrecordinfoDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: id, disabled: disabled } })
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: id, disabled: disabled, caseId: caseId, gridId: gridId, personId: personId, isHaveSort: isHaveSort } })
},
addCaseHandle (infoId, disabled) {
this.$parent.selectComponent = 'MonthexcellentcaseDetail'
@ -164,9 +177,17 @@ export default {
this.$parent.selectComponent = 'MonthexcellentgridDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: '', disabled: disabled, infoId: infoId } })
},
addPersonHandle (infoId, disabled) {
this.$parent.selectComponent = 'MonthexcellentpersonDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: '', disabled: disabled, infoId: infoId } })
},
addSortHandle (infoId, disabled) {
this.$parent.selectComponent = 'MonthgridsortDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { isAdd: '1', disabled: disabled, infoId: infoId } })
},
getOptions () {
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.get(`/sys/user/deptOptions/getDeptAuthByUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -198,7 +219,7 @@ export default {
.el-tooltip__popper {
max-width: 80%;
color: #353434 !important;
background:#ffffff !important;
background:#e6eaebf3 !important;
word-break:break-all;
}
</style>

80
src/views/modules/workRecord/monthrecordinfoDetail.vue

@ -1,7 +1,15 @@
<template>
<el-card shadow="never" class="aui-card--fill" v-loading="pageloading">
<div class="mod-__masteruserrelation}">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :disabled="pageDisabled">
<el-form>
<el-form-item style="margin-left:35px;">
<el-button v-if="isShowCaseBtn" type="primary" @click="goToCaseHandle()">{{ '优秀案例' }}</el-button>
<el-button v-if="isShowGridBtn" type="primary" @click="goToGridHandle()">{{ '示范网格' }}</el-button>
<el-button v-if="isShowPersonBtn" type="primary" @click="goToPersonHandle()">{{ '身边榜样' }}</el-button>
<el-button v-if="isShowSortBtn" type="primary" @click="goToSortHandle()">{{ '网格排序' }}</el-button>
</el-form-item>
</el-form>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :disabled="pageDisabled">
<el-form-item label="会议内容" prop="content" label-width="100px">
<el-input
type="textarea"
@ -12,9 +20,10 @@
style="width:50%">
</el-input>
</el-form-item>
<el-form-item label="添加图片" v-loading="loading" prop="images" label-width="90px">
<el-form-item label="添加图片" v-loading="loading" prop="images" label-width="100px">
<el-upload
:action="uploadUrl"
:disabled="isAble"
:class="{hide:hideUpload}"
list-type="picture-card"
:file-list="dataForm.images"
@ -32,9 +41,10 @@
</el-dialog>
<div><font color="gray">1~9张图</font></div>
</el-form-item>
<el-form-item label="添加文件" v-loading="fileloading" prop="files" label-width="90px">
<el-form-item label="添加文件" v-loading="fileloading" prop="files" label-width="100px">
<el-upload
class="upload-demo"
ref="upload"
:action="uploadFileUrl"
:before-remove="beforeFileRemove"
:file-list="dataForm.files"
@ -44,7 +54,7 @@
:on-error="handelError"
:on-preview="handleFileCardPreview"
style="width:480px">
<el-button size="small">点击上传</el-button>
<el-button size="small" :disabled="isAble">点击上传</el-button>
<div slot="tip" class="el-upload__tip">支持.wordPDFExcel文件</div>
</el-upload>
</el-form-item>
@ -96,7 +106,15 @@ export default {
dialogVisible: false,
isAutoRemoveFile: true,
fileloading: false,
pageloading: true
pageloading: true,
isShowCaseBtn: false,
isShowGridBtn: false,
isShowPersonBtn: false,
isShowSortBtn: false,
caseId: '',
gridId: '',
personId: '',
queryDisabled: ''
}
},
computed: {
@ -118,6 +136,7 @@ export default {
MapSelect
},
mounted () {
this.queryDisabled = this.$route.query.disabled
if (this.$route.query.disabled === '0') {
this.pageDisabled = false
this.hideUpload = false
@ -131,8 +150,43 @@ export default {
} else {
this.pageloading = false
}
if (this.$route.query.caseId !== '' && this.$route.query.caseId != null) {
//
this.isShowCaseBtn = true
this.caseId = this.$route.query.caseId
}
if (this.$route.query.gridId !== '' && this.$route.query.gridId != null) {
//
this.isShowGridBtn = true
this.gridId = this.$route.query.gridId
}
if (this.$route.query.personId !== '' && this.$route.query.personId != null) {
//
this.isShowPersonBtn = true
this.personId = this.$route.query.personId
}
if (this.$route.query.isHaveSort === '1') {
//
this.isShowSortBtn = true
}
},
methods: {
goToCaseHandle () {
this.$parent.selectComponent = 'MonthexcellentcaseDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: this.caseId, disabled: this.queryDisabled, infoId: this.dataForm.id } })
},
goToGridHandle () {
this.$parent.selectComponent = 'MonthexcellentgridDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: this.gridId, disabled: this.queryDisabled, infoId: this.dataForm.id } })
},
goToPersonHandle () {
this.$parent.selectComponent = 'MonthexcellentpersonDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { id: this.personId, disabled: this.queryDisabled, infoId: this.dataForm.id } })
},
goToSortHandle () {
this.$parent.selectComponent = 'MonthgridsortDetail'
this.$router.push({ path: '/workRecord-Monthrecordinforoute', query: { isAdd: '2', disabled: this.queryDisabled, infoId: this.dataForm.id } })
},
init () {
this.dataForm.id = this.$route.query.id
this.visible = true
@ -156,12 +210,17 @@ export default {
if (!isJPG && !isPNG) {
this.$message.error('上传文件必须是jpg、png格式!')
this.loading = false
this.isAble = false
return false
}
},
handleAvatarSuccess (res, file) {
this.loading = false
this.isAble = false
if (res === null || res.data === null || res.data.imgUrl === null) {
this.$message.error('文件上传失败!')
return false
}
this.dataForm.images.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 1, recordType: 1, fileName: res.data.fileName })
this.hideUpload = this.dataForm.images.length >= 9
},
@ -214,11 +273,22 @@ export default {
}
}
},
handleErrorRemove (file) {
//
let fileList = this.$refs.upload.uploadFiles
for (var i = 0; i < fileList.length; i++) {
let item = fileList[i]
if (item.url === file.url) {
fileList.splice(i, 1)
}
}
},
handleAvatarFileSuccess (res, file) {
this.fileloading = false
this.isAble = false
if (res === null || res.data === null || res.data.imgUrl === null) {
this.$message.error('文件上传失败!')
this.handleErrorRemove(file)
return false
}
this.dataForm.files.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 2, recordType: 1, fileName: res.data.fileName, name: res.data.fileName })

6
src/views/modules/workRecord/monthrecordinforoute.vue

@ -8,6 +8,8 @@ import Monthrecordinfo from './monthrecordinfo'
import MonthrecordinfoDetail from './monthrecordinfoDetail'
import MonthexcellentcaseDetail from './monthexcellentcaseDetail'
import MonthexcellentgridDetail from './monthexcellentgridDetail'
import MonthexcellentpersonDetail from './monthexcellentpersonDetail'
import MonthgridsortDetail from './monthgridsortDetail'
export default {
data () {
return {
@ -18,7 +20,9 @@ export default {
Monthrecordinfo,
MonthrecordinfoDetail,
MonthexcellentcaseDetail,
MonthexcellentgridDetail
MonthexcellentgridDetail,
MonthexcellentpersonDetail,
MonthgridsortDetail
},
methods: {
init () {

2
src/views/modules/workRecord/weekrecordinfo.vue

@ -189,7 +189,7 @@ export default {
.el-tooltip__popper {
max-width: 80%;
color: #353434 !important;
background:#ffffff !important;
background:#e6eaebf3 !important;
word-break:break-all;
}
</style>

19
src/views/modules/workRecord/weekrecordinfoDetail.vue

@ -1,7 +1,7 @@
<template>
<el-card shadow="never" class="aui-card--fill" v-loading="pageloading">
<div class="mod-__masteruserrelation}">
<el-form label-width="370px" label-position="left" :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :disabled="pageDisabled">
<el-form label-width="370px" label-position="left" :model="dataForm" :rules="dataRule" ref="dataForm" :disabled="pageDisabled">
<div v-for="(item, index) in this.dataForm.totalConfigList" :key="index">
<div>
<el-form-item :label="item.totalDescribe" prop="showFlag" style="font-weight:bold;" :label-width="(item.totalDescribe.length*15+5)+'px'">
@ -53,6 +53,7 @@
</el-form-item>
<el-form-item label="添加文件" v-loading="fileloading" prop="files" label-width="90px">
<el-upload
ref="upload"
class="upload-demo"
:action="uploadFileUrl"
:before-remove="beforeFileRemove"
@ -191,12 +192,18 @@ export default {
if (!isJPG && !isPNG) {
this.$message.error('上传文件必须是jpg、png格式!')
this.loading = false
this.isAble = false
return false
}
},
handleAvatarSuccess (res, file) {
this.loading = false
this.isAble = false
if (res === null || res.data === null || res.data.imgUrl === null) {
this.$message.error('文件上传失败!')
this.handleErrorRemove(file)
return false
}
this.dataForm.images.push({ url: res.data.imgUrl, thumbnail: res.data.thumbnail, fileType: 1, fileName: res.data.fileName })
this.hideUpload = this.dataForm.images.length >= 9
},
@ -206,6 +213,16 @@ export default {
this.isAble = false
this.$message.error('上传文件失败!')
},
handleErrorRemove (file) {
//
let fileList = this.$refs.upload.uploadFiles
for (var i = 0; i < fileList.length; i++) {
let item = fileList[i]
if (item.url === file.url) {
fileList.splice(i, 1)
}
}
},
handleRemove (file, fileList) {
for (var i = 0; i < this.dataForm.images.length; i++) {
let item = this.dataForm.images[i]

Loading…
Cancel
Save