Commit 0dd10fd3 authored by 69237's avatar 69237

Merge remote-tracking branch 'origin/dev-sunyu' into dev-sunyu

parents 4e093edc 13251f73
...@@ -5,7 +5,7 @@ VUE_APP_TITLE = 悦优享视频监控管理系统 ...@@ -5,7 +5,7 @@ VUE_APP_TITLE = 悦优享视频监控管理系统
ENV = 'development' ENV = 'development'
# 悦优享视频监控管理系统/开发环境 # 悦优享视频监控管理系统/开发环境
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = '/api'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
...@@ -6,29 +6,87 @@ ...@@ -6,29 +6,87 @@
@select="handleSelect" @select="handleSelect"
style="margin-right: 120px" style="margin-right: 120px"
> >
<template v-for="(item, index) in newTopNev"> <template>
<el-menu-item class="menuStyle" style="font-size: small;background-color: #F6F6FA;border-top-right-radius: 15px;border-top-left-radius: 15px;text-align: center;margin-left: 1px" :index="item.path" :key="index" <el-menu-item
class="menuStyle"
style="
font-size: small;
background-color: #f6f6fa;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
text-align: center;
margin-left: 1px;
"
index="/monitoring/video"
> >
<i :class="item.icon" style="width: 10px;height: 10px;margin-top: -12px"></i> <i style="width: 10px; height: 10px; margin-top: -12px"></i>
{{ item.name }}</el-menu-item 首页
</el-menu-item>
<el-menu-item
class="menuStyle"
style="
font-size: small;
background-color: #f6f6fa;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
text-align: center;
margin-left: 1px;
"
index="/employee/employee"
> >
<i style="width: 10px; height: 10px; margin-top: -12px"></i>
员工信息
</el-menu-item>
<el-menu-item
class="menuStyle"
style="
font-size: small;
background-color: #f6f6fa;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
text-align: center;
margin-left: 1px;
"
index="/monitoringhistory/history"
v-if="!this.backTag"
>
<i style="width: 10px; height: 10px; margin-top: -12px"></i>
历史记录
</el-menu-item>
<el-menu-item
class="menuStyle"
style="
font-size: small;
background-color: #f6f6fa;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
text-align: center;
margin-left: 1px;
"
index="/monitoringhistory/history"
v-if="this.backTag"
@click="changeBackTag()"
>
<i style="width: 10px; height: 10px; margin-top: -12px"></i>
返回历史记录
</el-menu-item>
</template> </template>
<!-- 顶部菜单超出数量折叠 --> <!-- 顶部菜单超出数量折叠 -->
<!-- <el-submenu :style="{'&#45;&#45;theme': theme}" index="more" v-if="topMenus.length > visibleNumber">--> <!-- <el-submenu :style="{'&#45;&#45;theme': theme}" index="more" v-if="topMenus.length > visibleNumber">-->
<!-- <template slot="title">更多菜单</template>--> <!-- <template slot="title">更多菜单</template>-->
<!-- <template v-for="(item, index) in topMenus">--> <!-- <template v-for="(item, index) in topMenus">-->
<!-- <el-menu-item--> <!-- <el-menu-item-->
<!-- :index="item.path"--> <!-- :index="item.path"-->
<!-- :key="index"--> <!-- :key="index"-->
<!-- v-if="index >= visibleNumber">--> <!-- v-if="index >= visibleNumber">-->
<!-- <svg-icon--> <!-- <svg-icon-->
<!-- v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"--> <!-- v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"-->
<!-- :icon-class="item.meta.icon"/>--> <!-- :icon-class="item.meta.icon"/>-->
<!-- {{ item.meta.title }}--> <!-- {{ item.meta.title }}-->
<!-- </el-menu-item>--> <!-- </el-menu-item>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-submenu>--> <!-- </el-submenu>-->
</el-menu> </el-menu>
</template> </template>
...@@ -37,12 +95,13 @@ import { constantRoutes } from "@/router"; ...@@ -37,12 +95,13 @@ import { constantRoutes } from "@/router";
import Menu from "@/views/system/menu/index.vue"; import Menu from "@/views/system/menu/index.vue";
// 隐藏侧边栏路由 // 隐藏侧边栏路由
const hideList = ['/index', '/user/profile']; const hideList = ["/index", "/user/profile"];
export default { export default {
components: {Menu}, components: { Menu },
data() { data() {
return { return {
backTag: false,
newTopNev: [ newTopNev: [
{ {
path: '/monitoring/video', path: '/monitoring/video',
...@@ -95,11 +154,12 @@ export default { ...@@ -95,11 +154,12 @@ export default {
this.routers.map((router) => { this.routers.map((router) => {
for (var item in router.children) { for (var item in router.children) {
if (router.children[item].parentPath === undefined) { if (router.children[item].parentPath === undefined) {
if(router.path === "/") { if (router.path === "/") {
router.children[item].path = "/" + router.children[item].path; router.children[item].path = "/" + router.children[item].path;
} else { } else {
if(!this.ishttp(router.children[item].path)) { if (!this.ishttp(router.children[item].path)) {
router.children[item].path = router.path + "/" + router.children[item].path; router.children[item].path =
router.path + "/" + router.children[item].path;
} }
} }
router.children[item].parentPath = router.path; router.children[item].parentPath = router.path;
...@@ -138,7 +198,17 @@ export default { ...@@ -138,7 +198,17 @@ export default {
this.$store.dispatch('app/toggleSideBarHide', true); this.$store.dispatch('app/toggleSideBarHide', true);
this.setVisibleNumber(); this.setVisibleNumber();
}, },
created() {
this.getinfo();
},
methods: { methods: {
changeBackTag() {
this.backTag = false;
},
getinfo() {
let self = this;
self.backTag = this.$router.params.backTag;
},
// 根据宽度计算设置显示栏数 // 根据宽度计算设置显示栏数
setVisibleNumber() { setVisibleNumber() {
const width = document.body.getBoundingClientRect().width / 3; const width = document.body.getBoundingClientRect().width / 3;
...@@ -220,48 +290,57 @@ export default { ...@@ -220,48 +290,57 @@ export default {
// padding: 0 5px !important; // padding: 0 5px !important;
// margin: 0 10px !important; // margin: 0 10px !important;
//} //}
.menuStyle{ .menuStyle {
box-shadow: 0 0 8px #D4D9E5; box-shadow: 0 0 8px #d4d9e5;
height: 60px; height: 60px;
border-bottom: transparent; border-bottom: transparent;
} }
.menuStyle:hover{
color: #30B08F; .menuStyle:hover {
color: #30b08f;
border-bottom: 0px transparent; border-bottom: 0px transparent;
} }
::v-deep .el-menu::before{
::v-deep .el-menu::before {
color: transparent; color: transparent;
} }
::v-deep .el-submenu{
::v-deep .el-submenu {
height: 60px; height: 60px;
} }
.el-menu--horizontal > .el-menu-item{
.el-menu--horizontal > .el-menu-item {
margin-top: 19px; margin-top: 19px;
height: 60px; height: 60px;
line-height: 35px; line-height: 35px;
} }
.el-menu--horizontal > .el-menu-item.is-active{
.el-menu--horizontal > .el-menu-item.is-active {
margin-top: 12px; margin-top: 12px;
} }
//.el-menu--horizontal > .el-menu-item.is-active{ //.el-menu--horizontal > .el-menu-item.is-active{
// //margin-top: 30px; // //margin-top: 30px;
// height: 60px; // height: 60px;
// line-height: 30px; // line-height: 30px;
//} //}
.el-menu-item.is-active{ .el-menu-item.is-active {
font-weight: bolder; font-weight: bolder;
line-height: 45px; line-height: 45px;
color: white !important; color: white !important;
background-color: #0D8EEE !important; background-color: #0d8eee !important;
} }
.el-menu-item { .el-menu-item {
width: 130px; width: 130px;
color: #2E2E2E !important; color: #2e2e2e !important;
background-color:#F6F6FA !important; background-color: #f6f6fa !important;
} }
.el-menu--horizontal > .el-submenu{
.el-menu--horizontal > .el-submenu {
height: 10px; height: 10px;
} }
//.el-menu--horizontal > .el-submenu.is-active{ //.el-menu--horizontal > .el-submenu.is-active{
// height: 80px; // height: 80px;
//} //}
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="2"> <el-col :span="1.5">
<el-button <el-button
style="background-color: #0D8EEE; color: #F6F6FA" style="background-color: #0D8EEE; color: #F6F6FA"
plain plain
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
@click="handleAdd" @click="handleAdd"
>新增人员</el-button> >新增人员</el-button>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="1.5">
<el-button <el-button
plain plain
icon="el-icon-top-right" icon="el-icon-top-right"
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
@click="handleSelectAll" @click="handleSelectAll"
>选择全部</el-button> >选择全部</el-button>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="1.5">
<el-button <el-button
plain plain
icon="el-icon-top-left" icon="el-icon-top-left"
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
@click="handleImport" @click="handleImport"
>批量导入</el-button> >批量导入</el-button>
</el-col> --> </el-col> -->
<el-col :span="2"> <el-col :span="1.5">
<el-button <el-button
plain plain
icon="el-icon-download" icon="el-icon-download"
...@@ -142,10 +142,10 @@ ...@@ -142,10 +142,10 @@
@click="handleExport" @click="handleExport"
>批量导出</el-button> >批量导出</el-button>
</el-col> </el-col>
<el-col :span="14" class="text-right"> <el-col :span="17" class="text-right">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
</el-col> </el-col>
<el-col :span="2" class="text-right"> <el-col :span="1" class="text-right">
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-col> </el-col>
<!-- <!--
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
<el-table-column label="状态" align="center" key="status" width="190" v-if="columns[5].visible"> <el-table-column label="状态" align="center" key="status" width="190" v-if="columns[5].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="{ 'status-enabled': scope.row.status === '0', 'status-disabled': scope.row.status === '1' }"> <span :class="{ 'status-enabled': scope.row.status === '0', 'status-disabled': scope.row.status === '1' }">
{{ scope.row.status === '0' ? '.已启用' : '.已禁用' }} {{ scope.row.status === '0' ? '·已启用' : 已禁用' }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -181,12 +181,12 @@ ...@@ -181,12 +181,12 @@
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope" v-if="scope.row.userId !== 1"> <template slot-scope="scope" v-if="scope.row.userId !== 1">
<!-- 查看--> <el-button
<!-- <el-button size="medium"
size="mini"
style="border: transparent" style="border: transparent"
icon="el-icon-view" icon="el-icon-refresh"
></el-button>--> @click="handleResetPwd(scope.row)"
></el-button>
<el-button <el-button
size="medium" size="medium"
style="border: transparent" style="border: transparent"
...@@ -199,15 +199,6 @@ ...@@ -199,15 +199,6 @@
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
></el-button> ></el-button>
<!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">-->
<!-- <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item command="handleResetPwd" icon="el-icon-key"-->
<!-- v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>-->
<!-- <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check"-->
<!-- v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -272,65 +263,6 @@ ...@@ -272,65 +263,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>
<el-col :span="12">
<el-form-item label="用户性别">
<el-select v-model="form.sex" placeholder="请选择性别">
<el-option
v-for="dict in dict.type.sys_user_sex"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>-->
<!-- </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="岗位">
<el-select v-model="form.postIds" multiple placeholder="请选择岗位">
<el-option
v-for="item in postOptions"
:key="item.postId"
:label="item.postName"
:value="item.postId"
:disabled="item.status == 1"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="角色">
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
<el-option
v-for="item in roleOptions"
:key="item.roleId"
:label="item.roleName"
:value="item.roleId"
:disabled="item.status == 1"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>-->
<!-- <el-row>
<el-col :span="12">
<el-form-item label="创建账号">
<el-input v-model="form.createBy" maxlength="11" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建时间" >
<el-date-picker
v-model="form.createTime"
type="datetime"
placeholder="选择日期和时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>-->
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注"> <el-form-item label="备注">
...@@ -357,11 +289,11 @@ ...@@ -357,11 +289,11 @@
<el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="10px" /> <el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="10px" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="用户密码" prop="password"> <el-form-item label="用户密码" prop="password">
<el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password/> <el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password/>
</el-form-item> </el-form-item>
</el-col> </el-col>-->
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
...@@ -809,20 +741,14 @@ export default { ...@@ -809,20 +741,14 @@ export default {
}, },
/** 重置密码按钮操作 */ /** 重置密码按钮操作 */
handleResetPwd(row) { handleResetPwd(row) {
this.$prompt('请输入"' + row.userName + '"的新密码', "提示", { this.$confirm('是否重置"' + row.nickName + '"密码为123456', "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
closeOnClickModal: false, closeOnClickModal: false,
inputPattern: /^.{5,20}$/, }).then(({}) => {
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间", const newPassword = "123456";
inputValidator: (value) => { resetUserPwd(row.userId, newPassword).then(response => {
if (/<|>|"|'|\||\\/.test(value)) { this.$modal.msgSuccess("成功将"+row.nickName + "的密码重置为:" + newPassword);
return "不能包含非法字符:< > \" ' \\\ |"
}
},
}).then(({ value }) => {
resetUserPwd(row.userId, value).then(response => {
this.$modal.msgSuccess("修改成功,新密码是:" + value);
}); });
}).catch(() => {}); }).catch(() => {});
}, },
......
...@@ -35,7 +35,7 @@ module.exports = { ...@@ -35,7 +35,7 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://127.0.0.1:8080`, target: `http://127.0.0.1:8087`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",
......
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