Commit 8391cefd by qinjianhui

Merge branch 'dev' into 'master'

Dev

See merge request !10
parents 14de18f0 8c4c4244
import axios from './axios'
export function getLoginState({ account, password }) {
return axios.post('platform/user/login', { account, password })
return axios.post('platform/user/login', {
account,
password,
})
}
export function logout() {
return axios.get('platform/user/logout')
}
export function resetPassword({ account, oldPwd, newPwd }) {
return axios.post('platform/user/changePassword', {
account,
oldPwd,
newPwd,
})
}
......@@ -25,6 +25,9 @@ import {
Tag,
Checkbox,
Tree,
Dropdown,
DropdownItem,
DropdownMenu,
} from 'element-ui'
const components = [
......@@ -49,6 +52,9 @@ const components = [
Tag,
Checkbox,
Tree,
Dropdown,
DropdownItem,
DropdownMenu,
]
export default {
......
......@@ -14,7 +14,7 @@
@click.native="onClickMenus"
active-text-color="#ffd04b"
>
<template v-for="(nav,index) in menuList">
<template v-for="(nav, index) in menuList">
<el-menu-item
:key="index"
v-if="nav.children.length === 0"
......@@ -46,21 +46,83 @@
</template>
</el-menu>
<div class="user-area">
<span class="user-name">{{
userInfo && userInfo.userName
}}</span>
<el-button
<el-dropdown>
<div size="mini" style="color: #fff">
{{ userInfo && userInfo.realName
}}<i
class="el-icon-arrow-down el-icon--right"
></i>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePassword"
>修改密码</el-dropdown-item
>
<el-dropdown-item @click.native="logout"
>退出登录</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-button
type="text"
style="color: #fff"
@click="logout"
>退出登录</el-button
>
> -->
</div>
<el-dialog
:close-on-click-modal="false"
title="修改密码"
:visible.sync="dialogVisible"
width="400px"
>
<el-form
:inline="true"
label-width="100px"
size="small"
>
<el-form-item label="原密码">
<el-input
show-password
v-model="oldPwd"
placeholder="原密码"
></el-input>
</el-form-item>
<el-form-item label="新密码">
<el-input
show-password
v-model="newPwd"
placeholder="新密码"
></el-input>
</el-form-item>
<el-form-item label="确认新密码">
<el-input
show-password
v-model="confimPwd"
placeholder="确认新密码"
></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button
size="small"
@click="dialogVisible = false"
>取 消</el-button
>
<el-button
size="small"
type="primary"
@click="resetPasswordSumbit"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { mapGetters, mapState } from 'vuex'
import { logout } from '@/common/api/login'
import { logout, resetPassword } from '@/common/api/login'
import { setToken, setUser } from '@/utils/auth'
export default {
name: 'navMenu',
......@@ -117,6 +179,10 @@ export default {
],
},
],
dialogVisible: false,
oldPwd: '',
newPwd: '',
confimPwd: '',
}
},
computed: {
......@@ -139,6 +205,41 @@ export default {
},
},
methods: {
updatePassword() {
this.dialogVisible = true
},
async resetPasswordSumbit() {
if (!this.oldPwd) {
this.$message.warning('请输入原密码')
return
}
if (!this.newPwd) {
this.$message.warning('请输入新密码')
return
}
if (!this.confimPwd) {
this.$message.warning('确认新密码')
return
}
if (this.newPwd !== this.confimPwd) {
return this.$message.warning('新密码两次输入不一致')
}
try {
const res = await resetPassword({
account: this.userInfo.account,
oldPwd: this.oldPwd,
newPwd: this.newPwd,
})
if (res.code === 200) {
this.dialogVisible = false
this.$message.success('密码修改成功')
this.logout()
}
console.log(res)
} catch (e) {
console.error(e)
}
},
async logout() {
try {
await logout()
......
......@@ -14,51 +14,19 @@
placeholder="用户名/姓名"
></el-input>
</el-form-item>
<el-form-item label="功能角色">
<el-select
style="width: 120px"
clearable
filterable
v-model="searchForm.functionRoleId"
placeholder="请选择"
>
<el-option
v-for="item in funcRoleList"
:key="item.value"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据角色">
<el-select
style="width: 120px"
clearable
filterable
v-model="searchForm.dataRoleId"
placeholder="请选择"
>
<el-option
v-for="item in dataRoleList"
:key="item.value"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="启用状态">
<el-select
clearable
:class="{
green: searchForm.enable === '1',
red: searchForm.enable === '0',
green: searchForm.enable ,
red: !searchForm.enable,
}"
v-model="searchForm.enable"
style="width: 120px"
placeholder="请选择"
>
<el-option label="启用" value="1"></el-option>
<el-option label="禁用" value="0"></el-option>
<el-option label="启用" :value="true"></el-option>
<el-option label="禁用" :value="false"></el-option>
</el-select>
</el-form-item>
......@@ -155,42 +123,6 @@
>
</div>
</el-form-item>
<el-form-item label="功能角色" prop="funcRoleIds">
<el-select
style="width: 164px"
v-model="addcurrencyform.funcRoleIds"
placeholder="请选择角色"
multiple
filterable
>
<el-option
v-for="item in funcRoleList"
:key="item.id"
:label="item.name"
:value="item.id"
>
{{ item.name }}
</el-option>
</el-select>
</el-form-item>
<el-form-item label="数据角色" prop="dataRoleIds">
<el-select
style="width: 164px"
v-model="addcurrencyform.dataRoleIds"
placeholder="请选择角色"
multiple
filterable
>
<el-option
v-for="item in dataRoleList"
:key="item.id"
:label="item.name"
:value="item.id"
>
{{ item.name }}
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button
......@@ -247,7 +179,7 @@ export default {
sourceData: [],
searchForm: {
employeeName: '',
enable: '1',
enable: true,
platform: '',
},
dialogVisible: false,
......@@ -362,15 +294,11 @@ export default {
key: 'realName',
width: '',
},
{ label: '功能角色', key: 'functionNames' },
{ label: '数据角色', key: 'dataNames' },
{
label: '相关操作',
key: '',
fixed: 'right',
width: '',
width: '130',
render: (item) => (
<div>
<span title="编辑" class="icon-view ">
......
......@@ -131,7 +131,7 @@
<div class="step-bar">
<!-- step-pass 已经完成,step-active当前步骤 -->
<div
class="step step-after step-pass"
class="step step-after"
:class="{
'step-pass':
detail.orderStatus === 'TO_BE_ASSIGN' ||
......@@ -143,7 +143,7 @@
detail.orderStatus === 'PRE_HANDLING',
}"
>
<span>受理</span>
<span>受理</span>
</div>
<div
class="step step-after step-before"
......@@ -234,16 +234,14 @@
v-for="(item, index) in chatRecord"
:key="index"
class="chat_item"
:class="{ chat_right: item.type === 1 }"
:class="{ chat_right: item.type === 2 }"
>
<div class="chat_warp" v-if="item.type === 1">
<div class="chat_warp" v-if="item.type === 2">
<div class="chat_user">
<div class="chat_user_time">
{{
item.createTime
}}&nbsp;&nbsp;&nbsp;&nbsp;{{
item.sendUserName
}}
}}&nbsp;&nbsp;&nbsp;&nbsp;客服
</div>
<div class="chat_text">
{{ item.msg }}
......@@ -267,7 +265,9 @@
</div>
<div class="chat_user">
<div class="chat_user_time">
客服:&nbsp;&nbsp;&nbsp;&nbsp;{{
{{
item.sendUserName
}}:&nbsp;&nbsp;&nbsp;&nbsp;{{
item.createTime
}}
</div>
......@@ -295,9 +295,12 @@
</el-input>
</div>
<div style="margin-top: 10px; text-align: right">
<!-- <el-button size="mini" type="success"
>确认执行</el-button
> -->
<el-button
size="mini"
type="success"
@click="confirm"
>受理</el-button
>
<el-button
size="mini"
type="primary"
......@@ -360,7 +363,7 @@ import {
} from '@/common/api/order'
import { getSystemUserList } from '@/common/api/system'
import { mapState } from 'vuex'
import confirmWork from '@/assets/work/confirm.png'
// import confirmWork from '@/assets/work/confirm.png'
import assignWork from '@/assets/work/assign.png'
import startWork from '@/assets/work/start.png'
import archiveWork from '@/assets/work/archive.png'
......@@ -478,16 +481,6 @@ export default {
></i>
</span>
)}
{item.orderStatus === 'PRE_HANDLING' && (
<span title="确认" class="icon-view">
<img
width="24"
height="24"
src={confirmWork}
onClick={() => this.confirm(item)}
/>
</span>
)}
{item.orderStatus === 'TO_BE_ASSIGN' && (
<span title="指派给" class="icon-view">
<img
......@@ -553,7 +546,7 @@ export default {
}
},
// 确认
async confirm(item) {
async confirm() {
try {
await this.$confirm('确定执行吗?', '提示', {
confirmButtonText: '确定',
......@@ -564,10 +557,12 @@ export default {
return
}
try {
const res = await workConfirmed(item.id)
const res = await workConfirmed(this.currentRowId)
if (res.code === 200) {
this.getlist()
this.getOrderTree()
this.detailVisible = false
this.$message.success('操作成功')
}
} catch (e) {
console.error(e)
......@@ -843,10 +838,11 @@ export default {
.step-bar {
margin-bottom: 10px;
display: flex;
}
.step {
position: relative;
width: 25%;
flex: 1;
font-size: 14px;
height: 32px;
line-height: 32px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment