Commit 27678366 by wangchunyang

1 超期没评分的,可以提交评分,记录实际评分时间。

2 评分的时候,如果状态是有的需要显示多加一行备注,必填。下面也需要多一个参会人员,和评分时间,手动维护。
3 重点人员导入功能(刑满释放/严重精神/重点未成年人)
4 双属地功能,相关统计页面统计及评价操作,原属地可见(可编辑,不可评价)新属地(不可编辑,可评价)
5 页面a.b.c要有红黄绿颜色
parent c390e525
......@@ -264,3 +264,12 @@ export const getVisitButtonPower = (param) => {
data: param
})
}
// 导入数据(文件流)
export const importExcel = (param) => {
return axios.request({
url: '/api/ac/jilinsscgsdp/keyPersonRatingHistoryService/importExcel',
method: 'post',
data: param
})
}
......@@ -246,6 +246,17 @@
<h3 style="font-weight: bold; font-size: 24px; margin-left: 30px;">{{ ratingWarningData.summary.overdue }}</h3>
</div>
</Col>
<!-- <Col span="3">
<div>
<div class="flexc" style="padding-left: 16px;">
<div class="dot-css"></div>
<div style="margin-left: 10px;">
<h3 style="font-size: 14px;">超期评分数量</h3>
</div>
</div>
<h3 style="font-weight: bold; font-size: 24px; margin-left: 30px;">{{ ratingWarningData.summary.overdueDone }}</h3>
</div>
</Col> -->
</Row>
<Row>
<Col span="8">
......@@ -485,7 +496,10 @@ export default {
// 指定图表的配置项和数据
var option = {
legend: {
top: 'bottom'
top: 'bottom',
textStyle: {
color: ['#ff9c9c', '#ffe757', '#65c1ff'] // 图例文字颜色
}
},
title: {
// text: '阅读书籍分布',
......@@ -591,7 +605,10 @@ export default {
// 指定图表的配置项和数据
var option = {
legend: {
top: 'bottom'
top: 'bottom',
textStyle: {
color: ['#ff9c9c', '#ffe757', '#65c1ff'] // 图例文字颜色
}
},
title: {
// text: '阅读书籍分布',
......@@ -697,7 +714,10 @@ export default {
// 指定图表的配置项和数据
var option = {
legend: {
top: 'bottom'
top: 'bottom',
textStyle: {
color: ['#ff9c9c', '#ffe757', '#65c1ff'] // 图例文字颜色
}
},
title: {
// text: '阅读书籍分布',
......
......@@ -25,7 +25,24 @@
<template slot-scope="{ row, index }" slot="score">
<InputNumber v-model="dataList[index].details" min="dataList[index].min_num" max="dataList[index].max_num" :placeholder="dataList[index].min_num + '至' + dataList[index].max_num" :disabled="dataList[index].is_whether === '2'"></InputNumber>
</template>
<template slot-scope="{ row, index }" slot="remarks">
<Input v-model="dataList[index].remarks" placeholder="请填写备注" :disabled="dataList[index].is_whether === '2'"></Input>
</template>
</Table>
<div class="disputetype" style="padding: 10px;" v-if="this.params.isHide">
<div>
<Row type="flex" class="">
<Col span="10">
<span>参会人员:</span>
<Input v-model="ratingUsers" placeholder="请输入" style="width: 65%"/>
</Col>
<Col span="10">
<span>评分时间:</span>
<DatePicker type="datetime" v-model="ratingTime" format="yyyy-MM-dd HH:mm:ss"></DatePicker>
</Col>
</Row>
</div>
</div>
<div style="display: flex; justify-content: center; gap: 10px; margin-top: 20px;" v-if="loding">
<Poptip confirm title="确认提交?" placement="top" transfer @on-ok="saveRating">
<Button type="primary" style="margin-top: 20px;" v-if="this.params.isHide">提交</Button>
......@@ -76,6 +93,7 @@ import {
selectRatingSummaryByPersonIdList, // 评分详情
selectSummaryRatingDetailsList // 历史详情
} from '@/api/key-person'
import xeUtil from 'xe-utils'
export default {
data () {
return {
......@@ -96,7 +114,8 @@ export default {
{ title: '评估类别', key: 'evaluate_type', minWidth: 100, align: 'center' },
{ title: '评估选项', key: 'scoring_project', minWidth: 220, align: 'center' },
{ title: '选择', slot: 'select', align: 'center' },
{ title: '分值', slot: 'score', align: 'center' }
{ title: '分值', slot: 'score', align: 'center' },
{ title: '备注', slot: 'remarks', align: 'left' }
],
dataList: [],
SummaryRatingDetailsListColumns: [
......@@ -104,24 +123,29 @@ export default {
{ title: '评估类别', key: 'evaluate_type', minWidth: 100, align: 'center' },
{ title: '评估选项', key: 'scoring_project', minWidth: 220, align: 'center' },
{ title: '选择', key: 'is_whether', align: 'center' },
{ title: '分值', key: 'details', align: 'center' }
{ title: '分值', key: 'details', align: 'center' },
{ title: '备注', key: 'rating_remarks', align: 'left' }
],
indicatory: false,
summaryColumns: [
{ title: '序号', type: 'index', width: 70, align: 'center' },
{ title: '评分人员', key: 'rating_personnel', minWidth: 100, align: 'center' },
{ title: '评分部门', key: 'rating_company', minWidth: 100, align: 'center' },
{ title: '参会人员', key: 'rating_users', minWidth: 100, align: 'center' },
{ title: '评分时间', key: 'rating_time', minWidth: 100, align: 'center' },
{ title: '评分风险等级', key: 'rating_type', minWidth: 100, align: 'center' },
{ title: '分数', key: 'rating', minWidth: 100, align: 'center' },
{ title: '操作', slot: 'action', align: 'center' }
],
showErrorModal: false, // 控制错误弹窗显示/隐藏
errorList: [] // 存储所有错误信息
errorList: [], // 存储所有错误信息
ratingUsers: '', // 存储参会人员
ratingTime: '' // 存储评分时间
}
},
methods: {
init () {
this.ratingTime = xeUtil.toDateString(new Date(), 'yyyy-MM-dd HH:mm:ss')
selectRatingDictList({ rating_dict_type: this.params.ratingDictType }).then((ret) => {
if (ret.data.errcode === 0) {
// this.dataList = ret.data.data
......@@ -166,7 +190,7 @@ export default {
this.summaryByPerson(this.params)
},
showSummaryRatingDetail (row) {
this.modalName = '历史评分(' + String(row.rating_time) + ')'
this.modalName = '历史评分(' + String(row.rating_custom_time == null ? row.rating_time : row.rating_custom_time) + ')' + (row.rating_users == null ? '' : '参会人员(' + row.rating_users + ')')
this.indicatory = true
selectSummaryRatingDetailsList({ key_person_rating_summary_id: row.id }).then((ret) => {
if (ret.data.errcode === 0) {
......@@ -192,9 +216,20 @@ export default {
this.errorList.push(
`第${index + 1}项【${item.scoring_project}】分值需在${item.min_num}-${item.max_num}之间`
)
} else if (item.remarks === null || item.remarks === undefined || item.remarks.trim() === '') {
// 备注空值校验
this.errorList.push(
`第${index + 1}项【${item.scoring_project}】选择“有”,请填写备注`
)
}
}
})
if (this.ratingUsers === null || this.ratingUsers === undefined || this.ratingUsers.trim() === '') {
this.errorList.push(`请填写参会人员`)
}
if (this.ratingTime === null || this.ratingTime === undefined || this.ratingTime === '') {
this.errorList.push(`请填写评分时间`)
}
// 若有错误,显示弹窗;否则返回校验通过
if (this.errorList.length > 0) {
this.showErrorModal = true
......@@ -216,6 +251,8 @@ export default {
// return item.is_whether === '1' // 只保留“有”的记录
// })
this.params.ratingDetailsList = ratingDetailsList
this.params.ratingUsers = this.ratingUsers
this.params.ratingTime = this.ratingTime
saveRatingDetails(this.params).then((ret) => {
if (ret.data.errcode === 0) {
this.$Notice.success({ title: '评分成功' })
......
......@@ -6,9 +6,10 @@
<div v-if="row.doStatus === '0'">待评</div>
<div v-else-if="row.doStatus === '1'">已评</div>
<div v-else-if="row.doStatus === '2'">超期未评</div>
<div v-else-if="row.doStatus === '3'">超期已评</div>
</template>
<template slot-scope="{ row, index }" slot="action">
<Button v-if="canShowVisit(row)" type="info" size="small" style="margin-right: 5px" @click="showRatingList(row)" :disabled="(row.canClick == '1' && row.doStatus !== '2')?false:true ">评分</Button>
<Button v-if="canShowVisit(row)" type="info" size="small" style="margin-right: 5px" @click="showRatingList(row)" :disabled="(row.canClick == '1' || row.doStatus == '2')?false:true ">评分</Button>
<Button type="info" size="small" style="margin-right: 5px" @click="showRatingInfo(row)">详情</Button>
</template>
</Table>
......@@ -108,6 +109,7 @@ export default {
const power = this.visitButtonPower || {}
const type = String(row.ratingDictType || '')
if (isAdmin) return true
if (row.dualMark === '1') return false
if (type === '2') return !!power['rucs_rating']
if (type === '3') return !!power['psmd_rating']
if (type === '6') return !!power['km_rating']
......
......@@ -1186,7 +1186,12 @@ export default {
{ id: 2, name: '有重大疾病' },
{ id: 3, name: '有暴力倾向' },
{ id: 4, name: '有弃世厌世倾向' },
{ id: 5, name: '扬言报复社会' }
{ id: 5, name: '扬言报复社会' },
{ id: 6, name: '重新犯罪' },
{ id: 7, name: '黑恶' },
{ id: 8, name: '恶性犯罪' },
{ id: 9, name: '邪教' },
{ id: 10, name: '三无人员' }
],
ruleValidate: {
key_focus_personnel_type: [
......
......@@ -932,7 +932,12 @@ export default {
{ highlyConcernedSituation: '有重大疾病' },
{ highlyConcernedSituation: '有暴力倾向' },
{ highlyConcernedSituation: '有弃世厌世倾向' },
{ highlyConcernedSituation: '扬言报复社会' }
{ highlyConcernedSituation: '扬言报复社会' },
{ highlyConcernedSituation: '重新犯罪' },
{ highlyConcernedSituation: '黑恶' },
{ highlyConcernedSituation: '恶性犯罪' },
{ highlyConcernedSituation: '邪教' },
{ highlyConcernedSituation: '三无人员' }
],
ruleValidate: {
name: [
......
......@@ -159,6 +159,7 @@
<!-- <Button type="primary" @click="handleDownload" style="margin-right: 10px;">导出</Button>-->
<!-- v-if="severUserInfo.company_grade === '6'"-->
<Button type="primary" @click="importShow = true" style="margin-right: 10px;">导入</Button>
<Button
type="primary"
style="margin-right: 10px"
......@@ -230,6 +231,7 @@
size="small"
style="margin-right: 5px"
@click="showFamily(row)"
:disabled="row.dualPerson == '1'"
>家庭成员</Button
>
<Button
......@@ -244,6 +246,7 @@
size="small"
style="margin-right: 5px"
@click="updatePeopleInfo(row)"
:disabled="row.dualPerson == '1'"
>编辑</Button
>
<Button
......@@ -251,13 +254,14 @@
size="small"
style="margin-right: 5px"
@click="deletePeopleInfo(row)"
:disabled="row.dualPerson == '1'"
>删除</Button
>
<Button
type="info"
size="small"
v-if="canShowVisit(row) && cityType"
:disabled="(row.canClick == '1' && row.doStatus !== '2')?false:true"
:disabled="(row.canClick == '1' && row.doStatus !== '2' && row.dualPersonBelong != '1')?false:true"
style="margin-right: 5px"
@click="showRatingList(row)"
>评分</Button
......@@ -1124,6 +1128,30 @@
>
</div>
</Modal>
<Modal v-model="importShow" title="数据导入" width="300">
<Row type="flex" justify="center" align="middle">
<Col span="10">
<div style="text-align: center;">
<Upload
:show-upload-list="false"
:before-upload="handleBeforeUpload"
:format="['xls','xlsx']"
accept=".xls,.xlsx"
:max-size="4096">
<Button icon="ios-cloud-upload-outline" type="primary" :loading="impBtnDisabled">导入</Button>
</Upload>
</div>
</Col>
<Col span="12">
<div style="text-align: center;">
<Button type="primary" @click="tplDownload" style="margin-right: 10px;">下载模板</Button>
</div>
</Col>
</Row>
<div slot="footer">
<Button size="large" type="text" @click="importShow = false">关闭</Button>
</div>
</Modal>
</div>
<family-manage ref="family" :peopleInfo="peopleInfo"></family-manage>
<rating-history-list :peopleInfo="peopleInfo" ref="ratingHistoryListRef"></rating-history-list>
......@@ -1154,7 +1182,8 @@ import {
deletePeopleZFLog,
getLoginUserAreaInfo,
doStatusAllCount,
getVisitButtonPower
getVisitButtonPower,
importExcel
} from '@/api/peopleInfo'
import {
findEventPageList,
......@@ -1217,7 +1246,12 @@ export default {
{ highlyConcernedSituation: '有重大疾病' },
{ highlyConcernedSituation: '有暴力倾向' },
{ highlyConcernedSituation: '有弃世厌世倾向' },
{ highlyConcernedSituation: '扬言报复社会' }
{ highlyConcernedSituation: '扬言报复社会' },
{ highlyConcernedSituation: '重新犯罪' },
{ highlyConcernedSituation: '黑恶' },
{ highlyConcernedSituation: '恶性犯罪' },
{ highlyConcernedSituation: '邪教' },
{ highlyConcernedSituation: '三无人员' }
],
ruleValidate: {
name: [{ required: true, message: '必填', trigger: 'blur' }],
......@@ -1569,7 +1603,9 @@ export default {
currentUserLevel: '', // 当前用户层级,用于控制下拉框禁用状态
todoCount: '',
doneCount: '',
visitButtonPower: {}
visitButtonPower: {},
importShow: false,
impBtnDisabled: false
}
},
methods: {
......@@ -2503,6 +2539,84 @@ export default {
this.$Modal.remove()
}
})
},
async tplDownload () {
try {
const response = await axios.post(
'/api/ac/jilinsscgsdp/keyPersonRatingHistoryService/templateDownload',
{ ...this.searchInfo, sysType: '2' },
{
responseType: 'blob'
}
)
const url = window.URL.createObjectURL(new Blob([response.data]))
// 创建隐藏的a标签并设置属性
const link = document.createElement('a')
link.href = url
link.download = '重点人群导入模板.xlsx' // 自定义下载文件名和扩展名
link.style.display = 'none'
document.body.appendChild(link)
// 触发点击下载
link.click()
// 清理
document.body.removeChild(link)
window.URL.revokeObjectURL(url)
} catch (error) {
console.error('下载失败:', error)
// 可以在这里添加错误提示
}
},
handleBeforeUpload (file) {
console.log('fileupload....')
const fileExt = file.name.split('.').pop().toLocaleLowerCase()
if (fileExt === 'xlsx' || fileExt === 'xls') {
this.readFile(file)
} else {
this.$Notice.warning({
title: '文件类型错误',
desc: '文件:' + file.name + '不是EXCEL文件,请选择后缀为.xlsx或者.xls的EXCEL文件。'
})
}
return false
},
// 读取文件
async readFile (file) {
this.impBtnDisabled = true
const formdata = new FormData()
formdata.append('file', file)
formdata.append('fileName', file.name)
formdata.append('sysType', 2)
formdata.append('cityId', this.peopleForm.cityId)
const ret = await importExcel(formdata)
if (ret != null && ret.success > 0) {
this.importShow = false
this.impBtnDisabled = false
let mobj = ret.data.data
let msg = '添加' + mobj.insert + '条, 更新' + mobj.update + '条'
if (mobj.error !== 0) {
msg += ', 缺少关键信息未能导入' + mobj.error + '条'
}
if (mobj.errInfo && mobj.errInfo !== '') {
msg += ', 以下人员位置信息未找到未能导入' + mobj.errInfo
}
if (ret.data.errmsg !== 'success') {
msg += ret.data.errmsg
}
if (mobj.insert + mobj.update > 0) {
this.searchData()
}
this.$Notice.success({
title: '导入完成!',
desc: msg
})
} else {
this.impBtnDisabled = false
this.$Notice.warning({
title: '未导入数据!',
desc: ret.data.errmsg
})
}
}
},
mounted () {
......
......@@ -134,6 +134,7 @@
<Col
style="text-align: right"
>
<Button type="primary" @click="importShow = true" style="margin-right: 10px;">导入</Button>
<Button
type="primary"
@click="searchData"
......@@ -186,6 +187,7 @@
size="small"
style="margin-right: 5px"
@click="showFamily(row)"
:disabled="row.dualPerson == '1'"
>家庭成员</Button
>
<Button
......@@ -200,6 +202,7 @@
size="small"
style="margin-right: 5px"
@click="updatePeopleInfo(row)"
:disabled="row.dualPerson == '1'"
>编辑</Button
>
<Button
......@@ -207,13 +210,14 @@
size="small"
style="margin-right: 5px"
@click="deletePeopleInfo(row)"
:disabled="row.dualPerson == '1'"
>删除</Button
>
<Button
type="info"
size="small"
v-if="canShowVisit(row) && cityType"
:disabled="(row.canClick == '1' && row.doStatus !== '2')?false:true"
:disabled="(row.canClick == '1' && row.doStatus !== '2' && row.dualPersonBelong != '1')?false:true"
style="margin-right: 5px"
@click="showRatingList(row)"
>评分</Button
......@@ -1026,6 +1030,30 @@
>
</div>
</Modal>
<Modal v-model="importShow" title="数据导入" width="300">
<Row type="flex" justify="center" align="middle">
<Col span="10">
<div style="text-align: center;">
<Upload
:show-upload-list="false"
:before-upload="handleBeforeUpload"
:format="['xls','xlsx']"
accept=".xls,.xlsx"
:max-size="4096">
<Button icon="ios-cloud-upload-outline" type="primary" :loading="impBtnDisabled">导入</Button>
</Upload>
</div>
</Col>
<Col span="12">
<div style="text-align: center;">
<Button type="primary" @click="tplDownload" style="margin-right: 10px;">下载模板</Button>
</div>
</Col>
</Row>
<div slot="footer">
<Button size="large" type="text" @click="importShow = false">关闭</Button>
</div>
</Modal>
</div>
<family-manage :peopleInfo="peopleInfo" ref="family"></family-manage>
<rating-history-list :peopleInfo="peopleInfo" ref="ratingHistoryListRef"></rating-history-list>
......@@ -1055,7 +1083,8 @@ import {
deletePeopleZFLog,
getLoginUserAreaInfo,
doStatusAllCount,
getVisitButtonPower
getVisitButtonPower,
importExcel
} from '@/api/peopleInfo'
import {
findEventPageList,
......@@ -1122,7 +1151,12 @@ export default {
{ highlyConcernedSituation: '有重大疾病' },
{ highlyConcernedSituation: '有暴力倾向' },
{ highlyConcernedSituation: '有弃世厌世倾向' },
{ highlyConcernedSituation: '扬言报复社会' }
{ highlyConcernedSituation: '扬言报复社会' },
{ highlyConcernedSituation: '重新犯罪' },
{ highlyConcernedSituation: '黑恶' },
{ highlyConcernedSituation: '恶性犯罪' },
{ highlyConcernedSituation: '邪教' },
{ highlyConcernedSituation: '三无人员' }
],
ruleValidate: {
name: [{ required: true, message: '必填', trigger: 'blur' }],
......@@ -1455,7 +1489,9 @@ export default {
zfListId: '',
todoCount: '',
doneCount: '',
visitButtonPower: {}
visitButtonPower: {},
importShow: false,
impBtnDisabled: false
}
},
methods: {
......@@ -2362,6 +2398,84 @@ export default {
this.$Modal.remove()
}
})
},
async tplDownload () {
try {
const response = await axios.post(
'/api/ac/jilinsscgsdp/keyPersonRatingHistoryService/templateDownload',
{ ...this.searchInfo, sysType: '3' },
{
responseType: 'blob'
}
)
const url = window.URL.createObjectURL(new Blob([response.data]))
// 创建隐藏的a标签并设置属性
const link = document.createElement('a')
link.href = url
link.download = '重点人群导入模板.xlsx' // 自定义下载文件名和扩展名
link.style.display = 'none'
document.body.appendChild(link)
// 触发点击下载
link.click()
// 清理
document.body.removeChild(link)
window.URL.revokeObjectURL(url)
} catch (error) {
console.error('下载失败:', error)
// 可以在这里添加错误提示
}
},
handleBeforeUpload (file) {
console.log('fileupload....')
const fileExt = file.name.split('.').pop().toLocaleLowerCase()
if (fileExt === 'xlsx' || fileExt === 'xls') {
this.readFile(file)
} else {
this.$Notice.warning({
title: '文件类型错误',
desc: '文件:' + file.name + '不是EXCEL文件,请选择后缀为.xlsx或者.xls的EXCEL文件。'
})
}
return false
},
// 读取文件
async readFile (file) {
this.impBtnDisabled = true
const formdata = new FormData()
formdata.append('file', file)
formdata.append('fileName', file.name)
formdata.append('sysType', 3)
formdata.append('cityId', this.peopleForm.cityId)
const ret = await importExcel(formdata)
if (ret != null && ret.success > 0) {
this.importShow = false
this.impBtnDisabled = false
let mobj = ret.data.data
let msg = '添加' + mobj.insert + '条, 更新' + mobj.update + '条'
if (mobj.error !== 0) {
msg += ', 缺少关键信息未能导入' + mobj.error + '条'
}
if (mobj.errInfo && mobj.errInfo !== '') {
msg += ', 以下人员位置信息未找到未能导入' + mobj.errInfo
}
if (ret.data.errmsg !== 'success') {
msg += ret.data.errmsg
}
if (mobj.insert + mobj.update > 0) {
this.searchData()
}
this.$Notice.success({
title: '导入完成!',
desc: msg
})
} else {
this.impBtnDisabled = false
this.$Notice.warning({
title: '未导入数据!',
desc: ret.data.errmsg
})
}
}
},
mounted () {
......
......@@ -1026,7 +1026,12 @@ export default {
{ highlyConcernedSituation: '有重大疾病' },
{ highlyConcernedSituation: '有暴力倾向' },
{ highlyConcernedSituation: '有弃世厌世倾向' },
{ highlyConcernedSituation: '扬言报复社会' }
{ highlyConcernedSituation: '扬言报复社会' },
{ highlyConcernedSituation: '重新犯罪' },
{ highlyConcernedSituation: '黑恶' },
{ highlyConcernedSituation: '恶性犯罪' },
{ highlyConcernedSituation: '邪教' },
{ highlyConcernedSituation: '三无人员' }
],
ruleValidate: {
name: [{ required: true, message: '必填', trigger: 'blur' }],
......
......@@ -1015,7 +1015,12 @@ export default {
{ highlyConcernedSituation: '有重大疾病' },
{ highlyConcernedSituation: '有暴力倾向' },
{ highlyConcernedSituation: '有弃世厌世倾向' },
{ highlyConcernedSituation: '扬言报复社会' }
{ highlyConcernedSituation: '扬言报复社会' },
{ highlyConcernedSituation: '重新犯罪' },
{ highlyConcernedSituation: '黑恶' },
{ highlyConcernedSituation: '恶性犯罪' },
{ highlyConcernedSituation: '邪教' },
{ highlyConcernedSituation: '三无人员' }
],
ruleValidate: {
name: [{ required: true, message: '必填', trigger: 'blur' }],
......
......@@ -141,6 +141,8 @@
style="margin-right: 10px"
>搜索</Button
>
<Button type="primary" @click="importShow = true" style="margin-right: 10px;">导入</Button>
<Button type="primary" @click="handleDownload" style="margin-right: 10px;">导出</Button>
<!-- v-if="severUserInfo.company_grade === '6'"-->
<Button type="primary" @click="searchPeople">新增</Button>
......@@ -192,6 +194,7 @@
size="small"
style="margin-right: 5px"
@click="showFamily(row)"
:disabled="row.dualPerson == '1'"
>家庭成员</Button
>
<Button
......@@ -206,6 +209,7 @@
size="small"
style="margin-right: 5px"
@click="updatePeopleInfo(row)"
:disabled="row.dualPerson == '1'"
>编辑</Button
>
<Button
......@@ -213,6 +217,7 @@
size="small"
style="margin-right: 5px"
@click="deletePeopleInfo(row)"
:disabled="row.dualPerson == '1'"
>删除</Button
>
<!-- <Button type="info" size="small" @click="findPeopleZFLogList(row)"-->
......@@ -222,7 +227,7 @@
type="info"
size="small"
v-if="canShowVisit(row)"
:disabled="(row.canClick == '1' && row.doStatus !== '2')?false:true"
:disabled="(row.canClick == '1' && row.doStatus !== '2' && row.dualPersonBelong != '1')?false:true"
style="margin-right: 5px"
@click="showRatingList(row)"
>评分</Button
......@@ -563,7 +568,7 @@
</p>
</Col>
</Row>
<!-- <Row style="margin-top: 15px">
<Row style="margin-top: 15px">
<Col span="23">
<p style="height: 40px">
<FormItem label="高度关注情形">
......@@ -582,7 +587,7 @@
</FormItem>
</p>
</Col>
</Row> -->
</Row>
<Row style="margin-top: 15px">
<Col span="12">
<p style="height: 40px">
......@@ -976,6 +981,46 @@
>
</div>
</Modal>
<Modal v-model="controlData.show" title="输入证件号码" width="500">
<Row>
<Col
span="6"
style="text-align: right; margin-right: 10px; margin-top: 6px"
>证件号码:</Col
>
<Col span="14">
<Input v-model="controlData.cardnoInput" :maxlength="64" placeholder=""></Input>
</Col>
</Row>
<div slot="footer">
<Button size="large" type="text" @click="controlData.show = false">取消</Button>
<Button size="large" type="primary" @click="searchConfirm">确定</Button>
</div>
</Modal>
<Modal v-model="importShow" title="数据导入" width="300">
<Row type="flex" justify="center" align="middle">
<Col span="10">
<div style="text-align: center;">
<Upload
:show-upload-list="false"
:before-upload="handleBeforeUpload"
:format="['xls','xlsx']"
accept=".xls,.xlsx"
:max-size="4096">
<Button icon="ios-cloud-upload-outline" type="primary" :loading="impBtnDisabled">导入</Button>
</Upload>
</div>
</Col>
<Col span="12">
<div style="text-align: center;">
<Button type="primary" @click="tplDownload" style="margin-right: 10px;">下载模板</Button>
</div>
</Col>
</Row>
<div slot="footer">
<Button size="large" type="text" @click="importShow = false">关闭</Button>
</div>
</Modal>
</div>
<family-manage :peopleInfo="peopleInfo" ref="family"></family-manage>
<rating-history-list :peopleInfo="peopleInfo" ref="ratingHistoryListRef"></rating-history-list>
......@@ -1005,7 +1050,8 @@ import {
deletePeopleZFLog,
getLoginUserAreaInfo,
doStatusAllCount,
getVisitButtonPower
getVisitButtonPower,
importExcel
} from '@/api/peopleInfo'
import {
findEventPageList,
......@@ -1071,7 +1117,12 @@ export default {
{ highlyConcernedSituation: '有重大疾病' },
{ highlyConcernedSituation: '有暴力倾向' },
{ highlyConcernedSituation: '有弃世厌世倾向' },
{ highlyConcernedSituation: '扬言报复社会' }
{ highlyConcernedSituation: '扬言报复社会' },
{ highlyConcernedSituation: '重新犯罪' },
{ highlyConcernedSituation: '黑恶' },
{ highlyConcernedSituation: '恶性犯罪' },
{ highlyConcernedSituation: '邪教' },
{ highlyConcernedSituation: '三无人员' }
],
ruleValidate: {
name: [{ required: true, message: '必填', trigger: 'blur' }],
......@@ -1359,7 +1410,9 @@ export default {
paramsStatistics: this.$route.paramsStatistics,
todoCount: '',
doneCount: '',
visitButtonPower: {}
visitButtonPower: {},
importShow: false,
impBtnDisabled: false
}
},
methods: {
......@@ -1588,14 +1641,14 @@ export default {
},
async showDetail (data) {
this.title = '详情'
// let keyPersonArr = []
// for (let i = 0; i < data.keyPersonHighlyConcernedRel.length; i++) {
// keyPersonArr.push(
// data.keyPersonHighlyConcernedRel[i].highlyConcernedSituation
// )
// }
let keyPersonArr = []
for (let i = 0; i < data.keyPersonHighlyConcernedRel.length; i++) {
keyPersonArr.push(
data.keyPersonHighlyConcernedRel[i].highlyConcernedSituation
)
}
// this.peopleForm = { ...data, show: true, formtype: 'detail', keyPersonHighlyConcernedRel: keyPersonArr, lettersVisitsType: JSON.parse(data.lettersVisitsType) }
this.peopleForm = { ...data, show: true, formtype: 'detail', lettersVisitsType: JSON.parse(data.lettersVisitsType) }
this.peopleForm = { ...data, show: true, formtype: 'detail', keyPersonHighlyConcernedRel: keyPersonArr, lettersVisitsType: JSON.parse(data.lettersVisitsType) }
this.peopleForm.cityId = data.cityId
await this.changeCityForm()
this.peopleForm.areaId = data.areaId
......@@ -2077,12 +2130,12 @@ export default {
},
async updatePeopleInfo (e) {
this.title = '编辑'
// let keyPersonArr = []
// for (let i = 0; i < e.keyPersonHighlyConcernedRel.length; i++) {
// keyPersonArr.push(
// e.keyPersonHighlyConcernedRel[i].highlyConcernedSituation
// )
// }
let keyPersonArr = []
for (let i = 0; i < e.keyPersonHighlyConcernedRel.length; i++) {
keyPersonArr.push(
e.keyPersonHighlyConcernedRel[i].highlyConcernedSituation
)
}
// this.peopleForm = {
// ...e,
// show: true,
......@@ -2094,6 +2147,7 @@ export default {
...e,
show: true,
formtype: 'update',
keyPersonHighlyConcernedRel: keyPersonArr,
lettersVisitsType: JSON.parse(e.lettersVisitsType)
}
this.peopleForm.cityId = e.cityId
......@@ -2284,6 +2338,87 @@ export default {
this.$Modal.remove()
}
})
},
handleUploadFile () {
},
async tplDownload () {
try {
const response = await axios.post(
'/api/ac/jilinsscgsdp/keyPersonRatingHistoryService/templateDownload',
{ ...this.searchInfo, sysType: '6' },
{
responseType: 'blob'
}
)
const url = window.URL.createObjectURL(new Blob([response.data]))
// 创建隐藏的a标签并设置属性
const link = document.createElement('a')
link.href = url
link.download = '重点人员导入模板.xlsx' // 自定义下载文件名和扩展名
link.style.display = 'none'
document.body.appendChild(link)
// 触发点击下载
link.click()
// 清理
document.body.removeChild(link)
window.URL.revokeObjectURL(url)
} catch (error) {
console.error('下载失败:', error)
// 可以在这里添加错误提示
}
},
handleBeforeUpload (file) {
console.log('fileupload....')
const fileExt = file.name.split('.').pop().toLocaleLowerCase()
if (fileExt === 'xlsx' || fileExt === 'xls') {
this.readFile(file)
} else {
this.$Notice.warning({
title: '文件类型错误',
desc: '文件:' + file.name + '不是EXCEL文件,请选择后缀为.xlsx或者.xls的EXCEL文件。'
})
}
return false
},
// 读取文件
async readFile (file) {
this.impBtnDisabled = true
const formdata = new FormData()
formdata.append('file', file)
formdata.append('fileName', file.name)
formdata.append('sysType', 6)
formdata.append('cityId', this.peopleForm.cityId)
const ret = await importExcel(formdata)
if (ret && ret.data) {
this.importShow = false
this.impBtnDisabled = false
let mobj = ret.data.data
let msg = '添加' + mobj.insert + '条, 更新' + mobj.update + '条'
if (mobj.error !== 0) {
msg += ', 缺少关键信息未能导入' + mobj.error + '条'
}
if (mobj.errInfo && mobj.errInfo !== '') {
msg += ', 以下人员位置信息未找到未能导入' + mobj.errInfo
}
if (ret.data.errmsg !== 'success') {
msg += ret.data.errmsg
}
if (mobj.insert + mobj.update > 0) {
this.searchData()
}
this.$Notice.success({
title: '导入完成!',
desc: msg
})
} else {
this.impBtnDisabled = false
this.$Notice.warning({
title: '未导入数据!',
desc: ret.data.errmsg
})
}
}
},
mounted () {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论