This commit is contained in:
yanran200730
2022-02-18 13:54:47 +08:00
parent 745a22a8e2
commit 3c424b63ff
29 changed files with 1127 additions and 0 deletions

View File

@@ -1,68 +0,0 @@
<template>
<div class="appDispatchManagement">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>
<script>
import Detail from './components/Detail'
import Add from './components/Add'
import List from './components/List'
export default {
name: "AppDispatchManagement",
label: '公文流转',
components: {List, Detail, Add},
props: {
instance: Function,
dict: Object,
permissions: Function
},
data() {
return {
component: 'List',
params: {},
include: []
}
},
created(){
},
methods:{
onChange (data) {
if (data.type === 'detail') {
this.component = 'Detail'
this.params = data.params
}
if (data.type === 'add') {
console.log(123)
this.component = 'Add'
this.params = data.params
}
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.appDispatchManagement{
width: 100%;
height: 100%;
}
</style>

View File

@@ -1,388 +0,0 @@
<template>
<section class="managementDetail">
<ai-detail>
<template #title>
<ai-title title="公文登记" isShowBottomBorder isShowBack @onBackClick="cancel(true)"/>
</template>
<template #content>
<ai-card title="公文信息">
<template slot="content">
<div class="form_div mar-t16">
<el-form
ref="rules"
:model="form"
:rules="formRules"
size="small"
label-suffix=""
label-width="100px"
>
<el-form-item label="公文名称" prop="documentName">
<el-input
v-model="form.documentName"
placeholder="请输入..."
maxlength="50"
></el-input>
</el-form-item>
<div class="above">
<div class="left">
<el-form-item label="公文编号" prop="documentCode">
<el-input
v-model="form.documentCode"
placeholder="请输入..."
maxlength="50"
></el-input>
</el-form-item>
</div>
<div class="right">
<el-form-item label="公文类型" prop="documentType">
<el-select
v-model="form.documentType"
placeholder="请选择..."
clearable
>
<el-option
v-for="(item, i) in dict.getDict('officialDocumentName')"
:key="i"
:label="item.dictName"
:value="item.dictValue"
></el-option>
</el-select>
</el-form-item>
</div>
</div>
<div class="above">
<div class="left">
<el-form-item label="保密等级">
<el-select
v-model="form.confidentialityLevel"
placeholder="请选择..."
clearable
>
<el-option
v-for="(item, i) in dict.getDict('officialDocumentConfidentialityLevel')"
:key="i"
:label="item.dictName"
:value="item.dictValue"
></el-option>
</el-select>
</el-form-item>
</div>
<div class="right">
<el-form-item label="阅示类型" prop="readType">
<el-select @change="readTypeChange"
v-model="form.readType"
placeholder="请选择..."
clearable
>
<el-option
v-for="(item, i) in dict.getDict('officialDocumentReadType')"
:key="i"
:label="item.dictName"
:value="item.dictValue"
></el-option>
</el-select>
</el-form-item>
</div>
</div>
<div class="above">
<div class="left">
<el-form-item label="紧急程度">
<el-select
v-model="form.emergencyLevel"
placeholder="请选择..."
clearable
>
<el-option
v-for="(item, i) in dict.getDict('officialDocumentEmergencyLevel')"
:key="i"
:label="item.dictName"
:value="item.dictValue"
></el-option>
</el-select>
</el-form-item>
</div>
</div>
<div class="above">
<div class="left">
<el-form-item label="发文机关">
<el-input
v-model="form.issuingUnit"
placeholder="请输入..."
maxlength="50"
></el-input>
</el-form-item>
</div>
<div class="right">
<el-form-item label="发文字号">
<el-input
v-model="form.issuingFont"
placeholder="请输入..."
maxlength="50"
></el-input>
</el-form-item>
</div>
</div>
<div class="above">
<div class="left">
<el-form-item label="签发人">
<el-input
v-model="form.signer"
placeholder="请输入..."
maxlength="50"
></el-input>
</el-form-item>
</div>
</div>
<el-form-item label="备注">
<el-input
v-model="form.remark"
type="textarea"
:rows="5"
maxlength="200"
show-word-limit
placeholder="请输入..."
></el-input>
</el-form-item>
<el-form-item label="附件">
<div class="upload">
<ai-uploader :instance="instance" v-model="form.files" fileType="file" :limit="9" @change="onChange"></ai-uploader>
</div>
</el-form-item>
</el-form>
</div>
</template>
</ai-card>
<ai-card title="流转信息">
<template #content>
<span class="form-label">流转对象</span>
<div class="user-content">
<ai-wechat-selecter slot="append" :instance="instance" v-model="form.flowUsers" isShowUser :isMultiple="isMultiple"></ai-wechat-selecter>
</div>
</template>
</ai-card>
</template>
<template #footer>
<el-button class="delete-btn footer-btn" @click="cancel(true)">取消</el-button>
<el-button class="footer-btn" type="primary" @click="save('rules', '1')">保存并流转</el-button>
<el-button class="footer-btn" @click="save('rules', '0')">保存</el-button>
</template>
</ai-detail>
</section>
</template>
<script>
export default {
name: "managementDetail",
props: {
instance: Function,
dict: Object,
permissions: Function,
params: Object
},
data() {
return {
form: {
documentName: '',
documentCode: '',
documentType: '',
confidentialityLevel: '',
readType: '',
emergencyLevel: '',
issuingTime: '',
issuingUnit: '',
issuingFont: '',
signer: '',
overDescription: '',
overTime: '',
deliver: '',
remark: '',
files: [],
fileIds: [],
flowUsers: [],
},
isMultiple: true,
};
},
computed: {
formRules(){
return {
documentName: [{required: true, message: "请输入公文名称", trigger: 'change' }],
documentCode: [{required: true, message: "请输入公文编号", trigger: 'change' }],
documentType: [{required: true, message: "请选择公文类型", trigger: 'change' }],
readType: [{required: true, message: "请选择阅示类型", trigger: 'change' }],
}
},
colConfigs(){
return [
{
prop: 'meetingUserName',
align: 'center',
label: '姓名',
},
{
prop: 'meetingUserPhone',
align: 'center',
label: '手机号码',
},
{
prop: 'meetingUnitName',
align: 'center',
label: '所属部门',
},
{
slot: 'joinStatus',
},
{
slot: 'option',
}
]
},
},
created() {
this.dict.load('issuingUnit','officialDocumentEmergencyLevel', 'officialDocumentReadType', 'officialDocumentConfidentialityLevel', 'officialDocumentName');
},
mounted() {
if(this.params.id) {
this.getDetail()
}
},
methods: {
onChange() {
},
readTypeChange() {
if(this.form.readType == 0) {
this.isMultiple = false
if(this.form.flowUsers.length > 1) {
this.form.flowUsers = []
}
}else {
this.isMultiple = true
}
},
getDetail() {
this.instance.post(`/app/appofficialdocumentinfo/queryDetailById?id=${this.params.id}&flag=0`, null).then((res) => {
if (res.code == 0) {
this.form = {...res.data}
this.form.files = this.form.files || []
}
});
},
save(formName, status){
this.$refs[formName].validate((valid) => {
if (valid) {
this.submit(status)
} else {
return false;
}
});
},
submit(status) {
var flowUsers = []
this.form.flowUsers.map(item => {
var info = {
flowUserId: item.id,
flowUserName: item.name,
avatar: item.avatar
}
flowUsers.push(info)
})
this.form.fileIds = []
if(this.form.files.length) {
this.form.files.map((item) => {
this.form.fileIds.push(item.id)
})
}
this.instance.post(`/app/appofficialdocumentinfo/addOrUpdate`, {
...this.form,
status: status,
flowUsers: flowUsers
}, null).then((res) => {
if (res.code == 0) {
if(this.params.id){
this.$message.success("编辑成功");
}else{
this.$message.success("提交成功");
}
this.cancel(true)
}
});
},
cancel(isRefresh) {
this.$emit('change', {
type: 'list',
isRefresh: !!isRefresh
})
},
downFileAll () {
if (this.form.files.length > 0) {
this.instance.post('/app/appofficialdocumentinfo/downLoadAllFileForDetail', null, {
responseType: 'blob',
params: {
id: this.form.id
}
}).then((res) => {
const link = document.createElement('a')
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
link.style.display = 'none'
link.href = URL.createObjectURL(blob)
var num = ''
for (let i = 0; i < 10; i++) {
num += Math.ceil(Math.random() * 10)
}
link.setAttribute('download', '公文文件' + '.zip')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
})
} else {
this.$message.error('暂无附件提供下载')
}
},
},
};
</script>
<style lang="scss" scoped>
.managementDetail {
height: 100%;
overflow: auto;
background: #f3f6f9;
.above{
overflow: hidden;
width: 100%;
.left{
width: 50%;
float: left;
}
.right{
width: 50%;
float: right;
}
.el-select{
width: 100%;
}
.el-date-editor.el-input{
width: 100%;
}
}
.iconEdit,.Edit{
color:#5088FF;
font-size: 12px;
cursor: pointer;
padding-left: 8px;
}
.form-label{
display: inline-block;
width: 100px;
color: #666;
font-size: 14px;
text-align: right;
}
.user-content{
display: inline-block;
width: calc(100% - 100px);
}
}
</style>

View File

@@ -1,563 +0,0 @@
<template>
<section class="managementDetail">
<ai-detail>
<template #title>
<ai-title title="公文详情" isShowBottomBorder isShowBack @onBackClick="cancel(true)">
<template #rightBtn>
<ai-wechat-selecter :instance="instance" v-model="addUser" :isMultiple="form.readType == '0' ? false : true" @change="onChange" v-if="form.status === '0'">
<el-button
size="small"
type="primary"
icon="iconfont iconMediaPlayer_Play">
开始流转
</el-button>
</ai-wechat-selecter>
<ai-wechat-selecter :instance="instance" v-model="addUser" :isMultiple="form.readType == '0' ? false : true" @change="onChange" v-if="form.status === '2' && form.readType == '0'">
<el-button
size="small"
type="primary"
icon="iconfont iconResetting">
再次流转
</el-button>
</ai-wechat-selecter>
<el-button
@click="endCirculation"
v-if="form.status === '1'"
size="small"
icon="iconfont iconReject">
结束流转</el-button>
</template>
</ai-title>
</template>
<template #content>
<ai-card :title="form.documentName">
<template slot="content">
<ai-wrapper class="mar-t16" label-width="80px" :columnsNumber="3">
<ai-info-item label="公文编号:"><span>{{form.documentCode || '-'}}</span></ai-info-item>
<ai-info-item label="公文类型:"><span>{{$dict.getLabel("officialDocumentName", form.documentType) || '-'}}</span></ai-info-item>
<ai-info-item label="保密等级:"><span>{{$dict.getLabel("officialDocumentConfidentialityLevel", form.confidentialityLevel) || '-'}}</span></ai-info-item>
</ai-wrapper>
<ai-wrapper label-width="80px" :columnsNumber="3">
<ai-info-item label="阅示类型:"><span>{{$dict.getLabel("officialDocumentReadType", form.readType) || '-'}}</span></ai-info-item>
<ai-info-item label="紧急程度:"><span>{{$dict.getLabel("officialDocumentEmergencyLevel", form.emergencyLevel) || '-'}}</span></ai-info-item>
<ai-info-item label="发文机关:"><span>{{dict.getLabel('issuingUnit',form.issuingUnit)|| '-'}}</span></ai-info-item>
</ai-wrapper>
<ai-wrapper label-width="80px" :columnsNumber="3">
<ai-info-item label="发文字号:"><span>{{form.issuingFont || '-'}}</span></ai-info-item>
<ai-info-item label="签发人:"><span>{{form.signer || '-'}}</span></ai-info-item>
<ai-info-item label="发文时间:"><span>{{form.createTime || '-'}}</span></ai-info-item>
</ai-wrapper>
<ai-wrapper label-width="80px" :columnsNumber="1">
<ai-info-item label="备注:"><span>{{form.remark || '-'}}</span></ai-info-item>
</ai-wrapper>
<ai-bar title="附件" >
<template slot="right" v-if="form.files && form.files.length">
<span class="Edit" @click="downFileAll"><i class="iconfont iconDownload"></i>下载全部</span>
</template>
</ai-bar>
<ai-file-list v-if="form.files && form.files.length"
:fileList="form.files"
:fileOps="{ name: 'name', size: 'fileSizeStr' }"
></ai-file-list>
</template>
</ai-card>
<ai-card title="流转信息">
<template #right>
<ai-wechat-selecter :instance="instance" v-model="addFlow" @change="addPeople" v-if="form.readType==0 && form.status !== '2'">
<el-button
size="small"
type="primary"
icon="iconfont iconAdd">
指派人员
</el-button>
</ai-wechat-selecter>
</template>
<template #content>
<ai-wrapper
label-width="70px"
:columnsNumber="3">
<ai-info-item label="流转状态:"><span :class="'status-' + form.status">{{ dict.getLabel('documentStatus', form.status) }}</span></ai-info-item>
<ai-info-item label="当前流转对象:" label-width="98px" v-if="form.readType === '0'">{{ form.flowUserName || '-' }}</ai-info-item>
<ai-info-item></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="流转记录">
<template #right>
<ai-wechat-selecter :instance="instance" v-model="addFlow" @change="addFlowChange" v-if="form.readType === '1' && (form.status === '1' || form.status === '0') && $permissions('app_appofficialdocumentinfo_edit')">
<el-button
size="small"
type="primary"
icon="iconfont iconAdd">
添加人员
</el-button>
</ai-wechat-selecter>
</template>
<template #content>
<div class="ai-steps" v-if="form.readType === '0'">
<div class="ai-steps__item" v-for="(item, index) in form.flowUsers" :key="index">
<div class="ai-steps__item--left">
<div class="ai-steps__item__avatar">
<img :src="item.avatar" v-if="item.avatar">
<h2 v-else>{{ formatName(item.flowUserName) }}</h2>
<i class="iconfont iconSteps_Finished"></i>
</div>
<div class="ai-steps__item--content">
<span>{{ dict.getLabel('documentFlowStatus', item.flowStatus) }}</span>
<h2>{{ item.flowUserName }}</h2>
<p v-if="item.description">{{ item.description }}</p>
</div>
</div>
<div class="ai-steps__item--right">{{ item.flowTime }}</div>
</div>
</div>
<ai-table
class="table"
v-if="form.readType === '1'"
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
:isShowPagination="false"
:current.sync="search.current"
:size.sync="search.size"
:border="true">
<el-table-column slot="options" label="操作" align="center" width="120px">
<template slot-scope="{ row }">
<span
v-if="$permissions('app_appofficialdocumentinfo_edit')"
class="iconfont iconDelete"
title="删除"
style="cursor: pointer;"
@click="remove(row.id)">
</span>
</template>
</el-table-column>
</ai-table>
</template>
</ai-card>
</template>
</ai-detail>
</section>
</template>
<script>
export default {
name: "managementDetail",
props: {
instance: Function,
dict: Object,
permissions: Function,
params: Object
},
data() {
return {
form: {
documentName: '',
documentCode: '',
documentType: '',
confidentialityLevel: '',
readType: '',
emergencyLevel: '',
issuingTime: '',
issuingUnit: '',
issuingFont: '',
signer: '',
overDescription: '',
overTime: '',
deliver: '',
remark: '',
files: [],
fileIds: [],
flowUsers: [],
},
isAdd: true,
isMultiple: true,
addUser: [],
addFlow: [],
tableData: [],
search: {
size: 10,
current: 1
},
total: 10,
colConfigs: [
{ prop: 'flowUserName', label: '姓名', align: 'center' },
{ prop: 'readTime', label: '时间', align: 'center' },
{
prop: 'readStatus',
label: '阅示情况',
align: 'center',
render: (h, params) => {
return h('span', {
style: {
color: params.row.readStatus === '0' ? '#FF8822' : '#2EA222'
}
}, this.$dict.getLabel('readingStatus', params.row.readStatus))
}
},
{ slot: 'options', label: '操作', align: 'center' }
],
};
},
computed: {
formRules(){
return {
documentName: [{required: true, message: "请输入公文名称", trigger: 'change' }],
documentCode: [{required: true, message: "请输入公文编号", trigger: 'change' }],
documentType: [{required: true, message: "请选择公文类型", trigger: 'change' }],
readType: [{required: true, message: "请选择阅示类型", trigger: 'change' }],
}
},
},
created() {
this.dict.load('issuingUnit','officialDocumentEmergencyLevel', 'officialDocumentReadType', 'officialDocumentConfidentialityLevel', 'officialDocumentName', 'documentFlowStatus', 'readingStatus');
},
mounted() {
this.form = this.params
this.showDetail = true
this.isAdd = false
this.getDetail()
},
methods: {
remove (id) {
if(this.form.flowUsers.length<=1){
return this.$message.error("至少留一个流转对象!");
}
this.$confirm('确定删除该传阅人员吗?').then(() => {
this.instance.post(`/app/appofficialdocumentflow/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getDetail()
}
})
})
},
formatName (name) {
if(name == undefined){
return
}
return name.substr(name.length - 2, name.length > 2 ? (name.length - 1) : name.length)
},
addPeople() { //指派人员
this.instance.post(`/app/appofficialdocumentinfo/flowById`,null,{
params:{
flowUserId:this.addFlow[0].id,
flowUserName:this.addFlow[0].name,
avatar:this.addFlow[0].avatar,
flag:0,
id:this.form.id,
}
}).then(res => {
if (res.code == 0) {
this.$message({
message:"指派成功",
type:"success"
})
this.getDetail()
this.addFlow = []
}
})
},
addFlowChange() { //添加传阅人员
let data = this.form
const fileIds = data.files.length ? data.files.map(item => item.id) : []
const flowUsers = [...this.addFlow].map(item => {
return {
flowUserId: item.id,
flowUserName: item.name,
avatar: item.avatar
}
})
delete data.files
this.instance.post(`/app/appofficialdocumentflow/add`, {
id: this.form.id,
...data,
status: '1',
flowUsers,
fileIds
}).then(res => {
if (res.code == 0) {
this.$message.success('添加成功')
this.getDetail()
this.addFlow = []
}
})
},
onChange() {
if (!this.addUser.length) {
return this.$message.error('请选择流转人员')
}
if (this.form.readType === '0' && this.form.status === '0') {
// 开始流转
let data = this.form
const flowUsers = [...this.addUser].map(item => {
return {
flowUserId: item.id,
flowUserName: item.name,
avatar: item.avatar
}
})
const fileIds = data.files.length ? data.files.map(item => item.id) : []
delete data.files
this.instance.post(`/app/appofficialdocumentinfo/addOrUpdate`, {
id: this.form.id,
...data,
status: '1',
flowUsers: flowUsers,
fileIds
}).then(res => {
if (res.code == 0) {
this.$message.success('流转成功')
this.getDetail()
}
})
} else {
// 再次流转
this.instance.post(`/app/appofficialdocumentinfo/flowById`, null, {
params: {
flag: '1',
flowUserId: this.addUser[0].id,
flowUserName: this.addUser[0].name,
avatar: this.addUser[0].avatar,
id: this.form.id
}
}).then(res => {
if (res.code == 0) {
this.$message.success('添加成功')
this.getDetail(this.id)
}
})
}
},
readTypeChange() {
if(this.form.readType == 0) {
this.isMultiple = false
if(this.form.flowUsers.length > 1) {
this.form.flowUsers = []
}
}else {
this.isMultiple = true
}
},
getDetail() {
this.instance.post(`/app/appofficialdocumentinfo/queryDetailById?id=${this.params.id}&flag=0`, null).then((res) => {
if (res.code == 0) {
this.form = {...res.data}
this.form.files = this.form.files || []
if (res.data.readType === '1') {
this.tableData = res.data.flowUsers
this.total = res.data.flowUsers.length
}
}
});
},
save(formName, status){
this.$refs[formName].validate((valid) => {
if (valid) {
this.submit(status)
} else {
return false;
}
});
},
submit(status) {
this.form.flowUsers.map(item => {
item.flowUserId = item.id,
item.flowUserName = item.name
})
this.form.fileIds = []
if(this.form.files.length) {
this.form.files.map((item) => {
this.form.fileIds.push(item.id)
})
}
this.instance.post(`/app/appofficialdocumentinfo/addOrUpdate`, {
...this.form,
status: status
}, null).then((res) => {
if (res.code == 0) {
if(!this.isAdd){
this.$message.success("编辑成功");
}else{
this.$message.success("提交成功");
this.cancel(true)
}
}
});
},
addCancel() {
if(this.params.id) { //新增
this.cancel(true)
}else {
this.showDetail = true
}
},
cancel(isRefresh) {
this.$emit('change', {
type: 'list',
isRefresh: !!isRefresh
})
},
downFileAll () {
if (this.form.files.length > 0) {
this.instance.post('/app/appofficialdocumentinfo/downLoadAllFileForDetail', null, {
responseType: 'blob',
params: {
id: this.form.id
}
}).then((res) => {
const link = document.createElement('a')
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
link.style.display = 'none'
link.href = URL.createObjectURL(blob)
var num = ''
for (let i = 0; i < 10; i++) {
num += Math.ceil(Math.random() * 10)
}
link.setAttribute('download', '公文文件' + '.zip')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
})
} else {
this.$message.error('暂无附件提供下载')
}
},
endCirculation () {
this.$confirm('确定结束流转?').then(() => {
this.instance.post(`/app/appofficialdocumentinfo/finishById?id=${this.form.id}`).then(res => {
if (res.code == 0) {
this.$message.success('操作成功')
this.cancel(true)
} else {
this.$message.error(res.msg)
}
})
})
},
},
};
</script>
<style lang="scss" scoped>
.managementDetail {
height: 100%;
overflow: auto;
background: #f3f6f9;
.above{
overflow: hidden;
width: 100%;
.left{
width: 50%;
float: left;
}
.right{
width: 50%;
float: right;
}
.el-select{
width: 100%;
}
.el-date-editor.el-input{
width: 100%;
}
}
.iconEdit,.Edit{
color:#5088FF;
font-size: 12px;
cursor: pointer;
padding-left: 8px;
}
}
.ai-steps {
padding-bottom: 40px;
.ai-steps__item {
display: flex;
position: relative;
align-items: center;
justify-content: space-between;
padding-bottom: 44px;
&:after {
position: absolute;
left: 20px;
top: 40px;
width: 1px;
height: 44px;
background: #DDDDDD;
content: ' ';
}
&:last-child {
padding-bottom: 0;
&:after {
display: none;
}
}
.ai-steps__item--left {
display: flex;
position: relative;
.ai-steps__item--content {
span {
color: #333;
font-size: 16px;
}
h2 {
margin-top: 4px;
color: #666666;
font-size: 14px;
}
p {
margin-top: 8px;
color: #666666;
font-size: 14px;
}
}
.ai-steps__item__avatar {
position: relative;
width: 40px;
height: 40px;
margin-right: 16px;
i {
position: absolute;
bottom: 4px;
right: 0;
color: #2ea222;
font-size: 12px;
}
img, h2 {
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
border-radius: 50%;
color: #fff;
font-size: 14px;
background: #2266FF;
}
}
}
.ai-steps__item--right {
margin-left: 20px;
flex-shrink: 0;
color: #999999;
font-size: 14px;
}
}
}
</style>

View File

@@ -1,310 +0,0 @@
<template>
<ai-list class="AppDispatchManagement">
<template slot="title">
<ai-title title="公文流转" isShowBottomBorder></ai-title>
</template>
<template slot="content">
<ai-search-bar>
<template slot="left">
<ai-select
v-model="searchObj.documentType"
placeholder="选择公文类型"
clearable
@change="(page.current = 1), getList()"
:selectList="dict.getDict('officialDocumentName')"
></ai-select>
<ai-select
v-model="searchObj.confidentialityLevel"
placeholder="选择保密等级"
clearable
@change="(page.current = 1), getList()"
:selectList="dict.getDict('officialDocumentConfidentialityLevel')"
></ai-select>
<ai-select
v-model="searchObj.status"
placeholder="选择流转状态"
clearable
@change="(page.current = 1), getList()"
:selectList="dict.getDict('documentStatus')"
></ai-select>
<ai-select
v-model="searchObj.readType"
placeholder="选择阅示类型"
clearable
@change="(page.current = 1), getList()"
:selectList="dict.getDict('officialDocumentReadType')"
></ai-select>
<!-- <el-row class="dateRange" type="flex" align="middle">
<span class="dateLabel">操作时间</span>
<el-date-picker
size="small"
v-model="searchObj.createTimeStart"
placeholder="开始日期"
@change="page.current = 1, getList()"
value-format="yyyy-MM-dd" />
<el-date-picker
size="small"
v-model="searchObj.createTimeEnd"
placeholder="结束日期"
@change="page.current = 1, getList()"
value-format="yyyy-MM-dd" />
</el-row> -->
</template>
<template slot="right">
<el-input placeholder="输入公文名称/编号"
v-model="searchObj.name"
size="small"
@change="(page.current = 1), getList()"
clearable
prefix-icon="iconfont iconSearch"/>
</template>
</ai-search-bar>
<ai-search-bar class="mt10">
<template slot="left">
<el-button type="primary" icon="iconfont iconAdd" @click="toAdd({})"
>添加
</el-button
>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="page.total"
ref="aitableex"
:current.sync="page.current"
row-key="id"
default-expand-all
:tree-props="{ children: 'merchandiseList' }"
:size.sync="page.size"
@getList="getList"
@selection-change="handleSelectionChange"
>
<el-table-column slot="selection" type="selection" width="55"></el-table-column>
<el-table-column slot="options" label="操作" align="center" width="200">
<template slot-scope="{ row }">
<el-button v-if="row.status != 0" type="text" @click="goDetail(row)">详情</el-button>
<el-button v-if="row.status == 0" type="text" @click="toAdd(row)">编辑</el-button>
<el-button type="text" @click="del(row)">删除</el-button>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
</template>
<script>
export default {
name: "management",
props: {
instance: Function,
dict: Object,
permissions: Function,
areaId: String,
},
data() {
return {
searchObj: {
documentType: '',
confidentialityLevel: '',
readType: '',
createTimeStart: null,
createTimeEnd: null,
name: '',
},
page: {
size: 10,
current: 1,
total: 0,
},
tableData: [],
shopList: [],
ids: [],
};
},
computed: {
colConfigs() {
return [
{slot: "selection", label: "", align: "center"},
{
prop: "documentCode",
label: "公文编号",
width: 120,
align: "center",
},
{
prop: "documentName",
label: "公文名称",
},
{
prop: "documentType",
label: "公文类型",
width: 120,
align: "center",
formart: (documentType) =>
this.$dict.getLabel("officialDocumentName", documentType),
},
{
prop: "readType",
label: "阅示类型",
width: 120,
align: "center",
formart: (readType) =>
this.$dict.getLabel("officialDocumentReadType", readType),
},
{
prop: "confidentialityLevel",
label: "保密等级",
width: 120,
align: "center",
formart: (confidentialityLevel) =>
this.$dict.getLabel("officialDocumentConfidentialityLevel", confidentialityLevel),
},
{
prop: "flowUserName",
label: "当前流转对象",
width: 180,
align: "center",
},
{
prop: "status",
label: "流转状态",
width: 120,
align: "center",
render: (h, {row}) => {
return h('span', {style: {color: this.dict.getColor('documentStatus', row.status)}}, this.dict.getLabel('documentStatus', row.status))
},
},
{
prop: "createTime",
label: "操作时间",
width: 180,
align: "center",
},
{
prop: "createUserName",
label: "操作人",
width: 120,
align: "center",
},
{slot: "options", label: "操作"},
];
},
},
mounted() {
this.dict.load('officialDocumentName', 'officialDocumentConfidentialityLevel', 'officialDocumentReadType', 'documentStatus').then(() => {
this.$nextTick(() => this.getList())
})
},
methods: {
changeTime() {
this.page.current = 1
this.getList()
},
getList() {
this.instance.post(`/app/appofficialdocumentinfo/list`, null, {
params: {
...this.searchObj,
...this.page
},
}).then((res) => {
if (res.code == 0) {
this.tableData = res.data.records;
this.tableData.map((item) => {
if (item.createTime) {
item.createTime = item.createTime.substring(0, 10)
} else {
item.createTime = '-'
}
})
this.page.total = res.data.total;
}
});
},
reset() {
Object.keys(this.searchObj).forEach((e) => {
this.searchObj[e] = "";
});
this.searchObj.createTimeStart = null;
this.searchObj.createTimeEnd = null;
this.getList();
},
toAdd(params) {
this.$emit('change', {
type: 'add',
params: params
})
},
goDetail(row) {
this.$emit('change', {
type: 'detail',
params: {
...row
}
})
},
del(item) {
this.$confirm("删除后不可恢复,是否要删除该公文?", {
type: 'error'
}).then(() => {
this.instance
.post(`/app/appofficialdocumentinfo/delete?ids=${item.id}`)
.then((res) => {
if (res.code == 0) {
this.$message.success("删除成功!");
this.getList();
}
});
});
},
handleSelectionChange(val) {
this.ids = [];
val.forEach(e => {
this.ids.push(e.id)
})
}
},
};
</script>
<style lang="scss" scoped>
.AppDispatchManagement {
height: 100%;
overflow: auto;
background: #f3f6f9;
::v-deep .el-range-editor--small.el-input__inner {
width: 258px;
}
::v-deep .dateRange {
.dateLabel {
height: 32px;
border: 1px solid #D0D4DC;
line-height: 32px;
padding: 0 8px;
background: #F5F5F5;
}
.el-input__inner {
border-radius: 0;
transform: translateX(-1px);
}
}
.iconfont {
cursor: pointer;
margin-right: 8px;
}
.iconCorrect {
color: #53b43b;
}
.iconReject {
color: #e75555;
padding: 0 8px;
}
}
</style>

View File

@@ -1,766 +0,0 @@
<template>
<section class="statistics tabs-init el-tabs__content_f3f6f9">
<div style="margin-top: 16px;height: 270px;">
<div class="left">
<div class="item-left mar-b16">
<div class="item-left-title">公文总数</div>
<div class="item-left-num" style="color:#4B87FE;">{{totalOfficialDocumentStatistics}}</div>
</div>
<div class="item-left">
<div class="item-left-title">本月新增</div>
<div class="item-left-num" style="color:#2EA222;">{{newMonthonStatistics}}</div>
</div>
</div>
<div class="right">
<div class="chart-content" style="padding-right:0;">
<div class="chart-line">
<div class="chart-title">近12个月公文登记情况</div>
<div v-if="lineChartData.length"
class="chart-info"
style="
width: 100%;
height: 206px;
padding: 16px 16px 20px 0;
box-sizing: border-box;
"
id="chartLine"
></div>
<ai-empty v-else style="height: 148px;"></ai-empty>
</div>
</div>
</div>
</div>
<div class="chart-content">
<div class="chart-line" style="margin-right: 16px;">
<div class="chart-title">阅示类型统计</div>
<div style="overflow:hidden;">
<div
class="chart-info"
style="
width: 288px;
height: 288px;
padding: 16px 0 0 16px;
box-sizing: border-box;
float:left;
"
id="readType"
></div>
<div class="list-type mar-t102">
<div class="item" v-for="(item, index) in readTypeList" :key="index">
<div class="type-title">
<span class="item-color-bg" :style="{'backgroundColor': item.bgColor}"></span>{{item.title}}
</div>
<div class="num">{{item.num}}</div>
</div>
</div>
</div>
</div>
<div class="chart-line">
<div class="chart-title">公文类型统计</div>
<div style="overflow:hidden;">
<div
class="chart-info"
style="
width: 288px;
height: 288px;
padding: 16px 0 0 16px;
box-sizing: border-box;
float:left;
"
id="docType"
></div>
<div class="list-type mar-t60">
<div class="item" v-for="(item, index) in docTypeList" :key="index">
<div class="type-title">
<span class="item-color-bg" :style="{'backgroundColor': item.bgColor}"></span>{{item.title}}
</div>
<div class="num">{{item.num}}</div>
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
import { mapState } from "vuex";
import charts from "echarts";
export default {
name: "statistics",
props: {
instance: Function,
dict: Object,
permissions: Function,
},
data() {
return {
readTypeList: [
{
title: '传阅',
num: '0',
bgColor: '#4B87FE'
},
{
title: '批示',
num: '0',
bgColor: '#FFAA44'
}
],
docTypeList: [
{
title: '决议',
num: '0',
bgColor: '#FF4466'
},
{
title: '决定',
num: '0',
bgColor: '#FFAA44'
},
{
title: '通知',
num: '0',
bgColor: '#4B87FE'
},
{
title: '通告',
num: '0',
bgColor: '#45A3FF'
},
{
title: '函',
num: '0',
bgColor: '#2EA222'
},
{
title: '其它',
num: '0',
bgColor: '#B244FF'
},
],
lineChartTitle: [],
lineChartData: [],
totalOfficialDocumentStatistics: 0,
newMonthonStatistics: 0,
};
},
computed: {
...mapState(["user"]),
},
mounted() {
this.getInfo()
},
methods: {
getInfo() {
this.instance.post(`/app/appofficialsenddeliverinfo/getStatistics`).then((res) => {
if (res.code == 0) {
this.newMonthonStatistics = res.data.newMonthonStatistics || 0
this.totalOfficialDocumentStatistics = res.data.totalOfficialSendStatistics || 0
if(res.data.officialRegistrationStatistics && res.data.officialRegistrationStatistics.length) {
res.data.officialRegistrationStatistics.map(item => {
this.lineChartTitle.push(item.name)
this.lineChartData.push(item.v1)
})
this.$nextTick(() => {
this.setLineChart()
})
}
if(res.data.readTheTypeStatistics && res.data.readTheTypeStatistics.length) {
res.data.readTheTypeStatistics.map(item => {
if(item.name == 0){
this.readTypeList[1].num = item.v1 || 0
}
if(item.name == 1){
this.readTypeList[0].num = item.v1 || 0
}
})
this.setReadChart()
}
if(res.data.officialSendTypeStatistics && res.data.officialSendTypeStatistics.length) {
res.data.officialSendTypeStatistics.map(item => {
if(item.name == 0){
this.docTypeList[0].num = item.v1
}
if(item.name == 1){
this.docTypeList[1].num = item.v1
}
if(item.name == 3){
this.docTypeList[2].num = item.v1
}
if(item.name == 2){
this.docTypeList[3].num = item.v1
}
if(item.name == 4){
this.docTypeList[4].num = item.v1
}
if(item.name == 5){
this.docTypeList[5].num = item.v1
}
})
this.setDocChart()
}
}
});
},
setLineChart() {
var chartLine = charts.init(document.getElementById("chartLine"));
var option = {
title: {
text: "",
},
tooltip: {
trigger: "axis",
},
grid: {
top: "10%",
left: "2%",
right: "2%",
bottom: "2%",
containLabel: true,
},
xAxis: {
type: "category",
boundaryGap: false,
data: this.lineChartTitle,
},
yAxis: {
type: "value",
},
series: [
{
name: "",
type: "line",
itemStyle: {
normal: {
color: "#26f",
},
},
data: this.lineChartData,
},
],
};
chartLine.setOption(option);
},
setReadChart() {
var chart = charts.init(document.getElementById("readType"));
var option = {
tooltip: {
trigger: "item",
formatter: "{b}: {c} ({d}%)",
},
series: [
{
name: "",
type: "pie",
radius: ["50%", "80%"],
avoidLabelOverlap: false,
label: {
show: true,
position: 'inside',
formatter: '{d}%',
fontSize: '14',
},
emphasis: {
label: {
show: true,
fontSize: '14',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{
value: this.readTypeList[0].num,
name: '传阅',
itemStyle: {
normal: {
color: '#4B87FE'
}
},
},
{
value: this.readTypeList[1].num,
name: '批示',
itemStyle: {
normal: {
color: '#FFAA44'
}
},
}
],
},
],
};
chart.setOption(option);
},
setDocChart() {
var chart = charts.init(document.getElementById("docType"));
var option = {
tooltip: {
trigger: "item",
formatter: "{b}: {c} ({d}%)",
},
series: [
{
name: "",
type: "pie",
radius: ["50%", "80%"],
avoidLabelOverlap: false,
label: {
show: true,
position: 'inside',
formatter: '{d}%',
fontSize: '14',
},
emphasis: {
label: {
show: true,
fontSize: '14',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{
value: this.docTypeList[0].num,
name: '决议',
itemStyle: {
normal: {
color: '#FF4466'
}
},
},
{
value: this.docTypeList[1].num,
name: '决定',
itemStyle: {
normal: {
color: '#FFAA44'
}
},
},
{
value: this.docTypeList[2].num,
name: '通知',
itemStyle: {
normal: {
color: '#4B87FE'
}
},
},
{
value: this.docTypeList[3].num,
name: '通告',
itemStyle: {
normal: {
color: '#45A3FF'
}
},
},
{
value: this.docTypeList[4].num,
name: '函',
itemStyle: {
normal: {
color: '#2EA222'
}
},
},
{
value: this.docTypeList[5].num,
name: '其它',
itemStyle: {
normal: {
color: '#B244FF'
}
},
},
],
},
],
};
chart.setOption(option);
},
},
};
</script>
<style lang="scss" scoped>
.statistics {
height: 100%;
width: 100%;
overflow: auto;
display: flex;
flex-direction: column;
background: #f3f6f9;
// overflow: hidden;
.left{
width: 29%;
float: left;
margin-left: 16px;
.item-left{
padding: 0 20px;
width: 100%;
height: 120px;
background: #FFFFFF;
box-shadow: 0px 16px 32px 0px rgba(0, 0, 0, 0.02);
border-radius: 4px;
box-sizing: border-box;
.item-left-title{
color: #333;
font-size: 16px;
padding: 20px 0 16px 0;
}
.item-left-num{
font-size: 32px;
text-align: right;
}
}
}
.right{
width: calc(70% - 20px);
float: left;
}
.mar-t102{
margin-top: 102px;
}
.mar-t60{
margin-top: 60px;
}
.list-type{
width:calc(100% - 360px);
float:right;
margin-left: 20px;
font-size: 14px;
padding-right: 40px;
.item{
display: flex;
justify-content: space-between;
line-height: 20px;
margin-bottom: 8px;
}
.type-title{
color: #666;
.item-color-bg{
display: inline-block;
width: 8px;
height: 8px;
background: #4B87FE;
border-radius: 1px;
margin-right: 6px;
}
}
.num{
color: #333;
text-align: right;
}
}
.chart-content {
width: 100%;
// height: 336px;
border-radius: 4px;
padding: 0 16px 16px 16px;
box-sizing: border-box;
display: flex;
.chart-line {
width: 100%;
height: 100%;
background-color: #fff;
box-shadow: 0px 16px 32px 0px rgba(0, 0, 0, 0.02);
}
.chart-title {
line-height: 48px;
border-bottom: 1px solid #e6e8ee;
padding-left: 16px;
color: #333;
font-size: 16px;
}
div {
flex: 1;
}
}
.tab-row {
padding: 16px 16px 16px 16px;
width: 100%;
box-sizing: border-box;
display: flex;
justify-content: space-between;
.tab-col {
height: 64px;
flex: 1;
background-color: #fff;
margin-right: 20px;
border-radius: 4px;
border: 1px solid rgba(216, 224, 232, 1);
overflow: hidden;
.tab-title {
display: inline-block;
font-size: 14px;
color: #333;
height: 14px;
line-height: 14px;
vertical-align: super;
}
.tab-num {
height: 24px;
font-size: 20px;
font-weight: bold;
color: #333;
line-height: 24px;
font-family: DINAlternate-Bold, serif;
float: right;
line-height: 64px;
padding-right: 16px;
}
}
.tab-col:nth-last-child(1) {
margin-right: 0;
}
}
.icon {
display: inline-block;
width: 24px;
height: 24px;
padding: 20px 8px 0 16px;
}
.card-panel {
flex: 1;
background: #fff;
border: 1px solid #d8e0e8;
border-radius: 4px;
box-sizing: border-box;
padding: 12px 16px 0 16px;
b {
font-size: 16px;
font-weight: 600;
color: rgba(51, 51, 51, 1);
line-height: 22px;
}
#ASBarChart {
height: 286px;
& + .no-data {
margin: 83px auto;
}
}
#PartyAgePieChart,
#PartyEduPieChart {
height: 264px;
& + .no-data {
margin: 72px auto;
}
}
}
.party_title {
height: 48px;
line-height: 48px;
background: #fff;
text-indent: 16px;
font-weight: bold;
}
.party_content {
flex: 1;
display: flex;
padding: 16px;
.party_left {
width: 280px;
background: #eaedf1;
border: 1px solid #d8dce3;
position: relative;
border-radius: 4px;
display: flex;
flex-direction: column;
.p {
height: 28px;
line-height: 28px;
background: #d9e0e9;
font-size: 12px;
color: #333;
text-indent: 16px;
}
.left_tree {
padding: 8px;
flex: 1;
display: flex;
flex-direction: column;
position: relative;
.left_cont {
width: 95%;
position: absolute;
top: 38px;
margin-top: 8px;
height: calc(100% - 80px);
overflow-y: auto;
.el-tree {
background: #eaedf1;
}
.right_btn {
width: 96px;
background: #fff;
border-radius: 2px;
font-size: 12px;
padding: 4px 0;
position: fixed;
z-index: 999;
li {
height: 28px;
line-height: 28px;
cursor: pointer;
text-indent: 12px;
}
li:hover {
background-color: #eff6ff;
color: #5088ff;
}
}
}
}
.btn_img {
position: absolute;
bottom: 0;
background: #f5f6f7;
height: 32px;
line-height: 32px;
width: 100%;
display: flex;
text-align: center;
border-top: 1px solid #d8dce3;
border-radius: 0 0 4px 4px;
span {
flex: 1;
width: 16px;
height: 16px;
cursor: pointer;
}
}
}
.party_right {
flex: 1;
overflow: auto;
margin-left: 11px;
.total-panel {
margin-bottom: 21px;
li {
flex: 1;
margin-right: 32px;
display: flex;
background: #fff;
border: 1px solid #d8e0e8;
border-radius: 4px;
color: #333;
padding: 20px;
font-weight: bold;
height: 97px;
box-sizing: border-box;
.icon {
width: 24px;
height: 24px;
margin-right: 8px;
}
&:last-child {
margin-right: 0;
}
p {
font-size: 14px;
color: rgba(51, 51, 51, 1);
line-height: 24px;
}
b {
font-size: 20px;
color: rgba(51, 51, 51, 1);
line-height: 40px;
}
}
}
}
}
.operation {
overflow: hidden;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 64px;
line-height: 64px;
display: flex;
z-index: 1000;
align-items: center;
justify-content: center;
background-color: #f3f6f9;
box-shadow: inset 0px 1px 0px 0px #eeeeee;
button {
width: 92px;
height: 32px;
padding: 0 !important;
}
.delete-btn {
background-color: #fff;
}
}
.mask {
.content {
padding-bottom: 100px;
}
.el-table {
border: 1px solid #d8e0e8;
border-bottom: 0;
}
p {
line-height: 28px;
text-align: right;
cursor: pointer;
color: #5088ff;
width: 88px;
float: right;
padding-bottom: 8px;
}
}
.vc-input-120 {
width: 120px !important;
float: right;
padding-right: 16px;
.el-input__inner {
width: 120px !important;
}
}
}
</style>

View File

@@ -1,62 +0,0 @@
<template>
<div class="AppHealthReport">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>
<script>
import List from './components/List.vue'
import Detail from './components/Detail.vue'
export default {
name: 'AppIntegralAudit',
label: '积分审核',
components: {
List,
Detail
},
props: {
instance: Function,
dict: Object,
permissions: Function
},
data () {
return {
component: 'List',
params: {}
}
},
methods: {
onChange (data) {
if (data.type === 'Detail') {
this.component = 'Detail'
this.isShowDetail = true
this.params = data.params
}
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.AppHealthReport {
height: 100%;
}
</style>

View File

@@ -1,203 +0,0 @@
<template>
<ai-detail class="audit">
<template slot="title">
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
</ai-title>
</template>
<template slot="content">
<ai-card title="基本信息">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="申请人" :value="info.residentName"></ai-info-item>
<ai-info-item label="申请时间" :value="info.createTime"></ai-info-item>
<ai-info-item label="积分类型" :value="dict.getLabel('atWillReportType', info.applyIntegralType)"></ai-info-item>
<ai-info-item label="申请描述" :value="info.description" isLine></ai-info-item>
<ai-info-item label="联系电话" isLine :value="info.residentPhone"></ai-info-item>
<ai-info-item label="图片" isLine>
<ai-uploader v-model="info.applyFiles" disabled></ai-uploader>
</ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="处理结果" v-if="info.auditStatus !== '0'">
<div slot="content" style="margin-top: 16px;margin-bottom:24px">
<ai-wrapper
label-width="120px">
<ai-info-item label="处理结果" :value="info.auditStatus === '1' ? '通过' : '拒绝'" isLine></ai-info-item>
<ai-info-item label="原因" v-if="info.auditStatus === '2'" isLine :value="info.auditOpinion"></ai-info-item>
<ai-info-item label="积分规则类别" v-if="info.auditStatus === '1'" :value="dict.getLabel('atWillReportType', info.auditIntegralType)"></ai-info-item>
<ai-info-item label="积分规则事项" v-if="info.auditStatus === '1'" :value="info.auditRuleName"></ai-info-item>
<ai-info-item label="积分调整" isLine v-if="info.auditStatus === '1'" :value="(info.auditIntegral >= 0 ? '+' + info.auditIntegral : info.auditIntegral) + '分'"></ai-info-item>
<ai-info-item label="审核人" :value="info.auditUserName"></ai-info-item>
<ai-info-item label="审核时间" :value="info.auditTime"></ai-info-item>
</ai-wrapper>
</div>
</ai-card>
<ai-dialog
:visible.sync="isShow"
width="800px"
@close="onClose"
title="事件审核"
@onConfirm="onConfirm">
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
<el-form-item label="是否通过审核" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择是否通过审核' }]">
<el-radio-group v-model="form.pass">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.pass === '1'" label="积分规则类别" prop="auditRuleId" style="width: 100%;" :rules="[{ required: true, message: '请选择积分规则类别' }]">
<div class="flex-warpper">
<ai-select
v-model="form.auditIntegralType"
clearable
style="width: 180px;"
placeholder="请选择积分规则类别"
:selectList="dict.getDict('atWillReportType')"
@change="onChange">
</ai-select>
<ai-select
v-model="form.auditRuleId"
clearable
style="width: 180px;margin: 0 10px;"
placeholder="请选择积分规则事项"
:selectList="ruleList">
</ai-select>
<span>{{ integralText }}</span>
</div>
</el-form-item>
<el-form-item label="审核意见" v-if="form.pass === '0'" prop="opinion" style="width: 100%;" :rules="[{ required: true, message: '请输入审核意见' }]">
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
</el-form-item>
</el-form>
</ai-dialog>
</template>
<template #footer >
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="isShow = true" v-if="info.auditStatus === '0'">审核</el-button>
</template>
</ai-detail>
</template>
<script>
export default {
name: 'Detail',
props: {
instance: Function,
dict: Object,
params: Object
},
data () {
return {
total: 0,
info: {
auditStatus: '0'
},
id: '',
isShow: false,
form: {
auditIntegralType: '',
auditRuleId: '',
opinion: '',
pass: ''
},
ruleList: []
}
},
computed: {
integralText () {
if (!this.form.auditRuleId) {
return ''
}
const integral = this.ruleList.filter(v => v.dictValue === this.form.auditRuleId)[0].integral
return integral >= 0 ? `+${integral}` : `${integral}`
}
},
created () {
if (this.params && this.params.id) {
this.id = this.params.id
this.dict.load(['atWillReportType', 'auditStatus']).then(() => {
this.getInfo(this.params.id)
})
}
},
methods: {
getInfo (id) {
this.instance.post(`/app/appvillagerintegraldeclare/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
}
})
},
onClose () {
this.form.auditIntegralType = ''
this.form.auditRuleId = ''
this.form.pass = ''
this.form.opinion = ''
this.id = ''
},
onConfirm() {
this.$refs.form.validate(v => {
if (v) {
this.instance.post('/app/appvillagerintegraldeclare/examine', null, {
params: {
...this.form,
id: this.params.id,
auditIntegral: this.form.auditRuleId ? this.ruleList.filter(v => v.dictValue === this.form.auditRuleId)[0].integral : '',
auditRuleName: this.form.auditRuleId ? this.ruleList.filter(v => v.dictValue === this.form.auditRuleId)[0].ruleName : ''
}
}).then(res => {
if (res.code == 0) {
this.isShow = false
this.getInfo(this.params.id)
this.$message.success('审核成功!')
}
})
}
})
},
onChange (e) {
this.form.auditRuleId = ''
this.instance.post(`/app/appvillagerintegralrule/list?size=1000&classification=${e}`).then(res => {
if (res?.code == 0) {
this.ruleList = res.data.records.map(v => {
return {
dictName: v.ruleName,
dictValue: v.id,
ruleName: v.ruleName,
integral: v.integral
}
})
}
})
},
cancel (isRefresh) {
this.$emit('change', {
type: 'list',
isRefresh: !!isRefresh
})
}
}
}
</script>
<style scoped lang="scss">
.audit {
.flex-warpper {
display: flex;
align-items: center;
}
}
</style>

View File

@@ -1,237 +0,0 @@
<template>
<ai-list class="list">
<ai-title
slot="title"
title="积分审核"
v-if="search.areaId"
isShowBottomBorder
:instance="instance"
:disabledLevel="disabledLevel"
isShowArea
v-model="search.areaId"
@change="changeArea">
</ai-title>
<template slot="content">
<div class="content">
<ai-search-bar>
<template #left>
<ai-select
v-model="search.applyIntegralType"
clearable
placeholder="请选择积分类型"
:selectList="dict.getDict('atWillReportType')"
@change="search.current = 1, getList()">
</ai-select>
<ai-select
v-model="search.auditStatus"
clearable
placeholder="请选择审核状态"
:selectList="dict.getDict('auditStatus')"
@change="search.current = 1, getList()">
</ai-select>
<el-date-picker
value-format="yyyy-MM-dd"
v-model="search.createTimeStart"
type="date"
size="small"
unlink-panels
placeholder="选择开始日期"
@change="search.current = 1, getList()" />
<el-date-picker
value-format="yyyy-MM-dd"
v-model="search.createTimeEnd"
type="date"
size="small"
unlink-panels
placeholder="选择结束日期"
@change="search.current = 1, getList()" />
</template>
<template #right>
<el-input
v-model="search.residentName"
size="small"
placeholder="请输入姓名"
clearable
@keyup.enter.native="search.current = 1, getList()"
@clear="search.current = 1, search.residentName = '', getList()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
v-loading="loading"
style="margin-top: 8px;"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</div>
</template>
</ai-list>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'List',
props: {
instance: Function,
dict: Object
},
data () {
return {
search: {
current: 1,
size: 10,
residentName: '',
applyIntegralType: '',
areaId: '',
auditStatus: '',
createTimeStart: '',
createTimeEnd: ''
},
dictList: [{
dictName: '否',
dictValue: '0'
}, {
dictName: '是',
dictValue: '1'
}],
info: {},
colConfigs: [
{ prop: 'residentName', label: '申请人' },
{ prop: 'residentPhone', align: 'center', label: '联系电话' },
{ prop: 'createTime', align: 'center', label: '申请时间' },
{ prop: 'applyIntegralType', align: 'center', label: '积分类型', formart: v => this.dict.getLabel('atWillReportType', v) },
{ prop: 'auditStatus', align: 'center', label: '状态', formart: v => v ? this.dict.getLabel('auditStatus', v) : '-' },
{ prop: 'auditUserName', align: 'center', label: '审批人' },
{ prop: 'auditTime', align: 'center', label: '审批时间' }
],
tableData: [],
total: 0,
loading: false,
disabledLevel: 0
}
},
computed: {
...mapState(['user']),
param () {
return {
}
}
},
created () {
this.disabledLevel = this.user.info.areaList.length - 1
this.search.areaId = this.user.info.areaId
this.loading = true
this.dict.load(['atWillReportType', 'auditStatus']).then(() => {
this.getList()
})
},
methods: {
getList () {
this.instance.post(`/app/appvillagerintegraldeclare/list`, null, {
params: {
...this.search
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
this.loading = false
} else {
this.loading = false
}
}).catch(() => {
this.loading = false
})
},
toDetail (id) {
this.$emit('change', {
type: 'Detail',
params: {
id: id || ''
}
})
},
changeArea () {
this.search.current = 1
this.$nextTick(() => {
this.getList()
})
}
}
}
</script>
<style scoped lang="scss">
.list {
::v-deep .ai-list__content {
padding: 0!important;
.ai-list__content--right-wrapper {
background: transparent!important;
box-shadow: none!important;
margin: 0!important;
padding: 12px 16px 12px!important;
}
}
.statistics-top {
display: flex;
align-items: center;
margin-bottom: 20px;
& > div {
flex: 1;
height: 96px;
line-height: 1;
margin-right: 20px;
padding: 16px 24px;
background: #FFFFFF;
box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.15);
border-radius: 4px;
&:last-child {
margin-right: 0;
}
h3 {
font-size: 24px;
}
span {
display: block;
margin-bottom: 16px;
color: #888888;
font-size: 16px;
}
}
}
.content {
padding: 16px;
background: #FFFFFF;
box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.15);
}
}
</style>

