ソースを参照

智慧枣泉(新) 2.0.16

tiandewen 1 年間 前
コミット
cf56d50f3a
100 ファイル変更11444 行追加0 行削除
  1. BIN
      .DS_Store
  2. 20 0
      .hbuilderx/launch.json
  3. 76 0
      App.vue
  4. 265 0
      common/common.js
  5. 8 0
      common/js-base64.js
  6. 18 0
      common/production-http/index.js
  7. 237 0
      common/production-http/interface.js
  8. 443 0
      common/production-http/production-api.js
  9. 198 0
      common/production-http/readme.md
  10. 149 0
      common/set_base_url.js
  11. 121 0
      common/time.js
  12. 1158 0
      common/vmeitime-http/api.js
  13. 18 0
      common/vmeitime-http/index.js
  14. 248 0
      common/vmeitime-http/interface.js
  15. 198 0
      common/vmeitime-http/readme.md
  16. BIN
      components/.DS_Store
  17. 242 0
      components/Toling-DateSelect/computedLunarDate.js
  18. 88 0
      components/e-browse/e-browse - 副本.vue
  19. 103 0
      components/e-browse/e-browse.vue
  20. 60 0
      components/e-equipment/e-equipment.vue
  21. 100 0
      components/e-file/e-file.vue
  22. BIN
      components/e-file/icon/wj-doc.png
  23. BIN
      components/e-file/icon/wj-jpg.png
  24. BIN
      components/e-file/icon/wj-pdf.png
  25. BIN
      components/e-file/icon/wj-png.png
  26. BIN
      components/e-file/icon/wj-ppt.png
  27. BIN
      components/e-file/icon/wj-txt.png
  28. BIN
      components/e-file/icon/wj-xls.png
  29. 47 0
      components/e-image-text/e-image-text.vue
  30. 605 0
      components/e-link/e-link.vue
  31. 121 0
      components/e-picture/e-picture.vue
  32. 113 0
      components/e-record/e-record.vue
  33. 38 0
      components/e-text/e-text.vue
  34. 64 0
      components/e-video/e-video - 视频列表副本.vue
  35. 77 0
      components/e-video/e-video.vue
  36. 245 0
      components/liuyuno-tabs/liuyuno-tabs.vue
  37. 210 0
      components/n-safety-monitoring-alarming/n-safety-monitoring-alarming.vue
  38. BIN
      components/n-safety-monitoring-canva-1/icon/icon_o.png
  39. 135 0
      components/n-safety-monitoring-canva-1/n-safety-monitoring-canva-1.vue
  40. BIN
      components/n-safety-monitoring-canva-2/icon/icon_o.png
  41. 155 0
      components/n-safety-monitoring-canva-2/n-safety-monitoring-canva-2.vue
  42. 161 0
      components/n-safety-monitoring-canva-3/n-safety-monitoring-canva-3.vue
  43. 123 0
      components/n-safety-monitoring-canva-4/n-safety-monitoring-canva-4.vue
  44. BIN
      components/n-safety-monitoring-tab/icon/Co1.png
  45. BIN
      components/n-safety-monitoring-tab/icon/feng.png
  46. BIN
      components/n-safety-monitoring-tab/icon/icon_o.png
  47. BIN
      components/n-safety-monitoring-tab/icon/icon_red.png
  48. BIN
      components/n-safety-monitoring-tab/icon/wasi.png
  49. 310 0
      components/n-safety-monitoring-tab/n-safety-monitoring-tab.vue
  50. 104 0
      components/navbar/navbar.vue
  51. 178 0
      components/ningmei-login-box/ningmei-login-box.vue
  52. BIN
      components/openingNotice/icon/icon.png
  53. 121 0
      components/openingNotice/openingNotice.vue
  54. BIN
      components/origanizationItem/icon/close.png
  55. BIN
      components/origanizationItem/icon/open.png
  56. BIN
      components/origanizationItem/icon/title_icon.png
  57. 241 0
      components/origanizationItem/origanizationItem.vue
  58. BIN
      components/origanizationSection/icon/close.png
  59. BIN
      components/origanizationSection/icon/open.png
  60. BIN
      components/origanizationSection/icon/title_icon.png
  61. 250 0
      components/origanizationSection/origanizationSection - 懒加载接口测试.vue
  62. 251 0
      components/origanizationSection/origanizationSection.vue
  63. BIN
      components/p-personnel-orientation-navbar/icon/search.png
  64. 114 0
      components/p-personnel-orientation-navbar/p-personnel-orientation-navbar.vue
  65. 161 0
      components/p-personnel-orientation-section-1/p-personnel-orientation-section-1.vue
  66. 47 0
      components/p-personnel-orientation-section-3/p-personnel-orientation-section-3.vue
  67. 72 0
      components/p-personnel-orientation-section-4/p-personnel-orientation-section-4.vue
  68. 314 0
      components/p-production-report-inner-1/p-production-report-inner-1.vue
  69. 626 0
      components/p-production-report-inner-2/p-production-report-inner-2.vue
  70. BIN
      components/p-production-report-inner-3/icon/icon.png
  71. 77 0
      components/p-production-report-inner-3/p-production-report-inner-3.vue
  72. 122 0
      components/p-production-statistics-section-1/p-production-statistics-section-1.vue
  73. 145 0
      components/p-production-statistics-section-2/p-production-statistics-section-2.vue
  74. 128 0
      components/p-production-statistics-section-3/p-production-statistics-section-3.vue
  75. 161 0
      components/p-production-statistics-section-4/p-production-statistics-section-4.vue
  76. 242 0
      components/p-safety-monitoring-content-1/p-safety-monitoring-content-1.vue
  77. 202 0
      components/p-safety-monitoring-content-2/p-safety-monitoring-content-2.vue
  78. BIN
      components/p-safety-monitoring-navbar/icon/search.png
  79. 116 0
      components/p-safety-monitoring-navbar/p-safety-monitoring-navbar.vue
  80. 171 0
      components/personnel-orientation-population-trend/personnel-orientation-population-trend.vue
  81. 91 0
      components/t-i-banner-2/t-i-banner-2.vue
  82. 118 0
      components/t-i-banner/t-i-banner - 标题与图片分离的备份.vue
  83. 125 0
      components/t-i-banner/t-i-banner.vue
  84. 193 0
      components/t-i-bottom/t-i-bottom-OA.vue
  85. 194 0
      components/t-i-bottom/t-i-bottom.vue
  86. BIN
      components/t-i-common/icon/01.png
  87. BIN
      components/t-i-common/icon/02.png
  88. BIN
      components/t-i-common/icon/03.png
  89. BIN
      components/t-i-common/icon/04.png
  90. BIN
      components/t-i-common/icon/05.png
  91. BIN
      components/t-i-common/icon/06.png
  92. BIN
      components/t-i-common/icon/07.png
  93. BIN
      components/t-i-common/icon/08.png
  94. 122 0
      components/t-i-common/t-i-common.vue
  95. 298 0
      components/t-i-ice/t-i-ice.vue
  96. BIN
      components/t-i-icon/icon/gaikuang.png
  97. 123 0
      components/t-i-icon/t-i-icon - 一行五个.vue
  98. 87 0
      components/t-i-icon/t-i-icon - 固定五个.vue
  99. 96 0
      components/t-i-icon/t-i-icon - 横向可滑动.vue
  100. 0 0
      components/t-i-icon/t-i-icon.vue

BIN
.DS_Store


+ 20 - 0
.hbuilderx/launch.json

@@ -0,0 +1,20 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version": "0.0",
+    "configurations": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"default" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"h5" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"type" : "uniCloud"
+     }
+    ]
+}

+ 76 - 0
App.vue

@@ -0,0 +1,76 @@
+<script>
+	import time from "@/common/time.js"
+	import {
+		set_base_url
+	} from '@/common/set_base_url.js'
+
+	export default {
+		onLaunch: function() {
+			console.log('App Launch')
+			// 启动初始化
+
+			// 煤矿鉴别-名称
+			// uni.setStorageSync('mine_code', 'ningmeijituan');
+			// uni.setStorageSync('mine_code', 'ningdongyunying');
+			// uni.setStorageSync('mine_code', 'shicaocun');
+			// uni.setStorageSync('mine_code', 'meihuajing');
+			uni.setStorageSync('mine_code', 'zaoquan');
+			// uni.setStorageSync('mine_code', 'qingshuiying');
+			// uni.setStorageSync('mine_code', 'wuyegongsi');
+			// uni.setStorageSync('mine_code', 'jinjiaqu');
+			// uni.setStorageSync('mine_code', 'jinjiaqu_neiwang');
+			// uni.setStorageSync('mine_code', 'yangchangwan');
+			// uni.setStorageSync('mine_code', 'jinfeng');
+			// uni.setStorageSync('mine_code', 'jinfeng_neiwang');
+			// uni.setStorageSync('mine_code', 'lingxin');
+			// uni.setStorageSync('mine_code', 'renjiazhuang');
+			// uni.setStorageSync('mine_code', 'renjiazhuang_neiwang');
+			
+			// console.log(set_base_url(uni.getStorageSync('mine_code')))
+			
+			// uni.setStorageSync('base_url',set_base_url(uni.getStorageSync('mine_code')))
+			
+			// 设置自动化系统接口内外网域名
+			if(uni.getStorageSync('mine_code').indexOf('_neiwang') == -1){
+				uni.setStorageSync('unified_automation_system_url','http://video.nxjiewei.com:8011/api')
+			}else{
+				uni.setStorageSync('unified_automation_system_url','http://n.video.nxjiewei.com:8011/api')
+			}
+		},
+		onShow: function() {
+			console.log('App Show')
+
+			uni.setStorageSync('onShow', new Date().format("yyyy-MM-dd h:m"))
+
+		},
+		onHide: function() {
+			console.log('App Hide')
+
+			this.$api.user_recordDuration({
+				start_date: uni.getStorageSync('onShow'),
+				end_date: new Date().format("yyyy-MM-dd h:m")
+			}).then((res) => {
+				// console.log(res)
+			})
+
+		}
+	}
+</script>
+
+<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>

+ 265 - 0
common/common.js

@@ -0,0 +1,265 @@
+export const goToLink = (item, mine_code) => {
+	console.log(item)
+
+	let link = item.link
+	// OA系统
+	if (link.indexOf("oa_system.nxjiewei.com") != -1) {
+		uni.navigateTo({
+			url: "../../origanization/OA/h5/h5",
+			success: (res) => {
+				// 通过eventChannel向被打开页面传送数据
+				res.eventChannel.emit('acceptDataFromOpenerPage', {
+					url: link,
+					title: item.title
+				})
+			}
+		})
+
+		return
+	}
+	
+	// 枣泉OA系统
+	if (link.indexOf("zq.oa.nxjiewei.com") != -1) {
+		uni.navigateTo({
+			url: "../../origanization/OA/h5/h5",
+			success: (res) => {
+				// 通过eventChannel向被打开页面传送数据
+				res.eventChannel.emit('acceptDataFromOpenerPage', {
+					url: link,
+					title: item.title
+				})
+			}
+		})
+	
+		return
+	}
+	
+	// 切换域名
+	if (link.indexOf("set_base_url") != -1) {
+		uni.$emit('common_update_kuang', {
+			msg: link.split('=')[1]
+		})
+		return
+	}
+	
+
+	// 二维码
+	if (link.indexOf("pageId") != -1 && link.indexOf("app:") == -1) {
+		let pageId = ""
+
+		function GetQueryString(name) {
+			var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+			var r = link.match(reg);
+			if (r != null) return unescape(r[2]);
+			return null;
+		}
+		console.log(GetQueryString("pageId"))
+		if (GetQueryString("pageId")) {
+			pageId = GetQueryString("pageId")
+		} else {
+			pageId = link.split('=')[1]
+		}
+
+		uni.navigateTo({
+			url: "../../index/record/record?pageId=" + pageId + "&mine_code=" + mine_code,
+		})
+
+		return
+	}
+
+	// h5
+	if (link.indexOf("pageId") == -1 && link.indexOf("app:") == -1) {
+		// #ifdef APP
+		if (plus.os.name == 'Android') {
+
+			if (link.indexOf("cmb.pb") != -1) {
+				plus.runtime.launchApplication({
+					pname: 'cmb.pb'
+				}, (e) => {
+					console.log('Open system default browser failed: ' + e.message)
+
+					uni.showToast({
+						icon: "none",
+						title: "未安装此应用"
+					})
+				})
+			} else if (link.indexOf("com.icbc") != -1) {
+				plus.runtime.launchApplication({
+					pname: 'com.icbc'
+				}, (e) => {
+					console.log('Open system default browser failed: ' + e.message)
+
+					uni.showToast({
+						icon: "none",
+						title: "未安装此应用"
+					})
+				})
+			} else if (link.indexOf("webdevelop.nxjiewei.com/assets/html/pingce") != -1) {
+				uni.navigateTo({
+					url: "../../index/h5/h5?url=jinjiaqu_pingce"
+				})
+			} else if (link.indexOf("/yinhuanpaicha/yinhuaninfo") != -1) {
+				uni.navigateTo({
+					url: "../../index/h5/h5?url=" + link
+				})
+			} else {
+				console.log("app:h5")
+				uni.navigateTo({
+					url: "../../index/h5/h5?url=" + link
+				})
+			}
+		}
+
+
+		// #endif
+
+		// #ifdef H5
+		if (link.indexOf("webdevelop.nxjiewei.com/assets/html/pingce") != -1) {
+			uni.navigateTo({
+				url: "../../index/h5/h5?url=jinjiaqu_pingce"
+			})
+		} else if (link.indexOf("/yinhuanpaicha/yinhuaninfo") != -1) {
+			uni.navigateTo({
+				url: "../../index/h5/h5?url=" + link
+			})
+		} else {
+			console.log("h5:h5")
+			uni.navigateTo({
+				url: "../../index/h5/h5?url=" + link
+			})
+		}
+		// #endif
+
+		return
+	}
+
+
+	// 原生
+	if (link.indexOf("pageId") == -1 && link.indexOf("app:") != -1) {
+		console.log("原生")
+		if (link.indexOf("/safetyManagementSystem/safetyManagementSystem") != -1) {
+			console.log("安全管理体系")
+			uni.navigateTo({
+				url: "../../index/safetyManagementSystem/safetyManagementSystem"
+			})
+		}
+		
+		if (link.indexOf("/browseQrcode/gridSubmitItem_win") != -1) {
+			console.log("网格排查")
+			uni.navigateTo({
+				url: "../../workbench/gridding/gridding"
+			})
+		}
+
+		if (link.indexOf("/wordorder/wordOrderGrid_win") != -1) {
+			console.log(link)
+			uni.navigateTo({
+				url: "../../index/business_approval/business_approval"
+			})
+		}
+
+		if (link.indexOf("app:/workBench/origanization") != -1) {
+			console.log("组织架构、通讯录")
+			uni.navigateTo({
+				url: "../../workbench/origanization/origanization"
+			})
+		}
+
+		if (link.indexOf("app:/workBench/xuanchuanzhanban") != -1) {
+			console.log("宣传展板")
+			uni.navigateTo({
+				url: "../../index/xuanchuanzhanban/xuanchuanzhanban"
+			})
+		}
+
+		// 发票助手
+		if (link.indexOf("/workBench/invoice") != -1) {
+			console.log("发票助手")
+			uni.navigateTo({
+				url: "../../workbench/invoice_assistant/invoice_assistant"
+			})
+		}
+		if (link.indexOf("/news/news_win") != -1) {
+			console.log("通知公告")
+
+			uni.navigateTo({
+				url: "../../my/message-reminder/message-reminder"
+			})
+		}
+		if (link.indexOf("/workBench/getDuty") != -1) {
+			console.log("值班信息")
+
+			uni.navigateTo({
+				url: "../../workbench/duty_information/duty_information"
+			})
+		}
+		if (link.indexOf("/workBench/huiyiList") != -1) {
+			console.log("会议列表")
+			uni.navigateTo({
+				url: "../../workbench/meeting_arrangements/meeting_arrangements"
+			})
+		}
+		if (link.indexOf("/workBench/lifeCircleWin") != -1) {
+			console.log("生活圈")
+
+			uni.showToast({
+				icon: "none",
+				title: "暂未开通"
+			})
+		}
+		if (link.indexOf("/productionData/logging") != -1) {
+			console.log("下井记录")
+			// people_num 特殊值
+			if (!uni.getStorageSync('people_code')) {
+				uni.navigateTo({
+					url: "../../production/personnel_orientation/downhole_statistics/downhole_statistics?people_num=null&depart_name=" +
+						uni.getStorageSync('user').section + "&name=" + uni.getStorageSync('user')
+						.name + "&mine=640323B0011010019259"
+				})
+			} else {
+				uni.navigateTo({
+					url: "../../production/personnel_orientation/downhole_statistics/downhole_statistics?people_num=" +
+						uni.getStorageSync('user').people_code + "&depart_name=" + uni.getStorageSync(
+							'user').section + "&name=" + uni.getStorageSync('user').name +
+						"&mine=640323B0011010019259"
+				})
+			}
+
+		}
+		if (link.indexOf("/browseQrcode/gridSubmitItem_win") != -1) {
+			console.log("网格排查")
+			uni.navigateTo({
+				url: "../../workbench/gridding/gridding"
+			})
+		}
+		if (link.indexOf("/workBench/evaluate") != -1) {
+			console.log("干部评测")
+			uni.navigateTo({
+				url: "../../workbench/h5/h5?workBench=pingce"
+			})
+		}
+		if (link.indexOf("/productionData/persnoalLocation") != -1) {
+			uni.navigateTo({
+				url: "../../production/personnel_orientation/personnel_orientation?mine=640181B0011010030750"
+			})
+		}
+		
+		if (link.indexOf("closed_loop_management") != -1) {
+			uni.navigateTo({
+				url: "../../workbench/closed_loop_management/closed_loop_management"
+			})
+		}
+		
+		if (link.indexOf("app_url") != -1) {
+			uni.navigateTo({
+				url:link.split('app_url=')[1] + "&title=" + item.title
+			})
+		}
+		if (link.indexOf("switch_url") != -1) {
+			uni.switchTab({
+				url:link.split('switch_url=')[1]
+			})
+			
+		}
+	}
+}

ファイルの差分が大きいため隠しています
+ 8 - 0
common/js-base64.js


+ 18 - 0
common/production-http/index.js

@@ -0,0 +1,18 @@
+// 批量导出文件
+const requireApi = require.context(
+	// api 目录的相对路径
+	'.',
+	// 是否查询子目录
+	false,
+	// 查询文件的一个后缀
+	/.js$/
+)
+
+let module = {}
+requireApi.keys().forEach((key,index)=>{
+	if(key === './index.js' || key === './interface.js') return
+	// console.log(key);
+	Object.assign(module,requireApi(key))
+})
+
+export default module

+ 237 - 0
common/production-http/interface.js

@@ -0,0 +1,237 @@
+/**
+ * 通用uni-app网络请求
+ * 基于 Promise 对象实现更简单的 request 使用方式,支持请求和响应拦截
+ */
+
+/*
+// 开放的接口
+import http from './interface'
+
+http.config.baseUrl = "http://localhost:8080/api/"
+
+http.request(url:'user/list',method:'GET').then((res)=>{
+	console.log(JSON.stringify(res))
+})
+http.get('user/list').then((res)=>{
+	console.log(JSON.stringify(res))
+})
+http.get('user/list', {status: 1}).then((res)=>{
+	console.log(JSON.stringify(res))
+})
+http.post('user', {id:1, status: 1}).then((res)=>{
+	console.log(JSON.stringify(res))
+})
+http.put('user/1', {status: 2}).then((res)=>{
+	console.log(JSON.stringify(res))
+})
+http.delete('user/1').then((res)=>{
+	console.log(JSON.stringify(res))
+}) 
+
+*/
+
+
+export default {
+	config: {
+		baseUrl: "http://nmjt.nxjiewei.com:8011/api",
+		// 内网
+		// baseUrl: "http://n.nmjt.nxjiewei.com:8011/api",
+		header: {
+			"Content-Type": "multipart/form-data",
+			'Content-Type': 'application/json;charset=UTF-8',
+			'Content-Type': 'application/x-www-form-urlencoded',
+			'Authorization' : uni.getStorageSync('token_type') +' '+uni.getStorageSync('Authorization') || {},
+			'accesskey': "b364b449a18af327867f7edc3431b541"
+		},
+		data: {
+
+		},
+		method: "GET",
+		dataType: "json",
+		/* 如设为json,会对返回的数据做一次 JSON.parse */
+		responseType: "text",
+		success() {},
+		fail() {},
+		complete() {
+			// uni.hideLoading()
+		}
+	},
+	interceptor: {
+		request: null,
+		response: null
+	},
+	request(options) {
+		if (!options) {
+			options = {}
+		}
+		options.baseUrl = options.baseUrl || this.config.baseUrl
+		options.dataType = options.dataType || this.config.dataType
+		options.url = options.baseUrl + options.url
+		// 合并对象
+		options.data = {
+			...options.data,
+			...this.config.data
+		}
+		options.method = options.method || this.config.method
+		//TODO 加密数据
+
+		//TODO 数据签名
+		/* 
+		_token = {'token': getStorage(STOREKEY_LOGIN).token || 'undefined'},
+		_sign = {'sign': sign(JSON.stringify(options.data))}
+		options.header = Object.assign({}, options.header, _token,_sign) 
+		*/
+
+		return new Promise((resolve, reject) => {
+			let _config = null
+
+			// uni.showLoading({
+			// 	icon:"none",
+			// 	title:"加载中...",
+			// 	mask:true
+			// })
+
+			options.complete = (response) => {
+				let statusCode = response.statusCode
+				// console.log("【" + _config.requestId + "】 状态码:" + JSON.stringify(statusCode))
+				response.config = _config
+				if (process.env.NODE_ENV === 'development') {
+					if (statusCode === 200) {
+						// uni.hideLoading()
+						// console.log("【" + _config.requestId + "】 结果:" + JSON.stringify(response.data))
+						if (response.data.code == 401) {
+							uni.showToast({
+								icon: "none",
+								title: "登录失效、请重新登录"
+							})
+							setTimeout(function() {
+								uni.redirectTo({
+									url: "/pages/login/login"
+								})
+							}, 2000)
+						}
+					} else if (statusCode === 500) {
+						uni.hideLoading()
+						uni.showToast({
+							icon: "none",
+							title: "500"
+						})
+						// setTimeout(function(){
+						// 	uni.navigateTo({
+						// 		url:"/pages/login/login"
+						// 	})
+						// },1500)
+					}
+				}
+				if (this.interceptor.response) {
+					let newResponse = this.interceptor.response(response)
+					if (newResponse) {
+						response = newResponse
+					}
+				}
+				// 统一的响应日志记录
+				// _reslog(response)
+				if (statusCode === 200) { //成功
+					resolve(response);
+				} else {
+					reject(response)
+				}
+			}
+
+			_config = Object.assign({}, this.config, options)
+			_config.requestId = new Date().getTime()
+
+			if (this.interceptor.request) {
+				this.interceptor.request(_config)
+			}
+
+			// 统一的请求日志记录
+			// _reqlog(_config)
+
+			if (process.env.NODE_ENV === 'development') {
+				// console.log("【" + _config.requestId + "】 地址:" + _config.url)
+				if (_config.data) {
+					// console.log("【" + _config.requestId + "】 参数:" + JSON.stringify(_config.data))
+				}
+			}
+
+			uni.request(_config);
+
+		});
+	},
+	get(url, data, options) {
+		if (!options) {
+			options = {}
+		}
+		options.url = url
+		options.data = data
+		options.method = 'GET'
+		return this.request(options)
+	},
+	post(url, data, options) {
+		if (!options) {
+			options = {}
+		}
+		options.url = url
+		options.data = data
+		options.method = 'POST'
+		return this.request(options)
+	},
+	put(url, data, options) {
+		if (!options) {
+			options = {}
+		}
+		options.url = url
+		options.data = data
+		options.method = 'PUT'
+		return this.request(options)
+	},
+	delete(url, data, options) {
+		if (!options) {
+			options = {}
+		}
+		options.url = url
+		options.data = data
+		options.method = 'DELETE'
+		return this.request(options)
+	}
+}
+
+
+/**
+ * 请求接口日志记录
+ */
+function _reqlog(req) {
+	if (process.env.NODE_ENV === 'development') {
+		console.log("【" + req.requestId + "】 地址:" + req.url)
+		if (req.data) {
+			console.log("【" + req.requestId + "】 请求参数:" + JSON.stringify(req.data))
+		}
+	}
+	//TODO 调接口异步写入日志数据库
+}
+
+/**
+ * 响应接口日志记录
+ */
+function _reslog(res) {
+	let _statusCode = res.statusCode;
+	if (process.env.NODE_ENV === 'development') {
+		console.log("【" + res.config.requestId + "】 地址:" + res.config.url)
+		if (res.config.data) {
+			console.log("【" + res.config.requestId + "】 请求参数:" + JSON.stringify(res.config.data))
+		}
+		console.log("【" + res.config.requestId + "】 响应结果:" + JSON.stringify(res))
+	}
+	//TODO 除了接口服务错误外,其他日志调接口异步写入日志数据库
+	switch (_statusCode) {
+		case 200:
+			break;
+		case 401:
+			break;
+		case 404:
+			break;
+		default:
+			break;
+	}
+}

+ 443 - 0
common/production-http/production-api.js

