|
@@ -89,12 +89,40 @@
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <a class="button is-info" @click="getData()">
|
|
|
|
- <i class="material-icons icon-with-button"
|
|
|
|
- >search</i
|
|
|
|
- >
|
|
|
|
- Search
|
|
|
|
- </a>
|
|
|
|
|
|
+ <div class="advanced-query-bottom">
|
|
|
|
+ <div class="control select">
|
|
|
|
+ <select v-model="queryOperator">
|
|
|
|
+ <option
|
|
|
|
+ v-for="operator in queryOperators"
|
|
|
|
+ :key="operator.name"
|
|
|
|
+ :value="operator.name"
|
|
|
|
+ >
|
|
|
|
+ {{ operator.displayName }}
|
|
|
|
+ </option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control is-expanded">
|
|
|
|
+ <button
|
|
|
|
+ class="button is-info"
|
|
|
|
+ @click="getData()"
|
|
|
|
+ >
|
|
|
|
+ <i class="material-icons icon-with-button"
|
|
|
|
+ >search</i
|
|
|
|
+ >
|
|
|
|
+ Search
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control">
|
|
|
|
+ <button
|
|
|
|
+ class="button is-warning material-icons"
|
|
|
|
+ @click="resetQuery()"
|
|
|
|
+ content="Reset query"
|
|
|
|
+ v-tippy="{ theme: 'info' }"
|
|
|
|
+ >
|
|
|
|
+ refresh
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
</tippy>
|
|
</tippy>
|
|
<tippy
|
|
<tippy
|
|
@@ -406,6 +434,7 @@
|
|
<span
|
|
<span
|
|
class="material-icons drag-icon"
|
|
class="material-icons drag-icon"
|
|
@mousedown.left="onDragBox"
|
|
@mousedown.left="onDragBox"
|
|
|
|
+ @dblclick="resetBulkActionsPosition()"
|
|
>
|
|
>
|
|
drag_indicator
|
|
drag_indicator
|
|
</span>
|
|
</span>
|
|
@@ -468,6 +497,17 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
advancedQuery: [],
|
|
advancedQuery: [],
|
|
|
|
+ queryOperator: "or",
|
|
|
|
+ queryOperators: [
|
|
|
|
+ {
|
|
|
|
+ name: "or",
|
|
|
|
+ displayName: "OR"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "and",
|
|
|
|
+ displayName: "AND"
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
resizing: {},
|
|
resizing: {},
|
|
allFilterTypes: {
|
|
allFilterTypes: {
|
|
contains: {
|
|
contains: {
|
|
@@ -552,15 +592,9 @@ export default {
|
|
const pageSize = parseInt(localStorage.getItem("adminPageSize"));
|
|
const pageSize = parseInt(localStorage.getItem("adminPageSize"));
|
|
if (!Number.isNaN(pageSize)) this.pageSize = pageSize;
|
|
if (!Number.isNaN(pageSize)) this.pageSize = pageSize;
|
|
|
|
|
|
- if (this.filters.length > 0)
|
|
|
|
- this.advancedQuery.push({
|
|
|
|
- data: "",
|
|
|
|
- filter: {},
|
|
|
|
- filterType: ""
|
|
|
|
- });
|
|
|
|
|
|
+ this.addQueryItem();
|
|
|
|
|
|
- this.bulkPopup.top = document.body.clientHeight - 56;
|
|
|
|
- this.bulkPopup.left = document.body.clientWidth / 2 - 200;
|
|
|
|
|
|
+ this.resetBulkActionsPosition();
|
|
|
|
|
|
ws.onConnect(this.init);
|
|
ws.onConnect(this.init);
|
|
},
|
|
},
|
|
@@ -576,6 +610,7 @@ export default {
|
|
this.properties,
|
|
this.properties,
|
|
this.sort,
|
|
this.sort,
|
|
this.advancedQuery,
|
|
this.advancedQuery,
|
|
|
|
+ this.queryOperator,
|
|
res => {
|
|
res => {
|
|
console.log(111, res);
|
|
console.log(111, res);
|
|
if (res.status === "success") {
|
|
if (res.status === "success") {
|
|
@@ -684,17 +719,22 @@ export default {
|
|
this.data[itemIndex].highlighted = true;
|
|
this.data[itemIndex].highlighted = true;
|
|
},
|
|
},
|
|
addQueryItem() {
|
|
addQueryItem() {
|
|
- if (this.filters.length > 0)
|
|
|
|
- this.advancedQuery.push({
|
|
|
|
- data: "",
|
|
|
|
- filter: {},
|
|
|
|
- filterType: ""
|
|
|
|
- });
|
|
|
|
|
|
+ this.advancedQuery.push({
|
|
|
|
+ data: "",
|
|
|
|
+ filter: {},
|
|
|
|
+ filterType: ""
|
|
|
|
+ });
|
|
},
|
|
},
|
|
removeQueryItem(index) {
|
|
removeQueryItem(index) {
|
|
if (this.advancedQuery.length > 1)
|
|
if (this.advancedQuery.length > 1)
|
|
this.advancedQuery.splice(index, 1);
|
|
this.advancedQuery.splice(index, 1);
|
|
},
|
|
},
|
|
|
|
+ resetQuery() {
|
|
|
|
+ this.advancedQuery = [];
|
|
|
|
+ this.queryOperator = "or";
|
|
|
|
+ this.addQueryItem();
|
|
|
|
+ this.getData();
|
|
|
|
+ },
|
|
columnResizingMouseDown(column, event) {
|
|
columnResizingMouseDown(column, event) {
|
|
this.resizing.resizing = true;
|
|
this.resizing.resizing = true;
|
|
this.resizing.resizingColumn = column;
|
|
this.resizing.resizingColumn = column;
|
|
@@ -783,6 +823,10 @@ export default {
|
|
document.onmouseup = null;
|
|
document.onmouseup = null;
|
|
document.onmousemove = null;
|
|
document.onmousemove = null;
|
|
};
|
|
};
|
|
|
|
+ },
|
|
|
|
+ resetBulkActionsPosition() {
|
|
|
|
+ this.bulkPopup.top = document.body.clientHeight - 56;
|
|
|
|
+ this.bulkPopup.left = document.body.clientWidth / 2 - 200;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -988,8 +1032,11 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.advanced-query {
|
|
.advanced-query {
|
|
- display: flex;
|
|
|
|
margin-bottom: 5px;
|
|
margin-bottom: 5px;
|
|
|
|
+}
|
|
|
|
+.advanced-query,
|
|
|
|
+.advanced-query-bottom {
|
|
|
|
+ display: flex;
|
|
|
|
|
|
& > .control {
|
|
& > .control {
|
|
& > input,
|
|
& > input,
|
|
@@ -1016,6 +1063,10 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.advanced-query-bottom .button {
|
|
|
|
+ font-size: 16px !important;
|
|
|
|
+ width: 100%;
|
|
|
|
+}
|
|
|
|
|
|
.bulk-popup {
|
|
.bulk-popup {
|
|
display: flex;
|
|
display: flex;
|