fix: bug修复
This commit is contained in:
parent
30edf8135a
commit
8b791d244f
@ -6,7 +6,7 @@
|
|||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"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",
|
"build:stage": "vue-cli-service build --mode staging",
|
||||||
"preview": "node build/index.js --preview",
|
"preview": "node build/index.js --preview",
|
||||||
"lint": "eslint --ext .js,.vue src",
|
"lint": "eslint --ext .js,.vue src",
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<el-form-item label="登陆账号" prop="staffNo">
|
<el-form-item label="登陆账号" prop="staffNo">
|
||||||
<div>{{ form.staffNo }}</div>
|
<div>{{ form.staffNo }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="员工Up号" prop="staffNo">
|
<el-form-item label="员工号" prop="staffNo">
|
||||||
<div>{{ form.upId }}</div>
|
<div>{{ form.upId }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="姓名" prop="name">
|
<el-form-item label="姓名" prop="name">
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<div>{{ form.showName }}</div>
|
<div>{{ form.showName }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="true" label="性别" prop="sex">
|
<el-form-item v-if="true" label="性别" prop="sex">
|
||||||
<div>{{ form.sex === 1 ? '男' : '女' }}</div>
|
<div>{{ form.sex === 1 ? "男" : "女" }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="展示头像">
|
<el-form-item label="展示头像">
|
||||||
<img :src="form.avatar" width="70" height="70" />
|
<img :src="form.avatar" width="70" height="70" />
|
||||||
@ -55,7 +55,8 @@
|
|||||||
v-for="tag in form.tagList"
|
v-for="tag in form.tagList"
|
||||||
:key="tag.id"
|
:key="tag.id"
|
||||||
style="margin-right: 10px"
|
style="margin-right: 10px"
|
||||||
>{{ tag.name }}</el-tag>
|
>{{ tag.name }}</el-tag
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核结果" prop="reason">
|
<el-form-item label="审核结果" prop="reason">
|
||||||
<el-radio-group v-model="form.result" style="width: 178px">
|
<el-radio-group v-model="form.result" style="width: 178px">
|
||||||
@ -80,7 +81,8 @@
|
|||||||
:loading="loading"
|
:loading="loading"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="doSubmit"
|
@click="doSubmit"
|
||||||
>提交</el-button>
|
>提交</el-button
|
||||||
|
>
|
||||||
<el-button size="mini" @click="cancel">取消</el-button>
|
<el-button size="mini" @click="cancel">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -88,26 +90,26 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { updateTgStatus, getTgInfo } from '@/api/adviser.js'
|
import { updateTgStatus, getTgInfo } from "@/api/adviser.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
dialog: false,
|
dialog: false,
|
||||||
title: '投顾审核',
|
title: "投顾审核",
|
||||||
result: 0,
|
result: 0,
|
||||||
reason: '',
|
reason: "",
|
||||||
form: {
|
form: {
|
||||||
username: '',
|
username: "",
|
||||||
name: '',
|
name: "",
|
||||||
type: '',
|
type: "",
|
||||||
profile: '',
|
profile: "",
|
||||||
sex: '',
|
sex: "",
|
||||||
tags: [],
|
tags: [],
|
||||||
license: '',
|
license: "",
|
||||||
result: null,
|
result: null,
|
||||||
rules: ''
|
rules: ""
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
// reason: [
|
// reason: [
|
||||||
@ -120,12 +122,12 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
dialog(newName) {
|
dialog(newName) {
|
||||||
if (newName) {
|
if (newName) {
|
||||||
this.getInfo()
|
this.getInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -134,74 +136,76 @@ export default {
|
|||||||
async getInfo() {
|
async getInfo() {
|
||||||
const data = await getTgInfo({
|
const data = await getTgInfo({
|
||||||
id: this.form.id
|
id: this.form.id
|
||||||
})
|
});
|
||||||
if (data.code === 0) {
|
if (data.code === 0) {
|
||||||
this.form = data.data
|
this.form = data.data;
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(data.message)
|
this.$message.error(data.message);
|
||||||
}
|
}
|
||||||
console.log(this.form)
|
console.log(this.form);
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.resetForm()
|
this.resetForm();
|
||||||
},
|
},
|
||||||
async doSubmit() {
|
async doSubmit() {
|
||||||
if (!this.form.result) {
|
if (!this.form.result) {
|
||||||
return this.$message.error('请选择结果')
|
return this.$message.error("请选择结果");
|
||||||
}
|
}
|
||||||
if (this.form.result === 4 && !this.reason) {
|
if (this.form.result === 4 && !this.reason) {
|
||||||
return this.$message.error('请输入驳回理由')
|
return this.$message.error("请输入驳回理由");
|
||||||
} else if (this.form.result === 4 && (this.reason.length < 3 || this.reason.length > 200)) {
|
} else if (
|
||||||
return this.$message.error('驳回理由长度在 3 到 200 个字符')
|
this.form.result === 4 &&
|
||||||
|
(this.reason.length < 3 || this.reason.length > 200)
|
||||||
|
) {
|
||||||
|
return this.$message.error("驳回理由长度在 3 到 200 个字符");
|
||||||
}
|
}
|
||||||
const params = {
|
const params = {
|
||||||
id: this.form.id
|
id: this.form.id
|
||||||
}
|
};
|
||||||
// 通过101:提交 103:通过 104:驳回 105:上架 106:下架
|
// 通过101:提交 103:通过 104:驳回 105:上架 106:下架
|
||||||
if (this.form.result === 3) {
|
if (this.form.result === 3) {
|
||||||
params.event = 103
|
params.event = 103;
|
||||||
} else {
|
} else {
|
||||||
// 驳回
|
// 驳回
|
||||||
params.event = 104
|
params.event = 104;
|
||||||
params.reason = this.reason
|
params.reason = this.reason;
|
||||||
}
|
}
|
||||||
const { code, message } = await updateTgStatus(params)
|
const { code, message } = await updateTgStatus(params);
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
this.dialog = false
|
this.dialog = false;
|
||||||
this.resetForm()
|
this.resetForm();
|
||||||
this.$message.success('修改成功')
|
this.$message.success("修改成功");
|
||||||
this.$parent.getTgInfoList()
|
this.$parent.getTgInfoList();
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(message)
|
this.$message.error(message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.dialog = false
|
this.dialog = false;
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
name: '',
|
name: "",
|
||||||
profile: '',
|
profile: "",
|
||||||
sex: '',
|
sex: "",
|
||||||
tagList: [],
|
tagList: [],
|
||||||
license: '',
|
license: "",
|
||||||
userName: '',
|
userName: "",
|
||||||
userNo: '',
|
userNo: "",
|
||||||
showName: '',
|
showName: "",
|
||||||
deptName: ''
|
deptName: ""
|
||||||
}
|
};
|
||||||
this.reason = ''
|
this.reason = "";
|
||||||
},
|
},
|
||||||
// 分页器
|
// 分页器
|
||||||
sizeChange(e) {
|
sizeChange(e) {
|
||||||
this.page = 0
|
this.page = 0;
|
||||||
this.size = e
|
this.size = e;
|
||||||
},
|
},
|
||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
this.page = e - 1
|
this.page = e - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped></style>
|
||||||
</style>
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<el-form-item label="登陆账号" prop="staffNo">
|
<el-form-item label="登陆账号" prop="staffNo">
|
||||||
<div>{{ form.staffNo }}</div>
|
<div>{{ form.staffNo }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="员工Up号" prop="staffNo">
|
<el-form-item label="员工号" prop="staffNo">
|
||||||
<div>{{ form.upId }}</div>
|
<div>{{ form.upId }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="姓名" prop="name">
|
<el-form-item label="姓名" prop="name">
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<div>{{ form.showName }}</div>
|
<div>{{ form.showName }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="性别" prop="sex" v-if="true">
|
<el-form-item label="性别" prop="sex" v-if="true">
|
||||||
<div>{{ form.sex === 1 ? '男' : '女'}}</div>
|
<div>{{ form.sex === 1 ? "男" : "女" }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="展示头像">
|
<el-form-item label="展示头像">
|
||||||
<img :src="form.avatar" width="70" height="70" />
|
<img :src="form.avatar" width="70" height="70" />
|
||||||
@ -67,26 +67,26 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTgInfo } from '@/api/adviser.js'
|
import { getTgInfo } from "@/api/adviser.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
dialog: false,
|
dialog: false,
|
||||||
title: '查看投顾',
|
title: "查看投顾",
|
||||||
result: 0,
|
result: 0,
|
||||||
reason: '',
|
reason: "",
|
||||||
form: {
|
form: {
|
||||||
username: '',
|
username: "",
|
||||||
name: '',
|
name: "",
|
||||||
type: '',
|
type: "",
|
||||||
profile: '',
|
profile: "",
|
||||||
sex: '',
|
sex: "",
|
||||||
tags: [],
|
tags: [],
|
||||||
license: '',
|
license: "",
|
||||||
result: null,
|
result: null,
|
||||||
rules: ''
|
rules: ""
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
// reason: [
|
// reason: [
|
||||||
@ -99,12 +99,12 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
dialog(newName) {
|
dialog(newName) {
|
||||||
if (newName) {
|
if (newName) {
|
||||||
this.getInfo()
|
this.getInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -113,42 +113,41 @@ export default {
|
|||||||
async getInfo() {
|
async getInfo() {
|
||||||
const data = await getTgInfo({
|
const data = await getTgInfo({
|
||||||
id: this.form.id
|
id: this.form.id
|
||||||
})
|
});
|
||||||
if (data.code === 0) {
|
if (data.code === 0) {
|
||||||
this.form = data.data
|
this.form = data.data;
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(data.message)
|
this.$message.error(data.message);
|
||||||
}
|
}
|
||||||
console.log(this.form)
|
console.log(this.form);
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.resetForm()
|
this.resetForm();
|
||||||
},
|
},
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.dialog = false
|
this.dialog = false;
|
||||||
this.form = {
|
this.form = {
|
||||||
name: '',
|
name: "",
|
||||||
profile: '',
|
profile: "",
|
||||||
sex: '',
|
sex: "",
|
||||||
tagList: [],
|
tagList: [],
|
||||||
license: '',
|
license: "",
|
||||||
userName: '',
|
userName: "",
|
||||||
userNo: '',
|
userNo: "",
|
||||||
showName: '',
|
showName: "",
|
||||||
deptName: ''
|
deptName: ""
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
// 分页器
|
// 分页器
|
||||||
sizeChange(e) {
|
sizeChange(e) {
|
||||||
this.page = 0
|
this.page = 0;
|
||||||
this.size = e
|
this.size = e;
|
||||||
},
|
},
|
||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
this.page = e - 1
|
this.page = e - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped></style>
|
||||||
</style>
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<el-form-item label="登陆账号" prop="staffNo">
|
<el-form-item label="登陆账号" prop="staffNo">
|
||||||
<div>{{ form.staffNo }}</div>
|
<div>{{ form.staffNo }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="员工Up号" prop="staffNo">
|
<el-form-item label="员工号" prop="staffNo">
|
||||||
<div>{{ form.upId }}</div>
|
<div>{{ form.upId }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="姓名" prop="name">
|
<el-form-item label="姓名" prop="name">
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
prop="upId"
|
prop="upId"
|
||||||
align="center"
|
align="center"
|
||||||
label="员工Up号"
|
label="员工号"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|||||||
@ -86,12 +86,17 @@ export default {
|
|||||||
privateNewMsg: {
|
privateNewMsg: {
|
||||||
// 新的私聊消息
|
// 新的私聊消息
|
||||||
type: Object
|
type: Object
|
||||||
|
},
|
||||||
|
modifyStateObj: {
|
||||||
|
// 修改了状态的对象
|
||||||
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
keyword: "",
|
keyword: "",
|
||||||
msgIdsObj: {},
|
msgIdsObj: {},
|
||||||
|
msgUserIdsObj: {}, // 以发送消息的userId为key
|
||||||
list: [],
|
list: [],
|
||||||
loading: true,
|
loading: true,
|
||||||
hasNext: true,
|
hasNext: true,
|
||||||
@ -119,8 +124,16 @@ export default {
|
|||||||
(this.type === 2 && msg.userType === 1) ||
|
(this.type === 2 && msg.userType === 1) ||
|
||||||
(this.type === 4 && msg.isRecommend === 1)
|
(this.type === 4 && msg.isRecommend === 1)
|
||||||
) {
|
) {
|
||||||
|
// this.type === 4 && msg.isRecommend === 1 精选
|
||||||
|
// this.type === 2 && msg.userType === 1 用户互动
|
||||||
|
// this.type === 1 全部
|
||||||
this.list.unshift(msg);
|
this.list.unshift(msg);
|
||||||
this.msgIdsObj[msg.id] = msg;
|
this.msgIdsObj[msg.id] = msg;
|
||||||
|
if (this.msgUserIdsObj[msg.userId]) {
|
||||||
|
this.msgUserIdsObj[msg.userId].push(msg);
|
||||||
|
} else {
|
||||||
|
this.msgUserIdsObj[msg.userId] = [msg];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
privateNewMsg(msg) {
|
privateNewMsg(msg) {
|
||||||
@ -135,6 +148,16 @@ export default {
|
|||||||
if (value) {
|
if (value) {
|
||||||
this.searchMsg("");
|
this.searchMsg("");
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
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: {
|
methods: {
|
||||||
@ -158,6 +181,11 @@ export default {
|
|||||||
this.list = this.list.concat(ret.data.list);
|
this.list = this.list.concat(ret.data.list);
|
||||||
retList.forEach(msg => {
|
retList.forEach(msg => {
|
||||||
this.msgIdsObj[msg.id] = 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;
|
this.hasNext = ret.data.hasNext;
|
||||||
}
|
}
|
||||||
@ -168,6 +196,7 @@ export default {
|
|||||||
this.keyword = keyword;
|
this.keyword = keyword;
|
||||||
this.list = [];
|
this.list = [];
|
||||||
this.msgIdsObj = {};
|
this.msgIdsObj = {};
|
||||||
|
this.msgUserIdsObj = {};
|
||||||
this.getMessageList();
|
this.getMessageList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -199,6 +228,11 @@ export default {
|
|||||||
type: "success"
|
type: "success"
|
||||||
});
|
});
|
||||||
item.status = item.status === 1 ? 2 : 1;
|
item.status = item.status === 1 ? 2 : 1;
|
||||||
|
this.$emit("modifyStateCallback", {
|
||||||
|
msgId: item.id,
|
||||||
|
status: item.status,
|
||||||
|
modifyType: 1
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,6 +66,10 @@ export default {
|
|||||||
type: {
|
type: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 1 // 1:用户列表 2:禁言列表
|
default: 1 // 1:用户列表 2:禁言列表
|
||||||
|
},
|
||||||
|
modifyStateObj: {
|
||||||
|
// 修改了状态的对象
|
||||||
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -80,6 +84,13 @@ export default {
|
|||||||
groupId() {
|
groupId() {
|
||||||
this.userName = "";
|
this.userName = "";
|
||||||
this.searchMsg();
|
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: {
|
methods: {
|
||||||
@ -105,7 +116,15 @@ export default {
|
|||||||
showClose: false,
|
showClose: false,
|
||||||
type: "success"
|
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
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
:product-type="41"
|
:product-type="41"
|
||||||
:product-id="groupId"
|
:product-id="groupId"
|
||||||
:scope="2"
|
:scope="2"
|
||||||
@callback="callback"
|
@callback="forbidSpeakCallback"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -83,6 +83,10 @@ export default {
|
|||||||
},
|
},
|
||||||
newMsg: {
|
newMsg: {
|
||||||
type: Object
|
type: Object
|
||||||
|
},
|
||||||
|
modifyStateObj: {
|
||||||
|
// 修改了状态的对象
|
||||||
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -97,8 +101,7 @@ export default {
|
|||||||
assistant: require("@/assets/images/defaultAvatar/assistant.png")
|
assistant: require("@/assets/images/defaultAvatar/assistant.png")
|
||||||
},
|
},
|
||||||
msgIdsObj: {}, // 以消息id为key
|
msgIdsObj: {}, // 以消息id为key
|
||||||
msgUserIdsObj: {}, // 以发送消息的userId为key
|
msgUserIdsObj: {} // 以发送消息的userId为key
|
||||||
optUserObj: {}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -125,6 +128,16 @@ export default {
|
|||||||
} else if (msg.userType === 2 && this.msgIdsObj[msg.id]) {
|
} else if (msg.userType === 2 && this.msgIdsObj[msg.id]) {
|
||||||
Object.assign(this.msgIdsObj[msg.id], msg);
|
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: {
|
methods: {
|
||||||
@ -191,6 +204,11 @@ export default {
|
|||||||
this.msgUserIdsObj[item.userId].forEach(item => {
|
this.msgUserIdsObj[item.userId].forEach(item => {
|
||||||
item.isForbidden = 2;
|
item.isForbidden = 2;
|
||||||
});
|
});
|
||||||
|
this.modifyStateCallback({
|
||||||
|
userId: item.userId,
|
||||||
|
isForbidden: 2,
|
||||||
|
modifyType: 2
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@ -203,10 +221,15 @@ export default {
|
|||||||
forbidSpeakRef.formProhibition.content = item.content;
|
forbidSpeakRef.formProhibition.content = item.content;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
callback(userId) {
|
forbidSpeakCallback(userId) {
|
||||||
this.msgUserIdsObj[userId].forEach(item => {
|
this.msgUserIdsObj[userId].forEach(item => {
|
||||||
item.isForbidden = 1;
|
item.isForbidden = 1;
|
||||||
});
|
});
|
||||||
|
this.modifyStateCallback({
|
||||||
|
userId: item.userId,
|
||||||
|
isForbidden: 1,
|
||||||
|
modifyType: 2
|
||||||
|
});
|
||||||
},
|
},
|
||||||
async updateMessageStatus(item) {
|
async updateMessageStatus(item) {
|
||||||
const ret = await updateMessageStatus({
|
const ret = await updateMessageStatus({
|
||||||
@ -220,7 +243,15 @@ export default {
|
|||||||
type: "success"
|
type: "success"
|
||||||
});
|
});
|
||||||
item.status = item.status === 1 ? 2 : 1;
|
item.status = item.status === 1 ? 2 : 1;
|
||||||
|
this.modifyStateCallback({
|
||||||
|
msgId: item.id,
|
||||||
|
status: item.status,
|
||||||
|
modifyType: 1
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
modifyStateCallback(item) {
|
||||||
|
this.$emit("modifyStateCallback", item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -32,14 +32,15 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
:disabled="changeGroupId === detail.id"
|
:disabled="changeGroupId === detail.id"
|
||||||
@click="changeCircle"
|
@click="changeCircle"
|
||||||
>切换</el-button>
|
>切换</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="circle-main">
|
<div class="circle-main">
|
||||||
<div class="circle-main-header">
|
<div class="circle-main-header">
|
||||||
<div class="circle-info">
|
<div class="circle-info">
|
||||||
<img :src="detail.coverImage" alt="">
|
<img :src="detail.coverImage" alt="" />
|
||||||
<div>
|
<div>
|
||||||
<h4>{{ detail.name }}</h4>
|
<h4>{{ detail.name }}</h4>
|
||||||
<p>{{ detail.remark }}</p>
|
<p>{{ detail.remark }}</p>
|
||||||
@ -91,13 +92,13 @@
|
|||||||
src="@/assets/images/trumpet.png"
|
src="@/assets/images/trumpet.png"
|
||||||
alt=""
|
alt=""
|
||||||
@click="setNotice"
|
@click="setNotice"
|
||||||
>
|
/>
|
||||||
<img
|
<img
|
||||||
class="icon"
|
class="icon"
|
||||||
src="@/assets/images/data.png"
|
src="@/assets/images/data.png"
|
||||||
alt=""
|
alt=""
|
||||||
@click="$router.push('/circle/data')"
|
@click="$router.push('/circle/data')"
|
||||||
>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="circle-content">
|
<div class="circle-content">
|
||||||
@ -129,7 +130,9 @@
|
|||||||
:group-id="detail.id"
|
:group-id="detail.id"
|
||||||
:type="item.id"
|
:type="item.id"
|
||||||
:new-msg="newMsg"
|
:new-msg="newMsg"
|
||||||
|
:modifyStateObj="modifyStateObj"
|
||||||
@setReplyMsg="setReplyMsg"
|
@setReplyMsg="setReplyMsg"
|
||||||
|
@modifyStateCallback="modifyStateCallback"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<privateChat
|
<privateChat
|
||||||
@ -171,8 +174,10 @@
|
|||||||
v-show="userTabIndex === 0"
|
v-show="userTabIndex === 0"
|
||||||
:group-id="detail.id"
|
:group-id="detail.id"
|
||||||
:new-msg="newMsg"
|
:new-msg="newMsg"
|
||||||
|
:modifyStateObj="modifyStateObj"
|
||||||
@setReplyMsg="setReplyMsg"
|
@setReplyMsg="setReplyMsg"
|
||||||
@toPrivateChat="toPrivateChat"
|
@toPrivateChat="toPrivateChat"
|
||||||
|
@modifyStateCallback="modifyStateCallback"
|
||||||
/>
|
/>
|
||||||
<userList
|
<userList
|
||||||
v-show="userTabIndex === 1"
|
v-show="userTabIndex === 1"
|
||||||
@ -180,6 +185,7 @@
|
|||||||
:group-id="detail.id"
|
:group-id="detail.id"
|
||||||
:type="1"
|
:type="1"
|
||||||
@toPrivateChat="toPrivateChat"
|
@toPrivateChat="toPrivateChat"
|
||||||
|
@modifyStateCallback="modifyStateCallback"
|
||||||
/>
|
/>
|
||||||
<privateList
|
<privateList
|
||||||
v-show="userTabIndex === 2"
|
v-show="userTabIndex === 2"
|
||||||
@ -192,6 +198,8 @@
|
|||||||
:key="2"
|
:key="2"
|
||||||
:group-id="detail.id"
|
:group-id="detail.id"
|
||||||
:type="2"
|
:type="2"
|
||||||
|
:modifyStateObj="modifyStateObj"
|
||||||
|
@modifyStateCallback="modifyStateCallback"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -202,7 +210,7 @@
|
|||||||
<p v-if="replyMsg.contentType === 1">{{ replyMsg.content }}</p>
|
<p v-if="replyMsg.contentType === 1">{{ replyMsg.content }}</p>
|
||||||
<p v-else-if="replyMsg.contentType === 2">[图片]</p>
|
<p v-else-if="replyMsg.contentType === 2">[图片]</p>
|
||||||
</div>
|
</div>
|
||||||
<i class="el-icon-close" />
|
<i class="el-icon-close" @click="setReplyMsg({})"></i>
|
||||||
</div>
|
</div>
|
||||||
<messageSend
|
<messageSend
|
||||||
v-if="detail.status === 3"
|
v-if="detail.status === 3"
|
||||||
@ -261,7 +269,8 @@ export default {
|
|||||||
replyMsg: {}, // 引用的消息
|
replyMsg: {}, // 引用的消息
|
||||||
newMsg: {},
|
newMsg: {},
|
||||||
privateUserInfo: {}, // 私聊用户的用户信息
|
privateUserInfo: {}, // 私聊用户的用户信息
|
||||||
privateNewMsg: {} // 私聊最新推送消息
|
privateNewMsg: {}, // 私聊最新推送消息
|
||||||
|
modifyStateObj: {} // 修改了状态的对象
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -292,7 +301,7 @@ export default {
|
|||||||
inputPlaceholder: "请输入公告内容,500字以内",
|
inputPlaceholder: "请输入公告内容,500字以内",
|
||||||
inputValue: this.detail.notice
|
inputValue: this.detail.notice
|
||||||
})
|
})
|
||||||
.then(async({ value }) => {
|
.then(async ({ value }) => {
|
||||||
const ret = await setNotice({
|
const ret = await setNotice({
|
||||||
id: this.detail.id,
|
id: this.detail.id,
|
||||||
notice: value
|
notice: value
|
||||||
@ -382,13 +391,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setReplyMsg(msg) {
|
setReplyMsg(msg) {
|
||||||
debugger;
|
|
||||||
this.replyMsg = msg;
|
this.replyMsg = msg;
|
||||||
},
|
},
|
||||||
changeCircle() {
|
changeCircle() {
|
||||||
this.$router.replace(`/circle/detail?id=${this.changeGroupId}`);
|
this.$router.replace(`/circle/detail?id=${this.changeGroupId}`);
|
||||||
this.msgKeyWord = "";
|
this.msgKeyWord = "";
|
||||||
this.getCircleDetail();
|
this.getCircleDetail();
|
||||||
|
},
|
||||||
|
modifyStateCallback(obj) {
|
||||||
|
// modifyType: 1审核通过 2禁言操作
|
||||||
|
this.modifyStateObj = obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<el-form-item label="登陆账号" prop="staffNo">
|
<el-form-item label="登陆账号" prop="staffNo">
|
||||||
<div>{{ form.staffNo }}</div>
|
<div>{{ form.staffNo }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="员工Up号" prop="upId">
|
<el-form-item label="员工号" prop="upId">
|
||||||
<div>{{ form.upId }}</div>
|
<div>{{ form.upId }}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="姓名" prop="name">
|
<el-form-item label="姓名" prop="name">
|
||||||
@ -191,9 +191,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<!-- <el-tab-pane label="修改密码" name="second">
|
<el-tab-pane label="修改密码" name="second">
|
||||||
<update-password/>
|
<update-password />
|
||||||
</el-tab-pane> -->
|
</el-tab-pane>
|
||||||
<!-- <div class="picture-loading">
|
<!-- <div class="picture-loading">
|
||||||
<el-image
|
<el-image
|
||||||
src="http://61.178.60.236:8888/group0/M00/00/0C/wKgZJWHWQoWAcRSkAAA0TvTsATU852.png"
|
src="http://61.178.60.236:8888/group0/M00/00/0C/wKgZJWHWQoWAcRSkAAA0TvTsATU852.png"
|
||||||
@ -234,10 +234,12 @@ import { queryTagList } from "@/api/tag";
|
|||||||
// import { getInfo } from '@/api/login'
|
// import { getInfo } from '@/api/login'
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import personalCenter from "./center/personalCenter";
|
import personalCenter from "./center/personalCenter";
|
||||||
|
import updatePassword from "./center/updatePass";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
personalCenter
|
personalCenter,
|
||||||
|
updatePassword
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -2,11 +2,17 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-tabs v-model="activeName">
|
<el-tabs v-model="activeName">
|
||||||
<el-tab-pane label="个人中心" name="first">
|
<el-tab-pane label="个人中心" name="first">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px" label-position="left">
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="left"
|
||||||
|
>
|
||||||
<el-form-item label="登录账号">
|
<el-form-item label="登录账号">
|
||||||
{{ $store.state.user.user.user.staffNo }}
|
{{ $store.state.user.user.user.staffNo }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="员工Up号">
|
<el-form-item label="员工号">
|
||||||
{{ $store.state.user.user.user.upId }}
|
{{ $store.state.user.user.user.upId }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="姓名">
|
<el-form-item label="姓名">
|
||||||
@ -19,63 +25,67 @@
|
|||||||
{{ $store.state.user.user.user.deptName }}
|
{{ $store.state.user.user.user.deptName }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button style="width: 150px" type="primary" @click="onSubmit">保存</el-button>
|
<el-button style="width: 150px" type="primary" @click="onSubmit"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="修改密码" name="second">
|
||||||
|
<update-password />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { changeMobile } from '@/api/user'
|
import { changeMobile } from "@/api/user";
|
||||||
import { getInfo } from '@/api/login'
|
import { getInfo } from "@/api/login";
|
||||||
|
import updatePassword from "./updatePass";
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: { updatePassword },
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
const validateMobile = (rule, value, callback) => {
|
const validateMobile = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return callback(new Error("请输入手机号"));
|
return callback(new Error("请输入手机号"));
|
||||||
}
|
}
|
||||||
let reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
|
let reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
|
||||||
if (!reg.test(value)) {
|
if (!reg.test(value)) {
|
||||||
return callback(new Error("请输入正确的手机号"));
|
return callback(new Error("请输入正确的手机号"));
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
activeName: 'first',
|
activeName: "first",
|
||||||
form: {
|
form: {
|
||||||
mobile: ''
|
mobile: ""
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
mobile: [
|
mobile: [{ required: true, validator: validateMobile, trigger: "blur" }]
|
||||||
{ required: true, validator: validateMobile, trigger: "blur" }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {},
|
watch: {},
|
||||||
created() {
|
created() {
|
||||||
this.form.mobile = this.$store.state.user.user.user.mobile
|
this.form.mobile = this.$store.state.user.user.user.mobile;
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
this.$refs.form.validate(async (valid) => {
|
this.$refs.form.validate(async valid => {
|
||||||
const res = await changeMobile({ mobile: this.form.mobile })
|
const res = await changeMobile({ mobile: this.form.mobile });
|
||||||
if (!res.code === 0) return this.$message.error(res.message)
|
if (!res.code === 0) return this.$message.error(res.message);
|
||||||
this.$message.success('保存成功')
|
this.$message.success("保存成功");
|
||||||
const result = await getInfo()
|
const result = await getInfo();
|
||||||
if (result.code === 0) {
|
if (result.code === 0) {
|
||||||
this.$store.commit('SET_USER', result.data)
|
this.$store.commit("SET_USER", result.data);
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(result.message)
|
this.$message.error(result.message);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.el-input {
|
.el-input {
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="query.value"
|
v-model="query.value"
|
||||||
clearable
|
clearable
|
||||||
placeholder="登录账号、用户姓名或员工Up号"
|
placeholder="登录账号、用户姓名或员工号"
|
||||||
style="width: 250px;"
|
style="width: 250px;"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@keyup.enter.native="toQuery"
|
@keyup.enter.native="toQuery"
|
||||||
@ -106,7 +106,7 @@
|
|||||||
<el-table-column type="index" label="序号" align="center" />
|
<el-table-column type="index" label="序号" align="center" />
|
||||||
<el-table-column prop="staffNo" label="登录账号" align="center" />
|
<el-table-column prop="staffNo" label="登录账号" align="center" />
|
||||||
<el-table-column prop="name" label="用户姓名" align="center" />
|
<el-table-column prop="name" label="用户姓名" align="center" />
|
||||||
<el-table-column prop="upId" label="员工Up号" align="center" />
|
<el-table-column prop="upId" label="员工号" align="center" />
|
||||||
<el-table-column prop="userType" label="用户类型" align="center">
|
<el-table-column prop="userType" label="用户类型" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="员工Up号">
|
<el-form-item label="员工号">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim="ruleForm.upId"
|
v-model.trim="ruleForm.upId"
|
||||||
style="width:300px;"
|
style="width:300px;"
|
||||||
@ -149,7 +149,7 @@ export default {
|
|||||||
staffNo: [
|
staffNo: [
|
||||||
{ required: true, message: "请输入登录账号", trigger: "blur" }
|
{ required: true, message: "请输入登录账号", trigger: "blur" }
|
||||||
],
|
],
|
||||||
upId: [{ required: true, message: "请输员工Up号", trigger: "blur" }],
|
upId: [{ required: true, message: "请输员工号", trigger: "blur" }],
|
||||||
mobile: [
|
mobile: [
|
||||||
{ required: true, validator: validateMobile, trigger: "blur" }
|
{ required: true, validator: validateMobile, trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
|||||||
@ -63,8 +63,8 @@ module.exports = {
|
|||||||
minRatio: 0.8 // 压缩率小于1才会压缩
|
minRatio: 0.8 // 压缩率小于1才会压缩
|
||||||
}),
|
}),
|
||||||
new ZipPlugin({
|
new ZipPlugin({
|
||||||
path: "./", //路径名
|
path: "../", //路径名
|
||||||
filename: "./syAdmin.zip" //打包名
|
filename: "../syAdmin.zip" //打包名
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user