diff --git a/package.json b/package.json index cc84ed7..4364ef0 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "Apache-2.0", "scripts": { "dev": "vue-cli-service serve", - "build:prod": "vue-cli-service build", + "build:prod": "vue-cli-service build && sh ./build/deploy.sh", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", "lint": "eslint --ext .js,.vue src", diff --git a/src/views/adviser/manage/components/auditAdviser.vue b/src/views/adviser/manage/components/auditAdviser.vue index 82f4a00..66af1d7 100644 --- a/src/views/adviser/manage/components/auditAdviser.vue +++ b/src/views/adviser/manage/components/auditAdviser.vue @@ -19,7 +19,7 @@ {{ form.staffNo }} - + {{ form.upId }} @@ -38,7 +38,7 @@ {{ form.showName }} - {{ form.sex === 1 ? '男' : '女' }} + {{ form.sex === 1 ? "男" : "女" }} @@ -55,7 +55,8 @@ v-for="tag in form.tagList" :key="tag.id" style="margin-right: 10px" - >{{ tag.name }} + >{{ tag.name }} @@ -80,7 +81,8 @@ :loading="loading" type="primary" @click="doSubmit" - >提交 + >提交 取消 @@ -88,26 +90,26 @@ - + diff --git a/src/views/adviser/manage/components/checkAdviser.vue b/src/views/adviser/manage/components/checkAdviser.vue index ab2d6c1..1047939 100644 --- a/src/views/adviser/manage/components/checkAdviser.vue +++ b/src/views/adviser/manage/components/checkAdviser.vue @@ -19,7 +19,7 @@ {{ form.staffNo }} - + {{ form.upId }} @@ -38,7 +38,7 @@ {{ form.showName }} - {{ form.sex === 1 ? '男' : '女'}} + {{ form.sex === 1 ? "男" : "女" }} @@ -67,26 +67,26 @@ - + diff --git a/src/views/adviser/manage/components/updateAdviser.vue b/src/views/adviser/manage/components/updateAdviser.vue index accab19..0730333 100644 --- a/src/views/adviser/manage/components/updateAdviser.vue +++ b/src/views/adviser/manage/components/updateAdviser.vue @@ -20,7 +20,7 @@ {{ form.staffNo }} - + {{ form.upId }} diff --git a/src/views/adviser/manage/index.vue b/src/views/adviser/manage/index.vue index 69493b8..3384dd9 100644 --- a/src/views/adviser/manage/index.vue +++ b/src/views/adviser/manage/index.vue @@ -57,7 +57,7 @@ { + item.isForbidden = value.isForbidden; + }); + } } }, methods: { @@ -158,6 +181,11 @@ export default { this.list = this.list.concat(ret.data.list); retList.forEach(msg => { this.msgIdsObj[msg.id] = msg; + if (this.msgUserIdsObj[msg.userId]) { + this.msgUserIdsObj[msg.userId].push(msg); + } else { + this.msgUserIdsObj[msg.userId] = [msg]; + } }); this.hasNext = ret.data.hasNext; } @@ -168,6 +196,7 @@ export default { this.keyword = keyword; this.list = []; this.msgIdsObj = {}; + this.msgUserIdsObj = {}; this.getMessageList(); } }, @@ -199,6 +228,11 @@ export default { type: "success" }); item.status = item.status === 1 ? 2 : 1; + this.$emit("modifyStateCallback", { + msgId: item.id, + status: item.status, + modifyType: 1 + }); } } } diff --git a/src/views/circle/detail/components/userList.vue b/src/views/circle/detail/components/userList.vue index bcab336..9555923 100644 --- a/src/views/circle/detail/components/userList.vue +++ b/src/views/circle/detail/components/userList.vue @@ -66,6 +66,10 @@ export default { type: { type: Number, default: 1 // 1:用户列表 2:禁言列表 + }, + modifyStateObj: { + // 修改了状态的对象 + type: Object } }, data() { @@ -80,6 +84,13 @@ export default { groupId() { this.userName = ""; this.searchMsg(); + }, + modifyStateObj(value) { + debugger; + if (value.modifyType === 2 && value.isForbidden === 2) { + this.list = this.list.filter(citem => value.userId !== citem.phone); + !this.list.lenght && this.searchMsg(); + } } }, methods: { @@ -105,7 +116,15 @@ export default { showClose: false, type: "success" }); - this.searchMsg(); + this.list = this.list.filter( + citem => item.phone !== citem.phone + ); + !this.list.lenght && this.searchMsg(); + this.$emit("modifyStateCallback", { + userId: item.phone, + isForbidden: 2, + modifyType: 2 + }); } }); }) diff --git a/src/views/circle/detail/components/userLnteractList.vue b/src/views/circle/detail/components/userLnteractList.vue index e496867..a68309c 100644 --- a/src/views/circle/detail/components/userLnteractList.vue +++ b/src/views/circle/detail/components/userLnteractList.vue @@ -67,7 +67,7 @@ :product-type="41" :product-id="groupId" :scope="2" - @callback="callback" + @callback="forbidSpeakCallback" /> @@ -83,6 +83,10 @@ export default { }, newMsg: { type: Object + }, + modifyStateObj: { + // 修改了状态的对象 + type: Object } }, data() { @@ -97,8 +101,7 @@ export default { assistant: require("@/assets/images/defaultAvatar/assistant.png") }, msgIdsObj: {}, // 以消息id为key - msgUserIdsObj: {}, // 以发送消息的userId为key - optUserObj: {} + msgUserIdsObj: {} // 以发送消息的userId为key }; }, computed: { @@ -125,6 +128,16 @@ export default { } else if (msg.userType === 2 && this.msgIdsObj[msg.id]) { Object.assign(this.msgIdsObj[msg.id], msg); } + }, + modifyStateObj(value) { + // modifyType: 1审核通过 2禁言操作 + if (value.modifyType === 1 && this.msgIdsObj[value.msgId]) { + this.msgIdsObj[value.msgId].status = value.status; + } else if (value.modifyType === 2 && this.msgUserIdsObj[value.userId]) { + this.msgUserIdsObj[value.userId].forEach(item => { + item.isForbidden = value.isForbidden; + }); + } } }, methods: { @@ -191,6 +204,11 @@ export default { this.msgUserIdsObj[item.userId].forEach(item => { item.isForbidden = 2; }); + this.modifyStateCallback({ + userId: item.userId, + isForbidden: 2, + modifyType: 2 + }); } }); }) @@ -203,10 +221,15 @@ export default { forbidSpeakRef.formProhibition.content = item.content; } }, - callback(userId) { + forbidSpeakCallback(userId) { this.msgUserIdsObj[userId].forEach(item => { item.isForbidden = 1; }); + this.modifyStateCallback({ + userId: item.userId, + isForbidden: 1, + modifyType: 2 + }); }, async updateMessageStatus(item) { const ret = await updateMessageStatus({ @@ -220,7 +243,15 @@ export default { type: "success" }); item.status = item.status === 1 ? 2 : 1; + this.modifyStateCallback({ + msgId: item.id, + status: item.status, + modifyType: 1 + }); } + }, + modifyStateCallback(item) { + this.$emit("modifyStateCallback", item); } } }; diff --git a/src/views/circle/detail/index.vue b/src/views/circle/detail/index.vue index 1b45914..3c9b482 100644 --- a/src/views/circle/detail/index.vue +++ b/src/views/circle/detail/index.vue @@ -32,14 +32,15 @@ type="primary" :disabled="changeGroupId === detail.id" @click="changeCircle" - >切换 + >切换 - + {{ detail.name }} {{ detail.remark }} @@ -91,13 +92,13 @@ src="@/assets/images/trumpet.png" alt="" @click="setNotice" - > + /> + /> @@ -129,7 +130,9 @@ :group-id="detail.id" :type="item.id" :new-msg="newMsg" + :modifyStateObj="modifyStateObj" @setReplyMsg="setReplyMsg" + @modifyStateCallback="modifyStateCallback" /> @@ -202,7 +210,7 @@ {{ replyMsg.content }} [图片] - + { + .then(async ({ value }) => { const ret = await setNotice({ id: this.detail.id, notice: value @@ -382,13 +391,16 @@ export default { } }, setReplyMsg(msg) { - debugger; this.replyMsg = msg; }, changeCircle() { this.$router.replace(`/circle/detail?id=${this.changeGroupId}`); this.msgKeyWord = ""; this.getCircleDetail(); + }, + modifyStateCallback(obj) { + // modifyType: 1审核通过 2禁言操作 + this.modifyStateObj = obj; } } }; diff --git a/src/views/system/user/center.vue b/src/views/system/user/center.vue index d9c4747..644491d 100644 --- a/src/views/system/user/center.vue +++ b/src/views/system/user/center.vue @@ -18,7 +18,7 @@ {{ form.staffNo }} - + {{ form.upId }} @@ -191,9 +191,9 @@ - + + +
{{ detail.remark }}
{{ replyMsg.content }}
[图片]