Sfoglia il codice sorgente

时间选择器苹果不显示年份兼容性问题

Your Name 2 anni fa
parent
commit
465c3478dd

+ 5 - 5
src/components/DiagCalc.vue

@@ -138,7 +138,7 @@
           className: 'slot1',
           textAlign: 'center'
         }],
-        startDate:new Date(this.$datetime.formatDateTime(new Date("2023-01-01 00:00:00"))),
+        startDate:new Date(this.$datetime.formatDateTime(new Date("2013-01-01 00:00:00"))),
         endDate: new Date(this.$datetime.formatDateTime(new Date("2024-01-01 00:00:00"))),
         now:new Date(),
       }
@@ -148,16 +148,16 @@
         this.$router.push('/diagcalcshow')
       },
       changeTime0(value) {
-        this.form.zssjt0 = this.$datetime.formatDateTime(value)
+        this.form.zssjt0 = this.$datetime.formatDateTime(value).replaceAll("/","-")
       },
       changeTime1(value) {
-        this.form.cxsjt1 = this.$datetime.formatDateTime(value)
+        this.form.cxsjt1 = this.$datetime.formatDateTime(value).replaceAll("/","-")
       },
       changeTime2(value) {
-        this.form.cxsjt2 = this.$datetime.formatDateTime(value)
+        this.form.cxsjt2 = this.$datetime.formatDateTime(value).replaceAll("/","-")
       },
       changeTime3(value) {
-        this.form.cxsjt3 = this.$datetime.formatDateTime(value)
+        this.form.cxsjt3 = this.$datetime.formatDateTime(value).replaceAll("/","-")
       },
       onValuesChange1(picker, values) {
         if (picker.getSlotValue(0)) {

+ 3 - 3
src/components/PatClockIn.vue

@@ -64,8 +64,8 @@
         mproFlag: false,
         mfreqFlag: false,
         proList: [],
-        startDate:new Date(this.$datetime.formatDateTime(new Date("2023-01-01 00:00:00"))),
-        endDate: new Date(this.$datetime.formatDateTime(new Date("2024-01-01 00:00:00"))),
+        startDate:new Date(this.$datetime.formatDateTime(new Date("2023/01/01 00:00:00"))),
+        endDate: new Date(this.$datetime.formatDateTime(new Date("2024/01/01 00:00:00"))),
         now:new Date(),
         slots: [{
           flex: 1,
@@ -86,7 +86,7 @@
         this.$router.push(path)
       },
       changeTime0(value) {
-        this.form.zssjt0 = this.$datetime.formatDateTime(value)
+        this.form.zssjt0 = this.$datetime.formatDateTime(value).replaceAll("/","-")
       },
       onValuesChange(picker, values) {
         if (picker.getSlotValue(0)) {

+ 2 - 2
src/components/RegPatinfo.vue

@@ -64,7 +64,7 @@
           className: 'slot1',
           textAlign: 'center'
         }],
-        startDate: new Date('1923-01-01'),
+        startDate: new Date('1923/01/01'),
         endDate: new Date(this.$datetime.formatDate(new Date())),
       }
     },
@@ -73,7 +73,7 @@
         this.$router.push('/regpatpro')
       },
       changeTime(value) {
-        this.form.birthday = this.$datetime.formatDate(value)
+        this.form.birthday = this.$datetime.formatDate(value).replaceAll("/","-")
         this.sexFlag = false
       },
       onValuesChange(picker, values) {

File diff suppressed because it is too large
+ 0 - 33135
src/components/WorldMap.vue


+ 0 - 253
src/components/WorldMapNew.vue

@@ -1,253 +0,0 @@
-<template>
-  <div>
-    <div class="mapBg">
-      <div class="worldMap" id="worldMap" ref="worldMap" height="300"></div>
-    </div>
-    <div v-if="dialogVisible" style="background:#fff;left:50%;top:30%;
-    position:absolute;z-index:10000;border:1px oslid red;width:50%;height:300px;">
-    <h1 align="center">这里是国家地图</h1>
-    <button style="margin-top:30%;" @click="dialogVisible=false">关闭</button>
-    </diV>
-  </div>
-</template>
-
-<script>
-  import * as echarts from 'echarts'
-  import mapData from '../utils/map.js'
-
-  var cityData = [{
-    name: '长春',
-    value: [125.299633, 43.914039, 10],
-  }, ]
-  var szPoinUrl = "";
-
-  let imgBase64 = ''
-  let tempData1 = [{
-    name: '环境监测',
-    value: [-73.97622, 40.757498],
-    ph: 200,
-    offset: [70, -58],
-    padding: [12, 25, 56, 80],
-    imgurl: '',
-  }];
-  export default {
-    mounted() {
-      var worldChart = echarts.init(this.$refs["worldMap"]);
-      echarts.registerMap('world', mapData.registerMapData);
-      worldChart.setOption(this.option);
-
-      worldChart.on("georoam", function (params) {
-        var option = worldChart.getOption(); //获得option对象
-        if (params.zoom != null && params.zoom != undefined) {
-          //捕捉到缩放时
-          let mo = option.geo[0].zoom
-          option.geo[0].zoom = option.series[0].zoom; //下层geo的缩放等级跟着上层的geo一起改变
-          option.geo[0].center = option.series[0].center; //下层的geo的中心位置随着上层geo一起改变
-          // // 改变标记点随地图放大缩小
-          // // console.log(option.series)
-          // let size = option.series[0].zoom/mo
-          // if(option.series[0].zoom>mo){
-          // 	// console.log(option.series)
-          // 	option.series[2].symbolSize = [option.series[2].symbolSize[0]*size,option.series[2].symbolSize[1]*size]
-          // 	option.series[1].symbolSize=option.series[1].symbolSize*size
-          // 	option.series[1].label.fontSize=option.series[1].label.fontSize*size
-          // }else{
-          // 	option.series[2].symbolSize = [option.series[2].symbolSize[0]*size,option.series[2].symbolSize[1]*size]
-          // 	option.series[1].symbolSize = option.series[1].symbolSize*size
-          // 	option.series[1].label.fontSize = option.series[1].label.fontSize*size
-          // }
-          // // 改变标记点end
-        } else {
-          //捕捉到拖曳时
-          option.geo[0].center = option.series[0].center; //下层的geo的中心位置随着上层geo一起改变
-        }
-        // myChart.dispatchAction({ //来用程序主动渲染选框
-        // 	type: "restore",
-        // });
-        worldChart.setOption(option); //设置option
-      });
-
-      //
-      worldChart.on('click', params => {
-        console.log(111111111111)
-        this.dialogVisible = true;
-      })
-    },
-    computed: {
-      series() {
-        let res = [{
-          type: "map",
-          roam: true,
-          animationDurationUpdate: true,
-          label: {
-            show: !1,
-          },
-          tooltip: {
-            show: !1,
-          },
-          itemStyle: {
-            normal: {
-              borderColor: "#0F6DAC",
-              borderWidth: 0.2,
-              areaColor: {
-                type: "radial",
-                x: 0.5,
-                y: 0.5,
-                r: 0.8,
-                colorStops: [{
-                    offset: 0,
-                    color: "#061D35", // 0% 处的颜色
-                  },
-                  {
-                    offset: 1,
-                    color: "#061D35", // 100% 处的颜色
-                  },
-                ],
-                globalCoord: true, // 缺省为 false
-              },
-            },
-            emphasis: {
-              label: {
-                // show: !1,
-                color: "#fff",
-              },
-              areaColor: "#05223D",
-              //    shadowColor: 'rgb(12,25,50)',
-              borderWidth: 0.2,
-            },
-          },
-          aspectScale: 0.65, //长宽比
-          zoom: 1.12,
-          //     roam: false,
-          map: "world", //使用
-          // data: this.difficultData //热力图数据   不同区域 不同的底色
-        }]
-        tempData1.forEach(item => {
-          res.push({
-              type: 'scatter',
-              coordinateSystem: 'geo',
-              symbol: szPoinUrl,
-              symbolSize: [20, 20],
-              legendHoverLink: true,
-              z: 99999,
-              index: 99999,
-              label: {
-                show: true,
-                offset: item.offset, //偏移设置
-                fontSize: 14,
-                lineHeight: 23,
-                backgroundColor: {
-                  image: item.imgurl,
-                },
-                borderColor: '#106EAD',
-                padding: item.padding,
-                formatter(value) {
-                  return `{name|${value.data.name}\nPH值:${value.data.ph}}`;
-                },
-
-                rich: {
-                  name: {
-                    fontWeight: 'bold',
-                    fontSize: 16,
-                    color: '#fff',
-                    height: 100,
-                  }
-                },
-                color: '#fff',
-              },
-              data: [item],
-              showEffectOn: 'render',
-              rippleEffect: {
-                brushType: 'stroke',
-              },
-              hoverAnimation: true,
-              zlevel: 9999,
-            },
-
-          )
-        })
-        return res
-      },
-
-      option() {
-
-        return {
-          // backgroundColor: '#051421',
-          backgroundColor: 'transparent',
-          tooltip: {
-            trigger: "item",
-            formatter: function (params, ticket, callback) {
-              if (params.seriesType == "effectScatter") {
-                return params.marker + params.data.name + "" + params.data.value[2];
-              } else if (params.seriesType == "lines") {
-                return params.data.fromName + " -> " + params.data.toName + "<br />" + params.data.value;
-              } else {
-                return params.name;
-              }
-            },
-          },
-          grid: {
-            right: '8%',
-            // top:'5%'
-          },
-          geo: {
-            map: 'world',
-            aspectScale: 0.65, //长宽比
-            zoom: 1.12,
-            show: true,
-            tooltip: {
-              show: !1,
-            },
-            scaleLimit: {
-              min: 1,
-              max: 5,
-            },
-            label: {
-              show: !1,
-            },
-            animationDurationUpdate: 0,
-            roam: true,
-            itemStyle: {
-              normal: {
-                shadowColor: "#164A7C",
-                shadowOffsetX: 5,
-                shadowOffsetY: 5,
-              },
-            },
-          },
-          tooltip: {
-            trigger: "item",
-          },
-          zlevel: 999,
-          series: this.series
-        }
-      }
-    },
-    data() {
-      return {
-
-        dialogVisible: false
-      }
-    },
-  }
-
-</script>
-
-<style scoped>
-  .worldMap {
-    display: inline-block;
-    width: 100%;
-    height: 100vh;
-
-    background: #051421;
-    position: absolute;
-    z-index: -1;
-  }
-
-  .mapBg {
-    /* background: #051421;
-      position: absolute;
-      z-index: -1; */
-  }
-
-</style>

File diff suppressed because it is too large
+ 0 - 285
src/components/WorldMapNew.vue.bk


+ 0 - 2
src/router/index.js

@@ -18,8 +18,6 @@ import PatInjectionList from '@/components/PatInjectionList'
 import PatRegister from '@/components/PatRegister'
 import PatCxsjLine from '@/components/PatCxsjLine'
 import PreTraitCase from '@/components/PreTraitCase'
-import WorldMapNew from '@/components/WorldMapNew'
-import WorldMap from '@/components/WorldMap'
 
 Vue.use(Router)
 

+ 3 - 3
src/utils/datetime.js

@@ -8,13 +8,13 @@ export default{
         var day = date.getDate();
         var hour = date.getHours();
         var minute = date.getMinutes();
-        return year + '-' + this.formatTen(month) + '-' + this.formatTen(day) + ' '+ this.formatTen(hour) + ':'+ this.formatTen(minute);
+        return year + '/' + this.formatTen(month) + '/' + this.formatTen(day) + ' '+ this.formatTen(hour) + ':'+ this.formatTen(minute);
     },
     formatDate(date) {
         var year = date.getFullYear();
         var month = date.getMonth() + 1;
         var day = date.getDate();
-        return year + '-' + this.formatTen(month) + '-' + this.formatTen(day)
+        return year + '/' + this.formatTen(month) + '/' + this.formatTen(day)
     },
     formatDateTimeFull(date) {
         var year = date.getFullYear();
@@ -23,7 +23,7 @@ export default{
         var hour = date.getHours();
         var minute = date.getMinutes();
         var seconds = date.getSeconds();
-        return year + '-' + this.formatTen(month) + '-' + this.formatTen(day) + ' '+ this.formatTen(hour) + ':'+ this.formatTen(minute)+ ':'+ this.formatTen(seconds);
+        return year + '/' + this.formatTen(month) + '/' + this.formatTen(day) + ' '+ this.formatTen(hour) + ':'+ this.formatTen(minute)+ ':'+ this.formatTen(seconds);
     }
 }