6 changed files with 276 additions and 55 deletions
			
			
		@ -0,0 +1,176 @@ | 
				
			|||||
 | 
					<template> | 
				
			||||
 | 
					  <Dialog v-model="modelVisible" title="修改" width="400px" label-width="120px"> | 
				
			||||
 | 
					    <el-form> | 
				
			||||
 | 
					      <el-form-item label="触发时间"> | 
				
			||||
 | 
					        <el-col :span="4"> | 
				
			||||
 | 
					          <el-input v-model="editData.hour"></el-input> | 
				
			||||
 | 
					        </el-col> | 
				
			||||
 | 
					        <el-col :span="1"> | 
				
			||||
 | 
					          : | 
				
			||||
 | 
					        </el-col> | 
				
			||||
 | 
					        <el-col :span="4"> | 
				
			||||
 | 
					          <el-input v-model="editData.minute"></el-input> | 
				
			||||
 | 
					        </el-col> | 
				
			||||
 | 
					        <el-col :span="1"> | 
				
			||||
 | 
					          : | 
				
			||||
 | 
					        </el-col> | 
				
			||||
 | 
					        <el-col :span="4"> | 
				
			||||
 | 
					          <el-input v-model="editData.second"></el-input> | 
				
			||||
 | 
					        </el-col> | 
				
			||||
 | 
					      </el-form-item> | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					      <el-form-item> | 
				
			||||
 | 
					        <el-button size="mini" type="primary" @click="onSubmit">保存</el-button> | 
				
			||||
 | 
					      </el-form-item> | 
				
			||||
 | 
					    </el-form> | 
				
			||||
 | 
					  </Dialog> | 
				
			||||
 | 
					</template> | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					<script> | 
				
			||||
 | 
					import Dialog from "@screen/components/Dialog/index.vue"; | 
				
			||||
 | 
					export default { | 
				
			||||
 | 
					  name: "timeEditDialog", | 
				
			||||
 | 
					  components: { | 
				
			||||
 | 
					    Dialog | 
				
			||||
 | 
					  }, | 
				
			||||
 | 
					  model: { | 
				
			||||
 | 
					    prop: "visible", | 
				
			||||
 | 
					    event: "update:value", | 
				
			||||
 | 
					  }, | 
				
			||||
 | 
					  props: { | 
				
			||||
 | 
					    visible: Boolean, | 
				
			||||
 | 
					    propData: Object | 
				
			||||
 | 
					  }, | 
				
			||||
 | 
					  data() { | 
				
			||||
 | 
					    return { | 
				
			||||
 | 
					      editData:{ | 
				
			||||
 | 
					        hour:"", | 
				
			||||
 | 
					        minute:"", | 
				
			||||
 | 
					        second:"" | 
				
			||||
 | 
					      } | 
				
			||||
 | 
					    }; | 
				
			||||
 | 
					  }, | 
				
			||||
 | 
					  computed: { | 
				
			||||
 | 
					    modelVisible: { | 
				
			||||
 | 
					      get() { | 
				
			||||
 | 
					        return this.visible; | 
				
			||||
 | 
					      }, | 
				
			||||
 | 
					      set(val) { | 
				
			||||
 | 
					        this.$emit("update:value", val); | 
				
			||||
 | 
					      }, | 
				
			||||
 | 
					    }, | 
				
			||||
 | 
					  }, | 
				
			||||
 | 
					  watch: { | 
				
			||||
 | 
					    modelVisible: { | 
				
			||||
 | 
					      immediate: true, | 
				
			||||
 | 
					      handler(bool) { | 
				
			||||
 | 
					        if (!bool) return; | 
				
			||||
 | 
					        this.transformData(); | 
				
			||||
 | 
					      }, | 
				
			||||
 | 
					    }, | 
				
			||||
 | 
					  }, | 
				
			||||
 | 
					  mounted() { | 
				
			||||
 | 
					  }, | 
				
			||||
 | 
					  methods: { | 
				
			||||
 | 
					    onSubmit(){ | 
				
			||||
 | 
					      let time = [this.editData.hour.trim(), this.editData.minute.trim(), this.editData.second.trim()].join(":"); | 
				
			||||
 | 
					      this.$emit("onSubmit", time) | 
				
			||||
 | 
					    }, | 
				
			||||
 | 
					    transformData(){ | 
				
			||||
 | 
					      let arr = this.propData.split(":"); | 
				
			||||
 | 
					      this.editData.hour = arr[0]; | 
				
			||||
 | 
					      this.editData.minute = arr[1]; | 
				
			||||
 | 
					      this.editData.second = arr[2]; | 
				
			||||
 | 
					      } | 
				
			||||
 | 
					  } | 
				
			||||
 | 
					}; | 
				
			||||
 | 
					</script> | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					<style lang="scss" scoped> | 
				
			||||
 | 
					.AddNEditDialog { | 
				
			||||
 | 
					  width: 100%; | 
				
			||||
 | 
					  display: flex; | 
				
			||||
 | 
					  flex-direction: column; | 
				
			||||
 | 
					  gap: 15px; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					  .tips { | 
				
			||||
 | 
					    font-size: 12px; | 
				
			||||
 | 
					  } | 
				
			||||
 | 
					} | 
				
			||||
 | 
					.task{ | 
				
			||||
 | 
					   border: 1px solid #FFF; | 
				
			||||
 | 
					   .task_info{ | 
				
			||||
 | 
					   } | 
				
			||||
 | 
					   .task_op{ | 
				
			||||
 | 
					   } | 
				
			||||
 | 
					} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    .tplItem { | 
				
			||||
 | 
					      margin-right: 14px; | 
				
			||||
 | 
					      display: flex; | 
				
			||||
 | 
					      align-items: stretch; | 
				
			||||
 | 
					      padding-bottom: 10px; | 
				
			||||
 | 
					   | 
				
			||||
 | 
					      .boardPreview { | 
				
			||||
 | 
					        border: 1px solid rgba(61, 232, 255, 0.5); | 
				
			||||
 | 
					        // width: 560px; | 
				
			||||
 | 
					        // height:80px; | 
				
			||||
 | 
					        flex: 1; | 
				
			||||
 | 
					      } | 
				
			||||
 | 
					   | 
				
			||||
 | 
					      .infoBtnBox { | 
				
			||||
 | 
					        &.infoBtnBoxSm { | 
				
			||||
 | 
					          width: 60px; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					   | 
				
			||||
 | 
					        width: 110px; | 
				
			||||
 | 
					        height: 80px; | 
				
			||||
 | 
					        display: flex; | 
				
			||||
 | 
					        margin-left: 10px; | 
				
			||||
 | 
					        /* // border: solid 1px #05afe3; */ | 
				
			||||
 | 
					        border: 1px solid rgba(61, 232, 255, 0.5); | 
				
			||||
 | 
					        display: flex; | 
				
			||||
 | 
					        justify-content: space-around; | 
				
			||||
 | 
					        align-items: center; | 
				
			||||
 | 
					   | 
				
			||||
 | 
					        .btn { | 
				
			||||
 | 
					          background-repeat: no-repeat; | 
				
			||||
 | 
					          background-size: 100% 100%; | 
				
			||||
 | 
					          width: 30px; | 
				
			||||
 | 
					          height: 30px; | 
				
			||||
 | 
					   | 
				
			||||
 | 
					          &.btnApply { | 
				
			||||
 | 
					            background-image: url(~@/assets/jihe/images/button/toLeft.svg); | 
				
			||||
 | 
					          } | 
				
			||||
 | 
					   | 
				
			||||
 | 
					          &.btnEdit { | 
				
			||||
 | 
					            background-image: url(~@/assets/jihe/images/button/edit.svg); | 
				
			||||
 | 
					          } | 
				
			||||
 | 
					   | 
				
			||||
 | 
					          &.btnDelete { | 
				
			||||
 | 
					            background-image: url(~@/assets/jihe/images/button/delete.svg); | 
				
			||||
 | 
					          } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					   | 
				
			||||
 | 
					        i { | 
				
			||||
 | 
					          font-size: 24px; | 
				
			||||
 | 
					          color: #666; | 
				
			||||
 | 
					          padding-left: 4px; | 
				
			||||
 | 
					          cursor: pointer; | 
				
			||||
 | 
					          caret-color: rgba(0, 0, 0, 0); | 
				
			||||
 | 
					          user-select: none; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					   | 
				
			||||
 | 
					        i:hover { | 
				
			||||
 | 
					          color: #05afe3; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					   | 
				
			||||
 | 
					        .disabledClass { | 
				
			||||
 | 
					          pointer-events: none; | 
				
			||||
 | 
					          cursor: auto !important; | 
				
			||||
 | 
					          color: #ccc; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					      } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					</style> | 
				
			||||
					Loading…
					
					
				
		Reference in new issue