@@ -0,0 +1,443 @@
+import http from './interface'
+
+/**
+ * 将业务所有接口统一起来便于维护
+ * 如果项目很大可以将 url 独立成文件,接口分成不同的模块
+ * 
+ */
+
+// 单独导出(测试接口) import {test} from '@/common/vmeitime-http/'
+export const test = (data) => {
+	// http.config.baseUrl = "http://localhost:8080/api/"
+	//设置请求前拦截器
+	http.interceptor.request = (config) => {
+		config.header = {
+			// "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+		}
+	}
+	//设置请求结束后拦截器
+	http.interceptor.response = (response) => {
+		// console.log('个性化response....')
+		//判断返回状态 执行相应操作
+		return response;
+	}
+	return http.request({
+		baseUrl: 'https://unidemo.dcloud.net.cn/',
+		url: 'ajax/echo/text?name=uni-app',
+		dataType: 'text',
+		data,
+	})
+}
+
+// 默认全部导出  import api from '@/common/vmeitime-http/'
+// export default {
+// 	test,
+// }
+
+
+// //方式一
+// sendRequest1(){
+// 	this.$api.getNavs({
+// 		noncestr: Date.now(),
+// 		user:123456,
+
+// 	}).then((res)=>{
+// 		this.res = '请求结果 : ' + JSON.stringify(res);
+// 		console.log('request success', res)
+// 	}).catch((err)=>{
+// 		console.log('request fail', err);
+// 	})
+// },
+// // 方式二
+// async sendRequest2() {
+// 	let res = await this.$api.getBlocksList();
+// 	this.res = '请求结果 : ' + JSON.stringify(res);
+// }
+
+
+
+// 生产数据
+
+// 列表页数据
+// // 井下人数
+// export const personnel_mineall_people = (data) => {
+//     return http.request({
+// 		method:"POST",
+//         url: '/personnel/mineall/people',
+//         data,
+//     })
+// }
+// // 安全监测今日总量
+// export const jt_safety_total_count = (data) => {
+//     return http.request({
+// 		method:"POST",
+//         url: '/jt/safety/total/count',
+//         data,
+//     })
+// }
+// // 当日生产
+// export const coalmine_output = (data) => {
+//     return http.request({
+//         url: '/coalmine/output',
+//         data,
+//     })
+// }
+
+// 生产数据权限
+export const product_data_query_power = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/product_data/query_power',
+		data,
+	})
+}
+
+// 人员定位
+// 当前人员统计
+export const personnel_people_now = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/people/now',
+		data,
+	})
+}
+// 职能科室人数统计
+export const personnel_office_total = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/office/total',
+		data,
+	})
+}
+// 基层区队人数统计
+export const personnel_basic_total = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/basic/total',
+		data,
+	})
+}
+// 今日各部门人数统计
+export const personnel_depart_today = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/depart/today',
+		data,
+	})
+}
+// 下井人员查询
+export const personnel_people_search = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/people/search',
+		data,
+	})
+}
+// 部门下井人员列表
+export const personnel_depart_people = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/depart/people',
+		data,
+	})
+}
+
+// 人员定位统计
+// 下井月份列表
+export const personnel_downwell_monthlist_once = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/downwell/monthlist/once',
+		data,
+	})
+}
+// 当月下井信息
+export const personnel_downwell_month_once = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/downwell/month/once',
+		data,
+	})
+}
+// 当月下井记录
+export const personnel_downwell_month_info = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/downwell/month/info',
+		data,
+	})
+}
+
+
+
+
+
+
+// 人员轨迹
+export const personnel_downwell_once_info = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/downwell/once/info',
+		data,
+	})
+}
+// 定位信息
+export const personnel_people_info = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/people/info',
+		data,
+	})
+}
+
+
+// 安全监测
+
+// 模拟量统计
+export const jt_safety_simulation_total = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/jt/safety/simulation/total',
+		data,
+	})
+}
+// 开关量统计
+export const jt_safety_sluice_total = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/jt/safety/sluice/total',
+		data,
+	})
+}
+// 开关量模拟量查询
+export const jt_safety_info_search = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/jt/safety/info/search',
+		data,
+	})
+}
+// 监测类型详情
+export const jt_safety_info_total = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/jt/safety/info/total',
+		data,
+	})
+}
+// 监测详情
+export const jt_safety_info_detail = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/jt/safety/info/detail',
+		data,
+	})
+}
+// 安全监测报警列表
+export const jt_safety_Safety_bj_info = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/jt/safety/Safety/bj/info',
+		data,
+	})
+}
+
+// 通风管理
+
+export const jt_safety_aerator_list = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/jt/safety/aerator/list',
+		data,
+	})
+}
+
+// 井口计量
+// 今日产量
+export const coalmine_days_output = (data) => {
+	return http.request({
+		url: '/coalmine/days/output',
+		data,
+	})
+}
+// 工作面列表
+export const coalmine_working_face = (data) => {
+	return http.request({
+		url: '/coalmine/working/face',
+		data,
+	})
+}
+// 工作面详情
+export const coalmine_working_face_info = (data) => {
+	return http.request({
+		url: '/coalmine/working/face/info',
+		data,
+	})
+}
+// 产量趋势
+export const coalmine_one_trend = (data) => {
+	return http.request({
+		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,
+	})
+}
+
+// 枣泉
+// 矿井水
+export const automate_mine_water_get_list = (data) => {
+	return http.request({
+		method: 'POST',
+		url: '/automate/mine_water/get_list',
+		data,
+	})
+}
+
+
+// 信息中心 生产统计
+// 当日集团产量
+export const coalmine_output = (data) => {
+	return http.request({
+		url: '/coalmine/output',
+		data,
+	})
+}
+// 各矿产量
+export const coalmine_ratio = (data) => {
+	return http.request({
+		url: '/coalmine/ratio',
+		data,
+	})
+}
+// 周产量趋势
+export const coalmine_trend = (data) => {
+	return http.request({
+		url: '/coalmine/trend',
+		data,
+	})
+}
+
+
+// 人员定位统计
+export const personnel_mineall_total = (data) => {
+	return http.request({
+		method: 'POST',
+		url: '/personnel/mineall/total',
+		data,
+	})
+}
+
+// 风险预控
+
+// 矿列表
+export const danger_mine = (data) => {
+	return http.request({
+		url: '/danger/mine',
+		data,
+	})
+}
+// 隐患列表
+export const danger_depart = (data) => {
+	return http.request({
+		url: '/danger/depart',
+		data,
+	})
+}
+// 隐患详情
+export const danger_depart_info = (data) => {
+	return http.request({
+		url: '/danger/depart/info',
+		data,
+	})
+}
+
+// 获取人员定位信息正常状态
+export const messageUpdateStatus = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/people/messageUpdateStatus',
+		data,
+	})
+}
+
+// 个人中心 下井统计
+export const peopleTotalNum = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/people/peopleTotalNum',
+		data,
+	})
+}
+
+export const get_ycbj_list = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/jt/safety/get_ycbj_list',
+		data,
+	})
+}
+
+// 人员定位 下井人数趋势
+export const personnel_getPeopleXJQS = (data) => {
+	return http.request({
+		method: "POST",
+		url: '/personnel/getPeopleXJQS',
+		data,
+	})
+}

+ 198 - 0
common/production-http/readme.md

@@ -0,0 +1,198 @@
+**插件使用说明**
+
+- 基于 Promise 对象实现更简单的 request 使用方式,支持请求和响应拦截
+- 下载后把 vmeitime-http 文件夹 copy 到项目 common/ 目录下
+
+## 1. 配置 
+
+### 1.1 全局配置修改(修改vmeitime-http/interface.js中config和interceptor)
+``` javascript 
+	config: {
+		baseUrl: "https://api.com/api/",
+		header: {
+			'Content-Type':'application/json;charset=UTF-8',
+			'Content-Type':'application/x-www-form-urlencoded'
+		},    
+		dataType: "json",  
+		responseType: "text"
+	},
+	interceptor: {
+		request: null,
+		response: null
+	}
+```
+	
+### 1.2 具体接口调用时修改(在vmeitime-http/index.js文件中具体业务接口中配置)
+``` javascript
+//设置baseUrl
+http.config.baseUrl = "http://localhost:8080/api/"
+//设置请求前拦截器
+http.interceptor.request = (config) => {
+    //添加通用参数
+    config.header = {
+        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+    }
+}
+//设置请求结束后拦截器
+http.interceptor.response = (response) => {
+    //判断返回状态 执行相应操作
+    return response;
+}
+```	
+
+
+## 2. 使用
+
+### 2.1 全局使用(在main.js注册)
+
+``` //  main.js
+  import api from '@/common/vmeitime-http/'
+	
+	// 全局挂载后使用
+	Vue.prototype.$api = api
+```
+
+``` // pages/index/index.vue
+
+<template>
+	<view class="content">
+		
+		<view class="uni-padding-wrap uni-common-mt">
+			<view class="uni-textarea uni-common-mt">
+				<textarea :value="res"></textarea>
+			</view>
+			<view class="uni-btn-v uni-common-mt">
+				<button type="primary" @click="sendRequest" :loading="loading">发起请求</button>
+				<button type="default" @click="sendRequest1" :loading="loading">发起请求(async/await)</button>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				loading: false,
+				res: ''
+			}
+		},
+		onLoad(option) {
+			//this.sendRequest();
+			//this.sendRequest1();
+		},
+		methods: {
+			// 方式一
+			sendRequest: function() {
+				this.loading = true
+				this.$api.test({noncestr: Date.now()}).then((res)=>{
+					this.loading = false;
+					console.log('request success', res)
+					uni.showToast({
+						title: '请求成功',
+						icon: 'success',
+						mask: true
+					});
+					this.res = '请求结果 : ' + JSON.stringify(res);
+				}).catch((err)=>{
+					this.loading = false;
+					console.log('request fail', err);
+				})
+			},
+			
+			//方式二  https://segmentfault.com/a/1190000013292562?utm_source=channel-newest
+			async sendRequest1() {
+				this.loading = true
+				let res = await this.$api.test({noncestr: Date.now()});
+				this.loading = false;
+				this.res = '请求结果 : ' + JSON.stringify(res);
+			}
+		}
+	}
+</script>
+```
+
+
+### 2.2 局部使用(局部使用,不需要在 main.js 中注册) 
+
+``` // pages/index/index.vue
+
+<template>
+	<view class="content">
+		
+		<view class="uni-padding-wrap uni-common-mt">
+			<view class="uni-textarea uni-common-mt">
+				<textarea :value="res"></textarea>
+			</view>
+			<view class="uni-btn-v uni-common-mt">
+				<button type="primary" @click="sendRequest" :loading="loading">发起请求</button>
+				<button type="default" @click="sendRequest1" :loading="loading">发起请求(async/await)</button>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+    import api from '@/common/vmeitime-http/'
+
+    export default {
+        data() {
+            return {
+				loading: false,
+				res: ''
+			}
+        },
+        onLoad(option) {
+        	//this.sendRequest();
+        	//this.sendRequest1();
+        },
+        methods: {
+        	// 方式一
+        	sendRequest: function() {
+        		this.loading = true
+        		api.test({noncestr: Date.now()}).then((res)=>{
+        			this.loading = false;
+        			console.log('request success', res)
+        			uni.showToast({
+        				title: '请求成功',
+        				icon: 'success',
+        				mask: true
+        			});
+        			this.res = '请求结果 : ' + JSON.stringify(res);
+        		}).catch((err)=>{
+        			this.loading = false;
+        			console.log('request fail', err);
+        		})
+        	},
+        	
+        	//方式二
+        	async sendRequest1() {
+        		this.loading = true
+        		let res = await this.api.test({noncestr: Date.now()});
+        		this.loading = false;
+        		this.res = '请求结果 : ' + JSON.stringify(res);
+        	}
+        }
+    }
+</script>
+
+```
+
+
+## 3. 接口数据加密、接口签名核验
+
+在vmeitime-http/interface.js文件中的request(Object)方法中补充修改相应的代码
+
+## 4. 接口请求/响应日志记录
+
+在vmeitime-http/interface.js文件中的request(Object)方法中补充修改相应的代码
+
+## 5. 业务相关接口编写
+
+在vmeitime-http/index.js文件中的编写具体业务相关的接口,参考test()方法
+
+
+
+	

+ 149 - 0
common/set_base_url.js

@@ -0,0 +1,149 @@
+// 根据矿编码切换首页接口不同的请求基础路径
+
+export const set_base_url = (mine_code) => {
+	switch (mine_code) {
+		case 'ningmeijituan':
+			return "http://nmjt.nxjiewei.com:8011/api"
+			break;
+		case 'ningdongyunying':
+			return "http://ningdongyunying.nxjiewei.com:8011/api"
+			break;
+		case 'meihuajing':
+			return "http://meihuajing.nxjiewei.com:8011/api"
+			break;
+		case 'zaoquan':
+			return "http://zaoquan.nxjiewei.com:8011/api"
+			break;
+		case 'yangchangwan':
+			return "http://yangchangwan.nxjiewei.com:8011/api"
+			break;
+		case 'jinfeng':
+			return "http://jinfeng.nxjiewei.com:8011/api"
+			break;
+		case 'jinfeng_neiwang':
+			return "http://n.jinfeng.nxjiewei.com:8011/api"
+			break;
+		case 'xixuan':
+			return "http://xixuan.nxjiewei.com:8011/api"
+			break;
+		case 'qingshuiying':
+			return "http://qingshuiying.nxjiewei.com:8011/api"
+			break;
+		case 'wuyegongsi':
+			return "http://wuyegongsi.nxjiewei.com:8011/api"
+			break;
+		case 'jinjiaqu':
+			return "http://jinjiaqu.nxjiewei.com:8011/api"
+			break;
+		case 'jinjiaqu_neiwang':
+			return "http://n.jinjiaqu.nxjiewei.com:8011/api"
+			break;
+		case 'shicaocun':
+			return "http://shicaocun.nxjiewei.com:8011/api"
+			break;
+		case 'lingxin':
+			return "http://lingxin.nxjiewei.com:8011/api"
+			break;
+		case 'renjiazhuang':
+			return "http://renjiazhuang.nxjiewei.com:8011/api"
+			break;
+		case 'renjiazhuang_neiwang':
+			return "http://n.renjiazhuang.nxjiewei.com:8011/api"
+			break;
+		default:
+			return ""
+	}
+}
+
+
+export const set_appName = (mine_code) => {
+	switch (mine_code) {
+		case 'ningmeijituan':
+			return "智慧宁煤"
+			break;
+		case 'ningdongyunying':
+			return "E信管理"
+			break;
+		case 'zaoquan':
+			return "智慧枣泉"
+			break;
+		case 'yangchangwan':
+			return "智慧羊场湾"
+			break;
+		case 'qingshuiying':
+			return "智慧清水营"
+			break;
+		case 'wuyegongsi':
+			return "智慧物业"
+			break;
+		case 'jinjiaqu':
+			return "智慧金家渠"
+			break;
+		case 'jinjiaqu_neiwang':
+			return "智慧金家渠"
+			break;
+		case 'shicaocun':
+			return "智慧石槽村"
+			break;
+		case 'jinfeng':
+			return "智慧金凤"
+			break;
+		case 'jinfeng_neiwang':
+			return "智慧金凤(内网)"
+			break;
+		case 'lingxin':
+			return "智慧灵新"
+			break;
+		case 'renjiazhuang':
+			return "智慧任家庄"
+			break;
+		default:
+			return ""
+	}
+}
+
+export const set_mine = (mine_code) => {
+	switch (mine_code) {
+		case 'ningmeijituan':
+			return "E信管理"
+			break;
+		case 'ningdongyunying':
+			return "E信管理"
+			break;
+		case 'zaoquan':
+			return "640181B0011010037723"
+			break;
+		case 'yangchangwan':
+			return "640181B0011010030750,640181B0011010032422"
+			break;
+		case 'qingshuiying':
+			return "智慧清水营"
+			break;
+		case 'wuyegongsi':
+			return "智慧物业"
+			break;
+		case 'jinjiaqu':
+			return "640323B0011010019259"
+			break;
+		case 'jinjiaqu_neiwang':
+			return "640323B0011010019259"
+			break;
+		case 'shicaocun':
+			return "640181B0011010018668"
+			break;
+		case 'jinfeng':
+			return "640323B0011010027334"
+			break;
+		case 'jinfeng_neiwang':
+			return "640323B0011010027334"
+			break;
+		case 'lingxin':
+			return "640181B0011010037973"
+			break;
+		case 'renjiazhuang':
+			return "640181B0011010037381"
+			break;
+		default:
+			return ""
+	}
+}

+ 121 - 0
common/time.js

@@ -0,0 +1,121 @@
+Date.prototype.format = function(fmt) {
+	var o = {
+		"M+": this.getMonth() + 1, //月份
+		"d+": this.getDate(), //日
+		"h+": this.getHours(), //小时
+		"m+": this.getMinutes(), //分
+		"s+": this.getSeconds(), //秒
+		"q+": Math.floor((this.getMonth() + 3) / 3), //季度
+		"S": this.getMilliseconds() //毫秒
+	};
+
+	if (/(y+)/.test(fmt)) {
+		fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+	}
+
+	for (var k in o) {
+		if (new RegExp("(" + k + ")").test(fmt)) {
+			fmt = fmt.replace(
+				RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+		}
+	}
+
+	return fmt;
+}
+
+// import time from "@/common/time.js"
+
+// console.log(new Date().format("yyyy-MM-dd"))
+
+
+export const getNextDate = (date, day) => {
+	var dd = new Date(date);
+	dd.setDate(dd.getDate() + day);
+	var y = dd.getFullYear();
+	var m = dd.getMonth() + 1 < 10 ? "0" + (dd.getMonth() + 1) : dd.getMonth() + 1;
+	var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();
+	return y + "-" + m + "-" + d;
+}
+
+// getNextDate("2018-09-27",10)
+
+
+// 计算两个日期时间差,天 小时 分 秒格式
+export const diffTime = (startDate, endDate) => {
+	startDate = new Date(startDate);
+	endDate = new Date(endDate);
+	var diff = endDate.getTime() - startDate.getTime(); //时间差的毫秒数 
+
+	//计算出相差天数 
+	var days = Math.floor(diff / (24 * 3600 * 1000));
+
+	//计算出小时数 
+	var leave1 = diff % (24 * 3600 * 1000); //计算天数后剩余的毫秒数 
+	var hours = Math.floor(leave1 / (3600 * 1000));
+	//计算相差分钟数 
+	var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数 
+	var minutes = Math.floor(leave2 / (60 * 1000));
+
+	//计算相差秒数 
+	var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数 
+	var seconds = Math.round(leave3 / 1000);
+
+	// var returnStr = seconds + "秒"; 
+	// if(minutes>0) { 
+	//     returnStr = minutes + "分" + returnStr; 
+	// } 
+	// if(hours>0) { 
+	//     returnStr = hours + "小时" + returnStr; 
+	// } 
+	// if(days>0) { 
+	//     returnStr = days + "天" + returnStr; 
+	// } 
+	// return returnStr; 
+
+	var returnStr = seconds + " ";
+	if (minutes >= 0) {
+		returnStr = minutes + " " + returnStr;
+	}
+	if (hours >= 0) {
+		returnStr = hours + " " + returnStr;
+	}
+	if (days >= 0) {
+		returnStr = days + " " + returnStr;
+	}
+	return returnStr;
+}
+
+// var diffTimeShow = diffTime('2017-03-02 09:10','2017-03-17 04:10');
+
+export const 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;
+	}
+
+	return year + "年" + month + "月" + day + "日  " + days;
+}

ファイルの差分が大きいため隠しています
+ 1158 - 0
common/vmeitime-http/api.js


+ 18 - 0
common/vmeitime-http/index.js

@@ -0,0 +1,18 @@
+// 批量导出文件
+const requireApi = require.context(
+	// api 目录的相对路径
+	'.',
+	// 是否查询子目录
+	false,
+	// 查询文件的一个后缀
+	/.js$/
+)
+
+let module = {}
+requireApi.keys().forEach((key,index)=>{
+	if(key === './index.js' || key === './interface.js') return
+	// console.log(key);
+	Object.assign(module,requireApi(key))
+})
+
+export default module

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

@@ -0,0 +1,248 @@
+/**
+ * 通用uni-app网络请求
+ * 基于 Promise 对象实现更简单的 request 使用方式,支持请求和响应拦截
+ */
+
+/*
+// 开放的接口
+import http from './interface'
+
+http.config.baseUrl = "http://localhost:8080/api/"
+
+http.request(url:'user/list',method:'GET').then((res)=>{
+	console.log(JSON.stringify(res))
+})
+http.get('user/list').then((res)=>{
+	console.log(JSON.stringify(res))
+})
+http.get('user/list', {status: 1}).then((res)=>{
+	console.log(JSON.stringify(res))
+})
+http.post('user', {id:1, status: 1}).then((res)=>{
+	console.log(JSON.stringify(res))
+})
+http.put('user/1', {status: 2}).then((res)=>{
+	console.log(JSON.stringify(res))
+})
+http.delete('user/1').then((res)=>{
+	console.log(JSON.stringify(res))
+}) 
+
+*/
+
+
+export default {
+	config: {
+		// baseUrl: "http://nmjt.nxjiewei.com:8011/api",
+		// baseUrl: "http://colliery.nxjiewei.com/api",
+		// baseUrl: "http://ningdongyunying.nxjiewei.com:8011/api",
+		// baseUrl: "http://shicaocun.nxjiewei.com:8011/api",
+		baseUrl: "http://zaoquan.nxjiewei.com:8011/api",
+		// baseUrl: "http://qingshuiying.nxjiewei.com:8011/api",
+		// baseUrl: "http://wuyegongsi.nxjiewei.com:8011/api",
+		// baseUrl: "http://jinjiaqu.nxjiewei.com:8011/api",
+		// 金家渠:内网
+		// baseUrl: "http://n.jinjiaqu.nxjiewei.com:8011/api",
+		// baseUrl: "http://yangchangwan.nxjiewei.com:8011/api",
+		// baseUrl: "http://jinfeng.nxjiewei.com:8011/api",
+		// 金凤:内网
+		// baseUrl: "http://n.jinfeng.nxjiewei.com:8011/api",
+		// baseUrl: "http://lingxin.nxjiewei.com:8011/api",
+		// baseUrl: "http://renjiazhuang.nxjiewei.com:8011/api",
+		// 任家庄内网
+		// baseUrl: "http://n.renjiazhuang.nxjiewei.com:8011/api",
+		
+		// baseUrl: uni.getStorageSync('base_url'),
+		header: {
+			"Content-Type":"multipart/form-data",
+			'Content-Type':'application/json;charset=UTF-8',
+			'Content-Type':'application/x-www-form-urlencoded',
+			'Authorization' : uni.getStorageSync('token_type') +' '+uni.getStorageSync('Authorization') || {},
+			'accesskey': "b364b449a18af327867f7edc3431b541",
+		},  
+		data: {},
+		method: "GET",
+		dataType: "json",  /* 如设为json,会对返回的数据做一次 JSON.parse */
+		responseType: "text",
+		success() {},
+		fail() {},
+		complete() {
+			// uni.hideLoading()
+		}
+	},
+	interceptor: {
+		request: null,
+		response: null
+	},
+	request(options) {
+		if (!options) {
+			options = {}
+		}
+		options.baseUrl = options.baseUrl || this.config.baseUrl
+		options.dataType = options.dataType || this.config.dataType
+		options.url = options.baseUrl + options.url
+		options.data = options.data || {}
+		options.method = options.method || this.config.method
+		//TODO 加密数据
+		
+		//TODO 数据签名
+		/* 
+		_token = {'token': getStorage(STOREKEY_LOGIN).token || 'undefined'},
+		_sign = {'sign': sign(JSON.stringify(options.data))}
+		options.header = Object.assign({}, options.header, _token,_sign) 
+		*/
+	   
+		return new Promise((resolve, reject) => {
+			let _config = null
+			
+			// uni.showLoading({
+			// 	icon:"none",
+			// 	title:"加载中...",
+			// 	mask:true
+			// })
+			
+			options.complete = (response) => {
+				let statusCode = response.statusCode
+				// console.log("【" + _config.requestId + "】 状态码:" + JSON.stringify(statusCode))
+				response.config = _config
+				if (process.env.NODE_ENV === 'development') {
+					if (statusCode === 200) {
+						// uni.hideLoading()
+						// console.log("【" + _config.requestId + "】 结果:" + JSON.stringify(response.data))
+						// if(response.data.code == 401){
+						// 	uni.showToast({
+						// 		icon:"none",
+						// 		title:"登录失效、请重新登录"
+						// 	})
+						// 	setTimeout(function(){
+						// 		uni.redirectTo({
+						// 			url:"/my/login/login.vue"
+						// 		})
+						// 	},2000)
+						// }
+					}else if(statusCode === 500){
+						uni.hideLoading()
+						uni.showToast({
+							icon:"none",
+							title:"500"
+						})
+						// setTimeout(function(){
+						// 	uni.navigateTo({
+						// 		url:"/pages/login/login"
+						// 	})
+						// },1500)
+					}
+				}
+				if (this.interceptor.response) {
+					let newResponse = this.interceptor.response(response)
+					if (newResponse) {
+						response = newResponse
+					}
+				}
+				// 统一的响应日志记录
+				// _reslog(response)
+				if (statusCode === 200) { //成功
+					resolve(response);
+				} else {
+					reject(response)
+				}
+			}
+
+			_config = Object.assign({}, this.config, options)
+			_config.requestId = new Date().getTime()
+
+			if (this.interceptor.request) {
+				this.interceptor.request(_config)
+			}
+			
+			// 统一的请求日志记录
+			// _reqlog(_config)
+
+			if (process.env.NODE_ENV === 'development') {
+				// console.log("【" + _config.requestId + "】 地址:" + _config.url)
+				if (_config.data) {
+					// console.log("【" + _config.requestId + "】 参数:" + JSON.stringify(_config.data))
+				}
+			}
+
+			uni.request(_config);
+			
+		});
+	},
+	get(url, data, options) {
+		if (!options) {
+			options = {}
+		}
+		options.url = url
+		options.data = data
+		options.method = 'GET'  
+		return this.request(options)
+	},
+	post(url, data, options) {
+		if (!options) {
+			options = {}
+		}
+		options.url = url
+		options.data = data
+		options.method = 'POST'
+		return this.request(options)
+	},
+	put(url, data, options) {
+		if (!options) {
+			options = {}
+		}
+		options.url = url
+		options.data = data
+		options.method = 'PUT'
+		return this.request(options)
+	},
+	delete(url, data, options) {
+		if (!options) {
+			options = {}
+		}
+		options.url = url
+		options.data = data
+		options.method = 'DELETE'
+		return this.request(options)
+	}
+}
+
+
+/**
+ * 请求接口日志记录
+ */
+function _reqlog(req) {
+	if (process.env.NODE_ENV === 'development') {
+		console.log("【" + req.requestId + "】 地址:" + req.url)
+		if (req.data) {
+			console.log("【" + req.requestId + "】 请求参数:" + JSON.stringify(req.data))
+		}
+	}
+	//TODO 调接口异步写入日志数据库
+}
+
+/**
+ * 响应接口日志记录
+ */
+function _reslog(res) {
+	let _statusCode = res.statusCode;
+	if (process.env.NODE_ENV === 'development') {
+		console.log("【" + res.config.requestId + "】 地址:" + res.config.url)
+		if (res.config.data) {
+			console.log("【" + res.config.requestId + "】 请求参数:" + JSON.stringify(res.config.data))
+		}
+		console.log("【" + res.config.requestId + "】 响应结果:" + JSON.stringify(res))
+	}
+	//TODO 除了接口服务错误外,其他日志调接口异步写入日志数据库
+	switch(_statusCode){
+		case 200:
+			break;
+		case 401:
+			break;
+		case 404:
+			break;
+		default:
+			break;
+	}
+}
+

+ 198 - 0
common/vmeitime-http/readme.md

