修改日期时间
This commit is contained in:
parent
daf9b8a51c
commit
544b0c0ceb
@ -128,27 +128,31 @@
|
||||
>
|
||||
<div class="top">
|
||||
<div class="toptop">
|
||||
<el-radio v-model="item.checked1" :label="1" @change="handleCheckAllChange1($event, item)">
|
||||
<el-select
|
||||
style="width: 123px"
|
||||
v-model="item.routeNodeName"
|
||||
@focus="handleFocusone(item)"
|
||||
<el-radio
|
||||
v-model="item.checked1"
|
||||
:label="1"
|
||||
@change="handleCheckAllChange1($event, item)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in parentDictCodelist"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"
|
||||
<el-select
|
||||
style="width: 123px"
|
||||
v-model="item.routeNodeName"
|
||||
@focus="handleFocusone(item)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input
|
||||
style="width: 90px"
|
||||
v-model="item.routeNodeDay"
|
||||
type="number"
|
||||
@focus="handleFocus(item)"
|
||||
></el-input>
|
||||
<span>天</span>
|
||||
<el-option
|
||||
v-for="item in parentDictCodelist"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input
|
||||
style="width: 90px"
|
||||
v-model="item.routeNodeDay"
|
||||
type="number"
|
||||
@focus="handleFocus(item)"
|
||||
></el-input>
|
||||
<span>天</span>
|
||||
</el-radio>
|
||||
</div>
|
||||
<div>
|
||||
@ -160,23 +164,25 @@
|
||||
</div>
|
||||
<div class="top">
|
||||
<div class="toptop">
|
||||
<el-radio v-model="item.checked2" :label="2" @change="handleCheckAllChange2($event, item, index)">
|
||||
<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"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
:picker-options="pickerOptions"
|
||||
@input="input(item,index)"
|
||||
@focus="setCurrentTime(item,index)"
|
||||
:default-time="currentDate"
|
||||
ref="datePicker"
|
||||
<el-radio
|
||||
v-model="item.checked2"
|
||||
:label="2"
|
||||
@change="handleCheckAllChange2($event, item, index)"
|
||||
>
|
||||
</el-date-picker>
|
||||
<span style="width: 78px">指定时间:</span>
|
||||
<el-date-picker
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="item.nodePlanTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
:picker-options="pickerOptions"
|
||||
@input="input(item, index)"
|
||||
@focus="setCurrentTime(item, index)"
|
||||
ref="datePicker"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-radio>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="top">
|
||||
@ -186,10 +192,13 @@
|
||||
style="margin-right: 5px"
|
||||
@change="handleCheckAllChange3($event, item)"
|
||||
></el-checkbox> -->
|
||||
<el-radio v-model="item.checked3" :label="3" @change="handleCheckAllChange3($event, item)">
|
||||
<el-radio
|
||||
v-model="item.checked3"
|
||||
:label="3"
|
||||
@change="handleCheckAllChange3($event, item)"
|
||||
>
|
||||
<span>立即执行</span>
|
||||
</el-radio>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<el-card :class="listindex == index ? 'cards' : ''">
|
||||
@ -538,8 +547,9 @@ export default {
|
||||
name: "ManuallyCreatingTasks",
|
||||
data() {
|
||||
return {
|
||||
time:'',
|
||||
datePickerVisible:true,
|
||||
// currentDate: '',
|
||||
time: '',
|
||||
datePickerVisible: true,
|
||||
show: 0,
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
@ -549,8 +559,6 @@ export default {
|
||||
// return time.getTime() > Date.now() - 8.64e7// 如果没有后面的-8.64e7就是不可以选择今天的
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
heightLine: 0,
|
||||
optionsname: '',
|
||||
options: [],
|
||||
@ -630,7 +638,7 @@ export default {
|
||||
},
|
||||
|
||||
created() {
|
||||
console.log(this.$route.query,'this.$route.quer')
|
||||
console.log(this.$route.query, 'this.$route.quer')
|
||||
|
||||
this.infolist();
|
||||
this.infolistword();
|
||||
@ -645,28 +653,28 @@ export default {
|
||||
this.updata.departmentId = this.$route.query.departmentId;
|
||||
this.updata.departmentName = this.$route.query.departmentName;
|
||||
this.formInline = this.list[0];
|
||||
if(this.$route.query.path=='/patient/signRecord'){
|
||||
this.list[0].checked1=1
|
||||
this.list[0].routeNodeName='AFTER_VISIT_DISCHARGE'
|
||||
this.list[0].plantype='PLUSDAY'
|
||||
if (this.$route.query.path == '/patient/signRecord') {
|
||||
this.list[0].checked1 = 1
|
||||
this.list[0].routeNodeName = 'AFTER_VISIT_DISCHARGE'
|
||||
this.list[0].plantype = 'PLUSDAY'
|
||||
|
||||
|
||||
}
|
||||
if(this.$route.query.path=="/patient/patientinfoimport" || this.$route.query.path=="/task/Patientmanagement"
|
||||
|| this.$route.query.path=="/patient/ImportDetails"
|
||||
|
||||
){
|
||||
this.list[0].checked2=2
|
||||
this.list[0].routeNodeName=''
|
||||
this.list[0].plantype='APPOINT'
|
||||
if (this.$route.query.path == "/patient/patientinfoimport" || this.$route.query.path == "/task/Patientmanagement"
|
||||
|| this.$route.query.path == "/patient/ImportDetails"
|
||||
|
||||
) {
|
||||
this.list[0].checked2 = 2
|
||||
this.list[0].routeNodeName = ''
|
||||
this.list[0].plantype = 'APPOINT'
|
||||
}
|
||||
|
||||
},
|
||||
computed: {
|
||||
currentDate() {
|
||||
return this.formatDate(new Date());
|
||||
},
|
||||
},
|
||||
// computed: {
|
||||
// currentDate() {
|
||||
// return this.formatDate(new Date());
|
||||
// },
|
||||
// },
|
||||
mounted() {
|
||||
this.getMaxTableHeight()
|
||||
this.screenChange()
|
||||
@ -679,26 +687,26 @@ export default {
|
||||
},
|
||||
|
||||
|
||||
// 计划类型:plantype;
|
||||
// CURRENT:立即执行;
|
||||
// APPOINT:指定日期;
|
||||
// PLUSDAY:第几天
|
||||
// 计划类型:plantype;
|
||||
// CURRENT:立即执行;
|
||||
// APPOINT:指定日期;
|
||||
// PLUSDAY:第几天
|
||||
// 第1行
|
||||
handleFocus(item){
|
||||
console.log(item,'item,index')
|
||||
item.checked1=1
|
||||
item.checked2=""
|
||||
item.checked3=""
|
||||
handleFocus(item) {
|
||||
console.log(item, 'item,index')
|
||||
item.checked1 = 1
|
||||
item.checked2 = ""
|
||||
item.checked3 = ""
|
||||
item.nodePlanTime = ""
|
||||
item.timedata = ""
|
||||
item.plantype = "PLUSDAY"
|
||||
item.timedata = ""
|
||||
item.plantype = "PLUSDAY"
|
||||
|
||||
},
|
||||
// 第1行
|
||||
handleFocusone(item){
|
||||
item.checked1=1
|
||||
item.checked2=""
|
||||
item.checked3=""
|
||||
handleFocusone(item) {
|
||||
item.checked1 = 1
|
||||
item.checked2 = ""
|
||||
item.checked3 = ""
|
||||
item.nodePlanTime = ""
|
||||
item.timedata = ""
|
||||
item.plantype = "PLUSDAY"
|
||||
@ -706,16 +714,16 @@ export default {
|
||||
|
||||
},
|
||||
// 第2行
|
||||
setCurrentTime(item,index) {
|
||||
console.log(item,'item,index')
|
||||
item.checked1=""
|
||||
item.checked2=2
|
||||
item.checked3=""
|
||||
setCurrentTime(item, index) {
|
||||
console.log(item, 'item,index')
|
||||
item.checked1 = ""
|
||||
item.checked2 = 2
|
||||
item.checked3 = ""
|
||||
// item.routeNodeName = ""
|
||||
item.routeNodeDay = ""
|
||||
item.plantype = "APPOINT"
|
||||
item.timedata = ""
|
||||
},
|
||||
item.plantype = "APPOINT"
|
||||
item.timedata = ""
|
||||
},
|
||||
|
||||
input(item,index){
|
||||
this.$forceUpdate()
|
||||
@ -734,11 +742,11 @@ export default {
|
||||
handleCheckAllChange1(e, item) {
|
||||
console.log(e, item, 'value')
|
||||
item.checked2 = ""
|
||||
item.checked3 = ""
|
||||
item.checked1 = 1
|
||||
item.nodePlanTime = ""
|
||||
item.timedata = ""
|
||||
item.plantype = "PLUSDAY"
|
||||
item.checked3 = ""
|
||||
item.checked1 = 1
|
||||
item.nodePlanTime = ""
|
||||
item.timedata = ""
|
||||
item.plantype = "PLUSDAY"
|
||||
},
|
||||
// 指定时间
|
||||
handleCheckAllChange2(e, item, index) {
|
||||
@ -747,8 +755,8 @@ export default {
|
||||
console.log(this.list, 'list')
|
||||
// item.routeNodeName = ""
|
||||
item.routeNodeDay = ""
|
||||
item.plantype = "APPOINT"
|
||||
item.timedata = ""
|
||||
item.plantype = "APPOINT"
|
||||
item.timedata = ""
|
||||
},
|
||||
// 立即执行
|
||||
handleCheckAllChange3(e, item) {
|
||||
@ -758,15 +766,15 @@ export default {
|
||||
item.routeNodeDay = ""
|
||||
console.log(e, item, 'value3')
|
||||
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
|
||||
item.plantype = "CURRENT"
|
||||
item.nodePlanTime = ""
|
||||
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
|
||||
item.plantype = "CURRENT"
|
||||
item.nodePlanTime = ""
|
||||
},
|
||||
// 保存
|
||||
upload() {
|
||||
@ -777,38 +785,47 @@ export default {
|
||||
this.updata.routeNodeList = this.list;
|
||||
var newObj = JSON.parse(JSON.stringify(this.updata));
|
||||
|
||||
newObj.routeNodeList.forEach(e => {
|
||||
if (e.timedata) {
|
||||
e.nodePlanTime = e.timedata
|
||||
}
|
||||
delete e.timedata;
|
||||
delete e.checked1;
|
||||
delete e.checked2;
|
||||
delete e.checked3;
|
||||
})
|
||||
// var nulllength= newObj.routeNodeList.filter(item => item.routeNodeName=="" || item.routeNodeName==null || item.routeNodeName==undefined);
|
||||
// console.log(nulllength,'nulllength')
|
||||
// if(nulllength.length>0){
|
||||
// this.$message.error('节点名称不能为空!');
|
||||
// return
|
||||
// }
|
||||
console.log(newObj, 'this.newObj')
|
||||
console.log(this.updata, 'this.updata')
|
||||
// return
|
||||
newObj.routeNodeList.forEach(e => {
|
||||
if (e.timedata) {
|
||||
e.nodePlanTime = e.timedata
|
||||
|
||||
}
|
||||
const dateParts = e.nodePlanTime.split(' ');
|
||||
if (dateParts[1] == "00:00:00") {
|
||||
const date = new Date();
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const ss = String(date.getSeconds()).padStart(2, '0');
|
||||
e.nodePlanTime = dateParts[0] + ' ' + hours + ':' + minutes + ':' + ss;
|
||||
}
|
||||
delete e.timedata;
|
||||
delete e.checked1;
|
||||
delete e.checked3;
|
||||
})
|
||||
// var nulllength= newObj.routeNodeList.filter(item => item.routeNodeName=="" || item.routeNodeName==null || item.routeNodeName==undefined);
|
||||
// console.log(nulllength,'nulllength')
|
||||
// if(nulllength.length>0){
|
||||
// this.$message.error('节点名称不能为空!');
|
||||
// return
|
||||
// }
|
||||
|
||||
console.log(newObj, 'this.newObj')
|
||||
console.log(this.updata, 'this.updata')
|
||||
// return
|
||||
signrouteadd(newObj).then((res) => {
|
||||
var message=''
|
||||
if(this.$route.query.path=="/patient/signRecord"){
|
||||
message ='保存成功,即将返回签约列表'
|
||||
}else if(this.$route.query.path=="/patient/patientinfoimport"){
|
||||
message ='保存成功,即将返回签约患者列表'
|
||||
|
||||
}else if(this.$route.query.path=="/patient/ImportDetails"){
|
||||
message ='保存成功,即将返回导入明细列表'
|
||||
}
|
||||
else if(this.$route.query.path=="/task/Patientmanagement"){
|
||||
message ='保存成功,即将返回创建任务列表'
|
||||
}
|
||||
this.$notify({
|
||||
var message = ''
|
||||
if (this.$route.query.path == "/patient/signRecord") {
|
||||
message = '保存成功,即将返回签约列表'
|
||||
} else if (this.$route.query.path == "/patient/patientinfoimport") {
|
||||
message = '保存成功,即将返回签约患者列表'
|
||||
|
||||
} else if (this.$route.query.path == "/patient/ImportDetails") {
|
||||
message = '保存成功,即将返回导入明细列表'
|
||||
}
|
||||
else if (this.$route.query.path == "/task/Patientmanagement") {
|
||||
message = '保存成功,即将返回创建任务列表'
|
||||
}
|
||||
this.$notify({
|
||||
type: "success",
|
||||
title: "提示",
|
||||
message: message,
|
||||
@ -1301,9 +1318,8 @@ export default {
|
||||
padding-left: 12px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-timeline-item__node--normal{
|
||||
::v-deep .el-timeline-item__node--normal {
|
||||
left: 0px;
|
||||
|
||||
}
|
||||
::v-deep .el-timeline-item__timestamp {
|
||||
margin: 0 !important;
|
||||
@ -1335,10 +1351,10 @@ export default {
|
||||
::v-deep .el-form-item__content {
|
||||
display: inline-block !important;
|
||||
}
|
||||
::v-deep .el-icon-circle-plus-outline{
|
||||
::v-deep .el-icon-circle-plus-outline {
|
||||
cursor: pointer;
|
||||
}
|
||||
::v-deep .el-icon-delete{
|
||||
::v-deep .el-icon-delete {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user