Pārlūkot izejas kodu

通讯录,工作台

张值绫 3 gadi atpakaļ
vecāks
revīzija
adc43837f3
100 mainītis faili ar 4769 papildinājumiem un 146 dzēšanām
  1. 15 1
      App.vue
  2. 1 3
      common/production-http/interface.js
  3. 59 1
      common/production-http/production-api.js
  4. 0 1
      common/vmeitime-http/api.js
  5. 4 0
      common/vmeitime-http/interface.js
  6. 245 0
      components/liuyuno-tabs/liuyuno-tabs.vue
  7. 210 0
      components/n-safety-monitoring-alarming/n-safety-monitoring-alarming.vue
  8. BIN
      components/n-safety-monitoring-canva-1/icon/icon_o.png
  9. 135 0
      components/n-safety-monitoring-canva-1/n-safety-monitoring-canva-1.vue
  10. BIN
      components/n-safety-monitoring-canva-2/icon/icon_o.png
  11. 155 0
      components/n-safety-monitoring-canva-2/n-safety-monitoring-canva-2.vue
  12. 161 0
      components/n-safety-monitoring-canva-3/n-safety-monitoring-canva-3.vue
  13. 123 0
      components/n-safety-monitoring-canva-4/n-safety-monitoring-canva-4.vue
  14. BIN
      components/n-safety-monitoring-tab/icon/Co1.png
  15. BIN
      components/n-safety-monitoring-tab/icon/feng.png
  16. BIN
      components/n-safety-monitoring-tab/icon/icon_o.png
  17. BIN
      components/n-safety-monitoring-tab/icon/icon_red.png
  18. BIN
      components/n-safety-monitoring-tab/icon/wasi.png
  19. 286 0
      components/n-safety-monitoring-tab/n-safety-monitoring-tab.vue
  20. 18 12
      components/t-c-contacts/t-c-contacts.vue
  21. 91 0
      components/t-i-banner/t-i-banner.vue
  22. BIN
      components/t-i-common/icon/icon.png
  23. 63 0
      components/t-i-common/t-i-common.vue
  24. BIN
      components/t-i-icon/icon/gaikuang.png
  25. 70 0
      components/t-i-icon/t-i-icon.vue
  26. BIN
      components/t-i-navbar/icon/bg_img.jpg
  27. BIN
      components/t-i-navbar/icon/day.png
  28. BIN
      components/t-i-navbar/icon/ningdongyunying.png
  29. BIN
      components/t-i-navbar/icon/saoma.png
  30. BIN
      components/t-i-navbar/icon/search.png
  31. 151 0
      components/t-i-navbar/t-i-navbar.vue
  32. 141 0
      components/t-i-news/t-i-news.vue
  33. BIN
      components/t-i-notice/icon/bg_img.jpg
  34. 112 0
      components/t-i-notice/t-i-notice.vue
  35. BIN
      components/t-m-icon/icon/icon_1.png
  36. BIN
      components/t-m-icon/icon/icon_11.png
  37. BIN
      components/t-m-icon/icon/icon_2.png
  38. BIN
      components/t-m-icon/icon/icon_3.png
  39. BIN
      components/t-m-icon/icon/icon_4.png
  40. BIN
      components/t-m-icon/icon/icon_9.png
  41. BIN
      components/t-m-icon/icon/w_2_3.png
  42. 104 0
      components/t-m-icon/t-m-icon.vue
  43. BIN
      components/t-m-info/icon/name_icon.png
  44. BIN
      components/t-m-info/icon/tip.png
  45. BIN
      components/t-m-info/icon/user_img.png
  46. 192 0
      components/t-m-info/t-m-info.vue
  47. BIN
      components/t-m-list/icon/list_1.png
  48. BIN
      components/t-m-list/icon/list_2.png
  49. BIN
      components/t-m-list/icon/list_3.png
  50. 125 0
      components/t-m-list/t-m-list.vue
  51. 25 6
      components/t-p-n-section-1/t-p-n-section-1.vue
  52. 13 5
      components/t-p-shicaocun/t-p-shicaocun.vue
  53. 4 0
      components/t-w-application/t-w-application.vue
  54. 73 70
      manifest.json
  55. 94 34
      pages.json
  56. 23 0
      pages/index/news/news.vue
  57. 19 0
      pages/index/news/news_list/news_list.vue
  58. 121 0
      pages/my/download/download.vue
  59. BIN
      pages/my/login/icon/Avatar.png
  60. BIN
      pages/my/login/icon/Password.png
  61. 247 0
      pages/my/login/login.vue
  62. 205 0
      pages/my/repassword/repassword.vue
  63. 179 0
      pages/my/setPhone/setPhone.vue
  64. 25 3
      pages/ningdongyunying/personnel_orientation/personnel_orientation.vue
  65. 100 0
      pages/ningdongyunying/risk_precontrol/detail/detail.vue
  66. BIN
      pages/ningdongyunying/risk_precontrol/detail/icon/time.png
  67. 180 0
      pages/ningdongyunying/risk_precontrol/risk_precontrol.vue
  68. 46 3
      pages/ningdongyunying/safety_monitoring/safety_monitoring.vue
  69. 1 0
      pages/production/personnel_orientation/personnel_orientation.vue
  70. 1 0
      pages/production/personnel_orientation/search/search.vue
  71. 22 0
      pages/production/video_monitor/video_monitor.vue
  72. 22 0
      pages/production/zidonghua/zidonghua.vue
  73. 34 6
      pages/tabbar/index/index.vue
  74. 28 1
      pages/tabbar/my/my.vue
  75. 0 0
      pages/tabbar/origanization/origanization.vue
  76. BIN
      static/font/FangZhengDaBiaoSongJianTi-1.ttf
  77. BIN
      static/login.png
  78. BIN
      static/logo.png
  79. BIN
      static/tabbar/home.png
  80. BIN
      static/tabbar/home_active.png
  81. BIN
      static/tabbar/my.png
  82. BIN
      static/tabbar/my_active.png
  83. BIN
      static/tabbar/news.png
  84. BIN
      static/tabbar/news_active.png
  85. BIN
      static/tabbar/origanization.png
  86. BIN
      static/tabbar/origanization_active.png
  87. BIN
      static/tabbar/production.png
  88. BIN
      static/tabbar/production_active.png
  89. BIN
      static/tabbar/work.png
  90. BIN
      static/tabbar/work_active.png
  91. 7 0
      uni.scss
  92. 13 0
      uni_modules/uni-drawer/changelog.md
  93. 45 0
      uni_modules/uni-drawer/components/uni-drawer/keypress.js
  94. 183 0
      uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue
  95. 87 0
      uni_modules/uni-drawer/package.json
  96. 10 0
      uni_modules/uni-drawer/readme.md
  97. 16 0
      uni_modules/uni-notice-bar/changelog.md
  98. 395 0
      uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.vue
  99. 90 0
      uni_modules/uni-notice-bar/package.json
  100. 0 0
      uni_modules/uni-notice-bar/readme.md

+ 15 - 1
App.vue

@@ -7,6 +7,7 @@
 			// 煤矿鉴别-名称
 			uni.setStorageSync('mine_code', 'ningdongyunying');
 			// uni.setStorageSync('mine_code', 'shicaocun');
+			// uni.setStorageSync('mine_code', 'meihuajing');
 
 		},
 		onShow: function() {
@@ -18,6 +19,19 @@
 	}
 </script>
 
-<style>
+<style lang="scss">
 	/*每个页面公共css */
+	@font-face {
+		font-family: my-fzdbsjt;
+		src: url('~@/static/font/FangZhengDaBiaoSongJianTi-1.ttf');
+	}
+
+	page {
+		font-family: $tdw-base-font;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+	}
 </style>

+ 1 - 3
common/production-http/interface.js

@@ -41,9 +41,7 @@ export default {
 			'Authorization' : uni.getStorageSync('token_type') +' '+uni.getStorageSync('Authorization') || {}
 		},  
 		data: {
-			mine: "640181B0011010027175",
-			mine_code: "640181B0011010027175",
-			org_num: "1019",
+			
 		},
 		method: "GET",
 		dataType: "json",  /* 如设为json,会对返回的数据做一次 JSON.parse */

+ 59 - 1
common/production-http/production-api.js

@@ -271,4 +271,62 @@ export const coalmine_one_trend = (data) => {
         url: '/coalmine/one/trend',
         data,
     })
-}
+}
+
+
+
+
+
+// 信息中心
+// 生产数据
+
+// 安全监测
+// 查询各矿当日异常报警数量 当日总报警 当前报警 当日报警分布
+export const jt_safety_alarm_count = (data) => {
+	return http.request({
+		method: 'POST',
+		url: '/jt/safety/alarm/count',
+		data,
+	})
+}
+// 查询全部矿异常报警总数 报警数量趋势
+export const jt_safety_alarm_total = (data) => {
+	return http.request({
+		method: 'POST',
+		url: '/jt/safety/alarm/total',
+		data,
+	})
+}
+// 查询各矿传感器数量
+export const jt_safety_survey_count = (data) => {
+	return http.request({
+		method: 'POST',
+		url: '/jt/safety/survey/count',
+		data,
+	})
+}
+// 煤矿名称列表查询 tab栏目
+export const jt_safety_mine_list = (data) => {
+	return http.request({
+		method: 'POST',
+		url: '/jt/safety/mine/list',
+		data,
+	})
+}
+// 首页详情数据查询 安全监测页部分详情数据
+export const jt_safety_info_part = (data) => {
+	return http.request({
+		method: 'POST',
+		url: '/jt/safety/info/part',
+		data,
+	})
+}
+// 分页查询异常报警列表
+export const jt_safety_alarm_list = (data) => {
+	return http.request({
+		method: 'POST',
+		url: '/jt/safety/alarm/list',
+		data,
+	})
+}
+

+ 0 - 1
common/vmeitime-http/api.js

@@ -309,7 +309,6 @@ export const troubleshoot_getDBNum = (data) => {
     })
 }
 
