|
@@ -49,7 +49,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <h2 class="form-title">通知条件</h2>
|
|
|
+ <h2 class="form-title">通知条件(必选)</h2>
|
|
|
<el-form ref="form" :model="formData" label-width="100px" label-position="left">
|
|
|
<el-form-item v-for="(item,index) in formData.noticeConditionList" :key="'condition'+index" label="条件">
|
|
|
<el-select v-model="item.type" placeholder="请选择类型" size="small" class="condition-select" :disabled="disabled" @change="changeNoticeItem(item)">
|
|
@@ -143,11 +143,16 @@
|
|
|
</el-form>
|
|
|
<h2 class="form-title">通知时刻</h2>
|
|
|
<div class="notice-time">
|
|
|
- <el-time-picker
|
|
|
+ <el-time-select
|
|
|
v-model="formData.noticeTime"
|
|
|
placeholder="任意时间点"
|
|
|
size="small"
|
|
|
value-format="HH:mm:ss"
|
|
|
+ :picker-options="{
|
|
|
+ start: '00:00',
|
|
|
+ step: '00:15',
|
|
|
+ end: '23:45',
|
|
|
+ }"
|
|
|
:disabled="disabled"
|
|
|
/>
|
|
|
</div>
|
|
@@ -273,6 +278,12 @@ export default {
|
|
|
deep: true,
|
|
|
immediate: true
|
|
|
},
|
|
|
+ type: {
|
|
|
+ handler(newV) {
|
|
|
+ this.type = newV
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ },
|
|
|
visible: {
|
|
|
handler(newV) {
|
|
|
this.show = newV
|
|
@@ -285,6 +296,12 @@ export default {
|
|
|
},
|
|
|
immediate: true
|
|
|
},
|
|
|
+ disabled: {
|
|
|
+ handler(newV) {
|
|
|
+ this.disabled = newV
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ },
|
|
|
'formData.clientId': { // 客户端改变,版本默认取第一个版本
|
|
|
handler(newV) {
|
|
|
this.formData.clientVersionId = (this.clientList[0] && this.clientList[0].code) || null
|
|
@@ -492,7 +509,11 @@ export default {
|
|
|
this.$message({ message: '请选择客户端', type: 'error', duration: 1000, offset: 150 })
|
|
|
return false
|
|
|
}
|
|
|
- if (!this.EmailList && !this.DChartList && !this.GroupList) {
|
|
|
+ if (this.formData.noticeConditionList.length < 1) {
|
|
|
+ this.$message({ message: '请添加通知条件', type: 'error', duration: 1000, offset: 150 })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (this.EmailList.length === 0 && this.DChartList.length === 0 && this.GroupList.length === 0) {
|
|
|
this.$message({ message: '请选择一种通知方式', type: 'error', duration: 1000, offset: 150 })
|
|
|
return false
|
|
|
}
|