Browse Source

Merge branch 'master' into yantai_master

dev-烟台0301
dai 3 years ago
parent
commit
04aec6f99a
  1. 3
      src/assets/scss/modules/management/detail-main.scss
  2. 165
      src/views/modules/base/epidemic/natInfo/noNatDetail.vue
  3. 715
      src/views/modules/base/epidemic/natInfo/noNatList.vue
  4. 13
      src/views/modules/communityParty/regionalParty/unitsDetail.vue
  5. 206
      src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
  6. 289
      src/views/modules/plugins/point/icpointnucleicmonitoring-detail.vue
  7. 454
      src/views/modules/plugins/point/icpointnucleicmonitoring.vue
  8. 239
      src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue
  9. 338
      src/views/modules/plugins/point/icpointvaccinesinoculation-detail.vue
  10. 412
      src/views/modules/plugins/point/icpointvaccinesinoculation.vue
  11. 244
      src/views/modules/sys/icvaccineprarmeter-detail.vue
  12. 1508
      src/views/modules/sys/icvaccineprarmeter.vue
  13. 2
      src/views/modules/visual/basicinfo/houseStatic/houseList.vue
  14. 376
      src/views/modules/workSys/dataOpenConfig.vue

3
src/assets/scss/modules/management/detail-main.scss

@ -144,6 +144,9 @@
.info-title-4{
flex: 0 0 110px;
}
.info-title-5{
flex: 0 0 130px;
}
> span,
> div {

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>

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

@ -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);//filenamefiletest.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>

13
src/views/modules/communityParty/regionalParty/unitsDetail.vue

