Commit 19a3deaa by li_hongchao

Merge remote-tracking branch 'origin/dev_zwpt' into dev_zwpt

parents 614c3b3a efa2a985
...@@ -47,10 +47,10 @@ function nowTime () {//获取当前时间 ...@@ -47,10 +47,10 @@ function nowTime () {//获取当前时间
} }
let reqParam = { // 用户操作日志 let reqParam = { // 用户操作日志
logUserIp: localStorage.getItem("userIP"), // 操作人ip地址 logUserIp: localStorage.getItem("userIP"), // 操作人ip地址
// logUserName: JSON.parse(localStorage.getItem("userInfo")).name || "", // 操作人姓名 logUserName: JSON.parse(localStorage.getItem("userInfo")) ? JSON.parse(localStorage.getItem("userInfo")).name : "", // 操作人姓名
// logUserId: JSON.parse(localStorage.getItem("userInfo")).id || "", // 操作人id logUserId: JSON.parse(localStorage.getItem("userInfo")) ? JSON.parse(localStorage.getItem("userInfo")).id : "", // 操作人id
// logDwCode: JSON.parse(localStorage.getItem("userInfo")).unitCode || "", // 日志单位代码 logDwCode: JSON.parse(localStorage.getItem("userInfo")) ? JSON.parse(localStorage.getItem("userInfo")).unitCode : "", // 日志单位代码
// logDwName: JSON.parse(localStorage.getItem("userInfo")).unitName || "", // 日志单位名称 logDwName: JSON.parse(localStorage.getItem("userInfo")) ? JSON.parse(localStorage.getItem("userInfo")).unitName : "", // 日志单位名称
logTime: nowTime() logTime: nowTime()
} }
let userInfo = Base64.encode(JSON.stringify(reqParam)) let userInfo = Base64.encode(JSON.stringify(reqParam))
......
<template> <template>
<div id="home-div"> <div id="home-div">
<div <div id="home" :class="{ zhanshi: isCropper || loading_sd }">
id="home"
:class="{ zhanshi: isCropper || loading_sd }"
>
<el-container class="layout-container"> <el-container class="layout-container">
<transition name="slide"> <transition name="slide">
<el-aside <el-aside :width="isCollapse ? '4rem' : '17.5rem'" class="aside">
:width="isCollapse ? '4rem' : '17.5rem'"
class="aside"
>
<div <div
class="logo" class="logo"
:class="{ minLogo: isCollapse }" :class="{ minLogo: isCollapse }"
@click="$router.push('/index')" @click="$router.push('/index')"
v-if="this.$store.state.tm.tmType==false" v-if="this.$store.state.tm.tmType == false"
> >
<img <img class="jh" src="../assets/img/Home/jh.png" alt="" />
class="jh"
src="../assets/img/Home/jh.png"
alt=""
/>
<img <img
v-show="!isCollapse" v-show="!isCollapse"
class="title" class="title"
...@@ -32,7 +22,7 @@ ...@@ -32,7 +22,7 @@
class="logo" class="logo"
:class="{ minLogo: isCollapse }" :class="{ minLogo: isCollapse }"
@click="$router.push('/index')" @click="$router.push('/index')"
v-if="this.$store.state.tm.tmType==true" v-if="this.$store.state.tm.tmType == true"
> >
<img <img
v-show="isCollapse" v-show="isCollapse"
...@@ -64,10 +54,7 @@ ...@@ -64,10 +54,7 @@
@select="selectPath" @select="selectPath"
:unique-opened="true" :unique-opened="true"
> >
<div <div v-for="(menu, i) in routes" :key="i">
v-for="(menu, i) in routes"
:key="i"
>
<el-submenu <el-submenu
:index="menu.name" :index="menu.name"
v-if="menu.children && !menu.hidden" v-if="menu.children && !menu.hidden"
...@@ -78,23 +65,12 @@ ...@@ -78,23 +65,12 @@
:src="menu.icon_d" :src="menu.icon_d"
alt="" alt=""
/> />
<img <img v-else :src="menu.icon_a" alt="" />
v-else
:src="menu.icon_a"
alt=""
/>
<span v-show="!isCollapse">{{ menu.meta.title }}</span> <span v-show="!isCollapse">{{ menu.meta.title }}</span>
</template> </template>
<div <div v-for="(item, index) in menu.children" :key="index">
v-for="(item, index) in menu.children" <el-menu-item v-if="!item.hidden" :index="item.name"
:key="index" >{{ item.meta.title }}
>
<el-menu-item
v-if="!item.hidden"
:index="item.name"
>{{
item.meta.title
}}
</el-menu-item> </el-menu-item>
</div> </div>
</el-submenu> </el-submenu>
...@@ -107,11 +83,7 @@ ...@@ -107,11 +83,7 @@
:src="menu.icon_d" :src="menu.icon_d"
alt="" alt=""
/> />
<img <img v-else :src="menu.icon_a" alt="" />
v-else
:src="menu.icon_a"
alt=""
/>
<span slot="title">{{ menu.meta.title }}</span> <span slot="title">{{ menu.meta.title }}</span>
</el-menu-item> </el-menu-item>
</div> </div>
...@@ -122,30 +94,15 @@ ...@@ -122,30 +94,15 @@
src="../assets/img/Home/logo.png" src="../assets/img/Home/logo.png"
alt="" alt=""
/> />
<img <img v-else src="../assets/img/Home/fang.png" alt="" />
v-else
src="../assets/img/Home/fang.png"
alt=""
/>
</div> </div>
</el-aside> </el-aside>
</transition> </transition>
<el-container class="container-dom"> <el-container class="container-dom">
<el-header class="header"> <el-header class="header">
<div <div class="collapse" @click="switchCollapse">
class="collapse" <img v-if="isCollapse" :src="rightImg" alt="" />
@click="switchCollapse" <img v-else :src="leftImg" alt="" />
>
<img
v-if="isCollapse"
:src="rightImg"
alt=""
/>
<img
v-else
:src="leftImg"
alt=""
/>
</div> </div>
<el-tabs <el-tabs
class="tabs" class="tabs"
...@@ -169,14 +126,8 @@ ...@@ -169,14 +126,8 @@
<div class="message"> <div class="message">
<div class="circle"></div> <div class="circle"></div>
</div> </div>
<div <div class="quit" @click="$router.push('/index')"></div>
class="quit" <div class="logout" @click="logout">
@click="$router.push('/index')"
></div>
<div
class="logout"
@click="logout"
>
<svg-icon <svg-icon
v-show="!isHoverLogout" v-show="!isHoverLogout"
icon-class="logout_d" icon-class="logout_d"
...@@ -236,63 +187,33 @@ ...@@ -236,63 +187,33 @@
> >
<span>当前页面有未保存的指位特征,是否退出?</span> <span>当前页面有未保存的指位特征,是否退出?</span>
<div class="dialog-footer"> <div class="dialog-footer">
<button <button class="confirm-btn" @click="confirmJumpRoute"></button>
class="confirm-btn" <button class="cancel-btn" @click="cancelJumpRoute"></button>
@click="confirmJumpRoute"
></button>
<button
class="cancel-btn"
@click="cancelJumpRoute"
></button>
</div> </div>
</el-dialog> </el-dialog>
<div <div class="shadow" v-show="isCropper"></div>
class="shadow" <div class="loading" v-show="loading_sd">
v-show="isCropper"
></div>
<div
class="loading"
v-show="loading_sd"
>
<div class="loading-finger"> <div class="loading-finger">
<img <img src="../assets/img/loadingfinger.gif" alt="" />
src="../assets/img/loadingfinger.gif"
alt=""
/>
</div> </div>
<div class="loading-name"> <div class="loading-name">
<img <img src="../assets/img/loadingtxt.gif" alt="" />
src="../assets/img/loadingtxt.gif"
alt=""
/>
</div> </div>
</div> </div>
<div <div class="smallLoading" v-show="smallLoading">
class="smallLoading"
v-show="smallLoading"
>
<div class="loading-finger"> <div class="loading-finger">
<img <img src="../assets/img/loadingfinger.gif" alt="" />
src="../assets/img/loadingfinger.gif"
alt=""
/>
</div> </div>
<div class="loading-name"> <div class="loading-name">
<img <img src="../assets/img/loadingtxt.gif" alt="" />
src="../assets/img/loadingtxt.gif"
alt=""
/>
</div> </div>
</div> </div>
<!-- 人像 --> <!-- 人像 -->
<transition name="el-fade-in-linear"> <transition name="el-fade-in-linear">
<div <div class="face-big" v-show="enLargeFace">
class="face-big"
v-show="enLargeFace"
>
<div class="face-name">{{ rxInfoEnlarge.name }}</div> <div class="face-name">{{ rxInfoEnlarge.name }}</div>
<img <img
class="face-img" class="face-img"
...@@ -305,79 +226,83 @@ ...@@ -305,79 +226,83 @@
</template> </template>
<script> <script>
import html2canvas from 'html2canvas' import html2canvas from "html2canvas";
import '@/icons/logout_d.svg' import "@/icons/logout_d.svg";
import '@/icons/logout_a.svg' import "@/icons/logout_a.svg";
import indexRoutes from '@/router/modules/index' import indexRoutes from "@/router/modules/index";
import { mapGetters, mapState } from 'vuex' import { mapGetters, mapState } from "vuex";
import utils from '@/utils/util.js' import utils from "@/utils/util.js";
export default { export default {
name: 'Home', name: "Home",
data () { data() {
return { return {
searchTxt: '', searchTxt: "",
routes: this.$store.getters['layout/leftMenuData'], routes: this.$store.getters["layout/leftMenuData"],
isCollapse: false, isCollapse: false,
leftImg: require('../assets/img/Home/left.png'), leftImg: require("../assets/img/Home/left.png"),
rightImg: require('../assets/img/Home/right.png'), rightImg: require("../assets/img/Home/right.png"),
paths: [], paths: [],
menuActive: '', menuActive: "",
isHoverLogout: false, isHoverLogout: false,
routePath: '', routePath: "",
// 截屏出来的img url // 截屏出来的img url
cropperImage: '', cropperImage: "",
// 是否展示毛玻璃 // 是否展示毛玻璃
isCropper: false, isCropper: false,
// 是否跳转路由 // 是否跳转路由
jumpRouteDialogVisible: false, jumpRouteDialogVisible: false,
// 路由跳转的方式----- 1.面包屑切换。2.面包屑删除当前。3.左侧菜单跳转 // 路由跳转的方式----- 1.面包屑切换。2.面包屑删除当前。3.左侧菜单跳转
routeChangeType: 'change', routeChangeType: "change",
// 人像信息 // 人像信息
rxInfoEnlarge: {}, rxInfoEnlarge: {},
// isStRole: false, // isStRole: false,
} };
}, },
mounted () { mounted() {
console.log(this.routes); console.log(this.routes);
console.log(this.loading_sd) console.log(this.loading_sd);
this.$store.commit('loading/setLoadingSd', false) this.$store.commit("loading/setLoadingSd", false);
let self = this let self = this;
this.menuActive = this.$route.name this.menuActive = this.$route.name;
// 是否模糊 // 是否模糊
this.$bus.on('isBlur', (isBlur) => { this.$bus.on("isBlur", (isBlur) => {
if (isBlur) { if (isBlur) {
self.isCropper = true self.isCropper = true;
self.$store.commit('loading/setGlass', true) self.$store.commit("loading/setGlass", true);
} else { } else {
self.isCropper = false self.isCropper = false;
self.$store.commit('loading/setGlass', false) self.$store.commit("loading/setGlass", false);
} }
}) });
// 活体采集新增人员点击取消后
this.$bus.on("xzryResetForm", (name) => {
self.tabRemove(name);
});
// 初始化人像是否放大 // 初始化人像是否放大
self.$store.commit('ryzwbj/setEnlargeFace', false) self.$store.commit("ryzwbj/setEnlargeFace", false);
document.querySelector('.shadow').addEventListener('click', function (e) { document.querySelector(".shadow").addEventListener("click", function (e) {
// 如果图像是处于放大状态 // 如果图像是处于放大状态
if (self.enLargeFace) { if (self.enLargeFace) {
self.isCropper = false self.isCropper = false;
self.$store.commit('ryzwbj/setEnlargeFace', false) self.$store.commit("ryzwbj/setEnlargeFace", false);
} }
}) });
// 获取放大的人像信息 // 获取放大的人像信息
this.$bus.on('setRxInfoEnlarge', (rxInfoEnlarge) => { this.$bus.on("setRxInfoEnlarge", (rxInfoEnlarge) => {
console.log(11111111111) console.log(11111111111);
self.rxInfoEnlarge = rxInfoEnlarge self.rxInfoEnlarge = rxInfoEnlarge;
}) });
// this.isStRole = user.isStRole() // this.isStRole = user.isStRole()
}, },
updated () { updated() {
this.menuActive = this.$route.name this.menuActive = this.$route.name;
}, },
computed: { computed: {
...mapGetters(['defaultGoodsImage', 'userAuth']), ...mapGetters(["defaultGoodsImage", "userAuth"]),
...mapState({ ...mapState({
loading: (state) => state.loading.loading, loading: (state) => state.loading.loading,
preRoute: (state) => state.loading.preRoute, preRoute: (state) => state.loading.preRoute,
...@@ -387,8 +312,8 @@ export default { ...@@ -387,8 +312,8 @@ export default {
enLargeFace: (state) => state.ryzwbj.enLargeFace, enLargeFace: (state) => state.ryzwbj.enLargeFace,
loading_sd: (state) => state.loading.loading_sd, loading_sd: (state) => state.loading.loading_sd,
}), }),
cachePageName () { cachePageName() {
return this.$store.state.layout.cachePageName return this.$store.state.layout.cachePageName;
}, },
}, },
methods: { methods: {
...@@ -406,19 +331,18 @@ export default { ...@@ -406,19 +331,18 @@ export default {
* @return {*} * @return {*}
*/ */
logout () { logout() {
this.$axios this.$axios
.get('/security/logout') .get("/security/logout")
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
localStorage.removeItem('token') //删除名称为“token”的信息。 localStorage.removeItem("token"); //删除名称为“token”的信息。
localStorage.removeItem('userInfo') //删除名称为“userInfor”的信息。 localStorage.removeItem("userInfo"); //删除名称为“userInfor”的信息。
this.$router.replace('/Login') this.$router.replace("/Login");
this.$message.info('退出成功!') this.$message.info("退出成功!");
} }
}) })
.catch((err) => { .catch((err) => {});
})
}, },
/** /**
* @description: 开始搜索 * @description: 开始搜索
...@@ -426,11 +350,11 @@ export default { ...@@ -426,11 +350,11 @@ export default {
* @return {*} * @return {*}
*/ */
goSearch () { goSearch() {
this.searchTxt = '' this.searchTxt = "";
//console.log(this.searchTxt); //console.log(this.searchTxt);
}, },
handleClick ({ name }) { handleClick({ name }) {
/* /*
if ( if (
(this.$route.name === 'ryzwbj' || this.$route.name === 'ajzwbj') && !this.jumproute (this.$route.name === 'ryzwbj' || this.$route.name === 'ajzwbj') && !this.jumproute
...@@ -463,149 +387,149 @@ export default { ...@@ -463,149 +387,149 @@ export default {
/** /**
* 确认需要跳转路由 * 确认需要跳转路由
*/ */
confirmJumpRoute () { confirmJumpRoute() {
// 清除sessionStorage值 // 清除sessionStorage值
sessionStorage.clear() sessionStorage.clear();
this.isCropper = false this.isCropper = false;
this.jumpRouteDialogVisible = false this.jumpRouteDialogVisible = false;
if (this.routeChangeType === 'change') { if (this.routeChangeType === "change") {
if (this.willRoute == '/Home/htzwcj') { if (this.willRoute == "/Home/htzwcj") {
this.$router.push(this.willRoute) this.$router.push(this.willRoute);
this.menuActive = '' this.menuActive = "";
} else { } else {
let routerObj = this.paths.find((i) => i.routeName == this.willRoute) let routerObj = this.paths.find((i) => i.routeName == this.willRoute);
this.$router.push(routerObj.path) this.$router.push(routerObj.path);
this.menuActive = routerObj.routeName this.menuActive = routerObj.routeName;
} }
} else if (this.routeChangeType === 'del') { } else if (this.routeChangeType === "del") {
let routerObj = this.paths.find((i) => i.routeName == this.$route.name) let routerObj = this.paths.find((i) => i.routeName == this.$route.name);
if (routerObj) { if (routerObj) {
let pathName = routerObj.name let pathName = routerObj.name;
let res = this.paths.filter((item) => { let res = this.paths.filter((item) => {
return item.name != pathName return item.name != pathName;
}) });
if (pathName == this.$route.meta.title) { if (pathName == this.$route.meta.title) {
if (this.paths.length > 0) { if (this.paths.length > 0) {
// debugger; // debugger;
let routerIndex = this.paths.findIndex( let routerIndex = this.paths.findIndex(
(i) => i.routeName == this.$route.name (i) => i.routeName == this.$route.name
) );
if (routerIndex == 0) { if (routerIndex == 0) {
this.$router.push(this.paths[1].path) this.$router.push(this.paths[1].path);
this.routePath = this.paths[1].routeName this.routePath = this.paths[1].routeName;
} else { } else {
this.$router.push(this.paths[routerIndex - 1].path) this.$router.push(this.paths[routerIndex - 1].path);
this.routePath = this.paths[routerIndex - 1].routeName this.routePath = this.paths[routerIndex - 1].routeName;
} }
} }
} }
this.paths = res this.paths = res;
} }
sessionStorage.setItem( sessionStorage.setItem(
'crumbs', "crumbs",
utils.Encrypt(JSON.stringify(this.paths)) utils.Encrypt(JSON.stringify(this.paths))
) );
this.setKeepAlive() this.setKeepAlive();
} else { } else {
this.$router.push({ name: this.willRoute }) this.$router.push({ name: this.willRoute });
} }
}, },
/** /**
* 取消跳转路由 * 取消跳转路由
*/ */
cancelJumpRoute () { cancelJumpRoute() {
this.jumpRouteDialogVisible = false this.jumpRouteDialogVisible = false;
this.isCropper = false this.isCropper = false;
this.routePath = this.$route.name this.routePath = this.$route.name;
this.menuActive = '' this.menuActive = "";
}, },
tabRemove (name) { tabRemove(name) {
if (name != 'ryzwbj' && name != 'ajzwbj') { if (name != "ryzwbj" && name != "ajzwbj") {
let routerObj = this.paths.find((i) => i.routeName == name) let routerObj = this.paths.find((i) => i.routeName == name);
if (routerObj) { if (routerObj) {
let pathName = routerObj.name let pathName = routerObj.name;
let res = this.paths.filter((item) => { let res = this.paths.filter((item) => {
return item.name != pathName return item.name != pathName;
}) });
if (pathName == this.$route.meta.title) { if (pathName == this.$route.meta.title) {
if (this.paths.length > 0) { if (this.paths.length > 0) {
// debugger; // debugger;
let routerIndex = this.paths.findIndex( let routerIndex = this.paths.findIndex(
(i) => i.routeName == name (i) => i.routeName == name
) );
if (routerIndex == 0) { if (routerIndex == 0) {
this.$router.push(this.paths[1].path) this.$router.push(this.paths[1].path);
this.routePath = this.paths[1].routeName this.routePath = this.paths[1].routeName;
} else { } else {
this.$router.push(this.paths[routerIndex - 1].path) this.$router.push(this.paths[routerIndex - 1].path);
this.routePath = this.paths[routerIndex - 1].routeName this.routePath = this.paths[routerIndex - 1].routeName;
} }
} }
} }
this.paths = res this.paths = res;
} }
sessionStorage.setItem( sessionStorage.setItem(
'crumbs', "crumbs",
utils.Encrypt(JSON.stringify(this.paths)) utils.Encrypt(JSON.stringify(this.paths))
) );
this.setKeepAlive() this.setKeepAlive();
return return;
} else { } else {
if ( if (
(this.$route.name === 'ryzwbj' || this.$route.name === 'ajzwbj') && (this.$route.name === "ryzwbj" || this.$route.name === "ajzwbj") &&
!this.jumproute !this.jumproute
) { ) {
this.jumpRouteDialogVisible = true this.jumpRouteDialogVisible = true;
this.isCropper = true this.isCropper = true;
this.$store.commit('loading/setWillRoute', name) this.$store.commit("loading/setWillRoute", name);
this.routePath = name this.routePath = name;
this.routeChangeType = 'del' this.routeChangeType = "del";
} else { } else {
let routerObj = this.paths.find((i) => i.routeName == name) let routerObj = this.paths.find((i) => i.routeName == name);
if (routerObj) { if (routerObj) {
let pathName = routerObj.name let pathName = routerObj.name;
let res = this.paths.filter((item) => { let res = this.paths.filter((item) => {
return item.name != pathName return item.name != pathName;
}) });
if (pathName == this.$route.meta.title) { if (pathName == this.$route.meta.title) {
if (this.paths.length > 0) { if (this.paths.length > 0) {
// debugger; // debugger;
let routerIndex = this.paths.findIndex( let routerIndex = this.paths.findIndex(
(i) => i.routeName == name (i) => i.routeName == name
) );
if (routerIndex == 0) { if (routerIndex == 0) {
this.$router.push(this.paths[1].path) this.$router.push(this.paths[1].path);
this.routePath = this.paths[1].routeName this.routePath = this.paths[1].routeName;
} else { } else {
this.$router.push(this.paths[routerIndex - 1].path) this.$router.push(this.paths[routerIndex - 1].path);
this.routePath = this.paths[routerIndex - 1].routeName this.routePath = this.paths[routerIndex - 1].routeName;
} }
} }
} }
this.paths = res this.paths = res;
} }
sessionStorage.setItem( sessionStorage.setItem(
'crumbs', "crumbs",
utils.Encrypt(JSON.stringify(this.paths)) utils.Encrypt(JSON.stringify(this.paths))
) );
this.setKeepAlive() this.setKeepAlive();
} }
} }
}, },
setKeepAlive () { setKeepAlive() {
let cachePageName let cachePageName;
if ( if (
JSON.parse(utils.Decrypt(sessionStorage.getItem('crumbs'))).length > 0 JSON.parse(utils.Decrypt(sessionStorage.getItem("crumbs"))).length > 0
) { ) {
cachePageName = JSON.parse( cachePageName = JSON.parse(
utils.Decrypt(sessionStorage.getItem('crumbs')) utils.Decrypt(sessionStorage.getItem("crumbs"))
) )
.map((i) => i.routeName) .map((i) => i.routeName)
.join() .join();
} else { } else {
cachePageName = '' cachePageName = "";
} }
this.$store.commit('layout/resetcachePageName', cachePageName) this.$store.commit("layout/resetcachePageName", cachePageName);
// TODO // TODO
// this.$store.commit('layout/delcachePageName', 'ryzwbj') // this.$store.commit('layout/delcachePageName', 'ryzwbj')
// this.$store.commit('layout/delcachePageName', 'ajzwbj') // this.$store.commit('layout/delcachePageName', 'ajzwbj')
...@@ -616,9 +540,9 @@ export default { ...@@ -616,9 +540,9 @@ export default {
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
goManager () { goManager() {
this.$router.push('/Home/htzwcj') this.$router.push("/Home/htzwcj");
this.menuActive = '' this.menuActive = "";
}, },
/** /**
* @description: 菜单跳转路由 * @description: 菜单跳转路由
...@@ -626,10 +550,10 @@ export default { ...@@ -626,10 +550,10 @@ export default {
* @param {*} path * @param {*} path
* @return {*} * @return {*}
*/ */
selectPath (index, path) { selectPath(index, path) {
console.log(index) console.log(index);
console.log(path) console.log(path);
if (path == 'zzwcj') { if (path == "zzwcj") {
this.$router.pushToTab({ this.$router.pushToTab({
path: "/AllPersonnelBaseIndex", path: "/AllPersonnelBaseIndex",
query: { query: {
...@@ -638,7 +562,7 @@ export default { ...@@ -638,7 +562,7 @@ export default {
}); });
return; return;
} }
this.$router.push({ name: index }) this.$router.push({ name: index });
/* /*
if ( if (
(this.$route.name === 'ryzwbj' || this.$route.name === 'ajzwbj') && !this.jumproute (this.$route.name === 'ryzwbj' || this.$route.name === 'ajzwbj') && !this.jumproute
...@@ -657,15 +581,15 @@ export default { ...@@ -657,15 +581,15 @@ export default {
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
closePaths (pathName) { closePaths(pathName) {
let res = this.paths.filter((item) => { let res = this.paths.filter((item) => {
return item.name != pathName return item.name != pathName;
}) });
this.paths = res this.paths = res;
//console.log(pathName == this.$route.meta.title); //console.log(pathName == this.$route.meta.title);
if (pathName == this.$route.meta.title) { if (pathName == this.$route.meta.title) {
this.$router.push('/Home/htzwcj') this.$router.push("/Home/htzwcj");
this.$refs.menu.activeIndex = '' this.$refs.menu.activeIndex = "";
} }
}, },
/** /**
...@@ -673,37 +597,34 @@ export default { ...@@ -673,37 +597,34 @@ export default {
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
changeRouter (route) { changeRouter(route) {
this.$router.push(route.path) this.$router.push(route.path);
this.menuActive = route.routeName this.menuActive = route.routeName;
}, },
/** /**
* @description: 展开收缩 * @description: 展开收缩
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
switchCollapse () { switchCollapse() {
this.isCollapse = !this.isCollapse this.isCollapse = !this.isCollapse;
}, },
handleOpen (key, keyPath) { handleOpen(key, keyPath) {
//console.log(key, keyPath); //console.log(key, keyPath);
}, },
handleClose (key, keyPath) { handleClose(key, keyPath) {
//console.log(key, keyPath); //console.log(key, keyPath);
}, },
}, },
beforeDestroy () { beforeDestroy() {
//组件销毁前需要解绑事件。否则会出现重复触发事件的问题 //组件销毁前需要解绑事件。否则会出现重复触发事件的问题
}, },
watch: { watch: {
enLargeFace (newValue, oldValue) { enLargeFace(newValue, oldValue) {},
}, menuActive(newValue, oldValue) {},
menuActive (newValue, oldValue) { loading(newValue, oldValue) {},
},
loading (newValue, oldValue) {
},
$route: { $route: {
handler (newValue, oldValue) { handler(newValue, oldValue) {
// console.log(oldValue); // console.log(oldValue);
// 如果是人员指纹编辑界面或者是案件指纹编辑界面,进行判断是否跳转 // 如果是人员指纹编辑界面或者是案件指纹编辑界面,进行判断是否跳转
// if(oldValue.name === 'ryzwbj' || oldValue.name === 'ajzwbj') { // if(oldValue.name === 'ryzwbj' || oldValue.name === 'ajzwbj') {
...@@ -711,45 +632,45 @@ export default { ...@@ -711,45 +632,45 @@ export default {
// } // }
//console.log(this.routePath, 11111111111); //console.log(this.routePath, 11111111111);
//console.log(newValue, 11111111111); //console.log(newValue, 11111111111);
this.routePath = newValue.name this.routePath = newValue.name;
setTimeout(() => { setTimeout(() => {
//console.log(1); //console.log(1);
if (newValue.path != '/Home/htzwcj') { if (newValue.path != "/Home/htzwcj") {
if (this.paths.length == 0) { if (this.paths.length == 0) {
this.paths.push({ this.paths.push({
name: newValue.meta.title, name: newValue.meta.title,
path: newValue.path, path: newValue.path,
routeName: newValue.name, routeName: newValue.name,
}) });
} else { } else {
let obj = { let obj = {
name: newValue.meta.title, name: newValue.meta.title,
path: newValue.path, path: newValue.path,
routeName: newValue.name, routeName: newValue.name,
} };
if ( if (
this.paths.findIndex((i) => i.routeName == newValue.name) === -1 this.paths.findIndex((i) => i.routeName == newValue.name) === -1
) { ) {
this.paths.push(obj) this.paths.push(obj);
} }
} }
} }
sessionStorage.setItem( sessionStorage.setItem(
'crumbs', "crumbs",
utils.Encrypt(JSON.stringify(this.paths)) utils.Encrypt(JSON.stringify(this.paths))
) );
this.setKeepAlive() this.setKeepAlive();
}, 0) }, 0);
}, },
immediate: true, immediate: true,
}, },
}, },
created () { created() {
this.paths = sessionStorage.getItem('crumbs') this.paths = sessionStorage.getItem("crumbs")
? JSON.parse(utils.Decrypt(sessionStorage.getItem('crumbs'))) ? JSON.parse(utils.Decrypt(sessionStorage.getItem("crumbs")))
: [] : [];
}, },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
// 人像 // 人像
......
<template> <template>
<div class='systemLog'> <div class='systemLog'>
<div class="head"> <div class="head">
<!-- <el-form <el-form
:model="queryParams" :model="systemLogParam"
ref="queryForm" ref="queryForm"
:inline="true" :inline="true"
label-width="100px" class="queryForm"
> >
<el-form-item label="查询模板:"> <div class="headLeft">
<el-select <el-form-item label="查询单位:">
v-model="queryParams.code" <Cascader
placeholder="请选择参数2" :form="systemLogParam"
clearable id="logDwCode"
size="small" ></Cascader>
> </el-form-item>
<el-option <el-form-item label="查询日期:">
v-for="dict in codeOptions" <el-date-picker
:key="dict.dictValue" v-model="cxsj"
:label="dict.dictLabel" type="date"
:value="dict.dictValue" placeholder="选择日期"
/> >
</el-select> </el-date-picker>
</el-form-item> </el-form-item>
</div>
<el-form-item label="采集时间:"> <div class='headRight'>
<el-date-picker <el-form-item>
v-model="queryParams.value1" <el-button
type="date" type="text"
placeholder="选择日期" class="qk"
> >清空</el-button>
</el-date-picker> <el-button class="cx">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item </div>
label="采集单位:" </el-form>
prop="orgLevel"
>
<el-select
v-model="queryParams.code"
placeholder="请选择参数2"
clearable
size="small"
>
<el-option
v-for="dict in codeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label='采集方式:'>
<el-checkbox-group
v-model="queryParams.checkboxGroup1"
size="small"
>
<el-checkbox
label="1"
border
>捺印指掌纹</el-checkbox>
<el-checkbox
label="2"
border
>现场指掌纹</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item>
<el-checkbox v-model="queryParams.checked">上报全国指掌纹</el-checkbox>
</el-form-item>
<el-form-item>
<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-form-item>
</el-form> -->
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Cascader from "@/components/Cascader.vue";
export default { export default {
name: "systemLog" name: "systemLog",
components: {
Cascader,
},
data () {
return {
systemLogParam: {
logDwCode: '', // 查询单位代码
logTimeStart: '', // 开始时间
logTimeEnd: '',// 结束时间
pageSize: "",// 显示条数
currPage: '',// 当前页码
},
cxsj: '', // 查询时间
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -102,6 +68,11 @@ export default { ...@@ -102,6 +68,11 @@ export default {
border-radius: 10px; border-radius: 10px;
padding: 24px; padding: 24px;
box-sizing: border-box; box-sizing: border-box;
.queryForm {
display: flex;
justify-content: space-between;
}
} }
} }
@import "@/assets/css/globalBase.scss";
</style> </style>
\ No newline at end of file
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-09-07 10:31:34 * @Date: 2021-09-07 10:31:34
* @LastEditTime: 2022-01-13 23:57:19 * @LastEditTime: 2022-01-14 11:07:29
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\zzwlr\Index.vue * @FilePath: \founder_vue\src\views\zzwlr\Index.vue
...@@ -25,7 +25,14 @@ ...@@ -25,7 +25,14 @@
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<el-form :label-position="labelPosition" :inline="true" :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-form-inline"> <el-form
:label-position="labelPosition"
:inline="true"
:model="ruleForm"
:rules="rules"
ref="ruleForm"
class="demo-form-inline"
>
<!-- 一 --> <!-- 一 -->
<el-row class="title"> <el-row class="title">
<div class="colorDiv"></div> <div class="colorDiv"></div>
...@@ -34,33 +41,65 @@ ...@@ -34,33 +41,65 @@
<!-- 二 --> <!-- 二 -->
<el-row class="item-row"> <el-row class="item-row">
<el-form-item label="人员编号:" prop="ysxtAsjxgrybh"> <el-form-item label="人员编号:" prop="ysxtAsjxgrybh">
<el-input v-model.trim="ruleForm.ysxtAsjxgrybh" placeholder="请输入人员编号" maxlength="22" class="inputBh" show-word-limit clearable> <el-input
v-model.trim="ruleForm.ysxtAsjxgrybh"
placeholder="请输入人员编号"
maxlength="22"
class="inputBh"
show-word-limit
clearable
>
<template slot="prepend" class="preR">R</template> <template slot="prepend" class="preR">R</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item class="no_require" label="警综人员编号:"> <el-form-item class="no_require" label="警综人员编号:">
<el-input v-model.trim="ruleForm.jzrybh" placeholder="请输入警综人员编号" maxlength="23" show-word-limit clearable> <el-input
v-model.trim="ruleForm.jzrybh"
placeholder="请输入警综人员编号"
maxlength="23"
show-word-limit
clearable
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<!-- 三 --> <!-- 三 -->
<el-row class="item-row"> <el-row class="item-row">
<el-form-item label="采集信息原因:" prop="cjxxyydm"> <el-form-item label="采集信息原因:" prop="cjxxyydm">
<SelectCode codeUrl="/api/code/cjxxyydm" width="18.75" :clearable="true" :form="ruleForm" id="cjxxyydm" ref="cjxxyydm" multiple :multipleLimit="5"></SelectCode> <SelectCode
codeUrl="/api/code/cjxxyydm"
width="18.75"
:clearable="true"
:form="ruleForm"
id="cjxxyydm"
ref="cjxxyydm"
multiple
:multipleLimit="5"
></SelectCode>
</el-form-item> </el-form-item>
<el-form-item class="no_require" label="指掌纹卡编号:"> <el-form-item class="no_require" label="指掌纹卡编号:">
<!-- --> <!-- -->
<el-input v-model.trim="ruleForm.zzhwkbh" placeholder="请输入指掌纹卡编号" maxlength="23" show-word-limit clearable></el-input> <el-input
v-model.trim="ruleForm.zzhwkbh"
placeholder="请输入指掌纹卡编号"
maxlength="23"
show-word-limit
clearable
></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<!-- 四 --> <!-- 四 -->
<el-row class="item-row"> <el-row class="item-row">
<el-form-item> <el-form-item> </el-form-item>
</el-form-item>
<el-form-item class="no_require" label="案事件相关人员编号:"> <el-form-item class="no_require" label="案事件相关人员编号:">
<!-- --> <!-- -->
<el-input v-model.trim="ruleForm.asjxgrybh" placeholder="请输入案事件相关人员编号" maxlength="23" show-word-limit clearable></el-input> <el-input
v-model.trim="ruleForm.asjxgrybh"
placeholder="请输入案事件相关人员编号"
maxlength="23"
show-word-limit
clearable
></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-divider></el-divider> <el-divider></el-divider>
...@@ -72,67 +111,143 @@ ...@@ -72,67 +111,143 @@
<!-- 六 --> <!-- 六 -->
<el-row class="item-row"> <el-row class="item-row">
<el-form-item label="姓名:" prop="xm"> <el-form-item label="姓名:" prop="xm">
<el-input v-model.trim="ruleForm.xm" placeholder="请输入姓名" clearable maxlength="50" show-word-limit> <el-input
v-model.trim="ruleForm.xm"
placeholder="请输入姓名"
clearable
maxlength="50"
show-word-limit
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item class="no_require" label="别名/绰号:"> <el-form-item class="no_require" label="别名/绰号:">
<el-input v-model.trim="ruleForm.bmch" placeholder="请输入别名/绰号" maxlength="50" show-word-limit clearable> <el-input
v-model.trim="ruleForm.bmch"
placeholder="请输入别名/绰号"
maxlength="50"
show-word-limit
clearable
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<!-- 七 --> <!-- 七 -->
<el-row class="item-row"> <el-row class="item-row">
<el-form-item label="性别:" prop="xbdm"> <el-form-item label="性别:" prop="xbdm">
<SelectCode codeUrl="/api/code/sex" width="18.75" clearable :form="ruleForm" id="xbdm"></SelectCode> <SelectCode
codeUrl="/api/code/sex"
width="18.75"
clearable
:form="ruleForm"
id="xbdm"
></SelectCode>
</el-form-item> </el-form-item>
<el-form-item label="出生日期:" prop="csrq"> <el-form-item label="出生日期:" prop="csrq">
<el-date-picker type="date" placeholder="请选择出生日期" v-model="ruleForm.csrq" style="width: 100%" :picker-options="{ <el-date-picker
type="date"
placeholder="请选择出生日期"
v-model="ruleForm.csrq"
style="width: 100%"
:picker-options="{
disabledDate: disabledDate, disabledDate: disabledDate,
}"></el-date-picker> }"
></el-date-picker>
</el-form-item> </el-form-item>
</el-row> </el-row>
<!-- 八 --> <!-- 八 -->
<el-row class="item-row"> <el-row class="item-row">
<el-form-item label="国籍:" prop="gjdm"> <el-form-item label="国籍:" prop="gjdm">
<SelectCode codeUrl="/api/code/nationality" width="18.75" :form="ruleForm" id="gjdm"></SelectCode> <SelectCode
codeUrl="/api/code/nationality"
width="18.75"
:form="ruleForm"
id="gjdm"
></SelectCode>
</el-form-item> </el-form-item>
<el-form-item label="民族:" prop="mzdm"> <el-form-item label="民族:" prop="mzdm">
<SelectCode codeUrl="/api/code/nation" width="18.75" clearable :form="ruleForm" id="mzdm"></SelectCode> <SelectCode
codeUrl="/api/code/nation"
width="18.75"
clearable
:form="ruleForm"
id="mzdm"
></SelectCode>
</el-form-item> </el-form-item>
</el-row> </el-row>
<!-- 九 --> <!-- 九 -->
<el-row class="item-row"> <el-row class="item-row">
<el-form-item label="证件类型:" prop="cyzjdm"> <el-form-item label="证件类型:" prop="cyzjdm">
<SelectCode codeUrl="/api/code/certificates" width="18.75" clearable :form="ruleForm" id="cyzjdm"> <SelectCode
codeUrl="/api/code/certificates"
width="18.75"
clearable
:form="ruleForm"
id="cyzjdm"
>
</SelectCode> </SelectCode>
</el-form-item> </el-form-item>
<el-form-item label="证件号码:" prop="zjhm"> <el-form-item label="证件号码:" prop="zjhm">
<el-input v-model.trim="ruleForm.zjhm" placeholder="请输入证件号码" maxlength="30" show-word-limit clearable> <el-input
v-model.trim="ruleForm.zjhm"
placeholder="请输入证件号码"
maxlength="30"
show-word-limit
clearable
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row class="item-row"> <el-row class="item-row">
<el-form-item label="户籍地行政区:" prop="hjdzXzqhdm"> <el-form-item label="户籍地行政区:" prop="hjdzXzqhdm">
<Cascader :form="ruleForm" id="hjdzXzqhdm" codeName="CODE_XZQH" :width="18.75"></Cascader> <Cascader
:form="ruleForm"
id="hjdzXzqhdm"
codeName="CODE_XZQH"
:width="18.75"
></Cascader>
</el-form-item> </el-form-item>
<el-form-item label="户籍地址:" prop="hjdzDzmc"> <el-form-item label="户籍地址:" prop="hjdzDzmc">
<el-input v-model="ruleForm.hjdzDzmc" placeholder="请输入户籍地址" maxlength="100" show-word-limit clearable> <el-input
v-model="ruleForm.hjdzDzmc"
placeholder="请输入户籍地址"
maxlength="100"
show-word-limit
clearable
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row class="item-row"> <el-row class="item-row">
<el-form-item label="现住址行政区:" prop="xzzXzqhdm"> <el-form-item label="现住址行政区:" prop="xzzXzqhdm">
<Cascader :form="ruleForm" id="xzzXzqhdm" codeName="CODE_XZQH" :width="18.75"></Cascader> <Cascader
:form="ruleForm"
id="xzzXzqhdm"
codeName="CODE_XZQH"
:width="18.75"
></Cascader>
</el-form-item> </el-form-item>
<el-form-item label="现住址:" prop="xzzDzmc"> <el-form-item label="现住址:" prop="xzzDzmc">
<el-input v-model.trim="ruleForm.xzzDzmc" placeholder="请输入现住址" maxlength="100" show-word-limit clearable> <el-input
v-model.trim="ruleForm.xzzDzmc"
placeholder="请输入现住址"
maxlength="100"
show-word-limit
clearable
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row class="item-row bz"> <el-row class="item-row bz">
<el-form-item label="备注信息:"> <el-form-item label="备注信息:">
<el-input resize="none" type="textarea" placeholder="请输入内容" v-model.trim="ruleForm.bz" maxlength="1024" show-word-limit> <el-input
resize="none"
type="textarea"
placeholder="请输入内容"
v-model.trim="ruleForm.bz"
maxlength="1024"
show-word-limit
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -144,9 +259,16 @@ ...@@ -144,9 +259,16 @@
</el-row> </el-row>
<el-row class="flexBox"> <el-row class="flexBox">
<div style="margin: 0.9375rem 0"></div> <div style="margin: 0.9375rem 0"></div>
<el-checkbox-group v-model="checkedTargets" style=" <el-checkbox-group
padding-right: 6.875rem"> v-model="checkedTargets"
<el-checkbox v-for="(value,key) in targets" :key="key" :label="value.code">{{ value.name }}</el-checkbox> style="padding-right: 6.875rem"
>
<el-checkbox
v-for="(value, key) in targets"
:key="key"
:label="value.code"
>{{ value.name }}</el-checkbox
>
</el-checkbox-group> </el-checkbox-group>
</el-row> </el-row>
<el-divider></el-divider> <el-divider></el-divider>
...@@ -158,22 +280,44 @@ ...@@ -158,22 +280,44 @@
<!-- 七 --> <!-- 七 -->
<el-row class="item-row"> <el-row class="item-row">
<el-form-item label="捺印单位:" prop="nydwGajgjgdm"> <el-form-item label="捺印单位:" prop="nydwGajgjgdm">
<Cascader :form="ruleForm" id="nydwGajgjgdm" :width="18.75"></Cascader> <Cascader
:form="ruleForm"
id="nydwGajgjgdm"
:width="18.75"
></Cascader>
</el-form-item> </el-form-item>
<el-form-item label="捺印人姓名:" prop="nyryXm"> <el-form-item label="捺印人姓名:" prop="nyryXm">
<el-input v-model="ruleForm.nyryXm" placeholder="请输入捺印人姓名" maxlength="50" show-word-limit clearable> <el-input
v-model="ruleForm.nyryXm"
placeholder="请输入捺印人姓名"
maxlength="50"
show-word-limit
clearable
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<!-- 八 --> <!-- 八 -->
<el-row class="item-row"> <el-row class="item-row">
<el-form-item label="捺印日期:" prop="nysj"> <el-form-item label="捺印日期:" prop="nysj">
<el-date-picker type="date" placeholder="请输入捺印日期" v-model="ruleForm.nysj" style="width: 100%" :picker-options="{ <el-date-picker
type="date"
placeholder="请输入捺印日期"
v-model="ruleForm.nysj"
style="width: 100%"
:picker-options="{
disabledDate: disabledDate, disabledDate: disabledDate,
}"></el-date-picker> }"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="捺印人身份证号:" prop="nyryGmsfhm"> <el-form-item label="捺印人身份证号:" prop="nyryGmsfhm">
<el-input v-model="ruleForm.nyryGmsfhm" placeholder="请输入捺印人身份证号" maxlength="18" show-word-limit clearable> <el-input
v-model="ruleForm.nyryGmsfhm"
placeholder="请输入捺印人身份证号"
maxlength="18"
show-word-limit
clearable
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -181,7 +325,13 @@ ...@@ -181,7 +325,13 @@
<el-row class="item-row"> <el-row class="item-row">
<el-form-item> </el-form-item> <el-form-item> </el-form-item>
<el-form-item label="捺印人联系电话:" prop="nyryLxdh"> <el-form-item label="捺印人联系电话:" prop="nyryLxdh">
<el-input v-model="ruleForm.nyryLxdh" placeholder="请输入捺印人联系电话" maxlength="18" show-word-limit clearable> <el-input
v-model="ruleForm.nyryLxdh"
placeholder="请输入捺印人联系电话"
maxlength="18"
show-word-limit
clearable
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
...@@ -190,7 +340,9 @@ ...@@ -190,7 +340,9 @@
<!-- <el-button @click="submitForm('ruleForm')">提交</el-button> --> <!-- <el-button @click="submitForm('ruleForm')">提交</el-button> -->
<el-button @click="tijiao('ruleForm')">提交</el-button> <el-button @click="tijiao('ruleForm')">提交</el-button>
<el-button @click="resetForm('ruleForm')" type="primary">取 消</el-button> <el-button @click="resetForm('ruleForm')" type="primary"
>取 消</el-button
>
</span> </span>
</div> </div>
</div> </div>
...@@ -200,31 +352,31 @@ ...@@ -200,31 +352,31 @@
import Cascader from "@/components/Cascader.vue"; import Cascader from "@/components/Cascader.vue";
import SelectCode from "@/components/SelectCode.vue"; import SelectCode from "@/components/SelectCode.vue";
export default { export default {
name: 'xzry', name: "xzry",
components: { components: {
Cascader, Cascader,
SelectCode SelectCode,
}, },
data () { data() {
return { return {
ryInfo: {}, ryInfo: {},
// edit: '新增人员', // edit: '新增人员',
dialogVisible: false, // 弹窗状态 dialogVisible: false, // 弹窗状态
labelPosition: "left", // 数据项对齐方式 labelPosition: "left", // 数据项对齐方式
checkedTargets: ['1'], // 选定的目标逻辑库 checkedTargets: ["1"], // 选定的目标逻辑库
targets: this.$store.state.ljk.targetOptions_ry, // 目标逻辑库 targets: this.$store.state.ljk.targetOptions_ry, // 目标逻辑库
reqParam: { reqParam: {
// 请求参数 // 请求参数
page: { page: {
total: 0, //表格条数 total: 0, //表格条数
pageSize: 10, //当前选择要显示的条数 pageSize: 10, //当前选择要显示的条数
currPage: 1 // 当前在第几页 currPage: 1, // 当前在第几页
}, },
personStoreCustomSearch: { personStoreCustomSearch: {
ysxtAsjxgrybh: "", // 搜索框内容 ysxtAsjxgrybh: "", // 搜索框内容
searchOptions: 3, // 默认搜索方式 searchOptions: 3, // 默认搜索方式
checkboxQuery: [] //滚动平面等筛选条件 checkboxQuery: [], //滚动平面等筛选条件
} },
}, },
ruleForm: { ruleForm: {
ysxtAsjxgrybh: "", // 人员编号 ysxtAsjxgrybh: "", // 人员编号
...@@ -256,10 +408,10 @@ export default { ...@@ -256,10 +408,10 @@ export default {
ifidcard: "是", // 是否采集二代身份证 ifidcard: "是", // 是否采集二代身份证
zwbdxtlxms: "1", // 指纹比对描述 zwbdxtlxms: "1", // 指纹比对描述
}, },
logicList: [],// 逻辑库代码 logicList: [], // 逻辑库代码
rules: { rules: {
ysxtAsjxgrybh: [ ysxtAsjxgrybh: [
{ min: 22, max: 22, message: '编号长度有误!', trigger: 'change' }, { min: 22, max: 22, message: "编号长度有误!", trigger: "change" },
{ required: true, message: "请输入人员条码号", trigger: "blur" }, { required: true, message: "请输入人员条码号", trigger: "blur" },
], ],
jzrybh: [ jzrybh: [
...@@ -318,45 +470,46 @@ export default { ...@@ -318,45 +470,46 @@ export default {
nyryGmsfhm: [ nyryGmsfhm: [
{ required: true, message: "请输入捺印人身份证号", trigger: "blur" }, { required: true, message: "请输入捺印人身份证号", trigger: "blur" },
{ {
pattern: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/, pattern:
message: '证件号码格式有误!', /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/,
trigger: 'blur' message: "证件号码格式有误!",
} trigger: "blur",
},
], ],
nyryLxdh: [ nyryLxdh: [
{ required: true, message: "请输入捺印人联系电话", trigger: "blur" }, { required: true, message: "请输入捺印人联系电话", trigger: "blur" },
], ],
}, },
} };
}, },
mounted () { mounted() {
// console.log(this.$route.query.barcode) // console.log(this.$route.query.barcode)
if (this.$route.params.type === 'edit') { if (this.$route.params.type === "edit") {
this.edit = '修改人员' this.edit = "修改人员";
this.getRyinfo(this.$route.query.barcode) this.getRyinfo(this.$route.query.barcode);
} else { } else {
// console.log(this.$route.params.type==='edit'); // console.log(this.$route.params.type==='edit');
this.edit = '新增人员' this.edit = "新增人员";
} }
}, },
methods: { methods: {
disabledDate (a) { disabledDate(a) {
if (a.getTime() > new Date().getTime()) { if (a.getTime() > new Date().getTime()) {
return true; return true;
} else { } else {
return false; return false;
} }
}, },
tijiao (e) { tijiao(e) {
let tjType = this.$route.params.type let tjType = this.$route.params.type;
if (tjType === 'edit') { if (tjType === "edit") {
this.editForm(e) this.editForm(e);
} else { } else {
this.submitForm(e) this.submitForm(e);
} }
}, },
editForm (formName) { editForm(formName) {
let self = this let self = this;
// debugger // debugger
// console.log(self.ruleForm); // console.log(self.ruleForm);
// console.log(formName); // console.log(formName);
...@@ -365,11 +518,11 @@ export default { ...@@ -365,11 +518,11 @@ export default {
// let logicList = this.ruleForm.logicdbtype2.map(Number) // let logicList = this.ruleForm.logicdbtype2.map(Number)
// let cjxxyyList = this.ruleForm.cjxxyydm // let cjxxyyList = this.ruleForm.cjxxyydm
// delete this.ruleForm.cjxxyydm // delete this.ruleForm.cjxxyydm
this.logicList = this.checkedTargets.map(Number) this.logicList = this.checkedTargets.map(Number);
let reqParam = { let reqParam = {
personDo: "", personDo: "",
logicList: [], logicList: [],
cjxxyyList: [] cjxxyyList: [],
}; };
// reqParam.cjxxyyList = this.ruleForm.cjxxyydm // reqParam.cjxxyyList = this.ruleForm.cjxxyydm
...@@ -383,62 +536,61 @@ export default { ...@@ -383,62 +536,61 @@ export default {
reqParam.cjxxyyList = this.ruleForm.cjxxyydm; reqParam.cjxxyyList = this.ruleForm.cjxxyydm;
// reqParam.personDo.ysxtAsjxgrybh = this.ruleForm.ysxtAsjxgrybh // reqParam.personDo.ysxtAsjxgrybh = this.ruleForm.ysxtAsjxgrybh
reqParam.personDo.ysxtAsjxgrybh = 'R' + this.ruleForm.ysxtAsjxgrybh reqParam.personDo.ysxtAsjxgrybh = "R" + this.ruleForm.ysxtAsjxgrybh;
reqParam.logicList = this.logicList reqParam.logicList = this.logicList;
delete reqParam.personDo.cjxxyydm delete reqParam.personDo.cjxxyydm;
this.$axios this.$axios
.post("/api/personstore/person/file", reqParam) .post("/api/personstore/person/file", reqParam)
.then(res => { .then((res) => {
// console.log(res.data); // console.log(res.data);
if (res.data.code === 0) { if (res.data.code === 0) {
self.$message.success('修改成功!') self.$message.success("修改成功!");
// 清除全部案件库缓存 // 清除全部案件库缓存
self.$store.commit('layout/delcachePageName', 'htcj') self.$store.commit("layout/delcachePageName", "htcj");
this.$router.pushToTab({ this.$router.pushToTab({
path: `/fingerprintIndex/${reqParam.personDo.ysxtAsjxgrybh}/${this.ruleForm.xm}`, path: `/fingerprintIndex/${reqParam.personDo.ysxtAsjxgrybh}/${this.ruleForm.xm}`,
query: { query: {
type: 0 type: 0,
} },
}) });
} else { } else {
self.$message.error('修改失败!') self.$message.error("修改失败!");
} }
}) });
self.$bus.emit('isBlur', false) self.$bus.emit("isBlur", false);
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
let isError = document.getElementsByClassName('is-error') let isError = document.getElementsByClassName("is-error");
isError[0].scrollIntoView({ isError[0].scrollIntoView({
// 滚动到指定节点 // 滚动到指定节点
// 值有start,center,end,nearest,当前显示在视图区域中间 // 值有start,center,end,nearest,当前显示在视图区域中间
block: 'center', block: "center",
// 值有auto、instant,smooth,缓动动画(当前是慢速的) // 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior: 'smooth', behavior: "smooth",
}) });
}) });
return false; return false;
} }
}); });
}, },
submitForm (formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
if (this.checkedTargets.length == 0) { if (this.checkedTargets.length == 0) {
this.$message.error('请选择逻辑库') this.$message.error("请选择逻辑库");
} else { } else {
this.logicList = this.checkedTargets.map(Number) this.logicList = this.checkedTargets.map(Number);
let reqParam = { let reqParam = {
personDo: "", personDo: "",
logicList: [], logicList: [],
cjxxyyList: [] cjxxyyList: [],
}; };
reqParam.cjxxyyList = this.ruleForm.cjxxyydm reqParam.cjxxyyList = this.ruleForm.cjxxyydm;
delete this.ruleForm.cjxxyydm delete this.ruleForm.cjxxyydm;
reqParam.personDo = this.ruleForm; reqParam.personDo = this.ruleForm;
reqParam.personDo.ysxtAsjxgrybh = this.ruleForm.ysxtAsjxgrybh reqParam.personDo.ysxtAsjxgrybh = this.ruleForm.ysxtAsjxgrybh;
reqParam.personDo.ysxtAsjxgrybh = 'R' + this.ruleForm.ysxtAsjxgrybh reqParam.personDo.ysxtAsjxgrybh = "R" + this.ruleForm.ysxtAsjxgrybh;
reqParam.logicList = this.logicList reqParam.logicList = this.logicList;
this.$axios this.$axios
.post("/api/personstore/personadd", reqParam) .post("/api/personstore/personadd", reqParam)
.then((response) => { .then((response) => {
...@@ -449,10 +601,10 @@ export default { ...@@ -449,10 +601,10 @@ export default {
this.$router.pushToTab({ this.$router.pushToTab({
path: `/fingerprintIndex/${reqParam.personDo.ysxtAsjxgrybh}/${this.ruleForm.xm}`, path: `/fingerprintIndex/${reqParam.personDo.ysxtAsjxgrybh}/${this.ruleForm.xm}`,
query: { query: {
type: 1 type: 1,
} },
}) });
this.$store.commit('layout/delcachePageName', 'htcj') this.$store.commit("layout/delcachePageName", "htcj");
this.ruleForm = { this.ruleForm = {
ysxtAsjxgrybh: "", // 人员编号 ysxtAsjxgrybh: "", // 人员编号
jzrybh: "", // 警综人员编号 jzrybh: "", // 警综人员编号
...@@ -482,11 +634,11 @@ export default { ...@@ -482,11 +634,11 @@ export default {
ifidcard: "是", // 是否采集二代身份证 ifidcard: "是", // 是否采集二代身份证
zwbdxtlxms: "1", // 指纹比对描述 zwbdxtlxms: "1", // 指纹比对描述
} };
this.checkedTargets = ['1']// 选定的目标逻辑库 this.checkedTargets = ["1"]; // 选定的目标逻辑库
} else { } else {
this.$message.error("新增失败"); this.$message.error("新增失败");
this.$set(this.ruleForm, 'cjxxyydm', []) this.$set(this.ruleForm, "cjxxyydm", []);
// this.$set(this.ruleForm, 'ysxtAsjxgrybh', this.ruleForm.ysxtAsjxgrybh.substring(1, 23)) // this.$set(this.ruleForm, 'ysxtAsjxgrybh', this.ruleForm.ysxtAsjxgrybh.substring(1, 23))
} }
}); });
...@@ -496,69 +648,75 @@ export default { ...@@ -496,69 +648,75 @@ export default {
} }
}); });
}, },
resetForm (formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.dialogVisible = false; this.dialogVisible = false;
this.$bus.emit("xzryResetForm", "xzry");
}, },
initData () { initData() {
// 赋值 // 赋值
this.ruleForm.id = this.ryInfo.id this.ruleForm.id = this.ryInfo.id;
this.ruleForm.rybh = this.ryInfo.ysxtAsjxgrybh this.ruleForm.rybh = this.ryInfo.ysxtAsjxgrybh;
this.ruleForm.jzrybh = this.ryInfo.jzrybh this.ruleForm.jzrybh = this.ryInfo.jzrybh;
// 人员档案信息 // 人员档案信息
if (this.ryInfo.cjxxyydm) { if (this.ryInfo.cjxxyydm) {
this.ruleForm.cjxxyydm = this.ryInfo.cjxxyydm.split(',') this.ruleForm.cjxxyydm = this.ryInfo.cjxxyydm.split(",");
} }
this.ruleForm.zzhwkbh = this.ryInfo.zzhwkbh this.ruleForm.zzhwkbh = this.ryInfo.zzhwkbh;
this.ruleForm.asjxgrybh = this.ryInfo.asjxgrybh this.ruleForm.asjxgrybh = this.ryInfo.asjxgrybh;
this.ruleForm.xm = this.ryInfo.xm this.ruleForm.xm = this.ryInfo.xm;
this.ruleForm.bmch = this.ryInfo.bmch this.ruleForm.bmch = this.ryInfo.bmch;
this.ruleForm.xbdm = this.ryInfo.xbdm this.ruleForm.xbdm = this.ryInfo.xbdm;
this.ruleForm.csrq = this.ryInfo.csrq this.ruleForm.csrq = this.ryInfo.csrq;
this.ruleForm.gjdm = this.ryInfo.gjdm this.ruleForm.gjdm = this.ryInfo.gjdm;
this.ruleForm.mzdm = this.ryInfo.mzdm this.ruleForm.mzdm = this.ryInfo.mzdm;
this.ruleForm.cyzjdm = this.ryInfo.cyzjdm this.ruleForm.cyzjdm = this.ryInfo.cyzjdm;
this.ruleForm.zjhm = this.ryInfo.zjhm this.ruleForm.zjhm = this.ryInfo.zjhm;
this.ruleForm.hjdzXzqhdm = this.ryInfo.hjdzXzqhdm this.ruleForm.hjdzXzqhdm = this.ryInfo.hjdzXzqhdm;
this.ruleForm.hjdzDzmc = this.ryInfo.hjdzDzmc this.ruleForm.hjdzDzmc = this.ryInfo.hjdzDzmc;
this.ruleForm.xzzXzqhdm = this.ryInfo.xzzXzqhdm this.ruleForm.xzzXzqhdm = this.ryInfo.xzzXzqhdm;
this.ruleForm.xzzDzmc = this.ryInfo.xzzDzmc this.ruleForm.xzzDzmc = this.ryInfo.xzzDzmc;
this.ruleForm.bz = this.ryInfo.bz this.ruleForm.bz = this.ryInfo.bz;
// 人员逻辑分库 // 人员逻辑分库
// let ryljfk = this.ryInfo.logicdbtype.split('') // let ryljfk = this.ryInfo.logicdbtype.split('')
// this.ruleForm.logicdbtype = ryljfk // this.ruleForm.logicdbtype = ryljfk
if (this.ryInfo.logicDatabaseCode && this.ryInfo.logicDatabaseCode.length > 0) { if (
this.ruleForm.logicdbtype2 = this.ryInfo.logicDatabaseCode.split(',') this.ryInfo.logicDatabaseCode &&
this.ryInfo.logicDatabaseCode.length > 0
) {
this.ruleForm.logicdbtype2 = this.ryInfo.logicDatabaseCode.split(",");
} else { } else {
this.ruleForm.logicdbtype2 = [] this.ruleForm.logicdbtype2 = [];
} }
this.ruleForm.nydwGajgjgdm = this.ryInfo.nydwGajgjgdm this.ruleForm.nydwGajgjgdm = this.ryInfo.nydwGajgjgdm;
this.ruleForm.nyryXm = this.ryInfo.nyryXm this.ruleForm.nyryXm = this.ryInfo.nyryXm;
this.ruleForm.nysj = this.ryInfo.nysj this.ruleForm.nysj = this.ryInfo.nysj;
this.ruleForm.nyryGmsfhm = this.ryInfo.nyryGmsfhm this.ruleForm.nyryGmsfhm = this.ryInfo.nyryGmsfhm;
this.ruleForm.nyryLxdh = this.ryInfo.nyryLxdh this.ruleForm.nyryLxdh = this.ryInfo.nyryLxdh;
}, },
getRyinfo (code) { getRyinfo(code) {
let self = this let self = this;
this.reqParam.personStoreCustomSearch.ysxtAsjxgrybh = code this.reqParam.personStoreCustomSearch.ysxtAsjxgrybh = code;
this.$axios this.$axios
.post("/api/personstore/person/list", this.reqParam) .post("/api/personstore/person/list", this.reqParam)
.then(response => { .then((response) => {
if (response.data.code === 0) { if (response.data.code === 0) {
self.ryInfo = response.data.ret.list[0] self.ryInfo = response.data.ret.list[0];
self.initData() self.initData();
this.ruleForm.ysxtAsjxgrybh = self.ryInfo.ysxtAsjxgrybh this.ruleForm.ysxtAsjxgrybh = self.ryInfo.ysxtAsjxgrybh;
// this.ruleForm = self.ryInfo // this.ruleForm = self.ryInfo
this.ruleForm.ysxtAsjxgrybh = self.ryInfo.ysxtAsjxgrybh.toString().substr(1) this.ruleForm.ysxtAsjxgrybh = self.ryInfo.ysxtAsjxgrybh
.toString()
.substr(1);
} else { } else {
self.$message.error(response.data.message); self.$message.error(response.data.message);
} }
}); });
}, },
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./xzry.scss"; @import "./xzry.scss";
</style> </style>
\ No newline at end of file
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