Commit 10848df7 by 葛青博

青岛社保问题修改

1 parent 6b1374d9
...@@ -10,12 +10,21 @@ module.exports = { ...@@ -10,12 +10,21 @@ module.exports = {
// Paths // Paths
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: '/', assetsPublicPath: '/',
proxyTable: {}, proxyTable: {
"/api1": {
target: 'http://192.168.9.115:28000', //"https://store.keliuyun.com", // 要访问的接口域名
ws: true, // 是否启用websockets
changeOrigin: true, //开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题
pathRewrite: {
"^/api1": "" //这里理解成用'/api'代替target里面的地址,比如我要调用'http://40.00.100.100:3002/user/add',直接写'/api/user/add'即可
}
}
},
useLocalIp: true,
// Various Dev Server settings // Various Dev Server settings
host: '192.168.9.102', // 'localhost', // // can be overwritten by process.env.HOST host: '192.168.9.196', // 'localhost', // // can be overwritten by process.env.HOST
port: 8990, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 8990, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false, autoOpenBrowser: true,
errorOverlay: true, errorOverlay: true,
notifyOnErrors: true, notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
......
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head>
<head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>web</title> <title>web</title>
<script> <script>
!(function() {
var randomH = Date.parse(new Date()) / 1000;
document.write("<script type='text/javascript' src='./static/config.js?s=" + randomH + "' charset='utf-8'><\/script>");
})()
</script>
<!-- <script>
!(function() { !(function() {
var platformConf = document.createElement("script"), var platformConf = document.createElement("script"),
s = document.getElementsByTagName("script")[0], s = document.getElementsByTagName("script")[0],
...@@ -12,10 +19,12 @@ ...@@ -12,10 +19,12 @@
platformConf.src = './static/config.js?_s=' + stamp; platformConf.src = './static/config.js?_s=' + stamp;
s.parentNode.insertBefore(platformConf, s); s.parentNode.insertBefore(platformConf, s);
})() })()
</script> </script> -->
</head> </head>
<body>
<body>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
</html>
</html>
\ No newline at end of file \ No newline at end of file
...@@ -2496,6 +2496,11 @@ ...@@ -2496,6 +2496,11 @@
"integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==", "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==",
"dev": true "dev": true
}, },
"blueimp-md5": {
"version": "2.18.0",
"resolved": "https://registry.npm.taobao.org/blueimp-md5/download/blueimp-md5-2.18.0.tgz?cache=0&sync_timestamp=1599372690839&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fblueimp-md5%2Fdownload%2Fblueimp-md5-2.18.0.tgz",
"integrity": "sha1-EVK+EzXwxrORHtnjbbVPPmrFKTU="
},
"bn.js": { "bn.js": {
"version": "4.11.8", "version": "4.11.8",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
......
{ {
"name": "web", "name": "web",
"version": "1.0.0", "version": "1.0.0",
"description": "A Vue.js project", "description": "A Vue.js project",
"author": "panjianbo <13651030816@163.com>", "author": "panjianbo <13651030816@163.com>",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev", "start": "npm run dev",
"unit": "jest --config test/unit/jest.conf.js --coverage", "unit": "jest --config test/unit/jest.conf.js --coverage",
"test": "npm run unit", "test": "npm run unit",
"build": "node build/build.js" "build": "node build/build.js"
}, },
"dependencies": { "dependencies": {
"@riophae/vue-treeselect": "^0.0.38", "@riophae/vue-treeselect": "^0.0.38",
"axios": "^0.18.0", "axios": "^0.18.0",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"cssnano": "^4.1.10", "cssnano": "^4.1.10",
"echarts": "^4.7.0", "echarts": "^4.7.0",
"element-ui": "^2.8.2", "element-ui": "^2.8.2",
"file-saver": "^2.0.2", "file-saver": "^2.0.2",
"ol": "^6.0.0", "ol": "^6.0.0",
"stylus": "^0.54.5", "stylus": "^0.54.5",
"stylus-loader": "^3.0.2", "stylus-loader": "^3.0.2",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-photo-zoom-pro": "^1.2.12", "vue-photo-zoom-pro": "^1.2.12",
"vue-piczoom": "^1.0.6", "vue-piczoom": "^1.0.6",
"vue-resource": "^1.5.1", "vue-resource": "^1.5.1",
"vue-router": "^3.0.1", "vue-router": "^3.0.1",
"vue-video-player": "^5.0.2", "vue-video-player": "^5.0.2",
"vue2.0-zoom": "^2.1.1", "vue2.0-zoom": "^2.1.1",
"vuex": "^3.1.1", "vuex": "^3.1.1",
"xlsx": "^0.15.1" "xlsx": "^0.15.1"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^7.1.2", "autoprefixer": "^7.1.2",
"babel-core": "^6.22.1", "babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-jest": "^24.8.0", "babel-jest": "^24.8.0",
"babel-loader": "^7.1.1", "babel-loader": "^7.1.1",
"babel-plugin-dynamic-import-node": "^1.2.0", "babel-plugin-dynamic-import-node": "^1.2.0",
"babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-runtime": "^6.22.0", "babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0", "babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2", "babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0", "babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1", "chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1", "copy-webpack-plugin": "^4.0.1",
"css-loader": "^3.0.0", "css-loader": "^3.0.0",
"extract-text-webpack-plugin": "^3.0.0", "extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4", "file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1", "friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1", "html-webpack-plugin": "^2.30.1",
"jest": "^24.8.0", "jest": "^24.8.0",
"jest-serializer-vue": "^0.3.0", "jest-serializer-vue": "^0.3.0",
"node-notifier": "^5.1.2", "node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^2.0.0", "optimize-css-assets-webpack-plugin": "^2.0.0",
"ora": "^1.2.0", "ora": "^1.2.0",
"portfinder": "^1.0.13", "portfinder": "^1.0.13",
"postcss-import": "^11.0.0", "postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8", "postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1", "postcss-url": "^7.2.1",
"rimraf": "^2.6.0", "rimraf": "^2.6.0",
"semver": "^5.3.0", "semver": "^5.3.0",
"shelljs": "^0.7.6", "shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.0.0", "uglifyjs-webpack-plugin": "^1.0.0",
"url-loader": "^2.0.1", "url-loader": "^2.0.1",
"vue-jest": "^1.0.2", "vue-jest": "^1.0.2",
"vue-loader": "^13.3.0", "vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1", "vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2", "vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0", "webpack": "^3.6.0",
"webpack-bundle-analyzer": "^3.3.2", "webpack-bundle-analyzer": "^3.3.2",
"webpack-dev-server": "^2.9.1", "webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0" "webpack-merge": "^4.1.0"
}, },
"engines": { "engines": {
"node": ">= 6.0.0", "node": ">= 6.0.0",
"npm": ">= 3.0.0" "npm": ">= 3.0.0"
}, },
"browserslist": [ "browserslist": [
"> 1%", "> 1%",
"last 2 versions", "last 2 versions",
"not ie <= 8" "not ie <= 8"
] ]
} }
\ No newline at end of file \ No newline at end of file
...@@ -8,7 +8,7 @@ Vue.use(Router) ...@@ -8,7 +8,7 @@ Vue.use(Router)
export const constantRouterMap = [{ export const constantRouterMap = [{
path: '/', path: '/',
name: 'login', name: 'login',
component: reslove => require(['@/views/login/login'], reslove), component: reslove => require(['@/views/Login/login'], reslove),
}, },
{ {
path: '/show', path: '/show',
...@@ -115,7 +115,7 @@ export const asyncRouterMap = [{ ...@@ -115,7 +115,7 @@ export const asyncRouterMap = [{
{ {
path: '/activity/report', path: '/activity/report',
name: '状态报表', name: '状态报表',
component: reslove => require(['@/views/activity/report'], reslove), component: reslove => require(['@/views/Activity/report'], reslove),
}, },
{ {
path: '/system/proofread', path: '/system/proofread',
......
import {asyncRouterMap, constantRouterMap } from '@/router/index.js' import { asyncRouterMap, constantRouterMap } from '@/router/index.js'
import defultrouter from "@/router/index.js"; import defultrouter from "@/router/index.js";
...@@ -8,22 +8,22 @@ import defultrouter from "@/router/index.js"; ...@@ -8,22 +8,22 @@ import defultrouter from "@/router/index.js";
* @param {*} roles * @param {*} roles
*/ */
function hasPerminssion(router, roles) { function hasPerminssion(router, roles) {
if (router.children && router.children.length > 0) { if (router.children && router.children.length > 0) {
if (existsChildren(router, roles)) { if (existsChildren(router, roles)) {
return true; return true;
}
} }
} let status = false;
let status = false; // let status = true
// let status = true if (roles) {
if (roles) { for (let i = 0; i < roles.length; i++) {
for (let i = 0; i < roles.length; i++) { if (roles[i].path === router.path) {
if (roles[i].path === router.path) { status = true;
status = true; break;
break; }
} }
} }
} return status;
return status;
} }
/** /**
...@@ -33,53 +33,53 @@ function hasPerminssion(router, roles) { ...@@ -33,53 +33,53 @@ function hasPerminssion(router, roles) {
* @param {*} roles * @param {*} roles
*/ */
function filterAsyncRouter(asyncRouterMap, roles) { function filterAsyncRouter(asyncRouterMap, roles) {
var newData = []; var newData = [];
// return routers // return routers
asyncRouterMap.forEach((ele, index) => { asyncRouterMap.forEach((ele, index) => {
roles.map(m => { roles.map(m => {
if (ele.path == m.path) { if (ele.path == m.path) {
let obj = ele; let obj = ele;
if (m.children && m.children.length > 0) { if (m.children && m.children.length > 0) {
obj.children = filterAsyncRouter(ele.children, m.children); obj.children = filterAsyncRouter(ele.children, m.children);
} else { } else {
obj.children = [] obj.children = []
} }
newData.push(obj); newData.push(obj);
} }
});
}); });
}); return newData;
return newData;
} }
const menu = { const menu = {
state: { state: {
routers: constantRouterMap, routers: constantRouterMap,
addRouter: [], addRouter: [],
threeMenu: [] threeMenu: []
},
mutations: {
SET_ROUTERS: (state, routers) => {
state.addRouter = routers;
state.routers = constantRouterMap.concat(routers);
defultrouter.addRoutes(routers); //合并路由
}, },
SET_THREEMENU: (state, routers) => { mutations: {
state.threeMenu = routers; SET_ROUTERS: (state, routers) => {
} state.addRouter = routers;
}, state.routers = constantRouterMap.concat(routers);
actions: { defultrouter.addRoutes(routers); //合并路由
GetMenuRole({ commit, state }, data) { },
if (data === "") { SET_THREEMENU: (state, routers) => {
commit("SET_ROUTERS", []); state.threeMenu = routers;
return; }
} else { },
console.log('aaa',data) actions: {
let accessedRouters = filterAsyncRouter(asyncRouterMap, data); GetMenuRole({ commit, state }, data) {
console.log(accessedRouters) if (data === "") {
commit("SET_ROUTERS", accessedRouters); commit("SET_ROUTERS", []);
} return;
} else {
// console.log('aaa',data)
let accessedRouters = filterAsyncRouter(asyncRouterMap, data);
// console.log(accessedRouters)
commit("SET_ROUTERS", accessedRouters);
}
}
} }
}
}; };
export default menu; export default menu;
\ No newline at end of file \ No newline at end of file
// export let url = 'http://192.168.9.208:20080/api/v1' // export let url = 'http://192.168.9.208:20080/api/v1'
// export let url = 'http://52.1.113.109:20080/api/v1' // export let url = 'http://52.1.113.109:20080/api/v1'
const { urls = '', picUrls = '', mapUrls = '' } = window.SECURITY_CONF const { urls = '', picUrls = '', mapUrls = '' } = window.SECURITY_CONF
export const mapUrl = mapUrls || location.host export const mapUrl = mapUrls || location.host
export let IP = urls || location.host export let IP = urls || location.host
if (IP.indexOf('9.102') > -1 || IP.indexOf('localhost') > -1) { if (IP.indexOf('9.102') > -1 || IP.indexOf('localhost') > -1) {
IP = 'https://store.keliuyun.com/report' IP = 'https://store.keliuyun.com/report'
// IP="/report" // IP="/report"
} }
// IP="/report" // IP="/report"
export let url = `${IP}` export let url = `${IP}` // '/api1/report' //
export let menus = `${url}/auth/api/auth/apps/23660e5593563b27832c2b8f490b458e/menus` export let menus = `${url}/auth/api/auth/apps/23660e5593563b27832c2b8f490b458e/menus`
let timer = ()=>{ let timer = () => {
return new Date().getTime() return new Date().getTime()
} }
export let auth = { export let auth = {
login: `${url}/users/login`, login: `${url}/users/login`,
accountid:`${url}/accounts`, accountid: `${url}/accounts`,
user: `${url}/users`, user: `${url}/users`,
edituser(userid){ edituser(userid) {
return `${url}/users/${userid}` return `${url}/users/${userid}`
}, },
role: `${url}/auth/roles`, role: `${url}/auth/roles`,
editrole (roleid){ editrole(roleid) {
return `${url}/auth/roles/${roleid}` return `${url}/auth/roles/${roleid}`
}, },
menusRole(roleid){ menusRole(roleid) {
return `${url}/auth/roles/${roleid}/apps/23660e5593563b27832c2b8f490b458e/menus` return `${url}/auth/roles/${roleid}/apps/23660e5593563b27832c2b8f490b458e/menus`
}, },
userRole(userid) { userRole(userid) {
return `${url}/auth/users/${userid}/roles` return `${url}/auth/users/${userid}/roles`
}, },
deleteRole(roleid) { deleteRole(roleid) {
return `${url}/auth/roles/${roleid}` return `${url}/auth/roles/${roleid}`
}, },
deleteuserRole(userid, roleid) { deleteuserRole(userid, roleid) {
return `${url}/auth/users/${userid}/roles/${roleid}` return `${url}/auth/users/${userid}/roles/${roleid}`
}, },
perms(roleid){ perms(roleid) {
return `${url}/auth/roles/${roleid}/perms` return `${url}/auth/roles/${roleid}/perms`
}, },
ugrps: `${url}/auth/ugrps`, ugrps: `${url}/auth/ugrps`,
delugrps(ugrp_unid) { delugrps(ugrp_unid) {
return `${url}/auth/ugrps/${ugrp_unid}` return `${url}/auth/ugrps/${ugrp_unid}`
}, },
userTogroup(groupid) { userTogroup(groupid) {
return `${url}/auth/ugrps/${groupid}/users` return `${url}/auth/ugrps/${groupid}/users`
}, },
delUserToGroup(groupid, userid) { delUserToGroup(groupid, userid) {
return `${url}/auth/ugrps/${groupid}/users/${userid}` return `${url}/auth/ugrps/${groupid}/users/${userid}`
}, },
///-------cyl add ///-------cyl add
getRoleUsers (roleid){ getRoleUsers(roleid) {
return `${url}/auth/roles/${roleid}/users` return `${url}/auth/roles/${roleid}/users`
}, },
} }
export let org = { export let org = {
getorgtree:`${url}/org/tree`, getorgtree: `${url}/org/tree`,
getorg:`${url}/org`, getorg: `${url}/org`,
deleteorg (org_unid){ deleteorg(org_unid) {
return `${url}/org/${org_unid}` return `${url}/org/${org_unid}`
}, },
getvchan:`${url}/org/vchans`, getvchan: `${url}/org/vchans`,
getvchanList:`${url}/org/vchans/list`, getvchanList: `${url}/org/vchans/list`,
editvchan (id){ editvchan(id) {
return `${url}/org/vchans/${id}` return `${url}/org/vchans/${id}`
} }
} }
export let faceweb = `${url}/face_web` export let faceweb = `${url}/face_web`
export let picUrl = picUrls || "https://vion-retail.oss-cn-beijing.aliyuncs.com/" export let picUrl = picUrls || "https://vion-retail.oss-cn-beijing.aliyuncs.com/"
// export let picUrl ="http://192.168.9.239/" // export let picUrl ="http://192.168.9.239/"
\ No newline at end of file \ No newline at end of file
...@@ -3,19 +3,46 @@ ...@@ -3,19 +3,46 @@
*/ */
import axios from 'axios' import axios from 'axios'
import vue from 'vue'
import router from '../router' import router from '../router'
const service = axios.create({ import { Message, Loading } from 'element-ui';
timeout: 2000000 //设置请求超时时间 import md5 from 'blueimp-md5'
})
function cleanArray(actual) {
const newArray = []
for (let i = 0; i < actual.length; i++) {
if (actual[i]) {
newArray.push(actual[i])
}
}
return newArray
}
import { Message, Loading } from 'element-ui'; function param2(json) {
if (!json) return ''
return cleanArray(
Object.keys(json).map(key => {
if (json[key] === undefined ||
json[key] === null
) return ''
return encodeURIComponent(key) + '=' + json[key]
})
).join('&')
}
const Axios = axios.create({
timeout: 0, //设置请求超时时间
withCredentials: true, // 是否允许带cookie这些
headers: {
"Content-Type": "application/json;charset=UTF-8"
}
})
window.axios = Axios;
let loading //定义loading变量 let loading //定义loading变量
function startLoading() { //使用Element loading-start 方法 function startLoading() { //使用Element loading-start 方法
loading = Loading.service({ loading = Loading.Axios({
lock: true, lock: true,
text: '加载中……', text: '加载中……',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
...@@ -48,20 +75,15 @@ export function tryHideFullScreenLoading() { ...@@ -48,20 +75,15 @@ export function tryHideFullScreenLoading() {
/**@param /**@param
* 请求前的拦截器 * 请求前的拦截器
*/ */
service.interceptors.request.use(function(config) { Axios.interceptors.request.use((config) => {
const suffix = '4c413628731691abc99eb2fca5f69aab'
const { method, params, data } = config
const token = localStorage.getItem('atoken'); const token = localStorage.getItem('atoken');
// config.headers['app-code'] = 1 // config.headers['app-code'] = 1
//截取API添加时间戳防止请求缓存 //截取API添加时间戳防止请求缓存
if (config.method == "get") {
config.params = {
_t: Date.parse(new Date()) / 1000,
...config.params
};
}
if (config.url.indexOf('codes/countries') < 1) { if (config.url.indexOf('codes/countries') < 1) {
if (config.url.indexOf('cates') < 1) { if (config.url.indexOf('cates') < 1) {
if (token) { if (token) {
// config.headers.authorization = '4db5183a-721b-4eee-b623-1d143890e813';
config.headers.authorization = token; config.headers.authorization = token;
//showFullScreenLoading(); //showFullScreenLoading();
} else { } else {
...@@ -69,6 +91,13 @@ service.interceptors.request.use(function(config) { ...@@ -69,6 +91,13 @@ service.interceptors.request.use(function(config) {
} }
} }
} }
const signalStr = method.toUpperCase() +
(params ? param2(params) : '') +
(data ? JSON.stringify(data) : '') +
suffix + (config.headers.Authorization ? config.headers.Authorization : '');
const hashSignature = md5(signalStr)
config.headers['signature'] = hashSignature
return config return config
}, function(err) { }, function(err) {
//tryHideFullScreenLoading(); //tryHideFullScreenLoading();
...@@ -79,15 +108,15 @@ service.interceptors.request.use(function(config) { ...@@ -79,15 +108,15 @@ service.interceptors.request.use(function(config) {
* @param * @param
* 响应前的拦截器 * 响应前的拦截器
*/ */
service.interceptors.response.use(function(res) { Axios.interceptors.response.use((res) => {
//tryHideFullScreenLoading(); //tryHideFullScreenLoading();
if (res.data) { if (res.data) {
if (res.data.ecode === 401) { if (res.data.ecode === 401) {
Message({ Message({
type: 'error', type: 'error',
message: res.data.enote message: res.data.enote
}) })
// router.push('/'); router.replace('/');
} }
} }
return res; return res;
...@@ -96,4 +125,4 @@ service.interceptors.response.use(function(res) { ...@@ -96,4 +125,4 @@ service.interceptors.response.use(function(res) {
return Promise.reject(err); return Promise.reject(err);
}) })
export default service
\ No newline at end of file \ No newline at end of file
export default Axios
\ No newline at end of file \ No newline at end of file
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
is_active: true, is_active: true,
sex: Vthis.facesex, sex: Vthis.facesex,
name__like: Vthis.facename, name__like: Vthis.facename,
card_id__like: Vthis.facecardid, idCard_like: Vthis.facecardid,
crucial_type: Vthis.dbname, crucial_type: Vthis.dbname,
resident_unids: this.communityunid, resident_unids: this.communityunid,
} }
......
...@@ -651,7 +651,7 @@ ...@@ -651,7 +651,7 @@
is_active: true, is_active: true,
sex: this.facesex, sex: this.facesex,
name__like: '', name__like: '',
card_id__like: '', idCard_like: '',
crucial_type: 'dl_white', crucial_type: 'dl_white',
resident_unids: '', resident_unids: '',
} }
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<div class="template-box content_div_main org-box"> <div class="template-box content_div_main org-box">
<div class="videoleft-box"> <div class="videoleft-box">
<el-tree <el-tree
v-loading="loading" v-loading="loading"
highlight-current highlight-current
:props="defaultProps" :props="defaultProps"
:load="loadNode" :load="loadNode"
lazy lazy
@node-click="handleNodeClick" @node-click="handleNodeClick"
> >
</el-tree> </el-tree>
</div> </div>
<div class="org-right-box"> <div class="org-right-box">
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
:data="tableData" :data="tableData"
:height="680" :height="680"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%;margin-top:20px" style="width: 100%; margin-top: 20px"
> >
<div slot="empty"> <div slot="empty">
<div class="no-data-box"> <div class="no-data-box">
...@@ -31,7 +31,11 @@ ...@@ -31,7 +31,11 @@
<el-table-column type="type" width="55" label="#"></el-table-column> <el-table-column type="type" width="55" label="#"></el-table-column>
<el-table-column label="本地IP" prop="localIp"></el-table-column> <el-table-column label="本地IP" prop="localIp"></el-table-column>
<el-table-column label="设备序列号" prop="serialnum"></el-table-column> <el-table-column label="设备序列号" prop="serialnum"></el-table-column>
<el-table-column label="状态" :formatter="formatHpzl" prop="status"></el-table-column> <el-table-column
label="状态"
:formatter="formatHpzl"
prop="status"
></el-table-column>
<el-table-column label="外网IP" prop="wanIp"></el-table-column> <el-table-column label="外网IP" prop="wanIp"></el-table-column>
<!-- <el-table-column label="操作"> <!-- <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -40,20 +44,44 @@ ...@@ -40,20 +44,44 @@
</el-table-column> --> </el-table-column> -->
</el-table> </el-table>
</div> </div>
<div class="dialog-org"> <!-- <div class="dialog-org">
<el-dialog title="添加组织机构" :visible.sync="dialogVisible" width="30%" @close="dialogclose()"> <el-dialog
title="添加组织机构"
:visible.sync="dialogVisible"
width="30%"
@close="dialogclose()"
>
<el-row> <el-row>
<el-form ref="orgform" :model="orgform" label-width="170px" class="demo-ruleForm"> <el-form
ref="orgform"
:model="orgform"
label-width="170px"
class="demo-ruleForm"
>
<el-form-item label="父节点名称" prop="org_name"> <el-form-item label="父节点名称" prop="org_name">
<el-input class v-model="curOrgData.org_name" disabled style="width:100%"></el-input> <el-input
class
v-model="curOrgData.org_name"
disabled
style="width: 100%"
></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="节点类型" label="节点类型"
prop="oreType" prop="oreType"
:rules="[ :rules="[
{ required: true, message: '请选择节点类型!', trigger: 'blur' } ]" {
required: true,
message: '请选择节点类型!',
trigger: 'blur',
},
]"
> >
<el-select v-model="orgform.oreType" placeholder="请选择添加类型" class="selbox"> <el-select
v-model="orgform.oreType"
placeholder="请选择添加类型"
class="selbox"
>
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
...@@ -66,9 +94,18 @@ ...@@ -66,9 +94,18 @@
label="节点名称" label="节点名称"
prop="orgname" prop="orgname"
:rules="[ :rules="[
{ required: true, message: '请输入节点名称!', trigger: 'blur' } ]" {
required: true,
message: '请输入节点名称!',
trigger: 'blur',
},
]"
> >
<el-input class v-model="orgform.orgname" style="width:100%"></el-input> <el-input
class
v-model="orgform.orgname"
style="width: 100%"
></el-input>
</el-form-item> </el-form-item>
<el-col :span="15" :offset="5"></el-col> <el-col :span="15" :offset="5"></el-col>
</el-form> </el-form>
...@@ -78,274 +115,273 @@ ...@@ -78,274 +115,273 @@
<el-button type="primary" @click="saveORg">确 定</el-button> <el-button type="primary" @click="saveORg">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div> -->
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
var validate= (rule, value, callback) => { var validate = (rule, value, callback) => {
if (value === '') { if (value === "") {
callback(new Error('请先点击左侧选择父节点!')); callback(new Error("请先点击左侧选择父节点!"));
} else { } else {
callback(); callback();
} }
}; };
return { return {
loading:false, loading: false,
tableData: [], tableData: [],
parentname: "", // parentname: "",
options: [ // options: [
{ // {
value: "org", // value: "org",
label: "组织" // label: "组织",
}, // },
{ // {
value: "address", // value: "address",
label: "地点" // label: "地点",
}, // },
{ // {
value: "root", // value: "root",
label: "根节点" // label: "根节点",
} // },
], // ],
treedata: [], // treedata: [],
defaultProps: { defaultProps: {
children: "childs", children: "childs",
label: "name", label: "name",
isLeaf: "leaf" isLeaf: "leaf",
}, },
dialogVisible: false, // dialogVisible: false,
orgform: { // orgform: {
oreType:'', // oreType: "",
orgname:'' // orgname: "",
}, // },
curOrgData: {}, // curOrgData: {},
accountId:localStorage.getItem('accountId') accountId: localStorage.getItem("accountId"),
}; };
}, },
created() {
// this.getorgtree();
},
methods: { methods: {
dialogclose(){ // dialogclose() {
this.$refs.orgform.resetFields() // this.$refs.orgform.resetFields();
}, // },
handleNodeClick(data,node) { handleNodeClick(data, node) {
if(node.childNodes.length>0&&data.floorId){ if (node.childNodes.length > 0 && data.mallId) {
this.tableData=[] console.log('11')
node.childNodes.forEach(item=>{ this.tableData = [];
this.tableData.push(item.data) node.childNodes.forEach((item) => {
}) this.tableData.push(item.data);
});
} }
}, },
formatHpzl(data) { formatHpzl(data) {
if (data.status == 0) return "离线"; if (data.status == 0) return "离线";
if (data.status == 1) return "在线"; if (data.status == 1) return "在线";
}, },
buildTree(data) { // buildTree(data) {
if (!data) { // if (!data) {
return; // return;
// }
// var store = [];
// store.push(data);
// let substore;
// while (store.length > 0) {
// substore = store.pop();
// if (substore.childs && substore.childs.length > 0) {
// var i = substore.childs.length - 1;
// for (i = substore.childs.length - 1; i >= 0; i--) {
// if (substore.childs[i].org_type == "vchan") {
// substore.childs.splice(i, 1);
// }
// store.push(substore.childs[i]);
// }
// }
// }
// },
// addorg() {
// this.dialogVisible = true;
// },
// handleDelete(index, row) {
// this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning",
// })
// .then(() => {
// this.axios
// .delete(this.API.org.deleteorg(row.unid))
// .then((response) => {
// this.$message({
// type: "success",
// message: "删除成功!",
// });
// this.deleteorg(row);
// });
// })
// .catch(() => {
// this.$message({
// type: "info",
// message: "已取消删除",
// });
// });
// },
// saveORg() {
// var data = {
// org_name: this.orgform.orgname,
// org_pid: this.curOrgData.unid,
// is_leaf: true,
// org_type: this.orgform.oreType,
// };
// if (data.org_type == "root") {
// data.org_pid = 0;
// data.org_type = "org";
// this.eiditroot = true;
// }
// if (this.curOrgData.unid == 0 || !this.curOrgData.unid) {
// this.$message({
// type: "warning",
// message: "请点击左侧选择父节点!",
// });
// return;
// }
// if (this.curOrgData.org_type != "address") {
// if (data.org_type == "address" && this.curOrgData.pid == 0) {
// this.$message({
// type: "warning",
// message: "根节点下不能添加地址!",
// });
// return;
// }
// this.$refs["orgform"].validate((valid) => {
// if (valid) {
// this.axios.post(this.API.org.getorg, data).then((response) => {
// if (this.orgform.oreType == "root") {
// //添加根节点
// this.getorgtree();
// }
// if (this.orgform.oreType == "address") {
// this.faceapi.getAddress();
// }
// if (this.orgform.oreType == "org") {
// this.faceapi.getOrg();
// }
// this.dialogVisible = false;
// var obj = {
// unid: response.data.unid,
// org_name: this.orgform.orgname,
// org_type: response.data.org_type,
// pid: response.data.org_pid,
// childs: [],
// };
// this.searchCurDate(this.treedata, obj);
// this.$message({
// type: "success",
// message: "添加成功",
// });
// });
// }
// });
// } else {
// if (this.curOrgData.org_type == "address") {
// this.$message({
// type: "warning",
// message: "地点下不能添加机构",
// });
// }
// }
// },
// deleteorg(row) {
// this.deleteorgData(this.treedata, row);
// },
// deleteorgData(alldata, deleteData) {
// for (var i = 0; i < alldata.length; i++) {
// if (alldata[i] == deleteData) {
// alldata.splice(i, 1);
// } else {
// if (alldata[i].childs)
// this.deleteorgData(alldata[i].childs, deleteData);
// }
// }
// },
loadNode(node, resolve) {
this.loading = true;
if (node.level === 0) {
this.axios
.get(this.API.url + "/malls", {
params: {
accountId: this.accountId,
status: 1,
},
})
.then((res) => {
return resolve(res.data.data);
});
} }
var store = []; if (node.level === 1) {
store.push(data); this.axios
let substore; .get(this.API.url + "/gates/filter", {
while (store.length > 0) { params: {
substore = store.pop(); mallId: node.data.id,
if (substore.childs && substore.childs.length > 0) { accountId: this.accountId,
var i = substore.childs.length - 1; status: 1,
for (i = substore.childs.length - 1; i >= 0; i--) { },
if (substore.childs[i].org_type == "vchan") { })
substore.childs.splice(i,1) .then((res) => {
} return resolve(res.data.data);
store.push(substore.childs[i]); });
}
}
} }
}, if (node.level === 2) {
addorg(){ let deviceArr = [];
this.dialogVisible = true this.axios
}, .get(this.API.url + "/channels", {
handleDelete(index, row) { params: {
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { gateId: node.data.id,
confirmButtonText: '确定', },
cancelButtonText: '取消', })
type: 'warning' .then((res) => {
}).then(() => { this.tableData = []
this.axios.delete(this.API.org.deleteorg(row.unid)).then((response)=> { const promises = res.data.data.map((item) => {
this.$message({ return this.axios.get(this.API.url + "/devices/" + item.deviceId);
type: 'success',
message: '删除成功!'
});
this.deleteorg(row)
}); });
Promise.all(promises).then((res1) => {
}).catch(() => { res1.forEach((item) => {
this.$message({ item.data.data.leaf = true;
type: 'info', deviceArr.push(item.data.data);
message: '已取消删除'
});
});
},
saveORg() {
// store.append({ id: 11, label: 'testtest', children: [] }, data);
var data = {
org_name: this.orgform.orgname,
org_pid: this.curOrgData.unid,
is_leaf: true,
org_type: this.orgform.oreType
};
if (data.org_type == "root") {
data.org_pid = 0;
data.org_type = "org";
this.eiditroot = true;
}
if (this.curOrgData.unid == 0||!this.curOrgData.unid ) {
this.$message({
type: "warning",
message: "请点击左侧选择父节点!"
});
return;
}
if (this.curOrgData.org_type != "address") {
if (data.org_type == "address" && this.curOrgData.pid == 0) {
this.$message({
type: "warning",
message: "根节点下不能添加地址!"
});
return;
}
this.$refs["orgform"].validate(valid => {
if (valid) {
this.axios.post(this.API.org.getorg, data).then(response => {
if (this.orgform.oreType == "root") {
//添加根节点
this.getorgtree();
}
if (this.orgform.oreType == "address") {
this.faceapi.getAddress();
}
if (this.orgform.oreType == "org") {
this.faceapi.getOrg();
}
console.log('aaa')
this.dialogVisible = false;
var obj = {
unid: response.data.unid,
org_name: this.orgform.orgname,
org_type: response.data.org_type,
pid: response.data.org_pid,
childs: []
};
this.searchCurDate(this.treedata, obj);
this.$message({
type: "success",
message: "添加成功"
}); });
this.tableData = deviceArr;
return resolve(deviceArr);
}); });
}
});
} else {
if (this.curOrgData.org_type == "address") {
this.$message({
type: "warning",
message: "地点下不能添加机构"
}); });
}
} }
}, this.loading = false;
deleteorg(row) { if (node.level > 2) {
this.deleteorgData(this.treedata, row); return resolve([]);
// this.getorgtree();
},
deleteorgData(alldata, deleteData) {
for (var i = 0; i < alldata.length; i++) {
if (alldata[i] == deleteData) {
alldata.splice(i, 1);
} else {
if (alldata[i].childs)
this.deleteorgData(alldata[i].childs, deleteData);
}
} }
console.log(alldata)
},
loadNode(node, resolve) {
this.loading = true;
if (node.level === 0) {
this.axios.get(this.API.url+"/malls",{
params:{
accountId:this.accountId,
status:1
}
}).then((res)=>{
return resolve(res.data.data)
})
}
if (node.level === 1){
this.axios.get(this.API.url+"/gates/filter",{
params:{
mallId:node.data.id,
accountId:this.accountId,
status:1
}
}).then((res)=>{
return resolve(res.data.data)
})
}
if(node.level === 2){
let deviceArr=[];
this.axios.get(this.API.url+"/channels",{
params:{
gateId:node.data.id
}
}).then((res)=>{
const promises=res.data.data.map((item)=>{
return this.axios.get(this.API.url+"/devices/"+item.deviceId)
})
Promise.all(promises).then(res=>{
res.forEach(item=>{
item.data.data.leaf=true;
deviceArr.push(item.data.data)
})
this.tableData=deviceArr;
return resolve(deviceArr)
})
})
}
this.loading = false;
if(node.level > 2){
return resolve([])
}
},
getorgtree() {
this.axios.get(this.API.org.getorgtree).then(res => {
this.treedata = res.data;
// if (res.data.length > 0) {
// res.data.forEach(e => {
// this.buildTree(e);
// });
// }
});
},
searchCurDate(alldata, childrenData) {
for (var i = 0; i < alldata.length; i++) {
if (alldata[i] == this.curOrgData) {
if (alldata[i].childs) {
console.log('www')
alldata[i].childs.push(childrenData);
// alldata[i].childs.$set(alldata[i].childs.length, childrenData)
console.log(alldata[i].childs)
}
} else {
if (alldata[i].childs)
this.searchCurDate(alldata[i].childs, childrenData);
}
}
return alldata;
}, },
// getorgtree() {
// this.axios.get(this.API.org.getorgtree).then((res) => {
// this.treedata = res.data;
// });
// },
// searchCurDate(alldata, childrenData) {
// for (var i = 0; i < alldata.length; i++) {
// if (alldata[i] == this.curOrgData) {
// if (alldata[i].childs) {
// console.log("www");
// alldata[i].childs.push(childrenData);
// }
// } else {
// if (alldata[i].childs)
// this.searchCurDate(alldata[i].childs, childrenData);
// }
// }
// return alldata;
// },
}, },
created() {
this.getorgtree();
}
}; };
</script> </script>
<style lang="stylus"> <style lang="stylus">
......
...@@ -246,11 +246,11 @@ export default { ...@@ -246,11 +246,11 @@ export default {
map.addOverlay(overlay); map.addOverlay(overlay);
}); });
}); });
popupCloser.addEventListener('click',function(){ // popupCloser.addEventListener('click',function(){
overlay.setPosition(undefined); // overlay.setPosition(undefined);
return // return
}); // });
}, },
...@@ -322,7 +322,7 @@ export default { ...@@ -322,7 +322,7 @@ export default {
source: iconFeature, source: iconFeature,
id:1 id:1
}); });
map.addLayer(this.CameraVertorlayer); map.addLayer(CameraVertorlayer);
}, },
}, },
...@@ -336,11 +336,11 @@ export default { ...@@ -336,11 +336,11 @@ export default {
mounted(){ mounted(){
this.InitMap(); this.InitMap();
let _this = this; let _this = this;
setTimeout(() => { // setTimeout(() => {
// 添加一个使用离线瓦片地图的层 // // 添加一个使用离线瓦片地图的层
map.addLayer(CameraVertorlayer); // map.addLayer(CameraVertorlayer);
}, 200); // }, 200);
} }
} }
</script> </script>
......
...@@ -67,6 +67,7 @@ export default { ...@@ -67,6 +67,7 @@ export default {
sessionStorage.removeItem("threemenu"); sessionStorage.removeItem("threemenu");
sessionStorage.removeItem("menu"); sessionStorage.removeItem("menu");
localStorage.setItem("accountId", response.data.data.user.accountId); localStorage.setItem("accountId", response.data.data.user.accountId);
// localStorage.setItem("accountId", 2);
// this.axios.get(this.API.auth.accountid,{ // this.axios.get(this.API.auth.accountid,{
// params:{ // params:{
// id:response. // id:response.
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<template> <template>
<div class="template-box content_div_main"> <div class="template-box content_div_main">
<el-form :inline="true" class="search-form" size="small"> <el-form :inline="true" class="search-form" size="small">
<el-form-item label="社区选择:"> <el-form-item label="地点选择:">
<el-select v-model="search.communityunid" placeholder="请选择"> <el-select v-model="search.communityunid" placeholder="请选择" @change="initGateData">
<el-option <el-option
v-for="item in addrData" v-for="item in addrData"
:key="item.unid" :value="item.id" :label="item.name" :key="item.unid" :value="item.id" :label="item.name"
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
accountId: this.accountId, accountId: this.accountId,
gender: Vthis.facesex, gender: Vthis.facesex,
name_like: `%${Vthis.facename}%`, name_like: `%${Vthis.facename}%`,
card_id__like: Vthis.facecardid, idCard_like: Vthis.facecardid === '' ? null : Vthis.facecardid,
type: Vthis.dbname, type: Vthis.dbname,
resident_unids: this.communityunid, resident_unids: this.communityunid,
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button class="search-btn" @click="searchUser" icon="el-icon-download" <el-button class="search-btn" @click="searchUser" icon="el-icon-download"
:disabled="buttonDisable()">获取考生列表</el-button> :disabled="buttonDisable()" v-loading="btnLoading">获取考生列表</el-button>
<el-button class="search-btn ml10" @click="getAllUserList" <el-button class="search-btn ml10" @click="getAllUserList"
:disabled="buttonDisable()">获取考生照片</el-button> :disabled="buttonDisable()">获取考生照片</el-button>
</el-form-item> </el-form-item>
...@@ -39,17 +39,13 @@ ...@@ -39,17 +39,13 @@
<el-input type="text" class="bla bra br0" v-model="idCard" placeholder=""></el-input> <el-input type="text" class="bla bra br0" v-model="idCard" placeholder=""></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button class="search-btn" @click="getUserList" <el-button class="search-btn" @click="getUserList(true)"
:disabled="examinationId === '' || typeId === ''">查询</el-button> :disabled="examinationId === '' || typeId === ''" v-loading="loading">查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
<el-row> <el-row>
<el-table :data="systableData" <el-table :data="systableData" v-loading="loading"
:v-loading="pictLoading"
element-loading-background = "rgba(0, 0, 0, 0.5)"
element-loading-text = "数据正在加载中"
element-loading-spinner = "el-icon-loading"
style="width:98%;margin:20px auto;" class="table_m_type" height="700"> style="width:98%;margin:20px auto;" class="table_m_type" height="700">
<div slot="empty"> <div slot="empty">
<div class="no-data-box"> <div class="no-data-box">
...@@ -57,8 +53,12 @@ ...@@ -57,8 +53,12 @@
<div>暂无数据</div> <div>暂无数据</div>
</div> </div>
</div> </div>
<el-table-column type="index" width=""></el-table-column> <!-- <el-table-column type="index" width=""></el-table-column> -->
<!-- <el-table-column prop="tabOrder" label="序号" width=""></el-table-column> --> <el-table-column label="序号" width="">
<template slot-scope="scope">
<div>{{ scope.row.tabOrder + (currentPage - 1) * 10 }}</div>
</template>
</el-table-column>
<el-table-column prop="idCard" label="身份证号" width=""></el-table-column> <el-table-column prop="idCard" label="身份证号" width=""></el-table-column>
<el-table-column label="照片" align="center"> <el-table-column label="照片" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -133,7 +133,8 @@ export default { ...@@ -133,7 +133,8 @@ export default {
total:0, total:0,
currentPage:1, currentPage:1,
limit:20, limit:20,
pictLoading: false, loading: false,
btnLoading: false,
accountId:localStorage.getItem("accountId"), accountId:localStorage.getItem("accountId"),
allUserList: [], allUserList: [],
picUrls, picUrls,
...@@ -143,22 +144,24 @@ export default { ...@@ -143,22 +144,24 @@ export default {
}, },
methods: { methods: {
searchUser () { searchUser () {
this.btnLoading = true
this.axios.get(this.API.url+`/persons/socialSecurity/getStudentInfo`, { this.axios.get(this.API.url+`/persons/socialSecurity/getStudentInfo`, {
params: { params: {
mallId: this.examinationId, mallId: this.examinationId,
personType: this.typeId personType: this.typeId
} }
}).then(response => { }).then(response => {
this.btnLoading = false
if (response.data.code === 200) { if (response.data.code === 200) {
this.successCount = response.data.data.successCount this.successCount = response.data.data.successCount
this.userDataSuccess() this.userDataSuccess()
this.getUserList() this.getUserList(false)
} }
}); });
}, },
handleCurrentChange(val){ handleCurrentChange(val){
this.currentPage = val; this.currentPage = val;
this.getUserList(); this.getUserList(true);
}, },
// 获取所有用户 // 获取所有用户
async getAllUserList () { async getAllUserList () {
...@@ -196,7 +199,7 @@ export default { ...@@ -196,7 +199,7 @@ export default {
return; return;
} }
if (nowNumber === this.allUserList.length - 1) { if (nowNumber === this.allUserList.length - 1) {
this.getUserList() this.getUserList(false)
} }
if (nowNumber < this.allUserList.length) { if (nowNumber < this.allUserList.length) {
await this.setUserPhoto(() => { await this.setUserPhoto(() => {
...@@ -216,7 +219,11 @@ export default { ...@@ -216,7 +219,11 @@ export default {
} }
}, },
// 获取担任考生照片 // 获取担任考生照片
getUserList () { getUserList (type) {
this.systableData = []
if (type) {
this.loading = true
}
this.axios.get(this.API.url+`/persons`, { this.axios.get(this.API.url+`/persons`, {
params: { params: {
mallId: this.examinationId, mallId: this.examinationId,
...@@ -226,10 +233,13 @@ export default { ...@@ -226,10 +233,13 @@ export default {
pageSize: this.limit, pageSize: this.limit,
} }
}).then(response => { }).then(response => {
if (type) {
this.loading = false
}
if (response.data && response.data.data && response.data.data.list) { if (response.data && response.data.data && response.data.data.list) {
// response.data.data.list.forEach((item, index) => { response.data.data.list.forEach((item, index) => {
// item.tabOrder = ++index; item.tabOrder = ++index;
// }); });
this.systableData = response.data.data.list this.systableData = response.data.data.list
this.total = response.data.data.total || 0 this.total = response.data.data.total || 0
} else { } else {
...@@ -262,6 +272,10 @@ export default { ...@@ -262,6 +272,10 @@ export default {
try { try {
const data = await this.axios.get(this.API.url+`/persons/socialSecurity/getPictures/${row.id}`) const data = await this.axios.get(this.API.url+`/persons/socialSecurity/getPictures/${row.id}`)
if (data && data.data && data.data.data) { if (data && data.data && data.data.data) {
this.$message({
type: "info",
message: "获取照片成功"
});
systableData[index].personPic = data.data.data.personPic systableData[index].personPic = data.data.data.personPic
} }
} catch (err) { } catch (err) {
...@@ -289,6 +303,7 @@ export default { ...@@ -289,6 +303,7 @@ export default {
}); });
}, },
changeExamination () { changeExamination () {
this.typeId = ''
if (this.examinationId !== '') { if (this.examinationId !== '') {
this.getTypes() this.getTypes()
} }
......
<template> <template>
<div class="template-box content_div_main"> <div class="template-box content_div_main" v-loading="pageLoading">
<el-row class=""> <el-row class="">
<el-form :inline="true" class="search-form" size="small"> <el-form :inline="true" class="search-form" size="small">
<el-form-item label="考点名称:" label-width="82px"> <el-form-item label="考点名称:" label-width="82px">
...@@ -36,21 +36,26 @@ ...@@ -36,21 +36,26 @@
<el-input type="text" class="bla bra br0" v-model="idCard" placeholder="" style="width: 192px"></el-input> <el-input type="text" class="bla bra br0" v-model="idCard" placeholder="" style="width: 192px"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button class="search-btn" @click="getUserList" :disabled="examinationId === '' || typeId === ''">查询</el-button> <el-button class="search-btn" @click="getUserList" :disabled="examinationId === '' || typeId === ''" v-loading="loading">查询</el-button>
<el-button class="search-btn ml10" @click="upLoadData" :disabled="examinationId === '' || typeId === ''">上传校对结果</el-button> <el-button class="search-btn ml10" @click="upLoadData" :disabled="examinationId === '' || typeId === ''">上传校对结果</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
<el-row> <el-row>
<el-table :data="systableData" style="width:98%;margin:20px auto;" class="table_m_type" height="700"> <el-table :data="systableData" style="width:98%;margin:20px auto;" class="table_m_type" height="700"
v-loading="loading">
<div slot="empty"> <div slot="empty">
<div class="no-data-box"> <div class="no-data-box">
<img src="../../../assets/img/nodata.png" alt="暂无数据"/> <img src="../../../assets/img/nodata.png" alt="暂无数据"/>
<div>暂无数据</div> <div>暂无数据</div>
</div> </div>
</div> </div>
<el-table-column type="index" width="" label="序号"></el-table-column> <!-- <el-table-column type="index" width="" label="序号"></el-table-column> -->
<!-- <el-table-column prop="" label="序号" width=""></el-table-column> --> <el-table-column prop="tabOrder" label="序号" width="">
<template slot-scope="scope">
<div>{{ scope.row.tabOrder + (currentPage - 1) * 10 }}</div>
</template>
</el-table-column>
<el-table-column prop="idCard" label="身份证号" width=""></el-table-column> <el-table-column prop="idCard" label="身份证号" width=""></el-table-column>
<el-table-column prop="" label="校对结果" width=""> <el-table-column prop="" label="校对结果" width="">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -145,21 +150,26 @@ export default { ...@@ -145,21 +150,26 @@ export default {
], ],
picUrls, picUrls,
defaultImg, defaultImg,
loading: false,
pageLoading: false,
} }
}, },
methods: { methods: {
async upLoadData () { async upLoadData () {
try { try {
this.pageLoading = true
const response = await this.axios.get(this.API.url+`/persons/socialSecurity/sendComparisonResults`, { const response = await this.axios.get(this.API.url+`/persons/socialSecurity/sendComparisonResults`, {
params: { params: {
mallId: this.examinationId, mallId: this.examinationId,
personType: this.typeId personType: this.typeId
} }
}); });
this.pageLoading = false
this.$alert(response.data.msg, '', { this.$alert(response.data.msg, '', {
confirmButtonText: '确定' confirmButtonText: '确定'
}); });
} catch (err) { } catch (err) {
this.pageLoading = false
this.$message.error("上传校队失败"); this.$message.error("上传校队失败");
} }
}, },
...@@ -187,6 +197,8 @@ export default { ...@@ -187,6 +197,8 @@ export default {
// 获取所有用户 // 获取所有用户
getUserList () { getUserList () {
const { proofrendResut } = this const { proofrendResut } = this
this.loading = true
this.systableData = []
let data = {} let data = {}
if (proofrendResut === '全部') { if (proofrendResut === '全部') {
data = { data = {
...@@ -210,10 +222,11 @@ export default { ...@@ -210,10 +222,11 @@ export default {
...data ...data
} }
}).then(response => { }).then(response => {
this.loading = false
if (response.data && response.data.data && response.data.data.list) { if (response.data && response.data.data && response.data.data.list) {
// response.data.data.list.forEach((item, index) => { response.data.data.list.forEach((item, index) => {
// item.tabOrder = ++index; item.tabOrder = ++index;
// }); });
this.systableData = response.data.data.list this.systableData = response.data.data.list
this.total = response.data.data.total || 0 this.total = response.data.data.total || 0
} else { } else {
...@@ -236,6 +249,7 @@ export default { ...@@ -236,6 +249,7 @@ export default {
}); });
}, },
changeExamination () { changeExamination () {
this.typeId = ''
if (this.examinationId !== '') { if (this.examinationId !== '') {
this.getTypes() this.getTypes()
} }
......
...@@ -72,12 +72,14 @@ export default { ...@@ -72,12 +72,14 @@ export default {
chartIds: '1,2,3,4,5,6,8,16,17' chartIds: '1,2,3,4,5,6,8,16,17'
} }
}).then((res)=>{ }).then((res)=>{
this.datas=res.data.data; if (res && res.data && res.data.data) {
this.datas=res.data.data;
this.chartData1 = this.datas.body.CustomerCounting; this.chartData1 = this.datas.body.CustomerCounting;
this.chartData1.otherConf={ this.chartData1.otherConf={
_color:["#0069FF", "#4BBEFF", "#87D14B", "#FFC62E", "#FF9631"] _color:["#0069FF", "#4BBEFF", "#87D14B", "#FFC62E", "#FF9631"]
} }
this.radioChange(this.datas); this.radioChange(this.datas);
}
}) })
}, },
radioChange(res){ radioChange(res){
......
...@@ -6,4 +6,5 @@ window.SECURITY_CONF = { ...@@ -6,4 +6,5 @@ window.SECURITY_CONF = {
// urls: 'http://192.168.9.146:17070', // urls: 'http://192.168.9.146:17070',
picUrls: 'https://vion-retail.oss-cn-beijing.aliyuncs.com/', picUrls: 'https://vion-retail.oss-cn-beijing.aliyuncs.com/',
mapUrls: 'http://19610hs911.iask.in/static/pics/qingdaoMap/roadmap' mapUrls: 'http://19610hs911.iask.in/static/pics/qingdaoMap/roadmap'
// mapUrls: 'http://192.168.9.162:20080/static/pics/cache/qingdao/roadmap'
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!