@ -54,11 +54,11 @@
</div>
</div>
<!-- <div class="div-btn">
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
</div> -->
</div>
</div>
</template>
@ -102,7 +102,7 @@ export default {
async initForm (row) {
this.startLoading()
this.formData = { ...row }
this.formData = JSON.parse(JSON.stringify(row))
this.initLoading = true
console.log(this.formData)
// await nextTick(200)
@ -118,9 +118,10 @@ export default {
initMap () {
//
let { latitude, longitude } = this.$store.state.user;
console.log('lat' + latitude + ',lon' + longitude)
if (this.formData.latitude && this.formData.longitude) {
latitude = this.formData.latitude
longitude = this.formData.longitude
}
@ -128,7 +129,9 @@ export default {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
var center = new window.TMap.LatLng(latitude, latitude)
// debugger
console.log('lat' + latitude + ',lon' + longitude)
var center = new window.TMap.LatLng(latitude, longitude)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app_detail'), {
center: center, //

206
src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue

@ -1,73 +1,60 @@
<template>
<div style="overflow: auto; padding: 20px;max-height: 82vh;" class="form-class">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="120px"
>
<el-form-item label="所属组织名称" prop="orgId">
<el-select
v-model="dataForm.orgId"
placeholder="所属组织名称"
@change="orgChangeHandle"
:disabled="dialogTitle == '查看'"
>
<el-option
ref="org"
v-for="item in organizationList"
:key="item.orgId"
:label="item.orgName"
:value="item.orgId"
>
<div style="overflow: auto; padding: 20px;max-height: 82vh;"
class="form-class">
<el-form :model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="120px">
<el-form-item label="所属组织名称"
prop="orgId">
<el-select v-model="dataForm.orgId"
placeholder="所属组织名称"
@change="orgChangeHandle"
:disabled="dialogTitle == '查看'">
<el-option ref="org"
v-for="item in organizationList"
:key="item.orgId"
:label="item.orgName"
:value="item.orgId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="核酸检测点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="核酸检测点名称"
:disabled="dialogTitle == '查看'"
></el-input>
<el-form-item label="核酸检测点名称"
prop="name">
<el-input v-model="dataForm.name"
placeholder="核酸检测点名称"
:disabled="dialogTitle == '查看'"></el-input>
</el-form-item>
<el-form-item label="服务时间" prop="serveTime">
<el-input
v-model="dataForm.serveTime"
type="textarea"
:rows="2"
placeholder="请输入服务时间,如:每日开放 上午:8:00-11:30 ;下午:13:00-17:00"
:disabled="dialogTitle == '查看'"
></el-input>
<el-form-item label="服务时间"
prop="serveTime">
<el-input v-model="dataForm.serveTime"
type="textarea"
:rows="2"
placeholder="请输入服务时间,如:每日开放 上午:8:00-11:30 ;下午:13:00-17:00"
:disabled="dialogTitle == '查看'"></el-input>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
placeholder="咨询电话"
:change="check_num()"
:disabled="dialogTitle == '查看'"
></el-input>
<el-form-item label="咨询电话"
prop="mobile">
<el-input v-model="dataForm.mobile"
placeholder="咨询电话"
:change="check_num()"
:disabled="dialogTitle == '查看'"></el-input>
</el-form-item>
<el-form-item label="检测点地址" prop="address">
<el-input
v-model="dataForm.address"
placeholder="例:青岛市时代国际广场"
style="width:65%;"
></el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
>
<el-form-item label="检测点地址"
prop="address">
<el-input v-model="dataForm.address"
placeholder="例:青岛市时代国际广场"
style="width:65%;"></el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap">查询</el-button>
</el-form-item>
<el-form-item
label="位置坐标"
prop="longitude"
style="display: block"
class="position_label"
>
<el-form-item label="位置坐标"
prop="longitude"
style="display: block"
class="position_label">
<div>
<!-- <el-input
class="item_width_4"
@ -85,31 +72,26 @@
@click="handleSearchMap"
>查询</el-button
> -->
<div
id="map_add"
class="div_map"
style="width: 500px; height: 300px; margin-top: 20px"
></div>
<div style="margin-top: 10px" v-show="false">
<div id="map_add"
class="div_map"
style="width: 500px; height: 300px; margin-top: 20px"></div>
<div style="margin-top: 10px"
v-show="false">
<span>经度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude"
disabled
style="width: 200px; margin-left: 20px"
>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude"
disabled
style="width: 200px; margin-left: 20px">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude"
disabled
style="width: 200px; margin-left: 20px"
>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude"
disabled
style="width: 200px; margin-left: 20px">
</el-input>
</div>
</div>
@ -117,12 +99,9 @@
</el-form>
<div class="submit">
<el-button @click="closeSubmit">{{ $t("cancel") }}</el-button>
<el-button
v-if="dialogTitle != '查看'"
type="primary"
@click="dataFormSubmitHandle()"
>{{ $t("confirm") }}</el-button
>
<el-button v-if="dialogTitle != '查看'"
type="primary"
@click="dataFormSubmitHandle()">{{ $t("confirm") }}</el-button>
</div>
</div>
</template>
@ -135,7 +114,7 @@ var markers;
var geocoder;
var infoWindowList;
export default {
data() {
data () {
return {
dataForm: {
id: "",
@ -156,7 +135,7 @@ export default {
};
},
computed: {
dataRule() {
dataRule () {
return {
customerId: [
{
@ -224,7 +203,7 @@ export default {
};
},
},
created() {
created () {
this.getFormInfo();
},
props: {
@ -234,10 +213,10 @@ export default {
},
},
methods: {
closeSubmit() {
closeSubmit () {
this.$emit("closeDialog");
},
orgChangeHandle(val) {
orgChangeHandle (val) {
for (var i = 0; i < this.organizationList.length; i++) {
if (this.organizationList[i].orgId === val) {
this.dataForm.orgName = this.organizationList[i].orgName;
@ -246,15 +225,20 @@ export default {
}
},
// init
initMap() {
let { latitude, longitude } = this.$store.state.user;
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;
}
console.log(latitude,longitude);
var center = new window.TMap.LatLng(latitude, longitude);
var center = new window.TMap.LatLng(latitude, longitude)
// map TMap.Map()
map = new window.TMap.Map(document.getElementById("map_add"), {
center: center, //
@ -279,7 +263,7 @@ export default {
// this.handleMoveCenter()
this.convert();
},
handleMoveCenter() {
handleMoveCenter () {
//
const center = map.getCenter();
const lat = center.getLat();
@ -290,7 +274,7 @@ export default {
this.convert(lat, lng);
},
//
handleSearchMap() {
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close();
});
@ -319,7 +303,7 @@ export default {
}
});
},
convert(lat, lng) {
convert (lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location;
@ -344,8 +328,8 @@ export default {
.then((result) => {
this.dataForm.address =
this.dataForm.address !== "" &&
this.dataForm.address !== null &&
(this.dataForm.longitude === "" || this.dataForm.longitude === null)
this.dataForm.address !== null &&
(this.dataForm.longitude === "" || this.dataForm.longitude === null)
? this.dataForm.address
: result.result.address;
//
@ -353,7 +337,7 @@ export default {
});
},
setMarker(lat, lng) {
setMarker (lat, lng) {
markers.setGeometries([]);
markers.add([
{
@ -367,7 +351,7 @@ export default {
]);
},
//
getFormInfo() {
getFormInfo () {
this.$http
.post(`/gov/org/agency/communityListByCustomerId`)
.then(({ data: res }) => {
@ -376,9 +360,9 @@ export default {
}
this.organizationList = res.data;
})
.catch(() => {});
.catch(() => { });
},
init() {
init () {
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
@ -391,7 +375,7 @@ export default {
},
//
getInfo() {
getInfo () {
this.$http
.get(`/epmetuser/icPointNucleicMonitoring/${this.dataForm.id}`)
.then(({ data: res }) => {
@ -404,7 +388,7 @@ export default {
};
this.initMap();
})
.catch(() => {});
.catch(() => { });
},
//
dataFormSubmitHandle: debounce(
@ -431,7 +415,7 @@ export default {
},
});
})
.catch(() => {});
.catch(() => { });
});
},
1000,

289
src/views/modules/plugins/point/icpointnucleicmonitoring-detail.vue

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

454
src/views/modules/plugins/point/icpointnucleicmonitoring.vue

@ -1,254 +1,207 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="loadTable()"
>
<el-form-item label="所属组织名称" prop="orgName">
<el-cascader
ref="org"
v-model="orgIds"
:options="organizationList"
:props="{ checkStrictly: true, multiple: false, emitPath: true }"
style="width: 200px"
clearable
@change="orgChangeHandle"
>
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="loadTable()">
<el-form-item label="所属组织名称"
prop="orgName">
<el-cascader ref="org"
v-model="orgIds"
:options="organizationList"
:props="{ checkStrictly: true, multiple: false, emitPath: true }"
style="width: 200px"
clearable
@change="orgChangeHandle">
</el-cascader>
</el-form-item>
<el-form-item label="核酸检测点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="核酸检测点名称"
clearable
></el-input>
<el-form-item label="核酸检测点名称"
prop="name">
<el-input v-model="dataForm.name"
placeholder="核酸检测点名称"
clearable></el-input>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
placeholder="咨询电话"
clearable
></el-input>
<el-form-item label="咨询电话"
prop="mobile">
<el-input v-model="dataForm.mobile"
placeholder="咨询电话"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button
class="diy-button--search"
size="small"
@click="loadTable()"
>{{ $t("query") }}</el-button
>
<el-button class="diy-button--search"
size="small"
@click="loadTable()">{{ $t("query") }}</el-button>
</el-form-item>
<el-form-item>
<el-button size="small" class="diy-button--reset" @click="resetSearch"
>重置</el-button
>
<el-button size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="div_table">
<div class="exportBtn">
<el-button
class="diy-button--add"
type="primary"
size="small"
@click="addOrUpdateHandle('', '新增检测点')"
>{{ $t("add") }}</el-button
>
<el-button
style="margin-left: 10px"
class="diy-button--export"
size="small"
@click="handleExportModule()"
>下载模板</el-button
>
<el-button class="diy-button--add"
type="primary"
size="small"
@click="addOrUpdateHandle('', '新增检测点')">{{ $t("add") }}</el-button>
<el-button style="margin-left: 10px"
class="diy-button--export"
size="small"
@click="handleExportModule()">下载模板</el-button>
<el-upload :headers="$getElUploadHeaders()"
style=""
ref="upload"
:multiple="false"
:show-file-list="false"
:before-upload="
<el-upload :headers="$getElUploadHeaders()"
style=""
ref="upload"
:multiple="false"
:show-file-list="false"
:before-upload="
(file) => {
beforeUpload(file);
}
"
action=""
accept=".xls,.xlsx"
:http-request="
action=""
accept=".xls,.xlsx"
:http-request="
() => {
uploadFile();
}
"
>
<el-button
style="margin-left: 10px"
size="small"
class="diy-button--delete"
>导入</el-button
>
">
<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
>
<el-button style="float: left; margin-left: 10px"
class="diy-button--reset"
size="small"
@click="handleExport">导出</el-button>
<!--<el-button class="diy-button&#45;&#45;reset" style="float:left;margin-left:10px"-->
<!--size="small" @click="exportHandle()">{{ $t('export') }}</el-button>-->
<el-button
style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
v-if="noticeVisible"
>发送通知</el-button
>
<el-button style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
v-if="noticeVisible">发送通知</el-button>
</div>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
:row-key="row => { return row.id.toString() }"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%; height: 564px;overflow: auto;"
><el-table-column
label="序号"
header-align="center"
align="center"
type="index"
width="50"
></el-table-column>
<el-table-column
prop="orgName"
label="所属组织名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="name"
label="核酸检测点名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="serveTime"
label="服务时间"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="mobile"
label="咨询电话"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="address"
label="检测点地址"
header-align="center"
align="center"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="enableFlag"
label="禁用/启用"
header-align="center"
align="center"
show-overflow-tooltip>
<el-table v-loading="dataListLoading"
:data="dataList"
border
:row-key="row => { return row.id.toString() }"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%; height: 564px;overflow: auto;">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="orgName"
label="所属组织名称"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="name"
label="核酸检测点名称"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="serveTime"
label="服务时间"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="mobile"
label="咨询电话"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="address"
label="检测点地址"
header-align="center"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="enableFlag"
label="禁用/启用"
header-align="center"
align="center"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-for="(item, index) in enableFlagList"
:key="item.value"
:value="item.label"
v-if="scope.row.enableFlag == item.value">
<span v-for="(item, index) in enableFlagList"
:key="item.value"
:value="item.label"
v-if="scope.row.enableFlag == item.value">
{{ item.label }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
header-align="center"
align="center"
width="180"
>
<el-table-column label="操作"
header-align="center"
align="center"
width="180">
<template slot-scope="scope">
<el-button
type="text"
size="small"
class="div-table-button--detail"
@click="enableOrDisabled(scope.row.id)">{{ (scope.row.enableFlag === 'enable' && '禁用') || '启用' }}</el-button>
<el-button
type="text"
size="small"
class="div-table-button--detail"
@click="addOrUpdateHandle(scope.row.id, '查看')"
>{{ "查看" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--edit"
@click="addOrUpdateHandle(scope.row.id, '修改')"
>{{ scope.row.longitude === null ? "待完善" : "修改" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--delete--noline"
@click="handleDelete(scope.row.id)"
>{{ $t("delete") }}</el-button
>
<el-button type="text"
size="small"
class="div-table-button--detail"
@click="enableOrDisabled(scope.row.id)">{{ (scope.row.enableFlag === 'enable' && '禁用') || '启用' }}</el-button>
<el-button type="text"
size="small"
class="div-table-button--detail"
@click="detailHandle(scope.row.id, '查看')">{{ "查看" }}</el-button>
<el-button type="text"
size="small"
class="div-table-button--edit"
@click="addOrUpdateHandle(scope.row.id, '修改')">{{ scope.row.longitude === null ? "待完善" : "修改" }}</el-button>
<el-button type="text"
size="small"
class="div-table-button--delete--noline"
@click="handleDelete(scope.row.id)">{{ $t("delete") }}</el-button>
</template>
</el-table-column>
</el-table>
<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 @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>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog
:visible.sync="addOrUpdateVisible"
:title="dialogTitle"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
width="850px"
top="5vh"
custom-class="dialog-h"
>
<add-or-update
ref="addOrUpdate"
@refreshDataList="loadTable"
@closeDialog="closeDialog"
:dialogTitle="dialogTitle"
></add-or-update>
<el-dialog :visible.sync="addOrUpdateVisible"
:title="dialogTitle"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
width="850px"
top="5vh"
custom-class="dialog-h">
<add-or-update ref="addOrUpdate"
@refreshDataList="loadTable"
@closeDialog="closeDialog"
:dialogTitle="dialogTitle"></add-or-update>
</el-dialog>
<!-- 弹窗, 详情 -->
<el-dialog :visible.sync="detailShow"
:title="'详情'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
width="850px"
top="5vh"
@closed="diaDetailClose"
custom-class="dialog-h">
<detail ref="ref_detail"
@closeDialog="diaDetailClose"></detail>
</el-dialog>
<!-- 发送通知弹出框 -->
<el-dialog
:visible.sync="sendNoticeFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="发送通知"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose"
:destroy-on-close="true"
>
<icpoint-noice
ref="ref_sendnotice"
@diaClose="diaClose"
:noticeOrigin="noticeOrigin"
></icpoint-noice>
<el-dialog :visible.sync="sendNoticeFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="发送通知"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose"
:destroy-on-close="true">
<icpoint-noice ref="ref_sendnotice"
@diaClose="diaClose"
:noticeOrigin="noticeOrigin"></icpoint-noice>
</el-dialog>
</div>
</template>
@ -256,11 +209,12 @@
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./icpointnucleicmonitoring-add-or-update";
import detail from "./icpointnucleicmonitoring-detail";
import icpointNoice from "./icpointNoice";
import { requestPost , requestGet} from "@/js/dai/request";
import { requestPost, requestGet } from "@/js/dai/request";
export default {
mixins: [mixinViewModule],
data() {
data () {
return {
enableFlagList: [
{
@ -286,20 +240,23 @@ export default {
pageSize: 20,
pageNo: 0,
total: 0,
dataListLoading:false
dataListLoading: false,
detailShow: false
};
},
components: {
AddOrUpdate,
icpointNoice,
detail
},
created() {
created () {
this.loadTable()
this.noticeFun();
this.getFormInfo();
},
methods: {
async loadTable() {
async loadTable () {
this.dataListLoading = true;
const url = "/epmetuser/icPointNucleicMonitoring/page";
let params = {
@ -318,16 +275,16 @@ export default {
}
this.dataListLoading = false;
},
handleSizeChange(val) {
handleSizeChange (val) {
this.pageSize = val;
this.pageNo = 1;
this.loadTable();
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val;
this.loadTable();
},
async handleDelete(id) {
async handleDelete (id) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -341,7 +298,7 @@ export default {
}
});
},
async deleteNat(id) {
async deleteNat (id) {
const url = "/epmetuser/icPointNucleicMonitoring/delete";
let params = [id];
const { data, code, msg } = await requestPost(url, params);
@ -356,7 +313,7 @@ export default {
}
},
//
async handleExport() {
async handleExport () {
let title = "核酸检测点";
const url = "/epmetuser/icPointNucleicMonitoring/point-export";
@ -373,7 +330,7 @@ export default {
);
},
//
resetSearch() {
resetSearch () {
this.dataForm = {
name: "",
mobile: "",
@ -383,24 +340,24 @@ export default {
this.orgIds = [];
},
//
handleSendNotice() {
handleSendNotice () {
this.sendNoticeFormShow = true;
},
//
diaClose() {
diaClose () {
this.sendNoticeFormShow = false;
},
// /
enableOrDisabled(id) {
enableOrDisabled (id) {
this.$http
.post(`/epmetuser/appPoint/enableOrDisabled/` + id)
.then(({ data: res }) => {
this.loadTable();
})
.catch(() => {});
.post(`/epmetuser/appPoint/enableOrDisabled/` + id)
.then(({ data: res }) => {
this.loadTable();
})
.catch(() => { });
},
// /
addOrUpdateHandle(id, title) {
addOrUpdateHandle (id, title) {
this.dialogTitle = title;
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id;
@ -408,13 +365,26 @@ export default {
});
this.addOrUpdateVisible = true;
},
//
detailHandle (id) {
this.detailShow = true;
this.$nextTick(() => {
this.$refs.ref_detail.init(id);
});
},
diaDetailClose () {
console.log(this.$refs.ref_detail)
this.$refs.ref_detail.diaDestroy()
this.detailShow = false
},
//
closeDialog() {
closeDialog () {
this.addOrUpdateVisible = false;
this.dialogTitle = "";
},
//
getFormInfo() {
getFormInfo () {
this.$http
.post(`/gov/org/agency/getOrgTreeListByCustomerId`)
.then(({ data: res }) => {
@ -424,10 +394,10 @@ export default {
this.organizationList = res.data;
this.deleteChildren(this.organizationList);
})
.catch(() => {});
.catch(() => { });
},
//
noticeFun() {
noticeFun () {
this.$http
.post(`/epmetuser/icPointNucleicMonitoring/getShowType`)
.then(({ data: res }) => {
@ -435,9 +405,9 @@ export default {
this.noticeVisible = true;
}
})
.catch(() => {});
.catch(() => { });
},
deleteChildren(arr) {
deleteChildren (arr) {
let childs = arr;
for (let i = childs.length; i--; i > 0) {
if (childs[i].children) {
@ -450,11 +420,11 @@ export default {
}
return arr;
},
orgChangeHandle() {
orgChangeHandle () {
this.dataForm.orgId = this.orgIds[this.orgIds.length - 1];
console.log(this.dataForm);
},
handleExportModule() {
handleExportModule () {
let title = "核酸检测点模板";
let url = "/epmetuser/icPointNucleicMonitoring/exporttemplate";
@ -472,7 +442,7 @@ export default {
);
},
//
download(data, fileName) {
download (data, fileName) {
if (!data) {
return;
}
@ -496,7 +466,7 @@ export default {
}
},
//
beforeUpload(file) {
beforeUpload (file) {
this.files = file;
const isText = file.type === "application/vnd.ms-excel";
@ -514,7 +484,7 @@ export default {
return true;
}
},
async uploadFile() {
async uploadFile () {
if (this.fileName == "") {
this.$message.warning("请选择要上传的文件!");
return false;
@ -552,7 +522,7 @@ export default {
}
this.loadTable();
},
(rspMsg, data) => {},
(rspMsg, data) => { },
{ headers: { "Content-Type": "multipart/form-data" } }
);
},

239
src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue

@ -1,12 +1,11 @@
<template>
<div style="max-height: 82vh; overflow: auto; padding: 20px" class="form-class">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="120px"
>
<div style="max-height: 82vh; overflow: auto; padding: 20px"
class="form-class">
<el-form :model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="130px">
<!--<el-form-item label="所属组织名称" prop="orgName">-->
<!--<el-select v-model="dataForm.orgName" placeholder="所属组织名称">-->
<!--<el-option-->
@ -18,107 +17,89 @@
<!--</el-option>-->
<!--</el-select>-->
<!--</el-form-item>-->
<el-form-item label="疫苗接种点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="疫苗接种点名称"
:disabled="dialogTitle == '查看'"
></el-input>
<el-form-item label="疫苗接种点名称"
prop="name">
<el-input v-model="dataForm.name"
placeholder="疫苗接种点名称"
:disabled="dialogTitle == '查看'"></el-input>
</el-form-item>
<el-form-item
label="接种时间"
:class="dataForm.noAvailableVaccines != '2' ? '' : 'time-class'"
>
<el-form-item label="接种时间"
:class="dataForm.noAvailableVaccines != '2' ? '' : 'time-class'">
<div class="data-block">
<div style="width: 30%">
<el-date-picker
v-model="dataForm.inoculationDate"
value-format="yyyy-MM-dd"
type="date"
:clearable="false"
placeholder="选择日期"
:disabled="dialogTitle == '查看'"
>
<el-date-picker v-model="dataForm.inoculationDate"
value-format="yyyy-MM-dd"
type="date"
:clearable="false"
placeholder="选择日期"
:disabled="dialogTitle == '查看'">
</el-date-picker>
</div>
<div class="time-block">
<div>
<span>上午</span>
<el-time-picker
is-range
v-model="morningTime"
format="HH:mm"
value-format="HH:mm"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="startTimeChange"
:disabled="dialogTitle == '查看'"
:clearable="false"
:editable="false"
style="width: 56%"
>
<el-time-picker is-range
v-model="morningTime"
format="HH:mm"
value-format="HH:mm"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="startTimeChange"
:disabled="dialogTitle == '查看'"
:clearable="false"
:editable="false"
style="width: 56%">
</el-time-picker>
</div>
<div>
<span>下午</span>
<el-time-picker
is-range
v-model="afterTime"
format="HH:mm"
value-format="HH:mm"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="endTimeChange"
:disabled="dialogTitle == '查看'"
:clearable="false"
:editable="false"
style="width: 56%"
>
<el-time-picker is-range
v-model="afterTime"
format="HH:mm"
value-format="HH:mm"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="endTimeChange"
:disabled="dialogTitle == '查看'"
:clearable="false"
:editable="false"
style="width: 56%">
</el-time-picker>
</div>
</div>
</div>
</el-form-item>
<el-form-item label="" prop="noAvailableVaccines">
<el-checkbox
v-model="dataForm.noAvailableVaccines"
true-label="1"
false-label="2"
:disabled="dialogTitle == '查看'"
>暂无疫苗</el-checkbox
>
<el-form-item label=""
prop="noAvailableVaccines">
<el-checkbox v-model="dataForm.noAvailableVaccines"
true-label="1"
false-label="2"
:disabled="dialogTitle == '查看'">暂无疫苗</el-checkbox>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
:disabled="dialogTitle == '查看'"
placeholder="咨询电话"
></el-input>
<el-form-item label="咨询电话"
prop="mobile">
<el-input v-model="dataForm.mobile"
:disabled="dialogTitle == '查看'"
placeholder="咨询电话"></el-input>
</el-form-item>
<el-form-item label="接种点地址" prop="address">
<el-input
v-model="dataForm.address"
placeholder="例:青岛市时代国际广场"
style="width: 65%"
></el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
>
<el-form-item label="接种点地址"
prop="address">
<el-input v-model="dataForm.address"
placeholder="例:青岛市时代国际广场"
style="width: 65%"></el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap">查询</el-button>
</el-form-item>
<el-form-item
label="位置坐标"
class="position_label"
prop="longitude"
style="display: block"
>
<el-form-item label="位置坐标"
class="position_label"
prop="longitude"
style="display: block">
<div>
<!-- <el-input
class="item_width_4"
@ -136,31 +117,26 @@
@click="handleSearchMap"
>查询</el-button
> -->
<div
id="map_add"
class="div_map"
style="width: 500px; height: 300px; margin-top: 20px"
></div>
<div style="margin-top: 10px" v-show="false">
<div id="map_add"
class="div_map"
style="width: 500px; height: 300px; margin-top: 20px"></div>
<div style="margin-top: 10px"
v-show="false">
<span>经度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude"
disabled
style="width: 200px; margin-left: 20px"
>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude"
disabled
style="width: 200px; margin-left: 20px">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude"
disabled
style="width: 200px; margin-left: 20px"
>
<el-input class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude"
disabled
style="width: 200px; margin-left: 20px">
</el-input>
</div>
</div>
@ -168,12 +144,9 @@
</el-form>
<div class="submit">
<el-button @click="closeSubmit">{{ $t("cancel") }}</el-button>
<el-button
v-if="dialogTitle != '查看'"
type="primary"
@click="dataFormSubmitHandle()"
>{{ $t("confirm") }}</el-button
>
<el-button v-if="dialogTitle != '查看'"
type="primary"
@click="dataFormSubmitHandle()">{{ $t("confirm") }}</el-button>
</div>
</div>
</template>
@ -186,7 +159,7 @@ var markers;
var geocoder;
var infoWindowList;
export default {
data() {
data () {
return {
visible: false,
dataForm: {
@ -215,7 +188,7 @@ export default {
};
},
computed: {
dataRule() {
dataRule () {
return {
customerId: [
{
@ -276,7 +249,7 @@ export default {
},
},
methods: {
startTimeChange() {
startTimeChange () {
if (Array.isArray(this.morningTime) && this.morningTime.length > 0) {
let hour_0 = Number(this.morningTime[0].substring(0, 2));
let hour_1 = Number(this.morningTime[1].substring(0, 2));
@ -307,7 +280,7 @@ export default {
this.dataForm.moEndTime = this.morningTime[1];
}
},
endTimeChange() {
endTimeChange () {
if (Array.isArray(this.afterTime) && this.afterTime.length > 0) {
let hour_0 = Number(this.afterTime[0].substring(0, 2));
let hour_1 = Number(this.afterTime[1].substring(0, 2));
@ -338,11 +311,11 @@ export default {
this.dataForm.afEndTime = this.afterTime[1];
}
},
closeSubmit() {
closeSubmit () {
this.$emit("closeDialog");
},
// init
initMap() {
initMap () {
let { latitude, longitude } = this.$store.state.user;
//
if (!latitude || latitude == "" || latitude == "0") {
@ -375,7 +348,7 @@ export default {
// this.handleMoveCenter()
this.convert();
},
handleMoveCenter() {
handleMoveCenter () {
//
const center = map.getCenter();
const lat = center.getLat();
@ -386,7 +359,7 @@ export default {
this.convert(lat, lng);
},
//
handleSearchMap() {
handleSearchMap () {
infoWindowList.forEach((infoWindow) => {
infoWindow.close();
});
@ -415,7 +388,7 @@ export default {
}
});
},
convert(lat, lng) {
convert (lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location;
@ -440,8 +413,8 @@ export default {
.then((result) => {
this.dataForm.address =
this.dataForm.address !== "" &&
this.dataForm.address !== null &&
(this.dataForm.longitude === "" || this.dataForm.longitude === null)
this.dataForm.address !== null &&
(this.dataForm.longitude === "" || this.dataForm.longitude === null)
? this.dataForm.address
: result.result.address;
//
@ -449,7 +422,7 @@ export default {
});
},
setMarker(lat, lng) {
setMarker (lat, lng) {
markers.setGeometries([]);
markers.add([
{
@ -474,7 +447,7 @@ export default {
// })
// .catch(() => {});
// },
init() {
init () {
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
@ -486,7 +459,7 @@ export default {
});
},
//
getInfo() {
getInfo () {
this.$http
.get(`/epmetuser/icPointVaccinesInoculation/${this.dataForm.id}`)
.then(({ data: res }) => {
@ -505,7 +478,7 @@ export default {
}
this.initMap();
})
.catch(() => {});
.catch(() => { });
},
//
dataFormSubmitHandle: debounce(
@ -556,7 +529,7 @@ export default {
},
});
})
.catch(() => {});
.catch(() => { });
});
},
1000,

338
src/views/modules/plugins/point/icpointvaccinesinoculation-detail.vue

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

412
src/views/modules/plugins/point/icpointvaccinesinoculation.vue

@ -1,37 +1,30 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="loadTable()"
>
<el-form-item label="疫苗接种点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="核酸检测点名称"
clearable
></el-input>
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="loadTable()">
<el-form-item label="疫苗接种点名称"
prop="name">
<el-input v-model="dataForm.name"
placeholder="核酸检测点名称"
clearable></el-input>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
placeholder="咨询电话"
clearable
></el-input>
<el-form-item label="咨询电话"
prop="mobile">
<el-input v-model="dataForm.mobile"
placeholder="咨询电话"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button
class="diy-button--search"
size="small"
@click="loadTable()"
>{{ $t("query") }}</el-button
>
<el-button class="diy-button--search"
size="small"
@click="loadTable()">{{ $t("query") }}</el-button>
</el-form-item>
<el-form-item>
<el-button size="small" class="diy-button--reset" @click="resetSearch"
>重置</el-button
>
<el-button size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</el-form-item>
<!--<el-form-item>-->
<!--<el-button type="danger" @click="deleteHandle()">{{-->
@ -42,206 +35,164 @@
</div>
<div class="div_table">
<div class="exportBtn">
<el-button
class="diy-button--add"
type="primary"
size="small"
@click="addOrUpdateHandle('', '新增接种点')"
>{{ $t("add") }}</el-button
>
<el-button
style="margin-left: 10px"
class="diy-button--export"
size="small"
@click="handleExportModule()"
>下载模板</el-button
>
<el-button class="diy-button--add"
type="primary"
size="small"
@click="addOrUpdateHandle('', '新增接种点')">{{ $t("add") }}</el-button>
<el-button style="margin-left: 10px"
class="diy-button--export"
size="small"
@click="handleExportModule()">下载模板</el-button>
<el-upload :headers="$getElUploadHeaders()"
style=""
ref="upload"
:multiple="false"
:show-file-list="false"
:before-upload="
<el-upload :headers="$getElUploadHeaders()"
style=""
ref="upload"
:multiple="false"
:show-file-list="false"
:before-upload="
(file) => {
beforeUpload(file);
}
"
action=""
accept=".xls,.xlsx"
:http-request="
action=""
accept=".xls,.xlsx"
:http-request="
() => {
uploadFile();
}
"
>
<el-button
style="margin-left: 10px"
size="small"
class="diy-button--delete"
>导入</el-button
>
">
<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
>
<el-button
style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
v-if="noticeVisible"
>发送通知</el-button
>
<el-button style="float: left; margin-left: 10px"
class="diy-button--reset"
size="small"
@click="handleExport">导出</el-button>
<el-button style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
v-if="noticeVisible">发送通知</el-button>
</div>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
:row-key="row => { return row.id.toString() }"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%; height: 564px;overflow: auto;"
>
<el-table-column
label="序号"
header-align="center"
align="center"
type="index"
width="50"
></el-table-column>
<el-table-column
prop="name"
label="疫苗接种点名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="inoculationDate"
label="接种日期"
header-align="center"
align="center"
></el-table-column>
<el-table-column
label="上午接种时间"
header-align="center"
align="center"
>
<el-table v-loading="dataListLoading"
:data="dataList"
border
:row-key="row => { return row.id.toString() }"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%; height: 564px;overflow: auto;">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="name"
label="疫苗接种点名称"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="inoculationDate"
label="接种日期"
header-align="center"
align="center"></el-table-column>
<el-table-column label="上午接种时间"
header-align="center"
align="center">
<template slot-scope="scope">
<div>{{ scope.row.moStartTime }} - {{ scope.row.moEndTime }}</div>
</template>
</el-table-column>
<el-table-column
label="下午接种时间"
header-align="center"
align="center"
>
<el-table-column label="下午接种时间"
header-align="center"
align="center">
<template slot-scope="scope">
<div>{{ scope.row.afStartTime }} - {{ scope.row.afEndTime }}</div>
</template>
</el-table-column>
<el-table-column
prop="noAvailableVaccines"
label="暂无疫苗"
header-align="center"
width="100"
align="center"
></el-table-column>
<el-table-column
prop="mobile"
label="咨询电话"
header-align="center"
width="150"
align="center"
></el-table-column>
<el-table-column
prop="address"
label="接种点地址"
header-align="center"
align="center"
width="230"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="操作"
header-align="center"
align="center"
width="150"
>
<el-table-column prop="noAvailableVaccines"
label="暂无疫苗"
header-align="center"
width="100"
align="center"></el-table-column>
<el-table-column prop="mobile"
label="咨询电话"
header-align="center"
width="150"
align="center"></el-table-column>
<el-table-column prop="address"
label="接种点地址"
header-align="center"
align="center"
width="230"
show-overflow-tooltip></el-table-column>
<el-table-column label="操作"
header-align="center"
align="center"
width="150">
<template slot-scope="scope">
<el-button
type="text"
size="small"
class="div-table-button--detail"
@click="addOrUpdateHandle(scope.row.id, '查看')"
>{{ "查看" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--edit"
@click="addOrUpdateHandle(scope.row.id, '修改')"
>{{ scope.row.longitude === null ? "待完善" : "修改" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--delete--noline"
@click="handleDelete(scope.row.id)"
>{{ $t("delete") }}</el-button
>
<el-button type="text"
size="small"
class="div-table-button--detail"
@click="detailHandle(scope.row.id, '查看')">{{ "查看" }}</el-button>
<el-button type="text"
size="small"
class="div-table-button--edit"
@click="addOrUpdateHandle(scope.row.id, '修改')">{{ scope.row.longitude === null ? "待完善" : "修改" }}</el-button>
<el-button type="text"
size="small"
class="div-table-button--delete--noline"
@click="handleDelete(scope.row.id)">{{ $t("delete") }}</el-button>
</template>
</el-table-column>
</el-table>
<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 @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>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog
:visible.sync="addOrUpdateVisible"
:title="dialogTitle"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
width="850px"
top="5vh"
custom-class="dialog-h"
>
<add-or-update
ref="addOrUpdate"
@refreshDataList="loadTable"
@closeDialog="closeDialog"
:dialogTitle="dialogTitle"
></add-or-update>
<el-dialog :visible.sync="addOrUpdateVisible"
:title="dialogTitle"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
width="850px"
top="5vh"
custom-class="dialog-h">
<add-or-update ref="addOrUpdate"
@refreshDataList="loadTable"
@closeDialog="closeDialog"
:dialogTitle="dialogTitle"></add-or-update>
</el-dialog>
<!-- 弹窗, 详情 -->
<el-dialog :visible.sync="detailShow"
:title="'详情'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
width="850px"
top="5vh"
@closed="diaDetailClose"
custom-class="dialog-h">
<detail ref="ref_detail"
@closeDialog="diaDetailClose"></detail>
</el-dialog>
<!-- 发送通知弹出框 -->
<el-dialog
:visible.sync="sendNoticeFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="发送通知"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose"
:destroy-on-close="true"
>
<icpoint-noice
ref="ref_sendnotice"
@diaClose="diaClose"
:noticeOrigin="noticeOrigin"
></icpoint-noice>
<el-dialog :visible.sync="sendNoticeFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="发送通知"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose"
:destroy-on-close="true">
<icpoint-noice ref="ref_sendnotice"
@diaClose="diaClose"
:noticeOrigin="noticeOrigin"></icpoint-noice>
</el-dialog>
</div>
</template>
@ -249,11 +200,12 @@
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./icpointvaccinesinoculation-add-or-update";
import detail from "./icpointvaccinesinoculation-detail";
import icpointNoice from "./icpointNoice";
import { requestPost , requestGet} from "@/js/dai/request";
import { requestPost, requestGet } from "@/js/dai/request";
export default {
mixins: [mixinViewModule],
data() {
data () {
return {
dataForm: {
name: "",
@ -267,19 +219,22 @@ export default {
pageSize: 20,
pageNo: 0,
total: 0,
dataListLoading:false,
dataListLoading: false,
detailShow: false
};
},
components: {
AddOrUpdate,
icpointNoice,
detail
},
mounted() {
mounted () {
this.loadTable();
this.noticeFun();
},
methods: {
async loadTable() {
async loadTable () {
this.dataListLoading = true;
const url = "/epmetuser/icPointVaccinesInoculation/page";
let params = {
@ -288,7 +243,7 @@ export default {
...this.dataForm
};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
console.log(data.list);
this.dataList = data.list;
@ -298,16 +253,16 @@ export default {
}
this.dataListLoading = false;
},
handleSizeChange(val) {
handleSizeChange (val) {
this.pageSize = val;
this.pageNo = 1;
this.loadTable();
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val;
this.loadTable();
},
async handleDelete(id) {
async handleDelete (id) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -321,7 +276,7 @@ export default {
}
});
},
async deleteNat(id) {
async deleteNat (id) {
const url = "/epmetuser/icPointVaccinesInoculation/delete";
let params = [id];
const { data, code, msg } = await requestPost(url, params);
@ -336,7 +291,7 @@ export default {
}
},
//
async handleExport() {
async handleExport () {
let title = "疫苗接种点";
const url = "/epmetuser/icPointVaccinesInoculation/point-export";
@ -353,7 +308,7 @@ export default {
);
},
//
resetSearch() {
resetSearch () {
this.dataForm = {
name: "",
mobile: "",
@ -361,15 +316,15 @@ export default {
this.pageNo = 1;
},
//
handleSendNotice() {
handleSendNotice () {
this.sendNoticeFormShow = true;
},
//
diaClose() {
diaClose () {
this.sendNoticeFormShow = false;
},
//
noticeFun() {
noticeFun () {
this.$http
.post(`/epmetuser/icPointNucleicMonitoring/getShowType`)
.then(({ data: res }) => {
@ -377,10 +332,23 @@ export default {
this.noticeVisible = true;
}
})
.catch(() => {});
.catch(() => { });
},
//
detailHandle (id,) {
this.detailShow = true;
this.$nextTick(() => {
this.$refs.ref_detail.init(id);
});
},
diaDetailClose () {
console.log(this.$refs.ref_detail)
this.$refs.ref_detail.diaDestroy()
this.detailShow = false
},
// /
addOrUpdateHandle(id, title) {
addOrUpdateHandle (id, title) {
this.dialogTitle = title;
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id;
@ -389,11 +357,11 @@ export default {
this.addOrUpdateVisible = true;
},
//
closeDialog() {
closeDialog () {
this.addOrUpdateVisible = false;
this.dialogTitle = "";
},
handleExportModule() {
handleExportModule () {
let title = "疫苗接种点模板";
let url = "/epmetuser/icPointVaccinesInoculation/exporttemplate";
@ -411,7 +379,7 @@ export default {
);
},
//
download(data, fileName) {
download (data, fileName) {
if (!data) {
return;
}
@ -435,7 +403,7 @@ export default {
}
},
//
beforeUpload(file) {
beforeUpload (file) {
this.files = file;
const isText = file.type === "application/vnd.ms-excel";
@ -453,7 +421,7 @@ export default {
return true;
}
},
async uploadFile() {
async uploadFile () {
if (this.fileName == "") {
this.$message.warning("请选择要上传的文件!");
return false;
@ -491,7 +459,7 @@ export default {
}
this.loadTable();
},
(rspMsg, data) => {},
(rspMsg, data) => { },
{ headers: { "Content-Type": "multipart/form-data" } }
);
},

244
src/views/modules/sys/icvaccineprarmeter-detail.vue

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

1508
src/views/modules/sys/icvaccineprarmeter.vue

File diff suppressed because it is too large

2
src/views/modules/visual/basicinfo/houseStatic/houseList.vue

@ -37,7 +37,7 @@
<div class="td td1">{{item.doorName}} </div>
<div class="td td1">{{item.houseType==='1'?'楼房':item.houseType==='2'?'平方':'别墅'}} </div>
<div class="td td1">{{item.purpose}} </div>
<div class="td td1">{{item.rentFlag==='1'?'出租':item.rentFlag==='0'?'自住':item.rentFlag==='2'?'闲置':'未出售'}} </div>
<div class="td td1">{{item.rentFlag}} </div>
<div class="td td1">{{item.ownerName}} </div>
<div class="td td2">{{item.ownerPhone}} </div>
<div class="td td2">{{item.ownerIdCard}} </div>

376
src/views/modules/workSys/dataOpenConfig.vue

@ -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…
Cancel
Save