View File

@@ -1,195 +0,0 @@
<template>
<section class="AppResident">
<ai-list v-if="!showDetail" isTabs>
<ai-title slot="title" title="居民档案" :instance="instance" :hideLevel="hideLevel-1" isShowArea
v-model="areaId"/>
<template #tabs>
<el-tabs v-model="activeName">
<el-tab-pane v-for="op in tabs" :key="op.value" :name="op.value" :label="op.label">
<component v-if="op.value==activeName" :is="op.comp" :areaId="areaId" :active="activeName" :instance="instance" :dict="dict" />
</el-tab-pane>
</el-tabs>
</template>
</ai-list>
<component v-else :is="detailComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
</section>
</template>
<script>
import {mapState} from "vuex";
import localResident from "./localResident";
import ListTpl from "./listTpl";
import MobileResident from "./mobileResident";
import ResidentSta from "./residentSta";
import auditList from "./auditList";
import auditDetail from "./audtiDetail";
export default {
name: "AppResident",
label: "居民档案",
props: {
instance: Function,
dict: Object,
permissions: Function,
},
provide() {
return {
resident: this
}
},
components: {ResidentSta, MobileResident, ListTpl, localResident, auditList, audtiDetail: auditDetail},
computed: {
...mapState(["user"]),
tabs() {
let details = {
"本地居民": localResident,
"流动人员": MobileResident,
}
return [
...this.dict.getDict('residentType').map(e => ({
label: e.dictName,
value: e.dictValue,
comp: ListTpl,
detail: details[e.dictName]
})),
{label: "居民统计", value: "3", comp: ResidentSta},
{label: "居民档案审核", value: "4", comp: auditList, detail: auditDetail}
]
},
hideLevel() {
return this.user.info.areaList?.length || 0
},
showDetail() {
this.activeName = this.activeName || this.$route.query?.type || 0
return !!this.$route.query?.type || !!this.$route.query?.id
},
detailComponent() {
return this.tabs.find(e => e.value == this.activeName)?.detail || ""
}
},
data() {
return {
areaId: '',
activeName: "0",
}
},
created() {
this.activeName = this.$route.query?.type
this.areaId = JSON.parse(JSON.stringify(this.user.info.areaId))
this.dict.load('residentType', "sex", "faithType", "fileStatus",
"legality",
"education",
"maritalStatus",
"politicsStatus",
"householdName",
"nation",
"liveReason",
"certificateType",
"job",
"militaryStatus",
"householdRelation",
"logoutReason",
"nation",
"registerStatus",
"residentTipType",
"liveCategory",
"livePeriod",
"language",
"nationality");
},
}
</script>
<style lang="scss" scoped>
.AppResident {
width: 100%;
height: 100%;
background: rgba(243, 246, 249, 1);
.iconfont {
cursor: pointer;
}
.tab-content-box {
padding: 16px 0;
width: 100%;
box-sizing: border-box;
background-color: #f3f6f9;
overflow-y: auto;
}
.list {
box-sizing: border-box;
background-color: #fff;
border-radius: 4px;
border: solid 1px #d8e0e8;
padding: 16px;
display: flex;
flex-direction: column;
gap: 8px;
.searchBar {
padding: 8px 0;
.el-col {
margin-bottom: 8px;
span {
display: inline-block;
width: 100px;
height: 30px;
line-height: 30px;
text-align: center;
font-size: 14px;
background-color: #f5f5f5;
border-radius: 2px;
border: solid 1px #d0d4dc;
border-right: none;
margin: 0;
}
}
}
.addClass {
height: 64px;
}
}
.dataStatistic {
width: 100%;
margin-top: 16px;
padding: 0 16px 16px 16px;
box-sizing: border-box;
.above {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.data-item {
width: 32%;
height: 380px;
background: rgba(255, 255, 255, 1);
border-radius: 4px;
padding: 16px;
box-sizing: border-box;
position: relative;
p {
position: absolute;
right: 16px;
top: 16px;
font-size: 14px;
font-weight: bold;
span:nth-of-type(1) {
color: #999999;
}
span:nth-of-type(2) {
color: #333333;
}
}
}
}
}
}
</style>

