作者 lihongjuan

345234

{
"pages": [
"pages/companybox/qiyedetail/qiyedetail",
"pages/companybox/defendetail/defendetail",
"pages/companybox/jichuxinxi/jichuxinxi",
"pages/qiyeyongdian/detail/detail",
"pages/qiye/qiye",
"pages/changqu/changqu",
"pages/login/login",
... ... @@ -10,8 +14,9 @@
"pages/logs/logs",
"pages/yujing/yujing",
"pages/shebei/shebeidetail/shebeidetail",
"pages/qiyeyongdian/qyyd/qyyd",
"pages/qiyeyongdian/detail/detail"
"pages/qiyeyongdian/qyyd/qyyd"
],
"window": {
... ...

404 字节

import * as echarts from '../../../ec-canvas/echarts';
const app = getApp();
function initChart(canvas, width, height) {
const chart = echarts.init(canvas, null, {
width: width,
height: height
});
canvas.setChart(chart);
var colors = ['#5793f3', '#d14a61', '#675bba'];
var option = {
color: colors,
tooltip: {
trigger: 'none',
axisPointer: {
type: 'cross'
}
},
legend: {
data: ['每月','平均' ]
},
grid: {
top: 70,
bottom: 50
},
xAxis: [
{
type: 'category',
axisTick: {
alignWithLabel: true
},
axisLine: {
onZero: false,
lineStyle: {
color: colors[1]
},
},
axisPointer: {
label: {
formatter: function (params) {
return '降水量 ' + params.value
+ (params.seriesData.length ? ':' + params.seriesData[0].data : '');
}
}
},
data: ["18.11", "18.12", "19.01", "19.02", "19.03", "19.04", "19.05", "19.06", "19.07"],
axisLabel: {
interval: 0,
},
smooth: true,
},
{
type: 'category',
axisTick: {
alignWithLabel: true
},
axisLine: {
onZero: false,
lineStyle: {
color: colors[0]
}
},
axisPointer: {
label: {
formatter: function (params) {
return '降水量 ' + params.value
+ (params.seriesData.length ? ':' + params.seriesData[0].data : '');
}
}
},
}
],
yAxis: [
{
type: 'value',
min:10,
max:100,
splitNumber: 10,
}
],
series: [
{
name: '平均',
type: 'line',
xAxisIndex: 1,
smooth: true,
data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 86.6, 96.2, 48.7, 18.8, 6.0, 2.3]
},
{
name: '每月',
type: 'line',
smooth: true,
data: [3.9, 5.9, 11.1, 18.7, 48.3, 69.2, 31.6, 46.6, 55.4, 18.4, 10.3, 0.7]
}
]
};
chart.setOption(option);
return chart;
}
Page({
onShareAppMessage: function (res) {
return {
title: 'ECharts 可以在微信小程序中使用啦!',
path: '/pages/index/index',
success: function () { },
fail: function () { }
}
},
data: {
ec: {
onInit: initChart
}
},
onReady() { }
});
\ No newline at end of file
... ...
{
"usingComponents": {
"ec-canvas": "../../../ec-canvas/ec-canvas"
}
}
\ No newline at end of file
... ...
<view class="container">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas>
</view>
\ No newline at end of file
... ...
.container{
width:750rpx;
height:800rpx;
}
ec-canvas {
width: 100%;
height: 100%;
}
\ No newline at end of file
... ...
// pages/companybox/jichuxinxi/jichuxinxi.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "无锡万峰金属制品有限公司"
}
\ No newline at end of file
... ...
<!-- <view class="infobox">
<view class="infoname">无锡万峰金属制品有限公司</view>
</view> -->
<view class="middle">
<view class="companyname">无锡万峰金属制品有限公司</view>
<view class="middlelist">
<view class="middleitemleft">企业法人</view>
<view class="middleitemright">王刚</view>
</view>
<view class="middlelist">
<view class="middleitemleft">统一信用代码</view>
<view class="middleitemright">895597347547548758574</view>
</view>
<view class="middlelist">
<view class="middleitemleft">行业标签</view>
<view class="middleitemright">金属加工</view>
</view>
</view>
\ No newline at end of file
... ...
.infoname{
color:#333333;
font-size: 34rpx;
font-weight: bold
}
.infobox{
padding: 40rpx 60rpx;
box-sizing: border-box
}
.middle{
padding: 40rpx 60rpx;
box-sizing: border-box;
/* border-bottom:16rpx solid #F4F4F4 */
}
.companyname{
color:#333333;
font-size: 34rpx;
font-weight: bold
}
.middlelist{
display:flex;
align-items: center;
margin-top:26rpx;
}
.middleitemleft{
width:168rpx;
color:#777777;
font-size: 28rpx;
}
.middleitemright{
color:#777777;
font-size: 28rpx;
margin-left:24rpx;
}
\ No newline at end of file
... ...
... ... @@ -10,7 +10,7 @@ function initChart(canvas, width, height) {
canvas.setChart(chart);
var option = {
tooltip: {
trigger: 'axis'
},
... ... @@ -26,7 +26,8 @@ function initChart(canvas, width, height) {
},
{
text: '稳定性:80分',
max: 100
max: 100,
}
],
... ... @@ -81,6 +82,87 @@ function initChart(canvas, width, height) {
return chart;
}
function initChart1(canvas, width, height) {
const chart = echarts.init(canvas, null, {
width: width,
height: height
});
canvas.setChart(chart);
var option = {
title: {
text: '开平机01每日开工时间',
left: 'center'
},
toolbox: {
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30','31'],
axisLabel: {
interval:1,
},
name:'日期'
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value}'
},
min:1,
max:24,
splitNumber: 24,
name:'小时'
},
series: [
{
name: '',
type: 'line',
smooth: true,
color:'#FCB237',
data: [11, 11, 15, 13, 12, 13, 10],
markPoint: {
data: [
{ type: 'max', name: '最大值' },
{ type: 'min', name: '最小值' }
]
},
markLine: {
data: [
{ type: 'average', name: '平均值' }
]
},
// areaStyle: {
// // normal: {
// // color: '#F8E9DD' //改变区域颜色
// // }
// },
},
]
};
chart.setOption(option);
return chart;
}
// 折线图
Page({
onShareAppMessage: function(res) {
return {
... ... @@ -92,7 +174,15 @@ Page({
},
data: {
ec: {
onInit: initChart
onInit: initChart,
// onInit: initChart1
},
ec1: {
onInit: initChart1
}
},
... ...
{
"navigationBarTitleText": "无锡万峰金属制品有限公司",
"usingComponents": {
"ec-canvas": "../../../ec-canvas/ec-canvas"
}
... ...
<!--index.wxml-->
<view class="detailbox">
<view class="coint">
<text class="cointleft">87</text>
<text class="cointword">分</text>
<text class="cointleft">87</text>
<text class="cointword">分</text>
</view>
<view class="zonghe">综合得分</view>
<view class="container" >
<view class="container">
<ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas>
</view>
... ... @@ -16,14 +17,161 @@
<view class="companyname">无锡万峰金属制品有限公司</view>
<view class="middlelist">
<view class="middleitemleft">企业法人</view>
<view class="middleitemright">王刚</view>
<view class="middleitemright">王刚</view>
</view>
<view class="middlelist">
<view class="middleitemleft">统一信用代码</view>
<view class="middleitemright">895597347547548758574</view>
<view class="middleitemright">895597347547548758574</view>
</view>
<view class="middlelist">
<view class="middleitemleft">行业标签</view>
<view class="middleitemright">金属加工</view>
<view class="middleitemright">金属加工</view>
</view>
</view>
<!-- 指数详情 -->
<view class="zhidetailbox">
<view class="zhititle">指数详情</view>
<view class="zhilist">
<view class="zhishuitem">
<view class="zhilistimg">
<image src="/img/demo (18).png"></image>
</view>
<view class="zhiname">开工</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg dian">
<image src="/img/demo (19).png"></image>
</view>
<view class="zhiname">电量</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg people">
<image src="/img/demo (20).png"></image>
</view>
<view class="zhiname">人员</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg car">
<image src="/img/demo (21).png"></image>
</view>
<view class="zhiname">车辆</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg cheng">
<image src="/img/demo (22).png"></image>
</view>
<view class="zhiname">成品</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg cheng">
<image src="/img/demo (22).png"></image>
</view>
<view class="zhiname">原材料</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg shui">
<image src="/img/demo (1).png"></image>
</view>
<view class="zhiname">水量</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg qi">
<image src="/img/demo (24).png"></image>
</view>
<view class="zhiname">气量</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg wu">
<image src="/img/demo (23).png"></image>
</view>
<view class="zhiname">排污</view>
</view>
</view>
</view>
<!-- 企业月报 -->
<view class="monthbao">
<view class="monthbaotop">
<view class="monthleft">企业月报</view>
<view class="monthright">
<view class="rightword">查看详情</view>
<view class="rightimg">
<image src="/img/yourow.png"></image>
</view>
</view>
</view>
</view>
<view class="containerzhe">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
</view>
<!-- 预警设置 -->
<view class="monthbaotop yujing">
<view class="monthleft">预警设置</view>
<view class="monthright">
<view class="rightword">查看详情</view>
<view class="rightimg">
<image src="/img/yourow.png"></image>
</view>
</view>
</view>
<!-- 预警列表 -->
<view class='yujinglist'>
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yuleft">修改</view>
<view class="yuright">删除</view>
</view>
</view>
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yuleft">修改</view>
<view class="yuright">删除</view>
</view>
</view>
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yuleft">修改</view>
<view class="yuright">删除</view>
</view>
</view>
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yuleft">修改</view>
<view class="yuright">删除</view>
</view>
</view>
</view>
</view>
... ...
... ... @@ -2,8 +2,12 @@
page {
height: 100%;
background: #F4F4F4;
}
.detailbox{
background: #fff;
overflow: hidden
}
.container {
width: 750rpx;
height: 382rpx;
... ... @@ -12,6 +16,10 @@ page {
justify-content: center;
align-items: center;
}
.tuisong{
color:#666666;
font-size: 24rpx;
}
ec-canvas {
width: 100%;
... ... @@ -70,4 +78,145 @@ ec-canvas {
color:#777777;
font-size: 28rpx;
margin-left:24rpx;
}
.zhidetailbox{
padding: 40rpx 32rpx 64rpx 32rpx;
box-sizing: border-box;
border-bottom:16rpx solid #f5f5f5;
}
.zhilist{
display:flex;
align-items: center;
flex-wrap: wrap;
margin-top:18rpx;
}
.zhishuitem{
width:138rpx;
display:flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
margin-top:32rpx;
}
.zhilistimg{
width:32rpx;
height:45rpx;
font-size: 0
}
.dian{
width:48rpx;
height:52rpx;
}
.people{
width:38rpx;
height:48rpx;
}
.car{
width:48rpx;
height:42rpx;
}
.cheng{
width:47rpx;
height:48rpx;
}
.shui{
width:44rpx;
height:44rpx;
}
.qi{
width:45rpx;
height:45rpx;
}
.wu{
width:45rpx;
height:45rpx;
}
.zhititle{
color:#333;
font-size: 34rpx;
font-weight: bold
}
.zhiname{
color:#333;
font-size:23rpx;
margin-top:16rpx;
}
.monthbao{
padding: 41rpx 32rpx;
box-sizing: border-box;
}
.monthbaotop{
display:flex;
align-items: center;
justify-content: space-between
}
.monthright{
display:flex;
align-items: center
}
.rightimg{
width:16rpx;
height:32rpx;
font-size: 0
}
.monthleft{
color:#333;
font-size: 34rpx;
font-weight: bold;
}
.rightword{
color:#A0A0A0;
font-size:25rpx;
margin-right:10rpx;
}
.containerzhe{
width:750rpx;
height:778rpx;
margin:50rpx auto 0;
}
.yujing{
padding: 55rpx 32rpx;
box-sizing: border-box;
border-top:1rpx solid #f5f5f5;
border-bottom:8rpx solid #f5f5f5;
}
.yujingcontent{
padding: 31rpx 32rpx;
box-sizing: border-box;
border-bottom:1rpx solid #f5f5f5;
}
.kaigong{
color:#333333;
font-size: 32rpx;
font-weight: bold
}
.yubottom{
display:flex;
align-items: center
}
.yuleft{
color:#FF9400;
font-size: 30rpx;
width:375rpx;
padding: 31rpx 0;
box-sizing: border-box;
text-align: center;
border-right: 1rpx solid #f5f5f5;
}
.yuright{
color:#FF3038;
font-size: 30rpx;
width:375rpx;
padding: 31rpx 0;
box-sizing: border-box;
text-align: center;
}
.yujingitem{
border-bottom:8rpx solid #f5f5f5
}
\ No newline at end of file
... ...