|
@@ -56,6 +56,28 @@
|
|
|
<div>{{formInfo.message.length + "/1000"}}</div>
|
|
<div>{{formInfo.message.length + "/1000"}}</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :xs="22" :md="12">
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="Pin">
|
|
|
|
|
+ <el-switch
|
|
|
|
|
+ class="add-text"
|
|
|
|
|
+ v-model="formInfo.bin"
|
|
|
|
|
+ :disabled="!isEdit"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="Expiration Time"
|
|
|
|
|
+ prop="pinExpireTime"
|
|
|
|
|
+ v-if="formInfo.bin">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="formInfo.pinExpireTime"
|
|
|
|
|
+ class="add-text"
|
|
|
|
|
+ type="datetime"
|
|
|
|
|
+ format="yyyy-MM-dd HH:mm"
|
|
|
|
|
+ value-format="yyyy-MM-dd HH:mm"
|
|
|
|
|
+ :disabled="!isEdit"/>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<div class="sparator" style="margin: 10px -80px;"></div>
|
|
<div class="sparator" style="margin: 10px -80px;"></div>
|
|
|
<div class="buttons" v-if="isEdit">
|
|
<div class="buttons" v-if="isEdit">
|
|
@@ -94,7 +116,10 @@ export default {
|
|
|
formInfo: {
|
|
formInfo: {
|
|
|
title: "",
|
|
title: "",
|
|
|
message: "",
|
|
message: "",
|
|
|
- targets: []
|
|
|
|
|
|
|
+ targets: [],
|
|
|
|
|
+ pin: false,
|
|
|
|
|
+ bin: false ,
|
|
|
|
|
+ pinExpireTime: ""
|
|
|
},
|
|
},
|
|
|
autosize: {
|
|
autosize: {
|
|
|
minRows: 3,
|
|
minRows: 3,
|
|
@@ -116,6 +141,11 @@ export default {
|
|
|
required: true,
|
|
required: true,
|
|
|
trigger: 'change',
|
|
trigger: 'change',
|
|
|
message: 'Please select target platform'
|
|
message: 'Please select target platform'
|
|
|
|
|
+ },
|
|
|
|
|
+ pinExpireTime: {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ message: 'Please select expiration time'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
isEdit: true
|
|
isEdit: true
|
|
@@ -176,7 +206,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
sendNotification() {
|
|
sendNotification() {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
- api.sendNotification(this.formInfo).then(res => {
|
|
|
|
|
|
|
+ api.sendNotification(info).then(res => {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
message: "Send successfully!"
|
|
message: "Send successfully!"
|