safecheck-client 4.0.1-87 → 4.0.1-89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "safecheck-client",
3
3
  "//": "主分支版本别乱升,测试包的版本直接发包(建议使用1.XX.XX-XXX格式作为测试包,不要频繁升级第三位版本号),别提交版本号。切了分支切记把主分支版本升了,保证主分支始终是最高版本!!!!!",
4
- "version": "4.0.1-87",
4
+ "version": "4.0.1-89",
5
5
  "description": "安检模块 前端组件",
6
6
  "author": "丁新 <417755458@qq.com>",
7
7
  "license": "ISC",
@@ -347,8 +347,8 @@
347
347
  <p class="panel-title col-xs-7 text-left input-font">{{ row.f_check_version }}</p>
348
348
  </div>
349
349
  <div class="col-xs-12">
350
- <p class="panel-title col-xs-5 text-left font"><b>安装日期:</b></p>
351
- <p class="panel-title col-xs-7 text-left input-font">{{ $parent.$parent.$parent.formatDateTime(row.f_open_date) }}</p>
350
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>安装日期:</b></p>
351
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ $parent.$parent.$parent.formatDateTime(row.f_open_date) }}</p>
352
352
  </div>
353
353
  <!--<div class="col-xs-12">-->
354
354
  <!--<p class="panel-title col-xs-5 text-left font"><b>送气期限:</b></p>-->
@@ -500,6 +500,7 @@ import Vue from 'vue'
500
500
  import { PagedList,HttpResetClass } from 'vue-client'
501
501
  import * as Util from '../../Util'
502
502
  import co from 'co'
503
+ import {isEmpty} from "../../Util";
503
504
  let select = function * (self) {
504
505
  let http = new HttpResetClass()
505
506
  http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
@@ -597,15 +598,21 @@ export default {
597
598
  },
598
599
  methods: {
599
600
  formatDateTime(date) {
600
- if (!date) return '';
601
- const d = new Date(date);
602
- const year = d.getFullYear();
603
- const month = ('0' + (d.getMonth() + 1)).slice(-2);
604
- const day = ('0' + d.getDate()).slice(-2);
605
- const hours = ('0' + d.getHours()).slice(-2);
606
- const minutes = ('0' + d.getMinutes()).slice(-2);
607
- const seconds = ('0' + d.getSeconds()).slice(-2);
608
- return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
601
+ if(isEmpty(date)){
602
+ return ''
603
+ }
604
+ // 解析输入的时间字符串,格式如 "10 21 2022 2:46PM"
605
+ // 分割字符串获取各个部分
606
+ const parts = date.split(' ');
607
+ const month = parts[0]; // 月份
608
+ const day = parts[1]; // 日期
609
+ const year = parts[2]; // 年份
610
+ const timePart = parts[3]; // 时间部分(包含上下午)
611
+ // 处理月份和日期,确保是两位数格式
612
+ const formattedMonth = month.padStart(2, '0');
613
+ const formattedDay = day.padStart(2, '0');
614
+ // 组合成 yyyy-mm-dd 格式
615
+ return `${year}-${formattedMonth}-${formattedDay}`;
609
616
  },
610
617
  scan(){
611
618
  HostApp.__this__=this,