fix: bug修复
This commit is contained in:
parent
30edf8135a
commit
8b791d244f
@ -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",
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<el-form-item label="登陆账号" prop="staffNo">
|
||||
<div>{{ form.staffNo }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工Up号" prop="staffNo">
|
||||
<el-form-item label="员工号" prop="staffNo">
|
||||
<div>{{ form.upId }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
@ -38,7 +38,7 @@
|
||||
<div>{{ form.showName }}</div>
|
||||
</el-form-item>
|
||||
<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 label="展示头像">
|
||||
<img :src="form.avatar" width="70" height="70" />
|
||||
@ -55,7 +55,8 @@
|
||||
v-for="tag in form.tagList"
|
||||
:key="tag.id"
|
||||
style="margin-right: 10px"
|
||||
>{{ tag.name }}</el-tag>
|
||||
>{{ tag.name }}</el-tag
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核结果" prop="reason">
|
||||
<el-radio-group v-model="form.result" style="width: 178px">
|
||||
@ -80,7 +81,8 @@
|
||||
:loading="loading"
|
||||
type="primary"
|
||||
@click="doSubmit"
|
||||
>提交</el-button>
|
||||
>提交</el-button
|
||||
>
|
||||
<el-button size="mini" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -88,26 +90,26 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateTgStatus, getTgInfo } from '@/api/adviser.js'
|
||||
import { updateTgStatus, getTgInfo } from "@/api/adviser.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
dialog: false,
|
||||
title: '投顾审核',
|
||||
title: "投顾审核",
|
||||
result: 0,
|
||||
reason: '',
|
||||
reason: "",
|
||||
form: {
|
||||
username: '',
|
||||
name: '',
|
||||
type: '',
|
||||
profile: '',
|
||||
sex: '',
|
||||
username: "",
|
||||
name: "",
|
||||
type: "",
|
||||
profile: "",
|
||||
sex: "",
|
||||
tags: [],
|
||||
license: '',
|
||||
license: "",
|
||||
result: null,
|
||||
rules: ''
|
||||
rules: ""
|
||||
},
|
||||
rules: {
|
||||
// reason: [
|
||||
@ -120,12 +122,12 @@ export default {
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
dialog(newName) {
|
||||
if (newName) {
|
||||
this.getInfo()
|
||||
this.getInfo();
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -134,74 +136,76 @@ export default {
|
||||
async getInfo() {
|
||||
const data = await getTgInfo({
|
||||
id: this.form.id
|
||||
})
|
||||
});
|
||||
if (data.code === 0) {
|
||||
this.form = data.data
|
||||
this.form = data.data;
|
||||
} else {
|
||||
this.$message.error(data.message)
|
||||
this.$message.error(data.message);
|
||||
}
|
||||
console.log(this.form)
|
||||
console.log(this.form);
|
||||
},
|
||||
cancel() {
|
||||
this.resetForm()
|
||||
this.resetForm();
|
||||
},
|
||||
async doSubmit() {
|
||||
if (!this.form.result) {
|
||||
return this.$message.error('请选择结果')
|
||||
return this.$message.error("请选择结果");
|
||||
}
|
||||
if (this.form.result === 4 && !this.reason) {
|
||||
return this.$message.error('请输入驳回理由')
|
||||
} else if (this.form.result === 4 && (this.reason.length < 3 || this.reason.length > 200)) {
|
||||
return this.$message.error('驳回理由长度在 3 到 200 个字符')
|
||||
return this.$message.error("请输入驳回理由");
|
||||
} else if (
|
||||
this.form.result === 4 &&
|
||||
(this.reason.length < 3 || this.reason.length > 200)
|
||||
) {
|
||||
return this.$message.error("驳回理由长度在 3 到 200 个字符");
|
||||
}
|
||||
const params = {
|
||||
id: this.form.id
|
||||
}
|
||||
};
|
||||
// 通过101:提交 103:通过 104:驳回 105:上架 106:下架
|
||||
if (this.form.result === 3) {
|
||||
params.event = 103
|
||||
params.event = 103;
|
||||
} else {
|
||||
// 驳回
|
||||
params.event = 104
|
||||
params.reason = this.reason
|
||||
params.event = 104;
|
||||
params.reason = this.reason;
|
||||
}
|
||||
const { code, message } = await updateTgStatus(params)
|
||||
const { code, message } = await updateTgStatus(params);
|
||||
if (code === 0) {
|
||||
this.dialog = false
|
||||
this.resetForm()
|
||||
this.$message.success('修改成功')
|
||||
this.$parent.getTgInfoList()
|
||||
this.dialog = false;
|
||||
this.resetForm();
|
||||
this.$message.success("修改成功");
|
||||
this.$parent.getTgInfoList();
|
||||
} else {
|
||||
this.$message.error(message)
|
||||
this.$message.error(message);
|
||||
}
|
||||
},
|
||||
resetForm() {
|
||||
this.dialog = false
|
||||
this.dialog = false;
|
||||
this.form = {
|
||||
id: null,
|
||||
name: '',
|
||||
profile: '',
|
||||
sex: '',
|
||||
name: "",
|
||||
profile: "",
|
||||
sex: "",
|
||||
tagList: [],
|
||||
license: '',
|
||||
userName: '',
|
||||
userNo: '',
|
||||
showName: '',
|
||||
deptName: ''
|
||||
}
|
||||
this.reason = ''
|
||||
license: "",
|
||||
userName: "",
|
||||
userNo: "",
|
||||
showName: "",
|
||||
deptName: ""
|
||||
};
|
||||
this.reason = "";
|
||||
},
|
||||
// 分页器
|
||||
sizeChange(e) {
|
||||
this.page = 0
|
||||
this.size = e
|
||||
this.page = 0;
|
||||
this.size = e;
|
||||
},
|
||||
pageChange(e) {
|
||||
this.page = e - 1
|
||||
}
|
||||
this.page = e - 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
</style>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped></style>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<el-form-item label="登陆账号" prop="staffNo">
|
||||
<div>{{ form.staffNo }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工Up号" prop="staffNo">
|
||||
<el-form-item label="员工号" prop="staffNo">
|
||||
<div>{{ form.upId }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
@ -38,7 +38,7 @@
|
||||
<div>{{ form.showName }}</div>
|
||||
</el-form-item>
|
||||
<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 label="展示头像">
|
||||
<img :src="form.avatar" width="70" height="70" />
|
||||
@ -67,26 +67,26 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTgInfo } from '@/api/adviser.js'
|
||||
import { getTgInfo } from "@/api/adviser.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
dialog: false,
|
||||
title: '查看投顾',
|
||||
title: "查看投顾",
|
||||
result: 0,
|
||||
reason: '',
|
||||
reason: "",
|
||||
form: {
|
||||
username: '',
|
||||
name: '',
|
||||
type: '',
|
||||
profile: '',
|
||||
sex: '',
|
||||
username: "",
|
||||
name: "",
|
||||
type: "",
|
||||
profile: "",
|
||||
sex: "",
|
||||
tags: [],
|
||||
license: '',
|
||||
license: "",
|
||||
result: null,
|
||||
rules: ''
|
||||
rules: ""
|
||||
},
|
||||
rules: {
|
||||
// reason: [
|
||||
@ -99,12 +99,12 @@ export default {
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
dialog(newName) {
|
||||
if (newName) {
|
||||
this.getInfo()
|
||||
this.getInfo();
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -113,42 +113,41 @@ export default {
|
||||
async getInfo() {
|
||||
const data = await getTgInfo({
|
||||
id: this.form.id
|
||||
})
|
||||
});
|
||||
if (data.code === 0) {
|
||||
this.form = data.data
|
||||
this.form = data.data;
|
||||
} else {
|
||||
this.$message.error(data.message)
|
||||
this.$message.error(data.message);
|
||||
}
|
||||
console.log(this.form)
|
||||
console.log(this.form);
|
||||
},
|
||||
cancel() {
|
||||
this.resetForm()
|
||||
this.resetForm();
|
||||
},
|
||||
resetForm() {
|
||||
this.dialog = false
|
||||
this.dialog = false;
|
||||
this.form = {
|
||||
name: '',
|
||||
profile: '',
|
||||
sex: '',
|
||||
name: "",
|
||||
profile: "",
|
||||
sex: "",
|
||||
tagList: [],
|
||||
license: '',
|
||||
userName: '',
|
||||
userNo: '',
|
||||
showName: '',
|
||||
deptName: ''
|
||||
}
|
||||
license: "",
|
||||
userName: "",
|
||||
userNo: "",
|
||||
showName: "",
|
||||
deptName: ""
|
||||
};
|
||||
},
|
||||
// 分页器
|
||||
sizeChange(e) {
|
||||
this.page = 0
|
||||
this.size = e
|
||||
this.page = 0;
|
||||
this.size = e;
|
||||
},
|
||||
pageChange(e) {
|
||||
this.page = e - 1
|
||||
}
|
||||
this.page = e - 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
</style>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped></style>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<el-form-item label="登陆账号" prop="staffNo">
|
||||
<div>{{ form.staffNo }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工Up号" prop="staffNo">
|
||||
<el-form-item label="员工号" prop="staffNo">
|
||||
<div>{{ form.upId }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
<el-table-column
|
||||
prop="upId"
|
||||
align="center"
|
||||
label="员工Up号"
|
||||
label="员工号"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
|
||||
@ -86,12 +86,17 @@ export default {
|
||||
privateNewMsg: {
|
||||
// 新的私聊消息
|
||||
type: Object
|
||||
},
|
||||
modifyStateObj: {
|
||||
// 修改了状态的对象
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: "",
|
||||
msgIdsObj: {},
|
||||
msgUserIdsObj: {}, // 以发送消息的userId为key
|
||||
list: [],
|
||||
loading: true,
|
||||
hasNext: true,
|
||||
@ -119,8 +124,16 @@ export default {
|
||||
(this.type === 2 && msg.userType === 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.msgIdsObj[msg.id] = msg;
|
||||
if (this.msgUserIdsObj[msg.userId]) {
|
||||
this.msgUserIdsObj[msg.userId].push(msg);
|
||||
} else {
|
||||
this.msgUserIdsObj[msg.userId] = [msg];
|
||||
}
|
||||
}
|
||||
},
|
||||
privateNewMsg(msg) {
|
||||
@ -135,6 +148,16 @@ export default {
|
||||
if (value) {
|
||||
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: {
|
||||
@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
:product-type="41"
|
||||
:product-id="groupId"
|
||||
:scope="2"
|
||||
@callback="callback"
|
||||
@callback="forbidSpeakCallback"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -32,14 +32,15 @@
|
||||
type="primary"
|
||||
:disabled="changeGroupId === detail.id"
|
||||
@click="changeCircle"
|
||||
>切换</el-button>
|
||||
>切换</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="circle-main">
|
||||
<div class="circle-main-header">
|
||||
<div class="circle-info">
|
||||
<img :src="detail.coverImage" alt="">
|
||||
<img :src="detail.coverImage" alt="" />
|
||||
<div>
|
||||
<h4>{{ detail.name }}</h4>
|
||||
<p>{{ detail.remark }}</p>
|
||||
@ -91,13 +92,13 @@
|
||||
src="@/assets/images/trumpet.png"
|
||||
alt=""
|
||||
@click="setNotice"
|
||||
>
|
||||
/>
|
||||
<img
|
||||
class="icon"
|
||||
src="@/assets/images/data.png"
|
||||
alt=""
|
||||
@click="$router.push('/circle/data')"
|
||||
>
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="circle-content">
|
||||
@ -129,7 +130,9 @@
|
||||
:group-id="detail.id"
|
||||
:type="item.id"
|
||||
:new-msg="newMsg"
|
||||
:modifyStateObj="modifyStateObj"
|
||||
@setReplyMsg="setReplyMsg"
|
||||
@modifyStateCallback="modifyStateCallback"
|
||||
/>
|
||||
</div>
|
||||
<privateChat
|
||||
@ -171,8 +174,10 @@
|
||||
v-show="userTabIndex === 0"
|
||||
:group-id="detail.id"
|
||||
:new-msg="newMsg"
|
||||
:modifyStateObj="modifyStateObj"
|
||||
@setReplyMsg="setReplyMsg"
|
||||
@toPrivateChat="toPrivateChat"
|
||||
@modifyStateCallback="modifyStateCallback"
|
||||
/>
|
||||
<userList
|
||||
v-show="userTabIndex === 1"
|
||||
@ -180,6 +185,7 @@
|
||||
:group-id="detail.id"
|
||||
:type="1"
|
||||
@toPrivateChat="toPrivateChat"
|
||||
@modifyStateCallback="modifyStateCallback"
|
||||
/>
|
||||
<privateList
|
||||
v-show="userTabIndex === 2"
|
||||
@ -192,6 +198,8 @@
|
||||
:key="2"
|
||||
:group-id="detail.id"
|
||||
:type="2"
|
||||
:modifyStateObj="modifyStateObj"
|
||||
@modifyStateCallback="modifyStateCallback"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -202,7 +210,7 @@
|
||||
<p v-if="replyMsg.contentType === 1">{{ replyMsg.content }}</p>
|
||||
<p v-else-if="replyMsg.contentType === 2">[图片]</p>
|
||||
</div>
|
||||
<i class="el-icon-close" />
|
||||
<i class="el-icon-close" @click="setReplyMsg({})"></i>
|
||||
</div>
|
||||
<messageSend
|
||||
v-if="detail.status === 3"
|
||||
@ -261,7 +269,8 @@ export default {
|
||||
replyMsg: {}, // 引用的消息
|
||||
newMsg: {},
|
||||
privateUserInfo: {}, // 私聊用户的用户信息
|
||||
privateNewMsg: {} // 私聊最新推送消息
|
||||
privateNewMsg: {}, // 私聊最新推送消息
|
||||
modifyStateObj: {} // 修改了状态的对象
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<el-form-item label="登陆账号" prop="staffNo">
|
||||
<div>{{ form.staffNo }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工Up号" prop="upId">
|
||||
<el-form-item label="员工号" prop="upId">
|
||||
<div>{{ form.upId }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
@ -191,9 +191,9 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<!-- <el-tab-pane label="修改密码" name="second">
|
||||
<el-tab-pane label="修改密码" name="second">
|
||||
<update-password />
|
||||
</el-tab-pane> -->
|
||||
</el-tab-pane>
|
||||
<!-- <div class="picture-loading">
|
||||
<el-image
|
||||
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 { mapGetters } from "vuex";
|
||||
import personalCenter from "./center/personalCenter";
|
||||
import updatePassword from "./center/updatePass";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
personalCenter
|
||||
personalCenter,
|
||||
updatePassword
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -2,11 +2,17 @@
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName">
|
||||
<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="登录账号">
|
||||
{{ $store.state.user.user.user.staffNo }}
|
||||
</el-form-item>
|
||||
<el-form-item label="员工Up号">
|
||||
<el-form-item label="员工号">
|
||||
{{ $store.state.user.user.user.upId }}
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
@ -19,63 +25,67 @@
|
||||
{{ $store.state.user.user.user.deptName }}
|
||||
</el-form-item>
|
||||
</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-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { changeMobile } from '@/api/user'
|
||||
import { getInfo } from '@/api/login'
|
||||
import { changeMobile } from "@/api/user";
|
||||
import { getInfo } from "@/api/login";
|
||||
import updatePassword from "./updatePass";
|
||||
export default {
|
||||
components: {},
|
||||
components: { updatePassword },
|
||||
props: {},
|
||||
data() {
|
||||
const validateMobile = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
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)) {
|
||||
return callback(new Error("请输入正确的手机号"));
|
||||
}
|
||||
callback();
|
||||
};
|
||||
return {
|
||||
activeName: 'first',
|
||||
activeName: "first",
|
||||
form: {
|
||||
mobile: ''
|
||||
mobile: ""
|
||||
},
|
||||
rules: {
|
||||
mobile: [
|
||||
{ required: true, validator: validateMobile, trigger: "blur" }
|
||||
]
|
||||
}
|
||||
mobile: [{ required: true, validator: validateMobile, trigger: "blur" }]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.form.mobile = this.$store.state.user.user.user.mobile
|
||||
this.form.mobile = this.$store.state.user.user.user.mobile;
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
this.$refs.form.validate(async (valid) => {
|
||||
const res = await changeMobile({ mobile: this.form.mobile })
|
||||
if (!res.code === 0) return this.$message.error(res.message)
|
||||
this.$message.success('保存成功')
|
||||
const result = await getInfo()
|
||||
this.$refs.form.validate(async valid => {
|
||||
const res = await changeMobile({ mobile: this.form.mobile });
|
||||
if (!res.code === 0) return this.$message.error(res.message);
|
||||
this.$message.success("保存成功");
|
||||
const result = await getInfo();
|
||||
if (result.code === 0) {
|
||||
this.$store.commit('SET_USER', result.data)
|
||||
this.$store.commit("SET_USER", result.data);
|
||||
} else {
|
||||
this.$message.error(result.message)
|
||||
}
|
||||
})
|
||||
this.$message.error(result.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.el-input {
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<el-input
|
||||
v-model="query.value"
|
||||
clearable
|
||||
placeholder="登录账号、用户姓名或员工Up号"
|
||||
placeholder="登录账号、用户姓名或员工号"
|
||||
style="width: 250px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="toQuery"
|
||||
@ -106,7 +106,7 @@
|
||||
<el-table-column type="index" label="序号" align="center" />
|
||||
<el-table-column prop="staffNo" 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">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
autocomplete="off"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工Up号">
|
||||
<el-form-item label="员工号">
|
||||
<el-input
|
||||
v-model.trim="ruleForm.upId"
|
||||
style="width:300px;"
|
||||
@ -149,7 +149,7 @@ export default {
|
||||
staffNo: [
|
||||
{ required: true, message: "请输入登录账号", trigger: "blur" }
|
||||
],
|
||||
upId: [{ required: true, message: "请输员工Up号", trigger: "blur" }],
|
||||
upId: [{ required: true, message: "请输员工号", trigger: "blur" }],
|
||||
mobile: [
|
||||
{ required: true, validator: validateMobile, trigger: "blur" }
|
||||
],
|
||||
|
||||
@ -63,8 +63,8 @@ module.exports = {
|
||||
minRatio: 0.8 // 压缩率小于1才会压缩
|
||||
}),
|
||||
new ZipPlugin({
|
||||
path: "./", //路径名
|
||||
filename: "./syAdmin.zip" //打包名
|
||||
path: "../", //路径名
|
||||
filename: "../syAdmin.zip" //打包名
|
||||
})
|
||||
]
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user