|
@@ -1,60 +1,62 @@
|
|
|
<template>
|
|
|
<div style="margin: auto;width: 500px;">
|
|
|
- <a-space>
|
|
|
- <QueryHistoryComplete v-model:value="formState.defaultKeyString" style="width: 520px"></QueryHistoryComplete>
|
|
|
+ <a-space data-v-step="1">
|
|
|
+ <QueryHistoryComplete v-model:value="formState.defaultKeyString" style="width: 500px"></QueryHistoryComplete>
|
|
|
<a-button type="primary" html-type="submit" @click="getQuery">查询</a-button>
|
|
|
<a-button @click="() => {formRef.resetFields();}">重置</a-button>
|
|
|
</a-space>
|
|
|
</div>
|
|
|
- <a-divider orientation="center" @click="formState.showMoreQuery=!formState.showMoreQuery">
|
|
|
- <template v-if="!formState.showMoreQuery">
|
|
|
- 更多查询
|
|
|
- <DoubleRightOutlined rotate="90"/>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- 收 起
|
|
|
- <DoubleLeftOutlined rotate="90"/>
|
|
|
- </template>
|
|
|
- </a-divider>
|
|
|
+ <v-tour name="myTour" :steps="steps" :options="myOptions" :callbacks="myCallbacks"></v-tour>
|
|
|
+ <a-divider orientation="center" @click="formState.showMoreQuery=!formState.showMoreQuery;">
|
|
|
+ <template v-if="!formState.showMoreQuery" >
|
|
|
+ 更多查询
|
|
|
+ <DoubleRightOutlined rotate="90" />
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ 收 起
|
|
|
+ <DoubleLeftOutlined rotate="90"/>
|
|
|
+ </template>
|
|
|
+ </a-divider>
|
|
|
<div style="margin: auto;width: 500px;" v-show="formState.showMoreQuery">
|
|
|
- <a-divider orientation="left"><b style="color:#4E61D0">1.输入检索控制条件</b></a-divider>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24">
|
|
|
- <div class="col-title">组织单位:</div>
|
|
|
- <a-input v-model:value="formState.org_name_a1" style="width: 400px"></a-input>
|
|
|
- </a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <div class="col-title">作业区/项目部:</div>
|
|
|
- <a-input v-model:value="formState.bz_dwmc" style="width: 400px"></a-input>
|
|
|
- </a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <div class="col-title">井名:</div>
|
|
|
- <a-input v-model:value="formState.well_common_name" style="width: 400px"></a-input>
|
|
|
- </a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <div class="col-title">地层名称:</div>
|
|
|
- <a-input v-model:value="formState.formation_name" style="width: 400px"></a-input>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-divider orientation="left"><b style="color:#4E61D0">2.输入检索内容条件</b></a-divider>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24" class="query-row" v-for="(it,index) in limiters">
|
|
|
- <div class="col-title">
|
|
|
- <a-select v-model:value="it.relation" :options="operTexts" class="operTexts"></a-select>
|
|
|
- </div>
|
|
|
- <a-select v-model:value="it.fields" :options="fieldList" class="operTexts"></a-select>
|
|
|
- <a-input v-model:value="it.value" style="width: 285px"></a-input>
|
|
|
- <img src="~@/assets/images/add.png" @click="addQuery" v-if="index==0"/>
|
|
|
- <img src="~@/assets/images/sub.png" @click="onDelete(index)" v-if="index>0"/>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </div>
|
|
|
+ <a-divider orientation="left" data-v-step="2"><b style="color:#4E61D0">1.输入检索控制条件</b></a-divider>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24">
|
|
|
+ <div class="col-title">组织单位:</div>
|
|
|
+ <a-input v-model:value="formState.org_name_a1" style="width: 400px"></a-input>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <div class="col-title">作业区/项目部:</div>
|
|
|
+ <a-input v-model:value="formState.bz_dwmc" style="width: 400px"></a-input>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <div class="col-title">井名:</div>
|
|
|
+ <a-input v-model:value="formState.well_common_name" style="width: 400px"></a-input>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <div class="col-title">地层名称:</div>
|
|
|
+ <a-input v-model:value="formState.formation_name" style="width: 400px"></a-input>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-divider orientation="left" data-v-step="3"><b style="color:#4E61D0">2.输入检索内容条件</b></a-divider>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24" class="query-row" v-for="(it,index) in limiters">
|
|
|
+ <div class="col-title">
|
|
|
+ <a-select v-model:value="it.relation" :options="operTexts" class="operTexts"></a-select>
|
|
|
+ </div>
|
|
|
+ <a-select v-model:value="it.fields" :options="fieldList" class="operTexts"></a-select>
|
|
|
+ <a-input v-model:value="it.value" style="width: 285px"></a-input>
|
|
|
+ <img src="~@/assets/images/add.png" @click="addQuery" v-if="index==0"/>
|
|
|
+ <img src="~@/assets/images/sub.png" @click="onDelete(index)" v-if="index>0"/>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import {defineComponent, ref, watch} from 'vue';
|
|
|
+import {defineComponent, ref,reactive, watch,getCurrentInstance} from 'vue';
|
|
|
import type {FormInstance, SelectProps} from "ant-design-vue";
|
|
|
-import QueryHistoryComplete from '@/components/basic/querylog/history-complete.vue'
|
|
|
+import QueryHistoryComplete from '@/components/basic/querylog/history-complete.vue';
|
|
|
+
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'query-criteria',
|
|
@@ -67,6 +69,86 @@ export default defineComponent({
|
|
|
],
|
|
|
setup(props, {emit}) {
|
|
|
console.log(props);
|
|
|
+ const curTour = ref(null);
|
|
|
+ const steps = reactive([
|
|
|
+ {
|
|
|
+ target:'[data-v-step="1"]',
|
|
|
+ header:{
|
|
|
+ title:'<div style="color: white;background: #4c8dff;display: inline;font-size: 15px;' +
|
|
|
+ 'border-radius:10px 10px 0 0;padding:5px 20px 0 10px;font-weight:bolder;">' +
|
|
|
+ '| “一框式”检索<span style="padding-left: 250px;">1/3</span></div>'
|
|
|
+ },
|
|
|
+ content:'<div style="color: white;background: #4c8dff;display: inline;width:405px;font-size: 12px;' +
|
|
|
+ 'border-radius:0 0 10px 10px;position: absolute;top:48px;padding:0px 15px 0px 15px;">' +
|
|
|
+ '综合搜索栏,将检索功能浓缩至"一框"中。可直接输入多种类型的' +
|
|
|
+ '关键词如井号、井名、生产作业名词到检索框中进行搜索;同时支持输入运算符“大于""等于""少于”“不等于”进行检索词的组合运算<br/>' +
|
|
|
+ '<br/>点击“更多查询"可查看更多检索条件</div>',
|
|
|
+ params:{
|
|
|
+ placement:'right'
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ target:'[data-v-step="2"]',
|
|
|
+ header:{
|
|
|
+ title:'<div style="color: white;background: #4c8dff;display: inline;font-size: 15px;' +
|
|
|
+ 'border-radius:10px 10px 0 0;padding:5px 20px 0 10px;font-weight:bolder;">' +
|
|
|
+ '| 检索控制条件<span style="padding-left: 250px;">2/3</span></div>',
|
|
|
+ },
|
|
|
+ content:'<div style="color: white;background: #4c8dff;display: inline;width:405px;font-size: 12px;' +
|
|
|
+ 'border-radius:0 0 10px 10px;position: absolute;top:48px;padding:5px 15px 0px 15px;height:40px;">' +
|
|
|
+ '可选择控件条件进行查询范围的缩窄<br/></div>',
|
|
|
+ params:{
|
|
|
+ placement:'right'
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ target:'[data-v-step="3"]',
|
|
|
+ header:{
|
|
|
+ title:'<div style="color: white;background: #4c8dff;display: inline;font-size: 15px;' +
|
|
|
+ 'border-radius:10px 10px 0 0;padding:5px 20px 0 10px;font-weight:bolder;">' +
|
|
|
+ '| 多个检索项组合查询<span style="padding-left: 205px;">3/3</span></div>',
|
|
|
+ },
|
|
|
+ content:'<div style="color: white;background: #4c8dff;display: inline;width:405px;font-size: 12px;' +
|
|
|
+ 'border-radius:0 0 10px 10px;position: absolute;top:48px;padding:5px 15px 0px 15px;">' +
|
|
|
+ '1.首先须在下拉框中选择“井号"或“井名"的类别,输入想搜索的井<br/>' +
|
|
|
+ '2.再从下拉框中选择其他检索项如“产油量"等,输入该检索项具体<br/>' +
|
|
|
+ '要查询的值。例如想查看并号为001的产油量等于100的查询结果。<br/>' +
|
|
|
+ '3.支持自由选择检索项间的逻辑关系:<br/>' +
|
|
|
+ 'AND(与)、OR(或)、NOT(非)<br/><br/>' +
|
|
|
+ '举例:<br/>' +
|
|
|
+ '1) 检索井名包含12和产油量为100的结果<br/>' +
|
|
|
+ '<span style="padding-left: 20px;">检索式: 井名 12 AND 产油量100</span><br/>' +
|
|
|
+ '2) 检索井名包含12但不查地形区为益地的结果<br/>' +
|
|
|
+ '<span style="padding-left: 20px;">检索式: 井名 12 NOT 地形区 盆地</span><br/>' +
|
|
|
+ '3) 检索井名为12-12或12-44的31<br/>' +
|
|
|
+ '<span style="padding-left: 20px;">检索式: 井名 12-12 0R 井名 12-44</span></div>',
|
|
|
+ params:{
|
|
|
+ placement:'right'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]);
|
|
|
+ const myOptions = reactive({
|
|
|
+ dialogVisible:false,
|
|
|
+ useKeyboardNavigation:false,
|
|
|
+ labels:{
|
|
|
+ buttonSkip:' 跳过引导 ',
|
|
|
+ buttonPrevious:' 上一步 ',
|
|
|
+ buttonNext:'下一步 ',
|
|
|
+ buttonStop:' 明白了 '
|
|
|
+ }
|
|
|
+ });
|
|
|
+ const showOverlay = ref(true);
|
|
|
+
|
|
|
+ const myCallbacks = ref({
|
|
|
+ onPreviousStep(){
|
|
|
+ showOverlay.value = true;
|
|
|
+ loadStyle();
|
|
|
+ },
|
|
|
+ onNextStep(){
|
|
|
+ showOverlay.value = true;
|
|
|
+ loadStyle();
|
|
|
+ },onStop:async function(){
|
|
|
+ showOverlay.value = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
const limiters = ref([{
|
|
|
fields: '',
|
|
@@ -109,8 +191,23 @@ export default defineComponent({
|
|
|
}, {}
|
|
|
);
|
|
|
|
|
|
- const formRef = ref<FormInstance>();
|
|
|
+ function loadStyle(){
|
|
|
+ setTimeout(()=>{
|
|
|
+ const $divs = document.getElementsByClassName("v-step__buttons");
|
|
|
+ for(let i=0;i < $divs.length;i++) {
|
|
|
+ const div = $divs[i];
|
|
|
+ div.setAttribute("style","background-color:#4c8dff;color:white;height:30px;width:100%;" +
|
|
|
+ "position: relative;top:-5px;padding-top:4px;");
|
|
|
+ }
|
|
|
+ const $buttons = document.getElementsByClassName("v-step__button");
|
|
|
+ for(let i=0;i < $buttons.length;i++) {
|
|
|
+ const button = $buttons[i];
|
|
|
+ button.setAttribute("style","border:1px solid white;margin:0 10px 0 20px;padding:0 4px 0 4px;border-radius:5px;");
|
|
|
+ }
|
|
|
+ },1);
|
|
|
+ }
|
|
|
|
|
|
+ const formRef = ref<FormInstance>();
|
|
|
|
|
|
const operTexts = [
|
|
|
{value: 'AND', label: 'AND'},
|
|
@@ -150,13 +247,33 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
- formState, limiters, operTexts, fieldList, addQuery, onDelete, getQuery, formRef
|
|
|
+ formState, limiters, operTexts, fieldList, addQuery, onDelete, getQuery, formRef,
|
|
|
+ steps,myOptions,curTour,showOverlay,loadStyle,myCallbacks
|
|
|
};
|
|
|
+ },
|
|
|
+ mounted(){
|
|
|
+ const internalInstance = getCurrentInstance();
|
|
|
+ this.curTour = internalInstance?.appContext.config.globalProperties.$tours;
|
|
|
+ if(this.curTour && this.curTour['myTour'] && this.formState.showMoreQuery){
|
|
|
+ (this.curTour['myTour'] as any).start();
|
|
|
+ }
|
|
|
+
|
|
|
+ },beforeMount() {
|
|
|
+ this.loadStyle();
|
|
|
}
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
+#mask{
|
|
|
+ width:100%;
|
|
|
+ height:100%;
|
|
|
+ position: fixed;
|
|
|
+ background: gray;
|
|
|
+ opacity: 0.2;
|
|
|
+ z-index: 100;
|
|
|
+}
|
|
|
+
|
|
|
.ant-row {
|
|
|
|
|
|
.ant-col {
|