修改手动创建任务

This commit is contained in:
shidongli 2024-12-09 13:17:41 +08:00
parent 430c7aac24
commit 3b33baa286

View File

@ -127,7 +127,7 @@
@click.native="clicktimelineitem(item, index)"
>
<div class="top">
<div class="toptop" @click="topclack(item,index)">
<div class="toptop">
<el-radio v-model="item.checked1" :label="1" @change="handleCheckAllChange1($event, item)">
<el-select
style="width: 120px"
@ -164,6 +164,7 @@
<span style="width: 78px">指定时间</span>
<el-date-picker
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
v-model="item.nodePlanTime"
@ -171,7 +172,6 @@
placeholder="选择日期时间"
:picker-options="pickerOptions"
@input="input(item,index)"
@blur="handleDateChange"
@focus="setCurrentTime(item,index)"
ref="datePicker"
>
@ -539,6 +539,7 @@ export default {
name: "ManuallyCreatingTasks",
data() {
return {
datePickerVisible:true,
show: 0,
pickerOptions: {
disabledDate(time) {
@ -618,9 +619,6 @@ export default {
checked1: '',
checked2: '',
checked3: '',
disabled: true,
},
],
listindex: 0,
@ -705,25 +703,18 @@ export default {
item.plantype = "APPOINT"
item.timedata = ""
},
topclack(item,index){
},
input(item,index){
// item.nodePlanTime = new Date();
const date = new Date(item.nodePlanTime);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 01
const day = String(date.getDate()).padStart(2, '0');
input(item,index){
this.$forceUpdate()
const dateParts = item.nodePlanTime.split(' ');
const date = new Date();
// const year = date.getFullYear();
// const month = String(date.getMonth() + 1).padStart(2, '0'); // 01
// const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const ss = String(date.getSeconds()).padStart(2, '0');
item.nodePlanTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes;// + ':' + ss ;
this.$forceUpdate()
},
handleDateChange(value) {
console.log(value)
//
// const ss = String(date.getSeconds()).padStart(2, '0');
item.nodePlanTime = dateParts[0]+ ' ' + hours + ':' + minutes;// + ':' + ss ;
},
// /
@ -761,33 +752,11 @@ export default {
let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds();
var data = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
item.timedata = data
console.log(data, '日期');
item.plantype = "CURRENT"
item.nodePlanTime = ""
// if (e == true) {
// console.log('00000000000000000000')
// let yy = new Date().getFullYear();
// let mm = (new Date().getMonth() + 1) < 10 ? '0' + (new Date().getMonth() + 1) : (new Date().getMonth() + 1);
// let dd = (new Date().getDate()) < 10 ? '0' + (new Date().getDate() + 1) : (new Date().getDate() + 1);
// let hh = new Date().getHours() < 10 ? '0' + new Date().getHours() : new Date().getHours();
// let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes();
// let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds();
// var data = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
// item.timedata = data
// console.log(data, '');
// item.plantype = "CURRENT"
// item.disableddata = true
// item.disabledcount = true
// item.disabled = true
// item.nodePlanTime = ""
// } else {
// item.timedata = ""
// }
},
upload() {
// return
this.$confirm('保存此任务, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',