网格区块
This commit is contained in:
@@ -5,22 +5,7 @@
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<AiSidebar :tabTitle="tabList" v-model="currIndex"></AiSidebar>
|
||||
<div v-show="currIndex === 0">
|
||||
<ai-card title="基本信息" v-show="currIndex === 0">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="120px">
|
||||
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
|
||||
<ai-info-item label="上报时间" :value="info.createTime"></ai-info-item>
|
||||
<ai-info-item label="身份证号" :value="info.idNumber"></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-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
</div>
|
||||
<ai-card title="每日上报" v-show="currIndex === 1">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-table
|
||||
class="detail-table__table"
|
||||
@@ -86,61 +71,6 @@
|
||||
</ai-dialog>
|
||||
</template>
|
||||
</ai-card>
|
||||
<div v-show="currIndex === 2">
|
||||
<ai-card title="异常处理">
|
||||
<template #right>
|
||||
<el-button type="primary" v-if="info.status === '0'" @click="release">解除异常</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="120px">
|
||||
<ai-info-item label="姓名" :value="info.name"></ai-info-item>
|
||||
<ai-info-item label="填报时间" :value="info.createTime"></ai-info-item>
|
||||
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
|
||||
<ai-info-item label="手机号码" :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="异常状况" isLine>
|
||||
<span :style="{color: info.unusual ? 'red' : '#333'}">{{ info.unusual || '-' }}</span>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="异常解除人" v-if="info.releaseName && info.status === '1'" :value="info.releaseName"></ai-info-item>
|
||||
<ai-info-item label="异常解除时间" v-if="info.releaseTime && info.status === '1'" :value="info.releaseTime"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="异常情况记录">
|
||||
<template #right>
|
||||
<el-button type="primary" v-if="info.status === '0'" @click="isShowAdd = true">添加记录</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-table
|
||||
:tableData="recordList"
|
||||
:col-configs="recordConfigs"
|
||||
:total="recordTotal"
|
||||
:current.sync="recordSerch.current"
|
||||
:size.sync="recordSerch.size"
|
||||
@getList="getRecordList">
|
||||
<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="remove(row.id)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowAdd"
|
||||
width="800px"
|
||||
@close="form.content = ''"
|
||||
title="添加异常记录"
|
||||
@onConfirm="onConfirm">
|
||||
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
|
||||
<el-form-item label="异常记录" prop="content" style="width: 100%;" :rules="[{ required: true, message: '请输入异常记录' }]">
|
||||
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.content" clearable placeholder="请输入异常记录" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</div>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
@@ -160,114 +90,33 @@
|
||||
total: 0,
|
||||
info: {},
|
||||
id: '',
|
||||
isShowAdd: false,
|
||||
recordTotal: 0,
|
||||
recordSerch: {
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10
|
||||
},
|
||||
form: {
|
||||
content: ''
|
||||
},
|
||||
recordConfigs: [
|
||||
{prop: 'content', label: '异常记录', align: 'center' },
|
||||
{prop: 'createTime', label: '创建时间', align: 'center'},
|
||||
{prop: 'createUserName', label: '记录人', align: 'center' }
|
||||
],
|
||||
reportInfo: {},
|
||||
isShow: false,
|
||||
currIndex: 0,
|
||||
tableData: [],
|
||||
recordList: [],
|
||||
colConfigs: [
|
||||
{prop: 'createTime', label: '上报日期', align: 'center', dateFormart: 'YYYY-MM-DD'},
|
||||
{prop: 'status', label: '健康状态', align: 'center', formart: v => v === '0' ? '异常' : '正常' }
|
||||
],
|
||||
tabList: ['基本信息', '每日上报', '异常处理']
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
console.log(this.params)
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
console.log(this.id)
|
||||
this.dict.load(['epidemicRecentHealth', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicMemberType', 'epidemicRecentTestResult']).then(() => {
|
||||
this.getInfo(this.params.id)
|
||||
this.getList()
|
||||
this.getRecordList()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appepidemicreportmember/queryDetailById?memberId=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.currIndex = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getRecordList () {
|
||||
this.instance.post(`/app/appepidemicunusuallog/list`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
recordId: this.params.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.recordList = res.data.records
|
||||
this.recordTotal = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onConfirm() {
|
||||
this.$refs.form.validate(v => {
|
||||
if (v) {
|
||||
this.instance.post('/app/appepidemicunusuallog/addOrUpdate', {
|
||||
...this.form,
|
||||
recordId: this.params.id
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.isShowAdd = false
|
||||
this.getRecordList(this.params.id)
|
||||
this.$message.success('添加成功!')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
release () {
|
||||
this.$confirm('确定解除异常?').then(() => {
|
||||
this.instance.post(`/app/appepidemicreportmember/release`, {
|
||||
id: this.params.id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('解除异常成功!')
|
||||
this.currIndex = 0
|
||||
this.getInfo(this.params.id)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appepidemicunusuallog/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getRecordList(this.params.id)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.instance.post(`/app/appepidemichealthreport/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
name: ''
|
||||
},
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '员工姓名' },
|
||||
{ prop: 'name', label: '员工姓名', openType: 'userName' },
|
||||
{ prop: 'girdNames', align: 'center', label: '网格' },
|
||||
{ prop: 'clockCount', align: 'center', label: '打卡次数' },
|
||||
{ prop: 'lastReportTime', align: 'center', label: '最近打卡时间' },
|
||||
|
||||
Reference in New Issue
Block a user