Browse Source

添加推荐时间间隔

master
suyanyan 5 days ago
parent
commit
4f2111743e
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      SafeCampus.WEB/src/views/sysconfig/push/index.vue

+ 11
- 3
SafeCampus.WEB/src/views/sysconfig/push/index.vue View File

@@ -22,10 +22,15 @@
<div class="ruleTitle">推送规则</div> <div class="ruleTitle">推送规则</div>
<div class="ruleContent"> <div class="ruleContent">
<span>当日预警每达到</span> <span>当日预警每达到</span>
<el-input-number v-model="ruleForm.daySum" class="mx-4" :min="1" controls-position="right" @change="handleChange" />
<el-input-number v-model="ruleForm.daySum" class="mx-4" :min="1" controls-position="right" />
<span>条时进行推送</span> <span>条时进行推送</span>
<div class="tips">当日预警数据每达到设置的条数后,会进行消息推送。</div> <div class="tips">当日预警数据每达到设置的条数后,会进行消息推送。</div>
</div> </div>
<div class="ruleContent">
<span>推送时间间隔</span>
<el-input-number v-model="ruleForm.Interval" class="mx-4" :min="1" controls-position="right" />
<span>分钟</span>
</div>
<el-form-item> <el-form-item>
<el-button type="primary" @click="submitForm(ruleFormRef)"> 保 存 </el-button> <el-button type="primary" @click="submitForm(ruleFormRef)"> 保 存 </el-button>
<!-- <el-button @click="resetForm(ruleFormRef)">取消</el-button> --> <!-- <el-button @click="resetForm(ruleFormRef)">取消</el-button> -->
@@ -42,14 +47,16 @@ import { abilityApi, getPushInfo,userManageClassManageApi, monitorLIVEApi,SysOrg
interface RuleForm { interface RuleForm {


pushState: string | boolean, pushState: string | boolean,
daySum: number
daySum: number,
Interval:number
} }


const formSize = ref<ComponentSize>('default') const formSize = ref<ComponentSize>('default')
const ruleFormRef = ref<FormInstance>() const ruleFormRef = ref<FormInstance>()
const ruleForm = reactive<RuleForm>({ const ruleForm = reactive<RuleForm>({
pushState: false, pushState: false,
daySum: 1
daySum: 1,
Interval:1
}) })
const pushOptions = [{ const pushOptions = [{
label: '开启', label: '开启',
@@ -82,6 +89,7 @@ async function getPushData() {
let {data} = await abilityApi.getPushInfo({}) let {data} = await abilityApi.getPushInfo({})
ruleForm.daySum = data.daySum; ruleForm.daySum = data.daySum;
ruleForm.pushState = data.pushState; ruleForm.pushState = data.pushState;
ruleForm.Interval = data.Interval;
console.log(data); console.log(data);
} }
const submitForm = async (formEl: FormInstance | undefined) => { const submitForm = async (formEl: FormInstance | undefined) => {


Loading…
Cancel
Save