@@ -0,0 +1,198 @@
+**插件使用说明**
+
+- 基于 Promise 对象实现更简单的 request 使用方式,支持请求和响应拦截
+- 下载后把 vmeitime-http 文件夹 copy 到项目 common/ 目录下
+
+## 1. 配置 
+
+### 1.1 全局配置修改(修改vmeitime-http/interface.js中config和interceptor)
+``` javascript 
+	config: {
+		baseUrl: "https://api.com/api/",
+		header: {
+			'Content-Type':'application/json;charset=UTF-8',
+			'Content-Type':'application/x-www-form-urlencoded'
+		},    
+		dataType: "json",  
+		responseType: "text"
+	},
+	interceptor: {
+		request: null,
+		response: null
+	}
+```
+	
+### 1.2 具体接口调用时修改(在vmeitime-http/index.js文件中具体业务接口中配置)
+``` javascript
+//设置baseUrl
+http.config.baseUrl = "http://localhost:8080/api/"
+//设置请求前拦截器
+http.interceptor.request = (config) => {
+    //添加通用参数
+    config.header = {
+        "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+    }
+}
+//设置请求结束后拦截器
+http.interceptor.response = (response) => {
+    //判断返回状态 执行相应操作
+    return response;
+}
+```	
+
+
+## 2. 使用
+
+### 2.1 全局使用(在main.js注册)
+
+``` //  main.js
+  import api from '@/common/vmeitime-http/'
+	
+	// 全局挂载后使用
+	Vue.prototype.$api = api
+```
+
+``` // pages/index/index.vue
+
+<template>
+	<view class="content">
+		
+		<view class="uni-padding-wrap uni-common-mt">
+			<view class="uni-textarea uni-common-mt">
+				<textarea :value="res"></textarea>
+			</view>
+			<view class="uni-btn-v uni-common-mt">
+				<button type="primary" @click="sendRequest" :loading="loading">发起请求</button>
+				<button type="default" @click="sendRequest1" :loading="loading">发起请求(async/await)</button>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				loading: false,
+				res: ''
+			}
+		},
+		onLoad(option) {
+			//this.sendRequest();
+			//this.sendRequest1();
+		},
+		methods: {
+			// 方式一
+			sendRequest: function() {
+				this.loading = true
+				this.$api.test({noncestr: Date.now()}).then((res)=>{
+					this.loading = false;
+					console.log('request success', res)
+					uni.showToast({
+						title: '请求成功',
+						icon: 'success',
+						mask: true
+					});
+					this.res = '请求结果 : ' + JSON.stringify(res);
+				}).catch((err)=>{
+					this.loading = false;
+					console.log('request fail', err);
+				})
+			},
+			
+			//方式二  https://segmentfault.com/a/1190000013292562?utm_source=channel-newest
+			async sendRequest1() {
+				this.loading = true
+				let res = await this.$api.test({noncestr: Date.now()});
+				this.loading = false;
+				this.res = '请求结果 : ' + JSON.stringify(res);
+			}
+		}
+	}
+</script>
+```
+
+
+### 2.2 局部使用(局部使用,不需要在 main.js 中注册) 
+
+``` // pages/index/index.vue
+
+<template>
+	<view class="content">
+		
+		<view class="uni-padding-wrap uni-common-mt">
+			<view class="uni-textarea uni-common-mt">
+				<textarea :value="res"></textarea>
+			</view>
+			<view class="uni-btn-v uni-common-mt">
+				<button type="primary" @click="sendRequest" :loading="loading">发起请求</button>
+				<button type="default" @click="sendRequest1" :loading="loading">发起请求(async/await)</button>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+    import api from '@/common/vmeitime-http/'
+
+    export default {
+        data() {
+            return {
+				loading: false,
+				res: ''
+			}
+        },
+        onLoad(option) {
+        	//this.sendRequest();
+        	//this.sendRequest1();
+        },
+        methods: {
+        	// 方式一
+        	sendRequest: function() {
+        		this.loading = true
+        		api.test({noncestr: Date.now()}).then((res)=>{
+        			this.loading = false;
+        			console.log('request success', res)
+        			uni.showToast({
+        				title: '请求成功',
+        				icon: 'success',
+        				mask: true
+        			});
+        			this.res = '请求结果 : ' + JSON.stringify(res);
+        		}).catch((err)=>{
+        			this.loading = false;
+        			console.log('request fail', err);
+        		})
+        	},
+        	
+        	//方式二
+        	async sendRequest1() {
+        		this.loading = true
+        		let res = await this.api.test({noncestr: Date.now()});
+        		this.loading = false;
+        		this.res = '请求结果 : ' + JSON.stringify(res);
+        	}
+        }
+    }
+</script>
+
+```
+
+
+## 3. 接口数据加密、接口签名核验
+
+在vmeitime-http/interface.js文件中的request(Object)方法中补充修改相应的代码
+
+## 4. 接口请求/响应日志记录
+
+在vmeitime-http/interface.js文件中的request(Object)方法中补充修改相应的代码
+
+## 5. 业务相关接口编写
+
+在vmeitime-http/index.js文件中的编写具体业务相关的接口,参考test()方法
+
+
+
+	

BIN
components/.DS_Store


+ 242 - 0
components/Toling-DateSelect/computedLunarDate.js

@@ -0,0 +1,242 @@
+
+let lunarYearArr = [
+        0x0b557, //1949
+        0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, //1950-1959
+        0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, //1960-1969
+        0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, //1970-1979
+        0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, //1980-1989
+        0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x055c0, 0x0ab60, 0x096d5, 0x092e0, //1990-1999
+        0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, //2000-2009
+        0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, //2010-2019
+        0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, //2020-2029
+        0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, //2030-2039
+        0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, //2040-2049
+        0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, //2050-2059
+        0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, //2060-2069
+        0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, //2070-2079
+        0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, //2080-2089
+        0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, //2090-2099
+        0x0d520 //2100
+    ],
+    lunarMonth = ['正', '二', '三', '四', '五', '六', '七', '八', '九', '十', '冬', '腊'],
+    lunarDay = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '初', '廿'],
+    tianGan = ['甲', '乙', '丙', '丁', '戊', '己', '庚', '辛', '壬', '癸'],
+    diZhi = ['子鼠', '丑牛', '寅虎', '卯兔', '辰龙', '巳蛇', '午马', '未羊', '申猴', '酉鸡', '戌狗', '亥猪'];
+
+// 公历转农历函数
+export const sloarToLunar = function (sy, sm, sd) {
+    // 输入的月份减1处理
+    sm -= 1;
+
+	// debugger
+    // 计算与公历基准的相差天数
+    // Date.UTC()返回的是距离公历1970年1月1日的毫秒数,传入的月份需要减1
+    let daySpan = (Date.UTC(sy, sm, sd) - Date.UTC(1949, 0, 29)) / (24 * 60 * 60 * 1000) + 1;
+    let ly, lm, ld,lz,nly;
+    // 确定输出的农历年份
+    for (let j = 0; j < lunarYearArr.length; j++) {
+        daySpan -= lunarYearDays(lunarYearArr[j]);
+        if (daySpan <= 0) {
+            ly = 1949 + j;
+            // 获取农历年份确定后的剩余天数
+            daySpan += lunarYearDays(lunarYearArr[j]);
+            break
+        }
+    }
+
+    // 确定输出的农历月份
+    for (let k = 0; k < lunarYearMonths(lunarYearArr[ly - 1949]).length; k++) {
+        daySpan -= lunarYearMonths(lunarYearArr[ly - 1949])[k];
+        if (daySpan <= 0) {
+            // 有闰月时,月份的数组长度会变成13,因此,当闰月月份小于等于k时,lm不需要加1
+            if (hasLeapMonth(lunarYearArr[ly - 1949]) && hasLeapMonth(lunarYearArr[ly - 1949]) <= k) {
+                if (hasLeapMonth(lunarYearArr[ly - 1949]) < k) {
+                    lm = k;
+                } else if (hasLeapMonth(lunarYearArr[ly - 1949]) === k) {
+                    lm = '闰' + k;
+                } else {
+                    lm = k + 1;
+                }
+            } else {
+                lm = k + 1;
+            }
+            // 获取农历月份确定后的剩余天数
+            daySpan += lunarYearMonths(lunarYearArr[ly - 1949])[k];
+            break
+        }
+    }
+
+    // 确定输出农历哪一天
+    ld = daySpan;
+
+    // 将计算出来的农历月份转换成汉字月份,闰月需要在前面加上闰字
+    if (hasLeapMonth(lunarYearArr[ly - 1949]) && (typeof (lm) === 'string' && lm.indexOf('闰') > -1)) {
+        lm = `闰${lunarMonth[/\d/.exec(lm) - 1]}`
+    } else {
+        lm = lunarMonth[lm - 1];
+    }
+nly=ly
+    // 将计算出来的农历年份转换为天干地支年
+    ly = getTianGan(ly) + getDiZhi(ly);
+    // 将计算出来的农历天数转换成汉字
+    if (ld < 11) {
+        ld = `${lunarDay[10]}${lunarDay[ld-1]}`
+    } else if (ld > 10 && ld < 20) {
+        ld = `${lunarDay[9]}${lunarDay[ld-11]}`
+    } else if (ld === 20) {
+        ld = `${lunarDay[1]}${lunarDay[9]}`
+    } else if (ld > 20 && ld < 30) {
+        ld = `${lunarDay[11]}${lunarDay[ld-21]}`
+    } else if (ld === 30) {
+        ld = `${lunarDay[2]}${lunarDay[9]}`
+    }
+    return {
+        lunarYear: ly,
+        lunarMonth: lm,
+        lunarDay: ld,
+        lunarShengXiao:lz,
+		lunarYearNum:nly,
+		lunarStr:`${nly}年${lm}月${ld}`,
+		lunarStr2:`${nly}年${lm}月${ld} (${ly})`
+    }
+};
+
+export const  getYearMonthDay = function (sy, sm, sd) {
+    // 输入的月份减1处理
+    sm -= 1;
+
+    // 计算与公历基准的相差天数
+    // Date.UTC()返回的是距离公历1970年1月1日的毫秒数,传入的月份需要减1
+    let daySpan = (Date.UTC(sy, sm, sd) - Date.UTC(1949, 0, 29)) / (24 * 60 * 60 * 1000) + 1;
+    let ly, lm, ld,lz;
+    // 确定输出的农历年份
+    for (let j = 0; j < lunarYearArr.length; j++) {
+        daySpan -= lunarYearDays(lunarYearArr[j]);
+        if (daySpan <= 0) {
+            ly = 1949 + j;
+            // 获取农历年份确定后的剩余天数
+            daySpan += lunarYearDays(lunarYearArr[j]);
+            break
+        }
+    }
+
+    // 确定输出的农历月份
+    for (let k = 0; k < lunarYearMonths(lunarYearArr[ly - 1949]).length; k++) {
+        daySpan -= lunarYearMonths(lunarYearArr[ly - 1949])[k];
+        if (daySpan <= 0) {
+            // 有闰月时,月份的数组长度会变成13,因此,当闰月月份小于等于k时,lm不需要加1
+            if (hasLeapMonth(lunarYearArr[ly - 1949]) && hasLeapMonth(lunarYearArr[ly - 1949]) <= k) {
+                if (hasLeapMonth(lunarYearArr[ly - 1949]) < k) {
+                    lm = k;
+                } else if (hasLeapMonth(lunarYearArr[ly - 1949]) === k) {
+                    lm = '闰' + k;
+                } else {
+                    lm = k + 1;
+                }
+            } else {
+                lm = k + 1;
+            }
+            // 获取农历月份确定后的剩余天数
+            daySpan += lunarYearMonths(lunarYearArr[ly - 1949])[k];
+            break
+        }
+    }
+
+    // 确定输出农历哪一天
+    ld = daySpan;
+
+    // 将计算出来的农历月份转换成汉字月份,闰月需要在前面加上闰字
+    if (hasLeapMonth(lunarYearArr[ly - 1949]) && (typeof (lm) === 'string' && lm.indexOf('闰') > -1)) {
+        lm = `闰${lunarMonth[/\d/.exec(lm) - 1]}`
+    } else {
+        lm = lunarMonth[lm - 1];
+    }
+
+    // 将计算出来的农历年份转换为天干地支年
+    ly = getTianGan(ly) + getDiZhi(ly);
+    // 将计算出来的农历天数转换成汉字
+    if (ld < 11) {
+        ld = `${lunarDay[10]}${lunarDay[ld-1]}`
+    } else if (ld > 10 && ld < 20) {
+        ld = `${lunarDay[9]}${lunarDay[ld-11]}`
+    } else if (ld === 20) {
+        ld = `${lunarDay[1]}${lunarDay[9]}`
+    } else if (ld > 20 && ld < 30) {
+        ld = `${lunarDay[11]}${lunarDay[ld-21]}`
+    } else if (ld === 30) {
+        ld = `${lunarDay[2]}${lunarDay[9]}`
+    }
+    return ld;
+};
+// 计算农历年是否有闰月,参数为存储农历年的16进制
+// 农历年份信息用16进制存储,其中16进制的最后1位可以用于判断是否有闰月
+function hasLeapMonth(ly) {
+    // 获取16进制的最后1位,需要用到&与运算符
+    if (ly & 0xf) {
+        return ly & 0xf
+    } else {
+        return false
+    }
+}
+
+// 如果有闰月,计算农历闰月天数,参数为存储农历年的16进制
+// 农历年份信息用16进制存储,其中16进制的第1位(0x除外)可以用于表示闰月是大月还是小月
+function leapMonthDays(ly) {
+    if (hasLeapMonth(ly)) {
+        // 获取16进制的第1位(0x除外)
+        return (ly & 0xf0000) ? 30 : 29
+    } else {
+        return 0
+    }
+}
+
+// 计算农历一年的总天数,参数为存储农历年的16进制
+// 农历年份信息用16进制存储,其中16进制的第2-4位(0x除外)可以用于表示正常月是大月还是小月
+function lunarYearDays(ly) {
+    let totalDays = 0;
+
+    // 获取正常月的天数,并累加
+    // 获取16进制的第2-4位,需要用到>>移位运算符
+    for (let i = 0x8000; i > 0x8; i >>= 1) {
+        let monthDays = (ly & i) ? 30 : 29;
+        totalDays += monthDays;
+    }
+    // 如果有闰月,需要把闰月的天数加上
+    if (hasLeapMonth(ly)) {
+        totalDays += leapMonthDays(ly);
+    }
+
+    return totalDays
+}
+
+// 获取农历每个月的天数
+// 参数需传入16进制数值
+function lunarYearMonths(ly) {
+    let monthArr = [];
+
+    // 获取正常月的天数,并添加到monthArr数组中
+    // 获取16进制的第2-4位,需要用到>>移位运算符
+    for (let i = 0x8000; i > 0x8; i >>= 1) {
+        monthArr.push((ly & i) ? 30 : 29);
+    }
+    // 如果有闰月,需要把闰月的天数加上
+    if (hasLeapMonth(ly)) {
+        monthArr.splice(hasLeapMonth(ly), 0, leapMonthDays(ly));
+    }
+
+    return monthArr;
+}
+
+// 将农历年转换为天干,参数为农历年
+function getTianGan(ly) {
+    let tianGanKey = (ly - 3) % 10;
+    if (tianGanKey === 0) tianGanKey = 10;
+    return tianGan[tianGanKey - 1];
+}
+
+// 将农历年转换为地支,参数为农历年
+function getDiZhi(ly) {
+    let diZhiKey = (ly - 3) % 12;
+    if (diZhiKey === 0) diZhiKey = 12;
+    return diZhi[diZhiKey - 1];
+}

+ 88 - 0
components/e-browse/e-browse - 副本.vue