-
 // 工作台
 export const workbench_index = (data) => {
     return http.request({

+ 4 - 0
common/vmeitime-http/interface.js

@@ -34,7 +34,11 @@ http.delete('user/1').then((res)=>{
 export default {
 	config: {
 		// baseUrl: "http://colliery.nxjiewei.com/api",
+
 		baseUrl: "http://zaoquan.nxjiewei.com:8011/api",
+
+		// baseUrl: "http://ningdongyunying.nxjiewei.com:8011/api",
+
 		header: {
 			"Content-Type":"multipart/form-data",
 			'Content-Type':'application/json;charset=UTF-8',

+ 245 - 0
components/liuyuno-tabs/liuyuno-tabs.vue

@@ -0,0 +1,245 @@
+<template>
+	<view class="_tab-box" :style="{fontSize: defaultConfig.fontSize + 'rpx', color: defaultConfig.color}">
+		<scroll-view id="_scroll" :scroll-x="true" class="scroll-view-h" scroll-with-animation :scroll-left="slider.scrollLeft">
+			<view class="_scroll-content">
+				<view class="_tab-item-box" :class="[defaultConfig.itemWidth ? '_clamp' : '_flex']">
+					<block v-for="(item, index) in tabList" :key="index" >
+						<view 
+							class="_item"
+							:id="'_tab_'+index"
+							:class="{ '_active': tagIndex === index }"
+							:style="{color: tagIndex == index ? defaultConfig.activeColor : defaultConfig.color, 'width': defaultConfig.itemWidth ? defaultConfig.itemWidth + 'rpx' : ''}"
+							@click="tabClick(index)">{{ item[defaultConfig.key] || item }}</view>
+					</block>
+				</view>
+				<view class="_underline" :style="{
+						transform: 'translateX(' + slider.left + 'px)',
+						width: slider.width + 'px',
+						height: defaultConfig.underLineHeight + 'rpx',
+						backgroundColor: defaultConfig.underLineColor,
+					}" />
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'liuyuno-tabs',
+		props: {
+			tabData: {
+				type: Array,
+				default: () => []
+			},
+			activeIndex: {
+				type: Number,
+				default: 0
+			},
+			config: {
+				type: Object,
+				default:() => {
+					return {}
+				}
+			},
+		},
+		data() {
+			return {
+				tabList: [],
+				tagIndex: 0,
+				slider: {
+					left: 0,
+					width: 0,
+					scrollLeft: 0
+				},
+				scorll: {},
+				defaultConfig: {
+					// 要显示的key
+					key: 'name',
+					// 字体大小 rpx
+					fontSize: 34,
+					// 字体颜色
+					color: '#313131',
+					// 激活字体颜色
+					activeColor: '#3D93D0',
+					// item宽度 0为自动
+					itemWidth: 0,
+					// 下划线左右边距,文字宽度加边距 rpx
+					underLinePadding: 10,
+					// 下划线宽度 rpx  注意:设置了此值 underLinePadding 失效
+					underLineWidth: 0,
+					// 下划线高度 rpx
+					underLineHeight: 4,
+					// 下划线颜色
+					underLineColor: '#3D93D0',
+				},
+			};
+		},
+		watch: {
+			tabData(value) {
+				this.updateData();
+				setTimeout(() => {
+					this.updateTabWidth();
+				}, 0);
+			},
+			config(value) {
+				this.updateConfig();
+			},
+		},
+		mounted() {
+			this.updateConfig();
+			this.updateData();
+			this.tagIndex = this.activeIndex;
+
+			this.$nextTick(() => {
+				this.calcScrollPosition();
+			})
+		},
+		methods: {
+			updateData() {
+				let data = [];
+				if (typeof(this.tabData[0])=='string') {
+					this.tabData.forEach((item, index) => {
+						data.push({
+							name: item,
+						})
+					});
+					this.defaultConfig.key = 'name';
+				} else {
+					data = JSON.parse(JSON.stringify(this.tabData));
+				}
+				
+				this.tabList = data;
+			},
+			updateConfig() {
+				this.defaultConfig = Object.assign(this.defaultConfig, this.config);
+			},
+			calcScrollPosition() {
+				
+				const query = uni.createSelectorQuery().in(this);
+				
+				query.select('#_scroll').boundingClientRect((res) => {
+					this.scorll = res;
+					this.updateTabWidth();
+				}).exec();
+			},
+			updateTabWidth(index = 0) {
+				let data = this.tabList;
+				
+				if (data.length == 0) return false;
+				
+				const query = uni.createSelectorQuery().in(this);
+				
+				query.select('#_tab_' + index).boundingClientRect((res) => {
+
+					data[index]._slider = {
+						width: res.width,
+						left: res.left,
+						scrollLeft: res.left - (data[index - 1] ? data[index - 1]._slider.width : 0),
+					};
+					
+					if (this.tagIndex == index) {
+						this.tabToIndex(this.tagIndex);
+					}
+
+					index++;
+					if (data.length > index) {
+						this.updateTabWidth(index);
+					}
+				}).exec();
+			},
+	
+			tabToIndex(index) {
+
+				let _slider = this.tabList[index]._slider;
+				
+				let width = uni.upx2px(this.defaultConfig.underLineWidth);
+				
+				if (!width) {
+					if (this.defaultConfig.itemWidth) {
+						width = uni.upx2px(this.defaultConfig.itemWidth);
+					} else {
+						width = this.tabList[index][this.defaultConfig.key].length * uni.upx2px(this.defaultConfig.fontSize);
+					}
+					width += uni.upx2px(this.defaultConfig.underLinePadding) * 2;
+				}
+				
+				let scorll_left = this.scorll.left || 0;
+				
+				this.slider = {
+					left: _slider.left - scorll_left + (_slider.width - width) / 2,
+					width: width,
+					scrollLeft: _slider.scrollLeft - scorll_left,
+				}
+			},
+			
+			tabClick(index) {
+				this.tagIndex = index;
+				this.tabToIndex(index);
+				this.$emit('tabClick', index);
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	._tab-box {
+		width: 100%;
+		display: flex;
+		font-size: 26rpx;
+		position: relative;
+		height: 90rpx;
+		line-height: 90rpx;
+		z-index: 10;
+		.scroll-view-h{
+			white-space:nowrap;
+			width: 100%;
+			height: 100%;
+			box-sizing: border-box;
+			._scroll-content {
+				width: 100%;
+				height: 100%;
+				position:relative;
+				
+				._tab-item-box {
+					height: 100%;
+					&._flex {
+						display: flex;
+						._item {
+							flex: 1;
+						}
+					}
+					&._clamp {
+						._item {
+							overflow:hidden;
+							text-overflow:ellipsis;
+							white-space:nowrap;
+						}
+					}
+					
+					
+					._item { 
+						height: 100%;
+						display: inline-block;
+						text-align: center;
+						padding: 0 30rpx;
+						position: relative;
+						text-align: center;
+						
+						color: #333;
+						&._active {
+							color: #e54d42;
+						}
+					}
+				}
+				._underline {
+					height: 4rpx;
+					background-color: #e54d42;
+					border-radius: 6rpx;
+					transition: .5s;
+					position: absolute;
+					bottom: 0;
+				}
+			}
+		}
+	}
+</style>

+ 210 - 0
components/n-safety-monitoring-alarming/n-safety-monitoring-alarming.vue

@@ -0,0 +1,210 @@
+<template>
+	<view>
+		<view class="alarming">
+			<view class="title">
+				<view class="icon"></view>
+				<view class="name">监测报警</view>
+			</view>
+			
+			<view class="content">
+				<view class="content_item" v-for="(item,index) in list" :key="index">
+					<view class="content_title">{{item.mine_name}}</view>
+					<view class="time">
+						<view class="icon"></view>
+						<view class="text">{{item.file_time}}</view>
+					</view>
+					<view class="inner">
+						<view class="item">
+							<view class="label">测试名称:</view>
+							<view class="text">{{item.survey_name}}</view>
+						</view>
+						<view class="item">
+							<view class="label">异常类型:</view>
+							<view class="text">{{item.abnormal_type}}</view>
+						</view>
+						<view class="item">
+							<view class="label">异常时间:</view>
+							<view class="text">{{item.abnormal_time}}</view>
+						</view>
+						<view class="item">
+							<view class="label">异常平均值:</view>
+							<view class="text">{{item.abnormal_average}}</view>
+						</view>
+						<view class="item">
+							<view class="label">异常最大值:</view>
+							<view class="text">{{item.abnormal_max}}</view>
+						</view>
+						<view class="item">
+							<view class="label">异常最小值:</view>
+							<view class="text">{{item.abnormal_min}}</view>
+						</view>
+						<view class="item">
+							<view class="label">异常原因:</view>
+							<view class="text">{{item.abnormal_reason}}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+
+		</view>
+	</view>
+</template>
+
+<script>
+	let _self = this
+
+	export default {
+		props: [
+			"page",
+			"code"
+		],
+		watch: {
+			// 监听下拉加载页数
+			page(newVal) {
+				// console.log(newVal)
+				this.page_num = newVal
+
+				// 加载下一页
+				this.get_list()
+			},
+			// 监听切换编码
+			code(newVal) {
+				// console.log(newVal)
+				this.mine_code = newVal
+
+				// 清空list
+				this.list = []
+				// 初始加载list
+				this.get_list()
+			}
+		},
+		data() {
+			return {
+				// 当前煤矿编码
+				mine_code: 0,
+				// 当前页
+				page_num: 1,
+				// 每页查询数量
+				page_size: 5,
+				// 列表项
+				list: [],
+				
+				color_list:[
+					"#83DCFC",
+					"#E74C3C",
+					"#8E44AD",
+					"#2873FF",
+					"#16A085",
+					"#E67E22",
+					"#3498DB",
+					"#64C5E8",
+					"#FA8B89",
+					"#FBB47B",
+					"#A3A2E4"
+				]
+			};
+		},
+		methods: {
+			get_list() {
+				// 获取列表数据
+				this.$p_api.jt_safety_alarm_list({
+					mine_code: this.mine_code,
+					page_size: this.page_size,
+					page_num: this.page_num
+				}).then((res) => {
+					// console.log(res.data.content.data)
+					this.list = this.list.concat(res.data.content.data)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.alarming {
+		margin-top: 8rpx;
+		width: 749rpx;
+
+		.title {
+			height: 90rpx;
+
+			display: flex;
+			justify-content: center;
+			align-items: center;
+
+			border-bottom: 1px solid #eee;
+
+			.icon {
+				width: 45rpx;
+				height: 45rpx;
+				background-image: url(./icon/section1.png);
+				background-size: cover;
+				background-repeat: no-repeat;
+			}
+
+			.name {
+				margin-left: 8rpx;
+			}
+		}
+
+		.content {
+			box-sizing: border-box;
+			padding: 20rpx 24rpx 40rpx;
+			background-color: #F1F1F1;
+
+			.content_item {
+				margin-bottom: 20rpx;
+				background-color: #FFFFFF;
+				border-radius: 8px;
+				overflow: hidden;
+
+				.content_title {
+					line-height: 100rpx;
+					padding-left: 20rpx;
+					border-left: 8rpx solid #83DCFC;
+					border-bottom: 1px solid #eee;
+				}
+
+				.time {
+					height: 80rpx;
+					display: flex;
+					align-items: center;
+
+					box-sizing: border-box;
+					padding: 0 20rpx;
+
+					.icon {
+						width: 40rpx;
+						height: 40rpx;
+						background-image: url(./icon/time.png);
+						background-size: cover;
+						background-repeat: no-repeat;
+					}
+
+					.text {
+						margin-left: 10rpx;
+					}
+				}
+
+				.inner {
+					width: 700rpx;
+					box-sizing: border-box;
+					padding: 0 20rpx 40rpx;
+
+					.item {
+						padding: 10rpx 0;
+						display: flex;
+
+						.label {
+							width: 220rpx;
+						}
+
+						.text {
+							width: 480rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

BIN
components/n-safety-monitoring-canva-1/icon/icon_o.png


+ 135 - 0
components/n-safety-monitoring-canva-1/n-safety-monitoring-canva-1.vue

@@ -0,0 +1,135 @@
+<template>
+	<view>
+		<view class="title">
+			<view class="icon">
+				<image src="./icon/icon_o.png" mode=""></image>
+			</view>
+			<view class="text">当日总报警</view>
+		</view>
+		<canvas canvas-id="canvasRing" id="canvasRing" @touchstart="touchRing" style="width: 700rpx; height:1100rpx;"></canvas>
+	</view>
+</template>
+
+<script>
+	import uCharts from '@/components/u-charts/u-charts.js';
+	var _self;
+	var canvaRing = null;
+
+	export default {
+		data() {
+			return {
+				cWidth: '',
+				cHeight: '',
+				pixelRatio: 1,
+				serverData: '',
+			}
+		},
+		mounted() {
+			_self = this;
+			this.cWidth = uni.upx2px(700);
+			this.cHeight = uni.upx2px(1100);
+			this.getServerData();
+		},
+		methods: {
+			getServerData() {
+				this.$api.jt_safety_alarm_count({
+
+				}).then((res) => {
+					// console.log(res.data.content)
+
+					let data = res.data.content.data
+
+					let Ring = {
+						series: [{
+							name: '',
+							data: 0
+						}],
+						total: 0
+					}
+
+					data.map(function(item, index) {
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm['name'] = item.mine_name + " " + item.count + " 个";
+						sevm['data'] = item.count;
+						//将项放进新的数组
+						Ring.series[index] = sevm
+					})
+
+					Ring.total = res.data.content.total
+
+					// console.log(Ring)
+
+					_self.showRing("canvasRing", Ring);
+
+				})
+			},
+			showRing(canvasId, chartData) {
+				canvaRing = new uCharts({
+					$this: _self,
+					canvasId: canvasId,
+					type: 'ring',
+					fontSize: 12,
+					legend: {
+						show: true,
+						position: 'bottom',
+						lineHeight: 30,
+					},
+					title: {
+						name: chartData.total + "个",
+						color: '#000000',
+						fontSize: 28 * _self.pixelRatio,
+						offsetY: 30 * _self.pixelRatio,
+					},
+					subtitle: {
+						name: '总报警量',
+						color: '#666666',
+						fontSize: 18 * _self.pixelRatio,
+						offsetY: -30 * _self.pixelRatio,
+					},
+					extra: {
+						pie: {
+							offsetAngle: -90,
+							ringWidth: 40 * _self.pixelRatio,
+							labelWidth: 20
+						}
+					},
+					background: '#FFFFFF',
+					pixelRatio: _self.pixelRatio,
+					series: chartData.series,
+					animation: true,
+					width: _self.cWidth * _self.pixelRatio,
+					height: _self.cHeight * _self.pixelRatio,
+					disablePieStroke: true,
+					dataLabel: false,
+				});
+			},
+			touchRing(e) {
+				canvaRing.showToolTip(e, {
+					format: function(item) {
+						// return item.name + ' : ' + item.data + ' 个'
+						return item.name
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.title {
+		display: flex;
+		align-items: center;
+
+		.icon {
+			margin-right: 10rpx;
+			image{
+				width: 30rpx;
+				height: 30rpx;
+			}
+		}
+
+		.text {}
+	}
+</style>

BIN
components/n-safety-monitoring-canva-2/icon/icon_o.png


+ 155 - 0
components/n-safety-monitoring-canva-2/n-safety-monitoring-canva-2.vue

@@ -0,0 +1,155 @@
+<template>
+	<view>
+		<view class="title">
+			<view class="icon">
+				<image src="./icon/icon_o.png" mode=""></image>
+			</view>
+			<view class="text">报警数量趋势</view>
+		</view>
+		<canvas canvas-id="canvasLineA" id="canvasLineA" @touchstart="touchLineA" style="width: 700rpx; height:500rpx;"></canvas>
+	</view>
+</template>
+
+<script>
+	import uCharts from '@/components/u-charts/u-charts.js';
+	var _self;
+	var canvaLineA = null;
+
+	export default {
+		data() {
+			return {
+				cWidth: '',
+				cHeight: '',
+				pixelRatio: 1,
+			}
+		},
+		mounted() {
+			_self = this;
+			this.cWidth = uni.upx2px(700);
+			this.cHeight = uni.upx2px(500);
+			this.getServerData();
+		},
+		methods: {
+			getServerData() {
+				// let LineA = {
+				// 	"categories": ['02-24', '02-25', '02-26', '02-27', '02-28', '03-01','03-02'],
+				// 	"series": [{
+				// 		name: '',
+				// 		data: [0,0,0,0,0,7000,3027],
+				// 		color: '#000000'
+				// 	}]
+				// };
+				
+				this.$api.jt_safety_alarm_total({
+				
+				}).then((res) => {
+					// console.log(res.data.content)
+					
+					let LineA = {
+						categories: [],
+						data:[]
+					}
+					
+					const categories = res.data.content.data
+					categories.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.every_date.slice(5);
+						//将项放进新的数组
+						LineA.categories[index] = sevm
+					})
+					
+					const data = res.data.content.data
+					data.map(function(item, index) {
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.every_count;
+						//将项放进新的数组
+						LineA.data[index] = sevm
+					})
+					
+				
+					// console.log(LineA)
+				
+					_self.showLineA("canvasLineA",LineA);
+				})
+			},
+			showLineA(canvasId, chartData) {
+				canvaLineA = new uCharts({
+					$this: _self,
+					canvasId: canvasId,
+					type: 'line',
+					fontSize: 11,
+					legend: {
+						show: false
+					},
+					dataLabel: false,
+					dataPointShape: true,
+					background: '#FFFFFF',
+					pixelRatio: _self.pixelRatio,
+					categories: chartData.categories,
+					series: [{
+						name: '',
+						data: chartData.data,
+						color: '#000000'
+					}],
+					animation: true,
+					xAxis: {
+						disableGrid: true,
+						type: 'grid',
+						gridColor: '#CCCCCC',
+						gridType: 'dash',
+						dashLength: 8
+					},
+					yAxis: {
+						gridType: 'dash',
+						gridColor: '#CCCCCC',
+						dashLength: 8,
+						splitNumber: 5,
+						min: 10,
+						max: 180,
+						format: (val) => {
+							return val.toFixed(0)
+						}
+					},
+					width: _self.cWidth * _self.pixelRatio,
+					height: _self.cHeight * _self.pixelRatio,
+					extra: {
+						line: {
+							type: 'straight'
+						}
+					}
+				});
+
+			},
+			touchLineA(e) {
+				canvaLineA.showToolTip(e, {
+					format: function(item, category) {
+						return category + ' ' + item.name + ':' + item.data
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.title {
+		margin-bottom: 60rpx;
+		
+		display: flex;
+		align-items: center;
+
+		.icon {
+			margin-right: 10rpx;
+			image{
+				width: 30rpx;
+				height: 30rpx;
+			}
+		}
+
+		.text {}
+	}
+</style>

+ 161 - 0
components/n-safety-monitoring-canva-3/n-safety-monitoring-canva-3.vue

@@ -0,0 +1,161 @@
+<template>
+	<view>
+		<view class="title">
+			<view class="icon">
+				<image src="./icon/icon_red.png" mode=""></image>
+			</view>
+			<view class="text">当前报警</view>
+		</view>
+		
+		<scroll-view scroll-x="true" >
+			<view>
+				<canvas canvas-id="canvasColumn" id="canvasColumn" @touchstart="touchColumn" style="width: 1400rpx; height:600rpx;"></canvas>
+			</view>
+		</scroll-view>
+		
+		
+	</view>
+</template>
+
+<script>
+	import uCharts from '@/components/u-charts/u-charts.js';
+	var _self;
+	var canvaColumn = null;
+
+	export default {
+		data() {
+			return {
+				cWidth: '',
+				cHeight: '',
+				pixelRatio: 1,
+				serverData: '',
+			}
+		},
+		mounted() {
+			_self = this;
+			this.cWidth = uni.upx2px(1400);
+			this.cHeight = uni.upx2px(600);
+			this.getServerData();
+		},
+		methods: {
+			getServerData() {
+				
+				// let Column = {
+				// 	"categories": ["红石湾煤矿", "白芨沟煤矿", "红柳煤矿", "羊场湾一号井", "羊场湾二号井", "灵新煤矿"],
+				// 	"series": [{
+				// 		"name": "",
+				// 		"data": [0,647,386,68,0,1692]
+				// 	}]
+				// };
+				// _self.showColumn("canvasColumn", Column);
+				
+				
+				this.$api.jt_safety_alarm_count({
+					
+				}).then((res)=>{
+					// console.log(res.data.content.data)
+					
+					let Column = {
+						categories: [],
+						data:[]
+					}
+					
+					const categories = res.data.content.data
+					categories.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.mine_name;
+						//将项放进新的数组
+						Column.categories[index] = sevm
+					})
+					
+					const data = res.data.content.data
+					data.map(function(item, index) {
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.count;
+						//将项放进新的数组
+						Column.data[index] = sevm
+					})
+					
+									
+					// console.log(Column)
+									
+					_self.showColumn("canvasColumn", Column);
+					
+				})
+
+			},
+			showColumn(canvasId, chartData) {
+				canvaColumn = new uCharts({
+					$this: _self,
+					canvasId: canvasId,
+					type: 'column',
+					legend: {
+						show: false
+					},
+					fontSize: 11,
+					background: '#FFFFFF',
+					pixelRatio: _self.pixelRatio,
+					animation: true,
+					categories: chartData.categories,
+					series: [{
+						name: '',
+						data: chartData.data,
+					}],
+					xAxis: {
+						disableGrid: true,
+						rotateLabel: true,
+					},
+					yAxis: {
+						// disabled:true
+					},
+					dataLabel: false,
+					width: _self.cWidth * _self.pixelRatio,
+					height: _self.cHeight * _self.pixelRatio,
+					extra: {
+						column: {
+							type: 'group',
+							width: _self.cWidth * _self.pixelRatio * 0.45 / chartData.categories.length
+						}
+					}
+				});
+
+			},
+			touchColumn(e) {
+				canvaColumn.showToolTip(e, {
+					format: function(item, category) {
+						if (typeof item.data === 'object') {
+							return category + ' ' + item.name + ':' + item.data.value
+						} else {
+							return category + ' ' + item.name + ':' + item.data
+						}
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.title {
+		margin-bottom: 60rpx;
+
+		display: flex;
+		align-items: center;
+
+		.icon {
+			display: flex;
+			align-items: center;
+			margin-right: 10rpx;
+			image{
+				width: 30rpx;
+				height: 30rpx;
+			}
+		}
+
+		.text {}
+	}
+</style>

+ 123 - 0
components/n-safety-monitoring-canva-4/n-safety-monitoring-canva-4.vue

@@ -0,0 +1,123 @@
+<template>
+	<view>
+		<view class="title">
+			<view class="icon">
+				<image src="./icon/icon_o.png" mode=""></image>
+			</view>
+			<view class="text">当日报警分布</view>
+		</view>
+
+		<canvas canvas-id="canvasPie" id="canvasPie" @touchstart="touchPie" style="width: 700upx; height:700upx;"></canvas>
+	</view>
+</template>
+
+
+<script>
+	import uCharts from '@/components/u-charts/u-charts.js';
+	var _self;
+	var canvaPie = null;
+
+	export default {
+		data() {
+			return {
+				cWidth: '',
+				cHeight: '',
+				pixelRatio: 1,
+				serverData: '',
+			}
+		},
+		mounted() {
+			_self = this;
+			this.cWidth = uni.upx2px(700);
+			this.cHeight = uni.upx2px(700);
+			this.getServerData();
+		},
+		methods: {
+			getServerData() {
+				
+				this.$api.jt_safety_alarm_count({
+				
+				}).then((res) => {
+					// console.log(res.data.content)
+				
+					let data = res.data.content.data
+				
+					let Pie = {
+						series: [{
+							name: '',
+							data: 0
+						}]
+					}
+				
+					data.map(function(item, index) {
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm['name'] = item.mine_name + " " + item.percent*100 + " %";
+						sevm['data'] = item.count;
+						//将项放进新的数组
+						Pie.series[index] = sevm
+					})
+				
+				
+					// console.log(Pie)
+				
+					_self.showPie("canvasPie", Pie);
+				
+				})
+			},
+			showPie(canvasId, chartData) {
+				canvaPie = new uCharts({
+					$this: _self,
+					canvasId: canvasId,
+					type: 'pie',
+					fontSize: 11,
+					legend: {
+						show: true,
+						position: 'top',
+						lineHeight: 20,
+					},
+					background: '#FFFFFF',
+					pixelRatio: _self.pixelRatio,
+					series: chartData.series,
+					animation: true,
+					width: _self.cWidth * _self.pixelRatio,
+					height: _self.cHeight * _self.pixelRatio,
+					dataLabel: false,
+					extra: {
+						pie: {
+							lableWidth: 15
+						}
+					},
+				});
+			},
+			touchPie(e) {
+				canvaPie.showToolTip(e, {
+					format: function(item) {
+						return item.name + ' : ' + item.data
+					}
+				});
+			},
+		}
+	}
+</script>
+
+
+<style lang="scss">
+	.title {
+		margin-bottom: 10rpx;
+
+		display: flex;
+		align-items: center;
+
+		.icon {
+			margin-right: 10rpx;
+			image{
+				width: 30rpx;
+				height: 30rpx;
+			}
+		}
+
+		.text {}
+	}
+</style>

BIN
components/n-safety-monitoring-tab/icon/Co1.png


BIN
components/n-safety-monitoring-tab/icon/feng.png


BIN
components/n-safety-monitoring-tab/icon/icon_o.png


BIN
components/n-safety-monitoring-tab/icon/icon_red.png


BIN
components/n-safety-monitoring-tab/icon/wasi.png


+ 286 - 0
components/n-safety-monitoring-tab/n-safety-monitoring-tab.vue

@@ -0,0 +1,286 @@
+<template>
+	<view>
+		<view class="tab">
+			<view class="tab_title">
+				<liuyuno-tabs ref="tab" :tabData="tabs" :defaultIndex="defaultIndex" @tabClick='tabClick' />
+			</view>
+			<view class="tab_content" @click="go_content()">
+				<view class="inner">
+					<view class="section_1">
+						<view class="item">
+							<view class="box">
+								<view class="name">模拟量</view>
+								<view class="num">{{simulation}}</view>
+							</view>
+						</view>
+						<view class="item">
+							<view class="box">
+								<view class="name">开关量</view>
+								<view class="num">{{sluice}}</view>
+							</view>
+						</view>
+					</view>
+					<view class="section_2">
+						<view class="list_item">
+							<view class="item" v-for="(item,index) in list" :key="index">
+								<view class="item_title">
+									<view class="item_icon">
+										
+										<image v-if="item.typeCode == '0001'" src="./icon/wasi.png" mode=""></image>
+										<image v-if="item.typeCode == '0004'" src="./icon/Co1.png" mode=""></image>
+										<image v-if="item.typeCode == '1010'" src="./icon/feng.png" mode=""></image>
+									</view>
+									<view class="item_name">{{item.typeCodeDesc}}</view>
+								</view>
+								<view class="item_content">
+									<view class="item_content_list">
+										<view class="content_item" v-for="(item_2,index_2) in item.normalCount" :key="index_2">
+											<view class="name">{{item_2.name}}</view>
+											<view class="num">{{item_2.count}}个</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				defaultIndex: 0,
+				// 标签栏目 煤矿名称列表
+				tabs: [],
+				// 煤矿编码数组
+				tabs_mine_code:[],
+				// 当前煤矿编码
+				mine_code_index:"",
+				
+				// 模拟量
+				simulation:0,
+				// 开关量
+				sluice:0,
+				// 列表项
+				list:[]
+			};
+		},
+		mounted() {
+			// 获取煤矿列表
+			this.get_tabs()
+			
+		},
+		methods:{
+			tabClick(index) {
+				this.defaultIndex = index
+				// console.log(this.tabs_mine_code[index])
+				
+				// 切换当前煤矿编码
+				this.mine_code_index = this.tabs_mine_code[index]
+				// 切换后编码的煤矿详情数据查询
+				this.get_jt_safety_info_part()
+				
+				// 将切换后的编码发送给页面
+				this.$emit("code",this.mine_code_index)
+			},
+			// 获取煤矿列表
+			get_tabs(){
+				this.$p_api.jt_safety_mine_list({
+					
+				}).then((res)=>{
+					// console.log(res.data.content.data)
+					
+					let data = res.data.content.data
+					
+					let tabs = []
+					let mine_code = []
+					
+					data.map(function(item, index) {
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.mine_name;
+						//将项放进新的数组
+						tabs[index] = sevm
+					})
+					
+					data.map(function(item, index) {
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.mine_code;
+						//将项放进新的数组
+						mine_code[index] = sevm
+					})
+					
+					this.tabs = tabs
+					this.tabs_mine_code = mine_code
+					// console.log(mine_code[0])
+					// 定义当前煤矿编码
+					this.mine_code_index = mine_code[0]
+					
+					// 当前编码的煤矿详情数据查询
+					this.get_jt_safety_info_part()
+					
+					// 将定义后的编码发送给页面
+					this.$emit("code",this.mine_code_index)
+				})
+			},
+			// 详情数据查询
+			get_jt_safety_info_part(){
+				this.$p_api.jt_safety_info_part({
+					mine_code:this.mine_code_index
+				}).then((res)=>{
+					// console.log(res.data.content)
+					let data = res.data.content
+					
+					// 模拟量总数
+					this.simulation = data.count.simulation
+					// 开关量总数
+					this.sluice = data.count.sluice
+					// 列表项
+					this.list = data.data
+				})
+			},
+		
+			go_content(){
+				console.log(this.mine_code_index)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.tab{
+		box-sizing: border-box;
+		padding: 0 24rpx;
+		.tab_title{
+			 
+		}
+		.tab_content{
+			.inner{
+				// min-height: 300px;
+				.section_1{
+					margin: 40rpx 0;
+					
+					display: flex;
+					justify-content: space-around;
+					.item{
+						width: 260rpx;
+						height: 260rpx;
+						background-color: #E1EFF8;
+						border-radius: 50%;
+						
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						.box{
+							width: 200rpx;
+							height: 200rpx;
+							border: 16rpx solid #FFFFFF;
+							background-color: #57B3F4;
+							border-radius: 50%;
+							
+							display: flex;
+							flex-direction: column;
+							justify-content: center;
+							align-items: center;
+							
+							color: #FFFFFF;
+							.name{}
+							.num{}
+						}
+					}
+					.item:nth-child(2){
+						background-color: #B7FFC1;
+						.box{
+							background-color: #2ECD73;
+						}
+					}
+				}
+				
+				.section_2{
+					.list_item{
+						.item{
+							border-top: 1rpx solid #f3f3f3;
+							border-bottom: 1rpx solid #f3f3f3;
+							box-sizing: border-box;
+							padding: 0 30rpx;
+							padding-top: 28rpx;
+							padding-bottom: 26rpx;
+							
+							.item_title{
+								display: flex;
+								box-sizing: border-box;
+								padding-bottom: 18rpx;
+								border-bottom: 1rpx solid #f3f3f3;
+								.item_icon{
+									margin-left: 6rpx;
+									image{
+										width: 83rpx;
+										height: 83rpx;
+									}
+								}
+								.item_name{
+									margin-left: 23rpx;
+									font-size: 29rpx;
+									font-family: PingFangSC-Regular, PingFang SC;
+									font-weight: 400;
+									color: #002257;
+									line-height: 83rpx;
+					
+								}
+							}
+							.item_content{
+								.item_content_list{
+									display: flex;
+									justify-content: space-between;
+									.content_item{
+										width: 158rpx;
+										text-align: center;
+										.name{
+											margin-top: 22rpx;
+											font-size: 25rpx;
+											font-family: PingFangSC-Regular, PingFang SC;
+											font-weight: 400;
+											color: #97A3B4;
+											line-height: 33rpx;
+					
+										}
+										.num{
+											margin-top: 6rpx;
+											font-size: 28rpx;
+											font-family: PingFangSC-Medium, PingFang SC;
+											font-weight: 500;
+											line-height: 33rpx;
+											
+											color: #2ECC71;
+					
+										}
+									}
+									.content_item:nth-child(2) .num{
+										color: #E74C3C;
+									}
+									.content_item:nth-child(3) .num{
+										color: #2C3E50;
+									}
+									.content_item:nth-child(4) .num{
+										color: #2F54EB;
+									}
+								}
+							}
+						}
+					}
+							
+							
+				}
+			}
+		}
+	}
+	
+	
+</style>

+ 18 - 12
components/t-c-contacts/t-c-contacts.vue

@@ -1,19 +1,19 @@
 <template>
 	<view class="box">
 		<view class="ul">
-			<view class="li">
+			<view class="li" @click="tankuang()">
 				<image src="./icon/bangong.png" mode=""></image>
 				<text>办公品领用</text>
 			</view>
-			<view class="li">
+			<view class="li" @click="tankuang()">
 				<image src="./icon/yongyin.png" mode=""></image>
 				<text>用印申请</text>
 			</view>
-			<view class="li">
+			<view class="li" @click="tankuang()">
 				<image src="./icon/qingjia.png" mode=""></image>
 				<text>请假</text>
 			</view>
-			<view class="li">
+			<view class="li" @click="tankuang()">
 				<image src="./icon/qita.png" mode=""></image>
 				<text>其他申请</text>
 			</view>
@@ -27,13 +27,13 @@
 			<view class="box_info_item">
 				<view class="box_info_item_li" @click="dianji()">
 					<image src="./icon/jiagou.png" mode=""></image>
-					<text>组织架构</text>
-					<image src="./icon/you.png" mode="" class="box_info_item_li_img"></image>
+					<text class="box_info_item_li_text">组织架构</text>
+					<uni-icons type="arrowright" class="icons"></uni-icons>
 				</view>
 				<view class="box_info_item_li">
 					<image src="./icon/bumen.png" mode=""></image>
-					<text>我的部门</text>
-					<image src="./icon/you.png" mode="" class="box_info_item_li_img"></image>
+					<text class="box_info_item_li_text">我的部门</text>
+					<uni-icons type="arrowright"></uni-icons>
 				</view>
 			</view>
 		</view>
@@ -52,6 +52,12 @@
 				uni.navigateTo({
 					url:"../../production/t-c-c-contacts-info/t-c-c-contacts-info"
 				})
+			},
+			tankuang(){
+				uni.showToast({
+					icon:"none",
+					title:"暂未开通"
+				})
 			}
 		},
 		onLoad() {
@@ -120,17 +126,17 @@
 	.box_info_item_li {
 		display: flex;
 		height: 60px;
-		line-height: 60px;
+		line-height: 64px;
 		border-bottom: 1px solid #f5f5f5;
 	}
 
 	.box_info_item_li>image {
-		width: 40rpx;
-		height: 40rpx;
+		width: 50rpx;
+		height: 50rpx;
 		margin-top: 20px;
 	}
 
-	.box_info_item_li>text {
+	.box_info_item_li>.box_info_item_li_text {
 		width: 80%;
 		font-size: 16px;
 		margin-left: 10px;

+ 91 - 0
components/t-i-banner/t-i-banner.vue

@@ -0,0 +1,91 @@
+<template>
+	<view>
+		<view class="banner">
+			<swiper class="box" autoplay circular>
+				<swiper-item v-for="(item,index) in banners" :key="item.id">
+					<view class="item">
+						<view class="img">
+							<image :src="item.imgURL"></image>
+						</view>
+						<view class="title">
+							<view>{{item.title}}</view>
+							<view class="num">
+								- <text> {{index+1}} </text> -
+							</view>
+						</view>
+					</view>
+				</swiper-item>
+			</swiper>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"t-i-banner",
+		props: [
+			"base_url"
+		],
+		data() {
+			return {
+				banners:[]
+				
+			}
+		},
+		created() {
+			this.get_banner()
+		},
+		methods: {
+			get_banner(){
+				uni.request({
+					url: this.base_url + "/scrollImg/list",
+					method: "GET",
+					success: (res) => {
+						this.banners = res.data.data.data
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.banner{
+		.box{
+			width: 750rpx;
+			height: 600rpx;
+			
+			.item{
+				width: 750rpx;
+				.img{
+					
+					image{
+						width: 750rpx;
+						height: 500rpx;
+					}
+				}
+				.title{
+					box-sizing: border-box;
+					padding: 0 25rpx;
+					width: 750rpx;
+					height: 120rpx;
+					
+					line-height: 1.5;
+					font-size: 28rpx;
+					
+					position: relative;
+					
+					.num{
+						position: absolute;
+						bottom: 35rpx;
+						right: 25rpx;
+						color: #ACB0AC;
+						text{
+							color: #23A2EE;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

BIN
components/t-i-common/icon/icon.png


+ 63 - 0
components/t-i-common/t-i-common.vue

@@ -0,0 +1,63 @@
+<template>
+	<view class="content">
+		<view class="title">常用功能</view>
+		<view class="list">
+			<view class="item" v-for="item in 7">
+				<view class="icon">
+					<image src="./icon/icon.png" mode=""></image>
+				</view>
+				<view class="name">通知公告</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"t-i-common",
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		margin-bottom: 30rpx;
+		background-color: #FFFFFF;
+		
+		box-sizing: border-box;
+		padding: 50rpx 25rpx;
+	}
+	.title{
+		font-size: 36rpx;
+	}
+	.list{
+		width: 700rpx;
+		overflow: hidden;
+		.item{
+			margin-top: 30rpx;
+			margin-right: 25rpx;
+			width: 120rpx;
+			
+			float: left;
+			.icon{
+				width: 120rpx;
+				text-align: center;
+				image{
+					width: 78rpx;
+					height: 78rpx;
+				}
+			}
+			.name{
+				text-align: center;
+				font-size: 26rpx;
+			}
+		}
+		.item:nth-child(5n){
+			margin-right: 0;
+		}
+	}
+</style>

BIN
components/t-i-icon/icon/gaikuang.png


+ 70 - 0
components/t-i-icon/t-i-icon.vue

@@ -0,0 +1,70 @@
+<template>
+	<view class="content">
+		<view class="list">
+			<view class="item" v-for="item in 5">
+				<view class="icon">
+					<image src="./icon/gaikuang.png" mode=""></image>
+				</view>
+				<view class="name">概况</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"t-i-icon",
+		props: [
+			"base_url"
+		],
+		data() {
+			return {
+				list:[]
+			};
+		},
+		created() {
+			this.get_list()
+		},
+		methods:{
+			get_list(){
+				uni.request({
+					url: this.base_url + "/homeNav/list",
+					method: "GET",
+					success: (res) => {
+						// console.log(res.data.data.data)
+						
+						this.list = res.data.data.data.slice(0,5)
+						console.log(this.list)
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		margin-bottom: 30rpx;
+		background-color: #FFFFFF;
+		
+		box-sizing: border-box;
+		padding: 50rpx 25rpx;
+	}
+	
+	.list{
+		display: flex;
+		justify-content: space-between;
+		.item{
+			width: 104rpx;
+			.icon{
+				image{
+					width: 104rpx;
+					height: 104rpx;
+				}
+			}
+			.name{
+				text-align: center;
+			}
+		}
+	}
+</style>

BIN
components/t-i-navbar/icon/bg_img.jpg


BIN
components/t-i-navbar/icon/day.png


BIN
components/t-i-navbar/icon/ningdongyunying.png


BIN
components/t-i-navbar/icon/saoma.png


BIN
components/t-i-navbar/icon/search.png


+ 151 - 0
components/t-i-navbar/t-i-navbar.vue

@@ -0,0 +1,151 @@
+<template>
+	<view>
+		<view class="content">
+			<view class="status_bar">
+				<!-- 这里是状态栏 -->
+			</view>
+			
+			<view class="navbar">
+				<view class="left">
+					<image src="./icon/ningdongyunying.png" mode=""></image>
+					<uni-icons type="arrowdown" color="#fff"></uni-icons>
+				</view>
+				<view class="search">
+					<view class="box">
+						<view class="left">
+							<view class="icon">
+								<image src="./icon/search.png" mode=""></image>
+							</view>
+							<view class="text">搜索</view>
+						</view>
+						<view class="scan">
+							<image src="./icon/saoma.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+				<view class="right">
+					<view class="icon">
+						<image src="./icon/day.png" mode=""></image>
+					</view>
+					<view class="num">21℃</view>
+				</view>
+			</view>
+		</view>
+		
+		<view class="status_bar"></view>
+		<view style="height: 88rpx;"></view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "t-i-navbar",
+		data() {
+			return {
+
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		position: fixed;
+		top: 0;
+		left: 0;
+		
+		z-index: 999;
+		
+		
+		width: 750rpx;
+		
+		background-image: url(./icon/bg_img.jpg);
+		background-size: 750rpx 334rpx;
+		background-repeat: no-repeat;
+	}
+	
+	.navbar{
+		box-sizing: border-box;
+		padding: 10rpx 25rpx;
+		
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		
+		height: 88rpx;
+		.left{
+			display: flex;
+			align-items: center;
+			
+			width: 170rpx;
+			image{
+				width: 165rpx;
+				height: 48rpx;
+				
+				margin-right: 10rpx;
+			}
+		}
+		.search{
+			width: 370rpx;
+			
+			.box{
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				
+				height: 68rpx;
+				
+				background-color: rgba(255,255,255,.4);
+				border-radius: 50rpx;
+				
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				
+				.left{
+					display: flex;
+					
+					.icon{
+						image{
+							width: 21rpx;
+							height: 21rpx;
+						}
+					}
+					.text{
+						color: #FFFFFF;
+						font-size: 24rpx;
+					}
+					
+				}
+				.scan{
+					image{
+						width: 27rpx;
+						height: 25rpx;
+					}
+				}
+			}
+		}
+		.right{
+			margin-left: 20rpx;
+			border-left: 2rpx solid #FFFFFF;
+			box-sizing: border-box;
+			padding-left: 20rpx;
+			
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			height: 40rpx;
+			
+			.icon{
+				margin-right: 10rpx;
+				image{
+					width: 40rpx;
+					height: 40rpx;
+				}
+			}
+			.num{
+				color: #FFFFFF;
+				font-size: 24rpx;
+			}
+		}
+	}
+</style>

+ 141 - 0
components/t-i-news/t-i-news.vue

@@ -0,0 +1,141 @@
+<template>
+	<view class="content">
+		<view class="title">
+			<view class="text">宁煤新闻</view>
+			<view class="more">查看全部 <uni-icons type="arrowright" color="#999" size="11"></uni-icons>
+			</view>
+		</view>
+		<view class="list">
+			<view class="item" v-for="(item,index) in list" :key="index" @click="go_detail(item.id)">
+				<view class="left">
+					<image :src="item.main_img"></image>
+				</view>
+				<view class="right">
+					<view class="title">{{item.title}}</view>
+					<view class="time">{{item.created_at}}</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "t-i-news",
+		props: [
+			"base_url"
+		],
+		data() {
+			return {
+				list: []
+			};
+		},
+		created() {
+			console.log(this.base_url)
+			// 获取首页新闻列表
+			this.getNews()
+		},
+		methods: {
+			// 请求新闻动态
+			getNews() {
+				uni.request({
+					url: this.base_url + "/article/list",
+					method: "GET",
+					data: {
+						pageSize: 4
+					},
+					success: (res) => {
+						// console.log(res.data.data.data)
+						this.list = res.data.data.data
+					}
+				})
+			},
+
+			// 打开详情页
+			go_detail(id) {
+				uni.navigateTo({
+					url: "../../index/news/news?id=" + id
+				})
+			},
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		background-color: #FFFFFF;
+
+		box-sizing: border-box;
+		padding: 50rpx 25rpx;
+	}
+
+	.title {
+		display: flex;
+		align-items: baseline;
+		justify-content: space-between;
+
+		.text {
+			font-size: 36rpx;
+		}
+
+		.more {
+			font-size: 26rpx;
+			color: #999;
+
+		}
+	}
+
+	.list {
+		margin-top: 20rpx;
+		width: 700rpx;
+
+		.item {
+			box-sizing: border-box;
+			padding-top: 20rpx;
+			padding-bottom: 12rpx;
+
+			display: flex;
+
+			.left {
+				width: 240rpx;
+				height: 136rpx;
+
+				image {
+					width: 240rpx;
+					height: 136rpx;
+					border-radius: 8rpx;
+					overflow: hidden;
+				}
+			}
+
+			.right {
+				margin-left: 22rpx;
+
+				display: flex;
+				flex-flow: column;
+				justify-content: space-around;
+
+				.title {
+					overflow: hidden;
+					-webkit-line-clamp: 2;
+					text-overflow: ellipsis;
+					display: -webkit-box;
+					-webkit-box-orient: vertical;
+
+					font-size: 32rpx;
+					font-weight: 400;
+					color: #121212;
+					line-height: 40rpx;
+				}
+
+				.time {
+					font-size: 26rpx;
+					font-weight: 400;
+					color: #999;
+					line-height: 40rpx;
+				}
+			}
+		}
+	}
+</style>

BIN
components/t-i-notice/icon/bg_img.jpg


+ 112 - 0
components/t-i-notice/t-i-notice.vue

@@ -0,0 +1,112 @@
+<template>
+	<view class="content">
+		<view class="box">
+			<!-- 文字滚动 -->
+			<uni-notice-bar :speed="50" background-color="#ffffff00" color="#fff" single="true"
+				:text="text_time"></uni-notice-bar>
+
+			<!-- 文字滚动 -->
+			<uni-notice-bar scrollable="true" :speed="20" background-color="#ffffff00" color="#fff" single="true"
+				:text="text"></uni-notice-bar>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "t-i-notice",
+		props: [
+			"base_url"
+		],
+		data() {
+			return {
+				text_time:"",
+				text: "暂无公告。"
+			};
+		},
+		created() {
+			this.get_notice()
+			
+			this.getCurrentDate()
+		},
+		methods: {
+			get_notice() {
+				uni.request({
+					url: this.base_url + "/notice/list",
+					method: "GET",
+					success: (res) => {
+						console.log(res)
+						if(!res.data.data.content){
+							this.text = res.data.data.message
+						}else{
+							this.text = res.data.data.title + res.data.data.content
+						}
+					}
+				})
+			},
+
+			getCurrentDate() {
+				var myDate = new Date();
+				var year = myDate.getFullYear(); //年
+				var month = myDate.getMonth() + 1; //月
+				var day = myDate.getDate(); //日
+				var days = myDate.getDay();
+				switch (days) {
+					case 1:
+						days = '星期一';
+						break;
+					case 2:
+						days = '星期二';
+						break;
+					case 3:
+						days = '星期三';
+						break;
+					case 4:
+						days = '星期四';
+						break;
+					case 5:
+						days = '星期五';
+						break;
+					case 6:
+						days = '星期六';
+						break;
+					case 0:
+						days = '星期日';
+						break;
+				}
+				var str = "今日 " + " " +  year + "年" + month + "月" + day + "日  " + days;
+				this.text_time = str
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		width: 750rpx;
+		height: 244rpx;
+
+		background-image: url(./icon/bg_img.jpg);
+		background-size: 750rpx 334rpx;
+		background-repeat: no-repeat;
+		background-position: bottom;
+
+		box-sizing: border-box;
+		padding-top: 20rpx;
+	}
+
+	.box {
+		margin: 0 auto;
+		width: 700rpx;
+		height: 200rpx;
+		background-color: rgba(255, 255, 255, .4);
+		border-radius: 20rpx;
+
+		box-sizing: border-box;
+		padding: 20rpx;
+
+		/deep/.uni-noticebar {
+			margin-bottom: 0;
+		}
+	}
+</style>

BIN
components/t-m-icon/icon/icon_1.png


BIN
components/t-m-icon/icon/icon_11.png


BIN
components/t-m-icon/icon/icon_2.png


BIN
components/t-m-icon/icon/icon_3.png


BIN
components/t-m-icon/icon/icon_4.png


BIN
components/t-m-icon/icon/icon_9.png


BIN
components/t-m-icon/icon/w_2_3.png


+ 104 - 0
components/t-m-icon/t-m-icon.vue

@@ -0,0 +1,104 @@
+<template>
+	<view class="content">
+		<view class="list">
+			<view class="item" @click="tell()">
+				<view class="icon">
+					<image src="./icon/icon_9.png" mode=""></image>
+				</view>
+				<view class="name">绑定手机</view>
+			</view>
+			<!-- <view class="item" @click="go_m_signature()">
+				<view class="icon">
+					<image src="./icon/icon_4.png" mode=""></image>
+				</view>
+				<view class="name">手写签名</view>
+			</view> -->
+			<view class="item" @click="go_m_download()">
+				<view class="icon">
+					<image src="./icon/icon_11.png" mode=""></image>
+				</view>
+				<view class="name">下载二维码</view>
+			</view>
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"t-m-icon",
+		data() {
+			return {
+				
+			};
+		},
+		created() {
+			
+		},
+		methods:{
+			// 绑定
+			tell(){
+				uni.navigateTo({
+					url:"../../my/setPhone/setPhone"
+				})
+			},
+			// 下载二维码
+			go_m_download(){
+				uni.navigateTo({
+					url:"../../my/download/download"
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		box-sizing: border-box;
+		padding: 0 24rpx;
+		
+		margin-bottom: 30rpx;
+	}
+	.list{
+		width: 700rpx;
+		overflow: hidden;
+		
+		.item{
+			float: left;
+			
+			width: 200rpx;
+			text-align: center;
+			margin-right: 50rpx;
+			margin-top: 22px;
+			.icon{
+				position: relative;
+				text-align: center;
+				image{
+					width: 45px;
+					height: 45px;
+				}
+				.num{
+					position: absolute;
+					right: 14px;
+					top: -4px;
+					display: inline-block;
+					width: 20px;
+					line-height: 20px;
+					font-size: 12px;
+					color: #FFFFFF;
+					background-color: red;
+					border-radius: 50%;
+				}
+			}
+			.name{
+				font-size: 15px;
+				font-weight: 500;
+				color: #232627;
+				line-height: 21px;
+			}
+		}
+		.item:nth-child(3n){
+			margin-right: 0;
+		}
+	}
+</style>

BIN
components/t-m-info/icon/name_icon.png


BIN
components/t-m-info/icon/tip.png


BIN
components/t-m-info/icon/user_img.png


+ 192 - 0
components/t-m-info/t-m-info.vue

@@ -0,0 +1,192 @@
+<template>
+	<view class="content">
+		<view class="user">
+			<view class="left">
+				<view class="img">
+					<image v-if="user.avatar" :src="user.avatar" mode=""></image>
+					<view class="avatar" v-if="!user.avatar" :style="{backgroundColor:bgColor[1]}">{{user.name.split('').pop()}}</view>
+				</view>
+				<view class="info">
+					<view class="name">{{user.name}} <text style="color: #999;font-size: 14px;margin-left: 10px;" v-if="mobile">({{mobile}})</text> </view>
+					<view class="section">{{user.section}}</view>
+				</view>
+			</view>
+			<view class="right">
+				<!-- <uni-icons type="arrowright"></uni-icons> -->
+			</view>
+		</view>
+		<view class="tip" v-if="tip_password">
+			<view class="icon"></view>
+			<view class="text">当前密码为初始密码,请及时修改。</view>
+		</view>
+		<view class="tip" v-if="tip_mobile">
+			<view class="icon"></view>
+			<view class="text">未绑定手机号,请立即绑定手机号。</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"t-m-user",
+		data() {
+			return {
+				// 用户基本信息
+				user:{},
+				// 手机号
+				mobile:'',
+				// 头像随机色
+				bgColor:[],
+				// 密码提示
+				tip_password:false,
+				// 手机绑定
+				tip_mobile:false
+			};
+		},
+		created() {
+			console.log(uni.getStorageSync('user'))
+			// 获取用户基本信息
+			this.user = uni.getStorageSync('user');
+			this.mobile = uni.getStorageSync('mobile');
+			// 设置头像
+			for(let i=0;i<2;i++){
+				// 获取随机色
+				let r = parseInt(Math.random() * 256)
+				let g = parseInt(Math.random() * 256)
+				let b = parseInt(Math.random() * 256)
+				
+				// ES6 字符串拼接
+				// this.bgColor = `rgba(${r},${g},${b},0.3)`
+				let color = "rgba(" + r + "," + g + "," + b + "," + 0.3 + ")"
+				// console.log(color)
+				this.bgColor.push(color)
+			}
+			
+			// 判断是否为初始密码
+			uni.getStorageSync('login_password')
+			// console.log(uni.getStorageSync('login_password'))
+			if(uni.getStorageSync('login_password') == "Zhks123456+"){
+				this.tip_password = true
+			}
+			
+			// 判断是否绑定手机号
+			if(!this.mobile){
+				this.tip_mobile = true
+			}
+			
+			setTimeout(()=>{
+				if(!this.mobile){
+					uni.showModal({
+					    title: '温馨提示',
+					    content: '当前还未绑定手机号,请及时绑定。',
+						showCancel:false,
+					    success: function (res) {
+					        if (res.confirm) {
+					            console.log('用户点击确定');
+								uni.navigateTo({
+									url:"../../my/setPhone/setPhone"
+								})
+					        }
+					    }
+					});
+				}
+			},500)
+		},
+		methods:{
+			
+		}
+		
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		box-sizing: border-box;
+		padding: 0 25rpx;
+	}
+	.user{
+		margin-top: -50px;
+		width: 700rpx;
+		height: 100px;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 3px 3px rgba(0,0,0,0.05);
+		border-radius: 3px;
+		
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		
+		box-sizing: border-box;
+		padding-right: 14px;
+		padding-left: 8px;
+		.left{
+			display: flex;
+			align-items: center;
+			.img{
+				width: 66px;
+				height: 66px;
+				border-radius: 50%;
+				overflow: hidden;
+				image{
+					width: 66px;
+					height: 66px;
+				}
+				.avatar{
+					width: 66px;
+					height: 66px;
+					text-align: center;
+					line-height: 66px;
+					color: #FFFFFF;
+					font-size: 28px;
+				}
+			}
+			.info{
+				margin-left: 12px;
+				.name{
+					font-size: 19px;
+					font-weight: 500;
+					color: #232627;
+					line-height: 26px;
+				}
+				.section{
+					margin-top: 4px;
+					font-size: 14px;
+					font-weight: 500;
+					color: #232627;
+					line-height: 19px;
+				}
+			}
+		}
+		.right{
+			
+		}
+	}
+	
+	.tip{
+		margin-top: 8px;
+		height: 45px;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 3px 3px rgba(0,0,0,0.05);
+		border-radius: 3px;
+		
+		display: flex;
+		align-items: center;
+		
+		box-sizing: border-box;
+		padding-left: 9px;
+		.icon{
+			width: 22px;
+			height: 22px;
+			
+			background-image: url(./icon/tip.png);
+			background-size: cover;
+			background-repeat: no-repeat;
+		}
+		.text{
+			margin-left: 6px;
+			font-size: 15px;
+			color: #7F8C8D;
+			line-height: 19px;
+		}
+	}
+</style>

BIN
components/t-m-list/icon/list_1.png


BIN
components/t-m-list/icon/list_2.png


BIN
components/t-m-list/icon/list_3.png


+ 125 - 0
components/t-m-list/t-m-list.vue

@@ -0,0 +1,125 @@
+<template>
+	<view class="content">
+		<view class="line"></view>
+		<view class="list">
+			<view class="item" @click="go_m_repassword()">
+				<view class="left">
+					<view class="icon">
+						<image src="./icon/list_1.png" mode=""></image>
+					</view>
+					<view class="name">修改密码</view>
+				</view>
+				<view class="right">
+					<uni-icons type="arrowright"></uni-icons>
+				</view>
+			</view>
+			<view class="item" @click="logout()">
+				<view class="left">
+					<view class="icon">
+						<image src="./icon/list_2.png" mode=""></image>
+					</view>
+					<view class="name">退出登录</view>
+				</view>
+				<view class="right">
+					<uni-icons type="arrowright"></uni-icons>
+				</view>
+			</view>
+			<view class="item" @click="go_m_update_log()">
+				<view class="left">
+					<view class="icon">
+						<image src="./icon/list_3.png" mode=""></image>
+					</view>
+					<view class="name">更新日志</view>
+				</view>
+				<view class="right">
+					<uni-icons type="arrowright"></uni-icons>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"t-m-list",
+		data() {
+			return {
+				
+			};
+		},
+		methods:{
+			// 修改密码
+			go_m_repassword(){
+				uni.navigateTo({
+					url:"../../my/repassword/repassword"
+				})
+			},
+			// 退出登录
+			logout(){
+				uni.clearStorageSync('Authorization');
+				uni.showToast({
+					icon:"none",
+					title:"退出登录"
+				})
+				
+				// 跳转登录页
+				uni.redirectTo({
+					url:"../../my/login/login"
+				})
+			},
+			// 更新日志
+			go_m_update_log(){
+				uni.navigateTo({
+					url:"../../my/update-log/update-log"
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		margin-top: 17px;
+		box-sizing: border-box;
+		padding: 0 24rpx;
+	}
+	.line{
+		height: 4px;
+		background: #009FE8;
+	}
+	.list{
+		.item{
+			height: 48px;
+			
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			
+			box-sizing: border-box;
+			padding-right: 2px;
+			padding-left: 10px;
+			.left{
+				display: flex;
+				align-items: center;
+				.icon{
+					width: 19px;
+					height: 17px;
+					image{
+						width: 19px;
+						height: 19px;
+					}
+				}
+				.name{
+					margin-left: 4px;
+					font-size: 17px;
+					font-weight: 500;
+					color: #333333;
+					line-height: 23px;
+				}
+			}
+			.right{
+				
+			}
+		}
+	}
+</style>

+ 25 - 6
components/t-p-n-section-1/t-p-n-section-1.vue

@@ -27,7 +27,7 @@
 				<view class="tip">井下人数3892人</view>
 			</view>
 		</view>
-		<view class="item_box" style="background-color: #8BC8DA;">
+		<view class="item_box" style="background-color: #8BC8DA;" @click="go_safety_monitoring()">
 			<view class="img">
 				<image src="../t-p-icon/icon_4.png" mode=""></image>
 			</view>
@@ -36,7 +36,7 @@
 				<view class="tip">6268监测点</view>
 			</view>
 		</view>
-		<view class="item_box" style="background-color: #9AE2A2;">
+		<view class="item_box" style="background-color: #9AE2A2;" @click="go_zdhxt('tfgl')">
 			<view class="img">
 				<image src="../t-p-icon/icon_5.png" mode=""></image>
 			</view>
@@ -54,7 +54,7 @@
 				<view class="tip">工业视频</view>
 			</view>
 		</view>
-		<view class="item_box" style="background-color: #FA8B89;">
+		<view class="item_box" style="background-color: #FA8B89;" @click="go_risk_precontr0l()">
 			<view class="img">
 				<image src="../t-p-icon/icon_7.png" mode=""></image>
 			</view>
@@ -63,7 +63,7 @@
 				<view class="tip">分数统计</view>
 			</view>
 		</view>
-		<view class="item_box" style="background-color: #2C3E50;">
+		<view class="item_box" style="background-color: #2C3E50;" @click="go_zdhxt('zys')">
 			<view class="img">
 				<image src="../t-p-icon/icon_8.png" mode=""></image>
 			</view>
@@ -72,7 +72,7 @@
 				<view class="tip">主运输皮带</view>
 			</view>
 		</view>
-		<view class="item_box" style="background-color: #2873FF;">
+		<view class="item_box" style="background-color: #2873FF;" @click="go_zdhxt('psxt')">
 			<view class="img">
 				<image src="../t-p-icon/icon_9.png" mode=""></image>
 			</view>
@@ -81,7 +81,7 @@
 				<view class="tip">中央水泵</view>
 			</view>
 		</view>
-		<view class="item_box" style="background-color: #8BC8DA;">
+		<view class="item_box" style="background-color: #8BC8DA;" @click="go_zdhxt('yfzd')">
 			<view class="img">
 				<image src="../t-p-icon/icon_10.png" mode=""></image>
 			</view>
@@ -111,6 +111,12 @@
 			};
 		},
 		methods:{
+			// 自动化统计列表
+			go_zdhxt(zdhxt){
+				uni.navigateTo({
+					url:"../../production/zidonghua/zidonghua?url=" + "http://webdevelop.nxjiewei.com/assets/html/E-zidonghua/?zdhxt=" + zdhxt
+				})
+			},
 			// 生产统计
 			go_production_statistics(){
 				uni.navigateTo({
@@ -122,6 +128,18 @@
 				uni.navigateTo({
 					url:"../../ningdongyunying/personnel_orientation/personnel_orientation"
 				})
+			},
+			// 安全监测
+			go_safety_monitoring(){
+				uni.navigateTo({
+					url:"../../ningdongyunying/safety_monitoring/safety_monitoring"
+				})
+			},
+			// 风险预控
+			go_risk_precontr0l(){
+				uni.navigateTo({
+					url:"../../ningdongyunying/risk_precontrol/risk_precontrol"
+				})
 			}
 		}
 	}
@@ -134,6 +152,7 @@
 		margin-bottom: 100rpx;
 
 		overflow: hidden;
+		
 
 		.item_box {
 			float: left;

+ 13 - 5
components/t-p-shicaocun/t-p-shicaocun.vue

@@ -27,7 +27,7 @@
 				<view class="tip">6268监测点</view>
 			</view>
 		</view>
-		<view class="item_box" style="background-color: #FBB47B;">
+		<view class="item_box" style="background-color: #FBB47B;" @click="go_video_monitor()">
 			<view class="img">
 				<image src="../t-p-icon/icon_6.png" mode=""></image>
 			</view>
@@ -44,26 +44,34 @@
 		name: "t-p-shicaocun",
 		data() {
 			return {
-
+				mine:"640181B0011010018668",
+				org_num:"1023",
+				mine_code:"shicaocun"
 			};
 		},
 		methods: {
 			// 生产报表
 			go_production_report() {
 				uni.navigateTo({
-					url: "../../production/production_report/production_report"
+					url: "../../production/production_report/production_report?mine=" + this.mine + "&org_num=" + this.org_num,
 				})
 			},
 			// 安全监测
 			go_safety_monitoring() {
 				uni.navigateTo({
-					url: "../../production/safety_monitoring/safety_monitoring?mine=shicaocun"
+					url: "../../production/safety_monitoring/safety_monitoring?mine=" + this.mine
 				})
 			},
 			//人员定位
 			go_personnel_orientation() {
 				uni.navigateTo({
-					url:"../../production/personnel_orientation/personnel_orientation?mine=shicaocun"
+					url:"../../production/personnel_orientation/personnel_orientation?mine=" + this.mine
+				})
+			},
+			// 视频监控
+			go_video_monitor(){
+				uni.navigateTo({
+					url:"../../production/video_monitor/video_monitor?mine_code=" + this.mine_code
 				})
 			}
 		}

+ 4 - 0
components/t-w-application/t-w-application.vue

@@ -113,6 +113,7 @@
 	.headers_li_img>image{
 		width: 100rpx;
 		height: 100rpx;
+		margin-bottom: 20rpx;
 	}
 	.headers_li_text{
 		font-size: 14px;
@@ -124,4 +125,7 @@
 		width: 100%;
 		background-color: #fff;
 	}
+	.ly-tree-node__label{
+		color: #000000;
+	}
 </style>

+ 73 - 70
manifest.json

@@ -1,72 +1,75 @@
 {
-    "name" : "智慧矿山-全矿",
-    "appid" : "__UNI__854DCD5",
-    "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
-    "transformPx" : false,
-    /* 5+App特有相关 */
-    "app-plus" : {
-        "usingComponents" : true,
-        "nvueStyleCompiler" : "uni-app",
-        "compilerVersion" : 3,
-        "splashscreen" : {
-            "alwaysShowBeforeRender" : true,
-            "waiting" : true,
-            "autoclose" : true,
-            "delay" : 0
-        },
-        /* 模块配置 */
-        "modules" : {},
-        /* 应用发布信息 */
-        "distribute" : {
-            /* android打包配置 */
-            "android" : {
-                "permissions" : [
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-                ]
-            },
-            /* ios打包配置 */
-            "ios" : {},
-            /* SDK配置 */
-            "sdkConfigs" : {}
-        }
-    },
-    /* 快应用特有相关 */
-    "quickapp" : {},
-    /* 小程序特有相关 */
-    "mp-weixin" : {
-        "appid" : "",
-        "setting" : {
-            "urlCheck" : false
-        },
-        "usingComponents" : true
-    },
-    "mp-alipay" : {
-        "usingComponents" : true
-    },
-    "mp-baidu" : {
-        "usingComponents" : true
-    },
-    "mp-toutiao" : {
-        "usingComponents" : true
-    },
-    "uniStatistics" : {
-        "enable" : false
-    },
-    "vueVersion" : "2"
+	"name": "智慧矿山-全矿",
+	"appid": "__UNI__854DCD5",
+	"description": "",
+	"versionName": "1.0.0",
+	"versionCode": "100",
+	"transformPx": false,
+	/* 5+App特有相关 */
+	"app-plus": {
+		"compatible": {
+			"ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持  
+		},
+		"usingComponents": true,
+		"nvueStyleCompiler": "uni-app",
+		"compilerVersion": 3,
+		"splashscreen": {
+			"alwaysShowBeforeRender": true,
+			"waiting": true,
+			"autoclose": true,
+			"delay": 0
+		},
+		/* 模块配置 */
+		"modules": {},
+		/* 应用发布信息 */
+		"distribute": {
+			/* android打包配置 */
+			"android": {
+				"permissions": [
+					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
+					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+					"<uses-feature android:name=\"android.hardware.camera\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+				]
+			},
+			/* ios打包配置 */
+			"ios": {},
+			/* SDK配置 */
+			"sdkConfigs": {}
+		}
+	},
+	/* 快应用特有相关 */
+	"quickapp": {},
+	/* 小程序特有相关 */
+	"mp-weixin": {
+		"appid": "",
+		"setting": {
+			"urlCheck": false
+		},
+		"usingComponents": true
+	},
+	"mp-alipay": {
+		"usingComponents": true
+	},
+	"mp-baidu": {
+		"usingComponents": true
+	},
+	"mp-toutiao": {
+		"usingComponents": true
+	},
+	"uniStatistics": {
+		"enable": false
+	},
+	"vueVersion": "2"
 }

+ 94 - 34
pages.json

@@ -6,15 +6,18 @@
 			"path": "pages/tabbar/index/index",
 			"style": {
 				"navigationStyle": "custom"
+				// "navigationBarTitleText": "智慧矿山"
 			}
 		},
 		{
-			"path": "pages/tabbar/contacts/contacts",
+
+			"path": "pages/tabbar/origanization/origanization",
 			"style": {
 				"navigationBarTitleText": "通讯录"
 			}
-		
-		},{
+
+		}, {
+
 			"path": "pages/tabbar/workbench/workbench",
 			"style": {
 				"navigationBarTitleText": "工作台"
@@ -74,17 +77,82 @@
 				"navigationStyle": "custom"
 			}
 
+		}, {
+			"path": "pages/production/personnel_orientation/search/search",
+			"style": {
+				"navigationStyle": "custom"
+			}
+
+		}, {
+			"path": "pages/production/personnel_orientation/depart-people/depart-people",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+
+		}, {
+			"path": "pages/production/personnel_orientation/depart-people-2/depart-people-2",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+
+		}, {
+			"path": "pages/production/personnel_orientation/downhole_statistics/downhole_statistics",
+			"style": {
+				"navigationBarTitleText": "下井记录"
+			}
+
+		}, {
+			"path": "pages/production/personnel_orientation/people_track/people_track",
+			"style": {
+				"navigationBarTitleText": "下井轨迹"
+			}
+
+		}, {
+			"path": "pages/ningdongyunying/production_statistics/production_statistics",
+			"style": {
+				"navigationBarTitleText": "生产统计"
+			}
+
+		}, {
+			"path": "pages/ningdongyunying/personnel_orientation/personnel_orientation",
+			"style": {
+				"navigationBarTitleText": "人员定位"
+			}
+
+		}, {
+			"path": "pages/ningdongyunying/safety_monitoring/safety_monitoring",
+			"style": {
+				"navigationBarTitleText": "安全监测"
+			}
+
+		}, {
+			"path": "pages/production/video_monitor/video_monitor",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+
+		}, {
+			"path": "pages/production/zidonghua/zidonghua",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+
+		}, {
+			"path": "pages/ningdongyunying/risk_precontrol/risk_precontrol",
+			"style": {
+				"navigationBarTitleText": "风险预控"
+			}
+
+		}, {
+			"path": "pages/ningdongyunying/risk_precontrol/detail/detail",
+			"style": {
+				"navigationBarTitleText": "隐患详情"
+			}
+
 		}
+
 	    ,{
-            "path" : "pages/production/personnel_orientation/search/search",
-            "style" :                                                                                    
-            {
-               "navigationStyle": "custom"
-            }
-            
-        }
-        ,{
-            "path" : "pages/production/personnel_orientation/depart-people/depart-people",
+            "path" : "pages/index/news/news",
             "style" :                                                                                    
             {
                 "navigationBarTitleText": ""
@@ -92,7 +160,7 @@
             
         }
         ,{
-            "path" : "pages/production/personnel_orientation/depart-people-2/depart-people-2",
+            "path" : "pages/index/news/news_list/news_list",
             "style" :                                                                                    
             {
                 "navigationBarTitleText": ""
@@ -100,44 +168,34 @@
             
         }
         ,{
-            "path" : "pages/production/personnel_orientation/downhole_statistics/downhole_statistics",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "下井记录"
-            }
-            
-        }
-        ,{
-            "path" : "pages/production/personnel_orientation/people_track/people_track",
+            "path" : "pages/my/login/login",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "下井轨迹"
+                "navigationStyle": "custom"
             }
             
         }
         ,{
-            "path" : "pages/ningdongyunying/production_statistics/production_statistics",
+            "path" : "pages/my/repassword/repassword",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "生产统计"
+                "navigationBarTitleText": "修改密码"
             }
             
         }
         ,{
-            "path" : "pages/ningdongyunying/personnel_orientation/personnel_orientation",
+            "path" : "pages/my/setPhone/setPhone",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
+                "navigationBarTitleText": "绑定手机"
             }
             
         }
         ,{
-            "path" : "pages/ningdongyunying/safety_monitoring/safety_monitoring",
+            "path" : "pages/my/download/download",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
+                "navigationBarTitleText": "下载二维码"
             }
             
         },{
@@ -163,10 +221,12 @@
 				"selectedIconPath": "static/tabbar/home_active.png"
 			},
 			{
+			
 				"text": "通讯录",
-				"pagePath": "pages/tabbar/contacts/contacts",
-				"iconPath": "static/tabbar/contacts.png",
-				"selectedIconPath": "static/tabbar/contacts_active.png"
+				"pagePath": "pages/tabbar/origanization/origanization",
+				"iconPath": "static/tabbar/origanization.png",
+				"selectedIconPath": "static/tabbar/origanization_active.png"
+
 			},
 			{
 				"text": "工作台",

+ 23 - 0
pages/index/news/news.vue

@@ -0,0 +1,23 @@
+<template>
+	<view>
+		<web-view :src="href"></web-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				href: "http://ningdongyunying.nxjiewei.com:8011" + '/admin/article/list/view?id='
+				// href:"http://webdevelop.nxjiewei.com/assets/html/news/#/pages/detail/detail?id="
+			};
+		},
+		onLoad(option) {
+			this.href = this.href + option.id
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 19 - 0
pages/index/news/news_list/news_list.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 121 - 0
pages/my/download/download.vue

@@ -0,0 +1,121 @@
+<template>
+	<view>
+		<view class="card">
+			<view class="card_title">
+				App下载二维码
+			</view>
+			<view class="card_img">
+				<image src="https://cdn.colorhub.me/Ae_89hq_0VPSGk4AD9LB1FcUv1_5dxMK45Ed19bFDHo/auto/280/0/ce/0/bG9jYWw6Ly8vY2Ev/ZDEvZTRlNzU0Yzdl/MTljMDA3YjQ3NmRj/ZDk4ZjIwOTExNWE2/NDViY2FkMS5qcGVn.jpg"
+				 mode=""></image>
+			</view>
+			<view class="card_tips">
+				扫一扫下载
+			</view>
+		</view>
+
+		<view class="download_btn" @click="save()">
+			<view class="btn_icon">
+				<uni-icons type="download"></uni-icons>
+			</view>
+			<view class="btn_name">保存到手机</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			};
+		},
+		methods: {
+			save() {
+				uni.saveImageToPhotosAlbum({
+					filePath: "./img/download.png",
+					success: function() {
+						console.log('save success');
+					}
+				});
+				uni.showToast({
+					icon:"none",
+					title:"保存成功!"
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #009FE8;
+		box-sizing: border-box;
+		padding: 50rpx 25rpx 0;
+	}
+
+	.card {
+		width: 700rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 5px 5px rgba(0, 0, 0, 0.1);
+		border-radius: 10px;
+
+		.card_title {
+			text-align: center;
+			font-size: 19px;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			color: #333333;
+			line-height: 60px;
+			border-bottom: 2px solid #f0f0f0;
+		}
+
+		.card_img {
+			box-sizing: border-box;
+			padding: 25px 20rpx;
+			
+			
+
+			image {
+				width: 660rpx;
+				height: 300px;
+
+			}
+		}
+
+		.card_tips {
+			text-align: center;
+			font-size: 12px;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			color: #6C6F74;
+			line-height: 40px;
+			border-top: 2px solid #f0f0f0;
+		}
+	}
+
+	.download_btn {
+		margin-top: 40px;
+		width: 700rpx;
+
+		height: 40px;
+		background: #FFFFFF;
+		border-radius: 5px;
+
+		display: flex;
+		align-items: center;
+		justify-content: center;
+
+		.btn_icon {
+			
+		}
+
+		.btn_name {
+			margin-left: 8px;
+			font-size: 14px;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			color: #232627;
+		}
+	}
+</style>

BIN
pages/my/login/icon/Avatar.png


BIN
pages/my/login/icon/Password.png


+ 247 - 0
pages/my/login/login.vue

@@ -0,0 +1,247 @@
+<template>
+	<view class="content">
+		<view class="status_bar"></view>
+		<view class="logo">
+			<image src="~@/static/logo.png" mode="aspectFit"></image>
+		</view>
+		<view class="title">
+			<text>E信管理</text>
+		</view>
+		<view class="login_box">
+			<view class="item">
+				<view class="name">工号</view>
+				<view class="input">
+					<input type="text" value="" v-model="user.username" />
+				</view>
+				<view class="icon icon_avatar"></view>
+			</view>
+			<view class="item">
+				<view class="name">密码</view>
+				<view class="input">
+					<input type="password" value="" v-model="user.password" />
+				</view>
+				<view class="icon icon_password"></view>
+			</view>
+		</view>
+
+		<view class="tips">
+			<text>忘记密码?请联系信息科管理员重置</text>
+		</view>
+
+		<!-- <view class="tips">
+			<text>忘记密码?请联系信息科重置密码</text>
+		</view> -->
+
+		<view class="login_btn" @click="loginBtn()">
+			<text>登录</text>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				user: {
+					username: '',
+					password: ''
+				}
+			};
+		},
+		onLoad() {
+
+		},
+		methods: {
+			loginBtn() {
+				const user = this.user
+				uni.setStorageSync('login_password', this.user.password)
+				// 判断是否为空
+				if (user.username == '' || user.password == '') {
+					uni.showToast({
+						icon: "none",
+						title: "请填写用户信息"
+					})
+					return false
+				}
+				this.$api.login({
+					username: user.username,
+					password: user.password
+				}).then((res) => {
+					if (res.data.code === 0) {
+
+						// console.log(res.data.data.token_type +''+res.data.data.access_token)
+						console.log(res.data.data.user.mobile)
+
+						uni.setStorageSync('Authorization', res.data.data.access_token)
+						uni.setStorageSync('token_type', res.data.data.token_type)
+						// 存储用户基本信息
+						uni.setStorageSync('user', res.data.data.user);
+						// 存储电话号码
+						uni.setStorageSync('mobile', res.data.data.user.mobile);
+
+						setTimeout(function() {
+							uni.showToast({
+								icon: "none",
+								title: "登录成功"
+							})
+							uni.switchTab({
+								url:"../../tabbar/index/index",
+								success: () => {
+									//#ifdef H5
+									window.location.reload();
+									//#endif
+								}
+							})
+						}, 500)
+
+						// #ifdef APP-PLUS
+						plus.runtime.restart();
+						// #endif
+
+					} else if (res.data.code === 1001) {
+						uni.showToast({
+							icon: "none",
+							title: "用户不存在"
+						})
+					} else if (res.data.code === 1002) {
+						uni.showToast({
+							icon: "none",
+							title: "密码错误"
+						})
+					} else {
+						return false
+					}
+				}).catch((err) => {
+					console.log('request fail', err);
+					uni.showToast({
+						icon: "none",
+						title: err
+					})
+				})
+
+			},
+
+		}
+
+	}
+</script>
+
+<style lang="scss">
+	page {}
+
+	.content {
+		width: 749rpx;
+		height: 100vh;
+		background-image: url(~@/static/login.png);
+		background-size: cover;
+		background-position: center center;
+		background-repeat: no-repeat;
+
+		.logo {
+			width: 344rpx;
+			height: 350rpx;
+			margin: 0 auto;
+			padding-top: 100rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.title {
+			margin: 0 auto;
+			margin-top: 32rpx;
+			width: 288rpx;
+			height: 47rpx;
+			font-size: 36rpx;
+			font-family: MicrosoftYaHei;
+			color: #FFFFFF;
+			line-height: 47rpx;
+			text-align: center;
+		}
+
+		.login_box {
+			padding-top: 40px;
+
+			.item {
+				margin: 0 auto;
+				margin-bottom: 20px;
+				width: 500rpx;
+				height: 45px;
+				background: #FFFFFF;
+				border-radius: 25px;
+				padding-left: 20px;
+				padding-right: 20px;
+				box-sizing: border-box;
+				display: flex;
+				align-items: center;
+
+				.name {
+					width: 80rpx;
+					font-size: 16px;
+					color: #009FE8;
+					line-height: 45px;
+				}
+
+				.input {
+					width: 280rpx;
+
+					input {
+						height: 45px;
+						color: #666;
+					}
+				}
+
+				.icon {}
+
+				.icon_avatar {
+					margin-left: 10rpx;
+					width: 25px;
+					height: 25px;
+					background-image: url(./icon/Avatar.png);
+					background-size: cover;
+					background-repeat: no-repeat;
+				}
+
+				.icon_password {
+					margin-left: 18rpx;
+					width: 25px;
+					height: 28px;
+					background-image: url(./icon/Password.png);
+					background-size: cover;
+					background-repeat: no-repeat;
+				}
+			}
+		}
+
+		.tips {
+			margin: 0 auto;
+			margin-top: 25px;
+			text-align: center;
+			font-size: 14px;
+			color: #ECF0F1;
+			line-height: 40px;
+			text-align: center;
+
+		}
+
+		.login_btn {
+			margin: 0 auto;
+			margin-top: 40px;
+			width: 200px;
+			height: 50px;
+			background: rgba(100, 220, 255, 0.8);
+			border-radius: 25px;
+			text-align: center;
+			line-height: 50px;
+
+			text {
+				font-size: 18px;
+				color: #FFFFFF;
+				letter-spacing: 4px;
+			}
+		}
+	}
+</style>

+ 205 - 0
pages/my/repassword/repassword.vue

@@ -0,0 +1,205 @@
+<template>
+	<view>
+		<view class="content">
+			<view class="input_box">
+				<input type="number" v-model="mobile" placeholder="请输入手机号" placeholder-style="color:#999;"/>
+			</view>
+			<view class="send_box">
+				<view class="send_code">
+					<input type="number" v-model="vcode" placeholder="验证码" placeholder-style="color:#999;"/>
+				</view>
+				
+				<view class="send_btn" @click="send_vcode()">
+					{{send_text}}
+				</view>
+			</view>
+			<view class="input_box">
+				<input type="password" v-model="password" placeholder="请输入新密码" placeholder-style="color:#999;"/>
+			</view>
+			<view class="input_box">
+				<input type="password" v-model="copypassword" placeholder="请重复新密码" placeholder-style="color:#999;"/>
+			</view>
+			
+			<view class="re_btn" @click="repassword()">
+				确认修改
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	var testPassword =/^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_!@#$%^&*`~()-+=]+$)(?![a-z0-9]+$)(?![a-z\W_!@#$%^&*`~()-+=]+$)(?![0-9\W_!@#$%^&*`~()-+=]+$)[a-zA-Z0-9\W_!@#$%^&*`~()-+=]{8,15}$/
+	
+	export default {
+		data() {
+			return {
+				mobile:'',
+				vcode:'',
+				password:'',
+				copypassword:'',
+				send_text:'发送验证码'
+			};
+		},
+		methods:{
+			send_vcode(){
+				if(this.mobile.length < 11){
+					uni.showToast({
+						icon:'none',
+						title:'请填写正确的手机号'
+					})
+					return
+				}
+				
+				if(this.send_text == "发送验证码"){
+					this.$api.sms_vcode({
+						mobile:this.mobile
+					}).then((res)=>{
+						
+						console.log(res.data)
+						
+						if(res.data.code == 3001){
+							uni.showToast({
+								icon:"none",
+								title:"电话号码错误"
+							})
+						}else if(res.data.code == 3002){
+							uni.showToast({
+								icon:"none",
+								title:"发送失败"
+							})
+						}else if(res.data.code == 0){
+							uni.showToast({
+								icon:"none",
+								title:"验证码发送成功"
+							})
+						}
+					})
+				}
+				
+				this.send_text = "已发送"
+				if(this.send_text = "已发送"){
+					uni.showToast({
+						icon:"none",
+						title:"请勿重复发送"
+					})
+				}
+				
+			},
+			
+			
+			repassword(){
+				if(this.vcode == ''){
+					uni.showToast({
+						icon:'none',
+						title:'请填写验证码'
+					})
+					return
+				}
+				
+				if(this.password == '' || this.copypassword == ''){
+					uni.showToast({
+						icon:'none',
+						title:'请填写完整信息'
+					})
+					return
+				}
+				
+				if(this.password !== this.copypassword){
+					uni.showToast({
+						icon:'none',
+						title:'两次密码输入不一致'
+					})
+					return
+				}
+				
+				if( !testPassword.test(this.password) ){
+					uni.showToast({
+						icon:'none',
+						title:'密码必须包含大写字母、小写字母、数字和特殊符号且长度在8位至16位之间'
+					})
+					return
+				}
+				
+				this.$api.user_repassword({
+					mobile:this.mobile,
+					vcode:this.vcode,
+					password:this.password
+				}).then((res)=>{
+					console.log(res)
+					
+					if(res.data.code == 4002){
+						uni.showToast({
+							icon:'none',
+							title:"验证码超时或者错误"
+						})
+						return
+					}else{
+						uni.setStorageSync('login_password',this.password)
+						
+						uni.showToast({
+							icon:'none',
+							title:'密码修改成功'
+						})
+						this.send_text = "发送验证码"
+						
+						setTimeout(function(){
+							uni.switchTab({
+								url:"../../tabbar/my/my"
+							})
+						},1000)
+					}
+				})
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		box-sizing: border-box;
+		padding: 25rpx;
+		background-color: #f0f0f0;
+	}
+	.content{
+		width: 700rpx;
+		.input_box{
+			margin-bottom: 10px;
+			padding: 0 25px;
+			background-color: #fff;
+			input{
+				height: 45px;
+				color: #333;
+			}
+			
+		}
+		.send_box{
+			display: flex;
+			justify-content: space-between;
+			margin-bottom: 10px;
+			.send_code{
+				width: 380rpx;
+				padding: 0 25px;
+				background-color: #fff;
+				input{
+					height: 45px;
+					color: #333;
+				}
+				
+			}
+			.send_btn{
+				width: 200rpx;
+				background-color: #009FE8;
+				text-align: center;
+				color: #fff;
+				line-height: 45px;
+			}
+		}
+		.re_btn{
+			background-color: #009FE8;
+			text-align: center;
+			color: #fff;
+			line-height: 45px;
+		}
+	}
+</style>

+ 179 - 0
pages/my/setPhone/setPhone.vue

@@ -0,0 +1,179 @@
+<template>
+	<view>
+		<view class="content">
+			<view class="input_box">
+				<input type="text" v-model="mobile" placeholder="请输入手机号" placeholder-style="color:#999;"/>
+			</view>
+			<view class="send_box">
+				<view class="send_code">
+					<input type="text" v-model="vcode" placeholder="验证码" placeholder-style="color:#999;"/>
+				</view>
+				
+				<view class="send_btn" @click="send_vcode()">
+					{{send_text}}
+				</view>
+			</view>
+			<view class="re_btn" @click="bang_phone()">
+				绑定
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				mobile:'',
+				vcode:'',
+				send_text:'发送验证码'
+			};
+		},
+		methods:{
+			send_vcode(){
+				if(this.mobile.length < 11){
+					uni.showToast({
+						icon:'none',
+						title:'请填写正确的手机号'
+					})
+					return
+				}
+				
+				if(this.send_text = "发送验证码"){
+					this.$api.sms_vcode({
+						mobile:this.mobile
+					}).then((res)=>{
+						
+						console.log(res.data)
+						
+						if(res.data.code == 3001){
+							uni.showToast({
+								icon:"none",
+								title:"电话号码错误"
+							})
+						}else if(res.data.code == 3002){
+							uni.showToast({
+								icon:"none",
+								title:"发送失败"
+							})
+						}else if(res.data.code == 0){
+							uni.showToast({
+								icon:"none",
+								title:"验证码发送成功"
+							})
+						}
+					})
+				}
+				
+				this.send_text = "已发送"
+				if(this.send_text = "已发送"){
+					uni.showToast({
+						icon:"none",
+						title:"请勿重复发送"
+					})
+				}
+				
+			},
+			bang_phone(){
+				
+				if(this.mobile == ''){
+					uni.showToast({
+						icon:'none',
+						title:'手机号不能为空'
+					})
+					return
+				}
+				
+				if(this.vcode == ''){
+					uni.showToast({
+						icon:'none',
+						title:'验证码不能为空'
+					})
+					return
+				}
+				
+				this.$api.user_mobile_set({
+					mobile:this.mobile,
+					vcode:this.vcode
+				}).then((res)=>{
+					console.log(res)
+					console.log(res.data.data.mobile)
+					
+					if(res.data.code == 4002){
+						uni.showToast({
+							icon:'none',
+							title:"验证码超时或者错误"
+						})
+						return
+					}else{
+						uni.setStorageSync('mobile', res.data.data.mobile)
+						
+						uni.showToast({
+							icon:'none',
+							title:'手机绑定成功'
+						})
+						this.send_text = "发送验证码"
+					}
+					
+					setTimeout(function(){
+						uni.switchTab({
+							url:"../../tabbar/my/my",
+						})
+					},1000)
+				})
+				
+			},
+		},
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #f0f0f0;
+	}
+	.content{
+		padding: 21rpx 30rpx 0;
+		.input_box{
+			margin-bottom: 20rpx;
+			padding: 20rpx 25rpx;
+			background-color: #fff;
+			input{
+				height: 60rpx;
+				font-size: 34rpx;
+				color: #333;
+			}
+			
+		}
+		.send_box{
+			display: flex;
+			justify-content: space-between;
+			margin-bottom: 20rpx;
+			.send_code{
+				width: 400rpx;
+				padding: 20rpx 25rpx;
+				background-color: #fff;
+				input{
+					height: 60rpx;
+					font-size: 34rpx;
+					color: #333;
+				}
+				
+			}
+			.send_btn{
+				width: 200rpx;
+				background-color: #009FE8;
+				text-align: center;
+				color: #fff;
+				font-size: 34rpx;
+				line-height: 100rpx;
+			}
+		}
+		.re_btn{
+			background-color: #009FE8;
+			text-align: center;
+			color: #fff;
+			font-size: 34rpx;
+			line-height: 100rpx;
+		}
+	}
+</style>

+ 25 - 3
pages/ningdongyunying/personnel_orientation/personnel_orientation.vue

@@ -1,9 +1,9 @@
 <template>
 	<view class="content">
 
-	<!-- 	<view class="charts-box">
-			<qiun-data-charts type="ring" :chartData="chartData" background="none" />
-		</view> -->
+		<view class="charts-box">
+			<qiun-data-charts type="ring" :opts="ring_1" :chartData="chartData" background="none" />
+		</view>
 
 		<view class="list">
 			<view class="item" v-for="item in 3">
@@ -61,6 +61,28 @@
 						]
 					}]
 				},
+				ring_1: {
+					"dataLabel": false,
+					"legend": {
+						"position": "bottom",
+					},
+					"title": {
+						"name": "下矿总人数",
+						"color": "#555",
+					},
+					"subtitle": {
+						"name": "3515人",
+						"color": "#333",
+					},
+					"extra": {
+						"ring": {
+							"centerColor": "#F1F1F1",
+							"border": false,
+						},
+
+					}
+				}
+
 			};
 		}
 	}

+ 100 - 0
pages/ningdongyunying/risk_precontrol/detail/detail.vue

@@ -0,0 +1,100 @@
+<template>
+	<view class="content">
+		<view class="item" v-for="item in 3">
+			<view class="title">
+				<view class="left">队部</view>
+				<view class="right">扣分:0.03</view>
+			</view>
+			<view class="time">
+				<view class="icon"></view>
+				<view class="text">2021-03-01 08:47:40</view>
+			</view>
+			<view class="inner">
+				<view class="item">
+					<view class="label">问题描述:</view>
+					<view class="text">在训练时,没有提前检查装备,不能确保完好。</view>
+				</view>
+				<view class="item">
+					<view class="label">解决建议:</view>
+					<view class="text">在训练时,没有提前检查装备,确保装备完好。</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #F1F1F1;
+	}
+	.content{
+		width: 749rpx;
+		
+		box-sizing: border-box;
+		padding: 24rpx;
+	}
+	.item{
+		margin-bottom: 20rpx;
+		background-color: #FFFFFF;
+		border-radius: 8px;
+		overflow: hidden;
+		
+		.title{
+			line-height: 80rpx;
+			border-left: 8rpx solid #E54E3A;
+			border-bottom: 1px solid #eee;
+			
+			display: flex;
+			justify-content: space-between;
+			.left{
+				padding-left: 20rpx;
+			}
+			.right{
+				margin-right: 20rpx;
+				color: #BE5853;
+			}
+		}
+		.time{
+			height: 80rpx;
+			display: flex;
+			align-items: center;
+			
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			.icon{
+				width: 40rpx;
+				height: 40rpx;
+				background-image: url(./icon/time.png);
+				background-size: cover;
+				background-repeat: no-repeat;
+			}
+			.text{
+				margin-left: 10rpx;
+			}
+		}
+		.inner{
+			width: 700rpx;
+			box-sizing: border-box;
+			padding: 0 20rpx 40rpx;
+			.item{
+				display: flex;
+				.label{
+					width: 220rpx;
+				}
+				.text{
+					width: 480rpx;
+				}
+			}
+		}
+	}
+</style>

BIN
pages/ningdongyunying/risk_precontrol/detail/icon/time.png


+ 180 - 0
pages/ningdongyunying/risk_precontrol/risk_precontrol.vue

@@ -0,0 +1,180 @@
+<template>
+	<view class="content">
+		<view class="list">
+			<view class="item" v-for="item in 6" @click="open_draw()">
+				<view class="inner">
+					<view class="left">
+						<view class="name">汝其沟无烟煤分公司</view>
+						<view class="text">5条隐患信息</view>
+					</view>
+					<view class="right">
+						<view class="num">0.5分</view>
+						<view class="icon">
+							<uni-icons type="arrowright"></uni-icons>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+
+		<!-- 弹出层 -->
+		<uni-drawer ref="draw" mode="right" :width="300">
+			<view class="drawer">
+				<view class="title">汝其沟无烟煤分公司</view>
+				<view class="container">
+					<view class="item" v-for="item in 4" @click="go_detail()">
+						<view class="inner">
+							<view class="left">
+								<view class="name">白芨沟矿山救护队</view>
+								<view class="text">3条隐患信息</view>
+							</view>
+							<view class="right">
+								<view class="num">0.45分</view>
+								<view class="icon">
+									<uni-icons type="arrowright"></uni-icons>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</uni-drawer>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			};
+		},
+		methods: {
+			open_draw() {
+				this.$refs.draw.open()
+			},
+			go_detail(){
+				uni.navigateTo({
+					url:"detail/detail"
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		width: 749rpx;
+	}
+
+	.list {
+		.item {
+			box-sizing: border-box;
+			padding: 20rpx 0;
+			padding-right: 30rpx;
+
+			border-bottom: 1px solid #eee;
+
+			.inner {
+				border-left: 12rpx solid #8BDAFF;
+
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				.left {
+					box-sizing: border-box;
+					padding-left: 30rpx;
+					line-height: 45rpx;
+
+					.name {}
+
+					.text {
+						font-size: 26rpx;
+						color: #999999;
+					}
+				}
+
+				.right {
+					display: flex;
+					align-items: center;
+
+					.num {
+						font-size: 26rpx;
+						color: #AC5158;
+					}
+
+					.icon {
+						margin-left: 4rpx;
+					}
+				}
+			}
+		}
+	}
+
+	.drawer {
+		width: 600rpx;
+
+		.title {
+			line-height: 87rpx;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			border-bottom: 1px solid #2E8EAA;
+		}
+
+		.container {
+			width: 600rpx;
+
+			.item {
+				box-sizing: border-box;
+				padding: 20rpx 0;
+				padding-right: 30rpx;
+
+				border-bottom: 1px solid #eee;
+
+				.inner {
+					border-left: 12rpx solid #8BDAFF;
+
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.left {
+						box-sizing: border-box;
+						padding-left: 30rpx;
+						line-height: 45rpx;
+
+						width: 390rpx;
+
+						.name {
+							width: 390rpx;
+							white-space: nowrap;
+							overflow: hidden;
+							text-overflow: ellipsis;
+						}
+
+						.text {
+							font-size: 26rpx;
+							color: #999999;
+						}
+					}
+
+					.right {
+						display: flex;
+						align-items: center;
+
+						.num {
+							font-size: 26rpx;
+							color: #AC5158;
+						}
+
+						.icon {
+							margin-left: 4rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 46 - 3
pages/ningdongyunying/safety_monitoring/safety_monitoring.vue

@@ -1,6 +1,21 @@
 <template>
-	<view>
+	<view class="content">
+		<view class="canva">
+			<!-- <n-safety-monitoring-canva-1></n-safety-monitoring-canva-1> -->
+		</view>
+		<view class="canva">
+			<!-- <n-safety-monitoring-canva-2></n-safety-monitoring-canva-2> -->
+		</view>
+		<view class="canva">
+			<!-- <n-safety-monitoring-canva-3></n-safety-monitoring-canva-3> -->
+		</view>
+		<view class="canva">
+			<!-- <n-safety-monitoring-canva-4></n-safety-monitoring-canva-4> -->
+		</view>
 		
+		<n-safety-monitoring-tab @code="get_code"></n-safety-monitoring-tab>
+		
+		<!-- <n-safety-monitoring-alarming :page="page" :code="mine_code"></n-safety-monitoring-alarming> -->
 	</view>
 </template>
 
@@ -8,12 +23,40 @@
 	export default {
 		data() {
 			return {
-				
+				// 当前煤矿编码
+				mine_code:0,
+				// 当前页
+				page:1,
 			};
+		},
+		onReachBottom(){
+			this.page = this.page + 1
+		},
+		methods:{
+			get_code(code){
+				// 切换煤矿
+				// console.log(code)
+				this.mine_code = code
+				// 每次切换煤矿都让当前页初始化
+				this.page = 1
+				
+			}
 		}
 	}
 </script>
 
 <style lang="scss">
-
+	.content{
+		width: 749rpx;
+		
+		box-sizing: border-box;
+		// padding: 10rpx 24rpx;
+	}
+	// .canva{
+	// 	min-height: 100rpx;
+	// 	box-sizing: border-box;
+	// 	padding: 24rpx;
+	// }
+	
+	
 </style>

+ 1 - 0
pages/production/personnel_orientation/personnel_orientation.vue

@@ -66,6 +66,7 @@
 			}
 		},
 		onLoad(option) {
+			console.log(option.mine)
 			// 矿编码
 			this.mine = option.mine
 			

+ 1 - 0
pages/production/personnel_orientation/search/search.vue

@@ -129,6 +129,7 @@
 				this.$refs.popup.open('center')
 					
 				this.$p_api.personnel_people_info({
+					mine:this.mine,
 					people_id:people_id
 				}).then((res)=>{
 					console.log(res.data.data)

+ 22 - 0
pages/production/video_monitor/video_monitor.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		<web-view :src="href"></web-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				href:""
+			};
+		},
+		onLoad(option) {
+			this.href = "http://webdevelop.nxjiewei.com/assets/html/video/?mine_code=" + option.mine_code
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 22 - 0
pages/production/zidonghua/zidonghua.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		<web-view :src="href"></web-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				href:""
+			};
+		},
+		onLoad(option) {
+			this.href = option.url
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 34 - 6
pages/tabbar/index/index.vue

@@ -1,7 +1,17 @@
 <template>
 	<view>
-		
-		
+		<t-i-navbar></t-i-navbar>
+		<!-- notice -->
+		<t-i-notice :base_url="base_url"></t-i-notice>
+		<!-- banner -->
+		<t-i-banner :base_url="base_url"></t-i-banner>
+		<!-- 固定入口 -->
+		<t-i-icon :base_url="base_url"></t-i-icon>
+		<!-- 常用功能 -->
+		<t-i-common></t-i-common>
+		<!-- 新闻列表 -->
+		<t-i-news :base_url="base_url"></t-i-news>
+
 	</view>
 </template>
 
@@ -9,19 +19,37 @@
 	export default {
 		data() {
 			return {
+				// 当前煤矿编码
+				mine_code: "",
 				
-				
+				// 首页接口的基础请求路径  默认为当前矿编码的基础路径
+				base_url: " "
+
 			}
 		},
 		onLoad() {
+			// 初始化当前煤矿编码
+			this.mine_code = uni.getStorageSync('mine_code')
 			
-		},
-		methods: {
 
+			// 根据矿编码切换首页接口不同的请求基础路径
+			switch (this.mine_code) {
+				case 'ningdongyunying':
+					this.base_url = "http://ningdongyunying.nxjiewei.com:8011/api"
+					break;
+				case 'meihuajing':
+					this.base_url = "http://meihuajing.nxjiewei.com:8011/api"
+					break;
+				default:
+					this.base_url = ""
+			}
 		}
+
 	}
 </script>
 
 <style lang="scss">
-	
+	page {
+		background-color: #F6FAF6;
+	}
 </style>

+ 28 - 1
pages/tabbar/my/my.vue

@@ -1,6 +1,13 @@
 <template>
 	<view>
+		<!-- 基本信息 -->
+		<view class="top_bg"></view>
+		<t-m-info></t-m-info>
 		
+		<!-- t-m-icon -->
+		<t-m-icon></t-m-icon>
+		
+		<t-m-list></t-m-list>
 	</view>
 </template>
 
@@ -10,10 +17,30 @@
 			return {
 				
 			};
+		},
+		onLoad() {
+			// 判断会否登录、没有则跳转至登录页
+			const Authorization = uni.getStorageSync('Authorization')
+			if (Authorization == '') {
+			
+				uni.showToast({
+					icon: "none",
+					title: "用户未登录"
+				})
+			
+				setTimeout(function() {
+					uni.redirectTo({
+						url: "../../login/login"
+					})
+				}, 1000)
+			}
 		}
 	}
 </script>
 
 <style lang="scss">
-
+	.top_bg {
+		height: 60px;
+		background: #009FE8;
+	}
 </style>

pages/tabbar/contacts/contacts.vue → pages/tabbar/origanization/origanization.vue


BIN
static/font/FangZhengDaBiaoSongJianTi-1.ttf


BIN
static/login.png


BIN
static/logo.png


BIN
static/tabbar/home.png


BIN
static/tabbar/home_active.png


BIN
static/tabbar/my.png


BIN
static/tabbar/my_active.png


BIN
static/tabbar/news.png


BIN
static/tabbar/news_active.png


BIN
static/tabbar/origanization.png


BIN
static/tabbar/origanization_active.png


BIN
static/tabbar/production.png


BIN
static/tabbar/production_active.png


BIN
static/tabbar/work.png


BIN
static/tabbar/work_active.png


+ 7 - 0
uni.scss

@@ -14,6 +14,13 @@
 
 /* 颜色变量 */
 
+
+
+
+// 统一字体格式
+$tdw-base-font: my-fzdbsjt;
+
+
 /* 行为相关颜色 */
 $uni-color-primary: #007aff;
 $uni-color-success: #4cd964;

+ 13 - 0
uni_modules/uni-drawer/changelog.md

@@ -0,0 +1,13 @@
+## 1.2.1(2021-11-22)
+- 修复 vue3中个别scss变量无法找到的问题
+## 1.2.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-drawer](https://uniapp.dcloud.io/component/uniui/uni-drawer)
+## 1.1.1(2021-07-30)
+- 优化 vue3下事件警告的问题
+## 1.1.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.0.7(2021-05-12)
+- 新增 组件示例地址
+## 1.0.6(2021-02-04)
+- 调整为uni_modules目录规范

+ 45 - 0
uni_modules/uni-drawer/components/uni-drawer/keypress.js

@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+  name: 'Keypress',
+  props: {
+    disable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted () {
+    const keyNames = {
+      esc: ['Esc', 'Escape'],
+      tab: 'Tab',
+      enter: 'Enter',
+      space: [' ', 'Spacebar'],
+      up: ['Up', 'ArrowUp'],
+      left: ['Left', 'ArrowLeft'],
+      right: ['Right', 'ArrowRight'],
+      down: ['Down', 'ArrowDown'],
+      delete: ['Backspace', 'Delete', 'Del']
+    }
+    const listener = ($event) => {
+      if (this.disable) {
+        return
+      }
+      const keyName = Object.keys(keyNames).find(key => {
+        const keyName = $event.key
+        const value = keyNames[key]
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
+      })
+      if (keyName) {
+        // 避免和其他按键事件冲突
+        setTimeout(() => {
+          this.$emit(keyName, {})
+        }, 0)
+      }
+    }
+    document.addEventListener('keyup', listener)
+    // this.$once('hook:beforeDestroy', () => {
+    //   document.removeEventListener('keyup', listener)
+    // })
+  },
+	render: () => {}
+}
+// #endif

+ 183 - 0
uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue

@@ -0,0 +1,183 @@
+<template>
+	<view v-if="visibleSync" :class="{ 'uni-drawer--visible': showDrawer }" class="uni-drawer" @touchmove.stop.prevent="clear">
+		<view class="uni-drawer__mask" :class="{ 'uni-drawer__mask--visible': showDrawer && mask }" @tap="close('mask')" />
+		<view class="uni-drawer__content" :class="{'uni-drawer--right': rightMode,'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer}" :style="{width:drawerWidth+'px'}">
+			<slot />
+		</view>
+		<!-- #ifdef H5 -->
+		<keypress @esc="close('mask')" />
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	// #ifdef H5
+	import keypress from './keypress.js'
+	// #endif
+	/**
+	 * Drawer 抽屉
+	 * @description 抽屉侧滑菜单
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=26
+	 * @property {Boolean} mask = [true | false] 是否显示遮罩
+	 * @property {Boolean} maskClick = [true | false] 点击遮罩是否关闭
+	 * @property {Boolean} mode = [left | right] Drawer 滑出位置
+	 * 	@value left 从左侧滑出
+	 * 	@value right 从右侧侧滑出
+	 * @property {Number} width 抽屉的宽度 ,仅 vue 页面生效
+	 * @event {Function} close 组件关闭时触发事件
+	 */
+	export default {
+		name: 'UniDrawer',
+		components: {
+			// #ifdef H5
+			keypress
+			// #endif
+		},
+		emits:['change'],
+		props: {
+			/**
+			 * 显示模式(左、右),只在初始化生效
+			 */
+			mode: {
+				type: String,
+				default: ''
+			},
+			/**
+			 * 蒙层显示状态
+			 */
+			mask: {
+				type: Boolean,
+				default: true
+			},
+			/**
+			 * 遮罩是否可点击关闭
+			 */
+			maskClick:{
+				type: Boolean,
+				default: true
+			},
+			/**
+			 * 抽屉宽度
+			 */
+			width: {
+				type: Number,
+				default: 220
+			}
+		},
+		data() {
+			return {
+				visibleSync: false,
+				showDrawer: false,
+				rightMode: false,
+				watchTimer: null,
+				drawerWidth: 220
+			}
+		},
+		created() {
+			// #ifndef APP-NVUE
+			this.drawerWidth = this.width
+			// #endif
+			this.rightMode = this.mode === 'right'
+		},
+		methods: {
+			clear(){},
+			close(type) {
+				// fixed by mehaotian 抽屉尚未完全关闭或遮罩禁止点击时不触发以下逻辑
+				if((type === 'mask' && !this.maskClick) || !this.visibleSync) return
+				this._change('showDrawer', 'visibleSync', false)
+			},
+			open() {
+				// fixed by mehaotian 处理重复点击打开的事件
+				if(this.visibleSync) return
+				this._change('visibleSync', 'showDrawer', true)
+			},
+			_change(param1, param2, status) {
+				this[param1] = status
+				if (this.watchTimer) {
+					clearTimeout(this.watchTimer)
+				}
+				this.watchTimer = setTimeout(() => {
+					this[param2] = status
+					this.$emit('change',status)
+				}, status ? 50 : 300)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	$uni-mask: rgba($color: #000000, $alpha: 0.4) ;
+	// 抽屉宽度
+	$drawer-width: 220px;
+
+	.uni-drawer {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		overflow: hidden;
+		z-index: 999;
+	}
+
+	.uni-drawer__content {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: absolute;
+		top: 0;
+		width: $drawer-width;
+		bottom: 0;
+		background-color: $uni-bg-color;
+		transition: transform 0.3s ease;
+	}
+
+	.uni-drawer--left {
+		left: 0;
+		/* #ifdef APP-NVUE */
+		transform: translateX(-$drawer-width);
+		/* #endif */
+		/* #ifndef APP-NVUE */
+		transform: translateX(-100%);
+		/* #endif */
+	}
+
+	.uni-drawer--right {
+		right: 0;
+		/* #ifdef APP-NVUE */
+		transform: translateX($drawer-width);
+		/* #endif */
+		/* #ifndef APP-NVUE */
+		transform: translateX(100%);
+		/* #endif */
+	}
+
+	.uni-drawer__content--visible {
+		transform: translateX(0px);
+	}
+
+
+	.uni-drawer__mask {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		opacity: 0;
+		position: absolute;
+		top: 0;
+		left: 0;
+		bottom: 0;
+		right: 0;
+		background-color: $uni-mask;
+		transition: opacity 0.3s;
+	}
+
+	.uni-drawer__mask--visible {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		opacity: 1;
+	}
+</style>

+ 87 - 0
uni_modules/uni-drawer/package.json

@@ -0,0 +1,87 @@
+{
+  "id": "uni-drawer",
+  "displayName": "uni-drawer 抽屉",
+  "version": "1.2.1",
+  "description": "抽屉式导航,用于展示侧滑菜单,侧滑导航。",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "drawer",
+    "抽屉",
+    "侧滑导航"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-scss"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 10 - 0
uni_modules/uni-drawer/readme.md

@@ -0,0 +1,10 @@
+
+
+## Drawer 抽屉
+> **组件名:uni-drawer**
+> 代码块: `uDrawer`
+
+抽屉侧滑菜单。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-drawer)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 16 - 0
uni_modules/uni-notice-bar/changelog.md

@@ -0,0 +1,16 @@
+## 1.2.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-notice-bar](https://uniapp.dcloud.io/component/uniui/uni-notice-bar)
+## 1.1.1(2021-11-09) 
+- 新增 提供组件设计资源,组件样式调整
+## 1.1.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.0.9(2021-05-12)
+- 新增 组件示例地址
+## 1.0.8(2021-04-21)
+- 优化 添加依赖 uni-icons, 导入后自动下载依赖
+## 1.0.7(2021-02-05)
+- 优化 组件引用关系,通过uni_modules引用组件
+
+## 1.0.6(2021-02-05)
+- 调整为uni_modules目录规范

+ 395 - 0
uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.vue

@@ -0,0 +1,395 @@
+<template>
+	<view v-if="show" class="uni-noticebar" :style="{ backgroundColor: backgroundColor }" @click="onClick">
+		<uni-icons v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon" type="sound"
+			:color="color" size="22" />
+		<view ref="textBox" class="uni-noticebar__content-wrapper"
+			:class="{'uni-noticebar__content-wrapper--scrollable':scrollable, 'uni-noticebar__content-wrapper--single':!scrollable && (single || moreText)}">
+			<view :id="elIdBox" class="uni-noticebar__content"
+				:class="{'uni-noticebar__content--scrollable':scrollable, 'uni-noticebar__content--single':!scrollable && (single || moreText)}">
+				<text :id="elId" ref="animationEle" class="uni-noticebar__content-text"
+					:class="{'uni-noticebar__content-text--scrollable':scrollable,'uni-noticebar__content-text--single':!scrollable && (single || showGetMore)}"
+					:style="{color:color, width:wrapWidth+'px', 'animationDuration': animationDuration, '-webkit-animationDuration': animationDuration ,animationPlayState: webviewHide?'paused':animationPlayState,'-webkit-animationPlayState':webviewHide?'paused':animationPlayState, animationDelay: animationDelay, '-webkit-animationDelay':animationDelay}">{{text}}</text>
+			</view>
+		</view>
+		<view v-if="showGetMore === true || showGetMore === 'true'" class="uni-noticebar__more uni-cursor-point"
+			@click="clickMore">
+			<text v-if="moreText.length > 0" :style="{ color: moreColor }" class="uni-noticebar__more-text">{{ moreText }}</text>
+			<uni-icons v-else type="right" :color="moreColor" size="16" />
+		</view>
+		<view class="uni-noticebar-close uni-cursor-point" v-if="(showClose === true || showClose === 'true') && (showGetMore === false || showGetMore === 'false')">
+			<uni-icons
+				type="closeempty" :color="color" size="16" @click="close" />
+		</view>
+	</view>
+</template>
+
+<script>
+	// #ifdef APP-NVUE
+	const dom = weex.requireModule('dom');
+	const animation = weex.requireModule('animation');
+	// #endif
+
+	/**
+	 * NoticeBar 自定义导航栏
+	 * @description 通告栏组件
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=30
+	 * @property {Number} speed 文字滚动的速度,默认100px/秒
+	 * @property {String} text 显示文字
+	 * @property {String} backgroundColor 背景颜色
+	 * @property {String} color 文字颜色
+	 * @property {String} moreColor 查看更多文字的颜色
+	 * @property {String} moreText 设置“查看更多”的文本
+	 * @property {Boolean} single = [true|false] 是否单行
+	 * @property {Boolean} scrollable = [true|false] 是否滚动,为true时,NoticeBar为单行
+	 * @property {Boolean} showIcon = [true|false] 是否显示左侧喇叭图标
+	 * @property {Boolean} showClose = [true|false] 是否显示左侧关闭按钮
+	 * @property {Boolean} showGetMore = [true|false] 是否显示右侧查看更多图标,为true时,NoticeBar为单行
+	 * @event {Function} click 点击 NoticeBar 触发事件
+	 * @event {Function} close 关闭 NoticeBar 触发事件
+	 * @event {Function} getmore 点击”查看更多“时触发事件
+	 */
+
+	export default {
+		name: 'UniNoticeBar',
+		emits: ['click', 'getmore', 'close'],
+		props: {
+			text: {
+				type: String,
+				default: ''
+			},
+			moreText: {
+				type: String,
+				default: ''
+			},
+			backgroundColor: {
+				type: String,
+				default: '#FFF9EA'
+			},
+			speed: {
+				// 默认1s滚动100px
+				type: Number,
+				default: 100
+			},
+			color: {
+				type: String,
+				default: '#FF9A43'
+			},
+			moreColor: {
+				type: String,
+				default: '#FF9A43'
+			},
+			single: {
+				// 是否单行
+				type: [Boolean, String],
+				default: false
+			},
+			scrollable: {
+				// 是否滚动,添加后控制单行效果取消
+				type: [Boolean, String],
+				default: false
+			},
+			showIcon: {
+				// 是否显示左侧icon
+				type: [Boolean, String],
+				default: false
+			},
+			showGetMore: {
+				// 是否显示右侧查看更多
+				type: [Boolean, String],
+				default: false
+			},
+			showClose: {
+				// 是否显示左侧关闭按钮
+				type: [Boolean, String],
+				default: false
+			}
+		},
+		data() {
+			const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
+			const elIdBox = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
+			return {
+				textWidth: 0,
+				boxWidth: 0,
+				wrapWidth: '',
+				webviewHide: false,
+				// #ifdef APP-NVUE
+				stopAnimation: false,
+				// #endif
+				elId: elId,
+				elIdBox: elIdBox,
+				show: true,
+				animationDuration: 'none',
+				animationPlayState: 'paused',
+				animationDelay: '0s'
+			}
+		},
+		mounted() {
+			// #ifdef APP-PLUS
+			var pages = getCurrentPages();
+			var page = pages[pages.length - 1];
+			var currentWebview = page.$getAppWebview();
+			currentWebview.addEventListener('hide', () => {
+				this.webviewHide = true
+			})
+			currentWebview.addEventListener('show', () => {
+				this.webviewHide = false
+			})
+			// #endif
+			this.$nextTick(() => {
+				this.initSize()
+			})
+		},
+		// #ifdef APP-NVUE
+		beforeDestroy() {
+			this.stopAnimation = true
+		},
+		// #endif
+		methods: {
+			initSize() {
+				if (this.scrollable) {
+					// #ifndef APP-NVUE
+					let query = [],
+						boxWidth = 0,
+						textWidth = 0;
+					let textQuery = new Promise((resolve, reject) => {
+						uni.createSelectorQuery()
+							// #ifndef MP-ALIPAY
+							.in(this)
+							// #endif
+							.select(`#${this.elId}`)
+							.boundingClientRect()
+							.exec(ret => {
+								this.textWidth = ret[0].width
+								resolve()
+							})
+					})
+					let boxQuery = new Promise((resolve, reject) => {
+						uni.createSelectorQuery()
+							// #ifndef MP-ALIPAY
+							.in(this)
+							// #endif
+							.select(`#${this.elIdBox}`)
+							.boundingClientRect()
+							.exec(ret => {
+								this.boxWidth = ret[0].width
+								resolve()
+							})
+					})
+					query.push(textQuery)
+					query.push(boxQuery)
+					Promise.all(query).then(() => {
+						this.animationDuration = `${this.textWidth / this.speed}s`
+						this.animationDelay = `-${this.boxWidth / this.speed}s`
+						setTimeout(() => {
+							this.animationPlayState = 'running'
+						}, 1000)
+					})
+					// #endif
+					// #ifdef APP-NVUE
+					dom.getComponentRect(this.$refs['animationEle'], (res) => {
+						let winWidth = uni.getSystemInfoSync().windowWidth
+						this.textWidth = res.size.width
+						animation.transition(this.$refs['animationEle'], {
+							styles: {
+								transform: `translateX(-${winWidth}px)`
+							},
+							duration: 0,
+							timingFunction: 'linear',
+							delay: 0
+						}, () => {
+							if (!this.stopAnimation) {
+								animation.transition(this.$refs['animationEle'], {
+									styles: {
+										transform: `translateX(-${this.textWidth}px)`
+									},
+									timingFunction: 'linear',
+									duration: (this.textWidth - winWidth) / this.speed * 1000,
+									delay: 1000
+								}, () => {
+									if (!this.stopAnimation) {
+										this.loopAnimation()
+									}
+								});
+							}
+						});
+					})
+					// #endif
+				}
+				// #ifdef APP-NVUE
+				if (!this.scrollable && (this.single || this.moreText)) {
+					dom.getComponentRect(this.$refs['textBox'], (res) => {
+						this.wrapWidth = res.size.width
+					})
+				}
+				// #endif
+			},
+			loopAnimation() {
+				// #ifdef APP-NVUE
+				animation.transition(this.$refs['animationEle'], {
+					styles: {
+						transform: `translateX(0px)`
+					},
+					duration: 0
+				}, () => {
+					if (!this.stopAnimation) {
+						animation.transition(this.$refs['animationEle'], {
+							styles: {
+								transform: `translateX(-${this.textWidth}px)`
+							},
+							duration: this.textWidth / this.speed * 1000,
+							timingFunction: 'linear',
+							delay: 0
+						}, () => {
+							if (!this.stopAnimation) {
+								this.loopAnimation()
+							}
+						});
+					}
+				});
+				// #endif
+			},
+			clickMore() {
+				this.$emit('getmore')
+			},
+			close() {
+				this.show = false;
+				this.$emit('close')
+			},
+			onClick() {
+				this.$emit('click')
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.uni-noticebar {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		width: 100%;
+		box-sizing: border-box;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		padding: 10px 12px;
+		margin-bottom: 10px;
+	}
+
+	.uni-cursor-point {
+		/* #ifdef H5 */
+		cursor: pointer;
+		/* #endif */
+	}
+
+	.uni-noticebar-close {
+		margin-left: 8px;
+		margin-right: 5px;
+	}
+
+	.uni-noticebar-icon {
+		margin-right: 5px;
+	}
+
+	.uni-noticebar__content-wrapper {
+		flex: 1;
+		flex-direction: column;
+		overflow: hidden;
+	}
+
+	.uni-noticebar__content-wrapper--single {
+		/* #ifndef APP-NVUE */
+		line-height: 18px;
+		/* #endif */
+	}
+
+	.uni-noticebar__content-wrapper--single,
+	.uni-noticebar__content-wrapper--scrollable {
+		flex-direction: row;
+	}
+
+	/* #ifndef APP-NVUE */
+	.uni-noticebar__content-wrapper--scrollable {
+		position: relative;
+		height: 18px;
+	}
+
+	/* #endif */
+
+	.uni-noticebar__content--scrollable {
+		/* #ifdef APP-NVUE */
+		flex: 0;
+		/* #endif */
+		/* #ifndef APP-NVUE */
+		flex: 1;
+		display: block;
+		overflow: hidden;
+		/* #endif */
+	}
+
+	.uni-noticebar__content--single {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		flex: none;
+		width: 100%;
+		justify-content: center;
+		/* #endif */
+	}
+
+	.uni-noticebar__content-text {
+		font-size: 14px;
+		line-height: 18px;
+		/* #ifndef APP-NVUE */
+		word-break: break-all;
+		/* #endif */
+	}
+
+	.uni-noticebar__content-text--single {
+		/* #ifdef APP-NVUE */
+		lines: 1;
+		/* #endif */
+		/* #ifndef APP-NVUE */
+		display: block;
+		width: 100%;
+		white-space: nowrap;
+		/* #endif */
+		overflow: hidden;
+		text-overflow: ellipsis;
+	}
+
+	.uni-noticebar__content-text--scrollable {
+		/* #ifdef APP-NVUE */
+		lines: 1;
+		padding-left: 750rpx;
+		/* #endif */
+		/* #ifndef APP-NVUE */
+		position: absolute;
+		display: block;
+		height: 18px;
+		line-height: 18px;
+		white-space: nowrap;
+		padding-left: 100%;
+		animation: notice 10s 0s linear infinite both;
+		animation-play-state: paused;
+		/* #endif */
+	}
+
+	.uni-noticebar__more {
+		/* #ifndef APP-NVUE */
+		display: inline-flex;
+		/* #endif */
+		flex-direction: row;
+		flex-wrap: nowrap;
+		align-items: center;
+		padding-left: 5px;
+	}
+
+	.uni-noticebar__more-text {
+		font-size: 14px;
+	}
+
+	@keyframes notice {
+		100% {
+			transform: translate3d(-100%, 0, 0);
+		}
+	}
+</style>

+ 90 - 0
uni_modules/uni-notice-bar/package.json

@@ -0,0 +1,90 @@
+{
+  "id": "uni-notice-bar",
+  "displayName": "uni-notice-bar 通告栏",
+  "version": "1.2.0",
+  "description": "NoticeBar 通告栏组件,常用于展示公告信息,可设为滚动公告",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "通告栏",
+    "公告",
+    "跑马灯"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [
+			"uni-scss",
+			"uni-icons"
+		],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 0 - 0
uni_modules/uni-notice-bar/readme.md


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels