Commit caceb7c0 authored by xinzhedeai's avatar xinzhedeai

merge master overview-del

parents 3c5613b7 79a1b887
import request from '@/utils/request'
export function getData4panel0(data) { // 孵化器概况信息
return request({
url: 'api/incubator/profile?incubatorId='+data.incubatorId,
method: 'get',
})
}
export function getData4tech(data) {
return request({
url: 'api/incubator',
method: 'get',
})
}
export function del(ids) {
return request({
url: 'api/users',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/incubator',
method: 'put',
data
})
}
export function add(data) {
return request({
url: 'api/incubator',
method: 'post',
data
})
}
export function editUser(data) {
return request({
url: 'api/users/center',
method: 'put',
data
})
}
export default { getData4panel0, getData4tech, add, edit, del }
...@@ -1241,9 +1241,9 @@ var reqApis = function(){ ...@@ -1241,9 +1241,9 @@ var reqApis = function(){
name: '信息统计', name: '信息统计',
Dict: { Dict: {
baseInfo: { baseInfo: {
"companyName": {name:"企业名称", must:true, 'width': '300px',}, "companyName": {name:"企业名称", must:true, 'width': '300px', fixed: true,},
"incubatorName": {name:"所属孵化器", must:true, key:'name', 'width': '180px',}, "incubatorName": {name:"所属孵化器", must:true, key:'name', 'width': '180px', fixed: true,},
"entryDate": {name:"入驻时间", 'width': '180px', }, "entryDate": {name:"入驻时间", 'width': '180px', },
"companyType": {name:"企业类型", 'type':'select', key:'name','width': '180px', }, "companyType": {name:"企业类型", 'type':'select', key:'name','width': '180px', },
"incubationStatus": {name:"企业孵化状态", 'type':'select', key:'name','width': '180px', }, "incubationStatus": {name:"企业孵化状态", 'type':'select', key:'name','width': '180px', },
...@@ -1270,15 +1270,15 @@ var reqApis = function(){ ...@@ -1270,15 +1270,15 @@ var reqApis = function(){
// "mentorId": {name:"创业导师", 'type':'select', key:'name','width': '180px',}, // "mentorId": {name:"创业导师", 'type':'select', key:'name','width': '180px',},
"companyLevelName": {name:"企业级别", must:true, key:'name', 'width': '180px',}, "companyLevelName": {name:"企业级别", must:true, key:'name', 'width': '180px',},
// "totalEmployees": {name:"今年从业人数(人)", must:true, key:'name', 'width': '180px',}, "totalEmployees": {name:"今年从业人数(人)", must:true, key:'name', 'width': '180px',},
// "phdEmployees": {name:"博士人数(人)", must:true, key:'name', 'width': '180px',}, "phdEmployees": {name:"博士人数(人)", must:true, key:'name', 'width': '180px',},
// "overseasEmployees": {name:"留学人数(人)", must:true, key:'name', 'width': '180px',}, "overseasEmployees": {name:"留学人数(人)", must:true, key:'name', 'width': '180px',},
// "revenueLastYear": {name:"上年营业收入(万元)", must:true, key:'name', 'width': '180px',}, "revenueLastYear": {name:"上年营业收入(万元)", must:true, key:'name', 'width': '180px',},
// "netProfit": {name:"净利润(万元)", must:true, key:'name', 'width': '180px',}, "netProfit": {name:"净利润(万元)", must:true, key:'name', 'width': '180px',},
// "taxesPaid": {name:"上缴税费(万元)", must:true, key:'name', 'width': '180px',}, "taxesPaid": {name:"上缴税费(万元)", must:true, key:'name', 'width': '180px',},
// "investmentProportion": {name:"研发投入占比", must:true, key:'name', 'width': '180px',}, "investmentProportion": {name:"研发投入占比", must:true, key:'name', 'width': '180px',},
// "grossIncome": {name:"总收入(万元)", must:true, key:'name', 'width': '180px',}, "grossIncome": {name:"总收入(万元)", must:true, key:'name', 'width': '180px',},
// "researchInput": {name:"研发投入(万元)", must:true, key:'name', 'width': '180px',}, "researchInput": {name:"研发投入(万元)", must:true, key:'name', 'width': '180px',},
// "mentorId": {name:"创业导师", 'type':'select', key:'name','width': '180px',}, // "mentorId": {name:"创业导师", 'type':'select', key:'name','width': '180px',},
}, },
...@@ -1292,6 +1292,8 @@ var reqApis = function(){ ...@@ -1292,6 +1292,8 @@ var reqApis = function(){
}; return body.incubatorId; }; return body.incubatorId;
}); });
}, },
companyType:[{"name":"服务企业","value":2},{"name":"中介机构","value":1}],
}, },
}, },
config: { config: {
...@@ -1311,14 +1313,22 @@ var reqApis = function(){ ...@@ -1311,14 +1313,22 @@ var reqApis = function(){
}, },
], ],
search: [ search: [
// {
// 'type': 'string', 'name': '孵化器名称', 'word': 'incubatorName', 'mode': 0, 'width': '180px', 'clear': function () {
// this.loadData()
// }
// },
{ {
'type': 'string', 'name': '孵化器名称', 'word': 'incubatorName', 'mode': 0, 'width': '180px', 'clear': function () { 'type': 'string', 'name': '企业名称', 'word': 'companyName', 'mode': 0, 'width': '180px', 'clear': function () {
this.loadData() this.loadData()
} }
}, },
{ 'type': 'select', 'name': '在孵状态', 'word': 'incubationStatus', 'mode': 1, 'width': '140px' }, { 'type': 'select', 'name': '在孵状态', 'word': 'incubationStatus', 'mode': 1, 'width': '140px' },
{ 'type': 'select', 'name': '企业类型', 'word': 'companyType', 'mode': 1, 'width': '140px' }, { 'type': 'select', 'name': '企业类型', 'word': 'companyType', 'mode': 1, 'width': '140px' },
{ 'type': 'select', 'name': '企业级别', 'word': 'companyLevel', 'mode': 1, 'width': '140px' },
{ 'type': 'select', 'name': '所属技术领域', 'word': 'technicalField', 'mode': 9, 'width': '140px' },
{ 'type': 'select', 'name': '创新创业类型', 'word': 'innovationEntrepreneurship', 'mode': 1, 'width': '140px' },
{ 'type': 'daterange', 'defaultTime': ['00:00:00', '23:59:59'], 'name': '日期范围', 'word': 'daterange', 'mode': 0, 'width': '300px', format: 'yyyy-MM-dd' },
{ {
'type': 'button', 'label': '查询', 'width': '140px', 'icon': 'el-icon-search', 'click': function (e) { 'type': 'button', 'label': '查询', 'width': '140px', 'icon': 'el-icon-search', 'click': function (e) {
this.table.page = 1; this.table.page = 1;
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<div class="head-container" v-if="form.config.search && form.config.search[0]"> <div class="head-container" v-if="form.config.search && form.config.search[0]">
<!-- 搜索 --> <!-- 搜索 -->
<template v-for="(item, index) in form.config.search"> <template v-for="(item, index) in form.config.search">
<!-- <label v-if="item.name" class="el-form-item-label">{{item.name}}</label> --> <label v-if="item.name && item.showLabel" class="el-form-item-label">{{item.name}}</label>
<template v-if="item.type==='string'"> <template v-if="item.type==='string'">
<el-input v-model="form.query[item.word]" clearable :placeholder="item.name" :style="'width:'+item.width" @clear="item.clear && item.clear.call(_self.$parent)"/> <el-input v-model="form.query[item.word]" clearable :placeholder="item.name" :style="'width:'+item.width" @clear="item.clear && item.clear.call(_self.$parent)"/>
</template> </template>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</keep-alive> </keep-alive>
</transition> </transition>
<footer v-if="$route.path!=='/dashboard'" class="page-footer"></footer> <footer v-if="$route.path!=='/dashboard' && $route.path!=='/home/overview'" class="page-footer"></footer>
<!-- <div v-if="$store.state.settings.showFooter" id="el-main-footer"> <!-- <div v-if="$store.state.settings.showFooter" id="el-main-footer">
<span v-html="$store.state.settings.footerTxt" /> <span v-html="$store.state.settings.footerTxt" />
......
...@@ -62,21 +62,22 @@ export const constantRouterMap = [ ...@@ -62,21 +62,22 @@ export const constantRouterMap = [
children: [ children: [
{ {
path: "enterprise", path: "enterprise",
component: resolve => require(["@/views/system/home/enterprise"], resolve), component: resolve => require([localStorage.getItem('groupIdByloginType')*1 === 1 ? "@/views/system/home/enterprise" : "@/views/system/home/tech"], resolve),
name: "首页-企业", name: "首页-企业",
meta: { title: "首页", affix:true , icon: "index"} meta: { title: "首页", affix:true , icon: "index"}
}, },
// {
// path: "tech",
// component: resolve => require(["@/views/system/home/tech"], resolve),
// name: "首页-科技局",
// meta: { title: "首页", affix:true , icon: "index"}
// },
{ {
path: "tech", path: "overview",
component: resolve => require(["@/views/system/home/tech"], resolve),
name: "首页-科技局",
meta: { title: "首页", affix:true , icon: "index"}
},
{
path: "数据概览",
component: resolve => require(["@/views/system/home/overview"], resolve), component: resolve => require(["@/views/system/home/overview"], resolve),
name: "首页-概览", name: "概览",
meta: { title: "概览", affix:true , icon: "index"} hidden: true,
meta: { title: "数据概览", icon: "index"}
} }
] ]
}, },
......
import { login, getInfo, logout } from '@/api/login' import { login, getInfo, logout } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth' import { getToken, setToken, removeToken } from '@/utils/auth'
import { Message } from 'element-ui';
const user = { const user = {
state: { state: {
token: getToken(), token: getToken(),
...@@ -34,7 +34,7 @@ const user = { ...@@ -34,7 +34,7 @@ const user = {
const rememberMe = userInfo.rememberMe; const rememberMe = userInfo.rememberMe;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login(userInfo).then(res => { login(userInfo).then(res => {
if(/* res.head.code === '0000' || */ !res.code){ if(!res.code){ // 登录成功不返回code状态码。
var body = res.body || res; var body = res.body || res;
setToken(body.token, rememberMe); setToken(body.token, rememberMe);
commit('SET_TOKEN', body.token); commit('SET_TOKEN', body.token);
...@@ -42,8 +42,14 @@ const user = { ...@@ -42,8 +42,14 @@ const user = {
// 第一次加载菜单时用到, 具体见 src 目录下的 permission.js // 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
commit('SET_LOAD_MENUS', true); commit('SET_LOAD_MENUS', true);
}; resolve(res)
resolve(res) }else{
Message({
message: res.msg,
type: 'warning', // 可以是 'success', 'warning', 'info', 'error'
});
resolve(null)
}
}).catch(error => { }).catch(error => {
reject(error) reject(error)
}) })
......
This diff is collapsed.
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
{{'毕业企业:'+table.body.incubatorGraduateCount || ''}}&nbsp;&nbsp;&nbsp;&nbsp; {{'毕业企业:'+table.body.incubatorGraduateCount || ''}}&nbsp;&nbsp;&nbsp;&nbsp;
<!-- {{'创业导师数:'+table.body.mentorCount || ''}}&nbsp;&nbsp;&nbsp;&nbsp; --> <!-- {{'创业导师数:'+table.body.mentorCount || ''}}&nbsp;&nbsp;&nbsp;&nbsp; -->
{{'中介机构:'+table.body.incubatorIntermediaryCount || ''}}&nbsp;&nbsp;&nbsp;&nbsp; {{'中介机构:'+table.body.incubatorIntermediaryCount || ''}}&nbsp;&nbsp;&nbsp;&nbsp;
{{'今年毕业企业'+table.body.incubatorGraduateCountYear || ''}}&nbsp;&nbsp;&nbsp;&nbsp; {{'今年毕业企业'+table.body.incubatorGraduateCountYear || ''}}&nbsp;&nbsp;&nbsp;&nbsp;
</div> </div>
</div> </div>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
import { reqApi, Config } from '@/assets/js/httpApi.js'; import { reqApi, Config } from '@/assets/js/httpApi.js';
import { Tools } from '@/assets/js/common.js'; import { Tools } from '@/assets/js/common.js';
import DateRangePicker from '@/components/DateRangePicker'; import DateRangePicker from '@/components/DateRangePicker';
import TableFilter from '@/components/TableFilter'; import TableFilter from '@/components/TableFilter/index2';
import cuForm from '@/components/cuForm'; import cuForm from '@/components/cuForm';
import cuTable from '@/components/cuTable/index2'; import cuTable from '@/components/cuTable/index2';
......
This diff is collapsed.
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</li> </li>
<li> <li>
<div class="title">创业导师</div> <div class="title">创业导师</div>
<div class="content">{{data.mentorAllCount}}</div> <div class="content">{{data.mentorAllCount}}</div>
</li> </li>
<li> <li>
<div class="title">孵化面积</div> <div class="title">孵化面积</div>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<div class="body"> <div class="body">
<ul class="list"> <ul class="list">
<li v-for="(item) in data.list" :key="item.id" @click="go2overview"> <li v-for="(item) in data.list" :key="item.id" @click="go2overview(item)">
<img :src="`${baseAPI}file/${item.incubatorImage}`"alt="" /> <img :src="`${baseAPI}file/${item.incubatorImage}`"alt="" />
<div class="introduce"> <div class="introduce">
<h2>{{ item.incubatorName }}</h2> <h2>{{ item.incubatorName }}</h2>
...@@ -298,8 +298,9 @@ export default { ...@@ -298,8 +298,9 @@ export default {
this.getData(); this.getData();
}, },
methods: { methods: {
go2overview(){ go2overview(item){
alert('数据概览页开发ing~') // alert('数据概览页开发ing~')
this.$router.push('/home/overview?id='+item.id)
}, },
handleSuccess(response, file) { handleSuccess(response, file) {
// 处理上传成功 // 处理上传成功
......
...@@ -165,29 +165,35 @@ export default { ...@@ -165,29 +165,35 @@ export default {
Cookies.remove('password') Cookies.remove('password')
Cookies.remove('rememberMe') Cookies.remove('rememberMe')
} }
this.$store.dispatch('Login', user).then(() => { this.$store.dispatch('Login', user).then((res) => {
this.loading = false if(!res){ // 登录失败
if (this.userStyle) { this.loading = false
if (this.userStyle === '应急局' && this.user.enterpriseId !== 0) { this.getCode()
this.$message.error('您是企业用户,请使用企业端登录')
setTimeout(() => {
this.$store.dispatch('LogOut').then(() => {
location.reload()
})
}, 1000)
return
}
if (this.userStyle === '企业' && this.user.enterpriseId === 0) {
this.$message.error('您是应急局用户,请使用应急局端登录')
setTimeout(() => {
this.$store.dispatch('LogOut').then(() => {
location.reload()
})
}, 1000)
return
}
} }
this.$router.push({ path: /* 记住上次退出时的页面 */ /* this.redirect || */'/home4Login' }) this.$router.push({ path: '/edge/Screen' }) // 跳转大屏
// debugger
// this.loading = false
// if (this.userStyle) {
// if (this.userStyle === '应急局' && this.user.enterpriseId !== 0) {
// this.$message.error('您是企业用户,请使用企业端登录')
// setTimeout(() => {
// this.$store.dispatch('LogOut').then(() => {
// location.reload()
// })
// }, 1000)
// return
// }
// if (this.userStyle === '企业' && this.user.enterpriseId === 0) {
// this.$message.error('您是应急局用户,请使用应急局端登录')
// setTimeout(() => {
// this.$store.dispatch('LogOut').then(() => {
// location.reload()
// })
// }, 1000)
// return
// }
// }
// this.$router.push({ path: /* 记住上次退出时的页面 */ /* this.redirect || */'/home4Login' })
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
this.getCode() this.getCode()
......
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