优化项目

lijinlong
杜函宇 1 year ago
parent 41d5de2f5a
commit 6360467db1

@ -5,4 +5,6 @@ VUE_APP_TITLE = 苏州应急执法计划管理系统
ENV = 'production'
# 苏州应急执法计划管理系统/生产环境
VUE_APP_BASE_API = 'http://192.168.0.105:9033'
# VUE_APP_BASE_API = 'http://192.168.0.105:9033'
VUE_APP_BASE_API = 'http://39.101.188.84:9033/pharmaceuticals'

@ -1,228 +1,208 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
/>
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<link
href="//cdn.staticfile.org/layui/2.8.8/css/layui.css"
rel="stylesheet"
/>
<!-- <script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
<link
href="https://cdn.quilljs.com/1.3.6/quill.bubble.css"
rel="stylesheet"
type="text/css"
/>
<link
href="https://cdn.quilljs.com/1.3.6/quill.snow.css"
rel="stylesheet"
type="text/css"
/> -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<!--[if lt IE 11
]><script>
window.location.href = "/html/ie.html";
</script><!
[endif]-->
<style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
#loader-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
}
#loader {
display: block;
position: relative;
left: 50%;
top: 50%;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #fff;
-webkit-animation: spin 2s linear infinite;
-ms-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
-o-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 1001;
}
#loader:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #fff;
-webkit-animation: spin 3s linear infinite;
-moz-animation: spin 3s linear infinite;
-o-animation: spin 3s linear infinite;
-ms-animation: spin 3s linear infinite;
animation: spin 3s linear infinite;
}
#loader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #fff;
-moz-animation: spin 1.5s linear infinite;
-o-animation: spin 1.5s linear infinite;
-ms-animation: spin 1.5s linear infinite;
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: #ffffff;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
#loader-wrapper .loader-section.section-left {
left: 0;
}
#loader-wrapper .loader-section.section-right {
right: 0;
}
.loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.loaded #loader-wrapper .loader-section.section-right {
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.loaded #loader {
opacity: 0;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.loaded #loader-wrapper {
visibility: hidden;
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
-webkit-transition: all 0.3s 1s ease-out;
transition: all 0.3s 1s ease-out;
}
.no-js #loader-wrapper {
display: none;
}
.no-js h1 {
color: #222222;
}
#loader-wrapper .load_title {
font-family: "Open Sans";
color: #fff;
font-size: 19px;
width: 100%;
text-align: center;
z-index: 9999999999999;
position: absolute;
top: 60%;
opacity: 1;
line-height: 30px;
}
#loader-wrapper .load_title span {
font-weight: normal;
font-style: italic;
font-size: 13px;
color: #fff;
opacity: 0.5;
}
</style>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
#loader-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
}
#loader {
display: block;
position: relative;
left: 50%;
top: 50%;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 2s linear infinite;
-ms-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
-o-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 1001;
}
#loader:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 3s linear infinite;
-moz-animation: spin 3s linear infinite;
-o-animation: spin 3s linear infinite;
-ms-animation: spin 3s linear infinite;
animation: spin 3s linear infinite;
}
#loader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-moz-animation: spin 1.5s linear infinite;
-o-animation: spin 1.5s linear infinite;
-ms-animation: spin 1.5s linear infinite;
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: #7171C6;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
#loader-wrapper .loader-section.section-left {
left: 0;
}
#loader-wrapper .loader-section.section-right {
right: 0;
}
.loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded #loader-wrapper .loader-section.section-right {
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded #loader {
opacity: 0;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.loaded #loader-wrapper {
visibility: hidden;
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
-webkit-transition: all 0.3s 1s ease-out;
transition: all 0.3s 1s ease-out;
}
.no-js #loader-wrapper {
display: none;
}
.no-js h1 {
color: #222222;
}
#loader-wrapper .load_title {
font-family: 'Open Sans';
color: #FFF;
font-size: 19px;
width: 100%;
text-align: center;
z-index: 9999999999999;
position: absolute;
top: 60%;
opacity: 1;
line-height: 30px;
}
#loader-wrapper .load_title span {
font-weight: normal;
font-style: italic;
font-size: 13px;
color: #FFF;
opacity: 0.5;
}
</style>
</head>
<body>
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
</body>
</html>

@ -12,7 +12,7 @@ export default {
// 行政区划
tree(params) {
return request({
url: "/administrative/tree",
url: "/pharmaceuticals/administrative/tree",
method: "get",
params,
});
@ -20,7 +20,7 @@ export default {
// 导入excel
importExcel(data) {
return request({
url: "/bKeyEnterprise/common/importExcel",
url: "/pharmaceuticals/bKeyEnterprise/common/importExcel",
method: "post",
data,
});
@ -28,16 +28,15 @@ export default {
// 企业基本信息
basicList(params) {
return request({
url: "/info/list",
url: "/pharmaceuticals/info/list",
method: "get",
params,
})
},
// 查看,新增,修改,删除计划管理表 get\delete 传参是params put\post 传参是data
bPlanManage(method,data = null, params = null, id){
console.log(id)
return request({
url: `/bPlanManage${id ? `/${id}` : ''}`,
url: `/pharmaceuticals/bPlanManage${id ? `/${id}` : ''}`,
method,
data,
params
@ -45,13 +44,13 @@ export default {
},
bPlanManageTwo(id){
return request({
url: `/bPlanManage/${id}`,
url: `/pharmaceuticals/bPlanManage/${id}`,
method:'get',
});
},
dictdata(params){
return request({
url: `/dictdata`,
url: `/pharmaceuticals/dictdata`,
method:'get',
params
});

@ -3,7 +3,7 @@ import request from '@/utils/request'
// 分页条件查询省重点企业
export function listEnterprise(query) {
return request({
url: '/bKeyEnterprise',
url: '/pharmaceuticals/bKeyEnterprise',
method: 'get',
params: query
})
@ -12,7 +12,7 @@ export function listEnterprise(query) {
// 新增省重点企业
export function addEnterprise(data) {
return request({
url: '/bKeyEnterprise',
url: '/pharmaceuticals/bKeyEnterprise',
method: 'post',
data
})
@ -20,7 +20,7 @@ export function addEnterprise(data) {
//修改省重点企业
export function updateEnterprise(data) {
return request({
url: '/bKeyEnterprise',
url: '/pharmaceuticals/bKeyEnterprise',
method: 'put',
data
})
@ -28,7 +28,7 @@ export function updateEnterprise(data) {
//删除省重点企业
export function deleteEnterprise(data) {
return request({
url: '/bKeyEnterprise',
url: '/pharmaceuticals/bKeyEnterprise',
method: 'delete',
params: data
})
@ -36,7 +36,7 @@ export function deleteEnterprise(data) {
//导入省重点企业
export function exportEnterprise(data) {
return request({
url: '/bKeyEnterprise/common/importExcel',
url: '/pharmaceuticals/bKeyEnterprise/common/importExcel',
method: 'post',
data,
headers: {
@ -47,14 +47,14 @@ export function exportEnterprise(data) {
//通过主键查询单条省重点企业
export function getEnterprise(id) {
return request({
url: `/bKeyEnterprise/${id}`,
url: `/pharmaceuticals/bKeyEnterprise/${id}`,
method: 'get',
})
}
//查询企业信息列表
export function businessList(data) {
return request({
url: `/info/list`,
url: `/pharmaceuticals/info/list`,
method: 'get',
params: data
})
@ -62,7 +62,7 @@ export function businessList(data) {
//查询单条企业信息执法详情
export function enforcingDetail(data) {
return request({
url: `/bPlanEnterprise/getZhifa`,
url: `/pharmaceuticals/bPlanEnterprise/getZhifa`,
method: 'get',
params: data
@ -71,7 +71,7 @@ export function enforcingDetail(data) {
// 根据字段查询字典信息
export function listDist(query) {
return request({
url: '/dictdata',
url: '/pharmaceuticals/dictdata',
method: 'get',
params: query
})
@ -80,7 +80,7 @@ export function listDist(query) {
// 行政区划树结构
export function xzTree(id) {
return request({
url: '/administrative/tree',
url: '/pharmaceuticals/administrative/tree',
method: 'get',
})
}

@ -38,7 +38,9 @@
<div>
<div class="avatar"></div>
<div class="header-text">
<span>苏州市应急管理局 张三 </span>
<span
>{{ dept.deptName }}&nbsp;&nbsp;&nbsp;&nbsp;{{ username }}
</span>
<i class="el-icon-caret-bottom" v-if="!avatarFlag"></i>
<i class="el-icon-caret-top" v-if="avatarFlag"></i>
</div>
@ -47,6 +49,9 @@
<el-dropdown-item @click.native="logout">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<div class="showGLstyle" v-if="dept.deptId == 103" @click="toNewPage">
进入管理平台
</div>
</header>
<div class="bottom-view">
<router-view></router-view>
@ -55,6 +60,7 @@
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
data() {
return {
@ -79,12 +85,12 @@ export default {
icon1: require("../assets/images/zhifa.png"),
icon2: require("../assets/images/zhifa-change.png"),
},
// {
// path: "/enterprise",
// name: "",
// icon1: require("../assets/images/qiye.png"),
// icon2: require("../assets/images/qiye-change.png"),
// },
{
path: "/enterprise",
name: "企业名录",
icon1: require("../assets/images/qiye.png"),
icon2: require("../assets/images/qiye-change.png"),
},
{
path: "/focusEnter",
name: "省重点企业",
@ -94,6 +100,12 @@ export default {
],
};
},
computed: {
...mapState({
dept: (state) => state.user.dept,
username: (state) => state.user.name,
}),
},
watch: {
$route: {
handler(newRouter, oldRouter) {
@ -103,6 +115,9 @@ export default {
},
},
methods: {
toNewPage() {
this.$router.push({ path: "/system/user" });
},
changePath(e, item) {
this.$router.push(item.path);
},
@ -110,17 +125,17 @@ export default {
this.avatarFlag = e;
},
//退
logout() {
async logout() {
this.$confirm("确定注销并退出系统吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
// this.$store.dispatch("LogOut").then(() => {
this.$router.replace("/toLogin").catch(() => {});
// });
this.$store.dispatch("LogOut").then(() => {
// this.$router.replace("/login").catch(() => {});
location.href = "/";
});
})
.catch(() => {});
},
@ -128,6 +143,12 @@ export default {
};
</script>
<style lang="scss" scoped>
.showGLstyle {
font-family: "Alibaba-PuHuiTi-Medium.otf";
color: #606266;
margin-right: 20px;
cursor: pointer;
}
.nav-text {
font-size: 20px;
font-family: "Alibaba-PuHuiTi-Medium.otf";

@ -1,65 +1,58 @@
import router from "./router";
import store from "./store";
import { Message } from "element-ui";
import NProgress from "nprogress";
import "nprogress/nprogress.css";
import { getToken } from "@/utils/auth";
import { isRelogin } from "@/utils/request";
import router from './router'
import store from './store'
import { Message } from 'element-ui'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { getToken } from '@/utils/auth'
import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false });
NProgress.configure({ showSpinner: false })
const whiteList = [
'/toLogin',
'/home',
'/planManage',
"/enforcing",
"/focusEnter"
];
const whiteList = ['/login', '/register']
router.beforeEach((to, from, next) => {
NProgress.start();
NProgress.start()
if (getToken()) {
to.meta.title && store.dispatch("settings/setTitle", to.meta.title);
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
/* has token*/
if (to.path === "/toLogin") {
next();
NProgress.done();
if (to.path === '/login') {
next({ path: '/' })
NProgress.done()
} else {
if (store.getters.roles.length === 0) {
isRelogin.show = true;
console.log(router.options);
isRelogin.show = true
// 判断当前用户是否已拉取完user_info信息
store
.dispatch("GetInfo")
.then(() => {
isRelogin.show = false;
store.dispatch("GenerateRoutes").then((accessRoutes) => {
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes); // 动态添加可访问路由表
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
});
store.dispatch('GetInfo').then(() => {
isRelogin.show = false
store.dispatch('GenerateRoutes').then(accessRoutes => {
console.log(accessRoutes);
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
})
}).catch(err => {
store.dispatch('LogOut').then(() => {
Message.error(err)
next({ path: '/' })
})
})
.catch((err) => {
store.dispatch("LogOut").then(() => {
Message.error(err);
next({ path: "/" });
});
});
} else {
next();
next()
}
}
} else {
// 没有token
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入
next();
next()
} else {
next(`/toLogin`); // 否则全部重定向到登录页
NProgress.done();
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
NProgress.done()
}
}
});
})
router.afterEach(() => {
NProgress.done();
});
NProgress.done()
})

@ -42,21 +42,17 @@ export const constantRoutes = [
},
],
},
// {
// path: "/login",
// component: () => import("@/views/login"),
// hidden: true,
// },
{
path: "/login",
component: () => import("@/views/login"),
hidden: true,
},
// {
// path: "/login2",
// component: (resolve) => require(["@/views/login2"], resolve),
// hidden: true,
// },
{
path: "/toLogin",
component: (resolve) => require(["@/views/newLogin"], resolve),
hidden: true,
},
{
path: "/register",
component: () => import("@/views/register"),
@ -96,17 +92,17 @@ export const constantRoutes = [
name: "enforcing",
meta:{index:2}
},
// {
// path: "/enterprise",
// component: () => import("@/views/yingji/enterprise.vue"),
// name: "enterprise",
// meta:{index:3}
// },
{
path: "/enterprise",
component: () => import("@/views/yingji/enterprise.vue"),
name: "enterprise",
meta:{index:3}
},
{
path: "/focusEnter",
component: () => import("@/views/yingji/focusEnter.vue"),
name: "focusEnter",
meta:{index:3}
meta:{index:4}
},
],

@ -8,9 +8,14 @@ const user = {
avatar: "",
roles: [],
permissions: [],
//存储用户id
deptId: null
},
mutations: {
get_dept: (state, id) => {
state.dept = id;
},
SET_TOKEN: (state, token) => {
state.token = token;
},
@ -72,6 +77,7 @@ const user = {
getInfo()
.then((res) => {
const user = res.user;
commit("get_dept", user.dept);
const avatar =
user.avatar == "" || user.avatar == null
? require("@/assets/images/profile.jpg")

@ -15,7 +15,7 @@ axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API,
baseURL: process.env.VUE_APP_BASE_API,
// 超时
timeout: 100000,
});

@ -1,86 +1,88 @@
<template>
<div class="login">
<el-form
ref="loginForm"
:model="loginForm"
:rules="loginRules"
class="login-form"
>
<h3 class="title">苏州应急执法计划管理系统</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
type="text"
auto-complete="off"
placeholder="账号"
>
<svg-icon
slot="prefix"
icon-class="user"
class="el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
v-model="loginForm.password"
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter.native="handleLogin"
>
<svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaEnabled">
<el-input
v-model="loginForm.code"
auto-complete="off"
placeholder="验证码"
style="width: 63%"
@keyup.enter.native="handleLogin"
>
<svg-icon
slot="prefix"
icon-class="validCode"
class="el-input__icon input-icon"
/>
</el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img" />
</div>
</el-form-item>
<el-checkbox
v-model="loginForm.rememberMe"
style="margin: 0px 0px 25px 0px"
>记住密码</el-checkbox
<div class="loginTitle">
<div class="lg-img"></div>
<div class="lg-text">苏州应急执法计划管理系统</div>
</div>
<div class="lg-centerbox">
<el-form
ref="loginForm"
:model="loginForm"
:rules="loginRules"
class="login-form"
>
<el-form-item style="width: 100%">
<el-button
:loading="loading"
size="medium"
type="primary"
style="width: 100%"
@click.native.prevent="handleLogin"
>
<span v-if="!loading"> </span>
<span v-else> ...</span>
</el-button>
<div style="float: right" v-if="register">
<router-link class="link-type" :to="'/register'"
>立即注册</router-link
<h3 class="title">欢迎登录!</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
type="text"
auto-complete="off"
placeholder="用户名"
>
</div>
</el-form-item>
</el-form>
<div slot="prefix" class="iconO">
<div class="iconUser"></div>
</div>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
v-model="loginForm.password"
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter.native="handleLogin"
>
<div slot="prefix" class="iconO">
<div class="iconUser1"></div>
</div>
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaEnabled">
<el-input
v-model="loginForm.code"
auto-complete="off"
placeholder="请输入验证码"
style="width: 63%"
@keyup.enter.native="handleLogin"
>
</el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img" />
</div>
</el-form-item>
<el-checkbox
v-model="loginForm.rememberMe"
style="margin: 0px 0px 25px 0px"
>记住密码</el-checkbox
>
<el-form-item style="width: 100%">
<div class="loginfooterbox">
<el-button
:loading="loading"
size="medium"
type="primary"
style="width: 100%"
@click.native.prevent="handleLogin"
>
<span v-if="!loading"> </span>
<span v-else> ...</span>
</el-button>
</div>
<div style="float: right" v-if="register">
<router-link class="link-type" :to="'/register'"
>立即注册</router-link
>
</div>
</el-form-item>
</el-form>
<div class="lg-backImg"></div>
</div>
<!-- 底部 -->
<div class="el-login-footer">
<!-- <div class="el-login-footer">
<span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>
</div>
</div> -->
</div>
</template>
@ -121,6 +123,7 @@ export default {
watch: {
$route: {
handler: function (route) {
console.log(route);
this.redirect = route.query && route.query.redirect;
},
immediate: true,
@ -156,6 +159,8 @@ export default {
this.$refs.loginForm.validate((valid) => {
if (valid) {
this.loading = true;
// this.$router.push({ path: "/home" }).catch(() => {});
if (this.loginForm.rememberMe) {
Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies.set("password", encrypt(this.loginForm.password), {
@ -188,25 +193,100 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss">
.loginfooterbox .el-button {
background: #115ba4 !important;
border-color: #115ba4 !important;
font-family: "Alibaba-PuHuiTi-Regular.otf";
box-shadow: 0px 1px 9px 0px #ffffff;
border-radius: 27px;
}
.lg-backImg {
height: 450px;
width: 517px;
background-size: 100% 100%;
background-image: url("../assets/images/ysLogin.png");
margin-right: 140px;
}
.login {
display: flex;
justify-content: center;
align-items: center;
display: block;
height: 100%;
background-image: url("../assets/images/login-background.jpg");
background-image: url("../assets/images/bg@2x.jpg");
background-size: cover;
.loginTitle {
display: flex;
align-items: center;
justify-content: center;
height: 200px;
.lg-img {
height: 68px;
width: 68px;
background-image: url("../assets/images/logo.png");
background-size: 100% 100%;
margin-right: 20px;
}
.lg-text {
font-size: 46px;
color: #ffffff;
font-family: "xiniu";
background: linear-gradient(0deg, #c4c8ce 0%, #ffffff 100%);
-webkit-background-clip: text;
-moz-background-clip: text;
background-clip: text;
color: transparent;
}
}
.lg-centerbox {
height: calc(100% - 200px);
width: 100%;
display: flex;
flex-direction: row-reverse;
}
}
.iconO {
height: 100%;
width: 14px;
display: flex;
align-items: center;
justify-content: center;
margin-left: 2px;
.iconUser {
height: 13px;
width: 13px;
background-size: 100% 100%;
background-image: url("../assets/images/yonghu@2x.png");
}
.iconUser1 {
height: 13px;
width: 13px;
background-size: 100% 100%;
background-image: url("../assets/images/mima@2x.png");
}
}
.title {
margin: 0px auto 30px auto;
text-align: center;
color: #707070;
margin: 0px auto 22px auto;
font-size: 18px;
text-align: left;
color: #1e2b3f;
font-family: "Alibaba-PuHuiTi-Regular.otf";
}
.lg-centerbox {
.el-checkbox {
margin-bottom: 22px !important;
}
}
.login-form {
border-radius: 6px;
background: #ffffff;
width: 400px;
padding: 25px 25px 5px 25px;
width: 340px;
height: 360px;
box-sizing: border-box;
padding: 35px 35px 5px 35px;
margin-right: 260px;
margin-top: 20px;
background: rgba(229, 236, 246, 0.95);
box-shadow: 0px 1px 32px 0px #0c4990;
border-radius: 10px;
.el-input {
height: 38px;
input {

@ -1,331 +0,0 @@
<template>
<div class="login">
<div class="loginTitle">
<div class="lg-img"></div>
<div class="lg-text">苏州应急执法计划管理系统</div>
</div>
<div class="lg-centerbox">
<el-form
ref="loginForm"
:model="loginForm"
:rules="loginRules"
class="login-form"
>
<h3 class="title">欢迎登录!</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
type="text"
auto-complete="off"
placeholder="用户名"
>
<div slot="prefix" class="iconO">
<div class="iconUser"></div>
</div>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
v-model="loginForm.password"
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter.native="handleLogin"
>
<div slot="prefix" class="iconO">
<div class="iconUser1"></div>
</div>
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaEnabled">
<el-input
v-model="loginForm.code"
auto-complete="off"
placeholder="请输入验证码"
style="width: 63%"
@keyup.enter.native="handleLogin"
>
</el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img" />
</div>
</el-form-item>
<el-checkbox
v-model="loginForm.rememberMe"
style="margin: 0px 0px 25px 0px"
>记住密码</el-checkbox
>
<el-form-item style="width: 100%">
<div class="loginfooterbox">
<el-button
:loading="loading"
size="medium"
type="primary"
style="width: 100%"
@click.native.prevent="handleLogin"
>
<span v-if="!loading"> </span>
<span v-else> ...</span>
</el-button>
</div>
<div style="float: right" v-if="register">
<router-link class="link-type" :to="'/register'"
>立即注册</router-link
>
</div>
</el-form-item>
</el-form>
<div class="lg-backImg"></div>
</div>
<!-- 底部 -->
<!-- <div class="el-login-footer">
<span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>
</div> -->
</div>
</template>
<script>
import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from "@/utils/jsencrypt";
export default {
name: "Login",
data() {
return {
codeUrl: "",
loginForm: {
username: "admin",
password: "admin123",
rememberMe: false,
code: "",
uuid: "",
},
loginRules: {
username: [
{ required: true, trigger: "blur", message: "请输入您的账号" },
],
password: [
{ required: true, trigger: "blur", message: "请输入您的密码" },
],
code: [{ required: true, trigger: "change", message: "请输入验证码" }],
},
loading: false,
//
captchaEnabled: true,
//
register: false,
redirect: undefined,
};
},
watch: {
$route: {
handler: function (route) {
console.log(route);
this.redirect = route.query && route.query.redirect;
},
immediate: true,
},
},
created() {
// this.getCode();
// this.getCookie();
},
methods: {
getCode() {
getCodeImg().then((res) => {
this.captchaEnabled =
res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid;
}
});
},
getCookie() {
const username = Cookies.get("username");
const password = Cookies.get("password");
const rememberMe = Cookies.get("rememberMe");
this.loginForm = {
username: username === undefined ? this.loginForm.username : username,
password:
password === undefined ? this.loginForm.password : decrypt(password),
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
};
},
handleLogin() {
this.$refs.loginForm.validate((valid) => {
if (valid) {
// this.loading = true;
this.$router.push({ path: "/home" }).catch(() => {});
// if (this.loginForm.rememberMe) {
// Cookies.set("username", this.loginForm.username, { expires: 30 });
// Cookies.set("password", encrypt(this.loginForm.password), {
// expires: 30,
// });
// Cookies.set("rememberMe", this.loginForm.rememberMe, {
// expires: 30,
// });
// } else {
// Cookies.remove("username");
// Cookies.remove("password");
// Cookies.remove("rememberMe");
// }
// this.$store
// .dispatch("Login", this.loginForm)
// .then(() => {
// this.$router.push({ path: this.redirect || "/" }).catch(() => {});
// })
// .catch(() => {
// this.loading = false;
// if (this.captchaEnabled) {
// this.getCode();
// }
// });
}
});
},
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.loginfooterbox .el-button {
background: #115ba4 !important;
border-color: #115ba4 !important;
font-family: "Alibaba-PuHuiTi-Regular.otf";
box-shadow: 0px 1px 9px 0px #ffffff;
border-radius: 27px;
}
.lg-backImg {
height: 450px;
width: 517px;
background-size: 100% 100%;
background-image: url("../assets/images/ysLogin.png");
margin-right: 140px;
}
.login {
display: block;
height: 100%;
background-image: url("../assets/images/bg@2x.jpg");
background-size: cover;
.loginTitle {
display: flex;
align-items: center;
justify-content: center;
height: 200px;
.lg-img {
height: 68px;
width: 68px;
background-image: url("../assets/images/logo.png");
background-size: 100% 100%;
margin-right: 20px;
}
.lg-text {
font-size: 46px;
color: #ffffff;
font-family: "xiniu";
background: linear-gradient(0deg, #c4c8ce 0%, #ffffff 100%);
-webkit-background-clip: text;
-moz-background-clip: text;
background-clip: text;
color: transparent;
}
}
.lg-centerbox {
height: calc(100% - 200px);
width: 100%;
display: flex;
flex-direction: row-reverse;
}
}
.iconO {
height: 100%;
width: 14px;
display: flex;
align-items: center;
justify-content: center;
margin-left: 2px;
.iconUser {
height: 13px;
width: 13px;
background-size: 100% 100%;
background-image: url("../assets/images/yonghu@2x.png");
}
.iconUser1 {
height: 13px;
width: 13px;
background-size: 100% 100%;
background-image: url("../assets/images/mima@2x.png");
}
}
.title {
margin: 0px auto 22px auto;
font-size: 18px;
text-align: left;
color: #1e2b3f;
font-family: "Alibaba-PuHuiTi-Regular.otf";
}
.lg-centerbox {
.el-checkbox {
margin-bottom: 22px !important;
}
}
.login-form {
width: 340px;
height: 360px;
box-sizing: border-box;
padding: 35px 35px 5px 35px;
margin-right: 260px;
margin-top: 20px;
background: rgba(229, 236, 246, 0.95);
box-shadow: 0px 1px 32px 0px #0c4990;
border-radius: 10px;
.el-input {
height: 38px;
input {
height: 38px;
}
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
.login-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.login-code {
width: 33%;
height: 38px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
.el-login-footer {
height: 40px;
line-height: 40px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #fff;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
}
.login-code-img {
height: 38px;
}
</style>

@ -37,7 +37,7 @@
</div>
<div class="my-checkbox">
<el-checkbox-group v-model="checkList" @change="setmealSelect">
<el-checkbox label="">全部</el-checkbox>
<el-checkbox label="00">全部</el-checkbox>
<el-checkbox label="1">已检查</el-checkbox>
<el-checkbox label="0">未检查</el-checkbox>
</el-checkbox-group>
@ -47,6 +47,9 @@
<div class="export" @click="searchList" style="margin-right: 10px">
<span>搜索</span>
</div>
<div class="export" @click="chongzhiList" style="margin-right: 10px">
<span>重置</span>
</div>
<div class="export" @click="exportFile">
<img src="@/assets/images/export.png" alt="" />
<span>导出excel</span>
@ -133,7 +136,13 @@
v-for="(item, index) in listDes"
:key="index"
>
{{ item.value }}
{{
item.value == "null"
? ""
: item.value == "false"
? "暂无"
: item.value
}}
</el-descriptions-item>
</el-descriptions>
</div>
@ -165,9 +174,9 @@ export default {
district: "",
plannedYear: "",
//
checkStatus: "",
checkStatus: "00",
},
checkList: [""],
checkList: ["00"],
checkListTwo: [],
listDes: [
{
@ -276,11 +285,6 @@ export default {
label: "重大危险源等级",
value: "",
},
{
eng: "operatingStatus",
label: "经营状态",
value: "",
},
{
eng: "regAddr",
label: "注册地址",
@ -307,6 +311,24 @@ export default {
this.xzList();
},
methods: {
reset() {
this.form = {
district: "",
plannedYear: "",
//
checkStatus: "00",
};
this.searchBefore = {
pageSize: 10,
pageNum: 1,
};
},
//
chongzhiList() {
this.reset();
this.getList();
},
xzList() {
xzTree().then((res) => {
console.log(res);
@ -348,7 +370,7 @@ export default {
},
searchList() {
this.form.district = this.district[this.district.length - 1];
this.searchBefore = Object.assign(this.searchBefore, this.form);
this.searchBefore = { ...this.searchBefore, ...this.form };
this.getList();
},
getList() {
@ -365,12 +387,12 @@ export default {
this.checkList = this.checkList.slice(-1);
if (this.checkList.length > 0) {
this.checkListTwo = this.checkList;
this.form.checkStatus = this.checkList[0]
this.form.checkStatus = this.checkList[0];
} else {
this.checkList = this.checkListTwo;
}
},
// tabsclass
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
@ -390,9 +412,8 @@ export default {
},
//
pagesChange(pages) {
console.log(pages);
this.searchBefore.pageNum = pages.current;
this.searchBefore.pageSize = pages.size;
this.searchBefore.pageNum = pages.pageNum;
this.searchBefore.pageSize = pages.pageSize;
this.getList();
},
//

File diff suppressed because it is too large Load Diff

@ -68,7 +68,7 @@
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="year" label="计划年份" header-align="center">
<template slot-scope="scope">
{{ $moment(scope.row.year).format("yyyy-MM") }}
{{ $moment(new Date(scope.row.year)).format("yyyy-MM") }}
</template>
</el-table-column>
<el-table-column
@ -131,6 +131,7 @@
label-width="100px"
class="demo-ruleForm"
ref="form1"
:rules="rules"
>
<el-row>
<el-col :span="24">
@ -148,7 +149,7 @@
<el-input
v-model="form.entCode"
size="small"
placeholder="请输入企业代码"
placeholder="请输入企业信用代码"
></el-input>
</el-form-item>
</el-col>
@ -162,7 +163,6 @@
size="small"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
@ -227,7 +227,7 @@
<div class="filtrate">
<el-descriptions :column="2" border>
<el-descriptions-item label="计划年份">
{{ parseTime(details.year, "{y}") }}
{{ $moment(new Date(details.year)).format("yyyy-MM") }}
</el-descriptions-item>
<el-descriptions-item label="企业名称">
{{ details.enterpriseName }}
@ -298,17 +298,15 @@ export default {
addShow: false,
//
details: {},
// rules: {
// enterpriseName: [
// { required: true, message: "", trigger: "blur" },
// ],
// entCode: [
// { required: true, message: "", trigger: "blur" },
// ],
// remark: [{ required: true, message: "", trigger: "blur" }],
// type: [{ required: true, message: "", trigger: "blur" }],
// year: [{ required: true, message: "", trigger: "blur" }],
// },
rules: {
enterpriseName: [
{ required: true, message: "请输入企业名称", trigger: "blur" },
],
entCode: [
{ required: true, message: "请输入企业信用代码", trigger: "blur" },
],
year: [{ required: true, message: "请选择年份", trigger: "blur" }],
},
//
total: 0,
fileList: [],
@ -320,7 +318,7 @@ export default {
methods: {
handleRemove() {},
searchList() {
this.searchBefore = Object.assign(this.searchBefore, this.queryParms);
this.searchBefore = { ...this.searchBefore, ...this.queryParms };
this.getList();
},
reset() {
@ -348,7 +346,9 @@ export default {
//
getList() {
this.loading = true;
// console.log(this.searchBefore);
listEnterprise(this.searchBefore).then((res) => {
// console.log(res);
this.tableData = res.data.list;
this.loading = false;
this.total = res.data.total;
@ -375,6 +375,7 @@ export default {
//
look(e) {
getEnterprise(e.id).then((res) => {
console.log(res);
this.details = res.data;
this.addShow = true;
});
@ -457,8 +458,9 @@ export default {
},
//
pagesChange(pages) {
this.searchBefore.pageSize = pages.size;
this.searchBefore.pageNum = pages.current;
// console.log(pages);
this.searchBefore.pageSize = pages.pageSize;
this.searchBefore.pageNum = pages.pageNum;
this.getList();
},
handleSuccess() {},

@ -25,7 +25,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === "production" ? "/mudu-manage/" : "/",
publicPath: process.env.NODE_ENV === "production" ? "/demo/suzhouyingjiPC/" : "/",
// 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist
outputDir: "dist",
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
@ -49,7 +49,7 @@ module.exports = {
// },
// },
'/api': {
target: `http://39.101.188.84:9033/pharmaceuticals`,
target: `http://39.101.188.84:9033`,
changeOrigin: true,
pathRewrite: {
'^/api': ''

Loading…
Cancel
Save