From e4a06e0730dc0aa6ced97cbb3362d6b8ef473d39 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 27 三月 2025 15:56:34 +0800
Subject: [PATCH] 最新版本541200007
---
admin/src/views/business/trainTime.vue | 175 ++++++++++++++++++++++++++++-----------------------------
1 files changed, 86 insertions(+), 89 deletions(-)
diff --git a/admin/src/views/business/trainTime.vue b/admin/src/views/business/trainTime.vue
index db6d4dc..2c060c8 100644
--- a/admin/src/views/business/trainTime.vue
+++ b/admin/src/views/business/trainTime.vue
@@ -1,69 +1,55 @@
<template>
- <TableLayout :permissions="['business:deviceevent:query']">
- <!-- 鎼滅储琛ㄥ崟 -->
- <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
- <el-form-item label="濮撳悕/鎵嬫満鍙�" prop="keyWords">
- <el-input v-model="searchForm.keyWords" placeholder="璇疯緭鍏ュ鍚�/鎵嬫満鍙�" @keypress.enter.native="search"></el-input>
- </el-form-item>
- <el-form-item label="缁勭粐" prop="companyName">
- <el-input v-model="searchForm.companyName" placeholder="璇疯緭鍏ョ粍缁囧悕绉�" @keypress.enter.native="search"></el-input>
- </el-form-item>
- <el-form-item label="璧峰鏃堕棿" prop="eventType">
- <el-date-picker
- @change="seleTime"
- v-model="time"
- type="datetimerange"
- format="yyyy-MM-dd HH:mm:ss"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="鑷�"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡">
- </el-date-picker>
- </el-form-item>
- <el-radio-group v-model="searchForm.radio" size="small" @input="changeRadio">
- <el-radio-button label="0">褰撳ぉ</el-radio-button>
- <el-radio-button label="1">杩�7澶�</el-radio-button>
- <el-radio-button label="2">杩�30澶�</el-radio-button>
- </el-radio-group>
- <section>
- <el-button type="primary" @click="search">鎼滅储</el-button>
- <el-button @click="reset">閲嶇疆</el-button>
- </section>
- </el-form>
- <!-- 琛ㄦ牸鍜屽垎椤� -->
- <template v-slot:table-wrap>
- <el-table
- v-loading="isWorking.search"
- :data="tableData.list"
- stripe
- >
- <el-table-column prop="name" label="浜哄憳濮撳悕" min-width="100px"></el-table-column>
- <el-table-column prop="phone" label="鎵嬫満鍙�" min-width="100px"></el-table-column>
- <el-table-column prop="idcardNo" label="璇佷欢鍙�" min-width="150px"></el-table-column>
- <el-table-column prop="companyName" label="缁勭粐鍚嶇О" min-width="150px"></el-table-column>
- <el-table-column prop="startTime" label="寮�濮嬫棩鏈�" min-width="150px"></el-table-column>
- <el-table-column prop="endTime" label="缁撴潫鏃ユ湡" min-width="150px"></el-table-column>
- <el-table-column label="浜鸿劯鐓х墖" min-width="80px">
- <template slot-scope="{row}">
- <el-image
- v-if="row.faceImg"
- style="width: 80px; height: 80px"
- :src="row.faceImg"
- :preview-src-list="[row.faceImg]">
- </el-image>
- </template>
- </el-table-column>
- <el-table-column prop="createName" label="鎿嶄綔浜�" min-width="100px"></el-table-column>
- <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="150px"></el-table-column>
- </el-table>
- <pagination
- @size-change="handleSizeChange"
- @current-change="handlePageChange"
- :pagination="tableData.pagination"
- >
- </pagination>
- </template>
- </TableLayout>
+ <TableLayout :permissions="['business:deviceevent:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="濮撳悕/鎵嬫満鍙�" prop="keyWords">
+ <el-input v-model="searchForm.keyWords" placeholder="璇疯緭鍏ュ鍚�/鎵嬫満鍙�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item label="缁勭粐" prop="companyName">
+ <el-input v-model="searchForm.companyName" placeholder="璇疯緭鍏ョ粍缁囧悕绉�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item label="鍩硅寮�濮嬫椂闂�" prop="eventType">
+ <!-- <el-date-picker @change="seleTime" v-model="time" type="datetimerange" format="yyyy-MM-dd HH:mm:ss"
+ value-format="yyyy-MM-dd HH:mm:ss" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡">
+ </el-date-picker> -->
+ <el-date-picker type="datetime" v-model="searchForm.startTimeStart" value-format="yyyy-MM-dd HH:mm:ss"
+ placeholder="璇烽�夋嫨寮�濮嬫椂闂�" @change="changeRadio" />
+ <el-date-picker type="datetime" v-model="searchForm.startTimeEnd" value-format="yyyy-MM-dd HH:mm:ss"
+ placeholder="璇烽�夋嫨缁撴潫鏃堕棿" @change="changeRadio" />
+ </el-form-item>
+ <el-radio-group v-model="searchForm.radio" size="small" @input="changeRadio">
+ <el-radio-button label="0">褰撳ぉ</el-radio-button>
+ <el-radio-button label="1">杩�7澶�</el-radio-button>
+ <el-radio-button label="2">杩�30澶�</el-radio-button>
+ </el-radio-group>
+ <section>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </section>
+ </el-form>
+ <!-- 琛ㄦ牸鍜屽垎椤� -->
+ <template v-slot:table-wrap>
+ <el-table :height="tableHeightNew" v-loading="isWorking.search" :data="tableData.list" stripe>
+ <el-table-column prop="name" label="浜哄憳濮撳悕" min-width="100px"></el-table-column>
+ <el-table-column prop="phone" label="鎵嬫満鍙�" min-width="100px"></el-table-column>
+ <el-table-column prop="idcardNo" label="璇佷欢鍙�" min-width="150px"></el-table-column>
+ <el-table-column prop="companyName" label="缁勭粐鍚嶇О" min-width="150px"></el-table-column>
+ <el-table-column prop="startTime" label="寮�濮嬫棩鏈�" min-width="150px"></el-table-column>
+ <el-table-column prop="endTime" label="缁撴潫鏃ユ湡" min-width="150px"></el-table-column>
+ <el-table-column label="浜鸿劯鐓х墖" min-width="80px">
+ <template slot-scope="{row}">
+ <el-image v-if="row.faceImg" style="width: 80px; height: 80px" :src="row.faceImg"
+ :preview-src-list="[row.faceImg]">
+ </el-image>
+ </template>
+ </el-table-column>
+ <el-table-column prop="createName" label="鎿嶄綔浜�" min-width="100px"></el-table-column>
+ <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="150px"></el-table-column>
+ </el-table>
+ <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination">
+ </pagination>
+ </template>
+ </TableLayout>
</template>
<script>
@@ -75,20 +61,24 @@
name: 'DeviceEvent',
extends: BaseTable,
components: { TableLayout, Pagination },
- data () {
+ data() {
return {
// 鎼滅储
searchForm: {
keyWords: '',
companyName: '',
- startTime: '',
- endTime: '',
- radio: 0
+ startTimeStart: '',
+ startTimeEnd: '',
+ endTimeStart: '',
+ endTimeEnd: '',
+ radio: 0,
+ radio1: 0
},
- time: []
+ time: [],
+ time1: []
}
},
- created () {
+ created() {
this.config({
module: '鍩硅鏈夋晥鏈熷垪琛�',
api: '/business/trainTime',
@@ -99,33 +89,40 @@
this.search()
},
methods: {
- changeRadio (e) {
+ changeRadio(e) {
+ this.searchForm.radio = e
if (e === '0') {
- this.searchForm.startTime = timeForMat(0)[0]
- this.searchForm.endTime = timeForMat(0)[1]
- this.time = timeForMat(0)
+ this.searchForm.startTimeStart = timeForMat(0)[0]
+ this.searchForm.startTimeEnd = timeForMat(0)[1]
} else if (e === '1') {
- this.searchForm.startTime = timeForMat(6)[0]
- this.searchForm.endTime = timeForMat(6)[1]
- this.time = timeForMat(6)
+ this.searchForm.startTimeStart = timeForMat(6)[0]
+ this.searchForm.startTimeEnd = timeForMat(6)[1]
} else if (e === '2') {
- this.searchForm.startTime = timeForMat(29)[0]
- this.searchForm.endTime = timeForMat(29)[1]
- this.time = timeForMat(29)
+ this.searchForm.startTimeStart = timeForMat(29)[0]
+ this.searchForm.startTimeEnd = timeForMat(29)[1]
+ } else {
+ this.searchForm.radio = ''
+ }
+ if (this.searchForm.startTimeStart && this.searchForm.startTimeEnd && new Date(this.searchForm.startTimeStart).getTime() > new Date(this.searchForm.startTimeEnd).getTime()) {
+ this.$message.error('寮�濮嬫椂闂翠笉鑳藉ぇ浜庣粨鏉熸椂闂�')
+ this.searchForm.startTimeStart = ''
+ return
}
this.search()
},
- seleTime (e) {
- this.searchForm.startTime = e[0]
- this.searchForm.endTime = e[1]
- this.searchForm.radio = null
- this.search()
+ seleTime(e) {
+ if (e && e.length > 1) {
+ this.searchForm.startTimeStart = e[0]
+ this.searchForm.startTimeEnd = e[1]
+ this.searchForm.radio = null
+ this.time = [e[0], e[1]]
+ this.search()
+ }
},
- reset () {
+ reset() {
this.$refs.searchForm.resetFields()
+ this.searchForm = {}
this.time = []
- this.searchForm.radio = '0'
- this.changeRadio('0')
this.search()
}
}
--
Gitblit v1.9.3