|
@@ -31,14 +31,15 @@
|
|
|
<a-col :span="24" class="query-row">
|
|
|
<div class="col-title"></div>
|
|
|
<a-select v-model:value="formState.defaultField" :options="fieldList" class="operTexts"></a-select>
|
|
|
- <a-input v-model:value="formState.defaultKeyString" style="width: 285px"></a-input>
|
|
|
+ <!--AutoComplete继承至vue-->
|
|
|
+ <QueryHistoryComplete v-model:value="formState.defaultKeyString" style="width: 285px"></QueryHistoryComplete>
|
|
|
<img src="~@/assets/images/add.png" @click="addQuery"/>
|
|
|
</a-col>
|
|
|
<a-col :span="24" class="query-row" v-for="(it,index) in queryList">
|
|
|
<div class="col-title"></div>
|
|
|
<!--a-select v-model:value="it.oper" :options="operTexts" class="operTexts"></a-select-->
|
|
|
<a-select v-model:value="it.field" :options="fieldList" class="operTexts"></a-select>
|
|
|
- <a-input v-model:value="it.keyString" style="width: 285px"></a-input>
|
|
|
+ <QueryHistoryComplete v-model:value="it.keyString" style="width: 285px"></QueryHistoryComplete>
|
|
|
<img src="~@/assets/images/sub.png" @click="onDelete(index)"/>
|
|
|
</a-col>
|
|
|
|
|
@@ -46,7 +47,7 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="24" class="query-row">
|
|
|
<div class="col-title"></div>
|
|
|
- <a-button type="primary" html-type="submit" @click="onQuery">查询</a-button>
|
|
|
+ <a-button type="primary" html-type="submit">查询</a-button>
|
|
|
<a-button style="margin: 0 8px" @click="() => {formRef.resetFields();}">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -62,10 +63,11 @@ import {DownOutlined, UpOutlined} from "@ant-design/icons-vue";
|
|
|
import type {FormInstance, SelectProps} from "ant-design-vue";
|
|
|
import {useTabsViewStore} from "@/store/modules/tabsView";
|
|
|
import {save} from "@/api/common";
|
|
|
+import QueryHistoryComplete from '@/components/basic/querylog/history-complete.vue'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'domainESIndex',
|
|
|
- components: {DownOutlined, UpOutlined},
|
|
|
+ components: {DownOutlined, UpOutlined, QueryHistoryComplete},
|
|
|
setup() {
|
|
|
const tabsViewStore = useTabsViewStore();
|
|
|
const route = useRoute();
|
|
@@ -91,7 +93,8 @@ export default defineComponent({
|
|
|
const fieldList = [
|
|
|
{value: '', label: '不限'},
|
|
|
{value: 'well_id', label: '井号'},
|
|
|
- {value: 'well_common_name', label: '井名'}
|
|
|
+ {value: 'well_common_name', label: '井名'},
|
|
|
+ {value: 'historys.testing_name', label: '测试'}
|
|
|
] as SelectProps['options'];
|
|
|
|
|
|
const onQuery = () => {
|
|
@@ -110,9 +113,10 @@ export default defineComponent({
|
|
|
//限定条件写入
|
|
|
//{"fieldName":"开钻日期", "fields":["spud_date"],"opreation":"大于","value":"2022-03-28"}
|
|
|
queryObject.limiters.push({ fields:["well_common_name.keyword"], opreation:'等于', value:formState.well_common_name });
|
|
|
+ //多个值测试,如 组织单位 in 哪些值
|
|
|
+ queryObject.limiters.push({ fields:["well_type.keyword"], opreation:'包括IN', value:'直井' });
|
|
|
|
|
|
console.log(queryObject);
|
|
|
-
|
|
|
save('esquery/Query', queryObject).then(result => {
|
|
|
console.log(result);
|
|
|
});
|