fast(登录、项目、设备、长城配置): 调整设备列表页、登录类型切换样式,新增企业项目成员管理相关功能,调整长城默认大屏地址
This commit is contained in:
parent
d9c8c0fbe6
commit
7473fcdf3c
4
.env.dr
4
.env.dr
|
@ -33,7 +33,7 @@ VUE_APP_THEME_CLASS = 'theme-blue-black'
|
||||||
VUE_APP_BASE_API = '/dev-api'
|
VUE_APP_BASE_API = '/dev-api'
|
||||||
|
|
||||||
#平台大屏地址
|
#平台大屏地址
|
||||||
VUE_APP_BIGSCREEN_PLATFORM_URL = 'https://goview.drgyen.cn/#/chart/preview/202409060982078'
|
VUE_APP_BIGSCREEN_PLATFORM_URL = 'https://goview.drgyen.cn/#/chart/preview/202409030993958'
|
||||||
#项目大屏地址
|
#项目大屏地址
|
||||||
VUE_APP_BIGSCREEN_PROJECT_URL = ''
|
VUE_APP_BIGSCREEN_PROJECT_URL = ''
|
||||||
|
|
||||||
|
@ -55,4 +55,4 @@ port= 9988
|
||||||
// 开发端
|
// 开发端
|
||||||
# target = https://digital-core.dieruen-iot.com
|
# target = https://digital-core.dieruen-iot.com
|
||||||
// 黄明 本地
|
// 黄明 本地
|
||||||
target = http://192.168.1.17:8899
|
target = https://digital-core.dieruen-iot.com
|
||||||
|
|
|
@ -34,7 +34,7 @@ VUE_APP_THEME_CLASS = 'theme-blue-black'
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
|
|
||||||
#平台大屏地址
|
#平台大屏地址
|
||||||
VUE_APP_BIGSCREEN_PLATFORM_URL = 'https://goview.drgyen.cn/#/chart/preview/202409060982078'
|
VUE_APP_BIGSCREEN_PLATFORM_URL = 'https://goview.drgyen.cn/#/chart/preview/202409030993958'
|
||||||
#项目大屏地址
|
#项目大屏地址
|
||||||
VUE_APP_BIGSCREEN_PROJECT_URL = ''
|
VUE_APP_BIGSCREEN_PROJECT_URL = ''
|
||||||
|
|
||||||
|
@ -52,4 +52,4 @@ port= 9988
|
||||||
// 测试端
|
// 测试端
|
||||||
// target = http://192.168.10.241:32024
|
// target = http://192.168.10.241:32024
|
||||||
// 开发端
|
// 开发端
|
||||||
target = https://power-core.drgyen.com
|
target = https://digital-core.dieruen-iot.com
|
||||||
|
|
|
@ -27,6 +27,8 @@ export function addProjectUser(data) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 删除项目用户
|
// 删除项目用户
|
||||||
export function delProjectUser(projectId, userIds) {
|
export function delProjectUser(projectId, userIds) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -43,3 +45,46 @@ export function exportProjectUser(query) {
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询项目列表
|
||||||
|
export function listProjectMember(query) {
|
||||||
|
return request({
|
||||||
|
url: "/app/project/userlist",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增项目成员
|
||||||
|
export function addProjectMember(data) {
|
||||||
|
return request({
|
||||||
|
url: "/app/project/useradd",
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改项目成员角色
|
||||||
|
export function editProjectMemberRole(projectId, userId,roleKey) {
|
||||||
|
return request({
|
||||||
|
url: "/app/project/" + projectId + '/' + userId + '/' + roleKey,
|
||||||
|
method: "put",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 移交项目成员
|
||||||
|
export function transferProjectMember(data) {
|
||||||
|
return request({
|
||||||
|
url: "/app/project/transfer",
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除项目成员
|
||||||
|
export function delProjectMember(projectId, userIds) {
|
||||||
|
return request({
|
||||||
|
url: "/app/project/" + projectId + '/' + userIds,
|
||||||
|
method: "delete"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -133,22 +133,21 @@
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column align="left" label="设备名称" prop="deviceName" />
|
<el-table-column align="left" label="设备名称" prop="deviceName" />
|
||||||
<el-table-column align="left" label="所属型号" prop="modelName" />
|
<el-table-column align="left" label="所属型号" prop="modelName" />
|
||||||
<el-table-column align="left" label="设备key" prop="deviceKey" width="150px" />
|
<el-table-column align="left" label="设备key" prop="deviceKey" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
label="设备码"
|
label="设备码"
|
||||||
|
min-width="120"
|
||||||
prop="deviceState"
|
prop="deviceState"
|
||||||
width="180"
|
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<img :ref="'qrCodeDiv' + scope.row.deviceKey" style="width: 100%" @click="lookQrCode(scope.row.qrCodeUrl)"/>
|
<img :ref="'qrCodeDiv' + scope.row.deviceKey" style="width: 100%;cursor: pointer" @click="lookQrCode(scope.row.qrCodeUrl)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="left"
|
align="left"
|
||||||
label="设备类型"
|
label="设备类型"
|
||||||
prop="deviceTypeName"
|
prop="deviceTypeName"
|
||||||
width="120px"
|
|
||||||
/>
|
/>
|
||||||
<!-- <el-table-column
|
<!-- <el-table-column
|
||||||
label="设备标签"
|
label="设备标签"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<e-object-tenant v-if="activeName === 'tenant'" :infoData="projectInfo || {}"/>
|
<e-object-tenant v-if="activeName === 'tenant'" :infoData="projectInfo || {}"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane v-if="!isShowUserTable" label="项目人员" name="user">
|
<el-tab-pane v-if="!isShowUserTable" label="项目成员" name="user">
|
||||||
<e-tenant-user v-if="activeName === 'user'" :projectId="projectInfo.projectId"></e-tenant-user>
|
<e-tenant-user v-if="activeName === 'user'" :projectId="projectInfo.projectId"></e-tenant-user>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form
|
<el-form
|
||||||
:model="queryParams"
|
v-show="showSearch"
|
||||||
ref="queryForm"
|
ref="queryForm"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
v-show="showSearch"
|
:model="queryParams"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form-item label="昵称" prop="nickName">
|
<el-form-item label="项目成员" prop="phoneNumber">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.nickName"
|
v-model="queryParams.phoneNumber"
|
||||||
placeholder="昵称"
|
|
||||||
clearable
|
clearable
|
||||||
|
placeholder="输入昵称或手机号搜索"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button icon="el-icon-search" type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['project:user:add']" @click="handleAdd">新增</el-button>
|
<el-button v-hasPermi="['project:user:add']" icon="el-icon-plus" plain type="primary" @click="handleAdd">新增</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
@ -30,70 +30,168 @@
|
||||||
:default-sort="{prop: 'expirationTime', order: 'descending'}"
|
:default-sort="{prop: 'expirationTime', order: 'descending'}"
|
||||||
@sort-change="sortChange"
|
@sort-change="sortChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" align="center" :index="indexFormatter" width="80px"></el-table-column>
|
<el-table-column :index="indexFormatter" align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||||
<el-table-column label="用户昵称" align="center" prop="nickName" />
|
<el-table-column align="center" label="用户昵称" prop="nickName" />
|
||||||
<el-table-column label="手机号码" align="center" prop="phoneNumber" />
|
<el-table-column align="center" label="手机号码" prop="phoneNumber" />
|
||||||
<el-table-column label="邮箱" align="center" prop="email" />
|
<el-table-column align="center" label="角色" prop="roleName" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column align="center" label="状态" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-text="scope.row.status === '0' ? '正常' : '停用'"></span>
|
<span v-text="scope.row.status === '0' ? '正常' : '停用'"></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<!-- <el-table-column-->
|
||||||
|
<!-- align="center"-->
|
||||||
|
<!-- label="创建时间"-->
|
||||||
|
<!-- prop="createTime"-->
|
||||||
|
<!-- sortable="custom"-->
|
||||||
|
<!-- width="160"-->
|
||||||
|
<!-- />-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
|
||||||
align="center"
|
align="center"
|
||||||
sortable="custom"
|
|
||||||
prop="createTime"
|
|
||||||
width="160"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
align="center"
|
|
||||||
width="200px"
|
|
||||||
class-name="small-padding fixed-width"
|
class-name="small-padding fixed-width"
|
||||||
|
label="操作"
|
||||||
|
width="300px"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template v-if="scope.row.roleKey!='root'" slot-scope="scope">
|
||||||
|
<!-- <el-popconfirm-->
|
||||||
|
<!-- v-hasPermi="['project:user:relieve']"-->
|
||||||
|
<!-- title="确认要将项目移交给该用户吗?"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- slot="reference"-->
|
||||||
|
<!-- icon="el-icon-sort"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- style="margin-right: 10px"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- @click="handleTransfer(scope.row)"-->
|
||||||
|
<!-- >项目移交</el-button>-->
|
||||||
|
<!-- </el-popconfirm>-->
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasPermi="['project:user:relieve']"
|
||||||
|
icon="el-icon-edit-outline"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
@click="openEdit(scope.row)"
|
||||||
|
>修改角色</el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
v-hasPermi="['project:user:relieve']"
|
v-hasPermi="['project:user:relieve']"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>解除用户</el-button>
|
>删除成员</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:total="total"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- <el-dialog-->
|
||||||
|
<!-- title="选择用户"-->
|
||||||
|
<!-- :visible.sync="selectTableShow"-->
|
||||||
|
<!-- width="50%"-->
|
||||||
|
<!-- top="10vh"-->
|
||||||
|
<!-- class="select-table-dialog"-->
|
||||||
|
<!-- :close-on-click-modal="false"-->
|
||||||
|
<!-- append-to-body-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <select-table-wrap-->
|
||||||
|
<!-- v-if="selectTableShow"-->
|
||||||
|
<!-- :tableOption="tableSelectOption.tableOpt"-->
|
||||||
|
<!-- :queryOption="tableSelectOption.queryOpt"-->
|
||||||
|
<!-- :tableList="tableSelectOption.tableList"-->
|
||||||
|
<!-- @parentGetList="childGetList($event)"-->
|
||||||
|
<!-- :otherOption="tableSelectOption.otherOption"-->
|
||||||
|
<!-- @returnEvent="returnEvent($event)"-->
|
||||||
|
<!-- />-->
|
||||||
|
|
||||||
|
<!-- <div slot="footer" class="dialog-footer">-->
|
||||||
|
<!-- <el-button size="mini" type="primary" @click="submitForm">确 定</el-button>-->
|
||||||
|
<!-- <el-button size="mini" @click="() =>{selectTableShow = false}">取 消</el-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </el-dialog>-->
|
||||||
|
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="选择用户"
|
|
||||||
:visible.sync="selectTableShow"
|
|
||||||
width="50%"
|
|
||||||
top="10vh"
|
|
||||||
class="select-table-dialog"
|
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="editMemberVisible"
|
||||||
append-to-body
|
append-to-body
|
||||||
|
class="select-table-dialog"
|
||||||
|
title="修改角色"
|
||||||
|
top="10vh"
|
||||||
|
width="400px"
|
||||||
>
|
>
|
||||||
<select-table-wrap
|
<el-form ref="editForm" :model="editForm" :rules="editRules" class="phone-box" label-width="120px">
|
||||||
v-if="selectTableShow"
|
<el-form-item label="用户手机号">
|
||||||
:tableOption="tableSelectOption.tableOpt"
|
<div slot="label" >
|
||||||
:queryOption="tableSelectOption.queryOpt"
|
用户昵称
|
||||||
:tableList="tableSelectOption.tableList"
|
</div>
|
||||||
@parentGetList="childGetList($event)"
|
{{editForm.nickName}}
|
||||||
:otherOption="tableSelectOption.otherOption"
|
</el-form-item>
|
||||||
@returnEvent="returnEvent($event)"
|
<el-form-item label="权限" prop="role">
|
||||||
/>
|
<el-select v-model="editForm.role" placeholder="请选择权限">
|
||||||
|
<el-option
|
||||||
|
v-for="item in roleList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button size="mini" type="primary" @click="handleEdit">确 定</el-button>
|
||||||
|
<el-button size="mini" @click="() =>{editMemberVisible = false}">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="selectTableShow"
|
||||||
|
append-to-body
|
||||||
|
class="select-table-dialog"
|
||||||
|
title="添加成员"
|
||||||
|
top="10vh"
|
||||||
|
width="600px"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" class="phone-box" label-width="120px">
|
||||||
|
<el-form-item label="用户手机号" prop="phone">
|
||||||
|
<div slot="label" style="display: inline-block">
|
||||||
|
用户手机号
|
||||||
|
<el-tooltip content="用户需在小程序端先注册" placement="top">
|
||||||
|
<i class="el-icon-question"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
<el-input v-model="form.phone" ></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="权限" prop="role">-->
|
||||||
|
<!-- <el-select v-model="form.role" placeholder="请选择权限">-->
|
||||||
|
<!-- <el-option label="运维成员" value="shanghai"></el-option>-->
|
||||||
|
<!-- <el-option label="成员" value="beijing"></el-option>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
</el-form>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm"
|
||||||
<el-button size="mini" @click="() =>{selectTableShow = false}">取 消</el-button>
|
>确 定</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
selectTableShow = false;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>取 消</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
@ -104,8 +202,11 @@ import {
|
||||||
listProjectUser,
|
listProjectUser,
|
||||||
delProjectUser,
|
delProjectUser,
|
||||||
addProjectUser,
|
addProjectUser,
|
||||||
|
listProjectMember,
|
||||||
|
addProjectMember,
|
||||||
|
delProjectMember,
|
||||||
exportProjectUser,
|
exportProjectUser,
|
||||||
listProjectNotUsed
|
listProjectNotUsed, transferProjectMember, editProjectMemberRole
|
||||||
} from "@/api/tenant/projectUser";
|
} from "@/api/tenant/projectUser";
|
||||||
import SelectTableWrap from "@/components/SelectTable/index";
|
import SelectTableWrap from "@/components/SelectTable/index";
|
||||||
export default {
|
export default {
|
||||||
|
@ -117,6 +218,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectTableShow: false,
|
selectTableShow: false,
|
||||||
|
editMemberVisible:false,
|
||||||
tableSelectOption: {},
|
tableSelectOption: {},
|
||||||
selectResult: {},
|
selectResult: {},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
@ -142,12 +244,41 @@ export default {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderByColumn: "createTime",
|
orderByColumn: "createTime",
|
||||||
isAsc: "desc"
|
isAsc: "desc",
|
||||||
|
phoneNumber:'',
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
projectId: null,
|
||||||
|
phone: null,
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {},
|
rules: {
|
||||||
|
phone: [
|
||||||
|
{ required: true, message: "用户手机号不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
editForm: {
|
||||||
|
projectId: null,
|
||||||
|
nickName: null,
|
||||||
|
userId: null,
|
||||||
|
role: null
|
||||||
|
},
|
||||||
|
editRules: {
|
||||||
|
role: [
|
||||||
|
{ required: true, message: "用户手机号不能为空", trigger: "change" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
roleList: [
|
||||||
|
{
|
||||||
|
value: 'personal',
|
||||||
|
label: '普通成员'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'operator',
|
||||||
|
label: '设备运维员'
|
||||||
|
}
|
||||||
|
],
|
||||||
// 用户状态
|
// 用户状态
|
||||||
statusOptions: [],
|
statusOptions: [],
|
||||||
tenantTypeOptions: []
|
tenantTypeOptions: []
|
||||||
|
@ -176,6 +307,85 @@ export default {
|
||||||
val + 1 + (this.queryParams.pageNum - 1) * this.queryParams.pageSize
|
val + 1 + (this.queryParams.pageNum - 1) * this.queryParams.pageSize
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
childGetList(data) {
|
||||||
|
listProjectNotUsed(Object.assign(data.page, data.param)).then(
|
||||||
|
response => {
|
||||||
|
this.tableSelectOption.tableList = response.rows;
|
||||||
|
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
returnEvent(data) {
|
||||||
|
if (data.type === "dblclick") {
|
||||||
|
this.form.userId = data.value.userId;
|
||||||
|
this.form.tenantId = data.value.tenantId;
|
||||||
|
this.submitForm();
|
||||||
|
} else if (data.type === "click") {
|
||||||
|
this.form.userId = data.value.userId;
|
||||||
|
this.form.tenantId = data.value.tenantId;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 用户状态字典翻译
|
||||||
|
statusFormat(row, column) {
|
||||||
|
var rulesStr = "";
|
||||||
|
this.statusOptions.forEach(v => {
|
||||||
|
if (v.dictValue === row.status) {
|
||||||
|
rulesStr = v.dictLabel;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return rulesStr;
|
||||||
|
},
|
||||||
|
tenantTypeFormat(row, column) {
|
||||||
|
var rulesStr = "";
|
||||||
|
this.tenantTypeOptions.forEach(v => {
|
||||||
|
if (v.dictValue === row.status) {
|
||||||
|
rulesStr = v.dictLabel;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return rulesStr;
|
||||||
|
},
|
||||||
|
/** 查询项目用户关系列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.projectId = this.projectId;
|
||||||
|
// let params = {
|
||||||
|
// projectId: this.projectId,
|
||||||
|
// phoneNumber: this.queryParams.phoneNumber,
|
||||||
|
// };
|
||||||
|
listProjectMember(this.queryParams).then(response => {
|
||||||
|
this.project_tenantList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
projectId: this.projectId,
|
||||||
|
phone: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.handleDetails();
|
||||||
|
},
|
||||||
// 打开厂商选择窗口 ——表格
|
// 打开厂商选择窗口 ——表格
|
||||||
handleDetails() {
|
handleDetails() {
|
||||||
this.selectResult = {};
|
this.selectResult = {};
|
||||||
|
@ -264,101 +474,68 @@ export default {
|
||||||
};
|
};
|
||||||
this.selectTableShow = true;
|
this.selectTableShow = true;
|
||||||
},
|
},
|
||||||
childGetList(data) {
|
|
||||||
listProjectNotUsed(Object.assign(data.page, data.param)).then(
|
|
||||||
response => {
|
|
||||||
this.tableSelectOption.tableList = response.rows;
|
|
||||||
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
returnEvent(data) {
|
|
||||||
if (data.type === "dblclick") {
|
|
||||||
this.form.userId = data.value.userId;
|
|
||||||
this.form.tenantId = data.value.tenantId;
|
|
||||||
this.submitForm();
|
|
||||||
} else if (data.type === "click") {
|
|
||||||
this.form.userId = data.value.userId;
|
|
||||||
this.form.tenantId = data.value.tenantId;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 用户状态字典翻译
|
|
||||||
statusFormat(row, column) {
|
|
||||||
var rulesStr = "";
|
|
||||||
this.statusOptions.forEach(v => {
|
|
||||||
if (v.dictValue === row.status) {
|
|
||||||
rulesStr = v.dictLabel;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return rulesStr;
|
|
||||||
},
|
|
||||||
tenantTypeFormat(row, column) {
|
|
||||||
var rulesStr = "";
|
|
||||||
this.tenantTypeOptions.forEach(v => {
|
|
||||||
if (v.dictValue === row.status) {
|
|
||||||
rulesStr = v.dictLabel;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return rulesStr;
|
|
||||||
},
|
|
||||||
/** 查询项目用户关系列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
this.queryParams.projectId = this.projectId;
|
|
||||||
listProjectUser(this.queryParams).then(response => {
|
|
||||||
this.project_tenantList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
projectId: this.projectId,
|
|
||||||
userId: null,
|
|
||||||
tenantId: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.handleDetails();
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
addProjectUser(this.form).then(response => {
|
// addProjectUser(this.form).then(response => {
|
||||||
|
// this.msgSuccess("新增成功");
|
||||||
|
// this.selectTableShow = false;
|
||||||
|
// this.getList();
|
||||||
|
// });
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// alert('submit!');
|
||||||
|
addProjectMember(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.selectTableShow = false;
|
this.selectTableShow = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
console.log('error submit!!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//项目移交
|
||||||
|
handleTransfer(row){
|
||||||
|
const projectIds = this.projectId;
|
||||||
|
const userId = row.userId;
|
||||||
|
transferProjectMember({projectIds,userId}).then(res=>{
|
||||||
|
this.msgSuccess(res.msg);
|
||||||
|
}).catch(err=>{
|
||||||
|
this.msgError(err.msg);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//修改角色
|
||||||
|
handleEdit(){
|
||||||
|
editProjectMemberRole(this.editForm.projectId,this.editForm.userId,this.editForm.role).then(res=>{
|
||||||
|
this.msgSuccess(res.msg);
|
||||||
|
this.editMemberVisible = false;
|
||||||
|
this.getList();
|
||||||
|
}).catch(err=>{
|
||||||
|
this.msgError(err.msg);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
openEdit(row) {
|
||||||
|
console.log("row",row)
|
||||||
|
this.editForm = {
|
||||||
|
projectId: this.projectId,
|
||||||
|
nickName: row.nickName,
|
||||||
|
userId: row.userId,
|
||||||
|
role: row.roleKey
|
||||||
|
}
|
||||||
|
this.editMemberVisible = true;
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const projectIds = this.projectId;
|
const projectIds = this.projectId;
|
||||||
const userId = row.userId;
|
const userId = row.userId;
|
||||||
this.$confirm("是否确认解除当前人员?", "警告", {
|
this.$confirm("是否确认删除当前成员?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return delProjectUser(projectIds, userId);
|
return delProjectMember(projectIds, userId);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
|
@ -10,20 +10,25 @@
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<div class="title-tags-wrap">
|
<div class="title-tags-wrap">
|
||||||
<div
|
<div
|
||||||
@click="userTypeClick('system')"
|
class="tags-div tags-checked"
|
||||||
:class="formTitleType === 'system' ? 'tags-div tags-checked' : 'tags-div'"
|
|
||||||
>
|
>
|
||||||
<h3>运营登录</h3>
|
<h3>{{ formTitleType === 'system'?'运营登录':'用户登录' }}</h3>
|
||||||
<span></span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
@click="userTypeClick('enter')"
|
|
||||||
:class="formTitleType === 'enter' ? 'tags-div tags-checked' : 'tags-div'"
|
|
||||||
>
|
|
||||||
<h3>用户登录</h3>
|
|
||||||
<span></span>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div-->
|
<!-- <div-->
|
||||||
|
<!-- @click="userTypeClick('system')"-->
|
||||||
|
<!-- :class="formTitleType === 'system' ? 'tags-div tags-checked' : 'tags-div'"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <h3>运营登录</h3>-->
|
||||||
|
<!-- <span></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div-->
|
||||||
|
<!-- @click="userTypeClick('enter')"-->
|
||||||
|
<!-- :class="formTitleType === 'enter' ? 'tags-div tags-checked' : 'tags-div'"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <h3>用户登录</h3>-->
|
||||||
|
<!-- <span></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div-->
|
||||||
<!-- @click="userTypeClick('personal')"-->
|
<!-- @click="userTypeClick('personal')"-->
|
||||||
<!-- :class="formTitleType === 'personal' ? 'tags-div tags-checked' : 'tags-div'"-->
|
<!-- :class="formTitleType === 'personal' ? 'tags-div tags-checked' : 'tags-div'"-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
|
@ -32,50 +37,66 @@
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号" clearable>
|
<el-input v-model="loginForm.username" auto-complete="off" clearable placeholder="账号" type="text">
|
||||||
<svg-icon slot="prefix" icon-class="A_loginUser" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="A_loginUser" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
type="password"
|
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
@keyup.enter.native="handleLogin"
|
|
||||||
show-password
|
show-password
|
||||||
>
|
type="password"
|
||||||
<svg-icon slot="prefix" icon-class="A_loginPassword" class="el-input__icon input-icon" />
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="code" class="code-box">
|
|
||||||
<el-input
|
|
||||||
v-model="loginForm.code"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="验证码"
|
|
||||||
style="width: 63%"
|
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
clearable
|
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="A_loginCode" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="A_loginPassword" />
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
|
||||||
<img :src="codeUrl" @click="getCode" class="login-code-img" />
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item class="code-box" prop="code">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="loginForm.code"-->
|
||||||
|
<!-- auto-complete="off"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- placeholder="验证码"-->
|
||||||
|
<!-- style="width: 63%"-->
|
||||||
|
<!-- @keyup.enter.native="handleLogin"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="A_loginCode" />-->
|
||||||
|
<!-- </el-input>-->
|
||||||
|
<!-- <div class="login-code">-->
|
||||||
|
<!-- <img :src="codeUrl" class="login-code-img" @click="getCode" />-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px; margin-left: 25px;color: #5E6B82;">记住密码</el-checkbox>
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px; margin-left: 25px;color: #5E6B82;">记住密码</el-checkbox>
|
||||||
<el-form-item style="width:100%;">
|
<el-form-item style="width:100%;">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="medium"
|
size="medium"
|
||||||
type="primary"
|
|
||||||
style="width:100%; height: 46px;background: linear-gradient(87deg, #09ADF9 0%, #4650FB 100%);border-radius: 23px;border: none;font-size: 18px;font-weight: 500;"
|
style="width:100%; height: 46px;background: linear-gradient(87deg, #09ADF9 0%, #4650FB 100%);border-radius: 23px;border: none;font-size: 18px;font-weight: 500;"
|
||||||
|
type="primary"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
<span v-if="!loading">登 录</span>
|
<span v-if="!loading">登 录</span>
|
||||||
<span v-else>登 录 中...</span>
|
<span v-else>登 录 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item style="width:100%;text-align: right">
|
||||||
|
<el-button
|
||||||
|
v-if="formTitleType === 'enter'"
|
||||||
|
type="text"
|
||||||
|
@click.native.prevent="userTypeClick('system')"
|
||||||
|
>
|
||||||
|
<span>运营登录</span>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
type="text"
|
||||||
|
@click.native.prevent="userTypeClick('enter')"
|
||||||
|
>
|
||||||
|
<span>用户登录</span>
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -142,7 +163,7 @@ export default {
|
||||||
this.systemName = process.env.VUE_APP_SYSTEM_NAME;
|
this.systemName = process.env.VUE_APP_SYSTEM_NAME;
|
||||||
this.recordNumber = process.env.VUE_APP_RECORD_NUMBER;
|
this.recordNumber = process.env.VUE_APP_RECORD_NUMBER;
|
||||||
|
|
||||||
this.getCode();
|
// this.getCode();
|
||||||
this.getCookie();
|
this.getCookie();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -203,7 +224,7 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.getCode();
|
// this.getCode();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -212,7 +233,7 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style lang="scss" rel="stylesheet/scss">
|
||||||
.login-blue-black {
|
.login-blue-black {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -285,7 +306,7 @@ export default {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 70px;
|
height: 80px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
@ -296,7 +317,7 @@ export default {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-family: "Source Han Sans CN";
|
font-family: "Source Han Sans CN";
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 18px;
|
font-size: 24px;
|
||||||
line-height: 46px;
|
line-height: 46px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
@ -12,20 +12,25 @@
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<div class="title-tags-wrap">
|
<div class="title-tags-wrap">
|
||||||
<div
|
<div
|
||||||
@click="userTypeClick('system')"
|
class="tags-div tags-checked"
|
||||||
:class="formTitleType === 'system' ? 'tags-div tags-checked' : 'tags-div'"
|
|
||||||
>
|
>
|
||||||
<h3>运营登录</h3>
|
<h3>{{ formTitleType === 'system'?'运营登录':'用户登录' }}</h3>
|
||||||
<span></span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
@click="userTypeClick('enter')"
|
|
||||||
:class="formTitleType === 'enter' ? 'tags-div tags-checked' : 'tags-div'"
|
|
||||||
>
|
|
||||||
<h3>用户登录</h3>
|
|
||||||
<span></span>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div-->
|
<!-- <div-->
|
||||||
|
<!-- @click="userTypeClick('system')"-->
|
||||||
|
<!-- :class="formTitleType === 'system' ? 'tags-div tags-checked' : 'tags-div'"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <h3>运营登录</h3>-->
|
||||||
|
<!-- <span></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div-->
|
||||||
|
<!-- @click="userTypeClick('enter')"-->
|
||||||
|
<!-- :class="formTitleType === 'enter' ? 'tags-div tags-checked' : 'tags-div'"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <h3>用户登录</h3>-->
|
||||||
|
<!-- <span></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div-->
|
||||||
<!-- @click="userTypeClick('personal')"-->
|
<!-- @click="userTypeClick('personal')"-->
|
||||||
<!-- :class="formTitleType === 'personal' ? 'tags-div tags-checked' : 'tags-div'"-->
|
<!-- :class="formTitleType === 'personal' ? 'tags-div tags-checked' : 'tags-div'"-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
|
@ -34,50 +39,66 @@
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号" clearable>
|
<el-input v-model="loginForm.username" auto-complete="off" clearable placeholder="账号" type="text">
|
||||||
<svg-icon slot="prefix" icon-class="A_loginUser" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="A_loginUser" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
type="password"
|
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
@keyup.enter.native="handleLogin"
|
|
||||||
show-password
|
show-password
|
||||||
>
|
type="password"
|
||||||
<svg-icon slot="prefix" icon-class="A_loginPassword" class="el-input__icon input-icon" />
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="code" class="code-box">
|
|
||||||
<el-input
|
|
||||||
v-model="loginForm.code"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="验证码"
|
|
||||||
style="width: 63%"
|
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
clearable
|
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="A_loginCode" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="A_loginPassword" />
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
|
||||||
<img :src="codeUrl" @click="getCode" class="login-code-img" />
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item class="code-box" prop="code">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="loginForm.code"-->
|
||||||
|
<!-- auto-complete="off"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- placeholder="验证码"-->
|
||||||
|
<!-- style="width: 63%"-->
|
||||||
|
<!-- @keyup.enter.native="handleLogin"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="A_loginCode" />-->
|
||||||
|
<!-- </el-input>-->
|
||||||
|
<!-- <div class="login-code">-->
|
||||||
|
<!-- <img :src="codeUrl" class="login-code-img" @click="getCode" />-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px; margin-left: 25px;color: #5E6B82;">记住密码</el-checkbox>
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px; margin-left: 25px;color: #5E6B82;">记住密码</el-checkbox>
|
||||||
<el-form-item style="width:100%;">
|
<el-form-item style="width:100%;">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="medium"
|
size="medium"
|
||||||
type="primary"
|
|
||||||
style="width:100%; height: 46px;background: linear-gradient(87deg, #09ADF9 0%, #4650FB 100%);border-radius: 23px;border: none;font-size: 18px;font-weight: 500;"
|
style="width:100%; height: 46px;background: linear-gradient(87deg, #09ADF9 0%, #4650FB 100%);border-radius: 23px;border: none;font-size: 18px;font-weight: 500;"
|
||||||
|
type="primary"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
<span v-if="!loading">登 录</span>
|
<span v-if="!loading">登 录</span>
|
||||||
<span v-else>登 录 中...</span>
|
<span v-else>登 录 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item style="width:100%;text-align: right">
|
||||||
|
<el-button
|
||||||
|
v-if="formTitleType === 'enter'"
|
||||||
|
type="text"
|
||||||
|
@click.native.prevent="userTypeClick('system')"
|
||||||
|
>
|
||||||
|
<span>运营登录</span>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
type="text"
|
||||||
|
@click.native.prevent="userTypeClick('enter')"
|
||||||
|
>
|
||||||
|
<span>用户登录</span>
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,7 +167,7 @@ export default {
|
||||||
this.systemName = process.env.VUE_APP_SYSTEM_NAME;
|
this.systemName = process.env.VUE_APP_SYSTEM_NAME;
|
||||||
this.recordNumber = process.env.VUE_APP_RECORD_NUMBER;
|
this.recordNumber = process.env.VUE_APP_RECORD_NUMBER;
|
||||||
|
|
||||||
this.getCode();
|
// this.getCode();
|
||||||
this.getCookie();
|
this.getCookie();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -207,7 +228,7 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.getCode();
|
// this.getCode();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -216,7 +237,7 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style lang="scss" rel="stylesheet/scss">
|
||||||
.login-blue-white {
|
.login-blue-white {
|
||||||
display: flex;
|
display: flex;
|
||||||
//flex-direction: column;
|
//flex-direction: column;
|
||||||
|
@ -292,7 +313,7 @@ export default {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 70px;
|
height: 80px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
@ -303,7 +324,7 @@ export default {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-family: "Source Han Sans CN";
|
font-family: "Source Han Sans CN";
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 18px;
|
font-size: 24px;
|
||||||
line-height: 46px;
|
line-height: 46px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
@ -8,20 +8,25 @@
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<div class="title-tags-wrap">
|
<div class="title-tags-wrap">
|
||||||
<div
|
<div
|
||||||
@click="userTypeClick('system')"
|
class="tags-div tags-checked"
|
||||||
:class="formTitleType === 'system' ? 'tags-div tags-checked' : 'tags-div'"
|
|
||||||
>
|
>
|
||||||
<h3>运营登录</h3>
|
<h3>{{ formTitleType === 'system'?'运营登录':'用户登录' }}</h3>
|
||||||
<span></span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
@click="userTypeClick('enter')"
|
|
||||||
:class="formTitleType === 'enter' ? 'tags-div tags-checked' : 'tags-div'"
|
|
||||||
>
|
|
||||||
<h3>用户登录</h3>
|
|
||||||
<span></span>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div-->
|
<!-- <div-->
|
||||||
|
<!-- @click="userTypeClick('system')"-->
|
||||||
|
<!-- :class="formTitleType === 'system' ? 'tags-div tags-checked' : 'tags-div'"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <h3>运营登录</h3>-->
|
||||||
|
<!-- <span></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div-->
|
||||||
|
<!-- @click="userTypeClick('enter')"-->
|
||||||
|
<!-- :class="formTitleType === 'enter' ? 'tags-div tags-checked' : 'tags-div'"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <h3>用户登录</h3>-->
|
||||||
|
<!-- <span></span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div-->
|
||||||
<!-- @click="userTypeClick('personal')"-->
|
<!-- @click="userTypeClick('personal')"-->
|
||||||
<!-- :class="formTitleType === 'personal' ? 'tags-div tags-checked' : 'tags-div'"-->
|
<!-- :class="formTitleType === 'personal' ? 'tags-div tags-checked' : 'tags-div'"-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
|
@ -30,50 +35,66 @@
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号" clearable>
|
<el-input v-model="loginForm.username" auto-complete="off" clearable placeholder="账号" type="text">
|
||||||
<svg-icon slot="prefix" icon-class="A_loginUser" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="A_loginUser" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
type="password"
|
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
@keyup.enter.native="handleLogin"
|
|
||||||
show-password
|
show-password
|
||||||
>
|
type="password"
|
||||||
<svg-icon slot="prefix" icon-class="A_loginPassword" class="el-input__icon input-icon" />
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="code" class="code-box">
|
|
||||||
<el-input
|
|
||||||
v-model="loginForm.code"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="验证码"
|
|
||||||
style="width: 63%"
|
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
clearable
|
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="A_loginCode" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="A_loginPassword" />
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
|
||||||
<img :src="codeUrl" @click="getCode" class="login-code-img" />
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item class="code-box" prop="code">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="loginForm.code"-->
|
||||||
|
<!-- auto-complete="off"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- placeholder="验证码"-->
|
||||||
|
<!-- style="width: 63%"-->
|
||||||
|
<!-- @keyup.enter.native="handleLogin"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <svg-icon slot="prefix" class="el-input__icon input-icon" icon-class="A_loginCode" />-->
|
||||||
|
<!-- </el-input>-->
|
||||||
|
<!-- <div class="login-code">-->
|
||||||
|
<!-- <img :src="codeUrl" class="login-code-img" @click="getCode" />-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px; margin-left: 25px;color: #5E6B82;">记住密码</el-checkbox>
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px; margin-left: 25px;color: #5E6B82;">记住密码</el-checkbox>
|
||||||
<el-form-item style="width:100%;">
|
<el-form-item style="width:100%;">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="medium"
|
size="medium"
|
||||||
type="primary"
|
|
||||||
style="width:100%; height: 46px;background: linear-gradient(87deg, #0CDFE1 1%, #00B5B7 100%);border-radius: 23px;border: none"
|
style="width:100%; height: 46px;background: linear-gradient(87deg, #0CDFE1 1%, #00B5B7 100%);border-radius: 23px;border: none"
|
||||||
|
type="primary"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
<span v-if="!loading">登 录</span>
|
<span v-if="!loading">登 录</span>
|
||||||
<span v-else>登 录 中...</span>
|
<span v-else>登 录 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item style="width:100%;text-align: right;">
|
||||||
|
<el-button
|
||||||
|
v-if="formTitleType === 'enter'"
|
||||||
|
type="text"
|
||||||
|
@click.native.prevent="userTypeClick('system')"
|
||||||
|
>
|
||||||
|
<span style="color: #00A9AB;">运营登录</span>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
type="text"
|
||||||
|
@click.native.prevent="userTypeClick('enter')"
|
||||||
|
>
|
||||||
|
<span style="color: #00A9AB;">用户登录</span>
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
|
@ -139,7 +160,7 @@ export default {
|
||||||
this.systemName = process.env.VUE_APP_SYSTEM_NAME;
|
this.systemName = process.env.VUE_APP_SYSTEM_NAME;
|
||||||
this.recordNumber = process.env.VUE_APP_RECORD_NUMBER;
|
this.recordNumber = process.env.VUE_APP_RECORD_NUMBER;
|
||||||
|
|
||||||
this.getCode();
|
// this.getCode();
|
||||||
this.getCookie();
|
this.getCookie();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -200,7 +221,7 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.getCode();
|
// this.getCode();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -209,7 +230,7 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style lang="scss" rel="stylesheet/scss">
|
||||||
.login-green {
|
.login-green {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -270,7 +291,7 @@ export default {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 70px;
|
height: 80px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
@ -281,7 +302,7 @@ export default {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-family: "Source Han Sans CN";
|
font-family: "Source Han Sans CN";
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 18px;
|
font-size: 24px;
|
||||||
line-height: 46px;
|
line-height: 46px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
Loading…
Reference in New Issue