View File

@@ -1,212 +0,0 @@
<template>
<ai-list isTabs>
<template slot="content">
<ai-search-bar>
<template #left>
<ai-select
v-model="search.auditStatus"
clearable
placeholder="请选择审核状态"
:selectList="dict.getDict('auditStatus')"
@change="search.current = 1, getList()">
</ai-select>
<el-date-picker
value-format="yyyy-MM-dd"
v-model="search.createTimeStart"
type="date"
size="small"
unlink-panels
placeholder="选择开始日期"
@change="search.current = 1, getList()"
/>
<el-date-picker
value-format="yyyy-MM-dd"
v-model="search.createTimeEnd"
type="date"
size="small"
unlink-panels
placeholder="选择结束日期"
@change="search.current = 1, getList()"
/>
</template>
<template #right>
<el-input
v-model="search.con"
size="small"
placeholder="姓名/身份证/联系方式"
clearable
@keyup.enter.native="search.current = 1, getList()"
@clear="search.current = 1, search.con = '', getList()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
style="margin-top: 6px;"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" @click="toAudit(row.id)" :disabled="row.auditStatus !== '0'">审批</el-button>
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
<el-button type="text" @click="remove(row.id)" :disabled="row.auditStatus === '0'">删除</el-button>
</div>
</template>
</el-table-column>
</ai-table>
<ai-dialog
:visible.sync="isShow"
width="800px"
@close="onClose"
title="事件审核"
@onConfirm="onConfirm">
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
<el-form-item label="是否通过审核" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择是否通过审核' }]">
<el-radio-group v-model="form.pass">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核意见" prop="opinion" style="width: 100%;" :rules="[{ required: form.pass === '0' ? true : false, message: '请输入审核意见' }]">
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
</el-form-item>
</el-form>
</ai-dialog>
</template>
</ai-list>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'auditList',
props: {
instance: Function,
dict: Object,
areaId: String
},
data() {
return {
search: {
current: 1,
size: 10,
auditStatus: '',
con: '',
createTimeEnd: '',
createTimeStart: ''
},
isShow: false,
currIndex: -1,
areaList: [],
total: 10,
form: {
opinion: '',
pass: ''
},
id: '',
colConfigs: [
{ prop: 'name', label: '申请人', align: 'left' },
{ prop: 'createTime', label: '申请时间', align: 'center' },
{ prop: 'sex', label: '性别', align: 'center', formart: v => this.dict.getLabel('sex', v) },
{ prop: 'idNumber', label: '身份证号', align: 'center' },
{ prop: 'age', label: '年龄', align: 'center' },
{ prop: 'auditStatus', label: '审批结果', align: 'center', formart: v => this.dict.getLabel('auditStatus', v) },
{ prop: 'auditUserName', label: '审批人', align: 'center' },
{ prop: 'auditTime', label: '审批时间', align: 'center' }
],
tableData: []
}
},
computed: {
...mapState(['user'])
},
watch: {
areaId () {
this.search.current = 1
this.getList()
}
},
created() {
this.search.areaId = this.user.info.areaId
this.areaName = this.user.info.areaName
this.dict.load('auditStatus').then(() => {
this.getList()
})
},
methods: {
getList() {
this.instance.post(`/app/appresident/list`, null, {
params: {
...this.search,
areaId: this.areaId
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
toAudit (id) {
this.id = id
this.isShow = true
},
onClose () {
this.form.pass = ''
this.form.opinion = ''
this.id = ''
},
onConfirm () {
this.$refs.form.validate(v => {
if (v) {
this.instance.post('/app/appresident/examine', null, {
params: {
...this.form,
id: this.id
}
}).then(res => {
if (res?.code == 0) {
this.isShow = false
this.getList()
this.$message.success('审核成功!')
}
})
}
})
},
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appresident/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getList()
}
})
})
},
toDetail (id) {
this.$router.push({query: {type: '4', id: id}})
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,639 +0,0 @@
<template>
<section class="addAborigines">
<ai-detail>
<ai-title slot="title" title="详情" isShowBack @onBackClick="$router.push({query:{}})" isShowBottomBorder></ai-title>
<template #content>
<ai-card title="基本信息">
<div slot="content">
<el-row type="flex">
<div class="detail-info fill">
<h3 class="name">{{ baseInfo.name || '-' }}</h3>
<div class="detail-left fill">
<div class="info">
<span class="label">性别</span>
<span class="value">{{ dict.getLabel('sex', baseInfo.sex) || '-' }}</span>
</div>
<div class="info">
<span class="label">出生日期</span>
<span class="value">{{ birthday ? birthday.substring(0, 10) : '-' }}</span>
</div>
<div class="info">
<span class="label">籍贯</span>
<span class="value">{{ baseInfo.birthplaceAreaName || '-' }}</span>
</div>
<div class="info">
<span class="label">文化程度</span>
<span class="value">{{ dict.getLabel('education', baseInfo.education) || '-' }}</span>
</div>
<div class="info">
<span class="label">政治面貌</span>
<span
class="value"
>{{ dict.getLabel('politicsStatus', baseInfo.politicsStatus) || '-' }}</span>
</div>
<div class="info">
<span class="label">宗教信仰</span>
<span class="value">{{ dict.getLabel('faithType', baseInfo.faithType) || '-' }}</span>
</div>
</div>
<div class="detail-right fill">
<div class="info">
<span class="label">身份证号</span>
<span class="value">
<ai-id mode="show" v-model="baseInfo.idNumber" right-btn class="line-center"></ai-id>
</span>
</div>
<div class="info">
<span class="label">年龄</span>
<span class="value">{{ baseInfo.age }}</span>
</div>
<div class="info">
<span class="label">民族</span>
<span class="value">{{ dict.getLabel('nation', baseInfo.nation) || '-' }}</span>
</div>
<div class="info">
<span class="label">婚姻状况</span>
<span
class="value"
>{{ dict.getLabel('maritalStatus', baseInfo.maritalStatus) || '-' }}</span>
</div>
<div class="info">
<span class="label">兵役状况</span>
<span
class="value"
>{{ dict.getLabel('militaryStatus', baseInfo.militaryStatus) || '-' }}</span>
</div>
<div class="info">
<span class="label">职业</span>
<span class="value">{{ dict.getLabel('job', baseInfo.job) || '-' }}</span>
</div>
</div>
</div>
<ai-avatar v-model="baseInfo.photo" :editable="false"/>
</el-row>
</div>
</ai-card>
<ai-card title="联络信息">
<div slot="content" style="margin-top: 16px;margin-bottom:24px">
<div class="info" style="margin-bottom:8px">
<span class="label">联系方式</span>
<span class="value">{{ baseInfo.phone || '-' }}</span>
</div>
<div class="info">
<span class="label">现住址</span>
<span class="value">{{ baseInfo.currentAreaName + baseInfo.currentAddress || "-" }}</span>
</div>
</div>
</ai-card>
<ai-card title="户籍信息">
<div slot="content" style="margin-top: 16px;margin-bottom:24px">
<div class="detail-info">
<div class="detail-left fill">
<div class="info">
<span class="label">是否户主</span>
<span class="value">{{ dict.getLabel('householdName', baseInfo.householdName) || '-' }}</span>
</div>
</div>
<div class="info fill" v-if="baseInfo.householdName==0">
<span class="label">与户主关系</span>
<span class="value">{{ dict.getLabel('householdRelation', baseInfo.householdRelation) || '-' }}</span>
</div>
<div class="info fill" v-if="baseInfo.householdName==0">
<span class="label">户主身份证号</span>
<span class="value">
<ai-id mode="show" v-model="baseInfo.householdIdNumber" right-btn></ai-id>
</span>
</div>
</div>
<div class="detail-info-p info">
<span class="label">户籍地</span>
<span class="value">
{{ baseInfo.householdAreaName + (baseInfo.householdAddress ? baseInfo.householdAddress : "") }}
</span>
</div>
</div>
</ai-card>
<ai-card title="家庭成员">
<div slot="content">
<el-table
border
ref="multipleTable"
:data="family"
style="margin-top:8px;"
header-cell-class-name="table-header"
tooltip-effect="light"
row-class-name="table-row"
cell-class-name="table-cell"
>
<el-table-column align="center" prop="name" label="与户主关系">
<template slot-scope="scope">
<span>{{
scope.row.householdRelation ? dict.getLabel('householdRelation', scope.row.householdRelation) : "户主"
}}</span>
</template>
</el-table-column>
<el-table-column prop="name" label="姓名" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="idNumber" label="性别" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ parseInt(scope.row.idNumber.substr(16, 1)) % 2 == 1 ? '男' : '女' }}</span>
</template>
</el-table-column>
<el-table-column prop="age" label="年龄" align="center" show-overflow-tooltip></el-table-column>
<el-table-column
prop="idNumber"
label="身份证号"
align="center"
width="200"
show-overflow-tooltip>
<template slot-scope="{row}">
<ai-id mode="show" v-model="row.idNumber" :showEyes="false"/>
</template>
</el-table-column>
<el-table-column prop="address" label="操作" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" title="查看详情" class="dict-list-operation" @click="showFamily(scope.row)">详情</el-button>
</template>
</el-table-column>
<div slot="empty" class="no-data" style="height:160px;"/>
</el-table>
</div>
</ai-card>
<ai-card title="处理结果">
<div slot="content" style="margin-top: 16px;margin-bottom:24px">
<div class="detail-info">
<div class="detail-left fill">
<div class="info">
<span class="label">处理结果</span>
<span class="value">{{ baseInfo.auditStatus === '1' ? '通过' : '拒绝' }}</span>
</div>
</div>
</div>
<div class="detail-info">
<div class="info fill">
<span class="label">原因</span>
<span class="value">{{ baseInfo.auditOpinion }}</span>
</div>
</div>
</div>
</ai-card>
<ai-dialog
:visible.sync="isShow"
width="800px"
@close="onClose"
title="事件审核"
@onConfirm="onConfirm">
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
<el-form-item label="是否通过审核" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择是否通过审核' }]">
<el-radio-group v-model="form.pass">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核意见" prop="opinion" style="width: 100%;" :rules="[{ required: form.pass === '0' ? true : false, message: '请输入审核意见' }]">
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
</el-form-item>
</el-form>
</ai-dialog>
</template>
<template #footer >
<el-button @click="cancelFn()">取消</el-button>
<el-button type="primary" @click="isShow = true" v-if="baseInfo.auditStatus === '0'">审核</el-button>
</template>
</ai-detail>
<el-dialog class="deleteStyle" :visible.sync="familyDialog" width="720px" title="家庭成员信息" top="30vh">
<el-row type="flex" justify="space-between">
<ul>
<li>
<span>姓名</span>
<p>{{ familyInfo.name }}</p>
</li>
<li>
<span>身份证号</span>
<p>
<ai-id mode="show" v-model="familyInfo.idNumber" right-btn class="line-center"></ai-id>
</p>
</li>
<li>
<span>性别</span>
<p>{{ dict.getLabel('sex', familyInfo.sex) }}</p>
</li>
<li>
<span>年龄</span>
<p>{{ familyInfo.age }}</p>
</li>
<li>
<span>联系方式</span>
<p>{{ familyInfo.phone }}</p>
</li>
<li>
<span>民族</span>
<p>{{ dict.getLabel('nation', familyInfo.nation) }}</p>
</li>
<li>
<span>籍贯</span>
<p>{{ familyInfo.birthplaceAreaName }}</p>
</li>
<li>
<span>文化程度</span>
<p>{{ dict.getLabel('education', familyInfo.education) }}</p>
</li>
<li>
<span>婚姻状况</span>
<p>{{ dict.getLabel('maritalStatus', familyInfo.maritalStatus) }}</p>
</li>
<li>
<span>政治面貌</span>
<p>{{ dict.getLabel('politicsStatus', familyInfo.politicsStatus) }}</p>
</li>
<li>
<span>兵役状况</span>
<p>{{ dict.getLabel('militaryStatus', familyInfo.militaryStatus) }}</p>
</li>
<li>
<span>宗教信仰</span>
<p>{{ dict.getLabel('faithType', familyInfo.faithType) }}</p>
</li>
<li>
<span>职业</span>
<p>{{ dict.getLabel('job', familyInfo.job) }}</p>
</li>
<li style="width:100%;">
<span>现住址</span>
<p>{{ familyInfo.currentAreaName + familyInfo.currentAddress }}</p>
</li>
</ul>
<div class="img_block">
<ai-avatar v-model="familyInfo.imgUrl" :editable="false"/>
</div>
</el-row>
<div slot="footer" style="text-align: center;">
<el-button style="width:92px" size="small" @click="familyDialog = false">关闭
</el-button>
</div>
</el-dialog>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "audtiDetail",
props: {
instance: Function,
dict: Object,
permissions: Function,
detail: Object,
active: String
},
data() {
return {
buildingCascader: true,
houseCascader: true,
navId: 0,
form: {
opinion: '',
pass: ''
},
isShow: false,
baseInfo: {
registerStatus: "",
tips: [],
age: "",
birthplaceAreaId: "",
currentAddress: "",
currentAreaId: "",
education: "",
faithType: "",
fileStatus: "",
householdAddress: "",
householdAreaId: "",
householdIdNumber: "",
householdName: "",
householdRelation: "",
id: "",
idNumber: "",
job: "",
logoutDescription: "",
logoutReason: "",
logoutTime: "",
logoutUserId: "",
maritalStatus: "",
militaryStatus: "",
name: "",
nation: "",
phone: "",
photo: "",
politicsStatus: "",
sex: ""
},
family: [],
familyDialog: false,
familyInfo: {},
writeoffDialog: false,
writeInfo: {
id: "",
logoutReason: "",
logoutDescription: "",
fileStatus: "1"
},
birthday: "",
imgUrl: "",
fileList: [],
showEdit1: false,
showEdit2: false,
showEdit3: false,
showEdit4: false,
disabledLevel: 0
};
},
computed: {
...mapState(["user"]),
showDetail() {
return !!this.$route.query?.id
},
tipOps() {
return this.dict.getDict("residentTipType") || []
}
},
methods: {
householdRelationChange() {
this.baseInfo.householdIdNumber = "";
this.baseInfo.householdRelation = "";
},
onConfirm () {
this.$refs.form.validate(v => {
if (v) {
this.instance.post('/app/appresident/examine', null, {
params: {
...this.form,
id: this.$route.query.id
}
}).then(res => {
if (res?.code == 0) {
this.isShow = false
this.searchDetail(this.$route.query.id)
this.$message.success('审核成功!')
}
})
}
})
},
onClose () {
this.form.pass = ''
this.form.opinion = ''
this.id = ''
},
cancelFn() {
this.$refs.ruleForm?.resetFields()
this.$router.push({query: {}});
},
searchDetail(id, type) {
this.instance.post(`/app/appresident/detail`, null, {
params: {id}
}).then(res => {
if (res?.data) {
let {currentHouseList, householdHouseList, tips} = res.data.resident
this.baseInfo = {
...res.data.resident,
currentHouseList: currentHouseList?.split("|"),
householdHouseList: householdHouseList?.split("|"),
tips: tips ? tips.split("|") : [],
};
this.family = res.data.family;
this.IdCard(this.baseInfo.idNumber);
if (type == "family") {
this.familyDialog = false;
}
}
});
},
showFamily(row) {
this.familyInfo = row;
if (this.familyInfo.photo) {
this.familyInfo.imgUrl = this.familyInfo.photo.split(";")[0];
} else {
this.familyInfo.imgUrl = "";
}
this.familyDialog = true;
},
beforeWriteOff() {
this.writeoffDialog = true;
},
idChange(val) {
if (val.length == 18) {
this.IdCard(val);
}
},
IdCard(UUserCard) {
if (UUserCard) {
let arr = [];
//获取出生日期
let birth =
UUserCard.substring(6, 10) +
"-" +
UUserCard.substring(10, 12) +
"-" +
UUserCard.substring(12, 14) +
" 00:00:00";
arr.push(birth);
if (parseInt(UUserCard.substr(16, 1)) % 2 == 1) {
//男
arr.push("1");
} else {
//女
arr.push("0");
}
//获取年龄
const myDate = new Date();
const month = myDate.getMonth() + 1;
const day = myDate.getDate();
let age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1;
if (
UUserCard.substring(10, 12) < month ||
(UUserCard.substring(10, 12) == month &&
UUserCard.substring(12, 14) <= day)
) {
age++;
}
arr.push(age);
this.baseInfo.sex = arr[1];
this.baseInfo.age = arr[2];
this.birthday = arr[0];
}
}
},
created() {
this.searchDetail(this.$route.query.id);
}
};
</script>
<style lang="scss" scoped>
.addAborigines {
height: 100%;
font-size: 14px;
.el-form-item {
margin-bottom: 10px;
.el-form-item {
margin-top: 10px;
}
.el-cascader, .el-select, .el-date-editor {
width: 100%;
}
}
::v-deep .el-form-item__error {
position: static;
}
::v-deep .content-right {
box-sizing: border-box;
display: flex;
flex-direction: column;
gap: 10px;
padding-bottom: 80px;
.ailist-title {
padding: 0;
}
.above {
width: 100%;
overflow: hidden;
.left {
width: 380px;
float: left;
}
.right {
width: 380px;
float: left;
.pictrue {
display: flex;
height: 120px;
img {
width: 104px;
height: 120px;
border-radius: 2px;
border: solid 1px #d0d4dc;
}
.upload-demo {
padding: 0 15px;
}
.el-button {
width: 104px;
height: 32px;
background-color: #ffffff;
border-radius: 2px;
border: solid 1px #8899bb;
}
}
}
}
}
ul {
flex: 1;
min-width: 0;
display: flex;
flex-wrap: wrap;
padding: 0;
margin: 0;
li {
display: flex;
align-items: center;
min-height: 32px;
width: 50%;
span {
flex-shrink: 0;
}
p {
margin: 0
}
}
}
.img_block {
flex-shrink: 0;
}
.detail-info {
display: flex;
flex-wrap: wrap;
h3 {
width: 100%;
flex-shrink: 0
}
}
.info {
display: flex;
align-items: center;
line-height: 1.4;
margin-bottom: 16px;
.label {
flex-shrink: 0;
width: 100px;
margin-right: 40px;
text-align: right;
color: #888;
font-size: 14px;
}
.value {
color: #222;
font-size: 14px;
word-break: break-all;
}
}
.fill {
flex: 1;
min-width: 50%;
}
.el-checkbox-group {
display: flex;
flex-wrap: wrap;
gap: 10px;
.el-checkbox {
margin: 0 !important;
display: flex;
align-items: center;
::v-deep .el-checkbox__label {
font-size: 14px;
}
}
}
.tags {
gap: 10px;
flex-wrap: wrap;
}
}
</style>

