From 0620ac6046fd6f54d2fe41f1e471d7f2c8f930b8 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Mon, 13 Jun 2022 18:46:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=88=B7=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppMonitoringObject/Add.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/apps/AppMonitoringObject/Add.vue b/src/apps/AppMonitoringObject/Add.vue index 272fcc87..9ff6ad68 100644 --- a/src/apps/AppMonitoringObject/Add.vue +++ b/src/apps/AppMonitoringObject/Add.vue @@ -5,6 +5,17 @@
+
+
+
+ * + 户类型 +
+
+ +
+
+
@@ -496,6 +507,7 @@ export default { foreignWorkersAddress: '', houseIdNumber: '', familyCount: '', + houseType: '', }, $areaId: '', girdInfo: {}, @@ -576,6 +588,7 @@ export default { methods: { rules() { return { + houseType: '请选择户类型', objectType: '请选择监测对象类型', name: '请输入户主姓名', idNumber: '请输入身份证号', @@ -617,6 +630,8 @@ export default { } } + + if (!this.form.idNumber) { return this.$u.toast('请输入身份证号') } From 24f7e992d7eb155dfa61f2dbf6bf4a57549f5388 Mon Sep 17 00:00:00 2001 From: liuye Date: Mon, 13 Jun 2022 18:54:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppMessageNotification.vue | 75 ++++++++++++++----- 1 file changed, 55 insertions(+), 20 deletions(-) diff --git a/src/apps/AppMessageNotification/AppMessageNotification.vue b/src/apps/AppMessageNotification/AppMessageNotification.vue index d58a30e8..caafdc72 100644 --- a/src/apps/AppMessageNotification/AppMessageNotification.vue +++ b/src/apps/AppMessageNotification/AppMessageNotification.vue @@ -39,24 +39,24 @@
{{ form.content.length }}/1000
-
+
-
+

图片

- +
-
+

视频

- +
-
+

附件

- +
@@ -144,6 +144,9 @@ export default { sendTime: '' }, formData: { + fileListImg: [], + fileListVideo: [], + fileListFile: [], fileList: [], imgList: [], accessImgurl: '', @@ -164,16 +167,17 @@ export default { minute: true, second: true }, - fileData: null + fileDataImg: null, + fileDataVideo: null, + fileDataFile: null } }, computed: {...mapState(['user'])}, methods: { radioChange(e) { - this.formDataInit() - this.$nextTick(() => { - this.form.contentType = e - }) + // this.$nextTick(() => { + // this.form.contentType = e + // }) }, toSelect() { uni.navigateTo({url: `./SelectUser?tagIdList=${this.tagIdList}&areaList=${this.areaIdList}`}) @@ -192,6 +196,7 @@ export default { // if(!this.areaIdList.length) { // return this.$u.toast('请选择用户') // } + this.$loading() if(this.form.sendType == 1 && !this.form.sendTime) { return this.$u.toast('请选择群发时间') } @@ -207,10 +212,40 @@ export default { if(this.form.contentType == 'file' && !this.formData.fileList.length) { return this.$u.toast('请上传文件') } - if(this.formData.fileList.length) { - this.formData.file = this.formData.fileList[0] - this.formData.accessUrl = this.formData.fileList[0].url - this.formData.mediaId = this.fileData.media.mediaId + this.formData.fileList = [] + var contentFile = { + content: this.form.content, + contentType: 'text' + } + // if(this.formData.fileList.length) { + // this.formData.file = this.formData.fileList[0] + // this.formData.accessUrl = this.formData.fileList[0].url + // this.formData.mediaId = this.fileData.media.mediaId + // } + this.formData.fileList.push(contentFile) + if(this.formData.fileListImg.length) { + var info = { + contentType: 'image', + mediaId: this.fileDataImg.media.mediaId, + accessUrl: this.formData.fileListImg[0].url + } + this.formData.fileList.push(info) + } + if(this.formData.fileListVideo.length) { + var info = { + contentType: 'video', + mediaId: this.fileDataVideo.media.mediaId, + accessUrl: this.formData.fileListVideo[0].url + } + this.formData.fileList.push(info) + } + if(this.formData.fileListFile.length) { + var info = { + contentType: 'file', + mediaId: this.fileDataFile.media.mediaId, + accessUrl: this.formData.fileListFile[0].url + } + this.formData.fileList.push(info) } var params = { ...this.form, @@ -241,9 +276,9 @@ export default { for(let key in this.formData) { this.formData[key] = '' } - this.formData.imgList = [] - this.formData.fileList = [] - this.formData.file = {} + this.formData.fileListImg = [] + this.formData.fileListVideo = [] + this.formData.fileListFile = [] }, back() { uni.navigateBack()