From d133bd5457f64acfb11868224deff2fd7ed6016e Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 28 Oct 2022 14:08:49 +0800 Subject: [PATCH] 111 --- .../base/epidemic/unitEpid/crowdEpidList.vue | 338 ++++++++++++++++++ .../epidemic/unitEpid/staffEpidDetail.vue | 173 ++++----- .../base/epidemic/unitEpid/staffEpidList.vue | 155 ++------ 3 files changed, 447 insertions(+), 219 deletions(-) create mode 100644 src/views/modules/base/epidemic/unitEpid/crowdEpidList.vue diff --git a/src/views/modules/base/epidemic/unitEpid/crowdEpidList.vue b/src/views/modules/base/epidemic/unitEpid/crowdEpidList.vue new file mode 100644 index 000000000..de4914e82 --- /dev/null +++ b/src/views/modules/base/epidemic/unitEpid/crowdEpidList.vue @@ -0,0 +1,338 @@ + + + + + + diff --git a/src/views/modules/base/epidemic/unitEpid/staffEpidDetail.vue b/src/views/modules/base/epidemic/unitEpid/staffEpidDetail.vue index 69224e2a8..4281cf926 100644 --- a/src/views/modules/base/epidemic/unitEpid/staffEpidDetail.vue +++ b/src/views/modules/base/epidemic/unitEpid/staffEpidDetail.vue @@ -3,53 +3,66 @@
-
-
- 姓名: - {{ formData.name||'--' }} +
+ + + + + + + + + + + + + + + + + +
+ +
- -
- 手机号: - {{ formData.mobile||'--' }} -
- -
- 证件号: - {{ formData.idCard||'--' }} -
-
- 采样时间: - {{ formData.sampleTime||'--' }} -
-
- 检测时间: - {{ formData.natTime||'--' }} -
-
- 检测地点: - {{ formData.natAddress||'--' }} -
-
- 检测结果: - {{ formData.natResult==='0'?'阴性':'阳性' }} -
- -
- 照片: - -
- - - -
-
-
@@ -72,7 +85,7 @@ import { Loading } from 'element-ui' // 引入Loading服务 import { requestPost } from '@/js/dai/request' -import { dateFormats } from '@/utils/index' +import { mapGetters } from 'vuex' let loading // 加载动画 @@ -80,11 +93,13 @@ export default { data () { return { initLoading: false, + loading: false, + total: 0, + pageSize: 20, + pageNo: 0, + tableLoading: false, - icNatId: '', - formData: {}, - - fileList: [], + registerId: '', } @@ -99,56 +114,43 @@ export default { methods: { - async initForm (icNatId) { + async initForm (registerId) { this.startLoading() - this.formData.agencyId = this.agencyId + this.registerId = registerId + await this.loadTable() - this.icNatId = icNatId - this.formData.icNatId = icNatId - - await this.loadFormData() this.initLoading = true this.endLoading() }, - async loadFormData () { + async loadTable () { + this.tableLoading = true - // const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/detail' - const url = '/epmetuser/icNat/detail' + const url = "/gov/org/icEmployeeRegister/list" + // const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/natlist" let params = { - icNatId: this.icNatId, + pageSize: this.pageSize, + pageNo: this.pageNo, + registerId: this.registerId } - const { data, code, msg } = await requestPost(url, params) - if (code === 0) { - this.formData = data - console.log(this.formData.isSelChannel) + const { data, code, msg } = await requestPost(url, params) - this.formData.icNatId = this.icNatId + if (code === 0) { + this.total = data.total + this.tableData = data.list - this.fileList = [] - if (data.fileName) { - let obj = { - name: data.fileName, - type: data.attachmentType, - url: data.attachmentUrl, - } - // data.attachmentList.forEach(element => { - // element.name = element.fileName - // element.type = element.attachmentType - // element.size = element.attachmentSize - // }); - this.fileList.push(obj) + this.tableData.forEach(item => { - } + }); - this.hideUploadEdit = this.fileList.length >= this.limitNum; } else { this.$message.error(msg) } + this.tableLoading = false }, handleCancle () { // this.resetData() @@ -156,9 +158,6 @@ export default { }, - watchImg (src) { - window.open(src); - }, resetData () { @@ -181,7 +180,13 @@ export default { } }, computed: { + tableHeight () { + + return this.$store.state.inIframe ? this.clientHeight - 420 + this.iframeHeight : this.clientHeight - 420 + + }, + ...mapGetters(['clientHeight', 'iframeHeight']) }, props: { diff --git a/src/views/modules/base/epidemic/unitEpid/staffEpidList.vue b/src/views/modules/base/epidemic/unitEpid/staffEpidList.vue index 4320051ba..3731742eb 100644 --- a/src/views/modules/base/epidemic/unitEpid/staffEpidList.vue +++ b/src/views/modules/base/epidemic/unitEpid/staffEpidList.vue @@ -11,10 +11,10 @@ prop="natStartDate"> @@ -121,11 +121,11 @@ type="index" width="50"> - + min-width="120"> - - 查看 - { - item.isResiUserShow = item.isLocalResiUser === '0' ? '否' : '是' - if (item.natResult === '1') { - item.natResultShow = '阳性' - } else if (item.natResult === '0') { - item.natResultShow = '阴性' - } else { - item.natResultShow = '' - } - }); @@ -362,25 +352,20 @@ export default { }, - diaClose () { - this.$refs.ref_form.resetData() - this.formShow = false + async handleDetail (row) { + this.detailShow = true + this.$nextTick(() => { + this.$refs.ref_detail.initForm(row.registerId) + }) }, + diaDetailClose () { this.detailShow = false }, - - - addFormOk () { - this.formShow = false - this.loadTable() - - }, - async handleDelete (row) { let message = '确认删除?' @@ -390,57 +375,18 @@ export default { type: "warning" }) .then(() => { - this.deleteNat(row) + this.deleteStaff(row) }) .catch(err => { }); }, - async deleteNat (row) { - const url = "/epmetuser/icNat/del" + async deleteStaff (row) { + const url = "/gov/org/icEmployeeRegister/delete" // 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 - } + let params = [...row.registerId] const { data, code, msg } = await requestPost(url, params) @@ -456,47 +402,6 @@ export default { } }, - 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 = { @@ -526,26 +431,6 @@ export default { this.loadTable() }, - //导出表格 - async handleExport () { - let title = '核酸检测信息' - - const url = "/epmetuser/icNat/export" - - app.ajax.exportFilePost( - url, - this.formData, - (data, rspMsg) => { - this.download(data, title + '.xlsx') - }, - (rspMsg, data) => { - this.$message.error(rspMsg); - } - ); - - }, - - // 开启加载动画 startLoading () { loading = Loading.service({