View File

@@ -1,352 +0,0 @@
<template>
<section class="listTpl">
<ai-list isTabs>
<template #content>
<ai-search-bar>
<template #left>
<ai-select placeholder="档案状态" v-model="search.fileStatus"
:selectList="resident.dict.getDict('fileStatus')"
@change="page.current=1,refreshTable()"/>
<ai-select placeholder="性别" v-model="search.sex"
:selectList="resident.dict.getDict('sex')"
@change="page.current=1,refreshTable()"/>
<ai-select placeholder="文化程度" v-model="search.education"
:selectList="resident.dict.getDict('education')"
@change="page.current=1,refreshTable()"/>
<ai-select placeholder="婚姻状况" v-model="search.maritalStatus"
:selectList="resident.dict.getDict('maritalStatus')"
@change="page.current=1,refreshTable()"/>
<ai-select placeholder="民族" v-model="search.nation"
:selectList="resident.dict.getDict('nation')"
@change="page.current=1,refreshTable()"/>
<el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
v-model="search.birthStart"
style="width:250px;border-radius:0;"
type="date"
size="small"
unlink-panels
placeholder="选择出生开始日期"
@change="page.current=1,refreshTable()"
/>
<el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
v-model="search.birthEnd"
style="width:250px;border-radius:0;"
type="date"
size="small"
placeholder="选择出生结束日期"
unlink-panels
@change="page.current=1,refreshTable()"
/>
<el-select
v-model="search.politicsStatus"
placeholder="政治面貌"
size="small"
@change="page.current=1,refreshTable()"
clearable
>
<el-option
v-for="(item,i) in resident.dict.getDict('politicsStatus')"
:key="i"
:label="item.dictName"
:value="item.dictValue"
></el-option>
</el-select>
<el-select
v-model="search.householdName"
placeholder="是否户主"
size="small"
@change="page.current=1,refreshTable()"
clearable
>
<el-option
v-for="(item,i) in resident.dict.getDict('householdName')"
:key="i"
:label="item.dictName"
:value="item.dictValue"
></el-option>
</el-select>
<el-select
v-model="search.faithType"
placeholder="宗教信仰"
@change="page.current=1,refreshTable()"
size="small"
clearable
>
<el-option
v-for="(item,i) in resident.dict.getDict('faithType')"
:key="i"
:label="item.dictName"
:value="item.dictValue"
></el-option>
</el-select>
</template>
<template #right>
<el-input
size="small"
v-model="search.con"
placeholder="姓名/身份证/联系方式"
@keyup.enter.native="search.current = 1, refreshTable()"
@clear="search.current = 1, refreshTable()"
clearable
suffix-icon="iconfont iconSearch"/>
</template>
</ai-search-bar>
<ai-search-bar>
<template #left>
<el-button
size="small"
type="primary"
icon="iconfont iconAdd"
@click="gotoAdd()"
v-if="$permissions('app_appresident_edit')">
添加
</el-button>
<el-button
size="small"
icon="iconfont iconDelete"
:disabled="multipleSelection.length<=0"
@click="beforeDelete()"
v-if="$permissions('app_appresident_del')">
删除
</el-button>
</template>
<template #right>
<ai-import :instance="resident.instance" :dict="resident.dict" type="appresident" name="居民档案"
:importParams="{residentType: active}" @success="refreshTable()">
<el-button icon="iconfont iconImport">导入</el-button>
</ai-import>
<ai-download :instance="resident.instance" :params="params" url="/app/appresident/export"
fileName="居民档案"/>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :col-configs="colConfigs" :dict="resident.dict"
:total="page.total" :current.sync="page.current" :size.sync="page.size"
@getList="refreshTable"
@selection-change="handleSelectionChange">
<el-table-column slot="idNumber" label="身份证号" show-overflow-tooltip align="center">
<template slot-scope="{row}">
<ai-id mode="show" v-model="row.idNumber" :showEyes="false"/>
</template>
</el-table-column>
<el-table-column slot="fileStatus" label="档案状态" show-overflow-tooltip align="center">
<template slot-scope="scope">
<span v-if="scope.row.fileStatus==0" style="color:rgba(46,162,34,1);">正常</span>
<span v-if="scope.row.fileStatus==1" style="color:rgba(153,153,153,1);">已注销</span>
</template>
</el-table-column>
<el-table-column slot="options" label="操作" show-overflow-tooltip align="center">
<template slot-scope="scope">
<div class="table-options">
<el-button
title="详情"
type="text"
v-if="$permissions('app_appresident_detail')"
@click="detailShow(scope.row)">
详情
</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "listTpl",
inject: ['resident'],
props: {
areaId: {default: ""},
active: {default: ""},//人员类型
},
computed: {
...mapState(["user"]),
params() {
let params = {
residentType: this.active
}
//导出搜索条件
if (this.deleteIds.length) {
params = {
...params,
areaId: this.areaId,
ids: this.deleteIds
}
} else {
params = {
areaId: this.areaId,
...params,
...this.search
}
}
return params
},
colConfigs() {
return [
{type: "selection"},
{label: "姓名", prop: "name", align: "center"},
{label: "性别", prop: "sex", dict: 'sex', align: "center"},
{slot: "idNumber"},
{label: "年龄", prop: "age", align: "center"},
{label: "民族", prop: "nation", align: "center", dict: "nation"},
{label: "文化程度", prop: "education", align: "center", dict: "education"},
{label: "政治面貌", prop: "politicsStatus", align: "center", dict: "politicsStatus"},
{slot: "fileStatus"},
{slot: "options"}
]
}
},
watch: {
areaId(v) {
v && this.refreshTable()
}
},
data() {
return {
page: {current: 1, size: 10, total: 0},
search: {
fileStatus: "",
sex: "",
nation: "",
education: "",
politicsStatus: "",
birthStart: "",
birthEnd: "",
faithType: "",
householdName: "",
con: "",
maritalStatus: ""
},
style: {},
tableData: [],
multipleSelection: [],
deleteIds: [],
};
},
methods: {
handleClick() {
this.tableData = [];
this.multipleSelection = [];
this.searchInit()
},
searchInit() {
let tempAreaId = this.search.areaId;
this.search = {
fileStatus: "",
sex: "",
nation: "",
education: "",
politicsStatus: "",
birth: [],
faithType: "",
householdName: "",
areaId: "",
con: "",
maritalStatus: ""
};
this.search.areaId = tempAreaId;
this.page = {current: 1, size: 10, total: 0};
this.refreshTable()
},
handleSelectionChange(val) {
this.deleteIds = [];
this.multipleSelection = val;
this.multipleSelection.forEach(e => {
this.deleteIds.push(e.id);
});
},
exportrExcle() {
if (this.deleteIds.length == 0) {
if (this.search.birth) {
this.search.birth = this.search.birth.join(",");
}
this.resident.instance
.post(`/app/appresident/exportAll`, null, {
params: {
...this.search,
...this.page
}
})
.then(res => {
if (res && res.code == 0) {
this.$message.success(res.data);
if (typeof this.search.birth == "string") {
this.search.birth = this.search.birth.split(",");
}
}
});
} else {
this.resident.instance.post(`/app/appresident/exportByIds`, {
ids: this.deleteIds,
areaId: this.user.info.areaId
}).then(res => {
if (res?.code == 0) {
this.$message.success(res.data);
}
});
}
},
handleSizeChange(val) {
this.page.size = val;
this.refreshTable()
},
detailShow(row) {
this.$router.push({query: {type: this.active, id: row.id}})
},
gotoAdd() {
this.$router.push({query: {type: this.active}})
},
refreshTable() {
this.resident.instance.post(`/app/appresident/list`, null, {
params: {...this.search, ...this.page, areaId: this.areaId, residentType: this.active}
}).then(res => {
if (res?.data) {
this.tableData = res.data.records
this.page.total = res.data.total
}
})
},
beforeDelete() {
this.$confirm("确定要执行删除操作吗?", {type: "error"})
.then(() => {
this.deletePersonFn();
this.deleteIds = [];
})
.catch(() => {
});
},
deletePersonFn() {
this.resident.instance.post(`/app/appresident/deleteBody`, {
ids: this.deleteIds
}).then(res => {
if (res && res.code == 0) {
this.$message.success("删除成功");
if (
this.page.current == Math.ceil(this.page.total / this.page.size)
) {
this.page.total = this.page.total - this.deleteIds.length;
this.page.current = Math.ceil(this.page.total / this.page.size);
}
this.refreshTable();
}
})
},
},
created() {
this.refreshTable()
}
}
</script>
<style lang="scss" scoped>
.listTpl {
height: 100%;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,445 +0,0 @@
<template>
<section class="residentSta">
<div class="dataStatistic">
<div class="above">
<div class="data-item">
<div id="LocalResident" v-if="showStatis"/>
<ai-empty v-else/>
<h5 v-if="LocalResidentData">
更新时间:{{ statisticData.更新时间 }}
</h5>
</div>
<div class="data-item" style="width:66%;">
<div id="ResidentDistribution" v-if="showStatis"/>
<ai-empty v-else/>
</div>
</div>
<div class="above" style="margin-top:24px;">
<div class="data-item">
<div id="SexRatio" v-if="showStatis"/>
<ai-empty v-else/>
<div rightTop><i v-html="'有效数据:'"/> {{ LocalResidentData }}</div>
</div>
<div class="data-item">
<div id="MaritalSta" v-if="showStatis"/>
<ai-empty v-else/>
<div rightTop><i v-html="'有效数据:'"/>{{ LocalResidentData }}</div>
</div>
<div class="data-item">
<div id="AgeDistribution" v-if="showStatis"/>
<ai-empty v-else/>
<div rightTop><i v-html="'有效数据:'"/>{{ LocalResidentData }}</div>
</div>
</div>
</div>
</section>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: "residentSta",
inject: ['resident'],
props: {
areaId: String
},
computed: {
LocalResidentData() {
return this.statisticData?.总人数 || 0
},
AgeDistributionData() {
return this.statisticData?.年龄层次 || []
},
MaritalStaData() {
return this.statisticData?.婚姻状况 || []
},
SexRatioData() {
return this.statisticData?.男女比例 || []
},
ResidentDistributionData() {
return this.statisticData?.人口分布 || []
}
},
data() {
return {
statisticData: {},
showStatis: true,
}
},
watch: {
areaId(v) {
v && this.getStaData()
}
},
methods: {
getStaData() {
this.resident.instance.post(`/app/appresident/queryCustInfoByAreaId`, null, {
params: {
areaId: this.areaId
}
}).then(res => {
if (res?.data) {
this.statisticData = res.data;
this.showStatis = this.LocalResidentData > 0;
this.showLocalResident();
this.showSexRatio();
this.showAgeDistribution();
this.showResidentDistribution();
this.showMaritalSta();
}
})
},
showAgeDistribution() {
//年龄分布
let myChart = echarts.init(document.getElementById("AgeDistribution"));
if (!this.showStatis) {
return myChart.dispose();
}
myChart.setOption({
title: {
text: "年龄层次统计",
subtext: "",
x: "left"
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient: "vertical",
bottom: "bottom",
data: this.AgeDistributionData.map(e => e.v1)
},
series: [
{
name: "年龄层次统计",
type: "pie",
radius: ["40%", "55%"],
center: ["50%", "50%"],
data: this.AgeDistributionData.map(e => ({value: e.v2 * 1, name: e.v1})),
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)"
},
normal: {
color: function (params) {
//自定义颜色
var colorList = [
"#FB3C3C",
"#fc5947",
"#81E84F",
"#3C76FF",
"#6995FF",
"#FFD500",
"#FEF517",
"#B1E598",
"#81E84F",
"#B1E598",
"#FEBB8E"
];
return colorList[params.dataIndex];
}
}
}
}
]
});
},
showLocalResident() {
//本地居民
let myChart = echarts.init(document.getElementById("LocalResident"));
if (!this.showStatis) {
return myChart.dispose();
}
let option = {
title: {
text: "本地居民",
subtext: "",
x: "left"
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b}: {c} ({d}%)"
},
series: [
{
name: "本地居民",
type: "pie",
radius: ["50%", "65%"],
avoidLabelOverlap: false,
label: {
normal: {
show: true,
position: "center",
textStyle: {
fontSize: "40",
fontWeight: "normal",
color: "#333333"
}
},
emphasis: {
show: true,
textStyle: {
fontSize: "40",
fontWeight: "normal",
color: "#333333"
}
}
},
labelLine: {
normal: {
show: false
}
},
data: [{value: this.LocalResidentData, name: this.LocalResidentData}],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)"
},
normal: {
color: function (params) {
//自定义颜色
var colorList = ["#5088FF"];
return colorList[params.dataIndex];
}
}
}
}
]
};
myChart.setOption(option);
},
showMaritalSta() {
//婚姻状况
let myChart = echarts.init(document.getElementById("MaritalSta"));
if (!this.showStatis) {
return myChart.dispose();
}
let option = {
color: [
"#FB3C3C",
"#FC5947",
"#FE8B3F",
"#3C76FF",
"#6995FF",
"#FFD500",
"#FEF517",
"#B1E598",
"#81E84F",
"#B1E598",
"#FEBB8E"
],
backgroundColor: "#FFFFFF",
title: {
text: "婚姻状况统计",
x: "left"
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient: "vertical",
bottom: "bottom",
width: "auto",
height: 50,
data: this.MaritalStaData.map(e => e.v1)
},
series: [
{
name: "婚姻状况",
type: "pie",
radius: ["40%", "55%"],
center: ["50%", "50%"],
data: this.MaritalStaData.map(e => ({value: e.v2 * 1, name: e.v1})),
}
]
};
myChart.setOption(option);
},
showResidentDistribution() {
//人口分布/居民分布
let myChart = echarts.init(document.getElementById("ResidentDistribution"));
if (!this.showStatis) {
return myChart.dispose();
}
let option = {
title: {
text: "人口分布统计",
subtext: "",
x: "left"
},
color: ["#5088FF"],
tooltip: {
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
},
formatter: "{a} <br/>{b} : {c} "
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true
},
xAxis: [
{
type: "category",
data: this.ResidentDistributionData.map(e => e.name),
axisTick: {
alignWithLabel: true
}
}
],
yAxis: [
{
type: "value"
}
],
dataZoom: [
{
id: "dataZoomX",
type: "slider",
xAxisIndex: [0],
filterMode: "filter"
}
],
series: [
{
name: "人口数量",
type: "bar",
barWidth: "16",
data: this.ResidentDistributionData.map(e => e.v1)
}
]
};
myChart.setOption(option);
},
showSexRatio() {
//男女比例
let myChart = echarts.init(document.getElementById("SexRatio"));
if (!this.showStatis) {
return myChart.dispose();
}
myChart.setOption({
title: {
text: "男女比例统计",
subtext: "",
x: "left"
},
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient: "vertical",
bottom: "bottom",
data: this.SexRatioData.map(e => e.v1)
},
series: [
{
name: "男女比例",
type: "pie",
radius: ["40%", "55%"],
center: ["50%", "50%"],
data: this.SexRatioData.map(e => ({value: e.v2 * 1, name: e.v1})),
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)"
},
normal: {
color: function (params) {
//自定义颜色
let colorList = [
"#FB3C3C",
"#3C76FF",
"#3C76FF",
"#FC5947",
"#6995FF",
"#FB3C3C",
"#FE8B3F",
"#B1E598",
"#81E84F",
"#FEBB8E"
];
return colorList[params.dataIndex];
}
}
}
}
]
});
},
},
created() {
this.getStaData()
}
}
</script>
<style lang="scss" scoped>
.residentSta {
height: 100%;
.dataStatistic {
width: 100%;
height: 100%;
overflow-y: auto;
padding: 16px 0;
box-sizing: border-box;
.above {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.data-item {
width: 32%;
height: 380px;
background: rgba(255, 255, 255, 1);
border-radius: 4px;
padding: 16px;
box-sizing: border-box;
position: relative;
div[rightTop] {
position: absolute;
right: 16px;
top: 16px;
font-size: 14px;
font-weight: bold;
color: #333;
& > i {
font-style: normal;
color: #999;
}
}
& > h5 {
width: 100%;
color: #999;
text-align: center;
position: absolute;
bottom: 0;
}
}
}
}
#LocalResident, #MaritalSta, #ResidentDistribution, #SexRatio, #AgeDistribution {
width: 100%;
height: 95%
}
}
</style>

