提交 a2defcd4 authored 作者: 邓文彬's avatar 邓文彬

fix(pad): 搜索条件修改

上级 42800b79
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
v-model="searchFrom.inspectionType" v-model="searchFrom.inspectionType"
:localdata="inspectArr" :localdata="inspectArr"
@change="(e) => change(e, 'inspectionType')" @change="(e) => change(e, 'inspectionType')"
placeholder="全部巡检" placeholder="巡检类型:全部"
:clear="true" :clear="true"
:key="new Date().getTime()"
></uni-data-select> ></uni-data-select>
<uni-data-select <uni-data-select
...@@ -16,9 +17,11 @@ ...@@ -16,9 +17,11 @@
class="uni-search-item" class="uni-search-item"
v-model="searchFrom.synchronization" v-model="searchFrom.synchronization"
:localdata="synchronization" :localdata="synchronization"
placeholder="全部" placeholder="是否同步:全部"
@change="(e) => change(e, 'synchronization')" @change="(e) => change(e, 'synchronization')"
:clear="true" :clear="true"
:key="new Date().getTime()"
></uni-data-select> ></uni-data-select>
<uni-data-select <uni-data-select
...@@ -26,9 +29,10 @@ ...@@ -26,9 +29,10 @@
class="uni-search-item" class="uni-search-item"
v-model="searchFrom.isException" v-model="searchFrom.isException"
:localdata="exceptionArr" :localdata="exceptionArr"
placeholder="有无异常" placeholder="有无异常:全部"
@change="(e) => change(e, 'isException')" @change="(e) => change(e, 'isException')"
:clear="true" :clear="true"
:key="new Date().getTime()"
></uni-data-select> ></uni-data-select>
</view> </view>
...@@ -67,17 +71,17 @@ export default { ...@@ -67,17 +71,17 @@ export default {
}, },
inspectArr: [ inspectArr: [
{ value: "", text: "全部" }, { value: "all", text: "全部" },
{ value: "1", text: "机房巡检" }, { value: "1", text: "机房巡检" },
{ value: "2", text: "井道巡检" }, { value: "2", text: "井道巡检" },
], ],
synchronization: [ synchronization: [
{ value: "", text: "全部" }, { value: "all", text: "全部" },
{ value: "0", text: "未同步" }, { value: "0", text: "未同步" },
{ value: "1", text: "已同步" }, { value: "1", text: "已同步" },
], ],
exceptionArr: [ exceptionArr: [
{ value: "", text: "全部" }, { value: "all", text: "全部" },
{ value: "1", text: "有异常" }, { value: "1", text: "有异常" },
{ value: "0", text: "无异常" }, { value: "0", text: "无异常" },
], ],
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
v-model="searchFrom.type" v-model="searchFrom.type"
:localdata="typeList" :localdata="typeList"
@change="change" @change="change"
placeholder="全部" placeholder="操作类型:全部"
:key="new Date().getTime()"
></uni-data-select> ></uni-data-select>
<view class="search-com-right"> <view class="search-com-right">
...@@ -94,7 +95,7 @@ export default { ...@@ -94,7 +95,7 @@ export default {
total: 0, total: 0,
loading: false, loading: false,
typeList: [ typeList: [
{ value: "", text: "全部" }, { value: "all", text: "全部" },
{ value: "1", text: "巡检" }, { value: "1", text: "巡检" },
{ value: "2", text: "同步" }, { value: "2", text: "同步" },
...@@ -166,7 +167,7 @@ export default { ...@@ -166,7 +167,7 @@ export default {
this.tableData = this.recordData.filter((item) => { this.tableData = this.recordData.filter((item) => {
let matchType = true; // 类型筛选 let matchType = true; // 类型筛选
let matchTime = true; // 时间筛选 let matchTime = true; // 时间筛选
if (type) { if (type && type != "all") {
if (type == -1) { if (type == -1) {
// [其他]搜索项 // [其他]搜索项
matchType = matchType =
......
...@@ -148,11 +148,13 @@ export default { ...@@ -148,11 +148,13 @@ export default {
synchronization = "", synchronization = "",
} = this.searchForm; } = this.searchForm;
return arr.filter((item) => { return arr.filter((item) => {
return ( return (
(!isException || item.isException == isException) && ( !isException || isException =="all" || item.isException == isException) &&
(!inspectionType || item.inspectionType == inspectionType) && ( !inspectionType || inspectionType =="all" || item.inspectionType == inspectionType) &&
(!synchronization || item.synchronization == synchronization) ( !synchronization || synchronization =="all" || item.synchronization == synchronization)
); );
}); });
}, },
......
...@@ -168,9 +168,9 @@ export default { ...@@ -168,9 +168,9 @@ export default {
return arr.filter((item) => { return arr.filter((item) => {
return ( return (
(!isException || item.isException == isException) && ( !isException || isException =="all" || item.isException == isException) &&
(!inspectionType || item.inspectionType == inspectionType) && ( !inspectionType || inspectionType =="all" || item.inspectionType == inspectionType) &&
(!synchronization || item.synchronization == synchronization) ( !synchronization || synchronization =="all" || item.synchronization == synchronization)
); );
}); });
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论