|
|
@@ -45,17 +45,26 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
+ <div class="condition">
|
|
|
+ <span>到访时间 :</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="searchInput.date"
|
|
|
+ type="date"
|
|
|
+ placeholder="请输入到访时间"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
<el-button
|
|
|
style="margin-left: 20px"
|
|
|
color="rgba(38, 151, 255, 1)"
|
|
|
type="primary"
|
|
|
class="search"
|
|
|
@click="searchBtn"
|
|
|
- ><span>查询</span></el-button
|
|
|
- >
|
|
|
- <el-button @click="resetBtn" plain color="rgba(43, 153, 255, 1)"
|
|
|
- >重置</el-button
|
|
|
- >
|
|
|
+ ><span>查询</span>
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="resetBtn" plain color="rgba(43, 153, 255, 1)">
|
|
|
+ 重置</el-button>
|
|
|
</div>
|
|
|
<!-- 按钮列表 -->
|
|
|
<div class="gongneng">
|
|
|
@@ -351,6 +360,7 @@ const searchInput = reactive({
|
|
|
name: "",
|
|
|
carNumber: "",
|
|
|
school: "",
|
|
|
+ date: "",
|
|
|
}); // 搜索按钮数据
|
|
|
|
|
|
const currentPage = ref(1); // 当前页
|
|
|
@@ -410,7 +420,7 @@ const rules = reactive({
|
|
|
const defaultTime = [
|
|
|
new Date(2000, 1, 1, 0, 0, 0),
|
|
|
new Date(2000, 2, 1, 23, 59, 59),
|
|
|
-] // '12:00:00', '08:00:00'
|
|
|
+]; // '12:00:00', '08:00:00'
|
|
|
const disabledDate = (time) => {
|
|
|
const today = new Date();
|
|
|
// 获取当前日期的开始时间
|
|
|
@@ -431,6 +441,8 @@ const getList = async () => {
|
|
|
name: searchInput.name,
|
|
|
carNumber: searchInput.carNumber,
|
|
|
school: searchInput.school,
|
|
|
+ startTime: searchInput.date ? searchInput.date + " 00:00:00" : "",
|
|
|
+ endTime: searchInput.date ? searchInput.date + " 23:59:59" : "",
|
|
|
};
|
|
|
|
|
|
let res = await https.get(
|
|
|
@@ -467,6 +479,7 @@ const schoolList = async () => {
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
// 搜索功能
|
|
|
const searchBtn = lodash.debounce(async () => {
|
|
|
getList();
|
|
|
@@ -475,6 +488,7 @@ const resetBtn = lodash.debounce(async () => {
|
|
|
searchInput.name = null;
|
|
|
searchInput.carNumber = null;
|
|
|
searchInput.school = null;
|
|
|
+ searchInput.date=null;
|
|
|
getList();
|
|
|
}, 300);
|
|
|
|
|
|
@@ -656,6 +670,8 @@ const buildExportbtn = async () => {
|
|
|
name: searchInput.name,
|
|
|
carNumber: searchInput.carNumber,
|
|
|
school: searchInput.school,
|
|
|
+ startTime: searchInput.date ? searchInput.date + " 00:00:00" : "",
|
|
|
+ endTime: searchInput.date ? searchInput.date + " 23:59:59" : "",
|
|
|
};
|
|
|
let res = await https.getBlob(
|
|
|
"/welcome/api/visitor/admin/export",
|