Commit a98766d3 by 张杰

Merge branch 'dev_zj_1.7.0' into 'v1.7.0'

v1.7.0开发分支合并到提测分支

See merge request !15
2 parents 6200f5fd 02eb1269
...@@ -221,3 +221,60 @@ export const deviceActivedShortcuts = [ ...@@ -221,3 +221,60 @@ export const deviceActivedShortcuts = [
}, },
}, },
] ]
// 超速报警
export const speedShortcuts = [
{
text: '全部',
onClick(picker) {
const end = ''
const start = ''
picker.$emit('pick', [start, end])
},
},
{
text: '昨日',
onClick(picker) {
const start = moment()
.day(moment().day() - 1)
.format('YYYY-MM-DD')
const end = moment()
.day(moment().day() - 1)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
},
{
text: '上周',
onClick(picker) {
let weekOfDay = parseInt(moment().format('E'))
const end = moment().subtract(weekOfDay, 'days').format('YYYY-MM-DD')
const start = moment()
.subtract(weekOfDay + 7 - 1, 'days')
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
},
{
text: '本月',
onClick(picker) {
const start = moment().add('month', 0).format('YYYY-MM') + '-01'
const end = moment().format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
},
{
text: '上月',
onClick(picker) {
const end = moment()
.month(moment().month() - 1)
.endOf('month')
.format('YYYY-MM-DD')
const start = moment()
.month(moment().month() - 1)
.startOf('month')
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
},
]
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div class="search_box"> <div class="search_box">
<el-form :inline="true" size="small"> <el-form :inline="true" size="small">
<el-form-item label="关键字"> <el-form-item label="关键字">
<el-input v-model.trim="searchForm.keywords" class="long_input" placeholder="设备号 | 车架号 | 姓名 | 工单号" maxlength="20"></el-input> <el-input v-model.trim="searchForm.keywords" class="long_input" placeholder="设备号 | 车架号 | 姓名 | 业务工单号" maxlength="20"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="车辆归属:"> <el-form-item label="车辆归属:">
<el-popover v-model="filterVisible" placement="bottom-start" width="400" trigger="click"> <el-popover v-model="filterVisible" placement="bottom-start" width="400" trigger="click">
...@@ -92,11 +92,9 @@ ...@@ -92,11 +92,9 @@
</div> </div>
</template> </template>
<script> <script>
import moment from "moment"; import { speedShortcuts } from "@/common";
import { fenceShortcuts } from "@/common";
import GlsxOrganization from "@/components/glsx-organization"; import GlsxOrganization from "@/components/glsx-organization";
import { import {
GET_FENCEALARM_LIST,
GET_SPEEDING_EXPORT, GET_SPEEDING_EXPORT,
GET_SPEEDING_SEARCH, GET_SPEEDING_SEARCH,
} from "@/services/alarmCenter"; } from "@/services/alarmCenter";
...@@ -118,7 +116,7 @@ export default { ...@@ -118,7 +116,7 @@ export default {
showResult: false, showResult: false,
loading: false, loading: false,
offPickerOptions: { offPickerOptions: {
shortcuts: fenceShortcuts, shortcuts: speedShortcuts,
}, },
filterVisible: false, filterVisible: false,
orgInfo: {}, orgInfo: {},
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
// 重置 // 重置
rest() { rest() {
this.tableParams = {}; this.tableParams = {};
this.searchForm = {}; this.searchForm = { queryTimeType: 1 };
this.$refs.glsxTable.rest(); this.$refs.glsxTable.rest();
}, },
}, },
......
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
// 重置 // 重置
rest() { rest() {
this.tableParams = {}; this.tableParams = {};
this.searchForm = {}; this.searchForm = {queryTimeType: 1 };
this.$refs.glsxTable.rest(); this.$refs.glsxTable.rest();
}, },
}, },
......
...@@ -922,7 +922,7 @@ export default { ...@@ -922,7 +922,7 @@ export default {
//this.snForm.deviceArr = [{ sn: "", deviceType: "" }]; //this.snForm.deviceArr = [{ sn: "", deviceType: "" }];
//this.snForm.deviceInfoDtos = [{}]; //this.snForm.deviceInfoDtos = [{}];
this.snForm = {}; this.snForm = {settleFlag:0};
this.$set(this.snForm, "deviceInfoDtos", [ this.$set(this.snForm, "deviceInfoDtos", [
{ sn: "", deviceClassifyName: "" }, { sn: "", deviceClassifyName: "" },
]); ]);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!