diff --git a/src/apps/AppMessageNotification/AppMessageNotification.vue b/src/apps/AppMessageNotification/AppMessageNotification.vue
index 3a4b271b..f3588bcf 100644
--- a/src/apps/AppMessageNotification/AppMessageNotification.vue
+++ b/src/apps/AppMessageNotification/AppMessageNotification.vue
@@ -9,7 +9,7 @@
-
+
{{ form.content.length }}/1000
+
@@ -81,7 +81,7 @@ export default {
data() {
return {
typeList: [
- {name: '居民群', type: '0'},
+ {name: '居民群', type: '0'},
{name: '居民', type: '1'}
],
form: {
@@ -124,7 +124,7 @@ export default {
uni.setStorageSync('sendType', e)
this.deptUserTagList = []
this.deptUserList = []
- },
+ },
toSelect() {
uni.navigateTo({url: `./SelectUser?tagIdList=${this.tagIdList}&areaList=${this.areaIdList}`})
},
@@ -140,10 +140,10 @@ export default {
},
confirm() {
this.$loading()
- if(!this.deptUserTagList.length) {
+ if (!this.deptUserTagList.length) {
return this.$u.toast('请选择部门')
}
- if(!this.form.content) {
+ if (!this.form.content) {
return this.$u.toast('请输入文本内容')
}
@@ -152,22 +152,21 @@ export default {
let {kind, id, tagIdList} = e
console.log([result[e.corpId], {kind, id}].flat())
result[e.corpId] = [result[e.corpId], {kind, id}].flat()
+ tagIdList = tagIdList.map(e => e.id).filter(e => !!e)
if (tagIdList) {
- tags[e.corpId] = [tags[e.corpId], {tagIdList}].flat()
+ tags[e.corpId] = [...new Set([tags[e.corpId], tagIdList].flat())]
}
})
-
console.log(result, tags)
-
var deptList = Object.keys(result).map(corpId => {
let res
if (result[corpId]) {
res = {
corpId,
- objList: result[corpId]
+ objList: result[corpId].filter(e => !!e)
}
- if (tags[corpId]?.tagIdList) {
- res.tagId = tags[corpId]?.tagIdList
+ if (tags[corpId]?.length > 0) {
+ res.tagId = tags[corpId]
}
}
return res
@@ -186,7 +185,7 @@ export default {
// this.formData.mediaId = this.fileData.media.mediaId
// }
this.formData.fileList.push(contentFile)
- if(this.formData.fileListImg.length) {
+ if (this.formData.fileListImg.length) {
var info = {
contentType: 'image',
mediaId: this.fileDataImg.media.mediaId,
@@ -194,7 +193,7 @@ export default {
}
this.formData.fileList.push(info)
}
- if(this.formData.fileListVideo.length) {
+ if (this.formData.fileListVideo.length) {
var info = {
contentType: 'video',
mediaId: this.fileDataVideo.media.mediaId,
@@ -202,7 +201,7 @@ export default {
}
this.formData.fileList.push(info)
}
- if(this.formData.fileListFile.length) {
+ if (this.formData.fileListFile.length) {
var info = {
contentType: 'file',
mediaId: this.fileDataFile.media.mediaId,
@@ -211,7 +210,7 @@ export default {
this.formData.fileList.push(info)
}
var params = {
- ...this.form,
+ ...this.form,
...this.formData,
areaId: this.areaIdList.join(','),
deptList: deptList,
@@ -223,7 +222,7 @@ export default {
setTimeout(() => {
uni.navigateBack()
}, 500)
- }else {
+ } else {
this.$u.toast(res.msg)
}
}).catch((err) => {
@@ -252,28 +251,34 @@ export default {
.AppMessageNotification {
height: 100%;
background-color: #f3f6f9;
- .fw500{
+
+ .fw500 {
font-weight: 500;
- font-size: 32px!important;
+ font-size: 32px !important;
}
- .color-666{
+
+ .color-666 {
color: #666;
font-size: 30px;
}
- .tips{
+
+ .tips {
font-size: 34px;
- color: #f46!important;
+ color: #f46 !important;
vertical-align: middle;
}
- .mar-b32{
+
+ .mar-b32 {
margin-bottom: 32px;
}
- .header{
+
+ .header {
// background-color: #fff;
padding: 32px 32px 20px 32px;
box-sizing: border-box;
margin-bottom: 16px;
- p{
+
+ p {
line-height: 44px;
margin-bottom: 8px;
word-break: break-all;
@@ -281,58 +286,71 @@ export default {
color: #666;
}
}
- .select-user{
+
+ .select-user {
background-color: #fff;
padding: 34px 32px;
display: flex;
justify-content: space-between;
margin-bottom: 16px;
font-size: 30px;
- img{
+
+ img {
width: 44px;
height: 44px;
vertical-align: middle;
}
- .color-999{
+
+ .color-999 {
color: #999;
}
- .color-1365DD{
+
+ .color-1365DD {
color: #1365DD;
}
- .label{
+
+ .label {
width: 160px;
}
- .right{
+
+ .right {
width: calc(100% - 160px);
text-align: right;
}
}
- .pad-lr0{
+
+ .pad-lr0 {
padding: 0;
margin-bottom: 32px;
}
- .content{
+
+ .content {
padding: 32px;
box-sizing: border-box;
background-color: #fff;
- .title{
+
+ .title {
line-height: 44px;
margin-bottom: 24px;
}
- .mini-title{
+
+ .mini-title {
line-height: 44px;
margin-bottom: 24px;
}
- .textarea{
+
+ .textarea {
padding: 16px 32px;
box-sizing: border-box;
border: 1px solid #ddd;
+
.hint {
padding: 4px 0 8px 0;
text-align: right;
color: #999;
}
}
+
// .upload{
// padding: 16px 32px;
// line-height: 44px;
@@ -342,16 +360,19 @@ export default {
// margin-right: 8px;
// }
// }
- .type{
+ .type {
margin-top: 32px;
- p{
+
+ p {
display: inline-block;
margin-right: 16px;
}
}
- .type-content{
+
+ .type-content {
margin-top: 32px;
- .label{
+
+ .label {
display: inline-block;
margin-right: 16px;
vertical-align: top;
@@ -359,31 +380,38 @@ export default {
color: #666;
width: 130px;
}
- .value{
+
+ .value {
width: calc(100% - 130px);
}
- .ai-uploader{
+
+ .ai-uploader {
display: inline-block;
width: calc(100% - 130px);
}
- .flex{
+
+ .flex {
padding: 34px 0;
line-height: 44px;
display: flex;
}
- .border-b{
+
+ .border-b {
border-bottom: 1px solid #ddd;
}
- .flex-label{
- .label{
+
+ .flex-label {
+ .label {
width: 260px;
}
}
}
}
- .bg-144{
+
+ .bg-144 {
height: 144px;
}
+
.footer {
position: fixed;
bottom: 0;
@@ -395,25 +423,30 @@ export default {
display: flex;
font-size: 36px;
font-family: PingFangSC-Regular, PingFang SC;
+
.confirm {
color: #fff;
background: #1365dd;
}
+
div {
flex: 1;
text-align: center;
color: #333;
}
}
- .popup{
+
+ .popup {
padding-top: 32px;
background-color: #f3f6f9;
- .item{
+
+ .item {
display: inline-block;
width: 25%;
text-align: center;
padding: 32px 0;
- .icon-bg{
+
+ .icon-bg {
width: 100px;
height: 100px;
line-height: 100px;
@@ -422,11 +455,13 @@ export default {
margin: 0 auto;
border-radius: 8px;
margin-bottom: 16px;
- .u-icon{
+
+ .u-icon {
margin-top: 20px;
}
}
- p{
+
+ p {
line-height: 44px;
font-size: 30px;
font-weight: 500;
@@ -434,6 +469,6 @@ export default {
}
}
}
-
+
}