From 5628ba2bec9b1558faf5d18231b53407ab52b5d0 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 25 Mar 2022 17:50:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=96=AB=E8=8B=97=E6=8E=A5=E7=A7=8D=E7=99=BD?= =?UTF-8?q?=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/buttonstyle.scss | 7 + .../scss/modules/management/epidemic.scss | 29 ++ .../modules/base/epidemic/natInfo/natList.vue | 9 +- .../{veroFocusForm.vue => veroFocusAdd.vue} | 492 ++++++++++-------- .../base/epidemic/veroFocus/veroFocusEdit.vue | 338 ++++++++++++ .../base/epidemic/veroFocus/veroFocusList.vue | 243 ++++++--- .../base/epidemic/veroFocus/vfNoticeList.vue | 447 ++++++++++++++++ .../base/epidemic/veroFocus/vfSendNotice.vue | 266 ++++++++++ .../base/epidemic/veroFocus/vfVisiteList.vue | 450 ++++++++++++++++ .../ninePlaces/inspect/inspectReview.vue | 4 +- 10 files changed, 1987 insertions(+), 298 deletions(-) rename src/views/modules/base/epidemic/veroFocus/{veroFocusForm.vue => veroFocusAdd.vue} (51%) create mode 100644 src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue create mode 100644 src/views/modules/base/epidemic/veroFocus/vfNoticeList.vue create mode 100644 src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue create mode 100644 src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue diff --git a/src/assets/scss/buttonstyle.scss b/src/assets/scss/buttonstyle.scss index 1e683d95..7a60a21b 100644 --- a/src/assets/scss/buttonstyle.scss +++ b/src/assets/scss/buttonstyle.scss @@ -86,6 +86,13 @@ background-color: #4ec591 !important; border-color: #4ec591 !important; } +//列表上方操作按钮,其他按钮 +.diy-button--more { + color: #fff !important; + background-color: #23c1c4 !important; + border-color: #23c1c4 !important; +} + //table按钮样式 //查看 diff --git a/src/assets/scss/modules/management/epidemic.scss b/src/assets/scss/modules/management/epidemic.scss index 2164e420..d20be0a2 100644 --- a/src/assets/scss/modules/management/epidemic.scss +++ b/src/assets/scss/modules/management/epidemic.scss @@ -70,3 +70,32 @@ flex-direction: column; justify-content: center; } +.div-mult-form { + margin-top: 20px; + + .div_person { + display: flex; + font-size: 14px; + padding-bottom: 20px; + + .person_title { + text-align: right; + flex: 0 0 100px; + + line-height: 36px; + padding: 0 12px 0 0; + } + + .tag_item { + margin-right: 10px; + margin-top: 10px; + } + .tag_tip { + margin-top: 10px; + color: #9c9c9c; + } + } +} +.div-mult-table { + padding: 0 20px; +} diff --git a/src/views/modules/base/epidemic/natInfo/natList.vue b/src/views/modules/base/epidemic/natInfo/natList.vue index 9d38bdb9..bca48bb5 100644 --- a/src/views/modules/base/epidemic/natInfo/natList.vue +++ b/src/views/modules/base/epidemic/natInfo/natList.vue @@ -559,13 +559,12 @@ export default { computed: { tableHeight () { - return (this.clientHeight - 360) + return this.$store.state.inIframe ? this.clientHeight - 360 + this.iframeHeight : this.clientHeight - 360 + }, - rowHeight () { - return (this.clientHeight - 200) + 'px' - }, - ...mapGetters(['clientHeight']) + + ...mapGetters(['clientHeight', 'iframeHeight']) }, watch: { diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusForm.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue similarity index 51% rename from src/views/modules/base/epidemic/veroFocus/veroFocusForm.vue rename to src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue index 846c26b4..8fdcfb3e 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusForm.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue @@ -8,11 +8,10 @@ @tab-click="handleClick"> - @@ -35,7 +33,6 @@ @@ -46,7 +43,6 @@ @@ -95,42 +91,44 @@ - - - - - - - - - - - 查询 - 重置 +
+ + + + + + + + + + + 查询 + 重置 + @@ -150,24 +149,30 @@ type="index" width="50"> - - - + +
@@ -181,48 +186,75 @@
- - - - - - - 小程序通知 - 短信通知 - - - - - - - - - +
+
+ + + + + {{selectionAll.length}} + + + + + + + + 小程序通知 + 短信通知 + + + + + + + + +
@@ -231,8 +263,7 @@
取 消 - 确 定 @@ -245,24 +276,25 @@ import { Loading } from 'element-ui' // 引入Loading服务 import { requestPost } from '@/js/dai/request' -import { dateFormats } from '@/utils/index' +import { mapGetters } from 'vuex' let loading // 加载动画 export default { data () { return { - formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 - activeName: "second", + activeName: "first", gridList: [], - selGridId: '', - veroNum: null, - btnDisable: false, + formDataSearch: { + selGridId: '', + veroNum: undefined, + }, + formData1: { name: '', idCard: '', @@ -280,9 +312,12 @@ export default { noticeContent: '', }, tableData: [], + total: 0, + pageSize: 20, + pageNo: 0, tableLoading: false, - selection: [],//选中的人员 + selectionAll: [],//选中的人员 } @@ -297,17 +332,12 @@ export default { methods: { - async initForm (type, natId) { - this.startLoading() - this.$refs['ref_form'].resetFields(); + async initForm () { - this.formType = type - if (natId) { - this.natId = natId - this.formData.id = natId - await this.loadFormData() - } - this.endLoading() + this.$refs['ref_form1'].resetFields(); + this.$refs['ref_form2'].resetFields(); + + await this.loadTable() }, @@ -318,141 +348,184 @@ export default { async loadTable () { this.tableLoading = true - const url = "/gov/org/placepatrolteam/getlist" + const url = "/epmetuser/icresiuser/listresi" // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/getlist" let params = { pageSize: this.pageSize, pageNo: this.pageNo, - ...this.formData + formCode: 'resi_base_info', + ...this.formDataSearch } const { data, code, msg } = await requestPost(url, params) if (code === 0) { this.total = data.total + data.list.forEach(element => { + element.isSel = false + }); this.tableData = data.list - this.tableData.forEach(item => { - if (item.time) { - let timeArray = item.time.split(' ') - item.time = timeArray[0] - } + this.analysisTableSelection() + - }); } else { this.$message.error(msg) } this.tableLoading = false }, - handleSelectAll (selectAllFlag) { - this.$refs.ref_table.clearSelection(); - if (selectAllFlag) { - this.tableData.forEach(row => { - if (row.showBtn) { - this.$refs.ref_table.toggleRowSelection(row); + handleSelectTable (selection, row) { + + row.isSel = !row.isSel + + if (row.isSel) { + this.selectionAll.push(row) + } else { + for (let i = 0; i < this.selectionAll.length; i++) { + let item = this.selectionAll[i] + if (item.ID_CARD === row.ID_CARD) { + this.selectionAll.splice(i, 1) + break } - }); + + } } + }, - selectAll (selection) { - this.selection = selection + handleSelAll (selection) { + let selFlag = selection.length > 0//全选选中 还是 全选不选中 + for (let i = 0; i < this.tableData.length; i++) { + let tableItem = this.tableData[i] + tableItem.isSel = selFlag + let isHasItem = false + for (let j = 0; j < this.selectionAll.length; j++) { + let selectionItem = this.selectionAll[j] + if (selectionItem.ID_CARD === tableItem.ID_CARD) { + isHasItem = true + if (!selFlag) { + this.selectionAll.splice(j, 1) + break + } + } + + } + + if (!isHasItem && selFlag) { + this.selectionAll.push(tableItem) + } - if (selection.length === this.validTableDataNum) { - this.selAllFlag = true - } else { - this.selAllFlag = false } }, + //删除标签 + handleCloseTag (tag, index) { + for (let i = 0; i < this.tableData.length; i++) { - handleClick () { + let tableItem = this.tableData[i] + if (tag.ID_CARD === tableItem.ID_CARD) {//如果表中存在这个数据 + tableItem.isSel = false + this.$refs.ref_table.toggleRowSelection(tableItem); + break + } - }, + } - async loadGrid () { - const url = "/gov/org/customergrid/gridoption" + for (let i = 0; i < this.selectionAll.length; i++) { + let item = this.selectionAll[i] + if (item.ID_CARD === tag.ID_CARD) { + this.selectionAll.splice(i, 1) + break + } - let params = { - agencyId: this.agencyId } + }, - const { data, code, msg } = await requestPost(url, params) + //回显列表选中的行 + analysisTableSelection () { + this.$nextTick(() => { + this.tableData.forEach(tableItem => { - if (code === 0) { - this.gridList = data - } else { - this.$message.error(msg) - } + for (let j = 0; j < this.selectionAll.length; j++) { + let selectionItem = this.selectionAll[j] + + if (selectionItem.ID_CARD === tableItem.ID_CARD) { + tableItem.isSel = true + break + + } + } + if (tableItem.isSel) { + this.$refs.ref_table.toggleRowSelection(tableItem); + } + }); + }) + }, + handleClick () { + }, - async loadFormData () { + async loadGrid () { + const url = "/gov/org/customergrid/gridoption" - // const url = 'http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern' - const url = '/gov/project/memoConcern' let params = { - id: this.natId, - readFlag: '0', + agencyId: this.agencyId } - const { data, code, msg } = await requestPost(url, params) - if (code === 0) { - this.formData = data - if (data.attachmentList) { - data.attachmentList.forEach(element => { - element.name = element.fileName - element.type = element.attachmentType - element.size = element.attachmentSize - }); - this.fileList = data.attachmentList + const { data, code, msg } = await requestPost(url, params) - } + if (code === 0) { + this.gridList = data } else { this.$message.error(msg) } + }, + async handleComfirm () { this.btnDisable = true setTimeout(() => { this.btnDisable = false }, 5000) - this.$refs['ref_form'].validate(async (valid, messageObj) => { - if (!valid) { - app.util.validateRule(messageObj) - this.btnDisable = false - } else { - await this.addNat() - } - }) + await this.addVero() + }, - async addNat () { - console.log(this.formData) - return false + async addVero () { + let formData = {} + if (this.activeName === 'first') { + formData = this.formData1 + const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 + // if (regPhone.test(this.formData.mobile) === false) { + // this.btnDisable = false + // this.$message({ + // type: 'warning', + // message: '请输入正确的手机号码' + // }) + // return false; + // } + } else { + if (this.selectionAll.length === 0) { + this.$message.info('请选择批量添加的人员') + return false + } - const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 - // if (regPhone.test(this.formData.mobile) === false) { - // this.btnDisable = false - // this.$message({ - // type: 'warning', - // message: '请输入正确的手机号码' - // }) - // return false; - // } - - if (this.fileList.length > 0) { - this.formData.attachmentList = this.fileList + formData = this.formData2 + formData.personList = this.selectionAll } + console.log(formData) + return false + let url = '' if (this.formType === 'add') { @@ -492,23 +565,41 @@ export default { }, + resetSearch () { + this.formDataSearch = { + selGridId: '', + veroNum: undefined, + } + }, + resetData () { - this.natId = '' - this.formData = { + this.formData1 = { name: '', idCard: '', phone: '', - checkTime: '', - address: '', - result: '', + remark: '', noticeWay: [], noticeContent: '', - attachmentList: [] } + + this.formData2 = { + personList: [], + remark: '', + noticeWay: [], + noticeContent: '', + } + this.formDataSearch = { + selGridId: '', + veroNum: undefined, + } + + this.selectionAll = []//选中的人员 + + }, handleSizeChange (val) { @@ -539,7 +630,14 @@ export default { } }, computed: { - dataRule () { + tableHeight () { + return 300 + + }, + ...mapGetters(['clientHeight', 'iframeHeight']), + + dataRule1 () { + return { name: [ { required: true, message: '姓名不能为空', trigger: 'blur' } @@ -550,25 +648,9 @@ export default { phone: [ { required: true, message: '手机号不能为空', trigger: 'blur' }, ], - checkTime: [ - { required: true, message: '检测时间不能为空', trigger: 'blur' }, - ], - address: [ - { required: false }, - ], - result: [ - { required: true }, - ], - address: [ - { required: false }, - ], - noticeWay: [ - { required: false }, - ], - noticeContent: [ - { required: false }, - ], + + } }, diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue new file mode 100644 index 00000000..87b5f154 --- /dev/null +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue @@ -0,0 +1,338 @@ + + + + + + + + diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue index abf5c153..c06d1e35 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue @@ -69,7 +69,7 @@
新增 + @click="addFormShow=true">新增 导出 + + 发送通知
-
- 全选 - 发送通知 -
+ + + + - + + + + - + + + + + + + + + @@ -247,7 +292,11 @@ + + + diff --git a/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue b/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue new file mode 100644 index 00000000..1825e7f1 --- /dev/null +++ b/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue @@ -0,0 +1,266 @@ + + + + + + + + diff --git a/src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue b/src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue new file mode 100644 index 00000000..ec45e380 --- /dev/null +++ b/src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue @@ -0,0 +1,450 @@ + + + + + + diff --git a/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue b/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue index a556aedc..ec45e380 100644 --- a/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue +++ b/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue @@ -1,8 +1,8 @@