智慧农业大数据平台
zengh
2022-07-20 9bee1f091eb2fc5af4f8e93fd8bdd0c98e0f2eba
src/components/date-select/index.vue
@@ -20,6 +20,7 @@
                :type="dateType"
                :placeholder="datePlaceHolder"
        ></el-date-picker>
    </div>
</template>
@@ -36,15 +37,30 @@
                currentDate: ''
            }
        },
        created () {
            var date = new Date()
            this.currentDate = date
        },
        methods: {
            select (e) {
                console.log(e.target.dataset.holder)
                this.dateType = e.target.dataset.type
                this.datePlaceHolder = e.target.dataset.holder
                var currentTime = this.gettime(this.currentDate)
                if (this.type == 'taskSelect') {
                    this.$parent.getTaskTime(currentTime)
                } else if (this.type == 'ncptrSelect') {
                    this.$parent.getNcptrTime(currentTime)
                } else if (this.type == 'nztrSelect') {
                    this.$parent.getNztrTime(currentTime)
                } else if (this.type == 'cltjSelect') {
                    this.$parent.getCltjTime(currentTime)
                } else if (this.type == 'symSelect') {
                    this.$parent.getSymTime(currentTime)
                }
            },
            selectChange (e) {
                const currentTime = this.gettime(e)
                var currentTime = this.gettime(e)
                if (this.type == 'taskSelect') {
                    this.$parent.getTaskTime(currentTime)
                } else if (this.type == 'ncptrSelect') {