Browse Source

11

feature/account
jiangyy 3 years ago
parent
commit
9353bba15c
  1. 165
      src/views/modules/base/epidemic/natInfo/noNatDetail.vue
  2. 241
      src/views/modules/base/epidemic/natInfo/noNatList.vue

165
src/views/modules/base/epidemic/natInfo/noNatDetail.vue

@ -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>

241
src/views/modules/base/epidemic/natInfo/noNatList.vue

@ -1,28 +1,28 @@
<template>
<div class="div_main">
<div class="div_search">
<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-select class="list_item_width_1"
size="small"
v-model.trim="formData.orgType"
placeholder="请选择">
<el-option v-for="item in orgTypeList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<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"
:disabled="formData.orgType!='current'"
clearable
v-model.trim="formData.isResiUser"
placeholder="请选择">
<el-option v-for="item in isResiUserList"
@ -33,65 +33,48 @@
</el-select>
</el-form-item>
<el-form-item label="核酸检测时间"
label-width="110px"
prop="startTime">
<el-date-picker v-model="timeRange"
size="small"
type="datetimerange"
@change="handleTimeChange"
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
<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>
<div>
<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-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">
@ -157,7 +140,7 @@
label="证件号"
min-width="170">
</el-table-column>
<el-table-column prop="natTime"
<el-table-column prop="latestNatTime"
header-align="center"
align="center"
label="检测时间"
@ -177,14 +160,27 @@
label="检测结果"
width="100">
</el-table-column>
<el-table-column v-if="isResiUser"
prop="isResiUserShow"
<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"
@ -199,30 +195,6 @@
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<!-- <el-button v-if="!isResiUser"
type="text"
class="div-table-button--edit"
size="small"
@click="handleAttention(scope.row)">同步</el-button>
<el-button v-if="isResiUser&&(scope.row.userType==='resi'||scope.row.userType==='icresi') &&scope.row.agencyId===agencyId"
type="text"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="isResiUser&&(scope.row.userType==='resi'||scope.row.userType==='icresi') &&scope.row.agencyId===agencyId"
type="text"
class="div-table-button--delete "
size="small"
@click="handleDelete(scope.row)">删除</el-button>
<el-button v-if="isResiUser&&scope.row.userType==='synchro'&&scope.row.agencyId===agencyId"
type="text"
class="div-table-button--delete "
size="small"
@click="handleCancelAttention(scope.row)">取消同步</el-button> -->
</template>
</el-table-column>
</el-table>
@ -260,8 +232,8 @@
top="5vh"
class="dialog-h"
@closed="diaDetailClose">
<nat-detail ref="ref_detail"
@dialogCancle="diaDetailClose"></nat-detail>
<no-nat-detail ref="ref_detail"
@dialogCancle="diaDetailClose"></no-nat-detail>
</el-dialog>
</div>
@ -270,7 +242,7 @@
<script>
import natForm from './natForm'
import natDetail from './natDetail'
import noNatDetail from './noNatDetail'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
@ -285,19 +257,9 @@ export default {
pageSize: 20,
pageNo: 0,
tableLoading: false,
isResiUser: true,
agencyId: '',
orgTypeList: [
{
value: 'current',
label: '本辖区居民检测记录'
},
{
value: 'all',
label: '全部检测记录'
},
],
isResiUserList: [
{
value: '0',
@ -309,15 +271,12 @@ export default {
},
],
timeRange: [],
formData: {
orgType: 'current',//:current all
importDate: '',//
name: '',//
mobile: '',//
idCard: '',//
startTime: '',//yyyy-MM-dd HH:mm
endTime: '',//yyyy-MM-dd HH:mm
isResiUser: ''//0: 1:
isResiUser: ''//(0: 1:)
},
@ -328,23 +287,23 @@ export default {
detailShow: false,
formTitle: '新增',
sHeight: 0
}
},
components: {
natForm, natDetail
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 () {
@ -354,7 +313,6 @@ export default {
methods: {
async handleSearch () {
this.isResiUser = this.formData.orgType === 'current'
await this.loadTable()
@ -367,8 +325,8 @@ export default {
async loadTable () {
this.tableLoading = true
const url = "/epmetuser/icNat/natlist"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/natlist"
const url = "/epmetuser/icNatCompareRecord/page"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNatCompareRecord/page"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
@ -383,7 +341,7 @@ export default {
this.tableData.forEach(item => {
item.isResiUserShow = item.isResiUser === '0' ? '否' : '是'
if (item.natResult === '1') {
item.natResultShow = '阳性'
} else if (item.natResult === '0') {
@ -395,27 +353,12 @@ export default {
});
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
handleTimeChange (time) {
if (time) {
this.formData.startTime = time[0]
this.formData.endTime = time[1]
} else {
this.formData.startTime = ''
this.formData.endTime = ''
}
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
@ -431,7 +374,7 @@ export default {
this.formTitle = '详情'
this.detailShow = true
this.$nextTick(() => {
this.$refs.ref_detail.initForm(row.icNatId)
this.$refs.ref_detail.initForm(row)
})
},
@ -576,14 +519,14 @@ export default {
//
resetSearch () {
this.formData = {
orgType: 'current',//:current all
isResiUser: '',//(0: 1:)
name: '',//
mobile: '',//
idCard: '',//
startTime: '',//yyyy-MM-dd HH:mm
endTime: '',//yyyy-MM-dd HH:mm
importDate: ''
}
this.timeRange = []
this.pageNo = 0
// this.loadTable()
@ -603,7 +546,7 @@ export default {
async handleExport () {
let title = '核酸检测信息'
const url = "/epmetuser/icNat/export"
const url = "/epmetuser/icNatCompareRecord/export"
app.ajax.exportFilePost(
url,
@ -647,7 +590,7 @@ export default {
handleExportModule () {
let title = '核酸检测信息导入模板'
const url = "/epmetuser/icNat/import-template-download"
const url = "/epmetuser/icNatCompareRecord/template-download"
let params = {}
app.ajax.exportFilePost(
@ -699,7 +642,7 @@ export default {
//
this.$refs['upload'].clearFiles()
var url = '/epmetuser/icNat/import'
var url = '/epmetuser/icNatCompareRecord/import'
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip
@ -747,9 +690,11 @@ export default {
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 420 + this.iframeHeight : this.clientHeight - 420
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
},

Loading…
Cancel
Save