14 changed files with 3563 additions and 1401 deletions
@ -0,0 +1,165 @@ |
|||
<template> |
|||
<div class="epidemic-form"> |
|||
<div class="dialog-h-content scroll-h"> |
|||
<div v-if="initLoading" |
|||
class="m-row"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">姓名:</span> |
|||
<span>{{ formData.name||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">手机号:</span> |
|||
<span>{{ formData.realMobile||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">证件号:</span> |
|||
<span>{{ formData.realIdCard||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">检检测地点:</span> |
|||
<span>{{ formData.natAddress||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">检测结果:</span> |
|||
<span>{{ formData.natResult==='0'?'阴性':'阳性' }}</span> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div class="div-btn"> |
|||
<el-button size="small" |
|||
@click="handleCancle">关 闭</el-button> |
|||
<!-- <el-button v-if="formType != 'detail'" |
|||
size="small" |
|||
type="primary" |
|||
:disabled="btnDisable" |
|||
@click="handleComfirm">确 定</el-button> --> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
import { requestPost } from '@/js/dai/request' |
|||
import { dateFormats } from '@/utils/index' |
|||
|
|||
|
|||
let loading // 加载动画 |
|||
export default { |
|||
data () { |
|||
return { |
|||
initLoading: false, |
|||
|
|||
icNatId: '', |
|||
formData: {}, |
|||
|
|||
|
|||
|
|||
} |
|||
}, |
|||
components: {}, |
|||
async mounted () { |
|||
const { user } = this.$store.state |
|||
this.agencyId = user.agencyId |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
|
|||
async initForm (row) { |
|||
this.startLoading() |
|||
// this.formData.agencyId = this.agencyId |
|||
this.formData = JSON.parse(JSON.stringify(row)) |
|||
// this.icNatId = icNatId |
|||
// this.formData.icNatId = icNatId |
|||
|
|||
// await this.loadFormData() |
|||
this.initLoading = true |
|||
this.endLoading() |
|||
|
|||
|
|||
}, |
|||
|
|||
async loadFormData () { |
|||
|
|||
// const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/detail' |
|||
const url = '/epmetuser/icNat/detail' |
|||
let params = { |
|||
icNatId: this.icNatId, |
|||
} |
|||
const { data, code, msg } = await requestPost(url, params) |
|||
if (code === 0) { |
|||
this.formData = data |
|||
|
|||
console.log(this.formData.isSelChannel) |
|||
|
|||
this.formData.icNatId = this.icNatId |
|||
|
|||
|
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
handleCancle () { |
|||
// this.resetData() |
|||
this.$emit('dialogCancle') |
|||
|
|||
}, |
|||
|
|||
watchImg (src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
resetData () { |
|||
|
|||
this.formData = {} |
|||
}, |
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
|
|||
|
|||
}, |
|||
props: { |
|||
// serviceList: { |
|||
// type: Array, |
|||
// default: [] |
|||
// }, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/management/detail-main.scss"; |
|||
</style> |
|||
|
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,715 @@ |
|||
<template> |
|||
<div class="div_main"> |
|||
<div ref="ref_search" |
|||
class="div_search"> |
|||
<el-form :inline="true" |
|||
:model="formData" |
|||
ref="ref_searchform" |
|||
:label-width="'110px'"> |
|||
<div> |
|||
<el-form-item label="导入时间"> |
|||
<el-date-picker class="list_item_width_1" |
|||
v-model="formData.importDate" |
|||
format="yyyy-MM-dd" |
|||
value-format="yyyyMMdd" |
|||
type="date" |
|||
size="small" |
|||
clearable |
|||
placeholder="选择时间"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="本辖区居民"> |
|||
<el-select class="list_item_width_1" |
|||
size="small" |
|||
clearable |
|||
v-model.trim="formData.isResiUser" |
|||
placeholder="请选择"> |
|||
<el-option v-for="item in isResiUserList" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="姓名" |
|||
prop="name"> |
|||
<el-input v-model="formData.name" |
|||
size="small" |
|||
class="list_item_width_1" |
|||
clearable |
|||
placeholder="请输入姓名"> |
|||
</el-input> |
|||
|
|||
</el-form-item> |
|||
|
|||
<el-form-item label="手机号" |
|||
prop="mobile"> |
|||
<el-input v-model="formData.mobile" |
|||
size="small" |
|||
class="list_item_width_1" |
|||
clearable |
|||
placeholder="请输入手机号"> |
|||
</el-input> |
|||
|
|||
</el-form-item> |
|||
<el-form-item label="证件号" |
|||
prop="idCard"> |
|||
<el-input v-model="formData.idCard" |
|||
size="small" |
|||
class="list_item_width_1" |
|||
clearable |
|||
placeholder="请输入身份证号或护照号"> |
|||
</el-input> |
|||
|
|||
</el-form-item> |
|||
|
|||
<el-button style="margin-left:30px" |
|||
size="small" |
|||
class="diy-button--search" |
|||
@click="handleSearch">查询</el-button> |
|||
<el-button style="margin-left:10px" |
|||
size="small" |
|||
class="diy-button--reset" |
|||
@click="resetSearch">重置</el-button> |
|||
</div> |
|||
|
|||
</el-form> |
|||
</div> |
|||
<div class="div_table"> |
|||
<div class="div_btn"> |
|||
<!-- <el-button class="diy-button--add" |
|||
size="small" |
|||
@click="handleAdd">新增</el-button> --> |
|||
|
|||
<el-button style="float:left" |
|||
class="diy-button--export" |
|||
size="small" |
|||
@click="handleExportModule">下载模板</el-button> |
|||
<el-upload :headers="$getElUploadHeaders()" |
|||
ref="upload" |
|||
:multiple='false' |
|||
:show-file-list='false' |
|||
:before-upload="beforeUpload" |
|||
action="" |
|||
accept=".xlsx" |
|||
:limit="1" |
|||
:on-exceed="handleExceed" |
|||
:http-request="uploadFile"> |
|||
<el-button style="margin-left:10px" |
|||
size="small" |
|||
class="diy-button--delete">导入</el-button> |
|||
</el-upload> |
|||
|
|||
<el-button style="float:left;margin-left:10px" |
|||
class="diy-button--reset" |
|||
size="small" |
|||
@click="handleExport">导出</el-button> |
|||
</div> |
|||
|
|||
<el-table class="table" |
|||
ref="ref_table" |
|||
:data="tableData" |
|||
border |
|||
:height="tableHeight" |
|||
v-loading="tableLoading" |
|||
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
|||
style="width: 100%"> |
|||
<el-table-column label="序号" |
|||
header-align="center" |
|||
align="center" |
|||
type="index" |
|||
width="50"></el-table-column> |
|||
|
|||
<el-table-column prop="name" |
|||
header-align="center" |
|||
align="center" |
|||
label="姓名" |
|||
min-width="100"> |
|||
</el-table-column> |
|||
<el-table-column prop="mobile" |
|||
header-align="center" |
|||
align="center" |
|||
label="手机号" |
|||
min-width="110"> |
|||
</el-table-column> |
|||
<el-table-column prop="idCard" |
|||
header-align="center" |
|||
align="center" |
|||
label="证件号" |
|||
min-width="170"> |
|||
</el-table-column> |
|||
<el-table-column prop="latestNatTime" |
|||
header-align="center" |
|||
align="center" |
|||
label="检测时间" |
|||
min-width="150"> |
|||
</el-table-column> |
|||
<el-table-column prop="natAddress" |
|||
header-align="center" |
|||
align="center" |
|||
show-overflow-tooltip |
|||
label="检测地点" |
|||
min-width="230"> |
|||
</el-table-column> |
|||
<el-table-column prop="natResultShow" |
|||
header-align="center" |
|||
align="center" |
|||
show-overflow-tooltip |
|||
label="检测结果" |
|||
width="100"> |
|||
</el-table-column> |
|||
<el-table-column prop="isAgencyUserDesc" |
|||
header-align="center" |
|||
align="center" |
|||
show-overflow-tooltip |
|||
label="本辖区居民" |
|||
width="120"> |
|||
</el-table-column> |
|||
<el-table-column prop="importTime" |
|||
header-align="center" |
|||
align="center" |
|||
show-overflow-tooltip |
|||
label="导入时间" |
|||
width="160"> |
|||
</el-table-column> |
|||
<el-table-column prop="agencyName" |
|||
header-align="center" |
|||
align="center" |
|||
show-overflow-tooltip |
|||
label="导入组织" |
|||
width="120"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column label="操作" |
|||
fixed="right" |
|||
width="140" |
|||
header-align="center" |
|||
align="center" |
|||
class="operate"> |
|||
<template slot-scope="scope"> |
|||
|
|||
<el-button type="text" |
|||
class="div-table-button--detail" |
|||
size="small" |
|||
@click="handleDetail(scope.row)">查看</el-button> |
|||
|
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div> |
|||
<el-pagination @size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" |
|||
:page-sizes="[20, 50, 100, 200]" |
|||
:page-size="pageSize" |
|||
layout="sizes, prev, pager, next, total" |
|||
:total="total"> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- 修改弹出框 --> |
|||
<el-dialog :visible.sync="formShow" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
:title="formTitle" |
|||
width="850px" |
|||
top="5vh" |
|||
class="dialog-h" |
|||
@closed="diaClose"> |
|||
<nat-form ref="ref_form" |
|||
@dialogCancle="diaClose" |
|||
@dialogOk="addFormOk"></nat-form> |
|||
</el-dialog> |
|||
<!-- 修改弹出框 --> |
|||
<el-dialog :visible.sync="detailShow" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
:title="'详情'" |
|||
width="850px" |
|||
top="5vh" |
|||
class="dialog-h" |
|||
@closed="diaDetailClose"> |
|||
<no-nat-detail ref="ref_detail" |
|||
@dialogCancle="diaDetailClose"></no-nat-detail> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import natForm from './natForm' |
|||
import noNatDetail from './noNatDetail' |
|||
|
|||
import { requestPost } from "@/js/dai/request"; |
|||
import { mapGetters } from 'vuex' |
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
|
|||
let loading // 加载动画 |
|||
export default { |
|||
data () { |
|||
return { |
|||
loading: false, |
|||
total: 0, |
|||
pageSize: 20, |
|||
pageNo: 0, |
|||
tableLoading: false, |
|||
|
|||
agencyId: '', |
|||
|
|||
isResiUserList: [ |
|||
{ |
|||
value: '0', |
|||
label: '否' |
|||
}, |
|||
{ |
|||
value: '1', |
|||
label: '是' |
|||
}, |
|||
], |
|||
|
|||
formData: { |
|||
importDate: '',//导入时间 |
|||
name: '',//姓名 |
|||
mobile: '',//手机号 |
|||
idCard: '',//身份证号码 |
|||
isResiUser: ''//是否客户下居民(0:否 1:是) |
|||
|
|||
}, |
|||
|
|||
tableData: [], |
|||
|
|||
//form相关 |
|||
formShow: false, |
|||
detailShow: false, |
|||
formTitle: '新增', |
|||
|
|||
sHeight: 0 |
|||
|
|||
} |
|||
}, |
|||
components: { |
|||
natForm, noNatDetail |
|||
}, |
|||
async created () { |
|||
|
|||
}, |
|||
async mounted () { |
|||
//获取场所类型 |
|||
const { user } = this.$store.state |
|||
this.agencyId = user.agencyId |
|||
|
|||
await this.loadTable() |
|||
this.sHeight = this.$refs.ref_search.offsetHeight + 270 |
|||
}, |
|||
|
|||
activated () { |
|||
this.$refs['ref_table'].doLayout() |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
async handleSearch () { |
|||
|
|||
await this.loadTable() |
|||
|
|||
this.$nextTick(() => { |
|||
this.$refs.ref_table.doLayout() // 解决表格错位 |
|||
}) |
|||
|
|||
}, |
|||
|
|||
async loadTable () { |
|||
this.tableLoading = true |
|||
|
|||
const url = "/epmetuser/icNatCompareRecord/page" |
|||
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNatCompareRecord/page" |
|||
let params = { |
|||
pageSize: this.pageSize, |
|||
pageNo: this.pageNo, |
|||
...this.formData |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.total = data.total |
|||
this.tableData = data.list |
|||
|
|||
this.tableData.forEach(item => { |
|||
|
|||
|
|||
if (item.natResult === '1') { |
|||
item.natResultShow = '阳性' |
|||
} else if (item.natResult === '0') { |
|||
item.natResultShow = '阴性' |
|||
} else { |
|||
item.natResultShow = '' |
|||
} |
|||
|
|||
}); |
|||
|
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
this.tableLoading = false |
|||
}, |
|||
|
|||
diaClose () { |
|||
this.$refs.ref_form.resetData() |
|||
this.formShow = false |
|||
|
|||
}, |
|||
diaDetailClose () { |
|||
|
|||
this.detailShow = false |
|||
|
|||
}, |
|||
|
|||
handleDetail (row) { |
|||
this.formTitle = '详情' |
|||
this.detailShow = true |
|||
this.$nextTick(() => { |
|||
this.$refs.ref_detail.initForm(row) |
|||
}) |
|||
}, |
|||
|
|||
handleAdd () { |
|||
this.formTitle = '新增' |
|||
this.formShow = true |
|||
this.$nextTick(() => { |
|||
this.$refs.ref_form.initForm('add', null) |
|||
}) |
|||
}, |
|||
|
|||
handleEdit (row) { |
|||
this.formTitle = '修改' |
|||
this.formShow = true |
|||
this.$nextTick(() => { |
|||
this.$refs.ref_form.initForm('edit', row.icNatId) |
|||
}) |
|||
}, |
|||
|
|||
addFormOk () { |
|||
this.formShow = false |
|||
this.loadTable() |
|||
|
|||
}, |
|||
|
|||
async handleDelete (row) { |
|||
let message = '确认删除?' |
|||
|
|||
this.$confirm(message, "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning" |
|||
}) |
|||
.then(() => { |
|||
this.deleteNat(row) |
|||
}) |
|||
.catch(err => { |
|||
|
|||
}); |
|||
}, |
|||
|
|||
async deleteNat (row) { |
|||
const url = "/epmetuser/icNat/del" |
|||
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/del" |
|||
|
|||
let params = { |
|||
icNatId: row.icNatId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.$message({ |
|||
type: "success", |
|||
message: "操作成功" |
|||
}); |
|||
|
|||
this.loadTable() |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
async handleCancelAttention (row) { |
|||
let message = '取消同步后将不能在本辖区居民检测记录中查看,确认取消同步?' |
|||
|
|||
this.$confirm(message, "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning" |
|||
}) |
|||
.then(() => { |
|||
this.cancelAttention(row) |
|||
}) |
|||
.catch(err => { |
|||
|
|||
}); |
|||
}, |
|||
|
|||
async cancelAttention (row) { |
|||
const url = "/epmetuser/icNat/cancelsynchro" |
|||
|
|||
let params = { |
|||
icNatId: row.icNatId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.$message({ |
|||
type: "success", |
|||
message: "操作成功" |
|||
}); |
|||
|
|||
this.loadTable() |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
async handleAttention (row) { |
|||
|
|||
this.$confirm("确认将信息同步到本辖区核酸检测信息中心?", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning" |
|||
}) |
|||
.then(() => { |
|||
this.attentionNat(row) |
|||
}) |
|||
.catch(err => { |
|||
if (err == "cancel") { |
|||
|
|||
} |
|||
|
|||
}); |
|||
}, |
|||
|
|||
async attentionNat (row) { |
|||
const url = "/epmetuser/icNat/synchro" |
|||
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/synchro" |
|||
|
|||
let params = { |
|||
icNatId: row.icNatId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.$message({ |
|||
type: "success", |
|||
message: "操作成功" |
|||
}); |
|||
|
|||
this.loadTable() |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
|
|||
//重置搜索条件 |
|||
resetSearch () { |
|||
this.formData = { |
|||
isResiUser: '',//是否客户下居民(0:否 1:是) |
|||
name: '',//姓名 |
|||
mobile: '',//手机号 |
|||
idCard: '',//身份证号码 |
|||
importDate: '' |
|||
|
|||
} |
|||
|
|||
|
|||
this.pageNo = 0 |
|||
// this.loadTable() |
|||
}, |
|||
|
|||
handleSizeChange (val) { |
|||
this.pageSize = val |
|||
this.pageNo = 1 |
|||
this.loadTable() |
|||
}, |
|||
handleCurrentChange (val) { |
|||
this.pageNo = val |
|||
this.loadTable() |
|||
}, |
|||
|
|||
//导出表格 |
|||
async handleExport () { |
|||
let title = '核酸检测信息' |
|||
|
|||
const url = "/epmetuser/icNatCompareRecord/export" |
|||
|
|||
app.ajax.exportFilePost( |
|||
url, |
|||
this.formData, |
|||
(data, rspMsg) => { |
|||
this.download(data, title + '.xlsx') |
|||
}, |
|||
(rspMsg, data) => { |
|||
this.$message.error(rspMsg); |
|||
} |
|||
); |
|||
|
|||
}, |
|||
|
|||
// 下载文件 |
|||
download (data, fileName) { |
|||
if (!data) { |
|||
return |
|||
} |
|||
|
|||
var csvData = new Blob([data]) |
|||
|
|||
if (window.navigator && window.navigator.msSaveOrOpenBlob) { |
|||
window.navigator.msSaveOrOpenBlob(csvData, fileName); |
|||
} |
|||
// for Non-IE (chrome, firefox etc.) |
|||
else { |
|||
var a = document.createElement('a'); |
|||
document.body.appendChild(a); |
|||
a.style = 'display: none'; |
|||
var url = window.URL.createObjectURL(csvData); |
|||
a.href = url; |
|||
a.download = fileName; |
|||
a.click(); |
|||
a.remove(); |
|||
window.URL.revokeObjectURL(url); |
|||
} |
|||
|
|||
}, |
|||
|
|||
handleExportModule () { |
|||
let title = '核酸检测信息导入模板' |
|||
|
|||
const url = "/epmetuser/icNatCompareRecord/template-download" |
|||
let params = {} |
|||
|
|||
app.ajax.exportFilePost( |
|||
url, |
|||
params, |
|||
(data, rspMsg) => { |
|||
|
|||
this.download(data, title + '.xlsx') |
|||
}, |
|||
(rspMsg, data) => { |
|||
this.$message.error(rspMsg); |
|||
} |
|||
); |
|||
}, |
|||
|
|||
// 上传文件之前的钩子 |
|||
beforeUpload (file) { |
|||
|
|||
const array = file.name.split('.') |
|||
const extension = array[array.length - 1] |
|||
// const isLt1M = (file.size / 1024 / 1024) < 5 |
|||
if (extension !== 'xlsx') { |
|||
this.$message.error('只能上传xlsx文件!') |
|||
return false |
|||
} else { |
|||
this.files = file; |
|||
this.fileName = file.name; |
|||
return true |
|||
} |
|||
|
|||
}, |
|||
// 上传文件个数超过定义的数量 |
|||
handleExceed (files, fileList) { |
|||
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`) |
|||
}, |
|||
|
|||
async uploadFile () { |
|||
if (this.fileName == "") { |
|||
this.$message.warning('请选择要上传的文件!') |
|||
return false |
|||
} |
|||
|
|||
this.$message({ |
|||
showClose: true, |
|||
message: '导入中,请到系统管理-导入记录中查看进度', |
|||
duration: 0 |
|||
}) |
|||
|
|||
//清空上传列表 |
|||
this.$refs['upload'].clearFiles() |
|||
|
|||
var url = '/epmetuser/icNatCompareRecord/import' |
|||
|
|||
let fileFormData = new FormData(); |
|||
fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 |
|||
|
|||
window.app.ajax.post2(url, fileFormData, |
|||
(data, rspMsg) => { |
|||
|
|||
if (data.code === 0 && data.msg == 'success') { |
|||
// this.$message.success('导入成功') |
|||
} else { |
|||
// this.$message({ |
|||
// showClose: true, |
|||
// message: rspMsg, |
|||
// duration: 0, |
|||
// type: "error" |
|||
// }) |
|||
// this.$message.error(rspMsg) |
|||
} |
|||
|
|||
// this.loadTable() |
|||
|
|||
}, |
|||
(rspMsg, data) => { |
|||
|
|||
}, { headers: { 'Content-Type': 'multipart/form-data' } }) |
|||
|
|||
|
|||
}, |
|||
|
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
tableHeight () { |
|||
console.log(this.sHeight) |
|||
// return this.$store.state.inIframe ? this.clientHeight - this.sHeight + this.iframeHeight : this.clientHeight - this.sHeight |
|||
const h = this.clientHeight - this.sHeight + this.iframeHeigh |
|||
const _h = this.clientHeight - this.sHeight |
|||
return this.$store.state.inIframe ? h : _h |
|||
|
|||
}, |
|||
|
|||
...mapGetters(['clientHeight', 'iframeHeight']) |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
props: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped > |
|||
@import "@/assets/scss/modules/management/epidemic.scss"; |
|||
</style> |
|||
|
|||
|
@ -0,0 +1,289 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="dialog-h-content scroll-h"> |
|||
|
|||
<div v-if="initLoading" |
|||
class="m-row"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">所属组织:</span> |
|||
<span>{{ dataForm.orgName||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">检测点名称:</span> |
|||
<span>{{ dataForm.name||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">服务时间:</span> |
|||
<span>{{ dataForm.serveTime||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">咨询电话:</span> |
|||
<span>{{ dataForm.mobile||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">检测点地址:</span> |
|||
<span>{{ dataForm.address||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">地图位置:</span> |
|||
<div class="div_map"> |
|||
|
|||
<div id="app_detail"></div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
<div class="div-btn"> |
|||
<el-button size="small" |
|||
@click="closeSubmit">关 闭</el-button> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
import { requestPost, requestGet } from '@/js/dai/request' |
|||
|
|||
var map; |
|||
var search; |
|||
var markers; |
|||
var geocoder; |
|||
var infoWindowList; |
|||
|
|||
let loading // 加载动画 |
|||
export default { |
|||
data () { |
|||
return { |
|||
initLoading: false, |
|||
dataForm: { |
|||
id: '' |
|||
}, |
|||
|
|||
}; |
|||
}, |
|||
computed: { |
|||
|
|||
}, |
|||
created () { |
|||
|
|||
}, |
|||
props: { |
|||
|
|||
}, |
|||
methods: { |
|||
diaDestroy () { |
|||
if (map) { |
|||
map.destroy() |
|||
} |
|||
}, |
|||
closeSubmit () { |
|||
this.diaDestroy() |
|||
this.$emit("closeDialog"); |
|||
}, |
|||
|
|||
async init (id) { |
|||
|
|||
this.startLoading() |
|||
|
|||
this.dataForm.id = id |
|||
await this.getInfo(); |
|||
this.initLoading = true |
|||
|
|||
this.$nextTick(() => { |
|||
this.initMap() |
|||
}) |
|||
|
|||
this.endLoading() |
|||
|
|||
}, |
|||
|
|||
// 获取信息 |
|||
async getInfo () { |
|||
let url = `/epmetuser/icPointNucleicMonitoring/${this.dataForm.id}` |
|||
const { data, code, msg } = await requestGet(url) |
|||
|
|||
if (code === 0) { |
|||
this.dataForm = data; |
|||
} else { |
|||
|
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|||
initMap () { |
|||
// 定义地图中心点坐标 |
|||
let { latitude, longitude } = this.$store.state.user; |
|||
console.log('lat' + latitude + ',lon' + longitude) |
|||
|
|||
if (this.dataForm.latitude && this.dataForm.longitude) { |
|||
latitude = this.dataForm.latitude |
|||
longitude = this.dataForm.longitude |
|||
} |
|||
if (!latitude || latitude == "" || latitude == "0") { |
|||
latitude = 39.9088810666821; |
|||
longitude = 116.39743841556731; |
|||
} |
|||
var center = new window.TMap.LatLng(latitude, longitude) |
|||
// 定义map变量,调用 TMap.Map() 构造函数创建地图 |
|||
map = new window.TMap.Map(document.getElementById("app_detail"), { |
|||
center: center, // 设置地图中心点坐标 |
|||
zoom: 17.2, // 设置地图缩放级别 |
|||
pitch: 43.5, // 设置俯仰角 |
|||
rotation: 45, // 设置地图旋转角度 |
|||
}); |
|||
search = new window.TMap.service.Search({ pageSize: 10 }); |
|||
// 新建一个地点搜索类 |
|||
markers = new TMap.MultiMarker({ |
|||
map: map, |
|||
geometries: [], |
|||
}); |
|||
infoWindowList = Array(10); |
|||
|
|||
geocoder = new TMap.service.Geocoder(); // 新建一个正逆地址解析类 |
|||
|
|||
// 监听地图平移结束 |
|||
map.on("panend", () => { |
|||
this.handleMoveCenter(); |
|||
}); |
|||
this.handleMoveCenter() |
|||
this.convert(); |
|||
}, |
|||
handleMoveCenter () { |
|||
//修改地图中心点 |
|||
const center = map.getCenter(); |
|||
const lat = center.getLat(); |
|||
const lng = center.getLng(); |
|||
this.dataForm.latitude = lat; |
|||
this.dataForm.longitude = lng; |
|||
this.setMarker(lat, lng); |
|||
this.convert(lat, lng); |
|||
}, |
|||
// 地图查询 |
|||
handleSearchMap () { |
|||
infoWindowList.forEach((infoWindow) => { |
|||
infoWindow.close(); |
|||
}); |
|||
infoWindowList.length = 0; |
|||
markers.setGeometries([]); |
|||
// 在地图显示范围内以给定的关键字搜索地点 |
|||
search |
|||
.searchRectangle({ |
|||
keyword: this.dataForm.address, |
|||
bounds: map.getBounds(), |
|||
}) |
|||
.then((result) => { |
|||
let { data } = result; |
|||
if (Array.isArray(data) && data.length > 0) { |
|||
const { |
|||
location: { lat, lng }, |
|||
} = data[0]; |
|||
|
|||
map.setCenter(new TMap.LatLng(lat, lng)); |
|||
this.setMarker(lat, lng); |
|||
this.dataForm.latitude = lat; |
|||
this.dataForm.longitude = lng; |
|||
this.convert(); |
|||
} else { |
|||
this.$message.error("未检索到相关位置坐标"); |
|||
} |
|||
}); |
|||
}, |
|||
convert (lat, lng) { |
|||
markers.setGeometries([]); |
|||
// var input = document.getElementById('location').value.split(','); |
|||
let location; |
|||
if (lat && lng) { |
|||
location = new TMap.LatLng(lat, lng); |
|||
} else { |
|||
location = new TMap.LatLng( |
|||
this.dataForm.latitude, |
|||
this.dataForm.longitude |
|||
); |
|||
} |
|||
|
|||
// map.setCenter(location); |
|||
markers.updateGeometries([ |
|||
{ |
|||
id: "main", // 点标注数据数组 |
|||
position: location, |
|||
}, |
|||
]); |
|||
geocoder |
|||
.getAddress({ location: location }) // 将给定的坐标位置转换为地址 |
|||
.then((result) => { |
|||
this.dataForm.address = |
|||
this.dataForm.address !== "" && |
|||
this.dataForm.address !== null && |
|||
(this.dataForm.longitude === "" || this.dataForm.longitude === null) |
|||
? this.dataForm.address |
|||
: result.result.address; |
|||
// 显示搜索到的地址 |
|||
console.log(this.dataForm.address); |
|||
}); |
|||
}, |
|||
|
|||
setMarker (lat, lng) { |
|||
markers.setGeometries([]); |
|||
markers.add([ |
|||
{ |
|||
id: "4", |
|||
styleId: "marker", |
|||
position: new TMap.LatLng(lat, lng), |
|||
properties: { |
|||
title: "marker4", |
|||
}, |
|||
}, |
|||
]); |
|||
}, |
|||
|
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
} |
|||
} |
|||
|
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped> |
|||
.position_label >>> .el-form-item__label::before { |
|||
color: #fff !important; |
|||
} |
|||
.submit { |
|||
text-align: center; |
|||
margin: auto; |
|||
} |
|||
.form-class .el-input { |
|||
width: 75%; |
|||
} |
|||
.form-class .el-textarea { |
|||
width: 75% !important; |
|||
} |
|||
</style> |
|||
<style lang="scss" scoped > |
|||
@import "@/assets/scss/modules/management/detail-main.scss"; |
|||
</style> |
|||
|
@ -0,0 +1,338 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="dialog-h-content scroll-h"> |
|||
|
|||
<div v-if="initLoading" |
|||
class="m-row"> |
|||
<div class="m-info"> |
|||
<!-- <div class="info-prop"> |
|||
<span class="info-title-2">所属组织名称:</span> |
|||
<span>{{ dataForm.orgName||'--' }}</span> |
|||
</div> --> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">接种点名称:</span> |
|||
<span>{{ dataForm.name||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">接种时间:</span> |
|||
|
|||
<span>{{ dataForm.inoculationDate||'--' }}</span> |
|||
|
|||
</div> |
|||
<div v-if="this.dataForm.moStartTime" |
|||
class="info-prop"> |
|||
|
|||
<span class="info-title-2">上午:</span> |
|||
<span>{{this.dataForm.moStartTime }}</span>至 |
|||
<span>{{this.dataForm.moEndTime }}</span> |
|||
|
|||
</div> |
|||
|
|||
<div v-if="this.dataForm.afStartTime" |
|||
class="info-prop"> |
|||
|
|||
<span class="info-title-2">下午:</span> |
|||
<span>{{this.dataForm.afStartTime }}</span>至 |
|||
<span>{{this.dataForm.afEndTime }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">咨询电话:</span> |
|||
<span>{{ dataForm.mobile||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">接种点地址:</span> |
|||
<span>{{ dataForm.address||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-2">地图位置:</span> |
|||
<div class="div_map"> |
|||
|
|||
<div id="app_detail"></div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
<div class="div-btn"> |
|||
<el-button size="small" |
|||
@click="closeSubmit">关 闭</el-button> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
import { requestPost, requestGet } from '@/js/dai/request' |
|||
|
|||
var map; |
|||
var search; |
|||
var markers; |
|||
var geocoder; |
|||
var infoWindowList; |
|||
|
|||
let loading // 加载动画 |
|||
export default { |
|||
data () { |
|||
return { |
|||
visible: false, |
|||
initLoading: false, |
|||
dataForm: { |
|||
id: "", |
|||
|
|||
}, |
|||
keyWords: null, |
|||
// organizationList: [], |
|||
morningTime: null, |
|||
afterTime: null, |
|||
}; |
|||
}, |
|||
computed: { |
|||
|
|||
}, |
|||
props: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
diaDestroy () { |
|||
if (map) { |
|||
map.destroy() |
|||
} |
|||
}, |
|||
closeSubmit () { |
|||
this.diaDestroy() |
|||
this.$emit("closeDialog"); |
|||
}, |
|||
|
|||
async init (id) { |
|||
this.startLoading() |
|||
|
|||
this.dataForm.id = id |
|||
await this.getInfo(); |
|||
this.initLoading = true |
|||
|
|||
this.$nextTick(() => { |
|||
this.initMap() |
|||
}) |
|||
|
|||
this.endLoading() |
|||
|
|||
}, |
|||
|
|||
|
|||
// 获取信息 |
|||
async getInfo () { |
|||
let url = `/epmetuser/icPointVaccinesInoculation/${this.dataForm.id}` |
|||
const { data, code, msg } = await requestGet(url) |
|||
|
|||
if (code === 0) { |
|||
this.dataForm = data; |
|||
// if (data.moStartTime !== "") { |
|||
// this.morningTime = [data.moStartTime, data.moEndTime]; |
|||
// } |
|||
// if (data.afStartTime !== "") { |
|||
// this.afterTime = [data.afStartTime, data.afEndTime]; |
|||
// } |
|||
} else { |
|||
|
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
|
|||
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|||
initMap () { |
|||
// 定义地图中心点坐标 |
|||
let { latitude, longitude } = this.$store.state.user; |
|||
console.log('lat' + latitude + ',lon' + longitude) |
|||
|
|||
if (this.dataForm.latitude && this.dataForm.longitude) { |
|||
latitude = this.dataForm.latitude |
|||
longitude = this.dataForm.longitude |
|||
} |
|||
if (!latitude || latitude == "" || latitude == "0") { |
|||
latitude = 39.9088810666821; |
|||
longitude = 116.39743841556731; |
|||
} |
|||
var center = new window.TMap.LatLng(latitude, longitude) |
|||
// 定义map变量,调用 TMap.Map() 构造函数创建地图 |
|||
map = new window.TMap.Map(document.getElementById("app_detail"), { |
|||
center: center, // 设置地图中心点坐标 |
|||
zoom: 17.2, // 设置地图缩放级别 |
|||
pitch: 43.5, // 设置俯仰角 |
|||
rotation: 45, // 设置地图旋转角度 |
|||
}); |
|||
search = new window.TMap.service.Search({ pageSize: 10 }); |
|||
// 新建一个地点搜索类 |
|||
markers = new TMap.MultiMarker({ |
|||
map: map, |
|||
geometries: [], |
|||
}); |
|||
infoWindowList = Array(10); |
|||
|
|||
geocoder = new TMap.service.Geocoder(); // 新建一个正逆地址解析类 |
|||
|
|||
// 监听地图平移结束 |
|||
map.on("panend", () => { |
|||
this.handleMoveCenter(); |
|||
}); |
|||
// this.handleMoveCenter() |
|||
this.convert(); |
|||
}, |
|||
handleMoveCenter () { |
|||
//修改地图中心点 |
|||
const center = map.getCenter(); |
|||
const lat = center.getLat(); |
|||
const lng = center.getLng(); |
|||
this.dataForm.latitude = lat; |
|||
this.dataForm.longitude = lng; |
|||
this.setMarker(lat, lng); |
|||
this.convert(lat, lng); |
|||
}, |
|||
// 地图查询 |
|||
handleSearchMap () { |
|||
infoWindowList.forEach((infoWindow) => { |
|||
infoWindow.close(); |
|||
}); |
|||
infoWindowList.length = 0; |
|||
markers.setGeometries([]); |
|||
// 在地图显示范围内以给定的关键字搜索地点 |
|||
search |
|||
.searchRectangle({ |
|||
keyword: this.dataForm.address, |
|||
bounds: map.getBounds(), |
|||
}) |
|||
.then((result) => { |
|||
let { data } = result; |
|||
if (Array.isArray(data) && data.length > 0) { |
|||
const { |
|||
location: { lat, lng }, |
|||
} = data[0]; |
|||
|
|||
map.setCenter(new TMap.LatLng(lat, lng)); |
|||
this.setMarker(lat, lng); |
|||
this.dataForm.latitude = lat; |
|||
this.dataForm.longitude = lng; |
|||
this.convert(); |
|||
} else { |
|||
this.$message.error("未检索到相关位置坐标"); |
|||
} |
|||
}); |
|||
}, |
|||
convert (lat, lng) { |
|||
markers.setGeometries([]); |
|||
// var input = document.getElementById('location').value.split(','); |
|||
let location; |
|||
if (lat && lng) { |
|||
location = new TMap.LatLng(lat, lng); |
|||
} else { |
|||
location = new TMap.LatLng( |
|||
this.dataForm.latitude, |
|||
this.dataForm.longitude |
|||
); |
|||
} |
|||
|
|||
// map.setCenter(location); |
|||
markers.updateGeometries([ |
|||
{ |
|||
id: "main", // 点标注数据数组 |
|||
position: location, |
|||
}, |
|||
]); |
|||
geocoder |
|||
.getAddress({ location: location }) // 将给定的坐标位置转换为地址 |
|||
.then((result) => { |
|||
this.dataForm.address = |
|||
this.dataForm.address !== "" && |
|||
this.dataForm.address !== null && |
|||
(this.dataForm.longitude === "" || this.dataForm.longitude === null) |
|||
? this.dataForm.address |
|||
: result.result.address; |
|||
// 显示搜索到的地址 |
|||
console.log(this.dataForm.address); |
|||
}); |
|||
}, |
|||
|
|||
setMarker (lat, lng) { |
|||
markers.setGeometries([]); |
|||
markers.add([ |
|||
{ |
|||
id: "4", |
|||
styleId: "marker", |
|||
position: new TMap.LatLng(lat, lng), |
|||
properties: { |
|||
title: "marker4", |
|||
}, |
|||
}, |
|||
]); |
|||
}, |
|||
|
|||
|
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
} |
|||
} |
|||
|
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped> |
|||
.data-block { |
|||
display: flex; |
|||
} |
|||
.time-block > div { |
|||
margin-bottom: 10px; |
|||
} |
|||
.time-block span { |
|||
padding: 10px; |
|||
} |
|||
.position_label >>> .el-form-item__label::before { |
|||
color: #fff !important; |
|||
} |
|||
.submit { |
|||
text-align: center; |
|||
margin: auto; |
|||
} |
|||
.form-class .el-input { |
|||
width: 75%; |
|||
} |
|||
.form-class .el-textarea { |
|||
width: 75% !important; |
|||
} |
|||
.time-class { |
|||
position: relative; |
|||
} |
|||
.time-class::before { |
|||
content: "*"; |
|||
color: #f56c6c; |
|||
position: absolute; |
|||
left: 42px; |
|||
top: 10px; |
|||
} |
|||
</style> |
|||
|
|||
<style lang="scss" scoped > |
|||
@import "@/assets/scss/modules/management/detail-main.scss"; |
|||
</style> |
@ -0,0 +1,244 @@ |
|||
<template> |
|||
|
|||
<div> |
|||
<div class="dialog-h-content scroll-h"> |
|||
|
|||
<div v-if="initLoading" |
|||
class="m-row"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span class="info-title-5">所属网格:</span> |
|||
<span>{{ dataForm.gridName||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-5">所属房屋:</span> |
|||
<span>{{ dataForm.villageName+dataForm.buildName+dataForm.unitName+dataForm.homeName||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-5">户口性质:</span> |
|||
<span>{{ dataForm.householdTypeName||'--' }}</span> |
|||
</div> |
|||
|
|||
<div class="info-prop"> |
|||
<span class="info-title-5">姓名:</span> |
|||
<span>{{ dataForm.name||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-5">联系电话:</span> |
|||
<span>{{ dataForm.mobile||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-5">证件号:</span> |
|||
<span>{{ dataForm.idCard||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-5">是否接种:</span> |
|||
<span>{{ dataForm.isVaccinationName||'--' }}</span> |
|||
</div> |
|||
<div v-if="dataForm.isVaccination === '0'" |
|||
class="info-prop"> |
|||
<span class="info-title-5">原因:</span> |
|||
<span>{{ dataForm.reason||'--' }}</span> |
|||
</div> |
|||
<div v-if="dataForm.isVaccination === '1'" |
|||
class="info-prop"> |
|||
<span class="info-title-5">第一次接种时间:</span> |
|||
<span>{{ dataForm.firstVacTime||'--' }}</span> |
|||
</div> |
|||
<div v-if="dataForm.isVaccination === '1'" |
|||
class="info-prop"> |
|||
<span class="info-title-5">第一次接种地点:</span> |
|||
<span>{{ dataForm.firstVacSite||'--' }}</span> |
|||
</div> |
|||
<div v-if="dataForm.isVaccination === '1'" |
|||
class="info-prop"> |
|||
<span class="info-title-5">第二次接种时间:</span> |
|||
<span>{{ dataForm.secondVacTime||'--' }}</span> |
|||
</div> |
|||
<div v-if="dataForm.isVaccination === '1'" |
|||
class="info-prop"> |
|||
<span class="info-title-5">第二次接种地点:</span> |
|||
<span>{{ dataForm.secondVacSite||'--' }}</span> |
|||
</div> |
|||
<div v-if="dataForm.isVaccination === '1'" |
|||
class="info-prop"> |
|||
<span class="info-title-5">第三次接种时间:</span> |
|||
<span>{{ dataForm.thirdVacTime||'--' }}</span> |
|||
</div> |
|||
<div v-if="dataForm.isVaccination === '1'" |
|||
class="info-prop"> |
|||
<span class="info-title-5">第三次接种地点:</span> |
|||
<span>{{ dataForm.thirdVacSite||'--' }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-5">备注:</span> |
|||
<span>{{ dataForm.note||'--' }}</span> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="div-btn"> |
|||
<el-button size="small" |
|||
@click="handleCancle">关 闭</el-button> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<!-- </el-dialog>--> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import { requestGet } from '@/js/dai/request' |
|||
|
|||
import { Loading } from "element-ui"; |
|||
|
|||
let loading; // 加载动画 |
|||
export default { |
|||
data () { |
|||
return { |
|||
|
|||
initLoading: false, |
|||
|
|||
|
|||
household: [ |
|||
{ value: '0', label: '户籍' }, |
|||
{ value: '1', label: '外来' }, |
|||
], |
|||
isVaccinationOption: [ |
|||
{ value: '0', label: '否' }, |
|||
{ value: '1', label: '是' }, |
|||
], |
|||
vacSiteOption: [ |
|||
{ value: '本街道内接种', label: '本街道内接种' }, |
|||
{ value: '区内其他街道接种', label: '区内其他街道接种' }, |
|||
{ value: '区外其他地区接种', label: '区外其他地区接种' }, |
|||
], |
|||
reasonOption: [ |
|||
{ value: '禁忌症', label: '禁忌症' }, |
|||
{ value: '拒绝接种', label: '拒绝接种' }, |
|||
{ value: '其他原因', label: '其他原因' }, |
|||
], |
|||
dataForm: { |
|||
id: '', |
|||
|
|||
}, |
|||
|
|||
} |
|||
}, |
|||
computed: { |
|||
|
|||
|
|||
}, |
|||
async mounted () { |
|||
|
|||
}, |
|||
methods: { |
|||
async init (row, isLook) { |
|||
this.startLoading() |
|||
const { user } = this.$store.state |
|||
this.agencyId = user.agencyId |
|||
if (row) { |
|||
this.dataForm.id = row.id |
|||
} |
|||
await this.getInfo() |
|||
|
|||
this.initLoading = true |
|||
|
|||
this.endLoading() |
|||
}, |
|||
|
|||
// 获取信息 |
|||
async getInfo () { |
|||
const url = `/epmetuser/icVaccinePrarmeter/${this.dataForm.id}` |
|||
|
|||
const { data, code, msg } = await requestGet(url) |
|||
|
|||
if (code === 0) { |
|||
// debugger |
|||
this.dataForm = { ...data } |
|||
|
|||
this.household.forEach(element => { |
|||
if (this.dataForm.householdType === element.value) { |
|||
this.dataForm.householdTypeName = element.label |
|||
} |
|||
}); |
|||
|
|||
this.isVaccinationOption.forEach(element => { |
|||
if (this.dataForm.isVaccination === element.value) { |
|||
this.dataForm.isVaccinationName = element.label |
|||
} |
|||
}); |
|||
|
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
|
|||
resetData () { |
|||
this.dataForm = { |
|||
id: '', |
|||
customerId: '', |
|||
gridId: '', |
|||
gridName: '', |
|||
agencyId: '', |
|||
pids: '', |
|||
villageId: '', |
|||
villageName: '', |
|||
buildId: '', |
|||
buildName: '', |
|||
unitId: '', |
|||
unitName: '', |
|||
homeId: '', |
|||
homeName: '', |
|||
householdType: '', |
|||
name: '', |
|||
mobile: '', |
|||
idCard: '', |
|||
isVaccination: '1', |
|||
firstVacTime: '', |
|||
firstVacSite: '', |
|||
secondVacTime: '', |
|||
secondVacSite: '', |
|||
thirdVacTime: '', |
|||
thirdVacSite: '', |
|||
reason: '', |
|||
note: '', |
|||
checkState: '0', |
|||
checkReason: '' |
|||
} |
|||
}, |
|||
|
|||
handleCancle () { |
|||
// this.resetData() |
|||
this.$emit('dialogCancle') |
|||
|
|||
}, |
|||
|
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/management/detail-main.scss"; |
|||
</style> |
@ -0,0 +1,376 @@ |
|||
<template> |
|||
<div class="resi-container"> |
|||
<el-card class="resi-card-table"> |
|||
<div class="mod-sys__menu"> |
|||
<el-table class="table" |
|||
ref="ref_table" |
|||
:data="dataList" |
|||
border |
|||
:height="tableHeight" |
|||
v-loading="dataListLoading" |
|||
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
|||
style="width: 100%"> |
|||
<el-table-column label="序号" |
|||
header-align="center" |
|||
align="center" |
|||
type="index" |
|||
width="50"></el-table-column> |
|||
|
|||
<el-table-column prop="deptName" |
|||
header-align="center" |
|||
align="center" |
|||
label="部门" |
|||
min-width="100"> |
|||
</el-table-column> |
|||
<el-table-column prop="dataName" |
|||
header-align="center" |
|||
align="center" |
|||
label="数据名称" |
|||
min-width="110"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column label="操作" |
|||
fixed="right" |
|||
header-align="center" |
|||
align="center" |
|||
width="350"> |
|||
<template slot-scope="scope"> |
|||
<el-switch v-model="scope.row.stateShow" |
|||
@change="disableCategory(scope.row,scope.$index)"> |
|||
</el-switch> |
|||
|
|||
<el-button type="text" |
|||
size="small" |
|||
class="div-table-button--edit" |
|||
style="margin-left:20px" |
|||
@click="editShow(scope.row)">配置</el-button> |
|||
|
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div> |
|||
<el-pagination @size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" |
|||
:page-sizes="[20, 50, 100, 200]" |
|||
:page-size="pageSize" |
|||
layout="sizes, prev, pager, next, total" |
|||
:total="total"> |
|||
</el-pagination> |
|||
</div> |
|||
|
|||
</div> |
|||
</el-card> |
|||
|
|||
<!-- 修改弹出框 --> |
|||
<el-dialog :visible.sync="formShow" |
|||
:close-on-click-modal="false" |
|||
:close-on-press-escape="false" |
|||
:title="'数据更新配置'" |
|||
width="850px" |
|||
top="5vh" |
|||
class="dialog-h" |
|||
@closed="diaClose"> |
|||
<div class="div_form"> |
|||
<el-form ref="ref_form" |
|||
:inline="true" |
|||
:model="formData"> |
|||
|
|||
<el-form-item label="适用范围" |
|||
label-width="150px" |
|||
style="display: block"> |
|||
<el-cascader class="item_width_1" |
|||
ref="myCascader" |
|||
v-model="orgIdArray" |
|||
:key="iscascaderShow" |
|||
:options="casOptions" |
|||
:props="optionProps" |
|||
:show-all-levels="false" |
|||
@change="handleChangeScope"></el-cascader> |
|||
|
|||
</el-form-item> |
|||
|
|||
</el-form> |
|||
</div> |
|||
|
|||
<div class="div-btn"> |
|||
<el-button size="small" |
|||
@click="diaClose">取 消</el-button> |
|||
<el-button size="small" |
|||
type="primary" |
|||
@click="editDiaOK">确 定</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import { requestPost } from '@/js/dai/request' |
|||
|
|||
import { mapGetters } from 'vuex' |
|||
export default { |
|||
|
|||
data () { |
|||
return { |
|||
customerId: '', // 客户id,父组件传 |
|||
customerName: '', // 客户名称,父组件传 |
|||
|
|||
tableParams: { |
|||
customerId: '' |
|||
}, |
|||
// tableHeight: 500, |
|||
search: '', |
|||
dataList: [], |
|||
|
|||
dataListLoading: false, |
|||
total: 0, |
|||
pageSize: 20, |
|||
pageNo: 0, |
|||
|
|||
casOptions: [], |
|||
iscascaderShow: 0, |
|||
orgIdArray: [], |
|||
selCateObj: {}, |
|||
optionProps: { |
|||
multiple: true, |
|||
value: 'agencyId', |
|||
label: 'agencyName', |
|||
orgType: 'orgType', |
|||
children: 'subAgencyList', |
|||
checkStrictly: true |
|||
}, |
|||
|
|||
formShow: false, |
|||
formData: {}, |
|||
|
|||
scopeList: [], |
|||
dataSyncConfigId: '', |
|||
} |
|||
}, |
|||
|
|||
computed: { |
|||
|
|||
tableHeight () { |
|||
const h = this.clientHeight - 220 + this.iframeHeigh |
|||
const _h = this.clientHeight - 220 |
|||
return this.$store.state.inIframe ? h : _h |
|||
}, |
|||
|
|||
...mapGetters(['clientHeight', 'iframeHeight']) |
|||
}, |
|||
components: { |
|||
|
|||
}, |
|||
created () { |
|||
|
|||
}, |
|||
async mounted () { |
|||
await this.loadData() |
|||
await this.getOrgList() |
|||
}, |
|||
methods: { |
|||
cellStyle ({ row, column, rowIndex, columnIndex }) { |
|||
// 状态列字体颜色 |
|||
if (row.state === 'enable' && columnIndex === 1) { |
|||
return 'color: #EA1B29' |
|||
} else if (row.state === 'disable' && columnIndex === 1) { |
|||
return 'color: #0CB618' |
|||
} else { |
|||
return 'color: #1a1a1b' |
|||
} |
|||
}, |
|||
|
|||
diaClose () { |
|||
this.formShow = false |
|||
}, |
|||
|
|||
async getOrgList () { |
|||
|
|||
const url = '/gov/org/customeragency/my-subagency-list' |
|||
|
|||
let params = {}; |
|||
|
|||
const { data, code, msg } = await requestPost(url, params); |
|||
if (code === 0) { |
|||
|
|||
//组织级联数据 |
|||
++this.iscascaderShow |
|||
this.casOptions = [] |
|||
this.orgIdArray.length = [] |
|||
|
|||
if (data) { |
|||
this.casOptions.push(data) |
|||
|
|||
} |
|||
|
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
// 加载列表数据 |
|||
async loadData () { |
|||
this.dataListLoading = true |
|||
// const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/dataSyncConfig/list' |
|||
const url = '/epmetuser/dataSyncConfig/list' |
|||
|
|||
this.tableParams = { |
|||
pageSize: this.pageSize, |
|||
pageNo: this.pageNo |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, this.tableParams) |
|||
this.dataListLoading = false |
|||
if (code === 0) { |
|||
this.total = data.total |
|||
this.dataList = data.list |
|||
this.dataList.forEach(element => { |
|||
|
|||
element.stateShow = element.switchStatus === 'open' ? true : false |
|||
|
|||
}) |
|||
} else { |
|||
// this.$message.error(msg ) |
|||
} |
|||
}, |
|||
|
|||
handleChangeScope (value) { |
|||
// console.log('value', value) |
|||
|
|||
this.orgIdArray = value |
|||
this.scopeList = [] |
|||
let selArray = this.$refs["myCascader"].getCheckedNodes() |
|||
|
|||
// console.log('selArray', selArray) |
|||
|
|||
selArray.forEach((element, index) => { |
|||
|
|||
let obj = { |
|||
orgId: element.data.agencyId, |
|||
orgType: element.data.level, |
|||
orgIdPath: element.path.join(':'), |
|||
|
|||
} |
|||
this.scopeList.push(obj) |
|||
}); |
|||
|
|||
console.log('this.scopeList', this.scopeList) |
|||
|
|||
}, |
|||
|
|||
// 开启/启用 |
|||
disableCategory (row, index) { |
|||
row.switchStatusShow = row.switchStatus === 'open' ? '关闭' : '开启' |
|||
this.$confirm('确认' + row.switchStatusShow, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const url = '/epmetuser/dataSyncConfig/configSwitch' |
|||
// const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/dataSyncConfig/configSwitch' |
|||
const param = { |
|||
deptCode: row.deptCode, |
|||
dataSyncConfigId: row.id, |
|||
|
|||
} |
|||
window.app.ajax.post(url, param, |
|||
(data, rspMsg) => { |
|||
// row.switchStatus = 'open' |
|||
// row.switchStatus = true |
|||
// this.$set(this.dataList, index, row) |
|||
|
|||
this.$message.success('操作成功') |
|||
this.loadData() |
|||
}, |
|||
(rspMsg, data) => { |
|||
this.$message.error(rspMsg) |
|||
}) |
|||
}).catch(() => { |
|||
|
|||
}) |
|||
}, |
|||
|
|||
|
|||
// 编辑 customerId,parentCategoryId,dateform |
|||
editShow (row) { |
|||
this.dataSyncConfigId = row.id |
|||
|
|||
this.orgIdArray = [] |
|||
row.scopeList.forEach(element => { |
|||
if (element.orgIdPath) { |
|||
this.orgIdArray.push(element.orgIdPath.split(':')) |
|||
} |
|||
|
|||
}); |
|||
|
|||
this.formShow = true |
|||
|
|||
}, |
|||
|
|||
async editDiaOK () { |
|||
// const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/dataSyncConfig/scopeSave' |
|||
const url = '/epmetuser/dataSyncConfig/scopeSave' |
|||
|
|||
let params = { |
|||
dataSyncConfigId: this.dataSyncConfigId, |
|||
scopeList: this.scopeList |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.formShow = false |
|||
this.loadData() |
|||
} else { |
|||
// this.$message.error(msg ) |
|||
} |
|||
}, |
|||
|
|||
handleSizeChange (val) { |
|||
this.pageSize = val |
|||
this.pageNo = 1 |
|||
this.loadData() |
|||
}, |
|||
handleCurrentChange (val) { |
|||
this.pageNo = val |
|||
this.loadData() |
|||
}, |
|||
|
|||
// 取消 |
|||
diaCancel () { |
|||
this.$emit('cancleBack') |
|||
}, |
|||
|
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.div_form { |
|||
height: 300px; |
|||
padding-top: 50px; |
|||
} |
|||
.item_width_1 { |
|||
width: 500px; |
|||
} |
|||
.div-btn { |
|||
margin-top: 50px; |
|||
// margin-bottom:20px; |
|||
display: flex; |
|||
justify-content: center; |
|||
|
|||
.item_btn { |
|||
font-size: 14px; |
|||
padding: 8px 16px; |
|||
cursor: pointer; |
|||
color: #fff; |
|||
|
|||
border: 1px dashed #0c81fe; |
|||
border-radius: 6px; |
|||
background-color: #0c81fe; |
|||
} |
|||
} |
|||
</style> |
Loading…
Reference in new issue