特殊人群
This commit is contained in:
@@ -204,7 +204,7 @@
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appepidemicreportmember/queryDetailById?id=${id}`).then(res => {
|
||||
this.instance.post(`/app/appepidemicreportmember/queryDetailById?memberId=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.currIndex = 0
|
||||
|
||||
@@ -57,14 +57,11 @@
|
||||
name: ''
|
||||
},
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '姓名' },
|
||||
{ prop: 'phone', align: 'center', label: '手机号码' },
|
||||
{ prop: 'areaName', align: 'center', label: '所属地区', width: '200px' },
|
||||
{ prop: 'reportTime', align: 'center', label: '上报时间', width: '200px' },
|
||||
{ prop: 'healthCode', align: 'center', label: '健康码', formart: v => v ? this.dict.getLabel('epidemicHealthCode', v) : '-' },
|
||||
{ prop: 'checkTime', align: 'center', label: '核酸日期', formart: v => v ? v.split(' ')[0] : '-' },
|
||||
{ prop: 'checkResult', align: 'center', label: '检测结果', formart: v => v ? this.dict.getLabel('epidemicRecentTestResult', v) : '-' },
|
||||
{ prop: 'today', align: 'center', label: '今日上报', formart: v => v === '0' ? '未上报' : '已上报' },
|
||||
{ prop: 'name', label: '员工姓名' },
|
||||
{ prop: 'girdNames', align: 'center', label: '网格' },
|
||||
{ prop: 'clockCount', align: 'center', label: '打卡次数' },
|
||||
{ prop: 'lastReportTime', align: 'center', label: '最近打卡时间' },
|
||||
{ prop: 'status', align: 'center', label: '健康状态', formart: v => v === '0' ? '异常' : '正常' }
|
||||
],
|
||||
tableData: [],
|
||||
total: 0,
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<div class="AppSpecialDisabled">
|
||||
<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'
|
||||
import Add from './components/Add.vue'
|
||||
|
||||
export default {
|
||||
name: 'AppSpecialAdjustment',
|
||||
label: '社区矫正人群',
|
||||
|
||||
components: {
|
||||
Add,
|
||||
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 === 'Add') {
|
||||
this.component = 'Add'
|
||||
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>
|
||||
.AppSpecialDisabled {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
406
project/sass/apps/AppSpecialAdjustment/components/Add.vue
Normal file
406
project/sass/apps/AppSpecialAdjustment/components/Add.vue
Normal file
@@ -0,0 +1,406 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<template #title>
|
||||
<ai-title
|
||||
:title="params.id ? '编辑社区矫正人群' : '新增社区矫正人群'"
|
||||
isShowBottomBorder
|
||||
isShowBack
|
||||
@onBackClick="onBack(true)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-card title="基本信息">
|
||||
<template slot="content">
|
||||
<el-form ref="formData" class="ai-form" :rules="rules" :model="formData" label-width="110px" size="small">
|
||||
<div v-for="(item, index) in filedList" :key="index" :style="item.grid == 1 ? 'width: 100%;' : 'width: 50%;'">
|
||||
<el-form-item :label="item.label" :prop="item.formDbName" style="width: 100%">
|
||||
<template v-if="item.type == 'select'">
|
||||
<ai-select v-model="formData[item.formDbName]" :placeholder="item.fieldName" :selectList="dict.getDict(item.dict)" :disabled="item.disable == 1" />
|
||||
</template>
|
||||
<template v-else-if="item.type == 'radio'">
|
||||
<el-radio-group v-model="formData[item.formDbName]" :disabled="item.disable == 1">
|
||||
<el-radio :label="item.dictValue" v-for="(item, i) in dict.getDict(item.dict)" :key="i">{{ item.dictName }}</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'gird'">
|
||||
<el-input disabled v-model="formData[item.formDbName]" :maxlength="200" size="small" placeholder="请选择选择网格">
|
||||
<template slot="append">
|
||||
<el-button size="small" @click="showGrid = true">选择网格</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'onOff'">
|
||||
<el-switch v-model="formData[item.formDbName]" active-color="#26f" inactive-color="#ddd" active-value="1" inactive-value="0" :disabled="item.disable == 1"></el-switch>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'checkbox'">
|
||||
<el-checkbox-group v-model="formData[item.formDbName]" :disabled="item.disable == 1">
|
||||
<el-checkbox v-for="(item, i) in dict.getDict(item.dict)" :label="item.dictValue" :key="i">
|
||||
{{ item.dictName }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'idNumber'">
|
||||
<ai-id v-model="formData[item.formDbName]" :disabled="item.disable == 1" />
|
||||
</template>
|
||||
<template v-else-if="item.type == 'input' || item.type == 'name' || item.type == 'phone'">
|
||||
<el-input v-model="formData[item.formDbName]" :placeholder="'请输入'+ item.label" clearable :disabled="item.disable == 1"
|
||||
:maxlength="item.maxLength" show-word-limit></el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'number'">
|
||||
<el-input-number v-model="formData[item.formDbName]" :label="'请输入'+item.label" :disabled="item.disable == 1" :precision="item.decimalPlaces" :max="item.maxValue" :min="item.minValue"></el-input-number>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'textarea' || item.type == 'text'">
|
||||
<el-input v-model="formData[item.formDbName]" :placeholder="'请输入'+item.label" clearable :disabled="item.disable == 1"
|
||||
:maxlength="item.maxLength" type="textarea" show-word-limit :rows="3"></el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'date'">
|
||||
<el-date-picker
|
||||
v-model="formData[item.formDbName]"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
placeholder="请选择"
|
||||
:disabled="item.disable == 1"
|
||||
value-format="yyyy-MM-DD">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'datetime'">
|
||||
<el-date-picker v-model="formData[item.formDbName]" type="datetime" placeholder="选择日期时间" :disabled="item.disable == 1"
|
||||
value-format="yyyy-MM-DD HH-mm-ss"></el-date-picker>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'time'">
|
||||
<el-time-picker v-model="formData[item.formDbName]" placeholder="请选择" :disabled="item.disable == 1"
|
||||
value-format="HH-mm-ss"></el-time-picker>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'upload'">
|
||||
<ai-uploader :instance="instance" isShowTip fileType="file" v-model="formData[item.formDbName]" :disabled="item.disable == 1"
|
||||
acceptType=".zip,.rar,.doc,.docx,.xls,.ppt,.pptx,.pdf,.txt,.jpg,.png,.xlsx"
|
||||
:limit="item.fileMaxCount" :maxSize="item.fileChoseSize"></ai-uploader>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'rtf'">
|
||||
<ai-editor v-model="formData[item.formDbName]" :instance="instance"/>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'area'">
|
||||
<ai-area-get :instance="instance" v-model="formData[item.formDbName]" :name.sync="formData.areaName" :disabled="item.disable == 1"/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<ai-dialog
|
||||
title="选择网格"
|
||||
:visible.sync="showGrid"
|
||||
:destroyOnClose="true"
|
||||
@close="showGrid = false"
|
||||
@onConfirm="getCheckedTree"
|
||||
width="720px">
|
||||
<div class="grid">
|
||||
<el-tree
|
||||
:data="treeObj.treeList"
|
||||
:props="treeObj.defaultProps"
|
||||
node-key="id"
|
||||
ref="tree"
|
||||
:check-strictly="true" show-checkbox
|
||||
:default-checked-keys="treeObj.checkedKeys"
|
||||
default-expand-all highlight-current>
|
||||
</el-tree>
|
||||
</div>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button class="delete-btn footer-btn" @click="onBack">取消</el-button>
|
||||
<el-button class="footer-btn" type="primary" @click="submit('formData')">提交</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Add',
|
||||
props: {
|
||||
instance: Function,
|
||||
params: Object,
|
||||
dict: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showGrid: false,
|
||||
formData: {
|
||||
girdName: '',
|
||||
name: '',
|
||||
idNumber: '',
|
||||
girdId: '',
|
||||
placeTime: '',
|
||||
phone: '',
|
||||
areaId: '',
|
||||
address: '',
|
||||
areaName: '',
|
||||
crime: '',
|
||||
type: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
isCreateGroup: '',
|
||||
isRelease: ''
|
||||
},
|
||||
treeObj: {
|
||||
treeList: [],
|
||||
defaultProps: {
|
||||
children: "girdList",
|
||||
label: "girdName",
|
||||
},
|
||||
checkedKeys: [],
|
||||
},
|
||||
areaId: '',
|
||||
filedList: [
|
||||
{
|
||||
label: '姓名',
|
||||
type: 'input',
|
||||
formDbName: 'name',
|
||||
mustFill: 1,
|
||||
fieldTips: '请输入姓名'
|
||||
},
|
||||
{
|
||||
label: '身份证号',
|
||||
type: 'input',
|
||||
formDbName: 'idNumber',
|
||||
mustFill: 1,
|
||||
fieldTips: '请输入身份证号'
|
||||
},
|
||||
{
|
||||
label: '联系电话',
|
||||
type: 'input',
|
||||
formDbName: 'phone',
|
||||
mustFill: 1,
|
||||
fieldTips: '请输入联系电话'
|
||||
},
|
||||
{
|
||||
label: '所属区域',
|
||||
type: 'area',
|
||||
formDbName: 'areaId',
|
||||
mustFill: 1,
|
||||
fieldTips: '请选择所属区域'
|
||||
},
|
||||
{
|
||||
label: '详细地址',
|
||||
type: 'input',
|
||||
grid: 1,
|
||||
formDbName: 'address'
|
||||
},
|
||||
{
|
||||
label: '所属网格',
|
||||
type: 'gird',
|
||||
grid: 1,
|
||||
formDbName: 'girdName'
|
||||
},
|
||||
{
|
||||
label: '具体罪名',
|
||||
type: 'input',
|
||||
formDbName: 'crime'
|
||||
},
|
||||
{
|
||||
label: '矫正类别',
|
||||
type: 'select',
|
||||
dict: 'appSpecialChangeType',
|
||||
formDbName: 'type'
|
||||
},
|
||||
{
|
||||
label: '矫正开始日期',
|
||||
type: 'date',
|
||||
formDbName: 'startTime',
|
||||
},
|
||||
{
|
||||
label: '矫正结束日期',
|
||||
type: 'date',
|
||||
formDbName: 'endTime',
|
||||
},
|
||||
{
|
||||
label: '是否建立矫正小组',
|
||||
type: 'select',
|
||||
dict: 'yesOrNo',
|
||||
formDbName: 'isCreateGroup',
|
||||
},
|
||||
{
|
||||
label: '是否托管',
|
||||
type: 'select',
|
||||
dict: 'yesOrNo',
|
||||
formDbName: 'isRelease',
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
rules() {
|
||||
let rules = {}
|
||||
this.filedList.map(e => {
|
||||
rules[e.formDbName] = []
|
||||
if (e.mustFill == 1) {
|
||||
rules[e.formDbName]?.push({required: true, message: e.fieldTips})
|
||||
}
|
||||
})
|
||||
return rules
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params.id) {
|
||||
this.dict.load(this.filedList.filter(v => v.dict).map(v => v.dict)).then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
} else {
|
||||
this.getGridList()
|
||||
this.dict.load(this.filedList.filter(v => v.dict).map(v => v.dict))
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getFormData() {
|
||||
this.initForm(this.configs)
|
||||
},
|
||||
|
||||
getCheckedTree() {
|
||||
if (this.$refs.tree.getCheckedNodes().length > 1) {
|
||||
return this.$message.error('不能选择多个网格')
|
||||
}
|
||||
|
||||
const gird = this.$refs.tree.getCheckedNodes()
|
||||
|
||||
if (gird.length) {
|
||||
this.formData.girdName = gird[0].girdName
|
||||
this.formData.girdId = gird[0].id
|
||||
} else {
|
||||
this.formData.girdName = ''
|
||||
this.formData.girdId = ''
|
||||
}
|
||||
this.showGrid = false
|
||||
},
|
||||
|
||||
getGridList() {
|
||||
this.instance.post(`/app/appgirdinfo/listAll`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.treeObj.treeList = res.data
|
||||
if (this.formData.girdId) {
|
||||
this.$set(this.treeObj, 'checkedKeys', [this.formData.girdId])
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDetail() {
|
||||
this.instance.post(`/app/appspecialadjustment/queryDetailById?id=${this.params.id}`).then((res) => {
|
||||
if (res.data) {
|
||||
this.formData = res.data
|
||||
this.getGridList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
submit() {
|
||||
this.$refs.formData?.validate((valid) => {
|
||||
if (valid) {
|
||||
this.filedList.map((item) => {
|
||||
if (item.length) {
|
||||
item.map((items) => {
|
||||
if (items.type == 'checkbox' && this.formData[items.fieldDbName].length) { //多选
|
||||
this.formData[items.fieldDbName] = this.formData[items.fieldDbName]?.toString()
|
||||
}
|
||||
if (items.type == 'upload' && this.formData[items.fieldDbName].length) { //附件 只传id
|
||||
var files = []
|
||||
this.formData[items.fieldDbName].map((item) => {
|
||||
files.push(item.id)
|
||||
})
|
||||
this.formData[items.fieldDbName] = files.join(',')
|
||||
}
|
||||
if(items.type == 'area' && this.formData[items.fieldDbName]) {
|
||||
var area = []
|
||||
area.push(this.formData[items.fieldDbName])
|
||||
area.push(this.formData[items.fieldDbName+'_name'])
|
||||
this.formData[items.fieldDbName] = area.join('_')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.instance.post(`/app/appspecialadjustment/addOrUpdate`, {
|
||||
...this.formData,
|
||||
id: this.params.id || ''
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
setTimeout(() => {
|
||||
this.onBack(true)
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onBack(isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
params: this.params,
|
||||
isRefresh: !!isRefresh,
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .ai-card{
|
||||
width: 100%;
|
||||
}
|
||||
.form-div {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.especial {
|
||||
margin-bottom: 12px;
|
||||
|
||||
.icon {
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
padding-top: 5px;
|
||||
margin-left: 20px;
|
||||
color: #f46;
|
||||
}
|
||||
|
||||
.people {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
padding-right: 12px;
|
||||
vertical-align: top;
|
||||
width: 64px;
|
||||
word-break: break-all;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.AiWechatSelecter {
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.hint {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.mar-r40 {
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
.w80 {
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
|
||||
.AiWechatSelecter {
|
||||
width: calc(100% - 120px);
|
||||
}
|
||||
</style>
|
||||
180
project/sass/apps/AppSpecialAdjustment/components/Detail.vue
Normal file
180
project/sass/apps/AppSpecialAdjustment/components/Detail.vue
Normal file
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<ai-detail class="AppSpecial" isHasSidebar>
|
||||
<template slot="title">
|
||||
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<AiSidebar :tabTitle="tabTitle" v-model="currIndex"></AiSidebar>
|
||||
<ai-card title="基本信息" v-show="currIndex === 0">
|
||||
<template #content>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
|
||||
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
|
||||
<ai-info-item label="性别" :value="idNumberInfo.gender"></ai-info-item>
|
||||
<ai-info-item label="出生日期" :value="idNumberInfo.birthday"></ai-info-item>
|
||||
<ai-info-item label="联系电话" :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="所属区域" :value="info.areaName"></ai-info-item>
|
||||
<ai-info-item label="详细地址" isLine :value="info.address"></ai-info-item>
|
||||
<ai-info-item label="所属网格" :value="info.girdName"></ai-info-item>
|
||||
<ai-info-item label="具体罪名" :value="info.crime"></ai-info-item>
|
||||
<ai-info-item label="矫正类别" :value="dict.getLabel('appSpecialChangeType', info.type)"></ai-info-item>
|
||||
<ai-info-item label="矫正开始日期" :value="info.startTime"></ai-info-item>
|
||||
<ai-info-item label="矫正结束日期" :value="info.endTime"></ai-info-item>
|
||||
<ai-info-item label="是否建立矫正小组" :value="dict.getLabel('yesOrNo', info.isCreateGroup)"></ai-info-item>
|
||||
<ai-info-item label="是否托管" isLine :value="dict.getLabel('yesOrNo', info.isRelease)"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<div class="visit-list" v-show="currIndex === 1">
|
||||
<div class="visit-item" v-for="(item, index) in list" :key="index">
|
||||
<div class="visit-item__top">
|
||||
<div class="left">
|
||||
<div class="avatar">{{ item.name.substr(item.name.length - 2) }}</div>
|
||||
<h2>{{ item.name }}</h2>
|
||||
</div>
|
||||
<span>{{ item.visitTime }}</span>
|
||||
</div>
|
||||
<b>{{ item.title }}</b>
|
||||
<p>{{ item.description }}</p>
|
||||
<div class="visit-imgs">
|
||||
<ai-uploader v-model="item.images" :instance="instance" :limit="9" disabled/>
|
||||
</div>
|
||||
<div class="visit-status">
|
||||
<span>现实状态:</span>
|
||||
<i>{{ dict.getLabel('visitCondolenceReality', item.reality) }}</i>
|
||||
</div>
|
||||
</div>
|
||||
<ai-empty v-if="!list.length"></ai-empty>
|
||||
</div>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
currIndex: 0,
|
||||
tabTitle: ['人员信息', '走访记录'],
|
||||
info: {},
|
||||
list: [],
|
||||
idNumberInfo: {}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
|
||||
this.dict.load('appSpecialSituation', 'appSpecialPlacement', 'appSpecialDenger', 'appSpecialCrime',
|
||||
'appSpecialControl', 'appSpecialDebug', 'appSpecialDrug', 'appSpecialChangeType', 'appSpecialCure', 'appSpecialDengerLevel',
|
||||
'appSpecialDisableLevel', 'appSpecialDisableType', 'appSpecialHealth', 'appSpecialMarriage', 'appSpecialTypeFive','isReflection','yesOrNo').then(() => {
|
||||
this.getInfo(this.params.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appspecialadjustment/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.idNumberInfo = this.idCardNoUtil.getIdCardInfo(res.data.idNumber)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.AppSpecial {
|
||||
.visit-list {
|
||||
.visit-item {
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.visit-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
|
||||
span {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #999;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
& > p {
|
||||
line-height: 1.4;
|
||||
margin-bottom: 4px;
|
||||
text-align: justify;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.visit-item__top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
img, .avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
margin-right: 10px;
|
||||
border-radius: 50%;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
background: #26f;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
158
project/sass/apps/AppSpecialAdjustment/components/List.vue
Normal file
158
project/sass/apps/AppSpecialAdjustment/components/List.vue
Normal file
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<ai-title slot="title" title="社区矫正人群" isShowBottomBorder></ai-title>
|
||||
<template slot="content">
|
||||
<div class="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" size="small" @click="toAdd('', 'Add')">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
@clear="search.current = 1, search.name = '', 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: 16px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="toEdit(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(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,
|
||||
name: ''
|
||||
},
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '姓名' },
|
||||
{ prop: 'idNumber', align: 'center', label: '身份证号' },
|
||||
{ prop: 'gender', align: 'center', label: '性别' },
|
||||
{ prop: 'birthday', align: 'center', label: '出生日期' },
|
||||
{ prop: 'age', align: 'center', label: '年龄', },
|
||||
{ prop: 'phone', align: 'center', label: '联系方式' }
|
||||
],
|
||||
tableData: [],
|
||||
total: 0,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
param () {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.dict.load('sex').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appspecialadjustment/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records.map(v => {
|
||||
let info = this.idCardNoUtil.getIdCardInfo(v.idNumber)
|
||||
v.birthday = info.birthday
|
||||
v.age = this.$calcAge(v.idNumber)
|
||||
v.gender = info.gender
|
||||
|
||||
return v
|
||||
})
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toEdit (e) {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
type: 'Add',
|
||||
id: e
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toAdd() {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
type: 'Add',
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appspecialadjustment/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 scoped lang="scss">
|
||||
</style>
|
||||
62
project/sass/apps/AppSpecialDisabled/AppSpecialDisabled.vue
Normal file
62
project/sass/apps/AppSpecialDisabled/AppSpecialDisabled.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class="AppSpecialDisabled">
|
||||
<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: 'AppSpecialDisabled',
|
||||
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>
|
||||
.AppSpecialDisabled {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
78
project/sass/apps/AppSpecialDisabled/components/Detail.vue
Normal file
78
project/sass/apps/AppSpecialDisabled/components/Detail.vue
Normal file
@@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<ai-detail isHasSidebar>
|
||||
<template slot="title">
|
||||
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本">
|
||||
<template #content>
|
||||
<ai-table
|
||||
class="detail-table__table"
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="140px" 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>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
info: {}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.dict.load(['epidemicRecentHealth', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicMemberType', 'epidemicRecentTestResult']).then(() => {
|
||||
this.getInfo(this.params.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appepidemicreportmember/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.currIndex = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
136
project/sass/apps/AppSpecialDisabled/components/List.vue
Normal file
136
project/sass/apps/AppSpecialDisabled/components/List.vue
Normal file
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<ai-title slot="title" title="残疾人" isShowBottomBorder></ai-title>
|
||||
<template slot="content">
|
||||
<div class="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
@clear="search.current = 1, search.name = '', 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: 16px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="remove(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,
|
||||
name: ''
|
||||
},
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '姓名' },
|
||||
{ prop: 'phone', align: 'center', label: '手机号码' },
|
||||
{ prop: 'areaName', align: 'center', label: '所属地区', width: '200px' },
|
||||
{ prop: 'reportTime', align: 'center', label: '上报时间', width: '200px' },
|
||||
{ prop: 'healthCode', align: 'center', label: '健康码', formart: v => v ? this.dict.getLabel('epidemicHealthCode', v) : '-' },
|
||||
{ prop: 'checkTime', align: 'center', label: '核酸日期', formart: v => v ? v.split(' ')[0] : '-' },
|
||||
{ prop: 'checkResult', align: 'center', label: '检测结果', formart: v => v ? this.dict.getLabel('epidemicRecentTestResult', v) : '-' },
|
||||
{ prop: 'today', align: 'center', label: '今日上报', formart: v => v === '0' ? '未上报' : '已上报' },
|
||||
],
|
||||
tableData: [],
|
||||
total: 0,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
param () {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.loading = true
|
||||
this.dict.load(['epidemicTouchInFourteen']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appepidemicreportmember/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
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appepidemicreportmember/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getTotalInfo()
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
70
project/sass/apps/AppSpecialDrug/AppSpecialDrug.vue
Normal file
70
project/sass/apps/AppSpecialDrug/AppSpecialDrug.vue
Normal file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<div class="AppSpecialDisabled">
|
||||
<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'
|
||||
import Add from './components/Add.vue'
|
||||
|
||||
export default {
|
||||
name: 'AppSpecialDrug',
|
||||
label: '吸毒人员',
|
||||
|
||||
components: {
|
||||
List,
|
||||
Add,
|
||||
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 === 'Add') {
|
||||
this.component = 'Add'
|
||||
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>
|
||||
.AppSpecialDisabled {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
414
project/sass/apps/AppSpecialDrug/components/Add.vue
Normal file
414
project/sass/apps/AppSpecialDrug/components/Add.vue
Normal file
@@ -0,0 +1,414 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<template #title>
|
||||
<ai-title
|
||||
:title="params.id ? '编辑吸毒人员' : '新增吸毒人员'"
|
||||
isShowBottomBorder
|
||||
isShowBack
|
||||
@onBackClick="onBack(true)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-card title="基本信息">
|
||||
<template slot="content">
|
||||
<el-form ref="formData" class="ai-form" :rules="rules" :model="formData" label-width="110px" size="small">
|
||||
<div v-for="(item, index) in filedList" :key="index" :style="item.grid == 1 ? 'width: 100%;' : 'width: 50%;'">
|
||||
<el-form-item :label="item.label" :prop="item.formDbName" style="width: 100%">
|
||||
<template v-if="item.type == 'select'">
|
||||
<ai-select v-model="formData[item.formDbName]" :placeholder="item.fieldName" :selectList="dict.getDict(item.dict)" :disabled="item.disable == 1" />
|
||||
</template>
|
||||
<template v-else-if="item.type == 'radio'">
|
||||
<el-radio-group v-model="formData[item.formDbName]" :disabled="item.disable == 1">
|
||||
<el-radio :label="item.dictValue" v-for="(item, i) in dict.getDict(item.dict)" :key="i">{{ item.dictName }}</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'gird'">
|
||||
<el-input disabled v-model="formData[item.formDbName]" :maxlength="200" size="small" placeholder="请选择选择网格">
|
||||
<template slot="append">
|
||||
<el-button size="small" @click="showGrid = true">选择网格</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'onOff'">
|
||||
<el-switch v-model="formData[item.formDbName]" active-color="#26f" inactive-color="#ddd" active-value="1" inactive-value="0" :disabled="item.disable == 1"></el-switch>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'checkbox'">
|
||||
<el-checkbox-group v-model="formData[item.formDbName]" :disabled="item.disable == 1">
|
||||
<el-checkbox v-for="(item, i) in dict.getDict(item.dict)" :label="item.dictValue" :key="i">
|
||||
{{ item.dictName }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'idNumber'">
|
||||
<ai-id v-model="formData[item.formDbName]" :disabled="item.disable == 1" />
|
||||
</template>
|
||||
<template v-else-if="item.type == 'input' || item.type == 'name' || item.type == 'phone'">
|
||||
<el-input v-model="formData[item.formDbName]" :placeholder="'请输入'+ item.label" clearable :disabled="item.disable == 1"
|
||||
:maxlength="item.maxLength" show-word-limit></el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'number'">
|
||||
<el-input-number v-model="formData[item.formDbName]" :label="'请输入'+item.label" :disabled="item.disable == 1" :precision="item.decimalPlaces" :max="item.maxValue" :min="item.minValue"></el-input-number>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'textarea' || item.type == 'text'">
|
||||
<el-input v-model="formData[item.formDbName]" :placeholder="'请输入'+item.label" clearable :disabled="item.disable == 1"
|
||||
:maxlength="item.maxLength" type="textarea" show-word-limit :rows="3"></el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'date'">
|
||||
<el-date-picker
|
||||
v-model="formData[item.formDbName]"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
placeholder="请选择"
|
||||
:disabled="item.disable == 1"
|
||||
value-format="yyyy-MM-DD">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'datetime'">
|
||||
<el-date-picker v-model="formData[item.formDbName]" type="datetime" placeholder="选择日期时间" :disabled="item.disable == 1"
|
||||
value-format="yyyy-MM-DD HH-mm-ss"></el-date-picker>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'time'">
|
||||
<el-time-picker v-model="formData[item.formDbName]" placeholder="请选择" :disabled="item.disable == 1"
|
||||
value-format="HH-mm-ss"></el-time-picker>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'upload'">
|
||||
<ai-uploader :instance="instance" isShowTip fileType="file" v-model="formData[item.formDbName]" :disabled="item.disable == 1"
|
||||
acceptType=".zip,.rar,.doc,.docx,.xls,.ppt,.pptx,.pdf,.txt,.jpg,.png,.xlsx"
|
||||
:limit="item.fileMaxCount" :maxSize="item.fileChoseSize"></ai-uploader>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'rtf'">
|
||||
<ai-editor v-model="formData[item.formDbName]" :instance="instance"/>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'area'">
|
||||
<ai-area-get :instance="instance" v-model="formData[item.formDbName]" :name.sync="formData.areaName" :disabled="item.disable == 1"/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<ai-dialog
|
||||
title="选择网格"
|
||||
:visible.sync="showGrid"
|
||||
:destroyOnClose="true"
|
||||
@close="showGrid = false"
|
||||
@onConfirm="getCheckedTree"
|
||||
width="720px">
|
||||
<div class="grid">
|
||||
<el-tree
|
||||
:data="treeObj.treeList"
|
||||
:props="treeObj.defaultProps"
|
||||
node-key="id"
|
||||
ref="tree"
|
||||
:check-strictly="true" show-checkbox
|
||||
:default-checked-keys="treeObj.checkedKeys"
|
||||
default-expand-all highlight-current>
|
||||
</el-tree>
|
||||
</div>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button class="delete-btn footer-btn" @click="onBack">取消</el-button>
|
||||
<el-button class="footer-btn" type="primary" @click="submit('formData')">提交</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Add',
|
||||
props: {
|
||||
instance: Function,
|
||||
params: Object,
|
||||
dict: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showGrid: false,
|
||||
formData: {
|
||||
girdName: '',
|
||||
name: '',
|
||||
idNumber: '',
|
||||
girdId: '',
|
||||
placeTime: '',
|
||||
phone: '',
|
||||
areaId: '',
|
||||
address: '',
|
||||
areaName: '',
|
||||
firstTime: '',
|
||||
status: '',
|
||||
debug: '',
|
||||
control: '',
|
||||
controlName: '',
|
||||
controlPhone: '',
|
||||
crime: ''
|
||||
},
|
||||
treeObj: {
|
||||
treeList: [],
|
||||
defaultProps: {
|
||||
children: "girdList",
|
||||
label: "girdName",
|
||||
},
|
||||
checkedKeys: [],
|
||||
},
|
||||
areaId: '',
|
||||
filedList: [
|
||||
{
|
||||
label: '姓名',
|
||||
type: 'input',
|
||||
formDbName: 'name',
|
||||
mustFill: 1,
|
||||
fieldTips: '请输入姓名'
|
||||
},
|
||||
{
|
||||
label: '身份证号',
|
||||
type: 'input',
|
||||
formDbName: 'idNumber',
|
||||
mustFill: 1,
|
||||
fieldTips: '请输入身份证号'
|
||||
},
|
||||
{
|
||||
label: '联系电话',
|
||||
type: 'input',
|
||||
formDbName: 'phone',
|
||||
mustFill: 1,
|
||||
fieldTips: '请输入联系电话'
|
||||
},
|
||||
{
|
||||
label: '所属区域',
|
||||
type: 'area',
|
||||
formDbName: 'areaId',
|
||||
mustFill: 1,
|
||||
fieldTips: '请选择所属区域'
|
||||
},
|
||||
{
|
||||
label: '详细地址',
|
||||
type: 'input',
|
||||
grid: 1,
|
||||
formDbName: 'address'
|
||||
},
|
||||
{
|
||||
label: '所属网格',
|
||||
type: 'gird',
|
||||
grid: 1,
|
||||
formDbName: 'girdName'
|
||||
},
|
||||
{
|
||||
label: '初次发现日期',
|
||||
type: 'date',
|
||||
formDbName: 'firstTime',
|
||||
},
|
||||
{
|
||||
label: '吸毒状态',
|
||||
type: 'select',
|
||||
dict: 'appSpecialDrug',
|
||||
formDbName: 'status',
|
||||
},
|
||||
{
|
||||
label: '戒毒情况',
|
||||
type: 'select',
|
||||
dict: 'appSpecialDebug',
|
||||
formDbName: 'debug',
|
||||
},
|
||||
{
|
||||
label: '管控情况',
|
||||
type: 'select',
|
||||
dict: 'appSpecialControl',
|
||||
formDbName: 'control',
|
||||
},
|
||||
{
|
||||
label: '管控人姓名',
|
||||
type: 'input',
|
||||
formDbName: 'controlName'
|
||||
},
|
||||
{
|
||||
label: '管控人联系方式',
|
||||
type: 'input',
|
||||
grid: 1,
|
||||
formDbName: 'controlPhone'
|
||||
},
|
||||
{
|
||||
label: '有无犯罪史',
|
||||
type: 'select',
|
||||
dict: 'isReflection',
|
||||
formDbName: 'crime'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
rules() {
|
||||
let rules = {}
|
||||
this.filedList.map(e => {
|
||||
rules[e.formDbName] = []
|
||||
if (e.mustFill == 1) {
|
||||
rules[e.formDbName]?.push({required: true, message: e.fieldTips})
|
||||
}
|
||||
})
|
||||
return rules
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params.id) {
|
||||
this.dict.load(this.filedList.filter(v => v.dict).map(v => v.dict)).then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
} else {
|
||||
this.getGridList()
|
||||
this.dict.load(this.filedList.filter(v => v.dict).map(v => v.dict))
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getFormData() {
|
||||
this.initForm(this.configs)
|
||||
},
|
||||
|
||||
getCheckedTree() {
|
||||
if (this.$refs.tree.getCheckedNodes().length > 1) {
|
||||
return this.$message.error('不能选择多个网格')
|
||||
}
|
||||
|
||||
const gird = this.$refs.tree.getCheckedNodes()
|
||||
|
||||
if (gird.length) {
|
||||
this.formData.girdName = gird[0].girdName
|
||||
this.formData.girdId = gird[0].id
|
||||
} else {
|
||||
this.formData.girdName = ''
|
||||
this.formData.girdId = ''
|
||||
}
|
||||
this.showGrid = false
|
||||
},
|
||||
|
||||
getGridList() {
|
||||
this.instance.post(`/app/appgirdinfo/listAll`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.treeObj.treeList = res.data
|
||||
if (this.formData.girdId) {
|
||||
this.$set(this.treeObj, 'checkedKeys', [this.formData.girdId])
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDetail() {
|
||||
this.instance.post(`/app/appspecialdrug/queryDetailById?id=${this.params.id}`).then((res) => {
|
||||
if (res.data) {
|
||||
this.formData = res.data
|
||||
this.getGridList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
submit() {
|
||||
this.$refs.formData?.validate((valid) => {
|
||||
if (valid) {
|
||||
this.filedList.map((item) => {
|
||||
if (item.length) {
|
||||
item.map((items) => {
|
||||
if (items.type == 'checkbox' && this.formData[items.fieldDbName].length) { //多选
|
||||
this.formData[items.fieldDbName] = this.formData[items.fieldDbName]?.toString()
|
||||
}
|
||||
if (items.type == 'upload' && this.formData[items.fieldDbName].length) { //附件 只传id
|
||||
var files = []
|
||||
this.formData[items.fieldDbName].map((item) => {
|
||||
files.push(item.id)
|
||||
})
|
||||
this.formData[items.fieldDbName] = files.join(',')
|
||||
}
|
||||
if(items.type == 'area' && this.formData[items.fieldDbName]) {
|
||||
var area = []
|
||||
area.push(this.formData[items.fieldDbName])
|
||||
area.push(this.formData[items.fieldDbName+'_name'])
|
||||
this.formData[items.fieldDbName] = area.join('_')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.instance.post(`/app/appspecialdrug/addOrUpdate`, {
|
||||
...this.formData,
|
||||
id: this.params.id || ''
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
setTimeout(() => {
|
||||
this.onBack(true)
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onBack(isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
params: this.params,
|
||||
isRefresh: !!isRefresh,
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .ai-card{
|
||||
width: 100%;
|
||||
}
|
||||
.form-div {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.especial {
|
||||
margin-bottom: 12px;
|
||||
|
||||
.icon {
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
padding-top: 5px;
|
||||
margin-left: 20px;
|
||||
color: #f46;
|
||||
}
|
||||
|
||||
.people {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
padding-right: 12px;
|
||||
vertical-align: top;
|
||||
width: 64px;
|
||||
word-break: break-all;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.AiWechatSelecter {
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.hint {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.mar-r40 {
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
.w80 {
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
|
||||
.AiWechatSelecter {
|
||||
width: calc(100% - 120px);
|
||||
}
|
||||
</style>
|
||||
181
project/sass/apps/AppSpecialDrug/components/Detail.vue
Normal file
181
project/sass/apps/AppSpecialDrug/components/Detail.vue
Normal file
@@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<ai-detail class="AppSpecial" isHasSidebar>
|
||||
<template slot="title">
|
||||
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<AiSidebar :tabTitle="tabTitle" v-model="currIndex"></AiSidebar>
|
||||
<ai-card title="基本信息" v-show="currIndex === 0">
|
||||
<template #content>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
|
||||
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
|
||||
<ai-info-item label="性别" :value="idNumberInfo.gender"></ai-info-item>
|
||||
<ai-info-item label="出生日期" :value="idNumberInfo.birthday"></ai-info-item>
|
||||
<ai-info-item label="联系电话" :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="所属区域" :value="info.areaName"></ai-info-item>
|
||||
<ai-info-item label="详细地址" isLine :value="info.address"></ai-info-item>
|
||||
<ai-info-item label="所属网格" :value="info.girdName"></ai-info-item>
|
||||
<ai-info-item label="初次发现日期" :value="info.firstTime"></ai-info-item>
|
||||
<ai-info-item label="吸毒状态" :value="dict.getLabel('appSpecialDrug', info.status)"></ai-info-item>
|
||||
<ai-info-item label="戒毒情况" :value="dict.getLabel('appSpecialDebug', info.debug)"></ai-info-item>
|
||||
<ai-info-item label="管控情况" :value="dict.getLabel('appSpecialControl', info.control)"></ai-info-item>
|
||||
<ai-info-item label="管控人姓名" :value="info.controlName"></ai-info-item>
|
||||
<ai-info-item label="管控人联系方式" isLine :value="info.controlPhone"></ai-info-item>
|
||||
<ai-info-item label="有无犯罪史" :value="dict.getLabel('isReflection', info.crime)"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<div class="visit-list" v-show="currIndex === 1">
|
||||
<div class="visit-item" v-for="(item, index) in list" :key="index">
|
||||
<div class="visit-item__top">
|
||||
<div class="left">
|
||||
<div class="avatar">{{ item.name.substr(item.name.length - 2) }}</div>
|
||||
<h2>{{ item.name }}</h2>
|
||||
</div>
|
||||
<span>{{ item.visitTime }}</span>
|
||||
</div>
|
||||
<b>{{ item.title }}</b>
|
||||
<p>{{ item.description }}</p>
|
||||
<div class="visit-imgs">
|
||||
<ai-uploader v-model="item.images" :instance="instance" :limit="9" disabled/>
|
||||
</div>
|
||||
<div class="visit-status">
|
||||
<span>现实状态:</span>
|
||||
<i>{{ dict.getLabel('visitCondolenceReality', item.reality) }}</i>
|
||||
</div>
|
||||
</div>
|
||||
<ai-empty v-if="!list.length"></ai-empty>
|
||||
</div>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
currIndex: 0,
|
||||
tabTitle: ['人员信息', '走访记录'],
|
||||
info: {},
|
||||
list: [],
|
||||
idNumberInfo: {}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
|
||||
this.dict.load('appSpecialSituation', 'appSpecialPlacement', 'appSpecialDenger', 'appSpecialCrime',
|
||||
'appSpecialControl', 'appSpecialDebug', 'appSpecialDrug', 'appSpecialChangeType', 'appSpecialCure', 'appSpecialDengerLevel',
|
||||
'appSpecialDisableLevel', 'appSpecialDisableType', 'appSpecialHealth', 'appSpecialMarriage', 'appSpecialTypeFive','isReflection','yesOrNo').then(() => {
|
||||
this.getInfo(this.params.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appspecialdrug/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.idNumberInfo = this.idCardNoUtil.getIdCardInfo(res.data.idNumber)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.AppSpecial {
|
||||
.visit-list {
|
||||
.visit-item {
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.visit-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
|
||||
span {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #999;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
& > p {
|
||||
line-height: 1.4;
|
||||
margin-bottom: 4px;
|
||||
text-align: justify;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.visit-item__top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
img, .avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
margin-right: 10px;
|
||||
border-radius: 50%;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
background: #26f;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
158
project/sass/apps/AppSpecialDrug/components/List.vue
Normal file
158
project/sass/apps/AppSpecialDrug/components/List.vue
Normal file
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<ai-title slot="title" title="吸毒人员" isShowBottomBorder></ai-title>
|
||||
<template slot="content">
|
||||
<div class="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" size="small" @click="toAdd('', 'Add')">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
@clear="search.current = 1, search.name = '', 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: 16px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="toEdit(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(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,
|
||||
name: ''
|
||||
},
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '姓名' },
|
||||
{ prop: 'idNumber', align: 'center', label: '身份证号' },
|
||||
{ prop: 'gender', align: 'center', label: '性别' },
|
||||
{ prop: 'birthday', align: 'center', label: '出生日期' },
|
||||
{ prop: 'age', align: 'center', label: '年龄', },
|
||||
{ prop: 'phone', align: 'center', label: '联系方式' }
|
||||
],
|
||||
tableData: [],
|
||||
total: 0,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
param () {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.dict.load('sex').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appspecialdrug/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records.map(v => {
|
||||
let info = this.idCardNoUtil.getIdCardInfo(v.idNumber)
|
||||
v.birthday = info.birthday
|
||||
v.age = this.$calcAge(v.idNumber)
|
||||
v.gender = info.gender
|
||||
|
||||
return v
|
||||
})
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toEdit (e) {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
type: 'Add',
|
||||
id: e
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toAdd() {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
type: 'Add',
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appspecialprison/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 scoped lang="scss">
|
||||
</style>
|
||||
62
project/sass/apps/AppSpecialMental/AppSpecialMental.vue
Normal file
62
project/sass/apps/AppSpecialMental/AppSpecialMental.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class="AppSpecialDisabled">
|
||||
<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: 'AppSpecialDisabled',
|
||||
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>
|
||||
.AppSpecialDisabled {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
78
project/sass/apps/AppSpecialMental/components/Detail.vue
Normal file
78
project/sass/apps/AppSpecialMental/components/Detail.vue
Normal file
@@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<ai-detail isHasSidebar>
|
||||
<template slot="title">
|
||||
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本">
|
||||
<template #content>
|
||||
<ai-table
|
||||
class="detail-table__table"
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="140px" 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>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
info: {}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.dict.load(['epidemicRecentHealth', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicMemberType', 'epidemicRecentTestResult']).then(() => {
|
||||
this.getInfo(this.params.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appepidemicreportmember/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.currIndex = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
136
project/sass/apps/AppSpecialMental/components/List.vue
Normal file
136
project/sass/apps/AppSpecialMental/components/List.vue
Normal file
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<ai-title slot="title" title="精神病人" isShowBottomBorder></ai-title>
|
||||
<template slot="content">
|
||||
<div class="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
@clear="search.current = 1, search.name = '', 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: 16px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="remove(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,
|
||||
name: ''
|
||||
},
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '姓名' },
|
||||
{ prop: 'phone', align: 'center', label: '手机号码' },
|
||||
{ prop: 'areaName', align: 'center', label: '所属地区', width: '200px' },
|
||||
{ prop: 'reportTime', align: 'center', label: '上报时间', width: '200px' },
|
||||
{ prop: 'healthCode', align: 'center', label: '健康码', formart: v => v ? this.dict.getLabel('epidemicHealthCode', v) : '-' },
|
||||
{ prop: 'checkTime', align: 'center', label: '核酸日期', formart: v => v ? v.split(' ')[0] : '-' },
|
||||
{ prop: 'checkResult', align: 'center', label: '检测结果', formart: v => v ? this.dict.getLabel('epidemicRecentTestResult', v) : '-' },
|
||||
{ prop: 'today', align: 'center', label: '今日上报', formart: v => v === '0' ? '未上报' : '已上报' },
|
||||
],
|
||||
tableData: [],
|
||||
total: 0,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
param () {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.loading = true
|
||||
this.dict.load(['epidemicTouchInFourteen']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appepidemicreportmember/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
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appepidemicreportmember/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getTotalInfo()
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
70
project/sass/apps/AppSpecialPrison/AppSpecialPrison.vue
Normal file
70
project/sass/apps/AppSpecialPrison/AppSpecialPrison.vue
Normal file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<div class="AppSpecialDisabled">
|
||||
<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'
|
||||
import Add from './components/Add.vue'
|
||||
|
||||
export default {
|
||||
name: 'AppSpecialPrison',
|
||||
label: '刑满释放人员',
|
||||
|
||||
components: {
|
||||
Add,
|
||||
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 === 'Add') {
|
||||
this.component = 'Add'
|
||||
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>
|
||||
.AppSpecialDisabled {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
426
project/sass/apps/AppSpecialPrison/components/Add.vue
Normal file
426
project/sass/apps/AppSpecialPrison/components/Add.vue
Normal file
@@ -0,0 +1,426 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<template #title>
|
||||
<ai-title
|
||||
:title="params.id ? '编辑刑满释放人员' : '新增刑满释放人员'"
|
||||
isShowBottomBorder
|
||||
isShowBack
|
||||
@onBackClick="onBack(true)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-card title="基本信息">
|
||||
<template slot="content">
|
||||
<el-form ref="formData" class="ai-form" :rules="rules" :model="formData" label-width="110px" size="small">
|
||||
<div v-for="(item, index) in filedList" :key="index" :style="item.grid == 1 ? 'width: 100%;' : 'width: 50%;'">
|
||||
<el-form-item :label="item.label" :prop="item.formDbName" style="width: 100%">
|
||||
<template v-if="item.type == 'select'">
|
||||
<ai-select v-model="formData[item.formDbName]" :placeholder="item.fieldName" :selectList="dict.getDict(item.dict)" :disabled="item.disable == 1" />
|
||||
</template>
|
||||
<template v-else-if="item.type == 'radio'">
|
||||
<el-radio-group v-model="formData[item.formDbName]" :disabled="item.disable == 1">
|
||||
<el-radio :label="item.dictValue" v-for="(item, i) in dict.getDict(item.dict)" :key="i">{{ item.dictName }}</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'gird'">
|
||||
<el-input disabled v-model="formData[item.formDbName]" :maxlength="200" size="small" placeholder="请选择选择网格">
|
||||
<template slot="append">
|
||||
<el-button size="small" @click="showGrid = true">选择网格</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'onOff'">
|
||||
<el-switch v-model="formData[item.formDbName]" active-color="#26f" inactive-color="#ddd" active-value="1" inactive-value="0" :disabled="item.disable == 1"></el-switch>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'checkbox'">
|
||||
<el-checkbox-group v-model="formData[item.formDbName]" :disabled="item.disable == 1">
|
||||
<el-checkbox v-for="(item, i) in dict.getDict(item.dict)" :label="item.dictValue" :key="i">
|
||||
{{ item.dictName }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'idNumber'">
|
||||
<ai-id v-model="formData[item.formDbName]" :disabled="item.disable == 1" />
|
||||
</template>
|
||||
<template v-else-if="item.type == 'input' || item.type == 'name' || item.type == 'phone'">
|
||||
<el-input v-model="formData[item.formDbName]" :placeholder="'请输入'+ item.label" clearable :disabled="item.disable == 1"
|
||||
:maxlength="item.maxLength" show-word-limit></el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'number'">
|
||||
<el-input-number v-model="formData[item.formDbName]" :label="'请输入'+item.label" :disabled="item.disable == 1" :precision="item.decimalPlaces" :max="item.maxValue" :min="item.minValue"></el-input-number>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'textarea' || item.type == 'text'">
|
||||
<el-input v-model="formData[item.formDbName]" :placeholder="'请输入'+item.label" clearable :disabled="item.disable == 1"
|
||||
:maxlength="item.maxLength" type="textarea" show-word-limit :rows="3"></el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'date'">
|
||||
<el-date-picker
|
||||
v-model="formData[item.formDbName]"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
placeholder="请选择"
|
||||
:disabled="item.disable == 1"
|
||||
value-format="yyyy-MM-DD">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'datetime'">
|
||||
<el-date-picker v-model="formData[item.formDbName]" type="datetime" placeholder="选择日期时间" :disabled="item.disable == 1"
|
||||
value-format="yyyy-MM-DD HH-mm-ss"></el-date-picker>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'time'">
|
||||
<el-time-picker v-model="formData[item.formDbName]" placeholder="请选择" :disabled="item.disable == 1"
|
||||
value-format="HH-mm-ss"></el-time-picker>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'upload'">
|
||||
<ai-uploader :instance="instance" isShowTip fileType="file" v-model="formData[item.formDbName]" :disabled="item.disable == 1"
|
||||
acceptType=".zip,.rar,.doc,.docx,.xls,.ppt,.pptx,.pdf,.txt,.jpg,.png,.xlsx"
|
||||
:limit="item.fileMaxCount" :maxSize="item.fileChoseSize"></ai-uploader>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'rtf'">
|
||||
<ai-editor v-model="formData[item.formDbName]" :instance="instance"/>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'area'">
|
||||
<ai-area-get :instance="instance" v-model="formData[item.formDbName]" :name.sync="formData.areaName" :disabled="item.disable == 1"/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<ai-dialog
|
||||
title="选择网格"
|
||||
:visible.sync="showGrid"
|
||||
:destroyOnClose="true"
|
||||
@close="showGrid = false"
|
||||
@onConfirm="getCheckedTree"
|
||||
width="720px">
|
||||
<div class="grid">
|
||||
<el-tree
|
||||
:data="treeObj.treeList"
|
||||
:props="treeObj.defaultProps"
|
||||
node-key="id"
|
||||
ref="tree"
|
||||
:check-strictly="true" show-checkbox
|
||||
:default-checked-keys="treeObj.checkedKeys"
|
||||
default-expand-all highlight-current>
|
||||
</el-tree>
|
||||
</div>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button class="delete-btn footer-btn" @click="onBack">取消</el-button>
|
||||
<el-button class="footer-btn" type="primary" @click="submit('formData')">提交</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Add',
|
||||
props: {
|
||||
instance: Function,
|
||||
params: Object,
|
||||
dict: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showGrid: false,
|
||||
formData: {
|
||||
isSecond: '',
|
||||
crime: '',
|
||||
place: '',
|
||||
denger: '',
|
||||
placement: '',
|
||||
girdName: '',
|
||||
name: '',
|
||||
idNumber: '',
|
||||
girdId: '',
|
||||
placeTime: '',
|
||||
situation: '',
|
||||
situationTime: '',
|
||||
phone: '',
|
||||
areaId: '',
|
||||
address: '',
|
||||
areaName: '',
|
||||
isRepeat: '',
|
||||
},
|
||||
treeObj: {
|
||||
treeList: [],
|
||||
defaultProps: {
|
||||
children: "girdList",
|
||||
label: "girdName",
|
||||
},
|
||||
checkedKeys: [],
|
||||
},
|
||||
areaId: '',
|
||||
filedList: [
|
||||
{
|
||||
label: '姓名',
|
||||
type: 'input',
|
||||
formDbName: 'name',
|
||||
mustFill: 1,
|
||||
fieldTips: '请输入姓名'
|
||||
},
|
||||
{
|
||||
label: '身份证号',
|
||||
type: 'input',
|
||||
formDbName: 'idNumber',
|
||||
mustFill: 1,
|
||||
fieldTips: '请输入身份证号'
|
||||
},
|
||||
{
|
||||
label: '联系电话',
|
||||
type: 'input',
|
||||
formDbName: 'phone',
|
||||
mustFill: 1,
|
||||
fieldTips: '请输入联系电话'
|
||||
},
|
||||
{
|
||||
label: '所属区域',
|
||||
type: 'area',
|
||||
formDbName: 'areaId',
|
||||
mustFill: 1,
|
||||
fieldTips: '请选择所属区域'
|
||||
},
|
||||
{
|
||||
label: '详细地址',
|
||||
type: 'input',
|
||||
grid: 1,
|
||||
formDbName: 'address'
|
||||
},
|
||||
{
|
||||
label: '所属网格',
|
||||
type: 'gird',
|
||||
grid: 1,
|
||||
formDbName: 'girdName'
|
||||
},
|
||||
{
|
||||
label: '是否累犯',
|
||||
type: 'select',
|
||||
dict: 'yesOrNo',
|
||||
formDbName: 'isSecond'
|
||||
},
|
||||
{
|
||||
label: '原罪名',
|
||||
type: 'select',
|
||||
dict: 'appSpecialCrime',
|
||||
formDbName: 'crime'
|
||||
},
|
||||
{
|
||||
label: '服刑场所',
|
||||
type: 'input',
|
||||
formDbName: 'place'
|
||||
},
|
||||
{
|
||||
label: '危险性评估',
|
||||
type: 'select',
|
||||
dict: 'appSpecialDenger',
|
||||
formDbName: 'denger'
|
||||
},
|
||||
{
|
||||
label: '安置情况',
|
||||
type: 'select',
|
||||
dict: 'appSpecialPlacement',
|
||||
formDbName: 'placement'
|
||||
},
|
||||
{
|
||||
label: '安置时间',
|
||||
type: 'date',
|
||||
formDbName: 'placeTime'
|
||||
},
|
||||
{
|
||||
label: '衔接情况',
|
||||
type: 'select',
|
||||
dict: 'appSpecialSituation',
|
||||
formDbName: 'situation'
|
||||
},
|
||||
{
|
||||
label: '衔接时间',
|
||||
type: 'date',
|
||||
formDbName: 'situationTime'
|
||||
},
|
||||
{
|
||||
label: '是否重新犯罪',
|
||||
type: 'select',
|
||||
dict: 'yesOrNo',
|
||||
formDbName: 'isRepeat'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
rules() {
|
||||
let rules = {}
|
||||
this.filedList.map(e => {
|
||||
rules[e.formDbName] = []
|
||||
if (e.mustFill == 1) {
|
||||
rules[e.formDbName]?.push({required: true, message: e.fieldTips})
|
||||
}
|
||||
})
|
||||
return rules
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params.id) {
|
||||
this.dict.load(this.filedList.filter(v => v.dict).map(v => v.dict)).then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
} else {
|
||||
this.getGridList()
|
||||
this.dict.load(this.filedList.filter(v => v.dict).map(v => v.dict))
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getFormData() {
|
||||
this.initForm(this.configs)
|
||||
},
|
||||
|
||||
getCheckedTree() {
|
||||
if (this.$refs.tree.getCheckedNodes().length > 1) {
|
||||
return this.$message.error('不能选择多个网格')
|
||||
}
|
||||
|
||||
const gird = this.$refs.tree.getCheckedNodes()
|
||||
|
||||
if (gird.length) {
|
||||
this.formData.girdName = gird[0].girdName
|
||||
this.formData.girdId = gird[0].id
|
||||
} else {
|
||||
this.formData.girdName = ''
|
||||
this.formData.girdId = ''
|
||||
}
|
||||
this.showGrid = false
|
||||
},
|
||||
|
||||
getGridList() {
|
||||
this.instance.post(`/app/appgirdinfo/listAll`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.treeObj.treeList = res.data
|
||||
if (this.formData.girdId) {
|
||||
this.$set(this.treeObj, 'checkedKeys', [this.formData.girdId])
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDetail() {
|
||||
this.instance.post(`/app/appspecialprison/queryDetailById?id=${this.params.id}`).then((res) => {
|
||||
if (res.data) {
|
||||
this.formData = res.data
|
||||
this.getGridList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
submit() {
|
||||
this.$refs.formData?.validate((valid) => {
|
||||
if (valid) {
|
||||
this.filedList.map((item) => {
|
||||
if (item.length) {
|
||||
item.map((items) => {
|
||||
if (items.type == 'checkbox' && this.formData[items.fieldDbName].length) { //多选
|
||||
this.formData[items.fieldDbName] = this.formData[items.fieldDbName]?.toString()
|
||||
}
|
||||
if (items.type == 'upload' && this.formData[items.fieldDbName].length) { //附件 只传id
|
||||
var files = []
|
||||
this.formData[items.fieldDbName].map((item) => {
|
||||
files.push(item.id)
|
||||
})
|
||||
this.formData[items.fieldDbName] = files.join(',')
|
||||
}
|
||||
if(items.type == 'area' && this.formData[items.fieldDbName]) {
|
||||
var area = []
|
||||
area.push(this.formData[items.fieldDbName])
|
||||
area.push(this.formData[items.fieldDbName+'_name'])
|
||||
this.formData[items.fieldDbName] = area.join('_')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.instance.post(`/app/appspecialprison/addOrUpdate`, {
|
||||
...this.formData,
|
||||
id: this.params.id || ''
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
setTimeout(() => {
|
||||
this.onBack(true)
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onBack(isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
params: this.params,
|
||||
isRefresh: !!isRefresh,
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .ai-card{
|
||||
width: 100%;
|
||||
}
|
||||
.form-div {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.especial {
|
||||
margin-bottom: 12px;
|
||||
|
||||
.icon {
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
padding-top: 5px;
|
||||
margin-left: 20px;
|
||||
color: #f46;
|
||||
}
|
||||
|
||||
.people {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
padding-right: 12px;
|
||||
vertical-align: top;
|
||||
width: 64px;
|
||||
word-break: break-all;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.AiWechatSelecter {
|
||||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.hint {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.mar-r40 {
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
.w80 {
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
|
||||
.AiWechatSelecter {
|
||||
width: calc(100% - 120px);
|
||||
}
|
||||
</style>
|
||||
183
project/sass/apps/AppSpecialPrison/components/Detail.vue
Normal file
183
project/sass/apps/AppSpecialPrison/components/Detail.vue
Normal file
@@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<ai-detail class="AppSpecial" isHasSidebar>
|
||||
<template slot="title">
|
||||
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<AiSidebar :tabTitle="tabTitle" v-model="currIndex"></AiSidebar>
|
||||
<ai-card title="基本信息" v-show="currIndex === 0">
|
||||
<template #content>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
|
||||
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
|
||||
<ai-info-item label="性别" :value="idNumberInfo.gender"></ai-info-item>
|
||||
<ai-info-item label="出生日期" :value="idNumberInfo.birthday"></ai-info-item>
|
||||
<ai-info-item label="联系电话" :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="所属区域" :value="info.areaName"></ai-info-item>
|
||||
<ai-info-item label="详细地址" isLine :value="info.address"></ai-info-item>
|
||||
<ai-info-item label="所属网格" :value="info.girdName"></ai-info-item>
|
||||
<ai-info-item label="是否累犯" :value="dict.getLabel('yesOrNo', info.isSecond)"></ai-info-item>
|
||||
<ai-info-item label="原罪名" :value="dict.getLabel('appSpecialCrime', info.crime)"></ai-info-item>
|
||||
<ai-info-item label="服刑场所" isLine :value="info.place"></ai-info-item>
|
||||
<ai-info-item label="危险性评估" :value="dict.getLabel('appSpecialDenger', info.denger)"></ai-info-item>
|
||||
<ai-info-item label="安置情况" :value="dict.getLabel('appSpecialPlacement', info.placement)"></ai-info-item>
|
||||
<ai-info-item label="安置时间" :value="info.placeTime"></ai-info-item>
|
||||
<ai-info-item label="衔接情况" :value="dict.getLabel('appSpecialSituation', info.situation)"></ai-info-item>
|
||||
<ai-info-item label="衔接时间" :value="info.situationTime"></ai-info-item>
|
||||
<ai-info-item label="是否重新犯罪" :value="dict.getLabel('yesOrNo', info.isRepeat)"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<div class="visit-list" v-show="currIndex === 1">
|
||||
<div class="visit-item" v-for="(item, index) in list" :key="index">
|
||||
<div class="visit-item__top">
|
||||
<div class="left">
|
||||
<div class="avatar">{{ item.name.substr(item.name.length - 2) }}</div>
|
||||
<h2>{{ item.name }}</h2>
|
||||
</div>
|
||||
<span>{{ item.visitTime }}</span>
|
||||
</div>
|
||||
<b>{{ item.title }}</b>
|
||||
<p>{{ item.description }}</p>
|
||||
<div class="visit-imgs">
|
||||
<ai-uploader v-model="item.images" :instance="instance" :limit="9" disabled/>
|
||||
</div>
|
||||
<div class="visit-status">
|
||||
<span>现实状态:</span>
|
||||
<i>{{ dict.getLabel('visitCondolenceReality', item.reality) }}</i>
|
||||
</div>
|
||||
</div>
|
||||
<ai-empty v-if="!list.length"></ai-empty>
|
||||
</div>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
currIndex: 0,
|
||||
tabTitle: ['人员信息', '走访记录'],
|
||||
info: {},
|
||||
list: [],
|
||||
idNumberInfo: {}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
|
||||
this.dict.load('appSpecialSituation', 'appSpecialPlacement', 'appSpecialDenger', 'appSpecialCrime',
|
||||
'appSpecialControl', 'appSpecialDebug', 'appSpecialDrug', 'appSpecialChangeType', 'appSpecialCure', 'appSpecialDengerLevel',
|
||||
'appSpecialDisableLevel', 'appSpecialDisableType', 'appSpecialHealth', 'appSpecialMarriage', 'appSpecialTypeFive','isReflection','yesOrNo').then(() => {
|
||||
this.getInfo(this.params.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appspecialprison/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.idNumberInfo = this.idCardNoUtil.getIdCardInfo(res.data.idNumber)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.AppSpecial {
|
||||
.visit-list {
|
||||
.visit-item {
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.visit-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
|
||||
span {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #999;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
& > p {
|
||||
line-height: 1.4;
|
||||
margin-bottom: 4px;
|
||||
text-align: justify;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.visit-item__top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
img, .avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
margin-right: 10px;
|
||||
border-radius: 50%;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
background: #26f;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
157
project/sass/apps/AppSpecialPrison/components/List.vue
Normal file
157
project/sass/apps/AppSpecialPrison/components/List.vue
Normal file
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<ai-title slot="title" title="刑满释放人员" isShowBottomBorder></ai-title>
|
||||
<template slot="content">
|
||||
<div class="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" size="small" @click="toAdd('', 'Add')">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
@clear="search.current = 1, search.name = '', 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: 16px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="toEdit(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(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,
|
||||
name: ''
|
||||
},
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '姓名' },
|
||||
{ prop: 'idNumber', align: 'center', label: '身份证号' },
|
||||
{ prop: 'gender', align: 'center', label: '性别' },
|
||||
{ prop: 'birthday', align: 'center', label: '出生日期' },
|
||||
{ prop: 'age', align: 'center', label: '年龄', },
|
||||
{ prop: 'phone', align: 'center', label: '联系方式' }
|
||||
],
|
||||
tableData: [],
|
||||
total: 0,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
param () {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.dict.load('sex').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appspecialprison/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records.map(v => {
|
||||
let info = this.idCardNoUtil.getIdCardInfo(v.idNumber)
|
||||
v.birthday = info.birthday
|
||||
v.age = this.$calcAge(v.idNumber)
|
||||
|
||||
return v
|
||||
})
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toEdit (e) {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
type: 'Add',
|
||||
id: e
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toAdd() {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
type: 'Add',
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appspecialprison/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 scoped lang="scss">
|
||||
</style>
|
||||
Reference in New Issue
Block a user