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(){
name: '信息统计',
Dict: {
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', },
"companyType": {name:"企业类型", 'type':'select', key:'name','width': '180px', },
"incubationStatus": {name:"企业孵化状态", 'type':'select', key:'name','width': '180px', },
......@@ -1270,15 +1270,15 @@ var reqApis = function(){
// "mentorId": {name:"创业导师", 'type':'select', key:'name','width': '180px',},
"companyLevelName": {name:"企业级别", must:true, key:'name', 'width': '180px',},
// "totalEmployees": {name:"今年从业人数(人)", must:true, key:'name', 'width': '180px',},
// "phdEmployees": {name:"博士人数(人)", must:true, key:'name', 'width': '180px',},
// "overseasEmployees": {name:"留学人数(人)", must:true, key:'name', 'width': '180px',},
// "revenueLastYear": {name:"上年营业收入(万元)", must:true, key:'name', 'width': '180px',},
// "netProfit": {name:"净利润(万元)", must:true, key:'name', 'width': '180px',},
// "taxesPaid": {name:"上缴税费(万元)", must:true, key:'name', 'width': '180px',},
// "investmentProportion": {name:"研发投入占比", must:true, key:'name', 'width': '180px',},
// "grossIncome": {name:"总收入(万元)", must:true, key:'name', 'width': '180px',},
// "researchInput": {name:"研发投入(万元)", must:true, key:'name', 'width': '180px',},
"totalEmployees": {name:"今年从业人数(人)", must:true, key:'name', 'width': '180px',},
"phdEmployees": {name:"博士人数(人)", must:true, key:'name', 'width': '180px',},
"overseasEmployees": {name:"留学人数(人)", must:true, key:'name', 'width': '180px',},
"revenueLastYear": {name:"上年营业收入(万元)", must:true, key:'name', 'width': '180px',},
"netProfit": {name:"净利润(万元)", must:true, key:'name', 'width': '180px',},
"taxesPaid": {name:"上缴税费(万元)", must:true, key:'name', 'width': '180px',},
"investmentProportion": {name:"研发投入占比", must:true, key:'name', 'width': '180px',},
"grossIncome": {name:"总收入(万元)", must:true, key:'name', 'width': '180px',},
"researchInput": {name:"研发投入(万元)", must:true, key:'name', 'width': '180px',},
// "mentorId": {name:"创业导师", 'type':'select', key:'name','width': '180px',},
},
......@@ -1292,6 +1292,8 @@ var reqApis = function(){
}; return body.incubatorId;
});
},
companyType:[{"name":"服务企业","value":2},{"name":"中介机构","value":1}],
},
},
config: {
......@@ -1311,14 +1313,22 @@ var reqApis = function(){
},
],
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()
}
},
{ 'type': 'select', 'name': '在孵状态', 'word': 'incubationStatus', '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) {
this.table.page = 1;
......
......@@ -57,7 +57,7 @@
<div class="head-container" v-if="form.config.search && form.config.search[0]">
<!-- 搜索 -->
<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'">
<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>
......
......@@ -6,7 +6,7 @@
</keep-alive>
</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">
<span v-html="$store.state.settings.footerTxt" />
......
......@@ -62,21 +62,22 @@ export const constantRouterMap = [
children: [
{
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: "首页-企业",
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",
component: resolve => require(["@/views/system/home/tech"], resolve),
name: "首页-科技局",
meta: { title: "首页", affix:true , icon: "index"}
},
{
path: "数据概览",
path: "overview",
component: resolve => require(["@/views/system/home/overview"], resolve),
name: "首页-概览",
meta: { title: "概览", affix:true , icon: "index"}
name: "概览",
hidden: true,
meta: { title: "数据概览", icon: "index"}
}
]
},
......
import { login, getInfo, logout } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import { Message } from 'element-ui';
const user = {
state: {
token: getToken(),
......@@ -34,7 +34,7 @@ const user = {
const rememberMe = userInfo.rememberMe;
return new Promise((resolve, reject) => {
login(userInfo).then(res => {
if(/* res.head.code === '0000' || */ !res.code){
if(!res.code){ // 登录成功不返回code状态码。
var body = res.body || res;
setToken(body.token, rememberMe);
commit('SET_TOKEN', body.token);
......@@ -42,8 +42,14 @@ const user = {
// 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
commit('SET_LOAD_MENUS', true);
};
resolve(res)
resolve(res)
}else{
Message({
message: res.msg,
type: 'warning', // 可以是 'success', 'warning', 'info', 'error'
});
resolve(null)
}
}).catch(error => {
reject(error)
})
......
......@@ -171,19 +171,18 @@ export default {
}
});
},
goBackendHome() {
if (localStorage.getItem("groupIdByloginType") * 1 == 1) {
// 孵化器用户
location.href = "/home/enterprise";
return;
}
if (localStorage.getItem("groupIdByloginType") * 1 == 2) {
// 科技据用户
location.href = "/home/tech";
return;
}
location.reload();
},
goBackendHome(){
// if(localStorage.getItem('groupIdByloginType')*1 == 1){ // 孵化器用户
// location.href = '/home/enterprise'
// return
// }
// if(localStorage.getItem('groupIdByloginType')*1 == 2){ // 科技据用户
// location.href = '/home/tech'
// return
// }
// location.reload()
location.href = '/home/enterprise'
},
initMap() {
var VUE = this;
VUE.map = new AMap.Map("container", {
......@@ -1196,416 +1195,6 @@ export default {
};
})();
},
// Cesium
createCesium: function (m, t, f) {
var that = this,
fm = f("init");
fg3d.ImageryProvider = (function () {
var Baidu = function (options) {
this._errorEvent = new Cesium.Event();
this._tileWidth = 256;
this._tileHeight = 256;
this._maximumLevel = 18;
this._minimumLevel = 1;
let southwestInMeters = new Cesium.Cartesian2(-33554054, -33746824);
let northeastInMeters = new Cesium.Cartesian2(33554054, 33746824);
this._tilingScheme = new Cesium.WebMercatorTilingScheme({
rectangleSouthwestInMeters: southwestInMeters,
rectangleNortheastInMeters: northeastInMeters,
});
this._rectangle = this._tilingScheme.rectangle;
this._resource = Cesium.Resource.createIfNeeded(options.url);
this._tileDiscardPolicy = undefined;
this._credit = undefined;
this._readyPromise = undefined;
this.requestImage = function (x, y, level, request) {
let xTileCount = this._tilingScheme.getNumberOfXTilesAtLevel(level);
let yTileCount = this._tilingScheme.getNumberOfYTilesAtLevel(level);
let url = this.url
.replace("{x}", x - xTileCount / 2)
.replace("{y}", yTileCount / 2 - y - 1)
.replace("{z}", level)
.replace("{s}", Math.floor(10 * Math.random()));
return Cesium.ImageryProvider.loadImage(this, url);
};
};
Object.defineProperties(Baidu.prototype, {
url: {
get: function () {
return this._resource.url;
},
},
proxy: {
get: function () {
return this._resource.proxy;
},
},
tileWidth: {
get: function () {
if (!this.ready) {
throw new Cesium.DeveloperError(
"tileWidth must not be called before the imagery provider is ready."
);
}
return this._tileWidth;
},
},
tileHeight: {
get: function () {
if (!this.ready) {
throw new Cesium.DeveloperError(
"tileHeight must not be called before the imagery provider is ready."
);
}
return this._tileHeight;
},
},
maximumLevel: {
get: function () {
if (!this.ready) {
throw new Cesium.DeveloperError(
"maximumLevel must not be called before the imagery provider is ready."
);
}
return this._maximumLevel;
},
},
minimumLevel: {
get: function () {
if (!this.ready) {
throw new Cesium.DeveloperError(
"minimumLevel must not be called before the imagery provider is ready."
);
}
return this._minimumLevel;
},
},
tilingScheme: {
get: function () {
if (!this.ready) {
throw new Cesium.DeveloperError(
"tilingScheme must not be called before the imagery provider is ready."
);
}
return this._tilingScheme;
},
},
tileDiscardPolicy: {
get: function () {
if (!this.ready) {
throw new Cesium.DeveloperError(
"tileDiscardPolicy must not be called before the imagery provider is ready."
);
}
return this._tileDiscardPolicy;
},
},
rectangle: {
get: function () {
if (!this.ready) {
throw new Cesium.DeveloperError(
"rectangle must not be called before the imagery provider is ready."
);
}
return this._rectangle;
},
},
errorEvent: {
get: function () {
return this._errorEvent;
},
},
ready: {
get: function () {
return this._resource;
},
},
readyPromise: {
get: function () {
return this._readyPromise;
},
},
credit: {
get: function () {
if (!this.ready) {
throw new Cesium.DeveloperError(
"credit must not be called before the imagery provider is ready."
);
}
return this._credit;
},
},
});
return { Baidu: Baidu };
})();
fg3d.init({
createViewer: function () {
return {
el: "cesiumContainer",
options: {
//sceneMode : Cesium.SceneMode.COLUMBUS_VIEW,
infoBox: false,
selectionIndicator: false,
navigation: false,
animation: false,
timeline: false,
baseLayerPicker: false,
geocoder: false,
homeButton: false,
sceneModePicker: false,
navigationHelpButton: false,
shouldAnimate: true,
//skyAtmosphere: true, // 大气
fullscreenButton: false, // 全屏按钮
imageryProvider: false,
orderIndependentTranslucency: false,
contextOptions: {
webgl: {
alpha: true,
},
},
//sceneMode: Cesium.SceneMode.SCENE2D,
//mapMode2D: Cesium.MapMode2D.ROTATE, // Ctrl + 鼠标左键旋转
},
};
},
mounted: async function (viewer) {
var self = this;
this.viewer = that.viewer = viewer;
this.viewer.cesiumWidget.creditContainer.style.display = "none";
this.viewer.scene.backgroundColor = new Cesium.Color(
0.0,
0.0,
0.0,
0.0
);
//抗锯齿
this.viewer.scene.fxaa = true;
this.viewer.scene.postProcessStages.fxaa.enabled = true;
this.viewer.scene.sun.show = false; //在Cesium1.6(不确定)之后的版本会显示太阳和月亮,不关闭会影响展示
this.viewer.scene.skyBox.show = false; //关闭天空盒,否则会显示天空颜色
this.viewer.scene.undergroundMode = true; //重要,开启地下模式,设置基色透明,这样就看不见黑色地球了
//this.viewer.scene.globe.show = false;
// 缩放限制
viewer.scene.screenSpaceCameraController.minimumZoomDistance = 380;
viewer.scene.screenSpaceCameraController.maximumZoomDistance = 6000000;
this.addMapLayer(viewer);
this.setView(viewer);
// Create a billboard collection
this.bbdCollection = viewer.scene.primitives.add(
new Cesium.BillboardCollection()
);
this.billboardDict = {};
// assets
that.Entities = {
setMarkers: function (dict) {
self.setMarkersAttr(dict);
},
addMarkers: function (list) {
if (Object.prototype.toString.call(list) === "[object Array]") {
//self.billboardDict = {};
for (var item of list) {
var bbdid =
item.type > 1 ? item.type + "_" + item.id : item.id;
var billbd = self.billboardDict[bbdid];
if (!billbd) {
self.billboardDict[bbdid] = self.createMarker(item);
} else {
}
}
}
},
addMarker: this.createMarker.bind(this),
remove: this.remove,
removes: this.removes,
removeWidget: this.removeWidget,
removeAll: function () {
self.removeEntities();
self.removeWidget();
},
getBbdCollection: function () {
return self.billboardDict;
},
};
},
// setView
setView: function (viewer) {
// 视角-环翠
this.viewer.scene.camera.setView({
duration: 1,
destination: {
x: -2709847.741326086,
y: 4323242.75656055,
z: 3892115.513473075,
},
orientation: {
heading: 0.04161544663387229,
pitch: -1.548357582905937,
roll: 0,
},
});
viewer.scene.mode = 2;
let centerResult = viewer.camera.pickEllipsoid(
new Cesium.Cartesian2(
viewer.canvas.clientWidth / 2,
viewer.canvas.clientHeight / 2
)
);
var rotateCamera = function (options, num) {
var position = options;
// 给定切换所需时间,比如0.5s
var flytime = 0.5;
var initialPitch = viewer.camera.pitch;
var pitch3d = Cesium.Math.toRadians(num);
var angle = (pitch3d - initialPitch) / flytime; //每秒转动的度数
// 获取相机和视点距离
var distance = Cesium.Cartesian3.distance(
options,
viewer.scene.camera.positionWC
);
var startTime = Cesium.JulianDate.fromDate(new Date());
var stopTime = Cesium.JulianDate.addSeconds(
startTime,
flytime,
new Cesium.JulianDate()
);
viewer.clock.startTime = startTime.clone(); // 开始时间
viewer.clock.stopTime = stopTime.clone(); // 结速时间
viewer.clock.currentTime = startTime.clone(); // 当前时间
viewer.clock.clockRange = Cesium.ClockRange.CLAMPED; // 行为方式
viewer.clock.clockStep = Cesium.ClockStep.SYSTEM_CLOCK; // 时钟设置为当前系统时间; 忽略所有其他设置。
// 相机的当前heading
var initialHeading = viewer.camera.heading;
var Exection = function TimeExecution() {
// 当前已经过去的时间,单位s
var delTime = Cesium.JulianDate.secondsDifference(
viewer.clock.currentTime,
viewer.clock.startTime
);
// 根据过去的时间,计算偏航角的变化
var heading = initialHeading;
// 相机看点的角度,如果大于0那么则是从地底往上看,所以要为负值,这里取-30度
var pitch = delTime * angle + initialPitch;
viewer.camera.lookAt(
position,
new Cesium.HeadingPitchRange(heading, pitch, distance)
);
//解除目标锁定
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
if (
Cesium.JulianDate.compare(
viewer.clock.currentTime,
viewer.clock.stopTime
) >= 0
) {
viewer.clock.onTick.removeEventListener(Exection);
}
};
viewer.clock.onTick.addEventListener(Exection);
};
//rotateCamera(centerResult,-89);
},
addMapLayer: function (viewer) {
// var localMap = new fg3d.ImageryProvider.Baidu({
// // 百度电子
// url: // 'https://maponline1.bdimg.com/tile/?qt=vtile&x={x}&y={y}&z={z}&styles=pl&scaler=2&udt=&fro// m=jsapi2_0',
// });
// localMap = new Cesium.WebMapTileServiceImageryProvider({
// url: "http://t0.tianditu.gov.cn/vec_w/wmts?tk=d2bd55b7fa31f99ced2205fb6aa4cc5e",
// layer: "vec",
// style: "default",
// format: "tiles",
// tileMatrixSetID: "w",
// maximumLevel: 18,
// })
var localMap = new Cesium.UrlTemplateImageryProvider({
url: "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
});
viewer.scene.imageryLayers.addImageryProvider(localMap);
},
setMarkersAttr: function (dict) {
var list = this.bbdCollection._billboards;
for (var i = 0, len = list.length; i < len; i++) {
var bbd = list[i];
if (dict[bbd.id]) {
(bbd.show = true), (dict[bbd.id] = bbd);
} else {
bbd.show = false;
}
}
},
createMarker: function (item) {
item.position = Cesium.Cartesian3.fromDegrees(
item.longitude,
item.latitude,
0
);
var bbd = this.bbdCollection.add({
position: item.position,
image: "/static/images/marker1.png",
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
scale: 1,
width: 25, // default: undefined
height: 35,
id: item.id,
//show:false,
});
return (bbd.data = item), bbd;
},
removeWidget() {
var widgetContainer = that.viewer.cesiumWidget.container;
var popmds = widgetContainer.querySelectorAll(".kmb-popmd-e3d8");
for (var item of popmds) {
//item.remove();
}
},
remove(obj) {
that.viewer.entities.remove(obj);
},
removes(list) {
for (var item of list) {
that.viewer.entities.remove(item);
}
},
removeEntities() {
var entitys = that.viewer.entities._entities._array;
var len = entitys.length;
for (var i = 0; i < len; i++) {
var obj = entitys[i];
if (!obj.wall) {
that.viewer.entities.remove(obj);
i--;
len--;
}
}
},
});
},
},
};
</script>
......
......@@ -25,7 +25,7 @@
{{'毕业企业:'+table.body.incubatorGraduateCount || ''}}&nbsp;&nbsp;&nbsp;&nbsp;
<!-- {{'创业导师数:'+table.body.mentorCount || ''}}&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>
......@@ -63,7 +63,7 @@
import { reqApi, Config } from '@/assets/js/httpApi.js';
import { Tools } from '@/assets/js/common.js';
import DateRangePicker from '@/components/DateRangePicker';
import TableFilter from '@/components/TableFilter';
import TableFilter from '@/components/TableFilter/index2';
import cuForm from '@/components/cuForm';
import cuTable from '@/components/cuTable/index2';
......
......@@ -20,78 +20,90 @@
</ul>
</div>
<div class="body">
<ul class="list">
<li class="overview tab_panel_0" v-if="activeIndex === 1">
<h2>威海高新区创业中心</h2>
<div class="bodyer">
<ul class="panelsWrapper">
<li class="overview tab_panel_0" v-if="activeIndex === 0">
<h2>{{ data4panel0.incubatorName }}</h2>
<div class="contentWrapper">
<div class="left">
<div class="item">
<div class="title">
<div class="_title prefixDiv">
<span class="_left">总收入</span>
<span class="_right">查看更多>></span>
<span class="_right" @click="getMore4panel0">查看更多>></span>
</div>
<div class="body">
<div class="_left">
<ul>
<li>孵化器总收入:12342万元</li>
<li>综合服务收入:12342万元</li>
<li>物业费收入:12342万元</li>
<li>房租费收入:12342万元</li>
<li>投资收入:12342万元</li>
<li>政策性收入:12342万元</li>
<li>其他:12342万元</li>
<li>孵化器总收入:{{ data4panel0.totalRevenue }}万元</li>
<li>
综合服务收入:{{ data4panel0.serviceRevenue }}万元
</li>
<li>物业费收入:{{ data4panel0.propertyRevenue }}万元</li>
<li>房租费收入:{{ data4panel0.rentRevenue }}万元</li>
<li>投资收入:{{ data4panel0.investmentRevenue }}万元</li>
<li>政策性收入:{{ data4panel0.policyRevenue }}万元</li>
<li>其他:{{ data4panel0.otherRevenue }}万元</li>
</ul>
</div>
<div class="_right">
<div class="charts pie"></div>
<div
ref="pieChart4panel0_1"
style="width: 300px; height: 300px"
class="charts pie"
></div>
</div>
</div>
</div>
<div class="item">
<div class="title">
<span class="_left">总收入</span>
<span class="_right">查看更多>></span>
<div class="_title prefixDiv">
<span class="_left">使用面积</span>
</div>
<div class="body">
<div class="_left">
<ul>
<li>运营机构:威海高新创业园运营管理有限公司</li>
<li>联 系人:联系人姓名</li>
<li>联系电话:0631-1234567</li>
<li>中心位于高新区内,交通便利</li>
<li>孵化器使用总面积:{{ data4panel0.totalArea }}</li>
<li>
用于企业孵化的面积:{{ data4panel0.incubationArea }}
</li>
<li>剩余孵化面积:{{ data4panel0.remainingArea }}</li>
</ul>
</div>
<div class="_right">
<div class="charts pie"></div>
<div
ref="pieChart4panel0_2"
style="width: 300px; height: 300px"
class="charts pie"
></div>
</div>
</div>
</div>
</div>
<div class="right">
<div class="item">
<div class="title">
<div class="_title prefixDiv">
<span class="_left">简介</span>
<span class="_right">查看更多>></span>
</div>
<div class="body">
<div class="_top">
<ul>
<li>运营机构:威海高新创业园运营管理有限公司</li>
<li>联 系人:联系人姓名</li>
<li>联系电话:0631-1234567</li>
<li>中心位于高新区内,交通便利</li>
<li>运营机构:{{ data4panel0.operatingAgency }}</li>
<li>联 系人:{{ data4panel0.contactPerson }}</li>
<li>联系电话:{{ data4panel0.contactPhone }}</li>
<li>{{}}</li>
</ul>
</div>
<div class="_bottom">
<img src="" alt="" />
<img
:src="`${baseAPI}file/${data4panel0.incubatorImage}`"
alt=""
/>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="tab_panel_1" v-if="activeIndex === 0">
<li class="tab_panel_1" v-if="activeIndex === 10">
<div class="_left">
<div class="_title">
<span>在孵企业</span>
......@@ -111,10 +123,10 @@
</li>
</ul>
<el-pagination
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-size="pageSize"
:total="totalItems"
@current-change="handleCurrentChange4panel0"
:current-page="currentPage4panel0"
:page-size="pageSize4panel0"
:total="totalItems4panel0"
layout="prev, pager, next"
/>
</div>
......@@ -145,7 +157,6 @@
</ul>
</div>
<div class="_title prefixDiv">
<div class="_left">创业创新企业情况</div>
</div>
......@@ -157,7 +168,6 @@
</ul>
</div>
<div class="_title prefixDiv">
<div class="_left">今年企业经营信息</div>
<div class="_right">查看更多>></div>
......@@ -170,7 +180,7 @@
</ul>
</div>
<!-- -->
<!-- -->
<div class="_title prefixDiv">
<div class="_left">企业产品</div>
<div class="_right">查看更多>></div>
......@@ -178,22 +188,24 @@
<div class="_body">
<dl>
<dd v-for="item in 10">
<img src="" alt="">
<img src="" alt="" />
<h3>环境监测设备</h3>
<p>内置NB-IoT物联网SIM卡,把数据传 输到晶合云平台或客户私有云平台, 实现数据</p>
<p>
内置NB-IoT物联网SIM卡,把数据传
输到晶合云平台或客户私有云平台, 实现数据
</p>
</dd>
</dl>
</div>
</div>
</li>
<li class="tab_panel_4" v-if="activeIndex === 4">
<li class="tab_panel_4" v-if="activeIndex === 40">
<div class="_title">
<span>创业导师</span>
<el-input
placeholder="请输入姓名搜索"
prefix-icon="el-icon-search"
v-model="searchText4teacher"
v-model="searchText4panel0"
></el-input>
</div>
<ul>
......@@ -212,34 +224,33 @@
<el-dialog
title="新增孵化器信息"
:visible.sync="dialogVisible"
:visible.sync="dialogVisible4panel0"
@close="resetForm"
>
<el-form
label-width="170px"
:inline="true"
:model="formInline"
:model="formData4panel0"
class="demo-form-inline"
:label-position="labelPosition"
>
<el-row>
<el-form-item label="孵化器名称">
<el-input
v-model="formInline.incubatorName"
v-model="formData4panel0.incubatorName"
placeholder=""
size="middle"
></el-input>
</el-form-item>
<el-form-item label="运行机构">
<el-input
v-model="formInline.operatingAgency"
v-model="formData4panel0.operatingAgency"
placeholder=""
size="middle"
></el-input>
</el-form-item>
<el-form-item label="孵化器等级">
<el-select
v-model="formInline.incubatorLevel"
v-model="formData4panel0.incubatorLevel"
style="width: 200px"
size="middle"
>
......@@ -253,755 +264,13 @@
</el-form-item>
<el-form-item label="联系人">
<el-input
v-model="formInline.contactPerson"
placeholder=""
size="middle"
></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="联系电话">
<el-input
v-model="formInline.contactPhone"
placeholder=""
size="middle"
></el-input>
</el-form-item>
<el-form-item label="孵化器使用总面积(m²)">
<el-input
v-model="formInline.totalArea"
placeholder=""
size="middle"
></el-input>
</el-form-item>
<el-form-item label="用于企业孵化的面积(m²)">
<el-input
v-model="formInline.incubationArea"
v-model="formData4panel0.contactPerson"
placeholder=""
size="middle"
></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="孵化器地理位置">
<el-input
v-model="formInline.address"
placeholder=""
size="small"
style="width: 360px"
disabled
></el-input>
<div class="map-ctn" :style="'width:500px;' + 'height:300px' + ';'">
<cu-amap ref="amap" :options="amapOptions()" />
</div>
</el-form-item>
<el-form-item style="margin-left: 80px">
<el-upload
class="upload-demo"
:action="`${baseAPI}api/file/upload?modelName=incubator`"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
:on-success="handleSuccess"
:on-error="handleError"
:limit="1"
:on-exceed="handleExceed"
:file-list="fileList"
:show-file-list="false"
style="margin-bottom: 6px"
>
<span
style="margin-right: 5px; margin-left: -17px; font-weight: bold"
>孵化器图片</span
>
<el-button size="mini" type="default">上传图片</el-button>
</el-upload>
<div :style="'width:500px;' + 'height:300px' + ';'">
<div class="imgShowraper">
<img
:src="`${baseAPI}file/${formInline.incubatorImage}`"
alt=""
width="500"
height="300px"
/>
</div>
</div>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="edit">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<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 crudHome from "@/api/system/home";
console.log(crudHome);
import IconSelect from "@/components/IconSelect";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { LOAD_CHILDREN_OPTIONS } from "@riophae/vue-treeselect";
import CRUD, { presenter, header, form, crud } from "@crud/crud";
import rrOperation from "@crud/RR.operation";
import crudOperation from "@crud/CRUD.operation";
import udOperation from "@crud/UD.operation";
import DateRangePicker from "@/components/DateRangePicker";
import dic from "@/api/system/dict";
import cuAmap from "@/components/AMap";
// crud交由presenter持有
const defaultForm = {
id: null,
title: null,
menuSort: 999,
path: null,
component: null,
componentName: null,
iframe: false,
roles: [],
pid: 0,
icon: null,
cache: false,
hidden: false,
type: 0,
permission: null,
};
export default {
name: "Menu",
components: {
cuAmap,
Treeselect,
IconSelect,
crudOperation,
rrOperation,
udOperation,
DateRangePicker,
},
cruds() {
return CRUD({
title: "菜单",
url: "api/menus",
crudMethod: { ...crudHome },
});
},
mixins: [presenter(), header(), form(defaultForm), crud()],
data() {
return {
// panel1,2,3
currentPage: 1, // 当前页码
pageSize: 10, // 每页显示的条目数量
totalItems: 100, // 总条目数
// 顶部切换菜单
activeIndex: 0,
searchText4teacher: "",
teacherList: [],
data: {
incubatorAllCount: 6,
incubatorCompanyCount: 10,
intermediaryAgencyCount: 10,
mentorAllCount: 7,
remainingArea: -99750,
total: 6,
totalArea: 382,
unIncubatorCompanyCount: 14,
list: [],
},
dialogVisible: false,
baseAPI: baseAPI,
labelPosition: "right",
fileList: [],
cmap: null,
Dict: { selectList: [] },
formInline: {
address: "",
contactPerson: "",
contactPhone: "",
id: "",
incubationArea: "",
incubatorImage: "",
incubatorLevel: 2,
incubatorName: "",
latitude: "",
longitude: "",
operatingAgency: "",
totalArea: "",
},
menus: [],
permission: {
add: ["admin", "menu:add"],
edit: ["admin", "menu:edit"],
del: ["admin", "menu:del"],
},
rules: {
title: [{ required: true, message: "请输入标题", trigger: "blur" }],
path: [{ required: true, message: "请输入地址", trigger: "blur" }],
},
};
},
computed: {
// remainingArea() {
// return this.formInline.totalArea - this.formInline.incubationArea;
// },
},
mounted() {
// this.getData();
dic.getCompanyDicts().then((res) => {
console.log(res);
this.companyLevelList = res.body.incubatorLevel || [];
});
this.getData();
},
methods: {
handleCurrentChange(newPage) {
// 切换分页
this.currentPage = newPage;
// 这里可以添加代码来加载新页的数据
console.log(`当前页: ${newPage}`);
},
changeNav(index) {
this.activeIndex = ~~index;
},
go2overview() {
alert("数据概览页开发ing~");
},
handleSuccess(response, file) {
// 处理上传成功
console.log("Upload success:", response, file);
this.formInline.incubatorImage = response.body;
// this.fileList.push(file); // 存储已上传文件
// this.tableData.push({
// name: file.name,
// status: '上传成功',
// });
},
handleError(err, file) {
// 处理上传错误
console.error("Upload failed:", err, file);
this.tableData.push({
name: file.name,
status: "上传失败",
});
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`);
},
amapOptions(cmap) {
var VUE = this;
var self = this,
form = this.formInline;
return {
zoom: 12,
center: [122.050189, 37.515189],
//showLabel: true,
//pitch: 40,
onload: function (cmap) {
// debugger
VUE.cmap = cmap;
var center = cmap.options.center;
var lng = form.longitude || center[0],
lat = form.latitude || center[1];
if (lng && lat) {
cmap.setCenter([lng, lat]);
// 添加标记
cmap.addMarker({
lnglat: [lng, lat],
title: "",
draggable: true,
dragend: function (e) {
// var lnglat = e.lnglat;
// cmap.deGeocode([lnglat.lng, lnglat.lat], function (addr) {
// form.address = addr;
// form.longitude = lnglat.lng;
// form.latitude = lnglat.lat;
// self.$forceUpdate();
// });
VUE.getAddrPlus(e, cmap);
},
});
}
},
click: function (e, cmap) {
// 经纬度坐标
VUE.getAddrPlus(e, cmap);
// var lnglat = e.lnglat;
// cmap.deGeocode([lnglat.lng, lnglat.lat], function (addr) {
// form.address = addr;
// form.longitude = lnglat.lng;
// form.latitude = lnglat.lat;
// });
cmap.marker && cmap.removeMarker();
// 添加标记
cmap.addMarker({
lnglat: [e.lnglat.lng, e.lnglat.lat],
title: "",
draggable: true,
dragend: function (e) {
// var lnglat = e.lnglat;
// cmap.deGeocode([lnglat.lng, lnglat.lat], function (addr) {
// form.address = addr;
// form.longitude = lnglat.lng;
// form.latitude = lnglat.lat;
// });
VUE.getAddrPlus(e, cmap, form);
},
});
},
};
},
getAddrPlus(e, cmap, form) {
var lnglat = e.lnglat;
let longitude = lnglat.lng;
let latitude = lnglat.lat;
// 创建逆地理编码对象
let geocoder;
AMap.plugin("AMap.Geocoder", () => {
geocoder = new AMap.Geocoder({
radius: 1000,
extensions: "all",
});
console.log();
// 根据经纬度进行逆地理编码查询
geocoder.getAddress([longitude, latitude], (status, result) => {
if (status === "complete" && result.info === "OK") {
if (result.regeocode && result.regeocode.formattedAddress) {
let address = result.regeocode.formattedAddress;
this.formInline.address = address;
this.formInline.longitude = longitude;
this.formInline.latitude = latitude;
this.$forceUpdate();
console.log("精确地址获取", address);
}
} else {
console.error("获取地址失败");
}
});
});
},
onSubmit() {
console.log("submit!");
},
edit() {
if (this.formInline.incubatorName) {
}
crudHome.add(this.formInline).then((res) => {
if (res && res.code === 200) {
this.$message.success("保存成功"); // res.msg
this.getData();
this.dialogVisible = false;
}
});
},
getData(fn) {
crudHome
.getData4tech({
page: 0,
size: 999,
})
.then((res) => {
console.log(res, "getData4tech");
this.data = res.body;
});
},
// 选中图标
selected(name) {
this.form.icon = name;
},
},
};
</script>
<style>
/* .app-main {
background-color: #fff !important;
} */
</style>
<style rel="stylesheet/scss" lang="scss" scoped>
.app-container {
padding: 20px;
background-color: #fff;
font-family: Microsoft YaHei;
}
.page-footer{
display:none !important;
}
.header {
background: #f5f7fa;
ul {
display: flex;
justify-content: start;
border: 1px solid #d8dce5;
background-color: #fff;
li {
width: 238px;
height: 48px;
display: flex;
align-items: center;
list-style: none;
justify-content: center;
cursor: pointer;
&:active,
&.active {
background: #1890ff;
.title {
color: #ffffff;
}
}
.title {
font-size: 16px;
color: #303133;
font-weight: bold;
}
}
}
}
.imgShowraper {
margin-left: 90px;
}
/**公共类 */
.divider {
width: 100%;
height: 1px;
border: 1px dashed #dddee1;
}
.prefixDiv {
position: relative;
&:before {
width: 4px;
height: 16px;
background: #1890ff;
position: absolute;
top: 50%; /* 垂直居中 */
transform: translateY(-50%); /* 精确居中 */
left: 16px;
content: "";
}
}
.prefixPoint {
position: relative;
&:before {
content: "";
width: 6px;
height: 6px;
background: #1890ff;
border-radius: 50%;
position: absolute;
left: 5px;
top: 50%; /* 垂直居中 */
transform: translateY(-50%); /* 精确居中 */
}
}
/** 第五个面板 */
.tab_panel_4 {
._title {
font-size: 16px;
color: #1890ff;
width: 100%;
height: 50px;
background: #e4f2ff;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
padding-left: 26px;
&:before {
width: 4px;
height: 16px;
background: #1890ff;
position: absolute;
// top: 19px;
top: 50%; /* 垂直居中 */
transform: translateY(-50%); /* 精确居中 */
left: 16px;
content: "";
}
}
ul {
display: flex;
flex-wrap: wrap;
margin-left: 60px;
// margin-top: 20px;
& > li {
position: relative;
width: 260px;
height: 334px;
background: #fff;
border: 1px solid #dddee1;
text-align: center;
padding: 10px;
margin-left: 10px;
margin-right: 40px;
margin-top: 20px;
img {
width: 200px;
height: 200px;
margin: 0 auto;
}
a {
position: absolute;
right: 6px;
bottom: 60px;
font-size: 15px;
color: #1890ff;
}
p {
font-size: 15px;
color: #606266;
padding-left: 18px;
text-align: left;
position: relative;
padding-top: 3px;
padding-bottom: 3px;
&:before {
content: "";
width: 6px;
height: 6px;
background: #1890ff;
border-radius: 50%;
position: absolute;
left: 5px;
top: 50%; /* 垂直居中 */
transform: translateY(-50%); /* 精确居中 */
}
}
}
}
}
.tab_panel_1 {
display: flex;
padding: 10px;
& > ._left {
flex: 1;
margin-right: 20px;
height: 798px !important;
border: 1px solid #DDDEE1;
padding: 20px;
._title {
display: flex;
width: 100%;
justify-content: space-between;
margin-top: 10px;
margin-bottom: 20px;
span {
&:first-child {
font-size: 19px;
color: #303133;
}
&:last-child {
font-size: 19px;
color: #42b983;
}
}
}
li {
font-size: 15px;
color: #666666;
width: 100%;
height: 38px;
line-height: 38px;
text-align: left;
padding-left: 10px;
cursor: pointer;
&.active,
&:hover {
background: #1890ff;
color: #fff;
}
}
}
& > ._right {
flex: 4;
h2 {
font-weight: 400;
font-size: 27px;
color: #42b983;
text-align: center;
margin-top: 20px;
margin-block: 20px;
}
._title {
width: 100%;
height: 36px;
background: #e4f2ff;
font-size: 16px;
color: #1890ff;
margin-top: 10px;
margin-bottom: 6px;
._left {
float: left;
margin-left: 30px;
margin-top: 6px;
}
._right {
float: right;
margin-right: 30px;
margin-top: 6px;
}
}
ul {
display: flex;
flex-wrap: wrap;
padding-left: 20px;
li {
width: 290px;
font-size: 15px;
color: #606266;
padding: 10px;
padding-left: 20px;
}
}
dl{
display: flex;
flex-wrap: wrap;
padding-left: 20px;
dd {
width: 250px;
height: 274px;
font-size: 15px;
color: #606266;
/* padding: 10px; */
margin-left: 20px;
margin-right: 20px;
border: 1px solid #DDDEE1;
margin-top: 10px;
img{
width: 250px;
height: 150px;
}
h3{
font-size: 15px;
color: #606266;
padding-left: 15px;
}
p{
font-size: 13px;
color: #969AA3;
padding-left: 15px;
line-height: 20px;
}
}
}
}
}
.list {
// ul元素
background: #f5f6fb;
display: flex;
flex-wrap: wrap;
& > li {
width: 100%;
height: 442px;
background: #ffffff;
position: relative;
}
.overview {
h2 {
font-weight: 400;
font-size: 27px;
color: #42b983;
text-align: center;
padding-top: 16px;
padding-bottom: 16px;
}
.contentWrapper {
border-top: 1px dashed #dddee1;
display: flex;
padding: 16px;
& > div {
flex: 1;
}
.left {
border-right: 1px dashed #dddee1;
.body {
display: flex;
._left,
._right {
flex: 1;
}
}
li {
font-size: 15px;
color: #606266;
line-height: 16px;
padding: 4px 42px;
}
}
.right {
.body {
display: flex;
}
li {
font-size: 15px;
color: #606266;
line-height: 16px;
padding: 4px 42px;
}
}
}
}
}
.body {
background-color: #fff;
.title {
color: #1890ff;
height: 48px;
background: #e4f2ff;
font-weight: 400;
font-size: 16px;
line-height: 48px;
margin-bottom: 20px;
display: flex;
justify-content: space-between;
padding-left: 20px;
padding-right: 20px;
}
}
// ::v-deep .el-input {
// width: 200px;
// }
// ::v-deep .el-input__inner {
// height: 38px;
// }
</style>
\ No newline at end of file
</template>
\ No newline at end of file
......@@ -20,7 +20,7 @@
</li>
<li>
<div class="title">创业导师</div>
<div class="content">{{data.mentorAllCount}}</div>
<div class="content">{{data.mentorAllCount}}</div>
</li>
<li>
<div class="title">孵化面积</div>
......@@ -38,7 +38,7 @@
<div class="body">
<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="" />
<div class="introduce">
<h2>{{ item.incubatorName }}</h2>
......@@ -298,8 +298,9 @@ export default {
this.getData();
},
methods: {
go2overview(){
alert('数据概览页开发ing~')
go2overview(item){
// alert('数据概览页开发ing~')
this.$router.push('/home/overview?id='+item.id)
},
handleSuccess(response, file) {
// 处理上传成功
......
......@@ -165,29 +165,35 @@ export default {
Cookies.remove('password')
Cookies.remove('rememberMe')
}
this.$store.dispatch('Login', user).then(() => {
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.$store.dispatch('Login', user).then((res) => {
if(!res){ // 登录失败
this.loading = false
this.getCode()
}
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(() => {
this.loading = false
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