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() 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('请输入身份证号') }