View File

@@ -1,66 +0,0 @@
<template>
<div class="doc-circulation ailist-wrapper">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>
<script>
import List from './components/List'
import Add from './components/Add'
export default {
name: 'AppVillageCode',
label: '一村一码',
props: {
instance: Function,
dict: Object
},
data () {
return {
component: 'List',
params: {},
include: []
}
},
components: {
Add,
List
},
mounted () {
},
methods: {
onChange (data) {
if (data.type === 'Add') {
this.component = 'Add'
this.params = data.params
}
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
}
}
</script>
<style lang="scss">
.doc-circulation {
height: 100%;
background: #F3F6F9;
overflow: auto;
}
</style>

View File

@@ -1,135 +0,0 @@
<template>
<ai-detail>
<template slot="title">
<ai-title title="添加二维码" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
</template>
<template slot="content">
<ai-card title="基本信息">
<template #content>
<el-form class="ai-form" ref="form" :model="form" label-width="110px" label-position="right">
<el-form-item label="地区" style="width: 100%;" prop="codeName">
<span style="color: #666;">{{ form.areaName }}</span>
</el-form-item>
<el-form-item label="二维码名称" prop="codeName" :rules="[{ required: true, message: '请输入二维码名称', trigger: 'blur' }]">
<el-input size="small" placeholder="请输入二维码名称" style="width: 328px;" v-model="form.codeName"></el-input>
</el-form-item>
<el-form-item style="width: 100%;" label="二维码类型" prop="type" :rules="[{ required: true, message: '请选择二维码类型', trigger: 'change' }]">
<el-radio-group v-model="form.type">
<el-radio label="0">群二维码</el-radio>
<el-radio label="1">个人二维码</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="上传二维码" prop="codeUrl" style="width: 100%;" :rules="[{ required: true, message: '请上传二维码', trigger: 'change' }]">
<ai-uploader :instance="instance" v-model="form.codeUrl" :limit="1"></ai-uploader>
</el-form-item>
</el-form>
</template>
</ai-card>
</template>
<template #footer>
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="confirm">提交</el-button>
</template>
</ai-detail>
</template>
<script>
export default {
name: 'Add',
props: {
instance: Function,
dict: Object,
params: Object
},
data () {
return {
info: {},
form: {
areaId: '',
codeName: '',
areaName: '',
code: '',
codeUrl: [],
type: '',
},
id: '',
areaList: []
}
},
created () {
this.getAreaList()
if (this.params && this.params.areaId && !this.params.id) {
this.form.areaId = this.params.areaId
this.form.areaName = this.params.areaName
}
if (this.params && this.params.id) {
this.id = this.params.id
this.getInfo(this.params.id)
}
},
methods: {
getInfo (id) {
this.instance.post(`/app/appeveryvillagecode/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.form = res.data
this.form.codeUrl = [{
url: res.data.codeUrl
}]
}
})
},
getAreaList() {
this.instance.post(`/admin/area/queryAreaByParentId?id=341021104000`).then(res => {
if (res.code == 0) {
this.areaList = res.data.map(item => {
item.dictName = item.name
item.dictValue = item.id
return item
})
}
})
},
onClose () {
this.form.explain = ''
},
confirm () {
this.$refs.form.validate((valid) => {
if (valid) {
this.instance.post(`/app/appeveryvillagecode/addOrUpdate`, {
...this.form,
codeUrl: this.form.codeUrl[0].url
}).then(res => {
if (res.code == 0) {
this.$message.success('提交成功')
setTimeout(() => {
this.cancel(true)
}, 600)
}
})
}
})
},
cancel (isRefresh) {
this.$emit('change', {
type: 'list',
isRefresh: !!isRefresh
})
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -1,422 +0,0 @@
<template>
<ai-list class="villagecode">
<template slot="title">
<ai-title title="一村一码" isShowBottomBorder></ai-title>
</template>
<template #left>
<div class="villagecode-left">
<div class="villagecode-left__title">
<h2>村列表</h2>
</div>
<div class="addressBook-left__list">
<div class="addressBook-left__list--title">
<el-input
class="addressBook-left__list--search"
size="mini"
placeholder="请输入地区名称"
v-model="unitName"
suffix-icon="iconfont iconSearch">
</el-input>
</div>
<el-tree
:filter-node-method="filterNode"
ref="tree"
:props="defaultProps"
node-key="id"
:data="areaTree"
highlight-current
:current-node-key="search.areaId"
:default-expanded-keys="defaultExpanded"
:default-checked-keys="defaultChecked"
@current-change="onTreeChange">
</el-tree>
</div>
</div>
</template>
<template slot="content">
<ai-search-bar class="search-bar">
<template #left>
<el-button size="small" type="primary" :disabled="isShowAdd" icon="iconfont iconAdd" @click="toAdd('')">添加活码</el-button>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
style="margin-top: 6px;"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="tags" label="标签">
<template slot-scope="{ row }">
<div class="table-tags">
<el-tag type="info" v-for="(item, index) in row.tags" size="small" :key="index">{{ item }}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column slot="options" width="180px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-popover
placement="bottom"
width="160"
:visible-arrow="false"
popper-class="wechat-message__container"
trigger="hover">
<el-button type="text" slot="reference">二维码</el-button>
<div style="font-size: 0;">
<img class="message-info__img" :src="row.codeUrl">
</div>
</el-popover>
<el-button type="text" @click="toAdd(row.id)">编辑</el-button>
<el-button type="text" @click="remove(row.id)">删除</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'List',
props: {
instance: Function,
dict: Object
},
data() {
return {
search: {
current: 1,
size: 10,
status: 0,
title: '',
areaId: ''
},
defaultExpanded: [],
defaultChecked: [],
areaTree: [],
defaultProps: {
children: 'children',
label: 'name'
},
currIndex: -1,
areaList: [],
total: 10,
colConfigs: [
{prop: 'codeName', label: '名称', align: 'left'},
{prop: 'type', label: '二维码类型', align: 'left', formart: v => v === '0' ? '群二维码' : '个人二维码'},
{prop: 'createUserName', label: '创建人'},
{prop: 'createTime', label: '创建时间'},
{slot: 'options', label: '操作'}
],
areaName: '',
unitName: '',
tableData: []
}
},
computed: {
...mapState(['user']),
isShowAdd () {
const str = this.search.areaId.substr(this.search.areaId.length - 3)
return str === '000'
}
},
watch: {
unitName (val) {
this.$refs.tree.filter(val)
}
},
mounted() {
this.search.areaId = this.user.info.areaId
this.areaName = this.user.info.areaName
this.getTree()
this.getAreaList()
this.getList()
this.$nextTick(() => {
})
},
methods: {
getList() {
this.instance.post(`/app/appeveryvillagecode/list`, null, {
params: {
...this.search
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
onTreeChange (e) {
this.search.areaId = e.id
this.areaName = e.name
this.search.current = 1
this.$nextTick(() => {
this.getList()
})
},
getTree () {
this.instance.post(`/admin/area/queryAllArea?id=${this.user.info.areaId}`).then(res => {
if (res.code === 0) {
let parent = res.data.map(v => {
v.label = v.name
v.children = []
return v
}).filter(e => !e.parentid)[0]
this.defaultExpanded = [parent.id]
this.defaultChecked = [parent.id]
this.search.areaId = parent.id
this.addChild(parent, res.data)
this.areaTree = [parent]
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(parent.id)
})
}
})
},
addChild (parent, list) {
for (let i = 0; i < list.length; i++) {
if (list[i].parentId === parent.id) {
parent.children.push(list[i])
}
}
if (list.length > 0) {
parent['children'].map(v => this.addChild(v, list))
}
},
getAreaList() {
this.instance.post(`/admin/area/queryAreaByParentId?id=341021104000`).then(res => {
if (res.code == 0) {
this.areaList = res.data
}
})
},
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appeveryvillagecode/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getList()
}
})
})
},
toAdd(id) {
this.$emit('change', {
type: 'Add',
params: {
areaName: this.areaName,
id: id || '',
areaId: this.search.areaId
}
})
}
}
}
</script>
<style lang="scss" scoped>
.villagecode {
.table-tags {
.el-tag {
margin-right: 8px;
&:last-child {
margin-right: 0;
}
}
}
.addressBook-left__list {
height: calc(100% - 40px);
padding: 8px 8px;
overflow: auto;
.addressBook-left__tags--item {
display: flex;
align-items: center;
justify-content: space-between;
height: 40px;
padding: 0 8px 0 16px;
color: #222222;
&.addressBook-left__tags--item-active, &:hover {
background: #E8EFFF;
color: #2266FF;
i, span {
color: #2266FF;
}
}
span {
font-size: 14px;
}
i {
cursor: pointer;
color: #8e9ebf;
font-size: 16px;
}
}
.addressBook-left__list--title {
display: flex;
align-items: center;
margin-bottom: 8px;
.addressBook-left__list--search {
flex: 1;
::v-deep input {
width: 100%;
}
}
.el-button {
width: 84px;
flex-shrink: 1;
margin-right: 8px;
}
}
span {
color: #222222;
font-size: 14px;
}
::v-deep .el-tree {
background: transparent;
.el-tree-node__expand-icon.is-leaf {
color: transparent!important;
}
.el-tree-node__content > .el-tree-node__expand-icon {
padding: 4px;
}
.el-tree-node__content {
height: 32px;
}
.el-tree__empty-text {
color: #222;
font-size: 14px;
}
.el-tree-node__children .el-tree-node__content {
height: 32px;
}
.el-tree-node__content:hover {
background: #E8EFFF;
color: #222222;
border-radius: 2px;
}
.is-current > .el-tree-node__content {
&:hover {
background: #2266FF;
color: #fff;
}
background: #2266FF;
span {
color: #fff;
}
}
}
}
.villagecode-left {
width: 100%;
height: auto;
background: #FAFAFB;
.villagecode-left__title {
display: flex;
align-items: center;
height: 40px;
padding: 0 16px;
background: #E5E5E5;
h2 {
color: #222;
font-size: 14px;
}
}
.villagecode-left__list {
height: calc(100% - 40px);
padding: 8px 0;
overflow: auto;
span {
display: block;
height: 40px;
line-height: 40px;
padding: 0 24px;
color: #222222;
font-size: 14px;
cursor: pointer;
border-right: 2px solid transparent;
background: transparent;
&:hover {
color: #2266FF;
background: #E8EFFF;
}
&.left-active {
color: #2266FF;
border-color: #2266FF;
background: #E8EFFF;
}
}
}
}
::v-deep .ai-list__content--right {
.ai-list__content--right-wrapper {
min-height: 100%;
}
}
}
.message-info__img {
font-size: 0;
width: 144px;
height: 144px;
}
</style>

View File

@@ -1,105 +0,0 @@
<template>
<ai-list v-if="!isShowDetail">
<template slot="title">
<ai-title title="村民圈" isShowArea :isShowBottomBorder="false" :instance="instance" v-model="areaId" @change="changeArea"></ai-title>
</template>
<template slot="tabs">
<el-tabs v-model="currIndex">
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
<component :areaId="areaId" :ref="tab.name" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" />
</el-tab-pane>
</el-tabs>
</template>
</ai-list>
<Detail v-else-if="componentName === 'Detail'" :params="params" :instance="instance" :dict="dict" @change="onChange"></Detail>
<CommentsDetail v-else-if="componentName === 'CommentsDetail'" :areaId="areaId" :params="params" :instance="instance" :dict="dict" @change="onChange"></CommentsDetail>
</template>
<script>
import List from './components/List.vue'
import CommentsList from './components/CommentsList'
import CommentsDetail from './components/CommentsDetail'
import Detail from './components/Detail'
import { mapState } from 'vuex'
export default {
name: 'AppVillagersCircle',
label: '村民圈',
components: {
CommentsDetail,
CommentsList,
List,
Detail
},
props: {
instance: Function,
dict: Object,
permissions: Function
},
computed: {
...mapState(['user']),
tabs () {
const tabList = [
{label: '信息审核', name: 'List', comp: List, permission: ''},
{label: '评论审核', name: 'CommentsList', comp: CommentsList, permission: ''}
]
return tabList
}
},
data () {
return {
currIndex: '0',
componentName: '',
params: {},
areaId: '',
isShowDetail: false
}
},
created() {
this.areaId = this.user.info.areaId
},
methods: {
changeArea () {
this.$nextTick(() => {
this.$refs[this.tabs[Number(this.currIndex)].name][0].getList()
})
},
onChange (data) {
if (data.type === 'List') {
this.componentName = 'List'
this.isShowDetail = false
this.params = data.params
}
if (data.type === 'CommentsList') {
this.componentName = 'CommentsList'
this.isShowDetail = false
this.params = data.params
}
if (data.type === 'Detail') {
this.componentName = 'Detail'
this.isShowDetail = true
this.params = data.params
}
if (data.type === 'CommentsDetail') {
this.componentName = 'CommentsDetail'
this.isShowDetail = true
this.params = data.params
}
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,135 +0,0 @@
<template>
<ai-detail>
<template slot="title">
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
</template>
<template slot="content">
<ai-card title="基础信息">
<ai-wrapper slot="content">
<ai-info-item label="话题" :value="dict.getLabel('villagerCircleTopic', info.villagerCircleInfo.topic)" isLine></ai-info-item>
<ai-info-item label="发布人" :value="info.replyUserName" isLine></ai-info-item>
<ai-info-item label="发布时间" :value="info.createTime" isLine></ai-info-item>
<ai-info-item label="所在位置" :value="info.villagerCircleInfo.gpsDesc" isLine></ai-info-item>
<ai-info-item label="内容" :value="info.content" isLine></ai-info-item>
</ai-wrapper>
</ai-card>
<ai-card title="处理结果" v-if="info.status > 0">
<div slot="content" style="margin-top: 16px">
<ai-wrapper
label-width="120px">
<ai-info-item label="处理结果" :value="info.status === '1' ? '通过' : '拒绝'" isLine></ai-info-item>
<ai-info-item label="原因" v-if="info.status === '2'" isLine :value="info.auditOpinion"></ai-info-item>
<ai-info-item label="审核人" :value="info.auditUserName"></ai-info-item>
<ai-info-item label="审核时间" :value="info.auditTime"></ai-info-item>
</ai-wrapper>
</div>
</ai-card>
<ai-dialog
:visible.sync="isShow"
width="800px"
@close="onClose"
title="审核"
@onConfirm="onConfirm">
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
<el-form-item label="是否通过审核" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择是否通过审核' }]">
<el-radio-group v-model="form.pass">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核意见" v-if="form.pass === '0'" prop="opinion" style="width: 100%;" :rules="[{ required: true, message: '请输入审核意见' }]">
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
</el-form-item>
</el-form>
</ai-dialog>
</template>
<template #footer >
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="isShow = true" v-if="info.status === '0'">审核</el-button>
</template>
</ai-detail>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'CommentsDetail',
props: {
instance: Function,
dict: Object,
params: Object
},
data () {
return {
info: {},
id: '',
search: {
current: 1,
size: 10
},
form: {
opinion: '',
pass: ''
},
isShow: false,
type: ''
}
},
computed: {
...mapState(['user'])
},
created () {
this.getInfo(this.params.id)
},
methods: {
getInfo (id) {
this.instance.post(`/app/appvillagercirclecomment/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
}
})
},
onClose () {
this.form.pass = ''
this.form.opinion = ''
this.id = ''
},
onConfirm() {
this.$refs.form.validate(v => {
if (v) {
this.instance.post('/app/appvillagercirclecomment/examine', null, {
params: {
...this.form,
id: this.params.id
}
}).then(res => {
if (res.code == 0) {
this.isShow = false
this.getInfo(this.params.id)
this.$message.success('审核成功!')
}
})
}
})
},
cancel (isRefresh) {
this.$emit('change', {
type: 'CommentsList',
isRefresh: !!isRefresh
})
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -1,140 +0,0 @@
<template>
<ai-list isTabs>
<template slot="content">
<ai-search-bar class="search-bar">
<template #left>
<ai-select
placeholder="请选择状态"
v-model="search.status"
clearable
@change="search.current = 1, getList()"
:selectList="dict.getDict('auditStatus')">
</ai-select>
<ai-select
placeholder="请选择话题"
v-model="search.topic"
clearable
@change="search.current = 1, getList()"
:selectList="dict.getDict('villagerCircleTopic')">
</ai-select>
</template>
<template #right>
<el-input
v-model="search.title"
class="search-input"
size="small"
@keyup.enter.native="search.current = 1, search.title, getList()"
placeholder="请输入发布人姓名"
clearable
@clear="search.current = 1, search.title = '', getList()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
style="margin-top: 6px;"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" title="详情" @click="toDetail(row.id)">详情</el-button>
<el-button type="text" @click="remove(row.id)">删除</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'CommentsList',
props: {
instance: Function,
dict: Object,
areaId: String
},
data() {
return {
search: {
current: 1,
size: 10,
status: '',
topic: '',
title: ''
},
total: 0,
colConfigs: [
{ prop: 'replyUserName', label: '发布人', align: 'left' },
{ prop: 'createTime', label: '发布时间', align: 'center' },
{ prop: 'content', label: '发布内容', align: 'center' },
{ prop: 'villagerCircleInfo', label: '话题类型', align: 'center', formart: v => this.dict.getLabel('villagerCircleTopic', v.topic) },
{ prop: 'status', label: '状态', align: 'center', formart: v => this.dict.getLabel('auditStatus', v) },
{ prop: 'auditUserName', label: '审核人', align: 'center' },
{ prop: 'auditTime', label: '审核时间', align: 'center' },
{ slot: 'options', label: '操作', align: 'center' }
],
tableData: []
}
},
computed: {
...mapState(['user'])
},
created () {
this.search.areaId = this.user.info.areaId
this.dict.load(['villagerCircleTopic', 'auditStatus']).then(() => {
this.getList()
})
},
methods: {
getList() {
this.instance.post(`/app/appvillagercirclecomment/list`, null, {
params: {
...this.search,
areaId: this.areaId
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appvillagercirclecomment/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getList()
}
})
})
},
toDetail (id) {
this.$emit('change', {
type: 'CommentsDetail',
params: {
id: id || ''
}
})
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,143 +0,0 @@
<template>
<ai-detail>
<template slot="title">
<ai-title title="村民圈详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
</template>
<template slot="content">
<ai-card title="基础信息">
<ai-wrapper slot="content">
<ai-info-item label="话题" :value="dict.getLabel('villagerCircleTopic', info.topic)" isLine></ai-info-item>
<ai-info-item label="发布人" :value="info.createUserName" isLine></ai-info-item>
<ai-info-item label="发布时间" :value="info.createTime" isLine></ai-info-item>
<ai-info-item label="所在位置" :value="info.gpsDesc" isLine></ai-info-item>
<ai-info-item label="内容" :value="info.content" isLine></ai-info-item>
<ai-info-item label="图片" isLine>
<ai-uploader
:instance="instance"
disabled
v-model="info.pictures"
:limit="9">
</ai-uploader>
</ai-info-item>
</ai-wrapper>
</ai-card>
<ai-card title="处理结果" v-if="info.status > 0">
<div slot="content" style="margin-top: 16px">
<ai-wrapper
label-width="120px">
<ai-info-item label="处理结果" :value="info.status === '1' ? '通过' : '拒绝'" isLine></ai-info-item>
<ai-info-item label="原因" v-if="info.status === '2'" isLine :value="info.auditOpinion"></ai-info-item>
<ai-info-item label="审核人" :value="info.auditUserName"></ai-info-item>
<ai-info-item label="审核时间" :value="info.auditTime"></ai-info-item>
</ai-wrapper>
</div>
</ai-card>
<ai-dialog
:visible.sync="isShow"
width="800px"
@close="onClose"
title="审核"
@onConfirm="onConfirm">
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
<el-form-item label="是否通过审核" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择是否通过审核' }]">
<el-radio-group v-model="form.pass">
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核意见" v-if="form.pass === '0'" prop="opinion" style="width: 100%;" :rules="[{ required: true, message: '请输入审核意见' }]">
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
</el-form-item>
</el-form>
</ai-dialog>
</template>
<template #footer >
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="isShow = true" v-if="info.status === '0'">审核</el-button>
</template>
</ai-detail>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'Detail',
props: {
instance: Function,
dict: Object,
params: Object
},
data () {
return {
info: {},
id: '',
search: {
current: 1,
size: 10
},
form: {
opinion: '',
pass: ''
},
isShow: false,
type: ''
}
},
computed: {
...mapState(['user'])
},
created () {
this.getInfo(this.params.id)
},
methods: {
getInfo (id) {
this.instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = res.data
}
})
},
onClose () {
this.form.pass = ''
this.form.opinion = ''
this.id = ''
},
onConfirm() {
this.$refs.form.validate(v => {
if (v) {
this.instance.post('/app/appvillagercircleinfo/examine', null, {
params: {
...this.form,
id: this.params.id
}
}).then(res => {
if (res.code == 0) {
this.isShow = false
this.getInfo(this.params.id)
this.$message.success('审核成功!')
}
})
}
})
},
cancel (isRefresh) {
this.$emit('change', {
type: 'List',
isRefresh: !!isRefresh
})
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -1,141 +0,0 @@
<template>
<ai-list isTabs>
<template slot="content">
<ai-search-bar class="search-bar">
<template #left>
<ai-select
placeholder="请选择状态"
v-model="search.status"
clearable
@change="search.current = 1, getList()"
:selectList="dict.getDict('auditStatus')">
</ai-select>
<ai-select
placeholder="请选择话题"
v-model="search.topic"
clearable
@change="search.current = 1, getList()"
:selectList="dict.getDict('villagerCircleTopic')">
</ai-select>
</template>
<template #right>
<el-input
v-model="search.title"
class="search-input"
size="small"
@keyup.enter.native="search.current = 1, search.title, getList()"
placeholder="请输入发布人姓名"
clearable
@clear="search.current = 1, search.title = '', getList()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
style="margin-top: 6px;"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" title="详情" @click="toDetail(row.id)">详情</el-button>
<el-button type="text" @click="remove(row.id)">删除</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'List',
props: {
instance: Function,
dict: Object,
areaId: String
},
data() {
return {
search: {
current: 1,
size: 10,
status: '',
topic: '',
title: '',
areaId: ''
},
total: 0,
colConfigs: [
{ prop: 'createUserName', label: '发布人', align: 'left' },
{ prop: 'createTime', label: '发布时间', align: 'center' },
{ prop: 'content', label: '发布内容', align: 'center' },
{ prop: 'topic', label: '话题类型', align: 'center', formart: v => this.dict.getLabel('villagerCircleTopic', v) },
{ prop: 'status', label: '状态', align: 'center', formart: v => this.dict.getLabel('auditStatus', v) },
{ prop: 'auditUserName', label: '审核人', align: 'center' },
{ prop: 'auditTime', label: '审核时间', align: 'center' },
{ slot: 'options', label: '操作', align: 'center' }
],
tableData: []
}
},
computed: {
...mapState(['user'])
},
created () {
this.search.areaId = this.user.info.areaId
this.dict.load(['villagerCircleTopic', 'auditStatus']).then(() => {
this.getList()
})
},
methods: {
getList() {
this.instance.post(`/app/appvillagercircleinfo/list`, null, {
params: {
...this.search,
areaId: this.areaId
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appvillagercircleinfo/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getList()
}
})
})
},
toDetail (id) {
this.$emit('change', {
type: 'Detail',
params: {
id: id || ''
}
})
}
}
}
</script>
<style lang="scss" scoped>
</style>