Jelajahi Sumber

健康监管页调整

wgl 4 tahun lalu
induk
melakukan
698e4b64da
1 mengubah file dengan 34 tambahan dan 2 penghapusan
  1. 34 2
      src/projects/business/views/Control/Home.vue

+ 34 - 2
src/projects/business/views/Control/Home.vue

@@ -22,7 +22,7 @@
 			<div class="mui-card icon_number">
 				<div class="mui-card-header">
 					开发区健康统计
-					<a class="mui-navigate-right iconfont icon-riqi" href="">2021-01-28</a>
+					<a class="mui-navigate-right iconfont icon-riqi" @click="selectDate" v-text="listForm.queryDate"></a>
 				</div>
 				<div class="mui-card-content">
 					<div class="mui-col-xs-6">
@@ -100,6 +100,7 @@
 </template>
 
 <script>
+	require('$project/assets/js/mui.picker.min.js');
 	import * as API_User from '$project/apis/user'
 	import Common from '$project/components/Common.vue'
 	import Loading from '$project/components/Loading.vue'
@@ -108,6 +109,10 @@
 		mapGetters,
 		mapMutations
 	} from 'vuex'
+	import {
+		currentTimeStamp,
+		parseUnixTime
+	} from '$project/utils'
 	import * as types from '$project/store/mutation-types'
 	export default {
 		name: 'Master',
@@ -121,10 +126,36 @@
 				isLoading: false,
 
 				pageTitle: '开发区监管端',
+
+				listForm: {
+					queryDate: '',
+				}
 			}
 		},
-		created() {},
+		created() {
+			this.listForm.queryDate = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
+		},
 		methods: {
+			//选择时间
+			selectDate() {
+				var _this = this;
+				var picker = new mui.DtPicker({
+					"type": "date",
+					"beginYear": 2020,
+					"endYear": 2040,
+					"endDate": new Date(),
+					"value": _this.listForm.queryDate
+				});
+				picker.show(function(rs) {
+					_this.listForm.queryDate = rs.text;
+					_this.getList();
+					picker.dispose();
+				});
+			},
+			//获取列表数据
+			getList() {
+
+			},
 			//退出登录
 			loginOut() {
 				this.isLoading = true;
@@ -165,5 +196,6 @@
 
 <style scoped src="$project/assets/css/xpgj.css"></style>
 <style src="$project/assets/css/iconfont.css"></style>
+<style src="$project/assets/css/mui.picker.min.css"></style>
 <style>
 </style>