@@ -0,0 +1,88 @@
+<template>
+	<view class="browse">
+		<view class="title">浏览记录</view>
+		<view class="list">
+			<view class="item" v-for="(item,index) in browse" :key="index">
+				<view class="img">
+					<view v-if="item.img == '' || item.img == 'none'">
+						<image :src="item.img" mode=""></image>
+					</view>
+					<view v-else>
+						<view class="img_tip" :style="{backgroundColor:bgColor[index]}">
+							{{item.name.split('').pop()}}
+						</view>
+					</view>
+				</view>
+				<view class="name">{{item.name}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:[
+			"browse",
+			"bgColor"
+		],
+		
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+	.browse{
+		margin-top: 20px;
+		margin-bottom: 40px;
+		.title {
+			line-height: 30px;
+			border-left: 4px solid #009FE8;
+			border-radius: 4px;
+			padding-left: 10px;
+			margin-bottom: 10px;
+		}
+		.list{
+			overflow: hidden;
+			.item{
+				float: left;
+				width: 140rpx;
+				text-align: center;
+				margin-bottom: 10px;
+				.img{
+					margin: 0 auto;
+					margin-bottom: 5px;
+					width: 120rpx;
+					height: 120rpx;
+					border-radius: 50%;
+					overflow: hidden;
+					
+					image{
+						width: 120rpx;
+						height: 120rpx;
+					}
+					
+					.img_tip{
+						width: 120rpx;
+						height: 120rpx;
+						// background-color: skyblue;
+						
+						text-align: center;
+						line-height: 120rpx;
+						color: #FFFFFF;
+					}
+				}
+				.name{
+					width: 140rpx;
+					
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+			}
+		}
+	}
+</style>

+ 103 - 0
components/e-browse/e-browse.vue

@@ -0,0 +1,103 @@
+<template>
+	<view class="browse">
+		<view class="left">
+			<view class="icon">
+				<uni-icons type="staff" size="32" color="#009FE8"></uni-icons>
+			</view>
+			<view class="text">浏览记录</view>
+		</view>
+		<view class="right" @click="go_browse()">
+			<view class="list" v-for="(item,index) in browse" :key="index">
+				<view class="item" v-if="item.img">
+					<image :src="item.img" mode=""></image>
+				</view>
+				<view v-if="!item.img" class="item" :style="{backgroundColor:bgColor[index]}">
+					{{item.name.split('').pop()}}
+				</view>
+			</view>
+			<view class="text">
+				更多记录
+			</view>
+			<view class="icon">
+				<uni-icons type="arrowright" size="22"></uni-icons>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: [
+			"browse",
+			"bgColor",
+			"mine_code",
+			"pageId"
+		],
+
+		data() {
+			return {
+
+			};
+		},
+		methods: {
+			go_browse() {
+				uni.navigateTo({
+					url: "../../index/record/record-browse/record-browse?mine_code=" + this.mine_code + "&pageId=" +
+						this.pageId
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.browse {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+
+		height: 110rpx;
+		font-size: 32rpx;
+
+		.left {
+			height: 110rpx;
+
+			display: flex;
+			align-items: center;
+
+			.icon {
+				margin-right: 10rpx;
+			}
+		}
+
+		.right {
+			height: 110rpx;
+
+			display: flex;
+			align-items: center;
+
+			.list {
+				display: flex;
+
+				.item {
+					width: 70rpx;
+					height: 70rpx;
+					border-radius: 50%;
+					overflow: hidden;
+
+					text-align: center;
+					line-height: 70rpx;
+					font-size: 28rpx;
+					color: #fff;
+
+					margin-right: 10rpx;
+
+					image {
+						width: 70rpx;
+						height: 70rpx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 60 - 0
components/e-equipment/e-equipment.vue

@@ -0,0 +1,60 @@
+<template>
+	<view>
+		<view class="equipmentList">
+			<view class="title" v-if="equipmentList">{{equipmentList[0].title}}</view>
+			<view class="list">
+				<view class="item" v-for="item in equipmentList" :key="item.id">
+					<view class="name">{{item.paramName}}</view>
+					<view class="inner">{{item.paramContent}}</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:[
+			"equipmentList"
+		],
+		data() {
+			return {
+				
+			};
+		},
+		methods:{
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.equipmentList{
+		.title{
+			line-height: 30px;
+			border-left: 4px solid #009FE8;
+			border-radius: 4px;
+			padding-left: 10px;
+			margin-bottom: 10px;
+		}
+		.list{
+			.item{
+				padding: 20rpx 25rpx;
+				border-bottom: 1rpx solid #f4f4f4;
+				
+				display: flex;
+				justify-content: space-between;
+				
+				.name{
+					white-space: nowrap;
+					overflow: hidden; 
+					text-overflow:ellipsis;
+
+				}
+				.inner{
+					color: #999;
+				}
+			}
+		}
+	}
+</style>

+ 100 - 0
components/e-file/e-file.vue

@@ -0,0 +1,100 @@
+<template>
+	<view>
+		<view class="fileList">
+			<view class="title" v-if="fileList[0].title">{{fileList[0].title}}</view>
+			<view class="list">
+				<view class="item" v-for="item in fileList" :key="item.id" @click="detail(item.filePath,item.fileName)">
+					<view class="icon">
+						<!-- <uni-icons type="paperplane" size="30" color="#009FE8"></uni-icons> -->
+						<image v-if="item.filePath.indexOf('.doc') != -1" src="./icon/wj-doc.png"></image>
+						<image v-if="item.filePath.indexOf('.xls') != -1" src="./icon/wj-xls.png"></image>
+						<image v-if="item.filePath.indexOf('.pdf') != -1" src="./icon/wj-pdf.png"></image>
+						<image v-if="item.filePath.indexOf('.ppt') != -1" src="./icon/wj-ppt.png"></image>
+					</view>
+					<view>
+						<view class="name">{{item.fileName}}</view>
+						<view class="size">{{item.fileSize}}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: [
+			"fileList"
+		],
+		data() {
+			return {
+
+			};
+		},
+		methods: {
+			detail(filePath,name) {
+				uni.downloadFile({
+					url: filePath,
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							success: function(res) {
+								console.log('打开文档成功');
+							}
+						});
+					}
+				});
+				// #ifndef APP-PLUS
+				uni.navigateTo({
+					// url:"../../pages/file/file?path=" + filePath + "&name=" + name,
+					url:"../../pages/record/record_link/record_link?name=" + name + "&url=" + filePath
+				})
+				// #endif
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.fileList {
+		.title {
+			line-height: 30px;
+			border-left: 4px solid #009FE8;
+			border-radius: 4px;
+			padding-left: 10px;
+			margin-bottom: 10px;
+		}
+
+		.list {
+			.item {
+				padding: 20rpx 25rpx;
+				border-bottom: 1px solid #f4f4f4;
+
+				display: flex;
+				align-items: center;
+
+				.icon {
+					padding-right: 30rpx;
+					
+					image{
+						width: 52rpx;
+						height: 72rpx;
+					}
+				}
+
+				.name {
+					width: 540rpx;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+
+				.size {
+					font-size: 14px;
+					color: #999;
+				}
+			}
+		}
+	}
+</style>

BIN
components/e-file/icon/wj-doc.png


BIN
components/e-file/icon/wj-jpg.png


BIN
components/e-file/icon/wj-pdf.png


BIN
components/e-file/icon/wj-png.png


BIN
components/e-file/icon/wj-ppt.png


BIN
components/e-file/icon/wj-txt.png


BIN
components/e-file/icon/wj-xls.png


+ 47 - 0
components/e-image-text/e-image-text.vue

@@ -0,0 +1,47 @@
+<template>
+	<view>
+		<view class="imageText">
+			<view class="title">{{imageText.title}}</view>
+			<view class="img" v-if="imageText.imageUrl">
+				<image :src="imageText.imageUrl" mode="widthFix"></image>
+			</view>
+			<view class="content">
+				<view v-html="imageText.dataContent"></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:[
+			"imageText"
+		],
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+	.imageText{
+		.title{
+			line-height: 30px;
+			border-left: 4px solid #009FE8;
+			border-radius: 4px;
+			padding-left: 10px;
+			margin-bottom: 10px;
+		}
+		.img{
+			width: 700rpx;
+			image{
+				width: 100%;
+			}
+		}
+		.content{
+			
+		}
+	}
+</style>

+ 605 - 0
components/e-link/e-link.vue

@@ -0,0 +1,605 @@
+<template>
+	<view>
+		<view class="linksList">
+			<view class="title" v-if="linksList[0].title">{{linksList[0].title}}</view>
+
+			<view v-if="linksList[0].types == 11">
+				<view class="list_11">
+					<view class="item" v-for="item in linksList" :key="item.id" @click="go_page(item)">
+						<view class="left">
+							<view class="icon">
+								<view class="img"
+									v-if="item.imageUrl == '../../static/images/link.png' || item.imageUrl == ''">
+									<uni-icons type="paperclip" size="30"></uni-icons>
+								</view>
+								<view class="img" v-else>
+									<image :src="item.imageUrl" mode=""></image>
+								</view>
+							</view>
+							<view class="name">{{item.linkName}}</view>
+						</view>
+						<view class="right">
+							<uni-icons type="arrowright" size="20"></uni-icons>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view v-if="linksList[0].types == 12">
+				<view class="list_12">
+					<view class="item" v-for="item in linksList" :key="item.id" @click="go_page(item)">
+						<view class="icon">
+							<view class="img"
+								v-if="item.imageUrl == '../../static/images/link.png'  || item.imageUrl == ''">
+								<uni-icons type="paperclip" size="30"></uni-icons>
+							</view>
+							<view class="img" v-else>
+								<image :src="item.imageUrl" mode=""></image>
+							</view>
+						</view>
+						<view class="name">{{item.linkName}}</view>
+					</view>
+				</view>
+			</view>
+			<view v-if="linksList[0].types == 13">
+				<view class="list_13">
+					<view class="item" v-for="item in linksList" :key="item.id" @click="go_page(item)">
+						<view class="icon">
+							<view class="img"
+								v-if="item.imageUrl == '../../static/images/link.png'  || item.imageUrl == ''">
+								<uni-icons type="paperclip" size="30"></uni-icons>
+							</view>
+							<view class="img" v-else>
+								<image :src="item.imageUrl" mode=""></image>
+							</view>
+						</view>
+						<view class="name">{{item.linkName}}</view>
+					</view>
+				</view>
+			</view>
+			<view v-if="linksList[0].types == 14">
+				<view class="list_14">
+					<view class="item" v-for="item in linksList" :key="item.id" @click="go_page(item)">
+						<view class="icon">
+							<view class="img"
+								v-if="item.imageUrl == '../../static/images/link.png'  || item.imageUrl == ''">
+								<uni-icons type="paperclip" size="30"></uni-icons>
+							</view>
+							<view class="img" v-else>
+								<image :src="item.imageUrl" mode=""></image>
+							</view>
+						</view>
+						<view class="name">{{item.linkName}}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	
+	
+		<!-- 宁煤信息平台登录框 -->
+		<uni-popup ref="popup" type="center" @maskClick="maskClick">
+			<view class="login_box">
+				<view class="input_box">
+					<view class="label">工号:</view>
+					<view class="box">
+						{{staff_num}}
+					</view>
+				</view>
+				<view class="input_box">
+					<view class="label">登录密码(宁煤信息平台):</view>
+					<view class="box">
+						<input type="password" v-model="password" />
+					</view>
+				</view>
+				<view class="btn" @click="login()">确认</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		set_base_url
+	} from '@/common/set_base_url.js'
+	import time from "@/common/time.js"
+	import {
+		diffTime
+	} from "@/common/time.js"
+	import {
+		goToLink
+	} from "@/common/common.js"
+	export default {
+		props: [
+			"linksList",
+			"mine_code"
+		],
+		data() {
+			return {
+				staff_num: "",
+				password: "",
+				
+				url: "",
+				
+				app_id: "",
+				gps: "",
+				deviceID: "",
+				phoneType: ""
+			};
+		},
+		mounted() {
+			this.staff_num = uni.getStorageSync('user').staff_num
+		},
+		methods: {
+			maskClick() {
+				this.password = ""
+			},
+			login() {
+				// #ifdef APP-PLUS
+				if (this.password == '') {
+					uni.showToast({
+						icon: "none",
+						title: "密码不能为空!"
+					})
+					return
+				}
+			
+				this.$refs.popup.close()
+				// 获取gps
+				uni.getLocation({
+					type: 'wgs84',
+					success: (res) => {
+						console.log('当前位置的经度:' + res.longitude);
+						console.log('当前位置的纬度:' + res.latitude);
+			
+						this.gps = res.longitude + ',' + res.latitude
+						// 获取设备信息
+						plus.device.getInfo({
+							success: (e) => {
+								console.log(JSON.stringify(e.uuid));
+								console.log(plus.device.model)
+			
+								this.deviceID = JSON.stringify(e.uuid)
+								this.phoneType = plus.device.model
+			
+			
+								uni.request({
+									method: "POST",
+									url: "http://mtyyxs.shnxmyjt.com:33300/api/OAuth/Login",
+									header: {
+										'Content-Type': 'application/json;charset=UTF-8',
+										'caller': 'UnifiedPortal'
+									},
+									data: {
+										phoneType: this.phoneType,
+										password: this.password,
+										gps: this.gps,
+										userID: this.staff_num,
+										resolvingPower: "851*393",
+										deviceID: this.deviceID,
+										ip: "112312313"
+									},
+									success: (res) => {
+										console.log(this.password)
+										console.log(res)
+			
+										if (res.data.code = '11002') {
+											uni.showToast({
+												icon: "none",
+												title: res.data.msg
+											})
+			
+											if (res.data.data.length > 20) {
+												uni.setStorageSync('ningmei_token', res
+													.data.data)
+												uni.setStorageSync(
+													'ningmei_token_time',
+													new Date().format("yyyy-MM-dd")
+													)
+												uni.navigateTo({
+													url: "../../index/ningMeiXinXiPingTai/ningMeiXinXiPingTai",
+													success: (res) => {
+														// 通过eventChannel向被打开页面传送数据
+														res.eventChannel
+															.emit(
+																'acceptDataFromOpenerPage', {
+																	data: this
+																		.url
+																})
+													}
+												})
+											}
+										}
+									}
+								})
+			
+							}
+						});
+			
+			
+					}
+				})
+				// #endif
+			
+			},
+			go_page(item){
+				// console.log(item)
+				
+				let link = item.linkUrl
+				// console.log(link)
+				
+				// OA系统
+				if(link.indexOf("oa_system.nxjiewei.com") != -1 ){
+					uni.navigateTo({
+						url:"../../origanization/OA/h5/h5",
+						success: (res) =>{
+							// 通过eventChannel向被打开页面传送数据
+							res.eventChannel.emit('acceptDataFromOpenerPage', {
+								url: link,
+								title: item.title
+							})
+						}
+					})
+					
+					return
+				}
+				
+				
+				if (link.indexOf("nativeApp://") != -1) {
+					let app_name = link.match(/nativeApp:\/\/(\S*)\?/)[1]
+					let app_down_link = link.split('?')[1]
+				
+					// #ifdef APP
+					if (plus.os.name == 'Android') {
+				
+						plus.runtime.launchApplication({
+							pname: app_name
+						}, (e) => {
+							console.log('Open system default browser failed: ' + e.message)
+				
+							uni.showModal({
+								title: app_name,
+								content: '未安装此应用、是否下载?',
+								success: (res) => {
+									if (res.confirm) {
+										console.log('用户点击确定');
+				
+										uni.navigateTo({
+											url: "../../index/h5/h5?url=" + app_down_link
+										})
+									} else if (res.cancel) {
+										console.log('用户点击取消');
+									}
+								}
+							});
+						})
+					}
+					
+					return
+					// #endif
+				}
+				
+				if (link.indexOf("http://mtyyxs.shnxmyjt.com") != -1) {
+					console.log("信息平台")
+				
+					this.url = item
+					// 有登录记录
+					let token = uni.getStorageSync('ningmei_token')
+					let time = uni.getStorageSync('ningmei_token_time')
+					// 30天刷新一次
+					let diffTimeShow = diffTime(time, new Date().format("yyyy-MM-dd")).split(' ')[0];
+					console.log(diffTimeShow)
+					if (token.length > 20 && diffTimeShow < 30) {
+						uni.navigateTo({
+							url: "../../index/ningMeiXinXiPingTai/ningMeiXinXiPingTai",
+							success: (res) => {
+								// 通过eventChannel向被打开页面传送数据
+								res.eventChannel.emit('acceptDataFromOpenerPage', {
+									data: this.url
+								})
+							}
+						})
+					} else {
+						this.$refs.popup.open()
+					}
+					
+					return
+				}
+				
+				// 二维码
+				if(link.indexOf("pageId") != -1 && link.indexOf("app:") == -1){
+					let pageId = ""
+					function GetQueryString(name) {
+						var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+						var r = link.match(reg);
+						if (r != null) return unescape(r[2]);
+						return null;
+					}
+					console.log(GetQueryString("pageId"))
+					if (GetQueryString("pageId")) {
+						pageId = GetQueryString("pageId")
+					} else {
+						pageId = link.split('=')[1]
+					}
+					
+					uni.navigateTo({
+						url:"../../index/record/record?pageId=" + pageId + "&mine_code=" + this.mine_code,
+					})
+				}
+				// h5
+				if(link.indexOf("pageId") == -1 && link.indexOf("app:") == -1){
+					if(link.indexOf("huiyiList") != -1){
+						uni.navigateTo({
+							url:"../../workbench/meeting_arrangements/meeting_arrangements"
+						})
+					}else{
+						uni.navigateTo({
+							url: "../../index/record/h5/h5?url=" + link
+						})
+					}
+				}
+				// 原生
+				if(link.indexOf("pageId") == -1 && link.indexOf("app:") != -1){
+					// console.log("原生")
+					if (link.indexOf("/production/production") != -1) {
+						uni.switchTab({
+							url: "../../tabbar/production/production"
+						})
+					}
+					
+					
+					if (link.indexOf("app_url") != -1) {
+						// console.log(link.split('app_url=')[1] + "&title=" + item.linkName + "&mine_code=" + this.mine_code)
+						uni.navigateTo({
+							url:link.split('app_url=')[1] + "&title=" + item.linkName + "&mine_code=" + this.mine_code
+						})
+						
+					}
+					
+					if (link.indexOf("nativeApp://") != -1) {
+						
+						let app_name = link.match(/nativeApp:\/\/(\S*)\?/)[1]
+						let app_down_link = link.split('?')[1]
+					
+						console.log(app_name,app_down_link)
+					
+						// #ifdef APP
+						if (plus.os.name == 'Android') {
+					
+							plus.runtime.launchApplication({
+								pname: app_name
+							}, (e) => {
+								console.log('Open system default browser failed: ' + e.message)
+					
+								uni.showModal({
+									title: app_name,
+									content: '未安装此应用、是否下载?',
+									success: (res) => {
+										if (res.confirm) {
+											console.log('用户点击确定');
+					
+											uni.navigateTo({
+												url: "../../index/h5/h5?url=" + app_down_link
+											})
+										} else if (res.cancel) {
+											console.log('用户点击取消');
+										}
+									}
+								});
+							})
+						}
+						// #endif
+					} 
+					
+				}
+				
+				
+			
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.linksList {
+		.title {
+			line-height: 30px;
+			border-left: 4px solid #009FE8;
+			border-radius: 4px;
+			padding-left: 10px;
+			margin-bottom: 10px;
+		}
+
+		// 一行一项
+		.list_11 {
+			.item {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				padding: 10px 0;
+				border-bottom: 1px solid #f4f4f4;
+
+				.left {
+					display: flex;
+					align-items: center;
+
+					.icon {
+						width: 60px;
+						line-height: 80rpx;
+						margin-right: 10rpx;
+
+						.img {
+							width: 60px;
+							height: 80rpx;
+							line-height: 80rpx;
+							text-align: center;
+
+							image {
+								width: 80rpx;
+								height: 80rpx;
+							}
+						}
+					}
+
+					.name {
+						width: 500rpx;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
+					}
+				}
+
+				.right {}
+			}
+		}
+
+		// 一行两项
+		.list_12 {
+			display: flex;
+			flex-wrap: wrap;
+
+			.item {
+				width: 320rpx;
+				display: flex;
+				align-items: center;
+				margin-left: 10rpx;
+				// border-right: 1px solid #f4f4f4;
+				padding-right: 10rpx;
+				margin-bottom: 10px;
+
+				.icon {
+					margin-right: 30rpx;
+
+					.img {
+						image {
+							width: 90rpx;
+							height: 90rpx;
+						}
+					}
+				}
+
+				.name {
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+			}
+
+			.item:nth-child(2n) {
+				border-right: none;
+			}
+		}
+
+		// 一行三项
+		.list_13 {
+			overflow: hidden;
+
+			.item {
+				float: left;
+				width: 210rpx;
+				text-align: center;
+				margin-bottom: 10px;
+				margin-right: 35rpx;
+
+				.icon {
+					width: 210rpx;
+
+					.img {
+						width: 210rpx;
+						line-height: 30px;
+						text-align: center;
+
+						image {
+							width: 90rpx;
+							height: 90rpx;
+						}
+					}
+				}
+
+				.name {
+					margin-top: 10rpx;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+			}
+
+			.item:nth-child(3n) {
+				margin-right: 0;
+			}
+		}
+
+		// 一行四项
+		.list_14 {
+			overflow: hidden;
+
+			.item {
+				float: left;
+				width: 175rpx;
+				text-align: center;
+				margin-bottom: 10px;
+
+				.icon {
+					width: 175rpx;
+
+					.img {
+						width: 175rpx;
+						line-height: 30px;
+						text-align: center;
+
+						image {
+							width: 50px;
+							height: 50px;
+						}
+					}
+				}
+
+				.name {
+					margin-top: 10rpx;
+
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+			}
+		}
+
+	}
+	
+	.login_box {
+		width: 500rpx;
+		padding: 30rpx 50rpx;
+		border-radius: 20rpx;
+		margin: 0 auto;
+		background-color: #FFFFFF;
+	
+		.input_box {
+			margin-bottom: 30rpx;
+	
+			.label {
+				color: #6C6F74;
+				margin-bottom: 20rpx;
+			}
+	
+			.box {
+				background: #FFFFFF;
+				border-radius: 8rpx;
+				border: 2rpx solid #E9EBF2;
+	
+				box-sizing: border-box;
+				padding: 20rpx 25rpx;
+	
+			}
+		}
+	
+		.btn {
+			width: 500rpx;
+			margin: 0 auto;
+			border-radius: 8rpx;
+			background-color: #009FE8;
+			line-height: 90rpx;
+			color: #FFFFFF;
+			text-align: center;
+		}
+	}
+</style>

+ 121 - 0
components/e-picture/e-picture.vue

@@ -0,0 +1,121 @@
+<template>
+	<view>
+		<view class="pictureList">
+			<view class="title">{{pictureList[0].title}}</view>
+			
+			<view v-if="pictureList[0].imageType == 10">
+				<view class="list_10">
+					<swiper class="box" autoplay="true" interval="3000" circular="true">
+						<swiper-item class="item" v-for="item in pictureList" :key="item.id">
+							<view class="swiper-item">
+								<image :src="item.imageUrl" mode="aspectFit"></image>
+							</view>
+						</swiper-item>
+					</swiper>
+				</view>
+			</view>
+			<view v-if="pictureList[0].imageType == 11">
+				<view class="list_11">
+					<view class="item" v-for="item in pictureList" :key="item.id">
+						<view class="img">
+							<image :src="item.imageUrl" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view v-if="pictureList[0].imageType == 12">
+				<view class="list_12">
+					<view class="item" v-for="item in pictureList" :key="item.id">
+						<view class="img">
+							<image :src="item.imageUrl" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:[
+			"pictureList"
+		],
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+	.pictureList{
+		.title{
+			line-height: 30px;
+			border-left: 4px solid #009FE8;
+			border-radius: 4px;
+			padding-left: 10px;
+			margin-bottom: 10px;
+		}
+		
+		// 轮播图
+		.list_10{
+			height: 240px;
+			.box{
+				width: 700rpx;
+				height: 220px;
+				.item{
+					.swiper-item{
+						height: 220px;
+						image{
+							width: 100%;
+							height: 220px;
+						}
+					}
+				}
+			}
+		}
+		
+		// 一行两张
+		.list_11{
+			overflow: hidden;
+			.item{
+				float: left;
+				margin-right: 20rpx;
+				margin-bottom: 10px;
+				.img{
+					width: 340rpx;
+					height: 140px;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+			.item:nth-child(2n){
+				margin-right: 0;
+			}
+		}
+		// 一行三张
+		.list_12{
+			overflow: hidden;
+			.item{
+				float: left;
+				margin-right: 35rpx;
+				margin-bottom: 10px;
+				.img{
+					width: 210rpx;
+					height: 100px;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+			.item:nth-child(3n){
+				margin-right: 0;
+			}
+		}
+	}
+</style>

+ 113 - 0
components/e-record/e-record.vue

@@ -0,0 +1,113 @@
+<template>
+	<view>
+		<view class="recordList">
+			<view class="title">记录列表</view>
+			
+			
+			<scroll-view scroll-x="true" >
+				<view class="list">
+					<view class="item" :class="{active:active==index}" v-for="(item,index) in recordList" :key="index" @click="click_active(index,item)">{{item.templateName}}</view>
+				</view>
+			</scroll-view>
+			
+			<view class="content">
+				<view class="inner" v-for="(item,index) in instanceList" :key="index">
+					<view style="color: #009FE8;">记录时间 : {{item[0].createDate}}</view>
+					<view style="color: #009FE8;">{{item[0].templateName}}</view>
+					<view>{{item[0].createName}}</view>
+					<view v-for="(item_2,index_2) in item[0].recordStatusInstanceList" :key="index_2">
+						<view> <span style="color: #999999;">{{item_2.statusName}} :</span> {{item_2.recordStatusInstanceValue}}</view>
+					</view>
+					<view style="color: #009FE8;" v-if="item[0].statusFlag">结束 : {{item[0].createDate}}</view>
+					<view style="color: #F0AD4E;" v-else>等待处理...</view>
+				</view>
+			</view>
+			
+			
+			<view class="more">查看更多</view>
+			
+				
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: [
+			"recordList",
+			"instanceList"
+		],
+		data() {
+			return {
+				active:0
+			};
+		},
+		methods: {
+			click_active(index,item){
+				this.active = index
+				this.$emit("set_parentId",item.parentId)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.recordList {
+		width: 700rpx;
+		.title {
+			line-height: 30px;
+			border-left: 4px solid #009FE8;
+			border-radius: 4px;
+			padding-left: 10px;
+			margin-bottom: 10px;
+		}
+		
+		.list{
+			width: 400%;
+			padding: 8px 0;
+			border-top: 1px solid #ccc;
+			border-bottom: 1px solid #ccc;
+			cursor: pointer;
+			
+			display: flex;
+			
+			.item{
+				margin-right: 15px;
+				border: 1px solid #ccc;
+				color: #ccc;
+				font-size: 17px;
+				padding: 4px 8px;
+				border-radius: 4px;
+			}
+			.active{
+				background-color: #009FE8;
+				color: #fff;
+			}
+		}
+		
+		.content{
+			padding:10rpx;
+			.inner{
+				box-sizing: border-box;
+				padding: 10px 30rpx;
+				width: 680rpx;
+				border: 1px dashed #ccc;
+				border-radius: 10px;
+				margin-bottom: 10px;
+			}
+			
+		}
+
+		
+	}
+
+
+	.more{
+		text-align: center;
+		line-height: 60px;
+		font-size: 18px;
+		border-bottom: 2px solid #C0C0C0;
+		margin: 0 -25rpx;
+	}
+</style>

+ 38 - 0
components/e-text/e-text.vue

@@ -0,0 +1,38 @@
+<template>
+	<view>
+		<view class="textVo">
+			<view class="title">{{textVo.title}}</view>
+			<view class="text">
+				<view v-html="textVo.dataContent"></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:[
+			"textVo"
+		],
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+	.textVo{
+		.title{
+			line-height: 30px;
+			border-left: 4px solid #009FE8;
+			border-radius: 4px;
+			padding-left: 10px;
+			margin-bottom: 10px;
+		}
+		.text{
+			text-indent: 2rem;
+		}
+	}
+</style>

+ 64 - 0
components/e-video/e-video - 视频列表副本.vue

@@ -0,0 +1,64 @@
+<template>
+	<view>
+		<view class="videoList">
+			<view class="title">{{videoList[0].title}}</view>
+			<view class="list">
+				<view class="item" v-for="item in videoList" :key="item.id">
+					<view class="name">{{item.videoName}}</view>
+					<view class="icon" @click="detail(item.videoUrl,item.videoName)">
+						<uni-icons type="videocam" size="24" color="#009FE8"></uni-icons>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:[
+			"videoList"
+		],
+		data() {
+			return {
+				
+			};
+		},
+		methods:{
+			detail(path,name){
+				console.log(path)
+				uni.navigateTo({
+					url:"../../index/record/record-video/record-video?name=" + name + "&url=" + path
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.videoList{
+		.title{
+			line-height: 30px;
+			border-left: 4px solid #009FE8;
+			border-radius: 4px;
+			padding-left: 10px;
+			margin-bottom: 10px;
+		}.list{
+			.item{
+				padding: 20rpx 25rpx;
+				border-bottom: 1rpx solid #f4f4f4;
+				
+				display: flex;
+				justify-content: space-between;
+				.name{
+					white-space: nowrap;
+					overflow: hidden; 
+					text-overflow:ellipsis;
+				}
+				.icon{
+					padding-left: 50rpx;
+				}
+			}
+		}
+	}
+</style>

+ 77 - 0
components/e-video/e-video.vue

@@ -0,0 +1,77 @@
+<template>
+	<view>
+		<view class="videoList">
+			<view class="title">{{videoList[0].title}}</view>
+			<view class="list">
+				<!-- <view class="item" v-for="item in videoList" :key="item.id">
+					<view class="name">{{item.videoName}}</view>
+					<view class="icon" @click="detail(item.videoUrl,item.videoName)">
+						<uni-icons type="videocam" size="24" color="#009FE8"></uni-icons>
+					</view>
+				</view> -->
+				<view class="item" v-for="item in videoList" :key="item.id" v-if="item.videoUrl != ''">
+					<video :poster="poster[poster_index]" :src="item.videoUrl" controls object-fit="fill" style="width: 100%;"></video>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:[
+			"videoList"
+		],
+		data() {
+			return {
+				poster:[
+					"https://img1.baidu.com/it/u=574276659,2777898124&fm=253&fmt=auto&app=138&f=JPEG?w=550&h=364"
+				],
+				poster_index:0
+			};
+		},
+		mounted() {
+			// this.poster_index = Math.floor(Math.random()*10)
+			// console.log(this.poster_index)
+		},
+		methods:{
+			detail(path,name){
+				console.log(path)
+				uni.navigateTo({
+					url:"../../index/record/record-video/record-video?name=" + name + "&url=" + path
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.videoList{
+		.title{
+			line-height: 30px;
+			border-left: 4px solid #009FE8;
+			border-radius: 4px;
+			padding-left: 10px;
+			margin-bottom: 10px;
+		}.list{
+			.item{
+				// padding: 20rpx 25rpx;
+				// border-bottom: 1rpx solid #f4f4f4;
+				margin-bottom: 20rpx;
+				border-radius: 14rpx;
+				overflow: hidden;
+				
+				display: flex;
+				justify-content: space-between;
+				.name{
+					white-space: nowrap;
+					overflow: hidden; 
+					text-overflow:ellipsis;
+				}
+				.icon{
+					padding-left: 50rpx;
+				}
+			}
+		}
+	}
+</style>

+ 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


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

@@ -0,0 +1,310 @@
+<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() {
+				uni.showLoading({
+					mask: true
+				})
+				this.$p_api.jt_safety_info_part({
+					mine_code: this.mine_code_index
+				}).then((res) => {
+					uni.hideLoading()
+					// 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)
+
+				uni.navigateTo({
+					url: "../../production/safety_monitoring/safety_monitoring?mine=" + 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>

+ 104 - 0
components/navbar/navbar.vue

@@ -0,0 +1,104 @@
+<template>
+	<view>
+		<view class="navbar">
+			<view class="status_bar"></view>
+
+			<view class="box">
+				<view class="left" @click="navbar_back()">
+					<uni-icons type="arrowleft" color="#fff" size="26"></uni-icons>
+				</view>
+				<view class="title">
+					<slot name="title"></slot>
+				</view>
+				<view class="right" @click="navbar_right()">
+					<slot name="icon"></slot>
+				</view>
+			</view>
+		</view>
+		<view class="status_bar"></view>
+		<view style="height: 88rpx;"></view>
+		
+		<!-- 使用 -->
+		<!-- <navbar @click_right="query()">
+			<template #title>
+				水文监测
+			</template>
+			<template #icon>
+				<image src="./icon/icon.png" mode=""></image>
+			</template>
+		</navbar> -->
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "navbar",
+		props: [
+			"icon"
+		],
+		data() {
+			return {
+
+			};
+		},
+		methods:{
+			navbar_back() {
+				uni.navigateBack()
+			},
+			navbar_right(){
+				this.$emit("click_right")
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	// 标题栏
+	.navbar {
+		z-index: 999;
+		width: 750rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		background-color: #009FE8;
+
+		color: #FFFFFF;
+
+		.box {
+			background-color: #009FE8;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			height: 88rpx;
+
+			.left {
+				width: 80rpx;
+				height: 88rpx;
+				line-height: 88rpx;
+				text-align: center;
+			}
+
+			.title {
+				width: 500rpx;
+				text-align: center;
+				font-size: 36rpx;
+				height: 88rpx;
+				line-height: 88rpx;
+				font-weight: 500;
+
+				white-space: nowrap;
+				text-overflow: ellipsis;
+				overflow: hidden;
+			}
+
+			.right {
+				width: 80rpx;
+				height: 88rpx;
+				text-align: left;
+				display: flex;
+				align-items: center;
+			}
+		}
+	}
+</style>

+ 178 - 0
components/ningmei-login-box/ningmei-login-box.vue

@@ -0,0 +1,178 @@
+<template>
+	<view>
+		<!-- 宁煤信息平台登录框 -->
+		<uni-popup ref="popup" type="center" @maskClick="maskClick">
+			<view class="login_box">
+				<view class="input_box">
+					<view class="label">工号:</view>
+					<view class="box">
+						{{staff_num}}
+					</view>
+				</view>
+				<view class="input_box">
+					<view class="label">登录密码(宁煤信息平台):</view>
+					<view class="box">
+						<input type="password" v-model="password" />
+					</view>
+				</view>
+				<view class="btn" @click="login()">确认</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import time from "@/common/time.js"
+	export default {
+		name:"ningmei_login_box",
+		data() {
+			return {
+				staff_num: "",
+				password: "",
+				
+				url: "",
+				
+				app_id: "",
+				gps: "",
+				deviceID: "",
+				phoneType: ""
+			};
+		},
+		mounted() {
+			this.staff_num = uni.getStorageSync('user').staff_num
+		},
+		methods:{
+			maskClick() {
+				this.password = ""
+			},
+			login() {
+				// #ifdef APP-PLUS
+				if (this.password == '') {
+					uni.showToast({
+						icon: "none",
+						title: "密码不能为空!"
+					})
+					return
+				}
+			
+				this.$refs.popup.close()
+				// 获取gps
+				uni.getLocation({
+					type: 'wgs84',
+					success: (res) => {
+						console.log('当前位置的经度:' + res.longitude);
+						console.log('当前位置的纬度:' + res.latitude);
+			
+						this.gps = res.longitude + ',' + res.latitude
+						// 获取设备信息
+						plus.device.getInfo({
+							success: (e) => {
+								console.log(JSON.stringify(e.uuid));
+								console.log(plus.device.model)
+			
+								this.deviceID = JSON.stringify(e.uuid)
+								this.phoneType = plus.device.model
+			
+			
+								uni.request({
+									method: "POST",
+									url: "http://mtyyxs.shnxmyjt.com:33300/api/OAuth/Login",
+									header: {
+										'Content-Type': 'application/json;charset=UTF-8',
+										'caller': 'UnifiedPortal'
+									},
+									data: {
+										phoneType: this.phoneType,
+										password: this.password,
+										gps: this.gps,
+										userID: this.staff_num,
+										resolvingPower: "851*393",
+										deviceID: this.deviceID,
+										ip: "112312313"
+									},
+									success: (res) => {
+										console.log(this.password)
+										console.log(res)
+			
+										if (res.data.code = '11002') {
+											uni.showToast({
+												icon: "none",
+												title: res.data.msg
+											})
+			
+											if (res.data.data.length > 20) {
+												uni.setStorageSync('ningmei_token', res
+													.data.data)
+												uni.setStorageSync(
+													'ningmei_token_time',
+													new Date().format("yyyy-MM-dd")
+												)
+												uni.navigateTo({
+													url: "../../index/ningMeiXinXiPingTai/ningMeiXinXiPingTai",
+													success: (res) => {
+														// 通过eventChannel向被打开页面传送数据
+														res.eventChannel
+															.emit(
+																'acceptDataFromOpenerPage', {
+																	data: this
+																		.url
+																})
+													}
+												})
+											}
+										}
+									}
+								})
+			
+							}
+						});
+			
+			
+					}
+				})
+				// #endif
+			
+			}
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.login_box {
+		width: 500rpx;
+		padding: 30rpx 50rpx;
+		border-radius: 20rpx;
+		margin: 0 auto;
+		background-color: #FFFFFF;
+	
+		.input_box {
+			margin-bottom: 30rpx;
+	
+			.label {
+				color: #6C6F74;
+				margin-bottom: 20rpx;
+			}
+	
+			.box {
+				background: #FFFFFF;
+				border-radius: 8rpx;
+				border: 2rpx solid #E9EBF2;
+	
+				box-sizing: border-box;
+				padding: 20rpx 25rpx;
+	
+			}
+		}
+	
+		.btn {
+			width: 500rpx;
+			margin: 0 auto;
+			border-radius: 8rpx;
+			background-color: #009FE8;
+			line-height: 90rpx;
+			color: #FFFFFF;
+			text-align: center;
+		}
+	}
+</style>

BIN
components/openingNotice/icon/icon.png


+ 121 - 0
components/openingNotice/openingNotice.vue

@@ -0,0 +1,121 @@
+<template>
+	<view>
+		<uni-popup ref="popup">
+			<view class="box">
+				<view class="content">
+					<view class="title">
+						<view class="icon">
+							<image src="./icon/icon.png" mode="scaleToFill"></image>
+						</view>
+						<view class="text" v-if="data.title != ''">{{data.title || '通知'}}</view>
+						<view class="close"  @click.stop="maskClick()">
+							<uni-icons type="closeempty" size="26" color="#ccc"></uni-icons>
+						</view>
+					</view>
+					<scroll-view scroll-y>
+						<view class="inner">
+							<view v-html="data.content"></view>
+						</view>
+					</scroll-view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "openingNotice",
+		data() {
+			return {
+				data: {}
+			};
+		},
+		mounted() {
+			this.get_notify_getNotifyOne()
+		},
+		methods: {
+			get_notify_getNotifyOne() {
+				this.$api.notify_getNotifyOne({
+
+				}).then((res)=>{
+					// console.log(res)
+
+					if(res.data.code == 0 && res.data.data != null){
+						this.data = res.data.data
+
+						this.$refs.popup.open('top')
+
+						setTimeout(()=>{
+							// this.$refs.popup.close()
+						},4000)
+					}else{
+						// console.log("已读")
+					}
+
+				})
+			},
+			maskClick(){
+				this.$refs.popup.close()
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.box {
+		height: 100vh;
+		display: flex;
+		align-items: center;
+	}
+
+	.content {
+		z-index: 99;
+		margin: 0 auto;
+		width: 700rpx;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+
+		box-sizing: border-box;
+		padding: 25rpx;
+
+		.title {
+			position: relative;
+			
+			height: 90rpx;
+			line-height: 90rpx;
+			font-size: 38rpx;
+			font-weight: 700;
+			text-align: center;
+			
+			padding-top: 20rpx;
+
+			.icon {
+				position: absolute;
+				top: -160rpx;
+				left: 0;
+
+				image {
+					width: 218rpx;
+					height: 193rpx;
+				}
+			}
+			.text{
+				border-bottom: 1rpx solid #E1E5E9;
+			}
+			.close{
+				position: absolute;
+				top: -10rpx;
+				right: 0;
+			}
+		}
+
+		.inner {
+			height: 50vh;
+			// text-indent: 2rem;
+			
+			box-sizing: border-box;
+			padding: 20rpx 0;
+		}
+	}
+</style>

BIN
components/origanizationItem/icon/close.png


BIN
components/origanizationItem/icon/open.png


BIN
components/origanizationItem/icon/title_icon.png


+ 241 - 0
components/origanizationItem/origanizationItem.vue

@@ -0,0 +1,241 @@
+<template>
+	<view>
+		<view class="section" v-for="(item,index) in data" :key="index">
+			<view class="box">
+				<view class="item">
+					<view class="left">
+						<view class="icon" v-if="active == index" @click.stop="change_active(index,item)">
+							<image src="./icon/close.png" mode=""></image>
+						</view>
+						<view class="icon" v-if="active != index" @click.stop="change_active(index,item)">
+							<image src="./icon/open.png" mode=""></image>
+						</view>
+						<view class="text" v-if="item.children.length == 0">{{item.title}} ({{item.user_num}})</view>
+						<view class="text" v-if="item.children != 0">{{item.title}}</view>
+					</view>
+					<view class="right" @click="go_record(item.page_id)">
+						<uni-icons type="eye"></uni-icons>
+					</view>
+				</view>
+				<view class="children" v-show="active == index">
+					<view class="list" v-show="item.children == 0">
+						<view class="item" v-for="(item_2,index_2) in user_list" :key="index_2"
+							@click="go_user_info(item_2.staff_num)">
+							<view class="left">
+								<view class="icon">{{item_2.name.charAt(0)}}</view>
+								<!-- #ifdef APP-PLUS -->
+								<view class="text">{{item_2.name}} {{item_2.position_name}}</view>
+								<!-- #endif -->
+								<!-- #ifdef H5 -->
+								<view class="text">{{item_2.name}} {{item_2.position_name}} {{item_2.mobile}}</view>
+								<!-- #endif -->
+							</view>
+				
+							<!-- #ifdef APP-PLUS -->
+							<view class="right" @click.stop="phone(item_2.mobile)">
+								<uni-icons type="phone"></uni-icons>
+							</view>
+							<!-- #endif -->
+						</view>
+					</view>
+				</view>
+			</view>
+			
+		</view>
+	</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "origanizationItem",
+		props: [
+			"mine_code"
+		],
+		data() {
+			return {
+				// 当前展开部门
+				active: 99999999,
+				data: [],
+				user_list: []
+			};
+		},
+		mounted() {
+			this.get_section_getGroupList()
+		},
+		methods: {
+			// 获取部门列表
+			get_section_getGroupList() {
+				uni.showLoading({
+					mask: true
+				})
+				this.$api.section_get_org_structure({
+
+				}).then((res) => {
+					uni.hideLoading()
+
+					this.data = res.data.content.data[0].children
+					console.log(res.data.content.data[0].children)
+				})
+
+			},
+			// 获取当前部门人员
+			get_user_list(id) {
+				this.user_list = []
+				uni.showLoading({
+					mask: true
+				})
+				this.$api.user_get_org_users({
+					section_id: id
+				}).then((res) => {
+					uni.hideLoading()
+					this.user_list = res.data.content.data
+				})
+			},
+			change_active(index, item) {
+				if (this.active == index) {
+					this.active = 99999999
+				} else {
+					this.active = index
+
+					if (item.children.length == 0) {
+						this.get_user_list(item.id)
+					}
+				}
+			},
+			go_record(page_id) {
+				console.log(page_id)
+
+				if (page_id == null) {
+					uni.showToast({
+						icon: "none",
+						title: "该部门还未关联二维码"
+					})
+				} else {
+					console.log(page_id)
+					uni.navigateTo({
+						url: "../../../index/record/record?pageId=" + page_id + "&mine_code=" + uni.getStorageSync(
+							'mine_code'),
+					})
+				}
+			},
+
+			phone(mobile) {
+				console.log(mobile)
+				if (mobile != null) {
+					uni.makePhoneCall({
+						phoneNumber: mobile
+					});
+				} else {
+					uni.showToast({
+						icon: "none",
+						title: "未绑定手机号"
+					})
+				}
+			},
+
+			go_user_info(staff_num) {
+				uni.navigateTo({
+					url: "./personal_information/personal_information?staff_num=" + staff_num
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.section {
+		box-sizing: border-box;
+		// padding: 0 20rpx;
+	
+		.box {
+	
+			.item {
+				min-height: 100rpx;
+				padding: 10rpx 0;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+	
+				margin-left: 20rpx;
+				border-bottom: 1rpx solid #F3F8F7;
+	
+				.left {
+					display: flex;
+					align-items: center;
+	
+					.icon {
+						width: 90rpx;
+						text-align: center;
+	
+						image {
+							width: 24rpx;
+							height: 24rpx;
+						}
+					}
+	
+					.text {
+						width: 470rpx;
+						font-size: 32rpx;
+					}
+				}
+	
+				.right {
+					width: 90rpx;
+					text-align: center;
+				}
+			}
+	
+			.children {
+				margin-left: 20rpx;
+			}
+	
+			.list {
+				.item {
+					height: 110rpx;
+	
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+	
+					margin-left: 108rpx;
+					border-bottom: 1rpx solid #F3F8F7;
+	
+					.left {
+						width: 500rpx;
+	
+						.icon {
+							width: 35rpx;
+							text-align: center;
+							line-height: 35rpx;
+							border-radius: 50%;
+							border: 1rpx solid #00A1E9;
+	
+							font-size: 24rpx;
+							color: #00A1E9;
+						}
+	
+						.text {
+							width: 350rpx;
+							margin-left: 18rpx;
+							font-size: 30rpx;
+	
+						}
+					}
+	
+					.right {
+						line-height: 110rpx;
+						width: 90rpx;
+						text-align: center;
+					}
+	
+				}
+			}
+	
+		}
+	
+	}
+	
+	
+
+</style>

BIN
components/origanizationSection/icon/close.png


BIN
components/origanizationSection/icon/open.png


BIN
components/origanizationSection/icon/title_icon.png


+ 250 - 0
components/origanizationSection/origanizationSection - 懒加载接口测试.vue

@@ -0,0 +1,250 @@
+<template>
+	<view>
+		<view class="section" v-for="(item,index) in data" :key="index">
+			<view class="box">
+				<view class="item">
+					<view class="left">
+						<view class="icon" v-if="active == index" @click.stop="change_active(index,item)">
+							<image src="./icon/close.png" mode=""></image>
+						</view>
+						<view class="icon" v-if="active != index" @click.stop="change_active(index,item)">
+							<image src="./icon/open.png" mode=""></image>
+						</view>
+						<view class="text" v-if="item.children.length == 0">{{item.title}} ({{item.user_num}})</view>
+						<view class="text" v-if="item.children != 0">{{item.title}}</view>
+					</view>
+					<view class="right" @click="go_record(item.page_id)">
+						<uni-icons type="eye"></uni-icons>
+					</view>
+				</view>
+				<view class="children" v-show="active == index">
+					<origanizationSection :data="item.children" :mine_code="mine_code"></origanizationSection>
+
+					<view class="list" v-show="item.children == 0">
+						<view class="item" v-for="(item_2,index_2) in user_list" :key="index_2"
+							@click="go_user_info(item_2.staff_num)">
+							<view class="left">
+								<view class="icon">{{item_2.name.charAt(0)}}</view>
+								<!-- #ifdef APP-PLUS -->
+								<view class="text">{{item_2.name}} {{item_2.position_name}}</view>
+								<!-- #endif -->
+								<!-- #ifdef H5 -->
+								<view class="text">{{item_2.name}} {{item_2.position_name}} {{item_2.mobile}}</view>
+								<!-- #endif -->
+							</view>
+
+							<!-- #ifdef APP-PLUS -->
+							<view class="right" @click.stop="phone(item_2.mobile)">
+								<uni-icons type="phone"></uni-icons>
+							</view>
+							<!-- #endif -->
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "origanizationSection",
+		props: [
+			"data",
+			"mine_code"
+		],
+		data() {
+			return {
+				// 当前展开部门
+				active: 99999999,
+
+				user_list: [],
+				children: [],
+				
+				t:null
+			};
+		},
+		methods: {
+			// 获取部门列表
+			get_section_getGroupList(section_id) {
+				uni.showLoading({
+					mask: true
+				})
+				this.$api.section_get_tree_structure({
+					section_id:section_id
+				}).then((res) => {
+					uni.hideLoading()
+					
+					console.log(res.data.content.data.children)
+					
+					if(this.mine_code == 'ningmeijituan'){
+						this.list = res.data.content.data.children
+					}else{
+						this.list = res.data.content.data
+					}
+				})
+			},
+			
+			// 获取当前部门人员
+			get_user_list(id) {
+				this.user_list = []
+				uni.showLoading({
+					mask: true
+				})
+				this.$api.user_get_org_users({
+					section_id: id
+				}).then((res) => {
+					uni.hideLoading()
+					this.user_list = res.data.content.data
+				})
+			},
+
+
+			change_active(index, item) {
+				if (this.active == index) {
+					this.active = 99999999
+				} else {
+				
+					this.active = index
+					
+					this.children = item.children
+					
+					
+					this.get_section_getGroupList(item.id)
+				}
+				
+			},
+			go_record(page_id) {
+				console.log(page_id)
+
+				if (page_id == null) {
+					uni.showToast({
+						icon: "none",
+						title: "该部门还未关联二维码"
+					})
+				} else {
+					console.log(page_id)
+					uni.navigateTo({
+						url: "../../../index/record/record?pageId=" + page_id + "&mine_code=" + uni.getStorageSync(
+							'mine_code'),
+					})
+				}
+			},
+
+			phone(mobile) {
+				console.log(mobile)
+				if (mobile != null) {
+					uni.makePhoneCall({
+						phoneNumber: mobile
+					});
+				} else {
+					uni.showToast({
+						icon: "none",
+						title: "未绑定手机号"
+					})
+				}
+			},
+
+			go_user_info(staff_num) {
+				uni.navigateTo({
+					url: "./personal_information/personal_information?staff_num=" + staff_num
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.section {
+		box-sizing: border-box;
+		// padding: 0 20rpx;
+
+		.box {
+
+			.item {
+				min-height: 100rpx;
+				padding: 10rpx 0;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+
+				margin-left: 20rpx;
+				border-bottom: 1rpx solid #F3F8F7;
+
+				.left {
+					display: flex;
+					align-items: center;
+
+					.icon {
+						width: 90rpx;
+						text-align: center;
+
+						image {
+							width: 24rpx;
+							height: 24rpx;
+						}
+					}
+
+					.text {
+						width: 470rpx;
+						font-size: 32rpx;
+					}
+				}
+
+				.right {
+					width: 90rpx;
+					text-align: center;
+				}
+			}
+
+			.children {
+				margin-left: 20rpx;
+			}
+
+			.list {
+				.item {
+					height: 110rpx;
+
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					margin-left: 108rpx;
+					border-bottom: 1rpx solid #F3F8F7;
+
+					.left {
+						width: 500rpx;
+
+						.icon {
+							width: 35rpx;
+							text-align: center;
+							line-height: 35rpx;
+							border-radius: 50%;
+							border: 1rpx solid #00A1E9;
+
+							font-size: 24rpx;
+							color: #00A1E9;
+						}
+
+						.text {
+							width: 350rpx;
+							margin-left: 18rpx;
+							font-size: 30rpx;
+
+						}
+					}
+
+					.right {
+						line-height: 110rpx;
+						width: 90rpx;
+						text-align: center;
+					}
+
+				}
+			}
+
+		}
+
+	}
+</style>

+ 251 - 0
components/origanizationSection/origanizationSection.vue

@@ -0,0 +1,251 @@
+<template>
+	<view>
+		<view class="section" v-for="(item,index) in data" :key="index">
+			<view class="box">
+				<view class="item">
+					<view class="left">
+						<view class="icon" v-if="active == index" @click.stop="change_active(index,item)">
+							<image src="./icon/close.png" mode=""></image>
+						</view>
+						<view class="icon" v-if="active != index" @click.stop="change_active(index,item)">
+							<image src="./icon/open.png" mode=""></image>
+						</view>
+						<view class="text" v-if="item.children.length == 0">{{item.title}} ({{item.user_num}})</view>
+						<view class="text" v-if="item.children != 0">{{item.title}}</view>
+					</view>
+					<view class="right" @click="go_record(item.page_id)">
+						<uni-icons type="eye"></uni-icons>
+					</view>
+				</view>
+				<view class="children" v-show="active == index">
+					<!-- <origanizationSection :data="item.children" :mine_code="mine_code"></origanizationSection> -->
+					<origanizationSection :data="children" :mine_code="mine_code"></origanizationSection>
+
+					<view class="list" v-show="item.children == 0">
+						<view class="item" v-for="(item_2,index_2) in user_list" :key="index_2"
+							@click="go_user_info(item_2.staff_num)">
+							<view class="left">
+								<view class="icon">{{item_2.name.charAt(0)}}</view>
+								<!-- #ifdef APP-PLUS -->
+								<view class="text">{{item_2.name}} {{item_2.position_name}}</view>
+								<!-- #endif -->
+								<!-- #ifdef H5 -->
+								<view class="text">{{item_2.name}} {{item_2.position_name}} {{item_2.mobile}}</view>
+								<!-- #endif -->
+							</view>
+
+							<!-- #ifdef APP-PLUS -->
+							<view class="right" @click.stop="phone(item_2.mobile)">
+								<uni-icons type="phone"></uni-icons>
+							</view>
+							<!-- #endif -->
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "origanizationSection",
+		props: [
+			"data",
+			"mine_code"
+		],
+		data() {
+			return {
+				// 当前展开部门
+				active: 99999999,
+
+				user_list: [],
+				children: [],
+
+				t: null
+			};
+		},
+		methods: {
+			// 获取当前部门人员
+			get_user_list(id) {
+				this.user_list = []
+				uni.showLoading({
+					mask: true
+				})
+				this.$api.user_get_org_users({
+					section_id: id
+				}).then((res) => {
+					this.user_list = res.data.content.data
+					uni.hideLoading()
+				})
+			},
+
+
+			change_active(index, item) {
+				if (this.active == index) {
+					this.active = 99999999
+				} else {
+					this.active = index
+					this.children = item.children
+					if (item.children.length == 0) {
+						this.get_user_list(item.id)
+					}else{
+						
+					}
+					// uni.showToast({
+					// 	icon: "none",
+					// 	title: "部门加载中...",
+					// 	duration: 2000,
+					// 	mask: true
+					// })
+				}
+
+				// if(this.t !== null){
+				// 	clearTimeout(this.t)
+				// }
+
+				// this.t = setTimeout(()=>{
+
+				// },500)
+
+			},
+			go_record(page_id) {
+				console.log(page_id)
+
+				if (page_id == null) {
+					uni.showToast({
+						icon: "none",
+						title: "该部门还未关联二维码"
+					})
+				} else {
+					console.log(page_id)
+					uni.navigateTo({
+						url: "../../../index/record/record?pageId=" + page_id + "&mine_code=" + uni.getStorageSync(
+							'mine_code'),
+					})
+				}
+			},
+
+			phone(mobile) {
+				console.log(mobile)
+				if (mobile != null) {
+					uni.makePhoneCall({
+						phoneNumber: mobile
+					});
+				} else {
+					uni.showToast({
+						icon: "none",
+						title: "未绑定手机号"
+					})
+				}
+			},
+
+			go_user_info(staff_num) {
+				if(uni.getStorageSync('mine_code') == 'ningmeijituan'){
+					uni.navigateTo({
+						url: "./personal_information/personal_information_peixun?staff_num=" + staff_num
+					})
+				}else{
+					uni.navigateTo({
+						url: "./personal_information/personal_information_info?staff_num=" + staff_num
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.section {
+		box-sizing: border-box;
+		// padding: 0 20rpx;
+
+		.box {
+
+			.item {
+				min-height: 100rpx;
+				padding: 10rpx 0;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+
+				margin-left: 20rpx;
+				border-bottom: 1rpx solid #F3F8F7;
+
+				.left {
+					display: flex;
+					align-items: center;
+
+					.icon {
+						width: 90rpx;
+						text-align: center;
+
+						image {
+							width: 24rpx;
+							height: 24rpx;
+						}
+					}
+
+					.text {
+						width: 470rpx;
+						font-size: 32rpx;
+					}
+				}
+
+				.right {
+					width: 90rpx;
+					text-align: center;
+				}
+			}
+
+			.children {
+				margin-left: 20rpx;
+			}
+
+			.list {
+				.item {
+					height: 110rpx;
+
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					margin-left: 108rpx;
+					border-bottom: 1rpx solid #F3F8F7;
+
+					.left {
+						width: 500rpx;
+
+						.icon {
+							width: 35rpx;
+							text-align: center;
+							line-height: 35rpx;
+							border-radius: 50%;
+							border: 1rpx solid #00A1E9;
+
+							font-size: 24rpx;
+							color: #00A1E9;
+						}
+
+						.text {
+							width: 350rpx;
+							margin-left: 18rpx;
+							font-size: 30rpx;
+
+						}
+					}
+
+					.right {
+						line-height: 110rpx;
+						width: 90rpx;
+						text-align: center;
+					}
+
+				}
+			}
+
+		}
+
+	}
+</style>

BIN
components/p-personnel-orientation-navbar/icon/search.png


+ 114 - 0
components/p-personnel-orientation-navbar/p-personnel-orientation-navbar.vue

@@ -0,0 +1,114 @@
+<template>
+	<view>
+		<view class="content">
+			<view :style="{height:statusBarHeight + 'px'}"></view>
+			<view class="navbar">
+		
+				<view class="left" @click="click_left()">
+					<uni-icons type="arrowleft" color="#fff" size="18"></uni-icons>
+				</view>
+				<view class="right" @click="search()">
+					<view class="input_box">
+						<view class="input_icon"></view>
+						<view class="input_text">搜索井下人员</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 占位符 -->
+		<view :style="{height: statusBarHeight + 'px'}"></view>
+		<view style="height: 94rpx;"></view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: ['mine'],
+		data() {
+			return {
+				statusBarHeight: 20,
+				
+			};
+		},
+		created() {
+			// 获取手机系统信息
+			const info = uni.getSystemInfoSync()
+			// 设置状态栏高度
+			this.statusBarHeight = info.statusBarHeight
+			
+			
+		},
+		methods: {
+			click_left() {
+				uni.navigateBack();
+			},
+			search(){
+				uni.navigateTo({
+					url:"../../production/personnel_orientation/search/search?mine=" + this.mine
+				})
+			}
+		}
+
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		position: fixed;
+		top: 0;
+		left: 0;
+			
+		background-color: #009FE8;
+		z-index: 999;
+	}
+
+	.navbar {
+		width: 750rpx;
+		box-sizing: border-box;
+		padding-left: 31rpx;
+		padding-right: 26rpx;
+		padding-top: 14rpx;
+		padding-bottom: 14rpx;
+		display: flex;
+		// justify-content: space-between;
+
+		.left {
+			width: 42rpx;
+			line-height: 65rpx;
+			margin-right: 15rpx;
+		}
+
+		.right {
+			width: 620rpx;
+			height: 65rpx;
+			background: rgba(255, 255, 255, 0.2);
+			border-radius: 33rpx;
+
+			.input_box {
+				display: flex;
+
+				.input_icon {
+					margin-left: 43rpx;
+					margin-top: 16rpx;
+					width: 34rpx;
+					height: 34rpx;
+
+					background-image: url(icon/search.png);
+					background-size: cover;
+					background-repeat: no-repeat;
+				}
+
+				.input_text {
+					margin-left: 19rpx;
+
+					font-size: 24rpx;
+					font-family: PingFangSC-Regular, PingFang SC;
+					font-weight: 400;
+					color: #FFFFFF;
+					line-height: 65rpx;
+
+				}
+			}
+		}
+	}
+</style>

+ 161 - 0
components/p-personnel-orientation-section-1/p-personnel-orientation-section-1.vue

@@ -0,0 +1,161 @@
+<template>
+	<view>
+		<view class="content">
+			<view class="title">
+				当前井下人员
+			</view>
+			<view class="inner">
+				<slot></slot>
+			</view>
+
+
+			<!-- 当前下井领导 -->
+			<view class="list" v-if="people_list.length > 0">
+				<!-- <view style="font-size: 30rpx;line-height: 120rpx;font-weight: 700;text-align: center;">当前井下矿领导</view> -->
+				<view class="title">当前井下矿领导</view>
+				<view class="label">
+					<view class="text box_1">姓名</view>
+					<view class="text box_2">下井时间</view>
+					<view class="text box_3">当前位置</view>
+				</view>
+				<view class="item" v-for="(item,index) in people_list" :key="index" @click="go_downhole_statistics(item.people_num,item.depart_name,item.name)">
+					<view class="text box_1">{{item.name}}</view>
+					<view class="text box_2">{{item.down_time}}</view>
+					<view class="text box_3">{{item.station_name}}</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+
+<script>
+	export default {
+		props: ['mine'],
+		data() {
+			return {
+				// mine:"",
+				people_list: [],
+				
+			}
+		},
+		watch: {
+			// mine: function(newVal, oldVal) {
+			// 	this.mine = newVal
+			// 	console.log(newVal)
+			// }
+		},
+		created() {
+			this.$p_api.personnel_people_now({
+				mine: this.mine
+			}).then((res) => {
+				console.log(res)
+				this.people_list = res.data.data.people_list
+			})
+		},
+		methods:{
+			go_downhole_statistics(people_num,depart_name,name){
+				uni.navigateTo({
+					url:"./downhole_statistics/downhole_statistics?people_num="+people_num+"&depart_name="+depart_name+"&name="+name+"&mine="+this.mine
+				})
+			}
+		}
+	}
+</script>
+
+
+
+<style lang="scss">
+	.content {
+		margin-top: 16rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 3rpx 29rpx 0px rgba(59, 74, 116, 0.14);
+		border-radius: 20rpx;
+
+		.title {
+			line-height: 96rpx;
+			text-align: center;
+
+
+			font-size: 30rpx;
+			font-family: PingFangSC-Regular, PingFang SC;
+			font-weight: 400;
+			color: #232627;
+
+			border-bottom: 2rpx solid #f3f3f3;
+		}
+
+		.inner {
+			// height: 500px;
+		}
+	}
+
+	.list {
+		padding: 0 10rpx;
+
+		.label {
+			display: flex;
+			align-items: center;
+			height: 82rpx;
+			background: #F3F6FA;
+
+			.text {
+				text-align: center;
+				font-size: 28rpx;
+				font-family: PingFangSC-Regular, PingFang SC;
+				font-weight: 700;
+				color: #232627;
+
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+			}
+
+			.box_1 {
+				width: 150rpx;
+			}
+
+			.box_2 {
+				width: 150rpx;
+			}
+
+			.box_3 {
+				text-align: right;
+				width: 400rpx;
+				padding-right: 15rpx;
+			}
+		}
+
+		.item {
+			display: flex;
+			align-items: center;
+			height: 82rpx;
+
+			.text {
+				text-align: center;
+				font-size: 27rpx;
+				font-family: PingFangSC-Regular, PingFang SC;
+				font-weight: 400;
+				color: #232627;
+
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+			}
+
+			.box_1 {
+				width: 150rpx;
+			}
+
+			.box_2 {
+				width: 150rpx;
+			}
+
+			.box_3 {
+				text-align: right;
+				width: 400rpx;
+				padding-right: 15rpx;
+			}
+		}
+	}
+</style>

+ 47 - 0
components/p-personnel-orientation-section-3/p-personnel-orientation-section-3.vue

@@ -0,0 +1,47 @@
+<template>
+	<view>
+		<view class="content">
+			<view class="title">
+				当前井下人员分布
+			</view>
+			<view class="inner">
+				<slot></slot>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		margin-top: 16rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 3rpx 29rpx 0px rgba(59, 74, 116, 0.14);
+		border-radius: 20rpx;
+
+		.title{
+			line-height: 96rpx;
+			text-align: center;
+			
+			
+			font-size: 30rpx;
+			font-family: PingFangSC-Regular, PingFang SC;
+			font-weight: 400;
+			color: #232627;
+			
+			border-bottom: 2rpx solid #f3f3f3;
+		}
+		.inner{
+			// height: 200rpx;
+		}
+	}
+</style>

+ 72 - 0
components/p-personnel-orientation-section-4/p-personnel-orientation-section-4.vue

@@ -0,0 +1,72 @@
+<template>
+	<view>
+		<view class="content">
+			<view class="title">
+				<picker mode="selector" :range="array" :value="index" @change="bindPickerChange">
+					<view class="title_select">
+						<view>{{array[index]}}</view>
+						<view class="icon">
+							<uni-icons type="arrowdown"></uni-icons>
+						</view>
+					</view>
+				</picker>
+			</view>
+			<view class="inner">
+				<slot></slot>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				array: ['今日各科室下井人数', '当前各科室下井人数'],
+				index: 0,
+			};
+		},
+		methods: {
+			bindPickerChange: function(e) {
+				console.log('picker发送选择改变,携带值为', e.target.value)
+				this.$emit("changeDepart",e.target.value)
+				this.index = e.target.value
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		margin-bottom: 20rpx;
+		margin-top: 16rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 3rpx 29rpx 0px rgba(59, 74, 116, 0.14);
+		border-radius: 20rpx;
+
+		.title {
+			line-height: 96rpx;
+			text-align: center;
+
+
+			font-size: 30rpx;
+			font-family: PingFangSC-Regular, PingFang SC;
+			font-weight: 400;
+			color: #232627;
+			
+
+			
+			.title_select{
+				display: flex;
+				justify-content: center;
+				.icon{
+					margin-left: 20rpx;
+				}
+			}
+		}
+
+		.inner {
+			// height: 200rpx;
+		}
+	}
+</style>

+ 314 - 0
components/p-production-report-inner-1/p-production-report-inner-1.vue

@@ -0,0 +1,314 @@
+<template>
+	<view class="inner">
+		<view class="img">
+			<canvas canvas-id="canvasRing" id="canvasRing" @touchstart="touchRing" style="width: 700upx; height:500upx;"></canvas>
+		</view>
+
+		<view class="container">
+			<view class="title">
+				<view class="row">
+					<view class="item">
+						<view class="icon"></view>
+						<view class="name"> </view>
+					</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="name">早班</view>
+					</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="name">中班</view>
+					</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="name">晚班</view>
+					</view>
+				</view>
+			</view>
+			
+			
+		
+			<view class="content">
+				<view class="row">
+					<view class="item">当日</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="num">{{data[0].n1}}吨</view>
+					</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="num">{{data[0].n2}}吨</view>
+					</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="num">{{data[0].n3}}吨</view>
+					</view>
+				</view>
+				<view class="row">
+					<view class="item">昨日</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="num">{{data[1].n1}}吨</view>
+					</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="num">{{data[1].n2}}吨</view>
+					</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="num">{{data[1].n3}}吨</view>
+					</view>
+				</view>
+				<view class="row">
+					<view class="item">前日</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="num">{{data[2].n1}}吨</view>
+					</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="num">{{data[2].n2}}吨</view>
+					</view>
+					<view class="item">
+						<view class="icon"></view>
+						<view class="num">{{data[2].n3}}吨</view>
+					</view>
+				</view>
+			</view>
+	
+	
+	
+		</view>
+	</view>
+</template>
+
+<script>
+	import uCharts from '@/components/u-charts/u-charts.js';
+	var _self;
+	var canvaRing = null;
+
+	export default {
+		props:[
+			"mine",
+			"org_num"
+		],
+		data() {
+			return {
+				cWidth: '',
+				cHeight: '',
+				pixelRatio: 1,
+				serverData: '',
+				
+				data:[
+					{
+						n1:0,
+						n2:0,
+						n3:0
+					},
+					{
+						n1:0,
+						n2:0,
+						n3:0
+					},
+					{
+						n1:0,
+						n2:0,
+						n3:0
+					}
+				]
+			}
+		},
+		mounted() {
+			_self = this;
+			this.cWidth = uni.upx2px(700);
+			this.cHeight = uni.upx2px(500);
+			this.getServerData();
+		},
+		methods: {
+			getServerData() {
+				this.$p_api.coalmine_days_output({
+					mine:this.mine,
+					org_num:this.org_num
+				}).then((res)=>{
+					// console.log(res)
+					
+					this.data = res.data.data
+					// console.log(this.data)
+					
+					let Ring = {
+						"series": [{
+							"name": "早班",
+							"data": 0
+						}, {
+							"name": "中班",
+							"data": 0
+						}, {
+							"name": "晚班",
+							"data": 0
+						}],
+						"total":0
+					};
+					
+					Ring.total = res.data.data[0].total
+					
+					Ring.series[0].data = res.data.data[0].n1
+					Ring.series[1].data = res.data.data[0].n2
+					Ring.series[2].data = res.data.data[0].n3
+					
+					_self.showRing("canvasRing", Ring);
+				})
+				
+			},
+			showRing(canvasId, chartData) {
+				canvaRing = new uCharts({
+					$this: _self,
+					canvasId: canvasId,
+					type: 'ring',
+					fontSize: 11,
+					legend: {
+						show: true,
+						position: 'right',
+						lineHeight: 40,
+					},
+					title: {
+						name: chartData.total + ' ',
+						color: '#000000',
+						fontSize: 20 * _self.pixelRatio,
+						offsetY: 20 * _self.pixelRatio,
+					},
+					subtitle: {
+						name: "总产量",
+						color: '#666666',
+						fontSize: 14 * _self.pixelRatio,
+						offsetY: -30 * _self.pixelRatio,
+					},
+					extra: {
+						pie: {
+							offsetAngle: -90,
+							ringWidth: 20 * _self.pixelRatio,
+							labelWidth: 15
+						}
+					},
+					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 + ' 吨'
+					}
+				});
+			},
+		}
+
+	}
+</script>
+
+<style lang="scss">
+	.inner {
+		padding-bottom: 40rpx;
+	}
+
+	.img {
+		height: 500rpx;
+	}
+
+	.container {
+		.title {
+			.row {
+				display: flex;
+
+				.item {
+					width: 165rpx;
+
+					display: flex;
+					align-items: center;
+					justify-content: center;
+
+					line-height: 72rpx;
+					border-bottom: 1px solid #eee;
+
+					.icon {
+						width: 16rpx;
+						height: 16rpx;
+						border-radius: 50%;
+					}
+
+					.name {
+						margin-left: 16rpx;
+						font-size: 20rpx;
+						color: #9a9a9a;
+					}
+				}
+
+				.item:nth-child(2) .icon {
+					background-color: #00A0EC;
+				}
+
+				.item:nth-child(3) .icon {
+					background-color: #F7BE3B;
+				}
+
+				.item:nth-child(4) .icon {
+					background-color: #FFBEAD;
+				}
+			}
+		}
+
+		.content {
+			padding: 0 20rpx;
+
+			.row {
+				display: flex;
+
+				.item {
+					width: 165rpx;
+
+					display: flex;
+					align-items: center;
+					justify-content: center;
+
+
+					line-height: 72rpx;
+					border-bottom: 1px solid #eee;
+
+					color: #9a9a9a;
+					font-size: 20rpx;
+
+					.icon {
+						width: 16rpx;
+						height: 16rpx;
+						border-radius: 50%;
+					}
+
+					.num {
+						margin-left: 16rpx;
+						font-size: 24rpx;
+
+						color: #1e1e1e;
+
+					}
+				}
+
+				.item:nth-child(2) .icon {
+					background-color: #00A0EC;
+				}
+
+				.item:nth-child(3) .icon {
+					background-color: #F7BE3B;
+				}
+
+				.item:nth-child(4) .icon {
+					background-color: #FFBEAD;
+				}
+			}
+		}
+	}
+</style>

+ 626 - 0
components/p-production-report-inner-2/p-production-report-inner-2.vue

@@ -0,0 +1,626 @@
+<template>
+	<view>
+		<!-- 产量趋势 -->
+		<view class="content">
+			<view class="title_box">
+				<picker mode="selector" :range="array_active" :value="index_active" @change="bindPickerChange_active">
+					<view class="box">
+						<view>{{array_active[index_active]}}</view>
+						<view class="icon">
+							<uni-icons type="arrowdown"></uni-icons>
+						</view>
+					</view>
+				</picker>
+				
+				<view v-if="index_active==1">
+					<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange" fields="month">
+						<view class="box">
+							<view>{{date}}</view>
+						</view>
+					</picker>
+				</view>
+				
+				<view v-if="index_active==2">
+					<picker mode="date" :value="date_year" :start="startDate_year" :end="endDate_year" @change="bindDateChange_year" fields="year">
+						<view class="box">
+							<view>{{date_year}}</view>
+						</view>
+					</picker>
+				</view>
+				
+			</view>
+			<view class="inner">
+				<view v-show="index_active == 0">
+					<view class="inner_content">
+						<canvas style="width: 700upx; height:600upx;" canvas-id="canvasColumnStack" id="canvasColumnStack" class="charts"  @touchstart="touchColumn"></canvas>
+					</view>
+				</view>
+				<view v-show="index_active == 1">
+					<view class="inner_content">
+						<canvas style="width: 700upx; height:2500upx;" canvas-id="canvasColumnStack_month" id="canvasColumnStack_month" class="charts"  @touchstart="touchColumn_month"></canvas>
+					</view>
+				</view>
+				<view v-show="index_active == 2">
+					<view class="inner_content">
+						<canvas style="width: 700upx; height:600upx;" canvas-id="canvasColumnStack_year" id="canvasColumnStack_year" class="charts"  @touchstart="touchColumn_year"></canvas>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uCharts from '@/components/u-charts/u-charts.js';
+	var _self;
+	
+	// 周产量
+	var canvaColumn=null;
+	
+	// 月产量
+	var canvaColumn_month=null;
+	
+	// 年产量
+	var canvaColumn_year=null;
+   
+	
+	
+	export default {
+		name:"p-production-report-inner-2",
+		props:[
+			"mine",
+			"org_num"
+		],
+		data() {
+			const currentDate = this.getDate({
+				format: true
+			})
+			const currentDate_year = this.getDate_year({
+				format: true
+			})
+			return {
+				cWidth: '',
+				cHeight: '',
+				pixelRatio: 1,
+				// serverData: '',
+				
+				
+				// 月
+				cWidth_month: '',
+				cHeight_month: '',
+				pixelRatio_month: 1,
+				cHeight_month:'',
+				
+				// 周产量
+				
+				// 产量趋势
+				array_active: ['周产量趋势', '月产量趋势','年产量趋势'],
+				index_active: 0,
+				// 年 月
+				date: currentDate,
+				// 
+				date_year:currentDate_year,
+				
+				
+				
+				// 当前月
+				month:""
+				
+			}
+		},
+		computed: {
+			// 月
+			startDate() {
+				return this.getDate('start');
+			},
+			endDate() {
+				return this.getDate('end');
+			},
+			// 年
+			startDate_year() {
+				return this.getDate_year('start');
+			},
+			endDate_year() {
+				return this.getDate_year('end');
+			}
+		},
+		created() {
+			this.month = (new Date().getFullYear()) + "-" + (new Date().getMonth()+1)
+			// console.log(this.month)
+			_self = this;
+			this.cWidth = uni.upx2px(680);
+			this.cHeight = uni.upx2px(500);
+			
+			this.cWidth_month = uni.upx2px(680);
+			this.cHeight_month = uni.upx2px(2500);
+			
+			// 周产量
+			this.getServerData_week();
+			
+			// 月产量
+			this.getServerData_month(this.date);
+			
+			// 年产量
+			this.getServerData_year(this.date_year);
+			
+		},
+		methods: {
+			// 产量趋势 选择列表
+			bindPickerChange_active: function(e) {
+				console.log('picker发送选择改变,携带值为', e.target.value)
+				this.index_active = 0
+				
+				setTimeout(()=>{
+					this.index_active = e.target.value
+					
+					if(this.index_active == 0){
+						this.getServerData_week(this.date)
+					}else if(this.index_active == 1){
+						// uni.switchTab({
+						// 	url:"../../tabbar/production/production",
+						// 	animationType:"fade-in",
+						// 	animationDuration:50
+						// })
+						// uni.navigateTo({
+						// 	url:"../../production/p-i-metering/p-i-metering",
+						// 	animationType:"fade-in",
+						// 	animationDuration:150
+						// })
+						// console.log(this.date)
+						this.date = this.month
+						this.getServerData_month(this.month)
+					}else if(this.index_active == 2){
+						this.getServerData_year(this.date_year)
+					}
+					
+				},100)
+				
+				
+			},
+			// 月
+			bindDateChange: function(e) {
+				this.date = e.target.value
+				console.log(this.date)
+				this.getServerData_month(this.date);
+			},
+			getDate(type) {
+				const date = new Date();
+				let year = date.getFullYear();
+				let month = date.getMonth() + 1;
+				let day = date.getDate();
+
+				if (type === 'start') {
+					year = year - 60;
+				} else if (type === 'end') {
+					year = year + 2;
+				}else{
+					year = year
+				}
+				month = month > 9 ? month : '0' + month;
+				return `${year}-${month}`;
+			},
+			
+			// 年
+			bindDateChange_year: function(e) {
+				this.date_year = e.target.value
+				console.log(this.date_year)
+				
+				this.getServerData_year(this.date_year)
+			},
+			getDate_year(type) {
+				const date = new Date();
+				let year = date.getFullYear();
+			
+				if (type === 'start') {
+					year = year - 60;
+				} else if (type === 'end') {
+					year = year + 2;
+				}
+				return `${year}`;
+			},
+			
+			
+			
+			// 周产量
+			getServerData_week(){
+				this.$p_api.coalmine_one_trend({
+					type:"week",
+					mine:this.mine,
+					org_num:this.org_num
+				}).then((res)=>{
+					// console.log(res.data.data)
+					
+					let ColumnStack={
+						categories:[],
+						series:[
+							{
+								"name": "早班",
+								"data": []
+							},
+							{
+								"name": "中班",
+								"data": []
+							},
+							{
+								"name": "晚班",
+								"data": []
+							}
+						],
+					};
+					
+					const categories = res.data.data
+					categories.map(function(item,index){
+						// console.log(item.date,index)
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.date;
+						//将项放进新的数组
+						ColumnStack.categories[index] = sevm
+					})
+					
+					res.data.data.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.n1;
+						//将项放进新的数组
+						ColumnStack.series[0].data[index] = sevm
+					})
+					res.data.data.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.n2;
+						//将项放进新的数组
+						ColumnStack.series[1].data[index] = sevm
+					})
+					res.data.data.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.n3;
+						//将项放进新的数组
+						ColumnStack.series[2].data[index] = sevm
+					})
+					
+					_self.showColumnStack("canvasColumnStack",ColumnStack);
+				})
+				
+			
+			},
+			showColumnStack(canvasId,chartData){
+				canvaColumn=new uCharts({
+					$this:_self,
+					canvasId: canvasId,
+					type: 'column',
+					legend:{show:true},
+					fontSize:11,
+					background:'#FFFFFF',
+					pixelRatio:_self.pixelRatio,
+					animation: true,
+					categories: chartData.categories,
+					legend:{
+						position:'top',
+						margin:10,
+						
+					},
+					series: chartData.series,
+					xAxis: {
+						disableGrid:true,
+					},
+					yAxis: {
+						//disabled:true
+					},
+					dataLabel: false,
+					width: _self.cWidth*_self.pixelRatio,
+					height: _self.cHeight*_self.pixelRatio,
+					extra: {
+						column: {
+							type:'stack',
+							width: _self.cWidth*_self.pixelRatio*0.5/chartData.categories.length
+						}
+					  }
+				});
+				
+			},
+			touchColumn(e){
+				canvaColumn.showToolTip(e, {
+					format: function (item, category) {
+						return category + ' ' + item.name + ':' + item.data 
+					}
+				});
+			},
+
+			// 月产量
+			getServerData_month(date){
+				this.$p_api.coalmine_one_trend({
+					type:"month",
+					date: date,
+					mine:this.mine,
+					org_num:this.org_num
+				}).then((res)=>{
+					// console.log(res.data.data)
+					let ColumnStack_month={
+						categories:[],
+						series:[
+							{
+								"name": "晚班",
+								"data": []
+							}, {
+								"name": "早班",
+								"data": []
+							}, {
+								"name": "中班",
+								"data": []
+							}
+						],
+					}
+				
+					res.data.data.map(function(item,index){
+						// console.log(item.date,index)
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.date;
+						//将项放进新的数组
+						ColumnStack_month.categories[index] = sevm
+					})
+					
+					res.data.data.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.n1;
+						//将项放进新的数组
+						ColumnStack_month.series[0].data[index] = sevm
+					})
+					res.data.data.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.n2;
+						//将项放进新的数组
+						ColumnStack_month.series[1].data[index] = sevm
+					})
+					res.data.data.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.n3;
+						//将项放进新的数组
+						ColumnStack_month.series[2].data[index] = sevm
+					})
+					
+					
+					
+					_self.showColumnStack_month("canvasColumnStack_month",ColumnStack_month);
+				})
+							
+			},
+			showColumnStack_month(canvasId,chartData){
+				canvaColumn_month=new uCharts({
+					$this:_self,
+					canvasId: canvasId,
+					type: 'column',
+					legend:{show:true},
+					fontSize:11,
+					background:'#FFFFFF',
+					pixelRatio:_self.pixelRatio_month,
+					animation: true,
+					rotate:true,
+					categories: chartData.categories,
+					legend:{
+						show:false,
+						position:'top',
+						margin:10,
+						
+					},
+					series: chartData.series,
+					xAxis: {
+						disableGrid:true,
+					},
+					yAxis: {
+						//disabled:true
+					},
+					dataLabel: false,
+					width: _self.cWidth_month*_self.pixelRatio_month,
+					height: _self.cHeight_month*_self.pixelRatio_month,
+					extra: {
+						column: {
+							type:'stack',
+							width: _self.cWidth_month*_self.pixelRatio_month*0.5/chartData.categories.length
+						}
+					  }
+				});
+				
+			},
+			touchColumn_month(e){
+				canvaColumn_month.showToolTip(e, {
+					format: function (item, category) {
+						return item.name + ':' + item.data 
+					}
+				});
+			},
+			
+					
+
+
+			// 年产量
+			getServerData_year(date){
+				this.$p_api.coalmine_one_trend({
+					type:"year",
+					date: date,
+					mine:this.mine,
+					org_num:this.org_num
+				}).then((res)=>{
+					
+					// console.log(res.data.data)
+					
+					let ColumnStack_year={
+						categories:[],
+						series:[
+							{
+								"name": "早班",
+								"data": []
+							}, {
+								"name": "中班",
+								"data": []
+							}, {
+								"name": "晚班",
+								"data": []
+							}
+						],
+					}
+								
+					res.data.data.map(function(item,index){
+						// console.log(item.date,index)
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.date;
+						//将项放进新的数组
+						ColumnStack_year.categories[index] = sevm
+					})
+					
+					res.data.data.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.n1;
+						//将项放进新的数组
+						ColumnStack_year.series[0].data[index] = sevm
+					})
+					res.data.data.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.n2;
+						//将项放进新的数组
+						ColumnStack_year.series[1].data[index] = sevm
+					})
+					res.data.data.map(function(item,index){
+						//新数组的项,用来盛放每一项中的各个参数,每次清空,这样避免改变sevm的值
+						var sevm = {};
+						//给每一项中的参数初始化并赋值
+						sevm = item.n3;
+						//将项放进新的数组
+						ColumnStack_year.series[2].data[index] = sevm
+					})
+					
+					_self.showColumnStack_year("canvasColumnStack_year",ColumnStack_year);
+				})
+				
+			},
+			showColumnStack_year(canvasId,chartData){
+				canvaColumn_year=new uCharts({
+					$this:_self,
+					canvasId: canvasId,
+					type: 'column',
+					legend:{show:true},
+					fontSize:11,
+					background:'#FFFFFF',
+					pixelRatio:_self.pixelRatio,
+					animation: true,
+					categories: chartData.categories,
+					legend:{
+						position:'top',
+						margin:10,
+						
+					},
+					series: chartData.series,
+					xAxis: {
+						disableGrid:true,
+					},
+					yAxis: {
+						//disabled:true
+					},
+					dataLabel: false,
+					width: _self.cWidth*_self.pixelRatio,
+					height: _self.cHeight*_self.pixelRatio,
+					extra: {
+						column: {
+							type:'stack',
+							width: _self.cWidth*_self.pixelRatio*0.5/chartData.categories.length
+						}
+					  }
+				});
+				
+			},
+			touchColumn_year(e){
+				canvaColumn_year.showToolTip(e, {
+					format: function (item, category) {
+						return item.name + ':' + item.data 
+					}
+				});
+			},
+			
+					
+		
+		}
+	}
+</script>
+
+
+<style lang="scss">
+	
+	.content{
+		width: 700rpx;
+		margin-top: 16rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx 3rpx 29rpx 0rpx rgba(59, 74, 116, 0.14);
+		border-radius: 20rpx;
+		
+		.time{
+			line-height: 94rpx;
+			padding: 0 20rpx;
+			box-sizing: border-box;
+		}
+		
+		.title{
+			line-height: 96rpx;
+			text-align: center;
+			
+			
+			font-size: 30rpx;
+			font-family: PingFangSC-Regular, PingFang SC;
+			font-weight: 400;
+			color: #232627;
+			
+			border-bottom: 2rpx solid #f3f3f3;
+		}
+		.inner{
+			min-height: 200rpx;
+			.inner_content{
+				margin-top: 20rpx;
+			}
+		}
+		.title_box{
+			height: 96rpx;
+			border-bottom: 2rpx solid #f3f3f3;
+			
+			display: flex;
+			align-items: center;
+			.box{
+				margin-left: 22rpx;
+				height: 50rpx;
+				border-radius: 14rpx;
+				border: 1rpx solid #BDC3C7;
+				
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				// 文本
+				font-size: 28rpx;
+				font-family: PingFangSC-Regular, PingFang SC;
+				font-weight: 400;
+				color: #232627;
+				line-height: 50rpx;
+				
+				display: flex;
+				.icon{
+					margin-left: 10rpx;
+				}
+			}
+		}
+	}
+</style>

BIN
components/p-production-report-inner-3/icon/icon.png


+ 77 - 0
components/p-production-report-inner-3/p-production-report-inner-3.vue

@@ -0,0 +1,77 @@
+<template>
+	<view>
+		<view class="list">
+			<view class="item" v-for="(item,index) in list" :key="index" @click="go_container(item.id,item.gzm_name)">
+				<view class="left">
+					<view class="icon"></view>
+					<view class="name">{{item.gzm_name}}</view>
+				</view>
+				<view class="right">
+					<uni-icons type="arrowright"></uni-icons>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"p-production-report-inner-3",
+		props:[
+			"mine",
+			"org_num"
+		],
+		data() {
+			return {
+				list:[]
+			};
+		},
+		created() {
+			this.$p_api.coalmine_working_face({
+				mine:this.mine,
+				org_num:this.org_num
+			}).then((res)=>{
+				// console.log(res.data.data)
+				this.list = res.data.data
+			})
+		},
+		methods:{
+			go_container(id,title){
+				uni.navigateTo({
+					url:"../../production/production_report/detail/detail?id=" + id + "&title=" + title
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.list{
+		box-sizing: border-box;
+		padding: 0 20rpx;
+		.item{
+			display: flex;
+			justify-content: space-between;
+			
+			line-height: 90rpx;
+			border-bottom: 1rpx solid #eee;
+			.left{
+				display: flex;
+				align-items: baseline;
+				.icon{
+					width: 25rpx;
+					height: 27rpx;
+					background-image: url(./icon/icon.png);
+					background-size: cover;
+				}
+				.name{
+					margin-left: 12rpx;
+					
+					font-size: 28rpx;
+					color: #1e1e1e;
+				}
+			}
+			.right{}
+		}
+	}
+</style>

+ 122 - 0
components/p-production-statistics-section-1/p-production-statistics-section-1.vue

@@ -0,0 +1,122 @@
+<template>
+	<view>
+		<canvas canvas-id="canvasRing" id="canvasRing" @touchstart="touchRing"
+			style="width: 700upx; height:500upx;"></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(500);
+			this.getServerData();
+		},
+		methods: {
+			getServerData() {
+
+
+				this.$p_api.coalmine_output({
+
+				}).then((res) => {
+
+					let Ring = {
+						"series": [{
+							"name": "早班 000000 吨",
+							"data": 0
+						}, {
+							"name": "中班 000000 吨",
+							"data": 0
+						}, {
+							"name": "晚班 000000 吨",
+							"data": 0
+						}],
+						"total": 0
+					};
+
+					// console.log(res.data.data)
+
+					Ring.total = res.data.data.total
+
+					// console.log(Ring.total)
+
+					Ring.series[0].name = '早班 ' + res.data.data.n1 + ' 吨'
+					Ring.series[0].data = res.data.data.n1
+					Ring.series[1].name = '中班 ' + res.data.data.n2 + ' 吨'
+					Ring.series[1].data = res.data.data.n2
+					Ring.series[2].name = '晚班 ' + res.data.data.n3 + ' 吨'
+					Ring.series[2].data = res.data.data.n3
+
+					// console.log(Ring)
+					_self.showRing("canvasRing", Ring);
+				})
+
+
+			},
+			showRing(canvasId, chartData) {
+				canvaRing = new uCharts({
+					$this: _self,
+					canvasId: canvasId,
+					type: 'ring',
+					fontSize: 11,
+					legend: {
+						position: 'left',
+						lineHeight: 50,
+					},
+					title: {
+						name: chartData.total + ' 吨',
+						color: '#000000',
+						fontSize: 20 * _self.pixelRatio,
+						offsetY: 20 * _self.pixelRatio,
+					},
+					subtitle: {
+						name: '总产量',
+						color: '#666666',
+						fontSize: 14 * _self.pixelRatio,
+						offsetY: -30 * _self.pixelRatio,
+					},
+					extra: {
+						pie: {
+							offsetAngle: -90,
+							ringWidth: 20 * _self.pixelRatio,
+							labelWidth: 15
+						}
+					},
+					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>
+
+</style>

+ 145 - 0
components/p-production-statistics-section-2/p-production-statistics-section-2.vue

@@ -0,0 +1,145 @@
+<template>
+	<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() {
+				// let Pie = {
+				// 	"series": [{
+				// 		"name": "梅花井矿 0%",
+				// 		"data": 0
+				// 	}, {
+				// 		"name": "枣泉矿 15.3%",
+				// 		"data": 10493.3
+				// 	}, {
+				// 		"name": "红柳矿 11.21%",
+				// 		"data": 7837
+				// 	}, {
+				// 		"name": "麦垛山矿 13.91%",
+				// 		"data": 9711.1
+				// 	}, {
+				// 		"name": "金凤矿 5.27%",
+				// 		"data": 3683.7
+				// 	}, {
+				// 		"name": "双马矿 4.29%",
+				// 		"data": 2999.2
+				// 	}, {
+				// 		"name": "石槽村矿 7.35%",
+				// 		"data": 5138.5
+				// 	}, {
+				// 		"name": "灵新矿 5.72%",
+				// 		"data": 3994.7
+				// 	}, {
+				// 		"name": "任家庄矿 2.22%",
+				// 		"data": 1556.5
+				// 	}, {
+				// 		"name": "红石湾矿 0%",
+				// 		"data": 0
+				// 	}, {
+				// 		"name": "羊二矿 1.55%",
+				// 		"data": 1085.6
+				// 	}, {
+				// 		"name": "羊一矿 28.79%",
+				// 		"data": 20104
+				// 	}, {
+				// 		"name": "白芨沟井 4.59%",
+				// 		"data": 3207.9
+				// 	}, {
+				// 		"name": "大峰矿 0%",
+				// 		"data": 0
+				// 	}]
+				// };
+				
+				this.$p_api.coalmine_ratio({
+					
+				}).then((res)=>{
+					console.log(res.data.data)
+					
+					let Pie = {
+						"series": [{
+							"name": "",
+							"data": 0
+						}]
+					};
+					
+						
+					res.data.data.forEach((item,index)=>{
+						var sevm = {}
+						
+						sevm.name = item.name_s
+						sevm.data = item.n1+item.n2+item.n3
+						
+						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: 'bottom',
+						lineHeight: 20,
+					},
+					background: '#FFFFFF',
+					pixelRatio: _self.pixelRatio,
+					series: chartData.series,
+					animation: true,
+					width: _self.cWidth * _self.pixelRatio,
+					height: _self.cHeight * _self.pixelRatio,
+					dataLabel: true,
+					extra: {
+						pie: {
+							lableWidth: 15
+						}
+					},
+					
+				});
+			},
+			touchPie(e) {
+				canvaPie.showToolTip(e, {
+					format: function(item) {
+						return item.name + ' : ' + item.data + ' 吨'
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 128 - 0
components/p-production-statistics-section-3/p-production-statistics-section-3.vue

@@ -0,0 +1,128 @@
+<template>
+	<view>
+		<canvas canvas-id="canvasColumnStack" id="canvasColumnStack" @touchstart="touchColumn" style="width: 700rpx; height: 800rpx;"></canvas>
+	</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(700);
+			this.cHeight = uni.upx2px(780);
+			this.getServerData();
+		},
+		methods: {
+			getServerData() {
+				this.$p_api.coalmine_trend({
+					
+				}).then((res)=>{
+					// console.log(res.data.data)
+					
+					let ColumnStack={
+						categories:[],
+						series:[
+							{
+								"name": "早班",
+								"data": []
+							},
+							{
+								"name": "中班",
+								"data": []
+							},
+							{
+								"name": "晚班",
+								"data": []
+							}
+						],
+					};
+					
+					res.data.data.map((item,index)=>{
+						var sevm = {};
+						sevm = item.date;
+						ColumnStack.categories[index] = sevm
+					})
+					
+					res.data.data.map((item,index)=>{
+						var sevm = {};
+						sevm = item.n1;
+						ColumnStack.series[0].data[index] = sevm
+					})
+					res.data.data.map((item,index)=>{
+						var sevm = {};
+						sevm = item.n2;
+						ColumnStack.series[1].data[index] = sevm
+					})
+					res.data.data.map((item,index)=>{
+						var sevm = {};
+						sevm = item.n3;
+						ColumnStack.series[2].data[index] = sevm
+					})
+					
+					
+					_self.showColumnStack("canvasColumnStack", ColumnStack);
+				})
+				
+				
+			},
+			showColumnStack(canvasId, chartData) {
+				canvaColumn = new uCharts({
+					$this: _self,
+					canvasId: canvasId,
+					type: 'column',
+					legend: {
+						show: true,
+						position: 'top',
+						itemGap: 30,
+					},
+					fontSize: 11,
+					background: '#FFFFFF',
+					pixelRatio: _self.pixelRatio,
+					animation: true,
+					categories: chartData.categories,
+					series: chartData.series,
+					xAxis: {
+						disableGrid: true,
+					},
+					yAxis: {
+						//disabled:true
+					},
+					dataLabel: false,
+					width: _self.cWidth * _self.pixelRatio,
+					height: _self.cHeight * _self.pixelRatio,
+					extra: {
+						column: {
+							type: 'stack',
+							width: _self.cWidth * _self.pixelRatio * 0.5 / chartData.categories.length
+						}
+					}
+				});
+
+			},
+			touchColumn(e) {
+				canvaColumn.showToolTip(e, {
+					format: function(item, category) {
+						// return category + ' ' + item.name + ':' + item.data
+						return item.name + ':' + item.data
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 161 - 0
components/p-production-statistics-section-4/p-production-statistics-section-4.vue

@@ -0,0 +1,161 @@
+<template>
+	<view>
+		<view class="list">
+			<view class="item" v-for="(item,index) in list" :key="index">
+				<view class="item_title">{{item.name}}</view>
+				<view class="item_content">
+					<view class="box">
+						<view class="name">早班产量</view>
+						<view class="num">{{item.n1}} 吨</view>
+					</view>
+					<view class="box">
+						<view class="name">中班产量</view>
+						<view class="num">{{item.n2}} 吨</view>
+					</view>
+					<view class="box">
+						<view class="name">晚班产量</view>
+						<view class="num">{{item.n3}} 吨</view>
+					</view>
+				</view>
+				<view class="item_bottom">
+					<view class="left">年累计产量:<text>{{item.year}} 吨</text></view>
+					<view class="right" @click="go_container(item.org_num)">
+						<view class="more">更多详情</view>
+						<uni-icons type="arrowright" size="12" color="#75B8D5"></uni-icons>
+					</view>
+				</view>
+			</view>
+			
+		</view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				list:[]
+			};
+		},
+		mounted() {
+			this.get_list()
+		},
+		methods:{
+			go_container(org_num){
+				uni.navigateTo({
+					url: "../../production/production_report/production_report?org_num=" +
+						org_num,
+				})
+			},
+			get_list(){
+				this.$p_api.coalmine_ratio({
+					
+				}).then((res)=>{
+					// console.log(res.data.data)
+					
+					this.list = res.data.data
+				})
+			},
+			
+		}
+		
+	}
+</script>
+
+<style lang="scss">
+	.list {
+		padding-bottom: 40rpx;
+
+		.item {}
+
+		.item_title {
+			text-align: center;
+			line-height: 100rpx;
+
+			font-size: 34rpx;
+			font-weight: 700;
+		}
+
+		.item_content {
+			box-sizing: border-box;
+			padding: 0 20rpx;
+
+			display: flex;
+			justify-content: space-between;
+
+			.box {
+				box-sizing: border-box;
+				width: 200rpx;
+				text-align: center;
+
+				border-radius: 6px;
+				overflow: hidden;
+
+				.name {
+					font-size: 26rpx;
+					line-height: 40rpx;
+				}
+
+				.num {
+					font-size: 26rpx;
+					line-height: 40rpx;
+				}
+			}
+
+			.box:nth-child(1) {
+				border: 1px solid #00A2E8;
+			}
+
+			.box:nth-child(1) .name {
+				background-color: #00A2E8;
+			}
+
+			.box:nth-child(2) {
+				border: 1px solid #FFBC34;
+			}
+
+			.box:nth-child(2) .name {
+				background-color: #FFBC34;
+			}
+
+			.box:nth-child(3) {
+				border: 1px solid #FFC0B2;
+			}
+
+			.box:nth-child(3) .name {
+				background-color: #FFC0B2;
+			}
+		}
+
+		.item_bottom {
+			display: flex;
+			justify-content: space-between;
+
+			box-sizing: border-box;
+			padding: 40rpx 0;
+			margin: 0 20rpx;
+			border-bottom: 1px solid #eee;
+
+			.left {
+				font-size: 24rpx;
+
+				text {
+					font-weight: 700;
+				}
+			}
+
+			.right {
+				display: flex;
+				align-items: baseline;
+
+				.more {
+					margin-right: 6rpx;
+
+					font-size: 24rpx;
+					color: #75B8D5;
+				}
+			}
+		}
+	}
+</style>

+ 242 - 0
components/p-safety-monitoring-content-1/p-safety-monitoring-content-1.vue

@@ -0,0 +1,242 @@
+<template>
+	<view>
+		<view class="p-i-s-content-1">
+			<view class="top">
+				<view class="list_item">
+					<view class="item" v-for="(item,index) in simulation" :key="index" :class="item.type"
+						@click="go_status_detail(item.type,item.name)">
+						<view class="name">{{item.name}}</view>
+						<view class="num">{{item.count}}个</view>
+					</view>
+				</view>
+			</view>
+			<view class="inner">
+				<view class="list_item">
+					<view class="item" v-for="(item,index) in simulationList" :key="index"
+						@click="go_name_detail(item.typeCodeDesc)">
+						<view class="item_title">
+							<view class="item_name">{{item.typeCodeDesc}}</view>
+						</view>
+						<view class="item_content">
+							<view class="item_content_list">
+								<view class="content_item" v-for="(inner,index) in item.normalCount" :key="index">
+									<view class="name">{{inner.name}}</view>
+									<view class="num" v-if="index == 0" :class="index==0?'normal':''">{{inner.count}}个
+									</view>
+									<view class="num" v-if="index == 1" :class="index==1?'alarm':''">{{inner.count}}个
+									</view>
+									<view class="num" v-if="index == 2" :class="index==2?'sign':''">{{inner.count}}个
+									</view>
+									<view class="num" v-if="index == 3" :class="index==3?'fault':''">{{inner.count}}个
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: [
+			"mine",
+			"simulation",
+			"simulationList"
+		],
+		data() {
+			return {
+				imglist: []
+			};
+		},
+		computed: {
+			imgUrl: function(index) {
+				console.log(index)
+			}
+		},
+		methods: {
+			go_status_detail(status, title) {
+				uni.navigateTo({
+					url: "../../production/safety_monitoring/safety_monitoring_status_detail/safety_monitoring_status_detail?status=" +
+						status + "&title=" + title + "&type=simulation" + "&mine=" + this.mine
+				})
+			},
+			go_name_detail(name) {
+				uni.navigateTo({
+					url: "../../production/safety_monitoring/safety_monitoring_name_detail/safety_monitoring_name_detail?name=" +
+						name + "&mine=" + this.mine
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.p-i-s-content-1 {
+		.top {
+			height: 202rpx;
+			background: #FFFFFF;
+
+			border-bottom: 1rpx solid #f3f3f3;
+
+			.list_item {
+				height: 202rpx;
+				display: flex;
+				justify-content: space-around;
+				align-items: center;
+
+				.item {
+					width: 106rpx;
+					height: 106rpx;
+					border-radius: 50%;
+					text-align: center;
+					line-height: 53rpx;
+
+					.name {
+						margin-top: 21rpx;
+						font-size: 25rpx;
+						font-family: PingFangSC-Regular, PingFang SC;
+						font-weight: 400;
+						color: #FFFFFF;
+
+						line-height: 34rpx;
+					}
+
+					.num {
+						margin-top: 4rpx;
+						font-size: 21rpx;
+						font-family: PingFangSC-Regular, PingFang SC;
+						font-weight: 400;
+						color: #FFFFFF;
+
+						line-height: 29rpx;
+					}
+				}
+
+				.item_1 {
+					background: #27AE60;
+				}
+
+				.item_2 {
+					background: #E74C3C;
+				}
+
+				.item_3 {
+					background: #2C3E50;
+				}
+
+				.item_4 {
+					background: #2873FF;
+				}
+
+				// 模拟量 统计
+				.normal {
+					background: #2C3E50;
+				}
+
+				.alarm {
+					background: #E74C3C;
+				}
+
+				.sign {
+					background: #27AE60;
+				}
+
+				.fault {
+					background: #2873FF;
+				}
+			}
+		}
+
+		.inner {
+			.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;
+
+								}
+
+								.normal {
+									color: #2C3E50;
+								}
+
+								.alarm {
+									color: #E74C3C;
+								}
+
+								.sign {
+									color: #2ECC71;
+								}
+
+								.fault {
+									color: #2F54EB;
+								}
+							}
+						}
+					}
+				}
+			}
+
+
+		}
+	}
+</style>

+ 202 - 0
components/p-safety-monitoring-content-2/p-safety-monitoring-content-2.vue

@@ -0,0 +1,202 @@
+<template>
+	<view>
+		<view class="p-i-s-content-2">
+			<view class="top">
+				<view class="list_item">
+					<view class="item" v-for="(item,index) in sluice" :key="index" :class="item.type"  @click="go_status_detail(item.type,item.name)">
+						<view class="name">{{item.name}}</view>
+						<view class="num">{{item.count}}个</view>
+					</view>
+				</view>
+			</view>
+			<view class="inner">
+				<view class="list_item">
+					<view class="item" v-for="(item,index) in sluiceList" :key="index" @click="go_name_detail(item.typeCodeDesc)">
+						<view class="item_title">
+							<view class="item_name">{{item.typeCodeDesc}}</view>
+						</view>
+						<view class="item_content">
+							<view class="item_content_list">
+								<view class="content_item" v-for="(inner,index) in item.normalCount" :key="index">
+									<view class="name">{{inner.name}}</view>
+									<view class="num" :class="inner.type">{{inner.count}}个</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:[
+			"sluice",
+			"sluiceList",
+			"mine"
+		],
+		data() {
+			return {
+				
+			};
+		},
+		methods:{
+			go_status_detail(status,title){
+				uni.navigateTo({
+					url: "../../production/safety_monitoring/safety_monitoring_status_detail/safety_monitoring_status_detail?status=" + status + "&title=" + title + "&type=sluice" + "&mine=" + this.mine
+				})
+			},
+			go_name_detail(name){
+				uni.navigateTo({
+					url: "../../production/safety_monitoring/safety_monitoring_name_detail/safety_monitoring_name_detail?name=" + name + "&mine=" + this.mine
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	
+	.p-i-s-content-2{
+		.top{
+			height: 202rpx;
+			background: #FFFFFF;
+			
+			border-bottom: 1rpx solid #f3f3f3;
+			.list_item{
+				height: 202rpx;
+				display: flex;
+				justify-content: space-around;
+				align-items: center;
+				.item{
+					width: 106rpx;
+					height: 106rpx;
+					border-radius: 50%;
+					text-align: center;
+					line-height: 53rpx;
+					.name{
+						margin-top: 21rpx;
+						font-size: 25rpx;
+						font-family: PingFangSC-Regular, PingFang SC;
+						font-weight: 400;
+						color: #FFFFFF;
+						
+						line-height: 34rpx;
+					}
+					.num{
+						margin-top: 4rpx;
+						font-size: 21rpx;
+						font-family: PingFangSC-Regular, PingFang SC;
+						font-weight: 400;
+						color: #FFFFFF;
+						
+						line-height: 29rpx;
+					}
+				}
+				.item_1{
+					background: #27AE60;
+				}
+				.item_2{
+					background: #E74C3C;
+				}
+				.item_3{
+					background: #2C3E50;
+				}
+				.item_4{
+					background: #2873FF;
+				}
+				
+				// 开关量 统计
+				.normal{
+					background: #2C3E50;
+				}
+				.alarm{
+					background: #E74C3C;
+				}
+				.open{
+					background: #27AE60;
+				}
+				.close{
+					background: #2873FF;
+				}
+			}
+		}
+		.inner{
+			.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;
+
+								}
+								.normal{
+									color: #2ECC71;
+								}
+								.alarm{
+									color: #E74C3C;
+								}
+								.sign{
+									color: #2C3E50;
+								}
+								.fault{
+									color: #2F54EB;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

BIN
components/p-safety-monitoring-navbar/icon/search.png


+ 116 - 0
components/p-safety-monitoring-navbar/p-safety-monitoring-navbar.vue

@@ -0,0 +1,116 @@
+<template>
+	<view>
+		<view class="content">
+			<view :style="{height:statusBarHeight + 'px'}">
+				<!-- 这里是状态栏 -->
+			</view>
+			<view class="navbar">
+		
+				<view class="left" @click="click_left()">
+					<uni-icons type="arrowleft" color="#fff" size="18"></uni-icons>
+				</view>
+				<view class="right" @click="go_search()">
+					<view class="input_box">
+						<view class="input_icon"></view>
+						<view class="input_text">搜索</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 占位符 -->
+		<view :style="{height: statusBarHeight + 'px'}"></view>
+		<view style="height: 93rpx;"></view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:["mine"],
+		data() {
+			return {
+				statusBarHeight: 20,
+				
+			};
+		},
+		created() {
+			// 获取手机系统信息
+			const info = uni.getSystemInfoSync()
+			// 设置状态栏高度
+			this.statusBarHeight = info.statusBarHeight
+			
+		},
+		methods: {
+			click_left() {
+				uni.navigateBack();
+			},
+			go_search(){
+				uni.navigateTo({
+					url:"../../production/safety_monitoring/safety_monitoring_search/safety_monitoring_search?mine=" + this.mine,
+					animationType: 'fade-in',
+					animationDuration: 200
+				})
+			}
+		}
+
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		position: fixed;
+		top: 0;
+		left: 0;
+			
+		z-index: 999;
+		background-color: #009FE8;
+	}
+
+	.navbar {
+		width: 750rpx;
+		box-sizing: border-box;
+		padding-left: 31rpx;
+		padding-right: 26rpx;
+		padding-top: 14rpx;
+		padding-bottom: 14rpx;
+		display: flex;
+		justify-content: space-between;
+
+		.left {
+			width: 42rpx;
+			line-height: 65rpx;
+		}
+
+		.right {
+			width: 620rpx;
+			height: 65rpx;
+			background: rgba(255, 255, 255, 0.2);
+			border-radius: 33rpx;
+
+			.input_box {
+				display: flex;
+
+				.input_icon {
+					margin-left: 43rpx;
+					margin-top: 16rpx;
+					width: 34rpx;
+					height: 34rpx;
+
+					background-image: url(icon/search.png);
+					background-size: cover;
+					background-repeat: no-repeat;
+				}
+
+				.input_text {
+					margin-left: 19rpx;
+
+					font-size: 24rpx;
+					font-family: PingFangSC-Regular, PingFang SC;
+					font-weight: 400;
+					color: #FFFFFF;
+					line-height: 65rpx;
+
+				}
+			}
+		}
+	}
+</style>

+ 171 - 0
components/personnel-orientation-population-trend/personnel-orientation-population-trend.vue

@@ -0,0 +1,171 @@
+<template>
+	<view>
+		<view class="section">
+			<view class="title" @click="change_qushi_title()">{{qushi_title}}
+				<uni-icons type="bottom" style="margin-left: 10rpx;"></uni-icons>
+			</view>
+			<view class="charts-box" v-if="qushi_type == 0">
+				<qiun-data-charts type="column" :opts="column_1" tooltipFormat="personnel_statistics_ren"
+					:chartData="chartData_column_1" />
+			</view>
+			<view class="charts-box" v-if="qushi_type == 1">
+				<qiun-data-charts type="column" :opts="column_2" tooltipFormat="personnel_statistics_ren"
+					:chartData="chartData_column_2" />
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "personnel-orientation-population-trend",
+		props:[
+			"mine"
+		],
+		data() {
+			return {
+				// 周、月下井趋势
+				column_1: {
+					legend: {
+						position: "top",
+					},
+					dataLabel: false,
+					xAxis: {
+						disableGrid: true
+					},
+					extra: {
+						column: {
+							type: "stack",
+							width: 20
+						}
+					}
+				},
+				column_2: {
+					legend: {
+						position: "top",
+					},
+					dataLabel: false,
+					xAxis: {
+						disableGrid: true,
+						fontSize: 11
+					},
+					extra: {
+						column: {
+							type: "stack",
+							width: 10
+						}
+					}
+				},
+				chartData_column_1: {},
+				chartData_column_2: {},
+				
+				qushi_title: "周下井人数趋势",
+				qushi_title_list: ["周下井人数趋势", "月下井人数趋势"],
+				qushi_type: 0
+			};
+		},
+		mounted() {
+			// console.log(this.mine)
+			this.getServerData()
+		},
+		methods: {
+			getServerData() {
+				this.$p_api.personnel_getPeopleXJQS({
+					type: "week",
+					mine: this.mine
+				}).then((res)=>{
+					this.chartData_column_1 = res.data.data
+				})
+				this.$p_api.personnel_getPeopleXJQS({
+					type: "month",
+					mine: this.mine
+				}).then((res)=>{
+					this.chartData_column_2 = res.data.data
+				})
+				
+		// 		setTimeout(() => {
+		// 			let res = {
+		// 				categories: ["30日", "31日", "1日", "2日", "3日", "4日", "5日"],
+		// 				series: [{
+		// 						name: "早班",
+		// 						data: [35, 36, 31, 33, 13, 34, 32]
+		// 					},
+		// 					{
+		// 						name: "中班",
+		// 						data: [18, 27, 21, 24, 6, 28, 2]
+		// 					},
+		// 					{
+		// 						name: "晚班",
+		// 						data: [18, 27, 21, 24, 6, 28, 4]
+		// 					}
+		// 				]
+		// 			};
+		// 			this.chartData_column_1 = JSON.parse(JSON.stringify(res));
+		// 		}, 500);
+
+		// 		setTimeout(() => {
+		// 			let res = {
+		// 				categories: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月",
+		// 					"12月"
+		// 				],
+		// 				series: [{
+		// 						name: "早班",
+		// 						data: [35, 36, 31, 33, 13, 34, 32, 31, 33, 13, 34, 32]
+		// 					},
+		// 					{
+		// 						name: "中班",
+		// 						data: [18, 27, 21, 24, 6, 28, 2, 31, 33, 13, 34, 32]
+		// 					},
+		// 					{
+		// 						name: "晚班",
+		// 						data: [18, 27, 21, 24, 6, 28, 4, 31, 33, 13, 34, 32]
+		// 					}
+		// 				]
+		// 			};
+		// 			this.chartData_column_2 = JSON.parse(JSON.stringify(res));
+		// 		}, 500);
+		
+			},
+
+			change_qushi_title(type) {
+				uni.showActionSheet({
+					itemList: this.qushi_title_list,
+					success: (res) => {
+						// console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
+						this.qushi_title = this.qushi_title_list[res.tapIndex]
+						this.qushi_type = res.tapIndex
+					}
+				});
+			}
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	.charts-box {
+		width: 350px;
+		height: 300px;
+	}
+
+	.content {
+		width: 750rpx;
+
+		box-sizing: border-box;
+		padding: 25rpx;
+	}
+
+	.section {
+		background-color: #FFFFFF;
+		border-radius: 8px;
+		overflow: hidden;
+
+		padding-bottom: 30rpx;
+		margin-bottom: 25rpx;
+
+		.title {
+			padding: 40rpx 20rpx 0;
+			font-weight: 700;
+		}
+	}
+</style>

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

@@ -0,0 +1,91 @@
+<template>
+	<view>
+		<view class="banner">
+			<swiper class="box" autoplay circular>
+				<swiper-item v-for="(item,index) in banner" :key="item.id" @click="go_link(item.jumpURL)">
+					<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>
+	import {goToLink} from "@/common/common.js"
+	export default {
+		name:"t-i-banner-2",
+		props: [
+			"banner",
+			"mine_code"
+		],
+		data() {
+			return {
+				
+			}
+		},
+		methods:{
+			go_link(link){
+				console.log(link)
+				
+				let item = {
+					link:link
+				}
+				
+				goToLink(item,this.mine_code)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.banner{
+		margin-top: -60rpx;
+		.box{
+			width: 750rpx;
+			height: 620rpx;
+			
+			.item{
+				width: 750rpx;
+				.img{
+					text-align: center;
+					image{
+						width: 750rpx;
+						height: 485rpx;
+						
+					}
+				}
+				.title{
+					box-sizing: border-box;
+					padding: 0 25rpx;
+					width: 750rpx;
+					height: 130rpx;
+					
+					line-height: 1.5;
+					font-size: 32rpx;
+					
+					position: relative;
+					
+					.num{
+						position: absolute;
+						bottom: 35rpx;
+						right: 25rpx;
+						color: #ACB0AC;
+						text{
+							color: #23A2EE;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 118 - 0
components/t-i-banner/t-i-banner - 标题与图片分离的备份.vue

@@ -0,0 +1,118 @@
+<template>
+	<view>
+		<view class="banner">
+			<swiper class="box" autoplay circular @animationfinish="animationfinish">
+				<swiper-item v-for="(item,index) in banner" :key="item.id" @click="go_link(item.jumpURL)">
+					<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: [
+			"banner",
+			"mine_code"
+		],
+		data() {
+			return {
+				
+			}
+		},
+		methods:{
+			go_link(link){
+				console.log(link)
+				
+				// 二维码
+				if (link.indexOf("pageId") != -1 && link.indexOf("app:") == -1) {
+					let pageId = ""
+				
+					function GetQueryString(name) {
+						var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+						var r = link.match(reg);
+						if (r != null) return unescape(r[2]);
+						return null;
+					}
+					console.log(GetQueryString("pageId"))
+					if (GetQueryString("pageId")) {
+						pageId = GetQueryString("pageId")
+					} else {
+						pageId = link.split('=')[1]
+					}
+				
+					uni.navigateTo({
+						url: "../../index/record/record?pageId=" + pageId + "&mine_code=" + this.mine_code,
+					})
+				}// h5
+				if (link.indexOf("pageId") == -1 && link.indexOf("app:") == -1) {
+					console.log("H5")
+					uni.navigateTo({
+						url:"../../index/h5/h5?url=" + link
+					})
+				}
+
+				
+			},
+			animationfinish($event){
+				this.$emit('change_top_bg_color_img',$event.detail.current)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.banner{
+		margin-top: -60rpx;
+		.box{
+			width: 750rpx;
+			height: 620rpx;
+			
+			.item{
+				width: 750rpx;
+				.img{
+					text-align: center;
+					image{
+						width: 700rpx;
+						height: 485rpx;
+						border-radius: 20rpx;
+						
+					}
+				}
+				.title{
+					box-sizing: border-box;
+					padding: 0 25rpx;
+					width: 750rpx;
+					height: 130rpx;
+					
+					line-height: 1.5;
+					font-size: 32rpx;
+					
+					position: relative;
+					
+					.num{
+						position: absolute;
+						bottom: 35rpx;
+						right: 25rpx;
+						color: #ACB0AC;
+						text{
+							color: #23A2EE;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

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

@@ -0,0 +1,125 @@
+<template>
+	<view>
+		<view class="banner">
+			<swiper class="box" autoplay circular @animationfinish="animationfinish">
+				<swiper-item v-for="(item,index) in banner" :key="index" @click="go_link(item)">
+					<view class="item">
+						<view class="img">
+							<image :src="item.imgURL" mode="aspectFill"></image>
+						</view>
+						<view class="title">
+							<view class="text">{{item.title}}</view>
+							<view class="num">
+								<!-- — <text> {{index+1}} </text> — -->
+								<text>{{index+1}} / {{banner.length}}</text>
+							</view>
+						</view>
+					</view>
+				</swiper-item>
+			</swiper>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {goToLink} from "@/common/common.js"
+	export default {
+		name:"t-i-banner",
+		props: [
+			"banner",
+			"mine_code"
+		],
+		data() {
+			return {
+				
+			}
+		},
+		methods:{
+			go_link(item){
+				if(this.mine_code != "zaoquan"){
+					console.log(item.link)
+					
+					let item2 = {
+						link:item.jumpURL
+					}
+					
+					goToLink(item2,this.mine_code)
+				}else{
+					uni.navigateTo({
+						url: "../../index/news/news_type/detail/detail?title=" + item.title,
+						success: function(res) {
+							res.eventChannel.emit('acceptDataFromOpenerPage', {
+								data: item
+							})
+						}
+					})
+				}
+			},
+			animationfinish($event){
+				this.$emit('change_top_bg_color_img',$event.detail.current)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.banner{
+		margin-top: -60rpx;
+		.box{
+			width: 750rpx;
+			height: 430rpx;
+			
+			.item{
+				width: 750rpx;
+				
+				position: relative;
+				.img{
+					margin: 0 auto;
+					text-align: center;
+					width: 700rpx;
+					height: 400rpx;
+					border-radius: 20rpx;
+					overflow: hidden;
+					image{
+						margin-top: -20rpx;
+						width: 700rpx;
+						height: 440rpx;
+						border-radius: 20rpx;
+					}
+				}
+				.title{
+					position: absolute;
+					left: 0;
+					bottom: 0;
+					
+					box-sizing: border-box;
+					padding: 15rpx 50rpx;
+					width: 750rpx;
+					
+					line-height: 1.5;
+					font-size: 32rpx;
+					
+					display: flex;
+					justify-content: space-between;
+					
+					.text{
+						width: 520rpx;
+						color: #FFFFFF;
+						
+						overflow: hidden;
+						text-overflow: ellipsis;
+						white-space: nowrap;
+					}
+					
+					.num{
+						color: #ACB0AC;
+						text{
+							// color: #23A2EE;
+							color: #FFFFFF;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 193 - 0
components/t-i-bottom/t-i-bottom-OA.vue

@@ -0,0 +1,193 @@
+<template>
+	<view class="content">
+		<view class="section_1" v-if="bottom[2].data.length > 0">
+			<scroll-view scroll-x>
+				<view class="tab_box">
+					<view class="tab" v-for="(item,index) in bottom[2].data[0].children" :key="index">
+						<view class="title" @click="change_active(index+1)" :class="active==index+1?'active':''">{{item.title}}</view>
+					</view>
+				</view>
+			</scroll-view>
+			<view v-for="(item,index) in bottom[2].data[0].children" :key="index">
+				<view class="list" v-if="index+1 == active">
+					<view class="item" v-for="(item_2,index_2) in item.children" :key="index_2" @click="go_record(item_2)">
+						{{item_2.title}}
+					</view>
+				</view>
+			</view>
+			
+		</view>
+
+		<!-- 图片链接 -->
+		<view class="section_2" v-if="bottom[3].data.length > 0">
+			<view class="title">{{bottom[3].type_name}}</view>
+			<view class="list">
+				<view class="item" v-for="(item,index) in bottom[3].data[0].children" :key="index" @click="go_record(item)">
+					<image :src="item.thumb" mode=""></image>
+				</view>
+			</view>
+		</view>
+
+		<!-- 快速通道 -->
+		<view class="section_3" v-if="bottom[4].data.length > 0">
+			<view class="title">{{bottom[4].type_name}}</view>
+			<view class="list">
+				<view class="item" v-for="(item,index) in bottom[4].data[0].children" :key="index" @click="go_record(item)">
+					<image :src="item.thumb" mode="widthFix"></image>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		goToLink
+	} from "@/common/common.js"
+
+	export default {
+		name: "t-i-bottom",
+		props: [
+			"bottom",
+			"mine_code"
+		],
+		data() {
+			return {
+				active: 1,
+			};
+		},
+		methods: {
+			change_active(index) {
+				console.log(index)
+				this.active = index
+			},
+			go_record(item) {
+				goToLink(item, this.mine_code)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		margin-top: 10rpx;
+		padding-bottom: 40rpx;
+		background-color: #FFFFFF;
+	}
+
+	.section_1 {
+		box-sizing: border-box;
+		padding: 25rpx;
+		.tab_box{
+			display: flex;
+			.tab {
+				margin-right: 40rpx;
+				text-align: center;
+				
+				.title {
+					width: 160rpx;
+					line-height: 80rpx;
+					font-size: 36rpx;
+				}
+			
+				.active {
+					color: #009fe8;
+					border-bottom: 4rpx solid #009fe8;
+				}
+			}
+		}
+
+		.list {
+			margin-top: 30rpx;
+			overflow: hidden;
+
+			.item {
+				float: left;
+				margin-right: 20rpx;
+				margin-bottom: 30rpx;
+
+				width: 160rpx;
+				box-sizing: border-box;
+				border: 2rpx solid #009fe8;
+				border-radius: 20rpx;
+				font-size: 28rpx;
+				line-height: 70rpx;
+				//超过一行省略号
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+
+				padding: 0 10rpx;
+				background-color: #66C7F218;
+				color: #009FE8;
+
+				text-align: center;
+			}
+
+			.item:nth-child(4n) {
+				margin-right: 0;
+			}
+		}
+
+	}
+
+
+	.section_2 {
+		box-sizing: border-box;
+		padding: 0 25rpx;
+
+		.title {
+			line-height: 120rpx;
+			font-size: 36rpx;
+		}
+
+		.list {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+
+			.item {
+				margin-bottom: 20rpx;
+				width: 340rpx;
+				height: 180rpx;
+
+				border-radius: 20rpx;
+				overflow: hidden;
+
+				image {
+					width: 340rpx;
+					height: 180rpx;
+				}
+			}
+		}
+	}
+
+	.section_3 {
+		box-sizing: border-box;
+		padding: 0 25rpx;
+
+		.title {
+			line-height: 120rpx;
+			font-size: 36rpx;
+		}
+
+		.list {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+
+			.item {
+				margin-bottom: 20rpx;
+				width: 700rpx;
+
+				border-radius: 10rpx;
+				overflow: hidden;
+
+				image {
+					width: 700rpx;
+				}
+			}
+		}
+	}
+
+</style>

+ 194 - 0
components/t-i-bottom/t-i-bottom.vue

@@ -0,0 +1,194 @@
+<template>
+	<view class="content">
+		<view class="section_1" v-if="bottom.length > 0 && bottom[0].children[0].children.length > 0">
+			<scroll-view scroll-x>
+				<view class="tab_box">
+					<view class="tab" v-for="(item,index) in bottom[0].children" :key="index">
+						<view class="title" @click="change_active(index+1)" :class="active==index+1?'active':''">{{item.title}}</view>
+					</view>
+				</view>
+			</scroll-view>
+			<view v-for="(item,index) in bottom[0].children" :key="index">
+				<view class="list" v-if="index+1 == active">
+					<view class="item" v-for="(item_2,index_2) in item.children" :key="index_2" @click="go_record(item_2)">
+						{{item_2.title}}
+					</view>
+				</view>
+			</view>
+			
+		</view>
+
+		<!-- 图片链接 -->
+		<view class="section_2" v-if="bottom.length > 0 && bottom[2].children.length > 0">
+			<view class="title">图片链接</view>
+			<view class="list">
+				<view class="item" v-for="(item,index) in bottom[2].children" :key="index" @click="go_record(item)">
+					<image :src="item.thumb" mode=""></image>
+				</view>
+			</view>
+		</view>
+
+		<!-- 快速通道 -->
+		<view class="section_3" v-if="bottom.length > 0 && bottom[3].children.length > 0">
+			<view class="title">快速通道</view>
+			<view class="list">
+				<view class="item" v-for="(item,index) in bottom[3].children" :key="index" @click="go_record(item)">
+					<image :src="item.thumb" mode="widthFix"></image>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		goToLink
+	} from "@/common/common.js"
+
+	export default {
+		name: "t-i-bottom",
+		props: [
+			"bottom",
+			"mine_code"
+		],
+		data() {
+			return {
+				active: 1,
+			};
+		},
+		methods: {
+			change_active(index) {
+				console.log(index)
+				this.active = index
+			},
+			go_record(item) {
+				goToLink(item, this.mine_code)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		margin-top: 10rpx;
+		padding-bottom: 40rpx;
+		background-color: #FFFFFF;
+	}
+
+	.section_1 {
+		box-sizing: border-box;
+		padding: 25rpx;
+		.tab_box{
+			display: flex;
+			.tab {
+				margin-right: 40rpx;
+				text-align: center;
+				
+				.title {
+					width: 300rpx;
+					height: 80rpx;
+					line-height: 80rpx;
+					font-size: 36rpx;
+				}
+			
+				.active {
+					color: #009fe8;
+					border-bottom: 4rpx solid #009fe8;
+				}
+			}
+		}
+
+		.list {
+			margin-top: 30rpx;
+			overflow: hidden;
+
+			.item {
+				float: left;
+				margin-right: 20rpx;
+				margin-bottom: 30rpx;
+
+				width: 160rpx;
+				box-sizing: border-box;
+				border: 2rpx solid #009fe8;
+				border-radius: 20rpx;
+				font-size: 28rpx;
+				line-height: 70rpx;
+				//超过一行省略号
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+
+				padding: 0 10rpx;
+				background-color: #66C7F218;
+				color: #009FE8;
+
+				text-align: center;
+			}
+
+			.item:nth-child(4n) {
+				margin-right: 0;
+			}
+		}
+
+	}
+
+
+	.section_2 {
+		box-sizing: border-box;
+		padding: 0 25rpx;
+
+		.title {
+			line-height: 120rpx;
+			font-size: 36rpx;
+		}
+
+		.list {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+
+			.item {
+				margin-bottom: 20rpx;
+				width: 340rpx;
+				height: 180rpx;
+
+				border-radius: 20rpx;
+				overflow: hidden;
+
+				image {
+					width: 340rpx;
+					height: 180rpx;
+				}
+			}
+		}
+	}
+
+	.section_3 {
+		box-sizing: border-box;
+		padding: 0 25rpx;
+
+		.title {
+			line-height: 120rpx;
+			font-size: 36rpx;
+		}
+
+		.list {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+
+			.item {
+				margin-bottom: 20rpx;
+				width: 700rpx;
+
+				border-radius: 10rpx;
+				overflow: hidden;
+
+				image {
+					width: 700rpx;
+				}
+			}
+		}
+	}
+
+</style>

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


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


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


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


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


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


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


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


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

@@ -0,0 +1,122 @@
+<template>
+	<view class="content" v-if="list.length > 0">
+		<view class="title">
+			<view class="text">我的常用</view>
+			<view class="bars" @click="go_bars()">
+				<uni-icons type="bars" color="#999" size="18"></uni-icons>
+			</view>
+		</view>
+		<view class="list">
+			<view class="item" v-for="(item,index) in list" :key="index" @click="go_record(item.page_id)">
+				<view class="icon">
+					<image v-if="index%7 == 1" src="./icon/01.png" mode=""></image>
+					<image v-if="index%7 == 2" src="./icon/02.png" mode=""></image>
+					<image v-if="index%7 == 3" src="./icon/03.png" mode=""></image>
+					<image v-if="index%7 == 4" src="./icon/04.png" mode=""></image>
+					<image v-if="index%7 == 5" src="./icon/05.png" mode=""></image>
+					<image v-if="index%7 == 6" src="./icon/06.png" mode=""></image>
+					<image v-if="index%7 == 7" src="./icon/07.png" mode=""></image>
+					<image v-if="index%7 == 0" src="./icon/08.png" mode=""></image>
+				</view>
+				<view class="name">{{item.page_name}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "t-i-common",
+		data() {
+			return {
+				list: []
+			};
+		},
+		created() {
+			this.get_link()
+		},
+		methods: {
+			go_bars() {
+				uni.navigateTo({
+					url: "../../index/bars_sort/bars_sort"
+				})
+			},
+
+			get_link() {
+				this.$api.getCommonMenuList({
+
+				}).then((res) => {
+					// console.log(res.data)
+
+					this.list = res.data.data
+				})
+			},
+			
+			go_record(pageId){
+				uni.navigateTo({
+					url:"../../index/record/record?pageId=" + pageId + "&mine_code=" + uni.getStorageSync('mine_code')
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		margin-bottom: 20rpx;
+		background-color: #FFFFFF;
+
+		box-sizing: border-box;
+		padding: 50rpx 25rpx;
+	}
+
+	.title {
+		display: flex;
+		align-items: baseline;
+		justify-content: space-between;
+
+		.text {
+			font-size: 36rpx;
+		}
+
+		.bars {
+			width: 100rpx;
+			text-align: right;
+
+		}
+	}
+
+	.list {
+		width: 700rpx;
+		overflow: hidden;
+
+		.item {
+			margin-top: 30rpx;
+
+			display: flex;
+			align-items: center;
+
+			height: 90rpx;
+
+			.icon {
+				width: 40rpx;
+				margin-right: 30rpx;
+
+				image {
+					display: block;
+					width: 40rpx;
+					height: 40rpx;
+				}
+			}
+
+			.name {
+				width: 620rpx;
+				line-height: 90rpx;
+				font-size: 28rpx;
+
+				border-bottom: 1rpx solid #DBDBDB;
+			}
+		}
+
+	}
+</style>

+ 298 - 0
components/t-i-ice/t-i-ice.vue

@@ -0,0 +1,298 @@
+<template>
+	<view class="content">
+		<view class="nav">
+			<view class="item" v-for="(item,index) in iceList" :key="index" @click="go_link(item)">
+				<view class="icon">
+					<image :src="item.thumb" mode=""></image>
+				</view>
+				<view class="name">{{item.title}}</view>
+			</view>
+		</view>
+
+		<!-- 宁煤信息平台登录框 -->
+		<uni-popup ref="popup" type="center" @maskClick="maskClick">
+			<view class="login_box">
+				<view class="input_box">
+					<view class="label">工号:</view>
+					<view class="box">
+						{{staff_num}}
+					</view>
+				</view>
+				<view class="input_box">
+					<view class="label">登录密码(宁煤信息平台):</view>
+					<view class="box">
+						<input type="password" v-model="password" />
+					</view>
+				</view>
+				<view class="btn" @click="login()">确认</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import time from "@/common/time.js"
+	import {diffTime} from "@/common/time.js"
+	import {goToLink} from "@/common/common.js"
+	
+	export default {
+		name: "t-i-ice",
+		props: [
+			"iceList",
+			"mine_code"
+		],
+		data() {
+			return {
+				staff_num: "",
+				password: "",
+
+				url: "",
+
+				app_id: "",
+				gps: "",
+				deviceID: "",
+				phoneType: ""
+			};
+		},
+		mounted() {
+			this.staff_num = uni.getStorageSync('user').staff_num
+		},
+		methods: {
+			maskClick() {
+				this.password = ""
+			},
+			// 宁煤信息平台
+			go_link(item) {
+				let link = item.link
+
+				if (link.indexOf("nativeApp://") != -1) {
+					let app_name = link.match(/nativeApp:\/\/(\S*)\?/)[1]
+					let app_down_link = link.split('?')[1]
+
+					// #ifdef APP
+					if (plus.os.name == 'Android') {
+
+						plus.runtime.launchApplication({
+							pname: app_name
+						}, (e) => {
+							console.log('Open system default browser failed: ' + e.message)
+
+							uni.showModal({
+								title: app_name,
+								content: '未安装此应用、是否下载?',
+								success: (res)=> {
+									if (res.confirm) {
+										console.log('用户点击确定');
+										
+										uni.navigateTo({
+											url:"../../index/h5/h5?url="+app_down_link
+										})
+									} else if (res.cancel) {
+										console.log('用户点击取消');
+									}
+								}
+							});
+						})
+					}
+					// #endif
+				} else if (link.indexOf("http://mtyyxs.shnxmyjt.com") != -1) {
+					console.log("信息平台")
+
+					this.url = item
+					// 有登录记录
+					let token = uni.getStorageSync('ningmei_token')
+					let time = uni.getStorageSync('ningmei_token_time')
+					// 30天刷新一次
+					let diffTimeShow = diffTime(time,new Date().format("yyyy-MM-dd")).split(' ')[0];
+					console.log(diffTimeShow)
+					if (token.length > 20 && diffTimeShow < 30) {
+						uni.navigateTo({
+							url: "../../index/ningMeiXinXiPingTai/ningMeiXinXiPingTai",
+							success: (res) => {
+								// 通过eventChannel向被打开页面传送数据
+								res.eventChannel.emit('acceptDataFromOpenerPage', {
+									data: this.url
+								})
+							}
+						})
+					} else {
+						this.$refs.popup.open()
+					}
+				}else{
+					goToLink(item,this.mine_code)
+				}
+			
+				
+			},
+
+			login() {
+				// #ifdef APP-PLUS
+				if (this.password == '') {
+					uni.showToast({
+						icon: "none",
+						title: "密码不能为空!"
+					})
+					return
+				}
+
+				this.$refs.popup.close()
+				// 获取gps
+				uni.getLocation({
+					type: 'wgs84',
+					success: (res) => {
+						console.log('当前位置的经度:' + res.longitude);
+						console.log('当前位置的纬度:' + res.latitude);
+
+						this.gps = res.longitude + ',' + res.latitude
+						// 获取设备信息
+						plus.device.getInfo({
+							success: (e) => {
+								console.log(JSON.stringify(e.uuid));
+								console.log(plus.device.model)
+
+								this.deviceID = JSON.stringify(e.uuid)
+								this.phoneType = plus.device.model
+
+
+								uni.request({
+									method: "POST",
+									url: "http://mtyyxs.shnxmyjt.com:33300/api/OAuth/Login",
+									header: {
+										'Content-Type': 'application/json;charset=UTF-8',
+										'caller': 'UnifiedPortal'
+									},
+									data: {
+										phoneType: this.phoneType,
+										password: this.password,
+										gps: this.gps,
+										userID: this.staff_num,
+										resolvingPower: "851*393",
+										deviceID: this.deviceID,
+										ip: "112312313"
+									},
+									success: (res) => {
+										console.log(this.password)
+										console.log(res)
+
+										if (res.data.code = '11002') {
+											uni.showToast({
+												icon: "none",
+												title: res.data.msg
+											})
+
+											if (res.data.data.length > 20) {
+												uni.setStorageSync('ningmei_token', res.data.data)
+												uni.setStorageSync('ningmei_token_time', new Date().format("yyyy-MM-dd"))
+												uni.navigateTo({
+													url: "../../index/ningMeiXinXiPingTai/ningMeiXinXiPingTai",
+													success: (res) => {
+														// 通过eventChannel向被打开页面传送数据
+														res.eventChannel
+															.emit(
+																'acceptDataFromOpenerPage', {
+																	data: this
+																		.url
+																})
+													}
+												})
+											}
+										}
+									}
+								})
+
+							}
+						});
+
+
+					}
+				})
+				// #endif
+
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		margin-bottom: 20rpx;
+		background-color: #FFFFFF;
+
+		box-sizing: border-box;
+		padding: 50rpx 25rpx 15rpx;
+	}
+
+	.nav {
+		overflow: hidden;
+
+		.item {
+			float: left;
+			width: 120rpx;
+
+			margin-right: 25rpx;
+			margin-bottom: 30rpx;
+
+			.icon {
+				width: 120rpx;
+				text-align: center;
+
+				image {
+					width: 100rpx;
+					height: 100rpx;
+					border-radius: 50%;
+				}
+			}
+
+			.name {
+				width: 120rpx;
+				text-align: center;
+				font-size: 30rpx;
+
+				white-space: nowrap;
+				overflow: hidden;
+				text-overflow: ellipsis;
+			}
+		}
+
+		.item:nth-child(5n) {
+			margin-right: 0;
+		}
+	}
+
+	.login_box {
+		width: 500rpx;
+		padding: 30rpx 50rpx;
+		border-radius: 20rpx;
+		margin: 0 auto;
+		background-color: #FFFFFF;
+
+		.input_box {
+			margin-bottom: 30rpx;
+
+			.label {
+				color: #6C6F74;
+				margin-bottom: 20rpx;
+			}
+
+			.box {
+				background: #FFFFFF;
+				border-radius: 8rpx;
+				border: 2rpx solid #E9EBF2;
+
+				box-sizing: border-box;
+				padding: 20rpx 25rpx;
+
+			}
+		}
+
+		.btn {
+			width: 500rpx;
+			margin: 0 auto;
+			border-radius: 8rpx;
+			background-color: #009FE8;
+			line-height: 90rpx;
+			color: #FFFFFF;
+			text-align: center;
+		}
+	}
+</style>

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


+ 123 - 0
components/t-i-icon/t-i-icon - 一行五个.vue

@@ -0,0 +1,123 @@
+<template>
+	<view class="content">
+		<view class="list">
+			<view class="item" v-for="(item,index) in iconList" :key="index" @click="go_link(item)">
+				<view class="icon">
+					<image :src="item.icon" mode=""></image>
+				</view>
+				<view class="name">{{item.title}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "t-i-icon",
+		props: [
+			"iconList",
+			"mine_code"
+		],
+		data() {
+			return {
+
+			};
+		},
+		methods: {
+			go_link(item) {
+				let link = item.link
+				console.log(link)
+				
+				// OA系统
+				if(link.indexOf("oa_system.nxjiewei.com") != -1 ){
+					uni.navigateTo({
+						url:"../../origanization/OA/h5/h5",
+						success: (res) =>{
+							// 通过eventChannel向被打开页面传送数据
+							res.eventChannel.emit('acceptDataFromOpenerPage', {
+								url: link,
+								title: item.title
+							})
+						}
+					})
+					
+					return
+				}
+				
+				// 二维码
+				if (link.indexOf("pageId") != -1 && link.indexOf("app:") == -1) {
+					let pageId = ""
+				
+					function GetQueryString(name) {
+						var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+						var r = link.match(reg);
+						if (r != null) return unescape(r[2]);
+						return null;
+					}
+					console.log(GetQueryString("pageId"))
+					if (GetQueryString("pageId")) {
+						pageId = GetQueryString("pageId")
+					} else {
+						pageId = link.split('=')[1]
+					}
+				
+					uni.navigateTo({
+						url: "../../index/record/record?pageId=" + pageId + "&mine_code=" + this.mine_code,
+					})
+				}
+				// h5
+				if (link.indexOf("pageId") == -1 && link.indexOf("app:") == -1) {
+					uni.navigateTo({
+						url:"../../index/h5/h5?url="+link
+					})
+				}
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		margin-bottom: 30rpx;
+		background-color: #FFFFFF;
+
+		box-sizing: border-box;
+		padding: 50rpx 25rpx 25rpx 25rpx;
+	}
+
+	.list {
+		overflow: hidden;
+
+		.item {
+			float: left;
+			margin-right: 25rpx;
+			margin-bottom: 30rpx;
+			width: 120rpx;
+			.icon {
+				width: 120rpx;
+				text-align: center;
+
+				image {
+					width: 104rpx;
+					height: 104rpx;
+					border-radius: 50%;
+				}
+			}
+
+			.name {
+				width: 120rpx;
+				text-align: center;
+				font-size: 30rpx;
+
+				white-space: nowrap;
+				overflow: hidden;
+				text-overflow: ellipsis;
+			}
+		}
+
+		.item:nth-child(5n) {
+			margin-right: 0;
+		}
+	}
+</style>

+ 87 - 0
components/t-i-icon/t-i-icon - 固定五个.vue

@@ -0,0 +1,87 @@
+<template>
+	<view class="content">
+		<view class="list">
+			<view class="item" v-for="(item,index) in iconList" :key="index" @click="go_link(item.link)">
+				<view class="icon">
+					<image :src="item.icon" mode=""></image>
+				</view>
+				<view class="name">{{item.title}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"t-i-icon",
+		props: [
+			"iconList",
+			"mine_code"
+		],
+		data() {
+			return {
+				
+			};
+		},
+		methods:{
+			go_link(link){
+				// console.log(link.split('=')[3].split('&')[0])
+				// let pageId = link.split('=')[3].split('&')[0]
+				console.log(link)
+				let pageId = ""
+				function GetQueryString(name) {
+					var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+					var r = link.match(reg);
+					if (r != null) return unescape(r[2]);
+					return null;
+				}
+				console.log(GetQueryString("pageId"))
+				if (GetQueryString("pageId")) {
+					pageId = GetQueryString("pageId")
+				} else {
+					pageId = link.split('=')[1]
+				}
+				
+				uni.navigateTo({
+					url:"../../index/record/record?pageId=" + pageId + "&mine_code=" + this.mine_code,
+				})
+			}
+		}
+	}
+</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;
+		align-items: center;
+		.item{
+			width: 120rpx;
+			.icon{
+				width: 120rpx;
+				text-align: center;
+				image{
+					width: 104rpx;
+					height: 104rpx;
+				}
+			}
+			.name{
+				width: 120rpx;
+				text-align: center;
+				font-size: 30rpx;
+				
+				white-space:nowrap;
+				overflow:hidden;
+				text-overflow:ellipsis;
+			}
+		}
+	}
+</style>

+ 96 - 0
components/t-i-icon/t-i-icon - 横向可滑动.vue

@@ -0,0 +1,96 @@
+<template>
+	<view class="content">
+		<scroll-view scroll-x="true">
+			<view class="list">
+				<view class="item" v-for="(item,index) in iconList" :key="index" @click="go_link(item.link)">
+					<view class="icon">
+						<image :src="item.icon" mode=""></image>
+					</view>
+					<view class="name">{{item.title}}</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "t-i-icon",
+		props: [
+			"iconList",
+			"mine_code"
+		],
+		data() {
+			return {
+
+			};
+		},
+		methods: {
+			go_link(link) {
+				// console.log(link.split('=')[3].split('&')[0])
+				// let pageId = link.split('=')[3].split('&')[0]
+				console.log(link)
+				let pageId = ""
+
+				function GetQueryString(name) {
+					var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+					var r = link.match(reg);
+					if (r != null) return unescape(r[2]);
+					return null;
+				}
+				console.log(GetQueryString("pageId"))
+				if (GetQueryString("pageId")) {
+					pageId = GetQueryString("pageId")
+				} else {
+					pageId = link.split('=')[1]
+				}
+
+				uni.navigateTo({
+					url: "../../index/record/record?pageId=" + pageId + "&mine_code=" + this.mine_code,
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		margin-bottom: 30rpx;
+		background-color: #FFFFFF;
+
+		box-sizing: border-box;
+		padding: 50rpx 25rpx;
+	}
+
+	.list {
+		display: flex;
+
+		.item {
+			margin-right: 25rpx;
+			width: 120rpx;
+			.icon {
+				width: 120rpx;
+				text-align: center;
+
+				image {
+					width: 104rpx;
+					height: 104rpx;
+				}
+			}
+
+			.name {
+				width: 120rpx;
+				text-align: center;
+				font-size: 30rpx;
+
+				white-space: nowrap;
+				overflow: hidden;
+				text-overflow: ellipsis;
+			}
+		}
+
+		.item:last-child {
+			margin-right: 0;
+		}
+	}
+</style>

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


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません