Date: Tue, 29 Mar 2022 14:35:33 +0800
Subject: [PATCH 23/23] =?UTF-8?q?=E7=96=AB=E8=8B=97=E5=85=B3=E6=B3=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../base/epidemic/veroFocus/veroFocusAdd.vue | 98 +++++++++++--------
.../base/epidemic/veroFocus/veroFocusEdit.vue | 86 +++++-----------
.../base/epidemic/veroFocus/veroFocusList.vue | 4 +-
3 files changed, 83 insertions(+), 105 deletions(-)
diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue
index 33c3e4171..077b4f5d2 100644
--- a/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue
+++ b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue
@@ -61,10 +61,10 @@
-
+
小程序通知
@@ -114,7 +114,7 @@
-
-
-
-
- {{tag.NAME}}
+ {{tag.name}}
-
+
+ 小程序通知
小程序通知
- 短信通知
+ label="1">短信通知
@@ -291,35 +291,35 @@ export default {
btnDisable: false,
formDataSearch: {
- selGridId: '',
- veroNum: undefined,
+ gridId: '',
+ vaccineCount: undefined,
},
formData1: {
+ attentionType: 1,
name: '',
idCard: '',
mobile: '',
remark: '',
- noticeWay: [],
+ channel: [],
content: '',
},
formData2: {
- personList: [],
+ attentionType: 1,
remark: '',
- noticeWay: [],
+ channel: [],
content: '',
},
tableData: [],
total: 0,
pageSize: 20,
- pageNo: 0,
+ pageNo: 1,
tableLoading: false,
selectionAll: [],//选中的人员
-
}
},
components: {},
@@ -348,12 +348,11 @@ export default {
async loadTable () {
this.tableLoading = true
- const url = "/epmetuser/icresiuser/listresi"
- // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/getlist"
+ // const url = "/epmetuser/epidemicPrevention/page"
+ const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
- formCode: 'resi_base_info',
...this.formDataSearch
}
@@ -384,7 +383,7 @@ export default {
} else {
for (let i = 0; i < this.selectionAll.length; i++) {
let item = this.selectionAll[i]
- if (item.ID_CARD === row.ID_CARD) {
+ if (item.idCard === row.idCard) {
this.selectionAll.splice(i, 1)
break
}
@@ -402,7 +401,7 @@ export default {
let isHasItem = false
for (let j = 0; j < this.selectionAll.length; j++) {
let selectionItem = this.selectionAll[j]
- if (selectionItem.ID_CARD === tableItem.ID_CARD) {
+ if (selectionItem.idCard === tableItem.idCard) {
isHasItem = true
if (!selFlag) {
this.selectionAll.splice(j, 1)
@@ -425,7 +424,7 @@ export default {
for (let i = 0; i < this.tableData.length; i++) {
let tableItem = this.tableData[i]
- if (tag.ID_CARD === tableItem.ID_CARD) {//如果表中存在这个数据
+ if (tag.idCard === tableItem.idCard) {//如果表中存在这个数据
tableItem.isSel = false
this.$refs.ref_table.toggleRowSelection(tableItem);
break
@@ -435,7 +434,7 @@ export default {
for (let i = 0; i < this.selectionAll.length; i++) {
let item = this.selectionAll[i]
- if (item.ID_CARD === tag.ID_CARD) {
+ if (item.idCard === tag.idCard) {
this.selectionAll.splice(i, 1)
break
}
@@ -452,7 +451,7 @@ export default {
for (let j = 0; j < this.selectionAll.length; j++) {
let selectionItem = this.selectionAll[j]
- if (selectionItem.ID_CARD === tableItem.ID_CARD) {
+ if (selectionItem.idCard === tableItem.idCard) {
tableItem.isSel = true
break
@@ -502,9 +501,10 @@ export default {
},
async addVero () {
- let formData = {}
+ let list = []
if (this.activeName === 'first') {
- formData = this.formData1
+ list.push(this.formData1)
+
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码
// if (regPhone.test(this.formData.mobile) === false) {
// this.btnDisable = false
@@ -520,10 +520,20 @@ export default {
return false
}
- formData = this.formData2
- formData.personList = this.selectionAll
+ this.selectionAll.forEach(element => {
+ let obj = {
+ name: element.name,
+ idCard: element.idCard,
+ mobile: element.mobile,
+
+ ...this.formData2
+ }
+
+ list.push(obj)
+ });
+
}
- console.log(formData)
+ console.log(list)
return false
@@ -564,13 +574,17 @@ export default {
resetSearch () {
this.formDataSearch = {
- selGridId: '',
- veroNum: undefined,
+ gridId: '',
+ vaccineCount: undefined,
}
},
+ destroyed () {
+ console.log(11111111)
+ },
+
resetData () {
this.formData1 = {
@@ -578,20 +592,20 @@ export default {
idCard: '',
mobile: '',
remark: '',
- noticeWay: [],
+ channel: [],
content: '',
-
+ attentionType: 1,
}
this.formData2 = {
- personList: [],
+ attentionType: 1,
remark: '',
- noticeWay: [],
+ channel: [],
content: '',
}
this.formDataSearch = {
- selGridId: '',
- veroNum: undefined,
+ gridId: '',
+ vaccineCount: undefined,
}
this.selectionAll = []//选中的人员
diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue
index 6e7479d44..732f311a5 100644
--- a/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue
+++ b/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue
@@ -6,7 +6,7 @@
:inline="true"
:model="formData"
:rules="dataRule"
- :disabled="formTyoe==='detail'"
+ :disabled="formType==='detail'"
class="form">
+ v-model="formData.mobile">
@@ -59,20 +56,20 @@
-
+
+ 小程序通知
小程序通知
- 短信通知
+ label="1">短信通知
+ v-model="formData.content">
@@ -121,12 +118,13 @@ export default {
btnDisable: false,
formData: {
+ attentionType: 1,
name: '',
idCard: '',
- phone: '',
+ mobile: '',
remark: '',
- noticeWay: [],
- noticeContent: '',
+ channel: [],
+ content: '',
},
}
@@ -138,36 +136,11 @@ export default {
methods: {
- async initForm (formType, veroId) {
+ async initForm (formType, row) {
this.formType = formType
this.$refs['ref_form1'].resetFields();
- },
-
- async loadFormData () {
-
- // const url = 'http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern'
- const url = '/gov/project/memoConcern'
- let params = {
- id: this.veroId,
- readFlag: '0',
- }
- 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
-
- }
- } else {
- this.$message.error(msg)
- }
+ this.formData = JSON.parse(JSON.stringify(row))
},
async handleComfirm () {
@@ -181,8 +154,6 @@ export default {
},
async addVero () {
- console.log(this.formData)
- return false
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码
// if (regPhone.test(this.formData.mobile) === false) {
@@ -196,15 +167,9 @@ export default {
let url = ''
- if (this.formType === 'add') {
- url = '/gov/project/memoConcern/save'
- // url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/save"
- this.formData.id = ''
- } else {
- url = '/gov/project/memoConcern/update'
- // url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/update"
- }
+ // url = '/epmetuser/icEpidemicSpecialAttention/vaccination-update'
+ url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icEpidemicSpecialAttention/vaccination-update"
const { data, code, msg } = await requestPost(url, this.formData)
@@ -217,8 +182,7 @@ export default {
this.resetData()
this.$emit('dialogOk')
this.btnDisable = false
- this.$store.dispatch('setTipsList')
- this.$store.dispatch('setTipsTime')
+
} else {
this.btnDisable = false
this.$message.error(msg)
@@ -241,10 +205,10 @@ export default {
this.formData = {
name: '',
idCard: '',
- phone: '',
+ mobile: '',
remark: '',
- noticeWay: [],
- noticeContent: '',
+ channel: [],
+ content: '',
}
},
@@ -291,7 +255,7 @@ export default {
idCard: [
{ required: true, message: '身份证号不能为空', trigger: 'blur' }
],
- phone: [
+ mobile: [
{ required: true, message: '手机号不能为空', trigger: 'blur' },
],
checkTime: [
@@ -307,10 +271,10 @@ export default {
address: [
{ required: false },
],
- noticeWay: [
+ channel: [
{ required: false },
],
- noticeContent: [
+ content: [
{ required: false },
],
diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue
index ae03584ff..cff5d5592 100644
--- a/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue
+++ b/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue
@@ -478,14 +478,14 @@ export default {
handleEdit (row) {
this.editFormShow = true
this.$nextTick(() => {
- this.$refs.ref_form_edit.initForm('edit', row.veroFocusId)
+ this.$refs.ref_form_edit.initForm('edit', row)
})
},
handleDetail (row) {
this.editFormShow = true
this.$nextTick(() => {
- this.$refs.ref_form_edit.initForm('detail', row.veroFocusId)
+ this.$refs.ref_form_edit.initForm('detail', row)
})
},