Blame view

ant-design-vue-jeecg/src/components/jeecg/JEasyCron/tabs/year.vue 1.83 KB
肖超群 authored
1
2
3
4
5
6
7
8
9
<template>
  <div class="config-list">
    <a-radio-group v-model="type">
      <div class="item">
        <a-radio value="TYPE_EVERY" class="choice" :disabled="disabled">每年</a-radio>
      </div>
      <div class="item">
        <a-radio value="TYPE_RANGE" class="choice" :disabled="disabled">区间</a-radio>
肖超群 authored
10
11
        <a-input-number :disabled="type!==TYPE_RANGE || disabled" :min="0" :precision="0" class="w60"
                        v-model="valueRange.start"/>
肖超群 authored
12
13

肖超群 authored
14
15
        <a-input-number :disabled="type!==TYPE_RANGE || disabled" :min="1" :precision="0" class="w60"
                        v-model="valueRange.end"/>
肖超群 authored
16
17
18
19
20

      </div>
      <div class="item">
        <a-radio value="TYPE_LOOP" class="choice" :disabled="disabled">循环</a-radio>
肖超群 authored
21
22
        <a-input-number :disabled="type!==TYPE_LOOP || disabled" :min="0" :precision="0" class="w60"
                        v-model="valueLoop.start"/>
肖超群 authored
23
        年开始,间隔
肖超群 authored
24
25
        <a-input-number :disabled="type!==TYPE_LOOP || disabled" :min="1" :precision="0" class="w60"
                        v-model="valueLoop.interval"/>
肖超群 authored
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

      </div>
    </a-radio-group>
  </div>
</template>

<script>
import mixin from './mixin'

export default {
  name: 'year',
  mixins: [mixin],
  data() {
    return {}
  },
  watch: {
    value_c(newVal, oldVal) {
      // console.info('change:' + newVal)
      this.$emit('change', newVal)
    }
  },
  created() {
    const nowYear = (new Date()).getFullYear()
    this.DEFAULT_VALUE = '*'
    this.minValue = 0
    this.maxValue = 0
    this.valueRange.start = nowYear
    this.valueRange.end = nowYear + 100
    this.valueLoop.start = nowYear
    this.valueLoop.interval = 1
    // console.info('created')
    this.parseProp(this.prop)
  }
}
</script>

<style lang="less" scoped>
肖超群 authored
63
@import "mixin.less";
肖超群 authored
64
</style>