Commit e6150762 by li_hongchao

审核功能调整

parent 8abd8648
......@@ -6,77 +6,83 @@
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\main.js
*/
import Vue from "vue";
import "./plugins/axios";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./plugins/element.js";
import Util from "./utils/util";
import VueWechatTitle from "vue-wechat-title";
import Watermark from "./utils/watermark.js";
import Driver from "driver.js";
import Video from "video.js";
import "video.js/dist/video-js.css";
import "driver.js/dist/driver.min.css";
import "./assets/css/global.css";
import "./assets/css/el-table-style.css";
import VueClipboard from "vue-clipboard2";
import VueBus from "vue-bus";
import moment from "moment";
import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import Util from './utils/util'
import LoggerUtil from './utils/LoggerUtil'
import UserUtil from './utils/UserUtil'
import VueWechatTitle from 'vue-wechat-title'
import Watermark from './utils/watermark.js'
import Driver from 'driver.js'
import Video from 'video.js'
import 'video.js/dist/video-js.css'
import 'driver.js/dist/driver.min.css'
import './assets/css/global.css'
import './assets/css/el-table-style.css'
import VueClipboard from 'vue-clipboard2'
import VueBus from 'vue-bus'
import moment from 'moment'
// import "lib-flexible";
import "./utils/rem";
import './utils/rem'
//引入svg组件
import IconSvg from "./utils/IconSvg.vue";
import IconSvg from './utils/IconSvg.vue'
//全局注册svg-icon
Vue.component("svg-icon", IconSvg);
moment.locale('zh-cn');
Vue.prototype.$moment = moment;
Vue.component('svg-icon', IconSvg)
moment.locale('zh-cn')
Vue.prototype.$moment = moment
// 引入上传组件
import uploader from "vue-simple-uploader";
Vue.use(uploader);
import uploader from 'vue-simple-uploader'
Vue.use(uploader)
Vue.prototype.$driver = new Driver({
className: "scoped-class", // className to wrap driver.js popover
className: 'scoped-class', // className to wrap driver.js popover
animate: true, // Animate while changing highlighted element
opacity: 0.75, // Background opacity (0 means only popovers and without overlay)
padding: 1, // Distance of element from around the edges
allowClose: true, // Whether clicking on overlay should close or not
overlayClickNext: false, // Should it move to next step on overlay click
doneBtnText: "完成", // Text on the final button
closeBtnText: "关闭", // Text on the close button for this step
nextBtnText: "下一步", // Next button text for this step
prevBtnText: "上一步" // Previous button text for this step
});
doneBtnText: '完成', // Text on the final button
closeBtnText: '关闭', // Text on the close button for this step
nextBtnText: '下一步', // Next button text for this step
prevBtnText: '上一步' // Previous button text for this step
})
Vue.prototype.$video = Video
Vue.prototype.$video = Video;
import Nsloading from './components/Loading.vue'
import Nsloading from "./components/Loading.vue";
Vue.prototype.$store = store;
Vue.prototype.$store = store
const LoadingCons = Vue.extend(Nsloading);
const LoadingCons = Vue.extend(Nsloading)
// 常用工具函数
Vue.prototype.$util = Util;
window.util = Util;
Vue.use(VueWechatTitle);
Vue.use(VueClipboard);
Vue.use(VueBus);
Vue.prototype.$util = Util
window.util = Util
window.logger = LoggerUtil
window.user = UserUtil
Vue.use(VueWechatTitle)
Vue.use(VueClipboard)
Vue.use(VueBus)
Vue.directive("nsLoading", {
Vue.directive('nsLoading', {
bind(el, binding) {
const instance = new LoadingCons({
el: document.createElement("div"),
el: document.createElement('div'),
data: {}
});
el.appendChild(instance.$el);
el.instance = instance;
})
el.appendChild(instance.$el)
el.instance = instance
Vue.nextTick(() => {
el.instance.isShow = binding.value;
console.log(123);
});
console.log(el.instance);
console.log(binding);
el.instance.isShow = binding.value
console.log(123)
})
console.log(el.instance)
console.log(binding)
},
/**
* 所在组件的 VNode 更新时调用
......@@ -86,8 +92,8 @@ Vue.directive("nsLoading", {
update(el, binding) {
// 通过对比值的变化判断loading是否显示
if (binding.oldValue !== binding.value) {
el.instance.isShow = binding.value;
console.log(123456);
el.instance.isShow = binding.value
console.log(123456)
}
// console.log(binding);
},
......@@ -96,17 +102,17 @@ Vue.directive("nsLoading", {
* @param {*} el
*/
unbind(el) {
const mask = el.instance.$el;
const mask = el.instance.$el
if (mask.parentNode) {
mask.parentNode.removeChild(mask);
mask.parentNode.removeChild(mask)
}
el.instance.$destroy();
el.instance = undefined;
el.instance.$destroy()
el.instance = undefined
}
});
})
new Vue({
router,
store,
render: h => h(App)
}).$mount("#app");
}).$mount('#app')
......@@ -301,14 +301,23 @@ export default [
component: () => import('@/views/bzxxgl/bzxxfh.vue')
},
{
path: '/bzxxsh',
name: 'bzxxsh',
path: '/dsBzxxsh',
name: 'dsBzxxsh',
meta: {
title: '地市比中信息审核',
sTtitle: '省厅比中信息复/审核',
auth: 'G-2',
parentId: 'bzxxgl'
},
component: () => import('@/views/bzxxgl/bzxxsh.vue')
component: () => import('@/views/bzxxgl/dsBzxxsh.vue')
},
{
path: '/stBzxxsh',
name: 'stBzxxsh',
meta: {
title: '省厅比中信息复/审核',
auth: 'G-2',
parentId: 'bzxxgl'
},
component: () => import('@/views/bzxxgl/stBzxxsh.vue')
},
]
export default function stRole() {
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
// console.log('用户信息:', userInfo)
let username = userInfo.username
// console.log('用户名称:', username)
if (username === '123123') {// 省级 123123,市级 321321
return true
} else {
return false
}
/**
* Description: 用于管理用户信息
* @author: li_hongchao
* @date: 2021/12/20 9:46
*/
const _USER_INFO_KEY = 'userInfo'
export default {
getUser() {// 获取用户信息
let userInfo = JSON.parse(localStorage.getItem(_USER_INFO_KEY))
return userInfo
},
setUser(userInfo) {// 保存用户信息
localStorage.setItem(_USER_INFO_KEY, JSON.stringify(userInfo))
},
isStRole() {// 是否省厅角色
let userInfo = this.getUser()
// console.log('用户信息:', userInfo)
let username = userInfo.username
// console.log('用户名称:', username)
if (username === '123123') {// 省级 123123,市级 321321
return true
} else {
return false
}
},
}
......@@ -50,7 +50,7 @@
</template>
<div v-for="(item, index) in menu.children" :key="index">
<el-menu-item v-if="!item.hidden" :index="item.name">{{
getMetaTitle(item.meta)
item.meta.title
}}
</el-menu-item>
</div>
......@@ -197,7 +197,6 @@ import '@/icons/logout_a.svg'
import indexRoutes from '@/router/modules/index'
import {mapGetters, mapState} from 'vuex'
import utils from '@/utils/util.js'
import stRole from '../utils/UserUtil'
export default {
name: 'Home',
......@@ -257,7 +256,7 @@ export default {
self.rxInfoEnlarge = rxInfoEnlarge
})
this.isStRole = stRole()
this.isStRole = user.isStRole()
},
updated() {
this.menuActive = this.$route.name
......@@ -278,14 +277,14 @@ export default {
},
},
methods: {
getMetaTitle(meta) { //用于选择标题
let _that = this
if (_that.isStRole && meta.sTtitle) {
return meta.sTtitle
} else {
return meta.title
}
},
// getMetaTitle(meta) { //用于选择标题
// let _that = this
// if (_that.isStRole && meta.sTtitle) {
// return meta.sTtitle
// } else {
// return meta.title
// }
// },
/**
* @description: 退出登录
* @param {*}
......
......@@ -43,7 +43,6 @@
<script>
import PrintLog from '../../utils/LogcatUtil'
import {bzxxPlSb, bzxxSh, bzxxZg} from '../../netmgr/bzxxgl/bzxxsh'
import stRole from '../../utils/UserUtil'
export default {
name: 'BzxxsfOpt',
......@@ -137,7 +136,7 @@ export default {
},
init() {
var _that = this
_that.isStRole = stRole()
_that.isStRole = user.isStRole()
_that.initShItem()
},
/**
......
......@@ -333,11 +333,16 @@ import Cascader from '@/components/Cascader.vue'
import bzxxsfOpt from '../bzxxgl/BzxxsfOpt.vue'
import PrintLog from '../../utils/LogcatUtil'
import {queryShList, bzxxPlSb} from '../../netmgr/bzxxgl/bzxxsh'
import stRole from '../../utils/UserUtil'
import ZzjgUtil from '../../utils/ZzjgUtil.js'
export default {
name: 'bzxxsh',
props: {
isSt: {
type: Boolean,
default: true,
}
},
data() {
return {
TAG: '比中信息审核-',
......@@ -423,7 +428,7 @@ export default {
},
created() {
let _that = this
_that.isStRole = stRole()
_that.isStRole = user.isStRole()
if (_that.isStRole) {
_that.sbBtnName = '上报公安部'
} else {
......@@ -432,7 +437,9 @@ export default {
_that.initTableColumns()
// _that.initTestData()
_that.getData()
ZzjgUtil.lastZzjg('你好。。。')
console.log('isSt', _that.isSt)
},
computed: {
roleArr() {
......@@ -697,6 +704,7 @@ export default {
.then(res => {
PrintLog('查询审核列表' + '返回结果', res, _that.TAG)
if (res.data.code === 0) {
logger.test(res.data.ret.rows)
_that.tableDate = res.data.ret.rows
_that.total = res.data.ret.total
_that.totalPage = Math.ceil(_that.total / _that.pageSize)
......
<template>
<bzxxsh is-st="false"/>
</template>
<script>
import bzxxsh from './bzxxsh'
export default {
name: 'dsBzxxsh',
components: {
bzxxsh
},
}
</script>
<style scoped>
</style>
<template>
<bzxxsh is-st="true"/>
</template>
<script>
import bzxxsh from './bzxxsh'
export default {
name: 'stBzxxsh',
components: {
bzxxsh
},
}
</script>
<style scoped>
</style>
......@@ -136,6 +136,10 @@ export default {
}
)
},
stopVideo() {
let self = this
self.player.dispose()
}
},
created() {
},
......@@ -144,6 +148,7 @@ export default {
if (self.player) {
self.player.dispose()
}
self.$bus.off('mapClear', self.stopVideo)
},
mounted() {
let self = this
......@@ -152,9 +157,7 @@ export default {
// this.$router.push("/index");
// }
this.initVideo()
// this.$bus.on('goLogin', () => {
// self.player.dispose()
// })
this.$bus.on('goLogin', self.stopVideo)
// todo 初始登录 帐号密码登录选中状态
// this.init();
......
<template>
<div class="login_account width70 middle" v-show="isShow">
<!-- todo 输入框图标样式调整-->
<el-input
class="width100 margin_top25_bottom10"
type="text"
placeholder="请输入用户名"
@keydown.enter.native="login(userInfo)"
v-model="userInfo.username"
>
<i slot="prefix" style="display: flex; align-items: center">
<img
style="
<div class="login_account width70 middle" v-show="isShow">
<!-- todo 输入框图标样式调整-->
<el-input
class="width100 margin_top25_bottom10"
type="text"
placeholder="请输入用户名"
@keydown.enter.native="login(userInfo)"
v-model="userInfo.username"
>
<i slot="prefix" style="display: flex; align-items: center">
<img
style="
margin: 1.3125rem 1.3125rem 1.3125rem 1.1875rem;
width: 1rem;
height: 1rem;
"
:src="usernameUrl"
alt
/>
</i>
</el-input>
<el-input
class="width100 margin_top25_bottom10"
type="password"
placeholder="请输入密码"
v-model="userInfo.password"
@keydown.enter.native="login(userInfo)"
>
<i slot="prefix">
<img
style="
:src="usernameUrl"
alt
/>
</i>
</el-input>
<el-input
class="width100 margin_top25_bottom10"
type="password"
placeholder="请输入密码"
v-model="userInfo.password"
@keydown.enter.native="login(userInfo)"
>
<i slot="prefix">
<img
style="
margin: 1.3125rem 1.3125rem 1.3125rem 1.1875rem;
width: 0.9375rem;
height: 0.9375rem;
"
:src="passwordUrl"
alt
/>
</i>
</el-input>
<el-button
class="login_button width100 margin_top25_bottom10"
type="primary"
ref="userLogin"
@click="login(userInfo)"
:loading="btnLoading"
>登录</el-button
>
</div>
:src="passwordUrl"
alt
/>
</i>
</el-input>
<el-button
class="login_button width100 margin_top25_bottom10"
type="primary"
ref="userLogin"
@click="login(userInfo)"
:loading="btnLoading"
>登录
</el-button
>
</div>
</template>
<script>
import qs from "qs";
import { Encrypt } from "../../../utils/AESUtils";
import qs from 'qs'
import {Encrypt} from '../../../utils/AESUtils'
export default {
name: "AccountsLogin",
props: ["loginType"],
name: 'AccountsLogin',
props: ['loginType'],
watch: {
loginType: {
immediate: true,
handler(val) {
//console.info("account参数===>", val);
if (val === true) {
this.isShow = true;
this.isShow = true
} else {
this.isShow = false;
this.isShow = false
}
},
},
......@@ -74,123 +75,132 @@ export default {
return {
btnLoading: false,
isShow: false,
userInfo: { username: "", password: "" },
usernameUrl: require("../../../assets/img/login/user.png"),
passwordUrl: require("../../../assets/img/login/password.png"),
};
userInfo: {username: '', password: ''},
usernameUrl: require('../../../assets/img/login/user.png'),
passwordUrl: require('../../../assets/img/login/password.png'),
}
},
methods: {
// 登录
login(userinfo) {
let me = this;
me.btnLoading = true;
let me = this
me.btnLoading = true
this.$axios({
url: "/security/login/myLoginForm",
method: "post",
url: '/security/login/myLoginForm',
method: 'post',
data: qs.stringify(userinfo),
headers: {
"Content-Type": "application/x-www-form-urlencoded",
'Content-Type': 'application/x-www-form-urlencoded',
},
}).then((res) => {
me.btnLoading = false;
me.btnLoading = false
if (res.data.code == 200) {
localStorage.setItem("token", res.data.token);
localStorage.setItem("userInfo", JSON.stringify(res.data.userInfo));
this.$message.success("登录成功!");
localStorage.setItem('token', res.data.token)
// localStorage.setItem("userInfo", JSON.stringify(res.data.userInfo));
user.setUser(res.data.userInfo)
this.$message.success('登录成功!')
//所在单位数据
this.$store.dispatch("publicData/_getList");
this.$router.push("/index");
this.$bus.emit("goLogin");
this.$store.commit("layout/setMenu", res.data.auth);
this.$store.dispatch('publicData/_getList')
this.$router.push('/index')
this.$bus.emit('goLogin')
this.$store.commit('layout/setMenu', res.data.auth)
} else {
this.$message.error(res.data.message);
this.$message.error(res.data.message)
}
});
})
},
},
mounted() {
// todo 选中进来清空userInfo数据
},
};
}
</script>
<style scoped>
.login_account {
height: 300px;
margin: 0 auto;
}
.login_account {
height: 300px;
margin: 0 auto;
}
.el-input {
height: 58px;
background-color: rgba(36, 54, 76, 1);
border: #24364c 1px solid;
/*设置圆角*/
border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
/*输入框添加阴影*/
.el-input:hover {
height: 58px;
background: #24364c;
box-shadow: 0 2px 6px 2px rgba(22, 140, 223, 0.41);
border-radius: 4px;
border: 1px solid #148be0;
}
.el-input {
height: 58px;
background-color: rgba(36, 54, 76, 1);
border: #24364c 1px solid;
/*设置圆角*/
border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
/deep/ .el-input__inner {
width: 75%;
font-size: 16px;
color: #ffffff;
line-height: 21px;
height: 21px;
border: none;
border-left: 2px solid #406490;
background: #24364c;
margin: 19px 23px 19px 49px;
padding: 0 0 0 21px;
/*设置圆角*/
border-top-right-radius: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
/*修改input默认字体颜色字号*/
/deep/input::-webkit-input-placeholder {
background: #24364c;
color: rgba(95, 123, 157, 1);
font-size: 16px;
}
/deep/input::-moz-input-placeholder {
background: #24364c;
color: rgba(95, 123, 157, 1);
font-size: 16px;
}
/deep/input::-ms-input-placeholder {
background: #24364c;
color: rgba(95, 123, 157, 1);
font-size: 16px;
}
.login_button {
height: 58px;
background-color: #339fec;
}
/*输入框添加阴影*/
.el-input:hover {
height: 58px;
background: #24364c;
box-shadow: 0 2px 6px 2px rgba(22, 140, 223, 0.41);
border-radius: 4px;
border: 1px solid #148be0;
}
/* 更改element-UI按钮样式 */
.el-button--primary {
font-size: 18px;
color: #ffffff;
background-color: #339fec;
/*border-color: #ff69b4;*/
}
.el-button--primary:hover {
background-color: #51b1f5;
}
.el-button--primary:focus {
background-color: #51b1f5;
}
.el-button--primary:active {
background-color: #1689db;
}
/deep/ .el-input__inner {
width: 75%;
font-size: 16px;
color: #ffffff;
line-height: 21px;
height: 21px;
border: none;
border-left: 2px solid #406490;
background: #24364c;
margin: 19px 23px 19px 49px;
padding: 0 0 0 21px;
/*设置圆角*/
border-top-right-radius: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
/*修改input默认字体颜色字号*/
/deep/ input::-webkit-input-placeholder {
background: #24364c;
color: rgba(95, 123, 157, 1);
font-size: 16px;
}
/deep/ input::-moz-input-placeholder {
background: #24364c;
color: rgba(95, 123, 157, 1);
font-size: 16px;
}
/deep/ input::-ms-input-placeholder {
background: #24364c;
color: rgba(95, 123, 157, 1);
font-size: 16px;
}
.login_button {
height: 58px;
background-color: #339fec;
}
/* 更改element-UI按钮样式 */
.el-button--primary {
font-size: 18px;
color: #ffffff;
background-color: #339fec;
/*border-color: #ff69b4;*/
}
.el-button--primary:hover {
background-color: #51b1f5;
}
.el-button--primary:focus {
background-color: #51b1f5;
}
.el-button--primary:active {
background-color: #1689db;
}
</style>
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