Commit ae176f56 authored by lei's avatar lei

add:孵化器企业信息

parent 36fdc16d
// var ServiceURL = 'http://192.168.3.216:9002';
// var ServiceURL = 'http://192.168.3.250:9103';
var ServiceURL = 'http://gqfhq.gemho.cn:9103'; // 正式环境
// var ServiceURL = 'http://192.168.3.226:9103' // 测试环境
// var ServiceURL = 'http://gqfhq.gemho.cn:9103'; // 正式环境
var ServiceURL = "http://192.168.2.37:9103"; // 测试环境
window.VUE_APP_API = {ServiceURL:ServiceURL}
window.VUE_APP_API = { ServiceURL: ServiceURL };
import router from './routers'
import store from '@/store'
import Config from '@/settings'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css'// progress bar style
import { getToken } from '@/utils/auth' // getToken from cookie
import { buildMenus } from '@/api/system/menu'
import { filterAsyncRouter } from '@/store/modules/permission'
import router from "./routers";
import store from "@/store";
import Config from "@/settings";
import NProgress from "nprogress"; // progress bar
import "nprogress/nprogress.css"; // progress bar style
import { getToken } from "@/utils/auth"; // getToken from cookie
import { buildMenus } from "@/api/system/menu";
import { filterAsyncRouter } from "@/store/modules/permission";
NProgress.configure({ showSpinner: false }) // NProgress Configuration
NProgress.configure({ showSpinner: false }); // NProgress Configuration
const whiteList = ['/plus/login', '/register'] // no redirect whitelist
const whiteList = ["/plus/login", "/register"]; // no redirect whitelist
router.beforeEach((to, from, next) => {
if (to.meta.title) {
//document.title = to.meta.title + ' - ' + Config.title
document.title = to.meta.title
document.title = to.meta.title;
}
NProgress.start();
if (getToken()) {
// 已登录且要跳转的页面是登录页
if (to.path === '/plus/login') {
next({ path: '/' })
NProgress.done()
if (to.path === "/plus/login") {
next({ path: "/" });
NProgress.done();
} else {
if (store.getters.roles.length === 0) { // 判断当前用户是否已拉取完user_info信息
store.dispatch('GetInfo').then(() => { // 拉取user_info
if (store.getters.roles.length === 0) {
// 判断当前用户是否已拉取完user_info信息
store
.dispatch("GetInfo")
.then(() => {
// 拉取user_info
// 动态路由,拉取菜单
loadMenus(next, to)
}).catch(() => {
store.dispatch('LogOut').then(() => {
location.reload() // 为了重新实例化vue-router对象 避免bug
})
loadMenus(next, to);
})
.catch(() => {
store.dispatch("LogOut").then(() => {
location.reload(); // 为了重新实例化vue-router对象 避免bug
});
});
// 登录时未拉取 菜单,在此处拉取
} else if (store.getters.loadMenus) {
// 修改成false,防止死循环
store.dispatch('updateLoadMenus')
loadMenus(next, to)
store.dispatch("updateLoadMenus");
loadMenus(next, to);
} else {
next()
next();
}
}
} else {
/* has no token*/
if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
next()
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入
next();
} else {
window.location.href = `/plus/login?redirect=${to.fullPath}`;
NProgress.done()
NProgress.done();
}
}
})
});
export const loadMenus = (next, to) => {
buildMenus().then(res => {
const sdata = JSON.parse(JSON.stringify(res))
const rdata = JSON.parse(JSON.stringify(res))
const sidebarRoutes = filterAsyncRouter(sdata)
const rewriteRoutes = filterAsyncRouter(rdata, true)
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
next({ ...to, replace: true })
})
store.dispatch('SetSidebarRouters', sidebarRoutes)
})
}
const sdata = JSON.parse(JSON.stringify(res));
const rdata = JSON.parse(JSON.stringify(res));
const sidebarRoutes = filterAsyncRouter(sdata);
const rewriteRoutes = filterAsyncRouter(rdata, true);
rewriteRoutes.push({ path: "*", redirect: "/404", hidden: true });
store.dispatch("GenerateRoutes", rewriteRoutes).then(() => {
// 存储路由
router.addRoutes(rewriteRoutes); // 动态添加可访问路由表
next({ ...to, replace: true });
});
store.dispatch("SetSidebarRouters", sidebarRoutes);
});
};
router.afterEach(() => {
NProgress.done() // finish progress bar
})
NProgress.done(); // finish progress bar
});
import axios from 'axios'
import { Notification } from 'element-ui'
import { getToken } from '@/utils/auth'
import Config from '@/settings'
import axios from "axios";
import { Notification } from "element-ui";
import { getToken } from "@/utils/auth";
import Config from "@/settings";
// 使请求头可以携带cookie
axios.defaults.withCredentials = true;
//var baseURL = (VUE_APP_API.ServiceURL || process.env.VUE_APP_LOCAL_API) + '/';
var baseURL = process.env.NODE_ENV
=== 'development' ? process.env.VUE_APP_LOCAL_API + '/' : (VUE_APP_API.ServiceURL || process.env.VUE_APP_LOCAL_API) + '/';
var baseURL =
process.env.NODE_ENV === "development"
? process.env.VUE_APP_BASE_API + "/"
: (VUE_APP_API.ServiceURL || process.env.VUE_APP_BASE_API) + "/";
// 创建axios实例
const service = axios.create({
baseURL: baseURL,
timeout: Config.timeout // 请求超时时间
})
});
// request拦截器
service.interceptors.request.use(
config => {
if (getToken()) {
config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
config.headers["Authorization"] = getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
}
config.headers['Content-Type'] = 'application/json'
return config
config.headers["Content-Type"] = "application/json";
return config;
},
error => {
Promise.reject(error)
Promise.reject(error);
}
)
);
// response 拦截器
service.interceptors.response.use(
response => {
return response.data
return response.data;
},
error => {
if (error.response.status) {
const responseCode = error.response.status
const responseCode = error.response.status;
switch (responseCode) {
case 400:
Notification({
title: error.response.data.msg,
duration: 2000,
type: 'warning'
})
break
type: "warning"
});
break;
// token 过期
case 401:
Notification({
title: '登录过期,请重新登录',
title: "登录过期,请重新登录",
duration: 2000,
type: 'warning'
})
type: "warning"
});
setTimeout(() => {
window.localStorage.removeItem('token')
window.location = '#/';
location.reload()
}, 1000)
// setTimeout(() => {
// window.localStorage.removeItem("token");
// // window.location = '#/';
// location.reload();
// }, 1000);
break
break;
default:
break
break;
}
return error.response.data
return error.response.data;
}
}
)
export default service
);
export default service;
......@@ -80,6 +80,67 @@
</div>
</div>
<div class="right">
<div class="item">
<div class="_title prefixDiv">
<span class="_left">孵化器经营信息统计</span>
</div>
<div class="body">
<div class="_top">
<ul>
<li>
<span>
企业总数:{{ data4panel0.companyCount }}
</span>
<span style="margin-left: 90px;">
从业人员总数:{{ data4panel0.employeesCount }}
</span>
</li>
<li></li>
<li>企业总收入:{{ data4panel0.companyRevenue }}万元</li>
</ul>
<p
style="font-size: 15px;
color: #606266;
line-height: 26px;
margin-left: 50px;
margin-top: 15px;
margin-bottom: 5px;"
>
<span class="dbox"></span>
知识产权
</p>
<ul>
<li>
<span>
发明专利数总数:{{
data4panel0.inventionPatentsNumber
}}
</span>
<span style="margin-left: 50px;">
发明申请数总数:{{
data4panel0.inventionApplicationsNumber
}}</span
>
</li>
<li></li>
<li></li>
<li style="margin-bottom:20px;">
<span>
实用新型数总数:{{
data4panel0.utilityModelsNumber
}}</span
>
<span style="margin-left: 50px;"
>软件著作权数总数:{{
data4panel0.softwareCopyrightNumber
}}</span
>
</li>
</ul>
</div>
<div class="_bottom"></div>
</div>
</div>
<div class="item">
<div class="_title prefixDiv">
<span class="_left">简介</span>
......@@ -103,7 +164,10 @@
</div>
</div>
</li>
<li class="tab_panel_1" v-if="activeIndex === 1||activeIndex === 2||activeIndex === 3">
<li
class="tab_panel_1"
v-if="activeIndex === 1 || activeIndex === 2 || activeIndex === 3"
>
<div class="_left">
<div class="_title">
<span>{{ navCompanyTypeName }}</span>
......@@ -119,7 +183,14 @@
<ul>
<!-- tableData4panel1 -->
<li v-for="item1 in tableData4panel1" :key="item1.companyId" :class="{active: currentSelectedCompanyId===item1.companyId}" @click="changeCompany(item1.companyId)">
<li
v-for="item1 in tableData4panel1"
:key="item1.companyId"
:class="{
active: currentSelectedCompanyId === item1.companyId
}"
@click="changeCompany(item1.companyId)"
>
{{ item1.companyName }}
</li>
</ul>
......@@ -135,7 +206,7 @@
</div>
</div>
<div class="_right">
<h2>{{data4panel1.companyName}}</h2>
<h2>{{ data4panel1.companyName }}</h2>
<div class="divider"></div>
<div class="_title prefixDiv">
<div class="_left">企业基础信息</div>
......@@ -144,61 +215,63 @@
<div class="_body">
<ul>
<li class="prefixPoint">
入驻时间: {{ data4panel1.entryDate || '-' }}
入驻时间: {{ data4panel1.entryDate || "-" }}
</li>
<li class="prefixPoint">
法人: {{ data4panel1.legalPerson || '-' }}
法人: {{ data4panel1.legalPerson || "-" }}
</li>
<li class="prefixPoint">
联系人: {{ data4panel1.principal || '-' }}
联系人: {{ data4panel1.principal || "-" }}
</li>
<li class="prefixPoint">
联系电话: {{ data4panel1.contactPhone || '-' }}
联系电话: {{ data4panel1.contactPhone || "-" }}
</li>
<li class="prefixPoint">
企业类型: {{ data4panel1.companyTypeName || '-'}}
企业类型: {{ data4panel1.companyTypeName || "-" }}
</li>
<li class="prefixPoint">
主要负责人创业特征: {{ data4panel1.founderCharacteristicsName || '-'}}
主要负责人创业特征:
{{ data4panel1.founderCharacteristicsName || "-" }}
</li>
<li class="prefixPoint">
全职导师: {{ data4panel1.mentorName || '-'}}
全职导师: {{ data4panel1.mentorName || "-" }}
</li>
<li class="prefixPoint">
兼职导师: {{ data4panel1.parMentorName || '-'}}
兼职导师: {{ data4panel1.parMentorName || "-" }}
</li>
<li class="prefixPoint">
孵化状态: {{ data4panel1.incubationStatusName || '-'}}
孵化状态: {{ data4panel1.incubationStatusName || "-" }}
</li>
<li class="prefixPoint">
企业级别: {{ data4panel1.companyLevelName || '-' }}
企业级别: {{ data4panel1.companyLevelName || "-" }}
</li>
<li class="prefixPoint">
所属技术领域: {{ data4panel1.technicalFieldName || '-' }}
所属技术领域: {{ data4panel1.technicalFieldName || "-" }}
</li>
<li class="prefixPoint">
是否体外孵化: {{ data4panel1.outsideIncubation? '': '' }}
是否体外孵化:
{{ data4panel1.outsideIncubation ? "" : "" }}
</li>
<li class="prefixPoint">
占用孵化场地面积: {{ data4panel1.occupiedArea || '-' }}
占用孵化场地面积: {{ data4panel1.occupiedArea || "-" }}
</li>
<li class="prefixPoint">
累计获得融资总额: {{ data4panel1.totalFunding || '-' }}
累计获得融资总额: {{ data4panel1.totalFunding || "-" }}
</li>
<li class="prefixPoint">
注册资金: {{ data4panel1.registeredCapital || '-' }}
注册资金: {{ data4panel1.registeredCapital || "-" }}
</li>
<li class="prefixPoint">
注册时间: {{ data4panel1.registerDate || '-'}}
注册时间: {{ data4panel1.registerDate || "-" }}
</li>
<li class="prefixPoint">
投资方名称: {{ data4panel1.investorsName || '-'}}
投资方名称: {{ data4panel1.investorsName || "-" }}
</li>
<li class="prefixPoint">
投资地区: {{ data4panel1.investmentArea || '-'}}
投资地区: {{ data4panel1.investmentArea || "-" }}
</li>
<li class="prefixPoint">
位置: {{ data4panel1.address || '-'}}
位置: {{ data4panel1.address || "-" }}
</li>
</ul>
</div>
......@@ -209,16 +282,17 @@
<div class="_body">
<ul>
<li class="prefixPoint">
发明专利数: {{ data4panel1.inventionPatentsNumber || '-'}}
发明专利数: {{ data4panel1.inventionPatentsNumber || "-" }}
</li>
<li class="prefixPoint">
实用新型数: {{ data4panel1.utilityModelsNumber || '-' }}
实用新型数: {{ data4panel1.utilityModelsNumber || "-" }}
</li>
<li class="prefixPoint">
软件著作权数: {{ data4panel1.softwareCopyrightNumber || '-' }}
软件著作权数: {{ data4panel1.softwareCopyrightNumber || "-" }}
</li>
<li class="prefixPoint">
发明申请数: {{ data4panel1.inventionApplicationsNumber || '-' }}
发明申请数:
{{ data4panel1.inventionApplicationsNumber || "-" }}
</li>
</ul>
</div>
......@@ -228,7 +302,12 @@
</div>
<div class="_body">
<ul>
<li v-for="(item, index) in data4panel1.entrepreneurshipInnovationEnterprises" class="prefixPoint" :key="index">
<li
v-for="(item,
index) in data4panel1.entrepreneurshipInnovationEnterprises"
class="prefixPoint"
:key="index"
>
{{ item.name }}: {{ item.value }}
</li>
</ul>
......@@ -241,34 +320,34 @@
<div class="_body">
<ul>
<li class="prefixPoint">
从业人员: {{ data4panel1.totalEmployees || '-' }}
从业人员: {{ data4panel1.totalEmployees || "-" }}
</li>
<li class="prefixPoint">
博士人数: {{ data4panel1.phdEmployees || '-' }}
博士人数: {{ data4panel1.phdEmployees || "-" }}
</li>
<li class="prefixPoint">
硕士人数: {{ data4panel1.masterEmployees || '-' }}
硕士人数: {{ data4panel1.masterEmployees || "-" }}
</li>
<li class="prefixPoint">
本科人数: {{ data4panel1.undergraduateEmployees || '-'}}
本科人数: {{ data4panel1.undergraduateEmployees || "-" }}
</li>
<li class="prefixPoint">
留学人数: {{ data4panel1.overseasEmployees || '-'}}
留学人数: {{ data4panel1.overseasEmployees || "-" }}
</li>
<li class="prefixPoint">
净利润: {{ data4panel1.netProfit || '-'}}万元
净利润: {{ data4panel1.netProfit || "-" }}万元
</li>
<li class="prefixPoint">
上缴税费: {{ data4panel1.taxesPaid || '-' }}万元
上缴税费: {{ data4panel1.taxesPaid || "-" }}万元
</li>
<li class="prefixPoint">
总收入: {{ data4panel1.grossIncome || '-'}}万元
总收入: {{ data4panel1.grossIncome || "-" }}万元
</li>
<li class="prefixPoint">
研发投入: {{ data4panel1.researchInput || '-'}}万元
研发投入: {{ data4panel1.researchInput || "-" }}万元
</li>
<li class="prefixPoint">
研发投入占比: {{ data4panel1.investmentProportion || '-' }}%
研发投入占比: {{ data4panel1.investmentProportion || "-" }}%
</li>
</ul>
</div>
......@@ -279,13 +358,18 @@
<div class="_right" @click="getMore4panel1_3">查看更多>></div>
</div>
<div class="_body" style="padding-bottom:20px;">
<div v-if="!data4panel1.companyProductList.length" style="display:flex;justify-content:center;align-items:center; font-size:14px;color:#686868;">暂无数据</div>
<div
v-if="!data4panel1.companyProductList.length"
style="display:flex;justify-content:center;align-items:center; font-size:14px;color:#686868;"
>
暂无数据
</div>
<dl v-else>
<dd v-for="(item,index) in data4panel1.companyProductList" :key="index">
<img
:src="`${baseAPI}file/${item.image}`"
alt=""
/>
<dd
v-for="(item, index) in data4panel1.companyProductList"
:key="index"
>
<img :src="`${baseAPI}file/${item.image}`" alt="" />
<h3>{{ item.productName }}</h3>
<p v-html="item.description">
<!-- 内置NB-IoT物联网SIM卡,把数据传
......@@ -309,10 +393,7 @@
</div>
<ul>
<li v-for="item in tableData4panel4" :key="item.id">
<img
:src="`${baseAPI}file/${item.photo}`"
alt=""
/>
<img :src="`${baseAPI}file/${item.photo}`" alt="" />
<p>姓名:{{ item.mentorName }}</p>
<p>学历:{{ item.education }}</p>
<p>毕业学校:{{ item.graduationSchool }}</p>
......@@ -334,7 +415,6 @@
</ul>
</div>
<el-dialog
title="孵化器年度收入信息"
:visible.sync="dialogVisible4panel0"
......@@ -348,11 +428,7 @@
@blur="filterData4panel0"
></el-input>
<el-table :data="tableData4panel0" style="width: 100%">
<el-table-column
prop="year"
label="年度"
width="50"
></el-table-column>
<el-table-column prop="year" label="年度" width="50"></el-table-column>
<el-table-column
prop="totalRevenue"
label="孵化器总收入(万元)"
......@@ -392,7 +468,6 @@
:page-sizes="[10, 20, 30, 40]"
layout="prev, pager, next, sizes"
></el-pagination>
</el-dialog>
<el-dialog
......@@ -408,11 +483,7 @@
@blur="filterData4panel1_2"
></el-input>
<el-table :data="tableData4panel1_2" style="width: 100%">
<el-table-column
prop="year"
label="年度"
width="50"
></el-table-column>
<el-table-column prop="year" label="年度" width="50"></el-table-column>
<el-table-column
prop="totalEmployees"
label="从业人数"
......@@ -445,7 +516,6 @@
prop="grossIncome"
label="总收入(万元)"
></el-table-column>
</el-table>
<el-pagination
......@@ -457,7 +527,6 @@
:page-sizes="[10, 20, 30, 40]"
layout="prev, pager, next, sizes"
></el-pagination>
</el-dialog>
<el-dialog
title="企业产品信息"
......@@ -484,14 +553,14 @@
align="center"
>
<template slot-scope="scope">
<img :src="`${baseAPI}file/${scope.row.image}`" alt="Image" style="width: 80px; height: auto;" />
<img
:src="`${baseAPI}file/${scope.row.image}`"
alt="Image"
style="width: 80px; height: auto;"
/>
</template>
</el-table-column>
<el-table-column
prop="description"
label="简介"
align="center"
>
<el-table-column prop="description" label="简介" align="center">
</el-table-column>
</el-table>
......@@ -504,34 +573,26 @@
:page-sizes="[10, 20, 30, 40]"
layout="prev, pager, next, sizes"
></el-pagination>
</el-dialog>
<!-- penel -->
<el-dialog
title="简介信息"
:visible.sync="dialogVisible4panel4"
>
<el-dialog title="简介信息" :visible.sync="dialogVisible4panel4">
<div v-html="introduction4panel4"></div>
</el-dialog>
<el-dialog
title="企业简介"
:visible.sync="dialogVisible4panel1"
>
<el-dialog title="企业简介" :visible.sync="dialogVisible4panel1">
<div v-html="data4panel1.introduction"></div>
</el-dialog>
</div>
</template>
</template>
<script>
var baseAPI =
<script>
var baseAPI =
process.env.NODE_ENV === "development"
? process.env.VUE_APP_LOCAL_API + "/"
: (VUE_APP_API.ServiceURL || process.env.VUE_APP_LOCAL_API) + "/";
import overviewApi from "@/api/system/overview.js";
import * as echarts from "echarts";
import overviewApi from "@/api/system/overview.js";
import * as echarts from "echarts";
export default {
export default {
name: "Overview",
components: {},
data() {
......@@ -542,7 +603,7 @@
// 顶部切换菜单
activeIndex: 0,
navCompanyTypeName: '',
navCompanyTypeName: "",
// panel0 孵化器概况
data4panel0: {},
......@@ -550,7 +611,7 @@
currentPage4panel0: 0, // 当前页码
pageSize4panel0: 10, // 每页显示的条目数量
dialogVisible4panel0: false,
searchQuery4panel0: '',
searchQuery4panel0: "",
tableData4panel0: [],
// panel123 企业信息
......@@ -560,27 +621,27 @@
totalCount4panel1: 0, // 总条目数
currentPage4panel1: 0, // 当前页码
pageSize4panel1: 10, // 每页显示的条目数量
searchQuery4panel1: '',
searchQuery4panel1: "",
tableData4panel1: [],
// panel_1 企业简介 弹窗
dialogVisible4panel1: false,
introduction4panel1: '',
introduction4panel1: "",
// panel_1 年度收入信息 弹窗
currentPage4panel1_2: 0, // 当前页码
pageSize4panel1_2: 10, // 每页显示的条目数量
dialogVisible4panel1_2: false,
searchQuery4panel1_2: '',
searchQuery4panel1_2: "",
tableData4panel1_2: [],
totalCount4panel1_2: 0, // 总条目数
// panel_1 产品信息 弹窗
currentSelectedCompanyId: '',
currentSelectedCompanyId: "",
currentPage4panel1_3: 0, // 当前页码
pageSize4panel1_3: 10, // 每页显示的条目数量
dialogVisible4panel1_3: false,
searchQuery4panel1_3: '',
searchQuery4panel1_3: "",
tableData4panel1_3: [],
totalCount4panel1_3: 0,
......@@ -589,56 +650,53 @@
currentPage4panel4: 0, // 当前页码
pageSize4panel4: 10, // 每页显示的条目数量
dialogVisible4panel4: false,
searchQuery4panel4: '',
searchQuery4panel4: "",
tableData4panel4: [],
introduction4panel4: '',
introduction4panel4: ""
};
},
computed: {},
mounted() {
this.incubatorId = this.$route.query.id || '';
this.incubatorId = this.$route.query.id || "";
// this.getData4panel0();
// this.getData4panel4();
this.getData4panel0()
this.getData4panel0();
},
methods: {
changeNav(index) {
this.activeIndex = ~~index;
if(index === 1){
this.navCompanyTypeName = '在孵企业'
}else if(index === 2){
this.navCompanyTypeName = '毕业企业'
}else if(index === 3){
this.navCompanyTypeName = '中介机构'
}
if(~~this.activeIndex === 1 || ~~this.activeIndex === 2 || ~~this.activeIndex === 3){
this.searchQuery4panel1 = '' // 清空公司搜索框
if (index === 1) {
this.navCompanyTypeName = "在孵企业";
} else if (index === 2) {
this.navCompanyTypeName = "毕业企业";
} else if (index === 3) {
this.navCompanyTypeName = "中介机构";
}
if (
~~this.activeIndex === 1 ||
~~this.activeIndex === 2 ||
~~this.activeIndex === 3
) {
this.searchQuery4panel1 = ""; // 清空公司搜索框
// 重置分页条件查询信息
this.totalCount4panel1 = 0 // 总条目数
this.currentPage4panel1 = 0 // 当前页码
this.pageSize4panel1 = 10 // 每页显示的条目数量
this.totalCount4panel1 = 0; // 总条目数
this.currentPage4panel1 = 0; // 当前页码
this.pageSize4panel1 = 10; // 每页显示的条目数量
this.getData4panel1()
}else if(~~this.activeIndex === 0){
this.totalCount4panel0 = 0 // 总条目数
this.currentPage4panel0 = 0 // 当前页码
this.pageSize4panel0 = 10 // 每页显示的条目数量
this.getData4panel0()
}else if(~~this.activeIndex === 4){
this.getData4panel1();
} else if (~~this.activeIndex === 0) {
this.totalCount4panel0 = 0; // 总条目数
this.currentPage4panel0 = 0; // 当前页码
this.pageSize4panel0 = 10; // 每页显示的条目数量
this.getData4panel0();
} else if (~~this.activeIndex === 4) {
// 重置分页条件查询信息
this.totalCount4panel4 = 0 // 总条目数
this.currentPage4panel4 = 0 // 当前页码
this.pageSize4panel4 = 10 // 每页显示的条目数量
this.getData4panel4()
this.totalCount4panel4 = 0; // 总条目数
this.currentPage4panel4 = 0; // 当前页码
this.pageSize4panel4 = 10; // 每页显示的条目数量
this.getData4panel4();
}
},
/**
* getData4enterprise
......@@ -649,89 +707,100 @@
this.currentPage4panel1 = 1; // 重置当前分页
this.getData4panel1();
},
getMore4panel1(item){
this.dialogVisible4panel1 = true
this.introduction4panel1 = item.introduction
getMore4panel1(item) {
this.dialogVisible4panel1 = true;
this.introduction4panel1 = item.introduction;
},
handleCurrentChange4panel1(newPage) {
// 切换分页
this.currentPage4panel1 = newPage;
this.getData4panel1()
this.getData4panel1();
},
handleSizeChange4panel1(newSize){
handleSizeChange4panel1(newSize) {
this.pageSize4panel1 = newSize;
this.getData4panel1()
this.getData4panel1();
},
getData4panel1() { // 获取panel2,3,4企业列表
let companyType = ''
if(~~this.activeIndex === 1){
companyType = '1'
}else if(~~this.activeIndex === 2){
companyType = '2'
}else if(~~this.activeIndex === 3){
companyType = '3'
getData4panel1() {
// 获取panel2,3,4企业列表
let companyType = "";
if (~~this.activeIndex === 1) {
companyType = "1";
} else if (~~this.activeIndex === 2) {
companyType = "2";
} else if (~~this.activeIndex === 3) {
companyType = "3";
}
overviewApi
.getData4enterprise({
// 之所以减一操作时因为后台page从0开始,而组件分页时1开始。
page: this.currentPage4panel1 > 0 ? this.currentPage4panel1-1 : this.currentPage4panel1,
page:
this.currentPage4panel1 > 0
? this.currentPage4panel1 - 1
: this.currentPage4panel1,
size: this.pageSize4panel1,
incubatorId: this.incubatorId,
companyType,
vague: {"companyName": this.searchQuery4panel1}
vague: { companyName: this.searchQuery4panel1 }
})
.then((res) => {
.then(res => {
this.tableData4panel1 = res.body.records || [];
this.totalCount4panel1 = res.body.total
if(this.tableData4panel1.length){
this.getData4panel1_1(this.tableData4panel1[0].companyId)
this.currentSelectedCompanyId = this.tableData4panel1[0].companyId
}else{ // 公司列表为空的时候, 数据为空.
this.getData4panel1_1('')
this.currentSelectedCompanyId = ''
this.totalCount4panel1 = res.body.total;
if (this.tableData4panel1.length) {
this.getData4panel1_1(this.tableData4panel1[0].companyId);
this.currentSelectedCompanyId = this.tableData4panel1[0].companyId;
} else {
// 公司列表为空的时候, 数据为空.
this.getData4panel1_1("");
this.currentSelectedCompanyId = "";
}
});
},
getData4panel1_1(companyId) { // 获取panel2,3,4企业详情
getData4panel1_1(companyId) {
// 获取panel2,3,4企业详情
overviewApi
.getData4enterpriseDetail({
companyId: companyId+''
companyId: companyId + ""
})
.then((res) => {
.then(res => {
this.data4panel1 = res.body || { companyProductList: [] };
});
},
changeCompany(companyId){
this.currentSelectedCompanyId = companyId
this.getData4panel1_1(companyId)
changeCompany(companyId) {
this.currentSelectedCompanyId = companyId;
this.getData4panel1_1(companyId);
},
getMore4panel1(){// 获取企业简介
this.dialogVisible4panel1 = true
getMore4panel1() {
// 获取企业简介
this.dialogVisible4panel1 = true;
},
filterData4panel1_2() {
this.currentPage4panel1_2 = 1; // 重置当前分页
this.getDialogData4panel1_2();
},
getMore4panel1_2(){ // 获取更多年度收入信息
this.dialogVisible4panel1_2 = true
this.getDialogData4panel1_2()
getMore4panel1_2() {
// 获取更多年度收入信息
this.dialogVisible4panel1_2 = true;
this.getDialogData4panel1_2();
},
getDialogData4panel1_2(fn) { // 获取panel1 经营信息 弹窗列表信息
getDialogData4panel1_2(fn) {
// 获取panel1 经营信息 弹窗列表信息
overviewApi
.getDialogData4panel1_2({
page: this.currentPage4panel1_2 > 0 ? this.currentPage4panel1_2-1 : this.currentPage4panel1_2,
page:
this.currentPage4panel1_2 > 0
? this.currentPage4panel1_2 - 1
: this.currentPage4panel1_2,
size: this.pageSize4panel1_2,
exact:{
companyId: this.currentSelectedCompanyId,
exact: {
companyId: this.currentSelectedCompanyId
},
vague:{
vague: {
year: this.searchQuery4panel1_2
}
})
.then((res) => {
.then(res => {
this.tableData4panel1_2 = res.body.list || [];
});
},
......@@ -740,30 +809,34 @@
this.currentPage4panel1_2 = newPage;
// 这里可以添加代码来加载新页的数据
console.log(`当前页: ${newPage}`);
this.getDialogData4panel1_2()
this.getDialogData4panel1_2();
},
handleSizeChange4panel1_2(newSize){
handleSizeChange4panel1_2(newSize) {
this.pageSize4panel1_2 = newSize;
this.getDialogData4panel1_2()
this.getDialogData4panel1_2();
},
getMore4panel1_3(){ // 获取更多产品信息
this.dialogVisible4panel1_3 = true
this.getDialogData4panel1_3()
getMore4panel1_3() {
// 获取更多产品信息
this.dialogVisible4panel1_3 = true;
this.getDialogData4panel1_3();
},
getDialogData4panel1_3() { // 获取panel1 产品弹窗列表信息
getDialogData4panel1_3() {
// 获取panel1 产品弹窗列表信息
overviewApi
.getDialogData4panel1_3({
page: this.currentPage4panel1_3 > 0 ? this.currentPage4panel1_3-1 : this.currentPage4panel1_3,
page:
this.currentPage4panel1_3 > 0
? this.currentPage4panel1_3 - 1
: this.currentPage4panel1_3,
size: this.pageSize4panel1_3,
exact:{
companyId: this.currentSelectedCompanyId,
exact: {
companyId: this.currentSelectedCompanyId
},
vague: {"productName": this.searchQuery4panel1_3}
vague: { productName: this.searchQuery4panel1_3 }
})
.then((res) => {
.then(res => {
this.tableData4panel1_3 = res.body.list || [];
this.totalCount4panel1_3 = res.body.total
this.totalCount4panel1_3 = res.body.total;
});
},
filterData4panel1_3() {
......@@ -775,12 +848,11 @@
this.currentPage4panel1_3 = newPage;
// 这里可以添加代码来加载新页的数据
console.log(`当前页: ${newPage}`);
this.getDialogData4panel1_3()
this.getDialogData4panel1_3();
},
handleSizeChange4panel1_3(newSize){
handleSizeChange4panel1_3(newSize) {
this.pageSize4panel1_3 = newSize;
this.getDialogData4panel1_3()
this.getDialogData4panel1_3();
},
/**
......@@ -790,9 +862,9 @@
this.currentPage4panel0 = 1; // 重置当前分页
this.getDialogData4panel0();
},
getMore4panel0(){
this.dialogVisible4panel0 = true
this.getDialogData4panel0()
getMore4panel0() {
this.dialogVisible4panel0 = true;
this.getDialogData4panel0();
},
handleCurrentChange4panel0(newPage) {
......@@ -800,24 +872,34 @@
this.currentPage4panel0 = newPage;
// 这里可以添加代码来加载新页的数据
console.log(`当前页: ${newPage}`);
this.getDialogData4panel0()
this.getDialogData4panel0();
},
handleSizeChange4panel0(newSize){
handleSizeChange4panel0(newSize) {
this.pageSize4panel0 = newSize;
this.getDialogData4panel0()
this.getDialogData4panel0();
},
initChart4panel0_1() {
const chartDom = this.$refs.pieChart4panel0_1;
const myChart = echarts.init(chartDom);
const colorArr = ['#5c7bd9', '#3ba172', '#73c0de', '#ee6666', '#f7c557', '#91cc75', '#5470c6', '#3e75e5']
const chartsData = this.data4panel0.revenueChartData.map((item,index)=>{
item.itemStyle= {color: colorArr[index]}
return item
})
const colorArr = [
"#5c7bd9",
"#3ba172",
"#73c0de",
"#ee6666",
"#f7c557",
"#91cc75",
"#5470c6",
"#3e75e5"
];
const chartsData = this.data4panel0.revenueChartData.map(
(item, index) => {
item.itemStyle = { color: colorArr[index] };
return item;
}
);
const option = {
tooltip: {
trigger: "item",
trigger: "item"
},
series: [
{
......@@ -830,11 +912,11 @@
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
},
],
shadowColor: "rgba(0, 0, 0, 0.5)"
}
}
}
]
};
myChart.setOption(option);
......@@ -843,15 +925,15 @@
const chartDom = this.$refs.pieChart4panel0_2;
const myChart = echarts.init(chartDom);
const colorArr = ['#9fe080','#5470c6', '#f9c758']
const colorArr = ["#9fe080", "#5470c6", "#f9c758"];
const chartsData = this.data4panel0.areaChartData.map((item, index)=>{
item.itemStyle= {color: colorArr[index]}
return item
})
const chartsData = this.data4panel0.areaChartData.map((item, index) => {
item.itemStyle = { color: colorArr[index] };
return item;
});
const option = {
tooltip: {
trigger: "item",
trigger: "item"
},
series: [
{
......@@ -863,46 +945,50 @@
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
},
],
shadowColor: "rgba(0, 0, 0, 0.5)"
}
}
}
]
};
myChart.setOption(option);
},
getDialogData4panel0(fn) { // 获取panel0弹窗列表信息
getDialogData4panel0(fn) {
// 获取panel0弹窗列表信息
overviewApi
.getDialogData4panel0({
page: this.currentPage4panel0 > 0 ? this.currentPage4panel0-1 : this.currentPage4panel0,
page:
this.currentPage4panel0 > 0
? this.currentPage4panel0 - 1
: this.currentPage4panel0,
size: this.pageSize4panel0,
exact:{
incubatorId: this.incubatorId,
exact: {
incubatorId: this.incubatorId
},
vague:{
vague: {
year: this.searchQuery4panel0
}
})
.then((res) => {
.then(res => {
console.log(res, "getData4panel04tech");
this.tableData4panel0 = res.body.list || [];
this.totalCount4panel0 = res.body.total
this.totalCount4panel0 = res.body.total;
});
},
getData4panel0(fn) { // 获取panel0页面统计信息
getData4panel0(fn) {
// 获取panel0页面统计信息
overviewApi
.getData4panel0({
exact:{
incubatorId: this.incubatorId,
exact: {
incubatorId: this.incubatorId
}
})
.then((res) => {
.then(res => {
console.log(res, "getData4panel04tech");
this.data4panel0 = res.body;
this.initChart4panel0_1();
this.initChart4panel0_2()
this.initChart4panel0_2();
});
},
/**
......@@ -913,52 +999,54 @@
this.currentPage4panel4 = 1; // 重置当前分页
this.getData4panel4();
},
getMore4panel4(item){
this.dialogVisible4panel4 = true
this.introduction4panel4 = item.introduction
getMore4panel4(item) {
this.dialogVisible4panel4 = true;
this.introduction4panel4 = item.introduction;
},
handleCurrentChange4panel4(newPage) {
// 切换分页
this.currentPage4panel4 = newPage;
this.getData4panel4()
this.getData4panel4();
},
handleSizeChange4panel4(newSize){
handleSizeChange4panel4(newSize) {
this.pageSize4panel4 = newSize;
this.getData4panel4()
this.getData4panel4();
},
getData4panel4(fn) { // 获取panel4导师信息
getData4panel4(fn) {
// 获取panel4导师信息
overviewApi
.getData4panel4({
page: this.currentPage4panel4 > 0 ? this.currentPage4panel4-1 : this.currentPage4panel4,
page:
this.currentPage4panel4 > 0
? this.currentPage4panel4 - 1
: this.currentPage4panel4,
size: this.pageSize4panel4,
exact:{
incubatorId: this.incubatorId,
exact: {
incubatorId: this.incubatorId
},
vague: {"mentorName":this.searchQuery4panel4}
vague: { mentorName: this.searchQuery4panel4 }
})
.then((res) => {
.then(res => {
this.tableData4panel4 = res.body.list || [];
this.totalCount4panel4 = res.body.total
this.totalCount4panel4 = res.body.total;
});
},
},
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.app-container {
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.app-container {
padding: 20px;
background-color: #fff;
font-family: Microsoft YaHei;
}
}
.page-footer {
.page-footer {
display: none !important;
}
}
.header {
.header {
// 菜单标题头
background: #f5f7fa;
ul {
......@@ -989,14 +1077,14 @@
}
}
}
}
}
.bodyer {
.bodyer {
// panels最外层容器
background-color: #fff;
}
}
.panelsWrapper {
.panelsWrapper {
// panels父容器
background: #f5f6fb;
display: flex;
......@@ -1008,15 +1096,15 @@
background: #ffffff;
position: relative;
}
}
}
/**公共类 */
.divider {
/**公共类 */
.divider {
width: 100%;
height: 1px;
border: 1px dashed #dddee1;
}
.prefixDiv {
}
.prefixDiv {
position: relative;
&:before {
width: 4px;
......@@ -1028,8 +1116,8 @@
left: 16px;
content: "";
}
}
.prefixPoint {
}
.prefixPoint {
position: relative;
&:before {
content: "";
......@@ -1042,9 +1130,9 @@
top: 50%; /* 垂直居中 */
transform: translateY(-50%); /* 精确居中 */
}
}
/** 第五个面板 */
.tab_panel_4 {
}
/** 第五个面板 */
.tab_panel_4 {
._title {
font-size: 16px;
color: #1890ff;
......@@ -1118,8 +1206,8 @@
}
}
}
}
.tab_panel_1 {
}
.tab_panel_1 {
display: flex;
padding: 10px;
& > ._left {
......@@ -1128,7 +1216,7 @@
height: 798px !important;
border: 1px solid #dddee1;
padding: 20px;
ul{
ul {
height: 640px;
overflow-y: auto;
}
......@@ -1247,9 +1335,9 @@
}
}
}
}
}
.tab_panel_0 {
.tab_panel_0 {
h2 {
font-weight: 400;
font-size: 27px;
......@@ -1270,7 +1358,7 @@
justify-content: space-between;
padding-left: 26px;
padding-right: 20px;
&>._right{
& > ._right {
cursor: pointer;
}
}
......@@ -1291,7 +1379,6 @@
._right {
flex: 1;
}
}
li {
font-size: 15px;
......@@ -1315,6 +1402,14 @@
line-height: 26px;
padding: 4px 42px;
}
.dbox {
display: inline-block;
width: 10px;
height: 10px;
background: #1890ff;
border-radius: 50%;
margin-right: 5px;
}
}
._bottom {
padding-left: 40px;
......@@ -1325,10 +1420,9 @@
}
}
}
}
}
::v-deep .el-dialog__body .el-table th.el-table__cell{
::v-deep .el-dialog__body .el-table th.el-table__cell {
background-color: #f9ffec;
}
</style>
\ No newline at end of file
}
</style>
'use strict'
const path = require('path')
"use strict";
const path = require("path");
const Mode = 'src'; // 'src' 'src-neuter'(中性)
const Mode = "src"; // 'src' 'src-neuter'(中性)
// copy-webpack-plugin@4.5.2
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CopyWebpackPlugin = require("copy-webpack-plugin");
//var HtmlWebpackPlugin = require('html-webpack-plugin');
const defaultSettings = require('./'+Mode+'/settings.js');
const defaultSettings = require("./" + Mode + "/settings.js");
function resolve(dir) {
return path.join(__dirname, dir)
};
return path.join(__dirname, dir);
}
const name = defaultSettings.title; // 网址标题
const port = process.env.VUE_APP_LOCAL_PORT; // 端口配置
const VUE_APP_BASE_API = process.env.VUE_APP_BASE_API;
// 在文件顶部添加验证
console.log("BASE_API:", process.env.VUE_APP_BASE_API); // 调试用,确保能正确打印地址
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
// hash 模式下可使用
// publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
publicPath: '/',
outputDir: 'dist',
assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development',
publicPath: "/",
outputDir: "dist",
assetsDir: "static",
lintOnSave: process.env.NODE_ENV === "development",
productionSourceMap: false,
//indexPath: 'index3.html',
//integrity:true,
lintOnSave:false, // 关闭代码核查
pages:{
lintOnSave: false, // 关闭代码核查
pages: {
index: {
entry: Mode+'/main.js',
entry: Mode + "/main.js",
// 模板来源
template: './public/index.html',
template: "./public/index.html",
// 在 dist/index.html 的输出
filename: 'index.html',
filename: "index.html",
// 当使用 title 选项时,
// template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
//title: "Index Page",
......@@ -45,139 +46,141 @@ module.exports = {
},
edge: {
// 页面的入口文件
entry: Mode+'/edge.js',
entry: Mode + "/edge.js",
// 页面的模板文件
template: './public/edge.html',
template: "./public/edge.html",
// build 生成的文件名称 例: dist/index.html
filename: 'edge.html',
chunks:["edge", "runtime", "chunk-libs", "chunk-elementUI"],
filename: "edge.html",
chunks: ["edge", "runtime", "chunk-libs", "chunk-elementUI"]
}
},
devServer: {
port: port,
host: VUE_APP_BASE_API && VUE_APP_BASE_API.split(/\/\/|:/).slice(-2)[0],
host: "0.0.0.0",
open: false,
overlay: {
warnings: false,
errors: true
},
proxy: {
'/api': {
target: process.env.VUE_APP_BASE_API,
"/api": {
target: VUE_APP_BASE_API,
changeOrigin: true,
pathRewrite: {
'^/api': 'api'
"^/api": "api"
}
},
'/auth': {
target: process.env.VUE_APP_BASE_API,
"/auth": {
target: VUE_APP_BASE_API,
changeOrigin: true,
pathRewrite: {
'^/auth': 'auth'
"^/auth": "auth"
}
}
},
}
},
configureWebpack: {
// provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
plugins: [
new CopyWebpackPlugin([{
new CopyWebpackPlugin([
{
from: "./static",
to: 'static'
}]),
new CopyWebpackPlugin([{
to: "static"
}
]),
new CopyWebpackPlugin([
{
from: "./config",
to: 'config'
}])
to: "config"
}
])
],
name: name,
resolve: {
alias: {
'@': resolve(Mode+''),
'@crud': resolve(Mode+'/components/Crud')
"@": resolve(Mode + ""),
"@crud": resolve(Mode + "/components/Crud")
}
}
},
chainWebpack(config) {
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
config.plugins.delete("preload"); // TODO: need test
config.plugins.delete("prefetch"); // TODO: need test
// set svg-sprite-loader
config.module
.rule('svg')
.exclude.add(resolve(Mode+'/assets/icons'))
.end()
.rule("svg")
.exclude.add(resolve(Mode + "/assets/icons"))
.end();
config.module
.rule('icons')
.rule("icons")
.test(/\.svg$/)
.include.add(resolve(Mode+'/assets/icons'))
.include.add(resolve(Mode + "/assets/icons"))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.use("svg-sprite-loader")
.loader("svg-sprite-loader")
.options({
symbolId: 'icon-[name]'
symbolId: "icon-[name]"
})
.end()
.end();
// set preserveWhitespace
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.rule("vue")
.use("vue-loader")
.loader("vue-loader")
.tap(options => {
options.compilerOptions.preserveWhitespace = true
return options
options.compilerOptions.preserveWhitespace = true;
return options;
})
.end()
.end();
config
// https://webpack.js.org/configuration/devtool/#development
.when(process.env.NODE_ENV === 'development',
config => config.devtool('cheap-source-map')
)
.when(process.env.NODE_ENV === "development", config =>
config.devtool("cheap-source-map")
);
config.when(process.env.NODE_ENV !== "development", config => {
config
.when(process.env.NODE_ENV !== 'development',
config => {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
.plugin("ScriptExtHtmlWebpackPlugin")
.after("html")
.use("script-ext-html-webpack-plugin", [
{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end()
config
.optimization.splitChunks({
chunks: 'all',
}
])
.end();
config.optimization.splitChunks({
chunks: "all",
cacheGroups: {
libs: {
name: 'chunk-libs',
name: "chunk-libs",
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
chunks: "initial" // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
name: "chunk-elementUI", // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
commons: {
name: 'chunk-commons',
test: resolve(Mode+'/components'), // can customize your rules
name: "chunk-commons",
test: resolve(Mode + "/components"), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
})
config.optimization.runtimeChunk('single')
}
);
});
config.optimization.runtimeChunk("single");
});
},
transpileDependencies: [
//'vue-echarts',
'resize-detector'
"resize-detector"
]
}
};
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