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() { !(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() {
var platformConf = document.createElement("script"), var platformConf = document.createElement("script"),
s = document.getElementsByTagName("script")[0], s = document.getElementsByTagName("script")[0],
stamp = +new Date(); stamp = +new Date();
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",
......
...@@ -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";
...@@ -73,9 +73,9 @@ const menu = { ...@@ -73,9 +73,9 @@ const menu = {
commit("SET_ROUTERS", []); commit("SET_ROUTERS", []);
return; return;
} else { } else {
console.log('aaa',data) // console.log('aaa',data)
let accessedRouters = filterAsyncRouter(asyncRouterMap, data); let accessedRouters = filterAsyncRouter(asyncRouterMap, data);
console.log(accessedRouters) // console.log(accessedRouters)
commit("SET_ROUTERS", accessedRouters); commit("SET_ROUTERS", accessedRouters);
} }
} }
......
// 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
...@@ -7,27 +6,27 @@ export const mapUrl = mapUrls || location.host ...@@ -7,27 +6,27 @@ 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) {
...@@ -39,7 +38,7 @@ export let auth = { ...@@ -39,7 +38,7 @@ export let auth = {
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`,
...@@ -53,23 +52,23 @@ export let auth = { ...@@ -53,23 +52,23 @@ export let auth = {
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,7 +108,7 @@ service.interceptors.request.use(function(config) { ...@@ -79,7 +108,7 @@ 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) {
...@@ -87,7 +116,7 @@ service.interceptors.response.use(function(res) { ...@@ -87,7 +116,7 @@ service.interceptors.response.use(function(res) {
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: '',
} }
......
...@@ -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"),
}; };
}, },
methods: { created() {
dialogclose(){ // this.getorgtree();
this.$refs.orgform.resetFields()
}, },
handleNodeClick(data,node) { methods: {
if(node.childNodes.length>0&&data.floorId){ // dialogclose() {
this.tableData=[] // this.$refs.orgform.resetFields();
node.childNodes.forEach(item=>{ // },
this.tableData.push(item.data) handleNodeClick(data, node) {
}) if (node.childNodes.length > 0 && data.mallId) {
console.log('11')
this.tableData = [];
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 = []; // var store = [];
store.push(data); // store.push(data);
let substore; // let substore;
while (store.length > 0) { // while (store.length > 0) {
substore = store.pop(); // substore = store.pop();
if (substore.childs && substore.childs.length > 0) { // if (substore.childs && substore.childs.length > 0) {
var i = substore.childs.length - 1; // var i = substore.childs.length - 1;
for (i = substore.childs.length - 1; i >= 0; i--) { // for (i = substore.childs.length - 1; i >= 0; i--) {
if (substore.childs[i].org_type == "vchan") { // if (substore.childs[i].org_type == "vchan") {
substore.childs.splice(i,1) // substore.childs.splice(i, 1);
} // }
store.push(substore.childs[i]); // store.push(substore.childs[i]);
} // }
} // }
} // }
}, // },
addorg(){ // addorg() {
this.dialogVisible = true // this.dialogVisible = true;
}, // },
handleDelete(index, row) { // handleDelete(index, row) {
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { // this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: '确定', // confirmButtonText: "确定",
cancelButtonText: '取消', // cancelButtonText: "取消",
type: 'warning' // type: "warning",
}).then(() => { // })
this.axios.delete(this.API.org.deleteorg(row.unid)).then((response)=> { // .then(() => {
this.$message({ // this.axios
type: 'success', // .delete(this.API.org.deleteorg(row.unid))
message: '删除成功!' // .then((response) => {
}); // this.$message({
this.deleteorg(row) // type: "success",
}); // message: "删除成功!",
// });
}).catch(() => { // this.deleteorg(row);
this.$message({ // });
type: 'info', // })
message: '已取消删除' // .catch(() => {
}); // this.$message({
}); // type: "info",
}, // message: "已取消删除",
saveORg() { // });
// store.append({ id: 11, label: 'testtest', children: [] }, data); // });
var data = { // },
org_name: this.orgform.orgname, // saveORg() {
org_pid: this.curOrgData.unid, // var data = {
is_leaf: true, // org_name: this.orgform.orgname,
org_type: this.orgform.oreType // org_pid: this.curOrgData.unid,
}; // is_leaf: true,
if (data.org_type == "root") { // org_type: this.orgform.oreType,
data.org_pid = 0; // };
data.org_type = "org"; // if (data.org_type == "root") {
this.eiditroot = true; // data.org_pid = 0;
} // data.org_type = "org";
if (this.curOrgData.unid == 0||!this.curOrgData.unid ) { // this.eiditroot = true;
this.$message({ // }
type: "warning", // if (this.curOrgData.unid == 0 || !this.curOrgData.unid) {
message: "请点击左侧选择父节点!" // this.$message({
}); // type: "warning",
return; // message: "请点击左侧选择父节点!",
} // });
if (this.curOrgData.org_type != "address") { // return;
if (data.org_type == "address" && this.curOrgData.pid == 0) { // }
this.$message({ // if (this.curOrgData.org_type != "address") {
type: "warning", // if (data.org_type == "address" && this.curOrgData.pid == 0) {
message: "根节点下不能添加地址!" // this.$message({
}); // type: "warning",
return; // message: "根节点下不能添加地址!",
} // });
this.$refs["orgform"].validate(valid => { // return;
if (valid) { // }
this.axios.post(this.API.org.getorg, data).then(response => { // this.$refs["orgform"].validate((valid) => {
if (this.orgform.oreType == "root") { // if (valid) {
//添加根节点 // this.axios.post(this.API.org.getorg, data).then((response) => {
this.getorgtree(); // if (this.orgform.oreType == "root") {
} // //添加根节点
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: "添加成功"
});
});
}
});
} else {
if (this.curOrgData.org_type == "address") {
this.$message({
type: "warning",
message: "地点下不能添加机构"
});
}
}
},
deleteorg(row) {
this.deleteorgData(this.treedata, row);
// this.getorgtree(); // this.getorgtree();
}, // }
deleteorgData(alldata, deleteData) { // if (this.orgform.oreType == "address") {
for (var i = 0; i < alldata.length; i++) { // this.faceapi.getAddress();
if (alldata[i] == deleteData) { // }
alldata.splice(i, 1); // if (this.orgform.oreType == "org") {
} else { // this.faceapi.getOrg();
if (alldata[i].childs) // }
this.deleteorgData(alldata[i].childs, deleteData); // this.dialogVisible = false;
} // var obj = {
} // unid: response.data.unid,
console.log(alldata) // 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) { loadNode(node, resolve) {
this.loading = true; this.loading = true;
if (node.level === 0) { if (node.level === 0) {
this.axios.get(this.API.url+"/malls",{ this.axios
params:{ .get(this.API.url + "/malls", {
accountId:this.accountId, params: {
status:1 accountId: this.accountId,
} status: 1,
}).then((res)=>{ },
return resolve(res.data.data)
}) })
.then((res) => {
return resolve(res.data.data);
});
} }
if (node.level === 1){ if (node.level === 1) {
this.axios.get(this.API.url+"/gates/filter",{ this.axios
params:{ .get(this.API.url + "/gates/filter", {
mallId:node.data.id, params: {
accountId:this.accountId, mallId: node.data.id,
status:1 accountId: this.accountId,
} status: 1,
}).then((res)=>{ },
return resolve(res.data.data)
}) })
.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)=>{ if (node.level === 2) {
const promises=res.data.data.map((item)=>{ let deviceArr = [];
return this.axios.get(this.API.url+"/devices/"+item.deviceId) this.axios
}) .get(this.API.url + "/channels", {
Promise.all(promises).then(res=>{ params: {
res.forEach(item=>{ gateId: node.data.id,
item.data.data.leaf=true; },
deviceArr.push(item.data.data)
})
this.tableData=deviceArr;
return resolve(deviceArr)
})
}) })
.then((res) => {
this.tableData = []
const promises = res.data.data.map((item) => {
return this.axios.get(this.API.url + "/devices/" + item.deviceId);
});
Promise.all(promises).then((res1) => {
res1.forEach((item) => {
item.data.data.leaf = true;
deviceArr.push(item.data.data);
});
this.tableData = deviceArr;
return resolve(deviceArr);
});
});
} }
this.loading = false; this.loading = false;
if(node.level > 2){ if (node.level > 2) {
return resolve([]) return resolve([]);
} }
}, },
getorgtree() { // getorgtree() {
this.axios.get(this.API.org.getorgtree).then(res => { // this.axios.get(this.API.org.getorgtree).then((res) => {
this.treedata = res.data; // 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);
// } // }
}); // } else {
}, // if (alldata[i].childs)
searchCurDate(alldata, childrenData) { // this.searchCurDate(alldata[i].childs, childrenData);
for (var i = 0; i < alldata.length; i++) { // }
if (alldata[i] == this.curOrgData) { // }
if (alldata[i].childs) { // return alldata;
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;
},
}, },
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)=>{
if (res && res.data && res.data.data) {
this.datas=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!