Fix: 修复Bug

This commit is contained in:
vce 2024-03-07 10:27:11 +08:00
parent cb31f6d770
commit 06706dbd8c
24 changed files with 98 additions and 54 deletions

View File

@ -140,7 +140,6 @@ export default {
let dtStr = `${year}`; let dtStr = `${year}`;
this.setDateStr(dtStr); this.setDateStr(dtStr);
this.$emit('change', utils.formatDate(dtStr)); this.$emit('change', utils.formatDate(dtStr));
return; return;
} }
else if(this.fields == 'month') { else if(this.fields == 'month') {
@ -148,6 +147,7 @@ export default {
month = this.range[1][this.value[1]].number; // month = this.range[1][this.value[1]].number; //
let dtStr = `${year}-${month}`; let dtStr = `${year}-${month}`;
this.setDateStr(dtStr); this.setDateStr(dtStr);
this.$emit('change', utils.formatDate(dtStr)); this.$emit('change', utils.formatDate(dtStr));
return; return;
} }
@ -182,6 +182,18 @@ export default {
this.$emit('change', utils.formatDate(dtStr)); this.$emit('change', utils.formatDate(dtStr));
return; return;
} }
else if(this.fields == 'second') {
year = this.range[0][this.value[0]].number; //
month = this.range[1][this.value[1]].number; //
day = this.range[2][this.value[2]].number; //
hour = this.range[3][this.value[3]].number; //
minute = this.range[4][this.value[4]].number; //
second = this.range[5][this.value[5]].number; //
let dtStr = `${year}-${month}-${day} ${hour}:${minute}:${second}`;
this.setDateStr(dtStr);
this.$emit('change', utils.formatDate(dtStr));
return;
}
}, },
@ -197,19 +209,18 @@ export default {
return; return;
} }
if(this.fields == 'month') { if(this.fields == 'month') {
this.dateStr = `${dt.YYYY}${dt.M}`; this.dateStr = `${dt.YYYY}${dt.MM}`;
return; return;
} }
if(this.fields == 'day') { if(this.fields == 'day') {
this.dateStr = `${dt.YYYY}${dt.M}${dt.D}`; this.dateStr = `${dt.YYYY}${dt.MM}${dt.DD}`;
return; return;
} }
if(this.fields == 'hour') { if(this.fields == 'hour') {
this.dateStr = `${dt.YYYY}${dt.M}${dt.D}${dt.h}`; this.dateStr = `${dt.YYYY}${dt.MM}${dt.DD}${dt.hh}`;
return; return;
} }
this.dateStr = `${dt.YYYY}${dt.M}${dt.D}${dt.h}${dt.m}分0秒`; this.dateStr = `${dt.YYYY}-${dt.MM}-${dt.DD} ${dt.hh}:${dt.mm}`;
// this.dateStr = `${dt.YYYY}${dt.M}${dt.D} ${dt.h}${dt.m}`;
}, },
/** /**

View File

@ -168,14 +168,15 @@
</view> </view>
<view class="type flex"> <view class="type flex">
<view class="name"><text class="star">*</text>检查时间</view> <view class="name"><text class="star">*</text>检查时间</view>
<dateTimePiccker :placeholder="startTime" :start="startTime" fields="minute" <dateTimePiccker :placeholder="'请选择'" :start="startTime"
fields="minute" :default-value="form.inspectTime"
@change="bindPickerChange($event,'startTime')" class="dateTimePiccker"> @change="bindPickerChange($event,'startTime')" class="dateTimePiccker">
<view class="uni-input uni-select cl" v-if="form.inspectTime===''"> <!-- <view class="uni-input uni-select cl" v-if="form.inspectTime===''">
请选择 <image class="icon-right" src="/static/icon-right.png"></image> 请选择 <image class="icon-right" src="/static/icon-right.png"></image>
</view> </view>
<view class="uni-input uni-select" v-else>{{form.inspectTime}} <view class="uni-input uni-select" v-else>{{form.inspectTime}}
<image class="icon-right" src="/static/icon-right.png"></image> <image class="icon-right" src="/static/icon-right.png"></image>
</view> </view> -->
</dateTimePiccker> </dateTimePiccker>
<!-- <picker @change="(e)=>bindPickerChange(e,4)" mode="date" :value="form.inspectTime" class="picker"> <!-- <picker @change="(e)=>bindPickerChange(e,4)" mode="date" :value="form.inspectTime" class="picker">
<view class="uni-input uni-select cl" v-if="form.inspectTime===''"> <view class="uni-input uni-select cl" v-if="form.inspectTime===''">
@ -202,14 +203,15 @@
<view class="type flex" v-if="typeCheck == 'type1'"> <view class="type flex" v-if="typeCheck == 'type1'">
<view class="name"><text class="star">*</text>整改时限</view> <view class="name"><text class="star">*</text>整改时限</view>
<dateTimePiccker :placeholder="startTime2" :start="startTime2" fields="minute" <dateTimePiccker :placeholder="'请选择'" :start="startTime2"
fields="minute" :default-value="form.changeLimitTime"
@change="bindPickerChange($event,'startTime2')" class="dateTimePiccker"> @change="bindPickerChange($event,'startTime2')" class="dateTimePiccker">
<view class="uni-input uni-select cl" v-if="form.changeLimitTime===''"> <!-- <view class="uni-input uni-select cl" v-if="form.changeLimitTime===''">
请选择 <image class="icon-right" src="/static/icon-right.png"></image> 请选择 <image class="icon-right" src="/static/icon-right.png"></image>
</view> </view>
<view class="uni-input uni-select" v-else>{{form.changeLimitTime}} <view class="uni-input uni-select" v-else>{{form.changeLimitTime}}
<image class="icon-right" src="/static/icon-right.png"></image> <image class="icon-right" src="/static/icon-right.png"></image>
</view> </view> -->
</dateTimePiccker> </dateTimePiccker>
<!-- <picker @change="(e)=>bindPickerChange(e,5)" mode="date" :value="form.changeLimitTime" class="picker"> <!-- <picker @change="(e)=>bindPickerChange(e,5)" mode="date" :value="form.changeLimitTime" class="picker">
<view class="uni-input uni-select cl" v-if="form.changeLimitTime===''"> <view class="uni-input uni-select cl" v-if="form.changeLimitTime===''">

View File

@ -55,14 +55,23 @@
<view class="form-item flex"> <view class="form-item flex">
<!-- <view class="form-lable"><text>检查时间</text></view> --> <!-- <view class="form-lable"><text>检查时间</text></view> -->
<view class="form-lable">*<text>检查时间</text></view> <view class="form-lable">*<text>检查时间</text></view>
<picker class="form-content" :disabled="isDisabled" mode="date" :value="addForm.inspectTime" <!-- <picker class="form-content" :disabled="isDisabled" mode="date" :value="addForm.inspectTime"
:start="startDate" @change="bindCheckDateChange"> :start="startDate" @change="bindCheckDateChange">
<view class="uni-input"> <view class="uni-input">
<text class="uni-input2" v-if="addForm.inspectTime ===''">请选择检查时间</text> <text class="uni-input2" v-if="addForm.inspectTime ===''">请选择检查时间</text>
<text v-else>{{addForm.inspectTime}}</text> <text v-else>{{addForm.inspectTime}}</text>
<uni-icons v-if="!isDisabled" type="arrowright" color="#6C7178" /> <uni-icons v-if="!isDisabled" type="arrowright" color="#6C7178" />
</view> </view>
</picker> </picker> -->
<dateTimePicker :placeholder="'请选择检查时间'" :disabled="isDisabled"
:start="startTime" :fields="'minute'" :default-value="addForm.inspectTime"
@change="bindPickerChange($event,'startTime')"
class="form-content">
<view class="uni-input">
<!-- <text>{{addForm.inspectTime}}</text> -->
<uni-icons v-if="!isDisabled" type="arrowright" color="#6C7178" />
</view>
</dateTimePicker>
</view> </view>
</view> </view>
@ -177,13 +186,21 @@
<view class="b-bottom" v-if="addForm.status != 1"> <view class="b-bottom" v-if="addForm.status != 1">
<view class="form-item flex"> <view class="form-item flex">
<view class="form-lable"><text>要求完成时间</text></view> <view class="form-lable"><text>要求完成时间</text></view>
<picker class="form-content" :disabled="isDisabled" mode="date" :value="addForm.date" <!-- <picker class="form-content" :disabled="isDisabled" mode="date" :value="addForm.date"
:start="startDate" @change="bindDateChange"> :start="startDate" @change="bindDateChange">
<view class="uni-input"> <view class="uni-input">
{{addForm.date}} {{addForm.date}}
<uni-icons v-if="!isDisabled" type="arrowright" color="#6C7178" /> <uni-icons v-if="!isDisabled" type="arrowright" color="#6C7178" />
</view> </view>
</picker> </picker> -->
<dateTimePicker :placeholder="startTime" :disabled="isDisabled"
:start="startTime" fields="minute" :default-value="addForm.date"
@change="bindPickerChange($event,'startTime2')" class="form-content">
<view class="uni-input">
<!-- <text>{{addForm.date}}</text> -->
<uni-icons v-if="!isDisabled" type="arrowright" color="#6C7178" />
</view>
</dateTimePicker>
</view> </view>
</view> </view>
@ -260,10 +277,13 @@
import headers from '../../../components/headers/headers.vue'; import headers from '../../../components/headers/headers.vue';
import replyList from './replyList.vue'; import replyList from './replyList.vue';
import dialogs from '../../../components/dialog/dialog.vue' import dialogs from '../../../components/dialog/dialog.vue'
import dateTimePicker from '@/components/dateTimePicker/index.vue'
export default { export default {
data() { data() {
return { return {
startTime: this.getDate({
format: true,
}),
checkPointList: [], checkPointList: [],
hiddenDangerInspectRegionId: "", hiddenDangerInspectRegionId: "",
hiddenDangerInspectRegionName: "", hiddenDangerInspectRegionName: "",
@ -340,7 +360,8 @@
replyList, replyList,
dialogs, dialogs,
canversCom, canversCom,
tkiTree tkiTree,
dateTimePicker
}, },
onShow() { onShow() {
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight; this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
@ -447,6 +468,15 @@
console.log(val, '----页面类型') console.log(val, '----页面类型')
}, },
methods: { methods: {
//
bindPickerChange(e, type) {
console.log(e)
if (type == 'startTime') {
this.addForm.inspectTime = e.f3;
} else if (type == 'startTime2') {
this.addForm.date = e.f3;
}
},
//-- //--
checkPointBtn(val, type) { checkPointBtn(val, type) {
// type==1 // type==1
@ -636,6 +666,9 @@
let year = date.getFullYear(); let year = date.getFullYear();
let month = date.getMonth() + 1; let month = date.getMonth() + 1;
let day = date.getDate(); let day = date.getDate();
let hour = date.getHours();
let minute = date.getMinutes();
let second = date.getSeconds();
if (type === 'start') { if (type === 'start') {
year = year; year = year;
} else if (type === 'end') { } else if (type === 'end') {
@ -643,7 +676,10 @@
} }
month = month > 9 ? month : '0' + month; month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day; day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`; hour = hour > 9 ? hour : '0' + hour;
minute = minute > 9 ? minute : '0' + minute;
second = second > 9 ? second : '0' + second;
return `${year}-${month}-${day} ${hour}:${minute}`;
}, },
checkDanger(val) { checkDanger(val) {
@ -791,7 +827,6 @@
}) })
}, },
submitForm() { submitForm() {
if(this.addForm.inspectTime !== "") this.addForm.inspectTime += " 00:00:00"
let that = this let that = this
console.log('this.addForm1------------', this.addForm) console.log('this.addForm1------------', this.addForm)
if (this.pageType == 1) { if (this.pageType == 1) {
@ -1129,7 +1164,7 @@
line-height: 36rpx; line-height: 36rpx;
} }
.uni-input2 { .uni-input2 {
color: #C0C4CC; color: black;
} }
} }
@ -1321,4 +1356,10 @@
.example-body { .example-body {
padding: 0 0 20rpx 140rpx; padding: 0 0 20rpx 140rpx;
} }
.dateTimePicker {
border: 1px solid #ccc;
border-radius: 5px;
width: 67%;
padding-left: 10px;
}
</style> </style>

Binary file not shown.

View File

@ -1 +1 @@
https://ide.dcloud.net.cn/build/download/68548bf0-9a6b-11ee-a8bc-7194afb07ad9 https://app.liuyingyong.cn/build/download/bb2b2fe0-dc23-11ee-8aab-a928801d332d

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
andrCertfile=C:/Users/Administrator/Desktop/zhgd2(1).jks andrCertfile=D:/Desktop/company/zhgd2(1).jks
andrCertAlias=key0 andrCertAlias=key0
andrCertPass=ep/Tdjka4Y7WYqDB6/S7dw== andrCertPass=ep/Tdjka4Y7WYqDB6/S7dw==

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long