|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
<div v-if="showOverlay" style="position: fixed;top: 0;left: 0;width: 100vw;height: 100vh;background-color: rgba(0, 0, 0, 0.5);z-index: 999; "></div>
|
|
|
<div class="query-index">
|
|
|
- <div style="margin:auto;width: 600px;" data-v-step="1">
|
|
|
+ <div data-v-step="1" :style="showOverlay && curStepVal==1?'margin:auto;width:660px;padding:10px; z-index:1000;display:inline-block;height:50px;background:white;':'margin:auto;width: 600px;padding:10px;'" >
|
|
|
<a-space >
|
|
|
<QueryHistoryComplete id="keyName" 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>
|
|
|
- <v-tour name="myTour" style="z-index: 10000;" :steps="steps" :options="myOptions" :callbacks="myCallbacks"></v-tour>
|
|
|
+ <v-tour name="myTour" style="z-index: 1000;" :steps="steps" :options="myOptions" :callbacks="myCallbacks"></v-tour>
|
|
|
<a-divider orientation="center" @click="formState.showMoreQuery=!formState.showMoreQuery;" >
|
|
|
<template v-if="!formState.showMoreQuery" >
|
|
|
更多查询
|
|
@@ -19,45 +19,49 @@
|
|
|
<DoubleLeftOutlined rotate="90"/>
|
|
|
</template>
|
|
|
</a-divider>
|
|
|
- <div style="margin:auto;width: 500px;min-height:700px;" v-show="formState.showMoreQuery">
|
|
|
- <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>
|
|
|
+ <div data-v-step="2" v-show="formState.showMoreQuery"
|
|
|
+ :style="showOverlay && curStepVal==2?'margin:auto;width:500px;padding:10px 10px 10px 50px; z-index:1000;display:inline-block;height:390px;background:white;':'margin:auto;width: 500px;padding:10px 10px 10px 50px;'" >
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+ <div data-v-step="3" v-show="formState.showMoreQuery"
|
|
|
+ :style="showOverlay && curStepVal==3?'margin:auto;width:500px;padding:10px; z-index:1000;display:inline-block;min-height:200px;background:white;':'margin:auto;width: 500px;padding:10px;'" >
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
import {defineComponent, ref,reactive, watch,getCurrentInstance} from 'vue';
|
|
|
-import type {FormInstance, SelectProps} from "ant-design-vue";
|
|
|
+import {type FormInstance, message, type SelectProps} from "ant-design-vue";
|
|
|
import QueryHistoryComplete from '@/components/basic/querylog/history-complete.vue';
|
|
|
import {show} from "dom7";
|
|
|
|
|
@@ -115,13 +119,14 @@ export default defineComponent({
|
|
|
header:{
|
|
|
title:'<div style="height: 0;border-top: 12px solid transparent; border-bottom: 15px solid transparent;' +
|
|
|
'border-left: 15px solid transparent;border-right: 12px solid #4c8dff;' +
|
|
|
- 'position:absolute;right:450px;top:11px;"></div>' +
|
|
|
+ 'position:absolute;right:450px;bottom:11px;"></div>' +
|
|
|
'<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;">' +
|
|
|
+ 'border-radius:10px 10px 0 0;padding:5px 20px 0 10px;font-weight:bolder;' +
|
|
|
+ 'position:relative;bottom:200px;">' +
|
|
|
'| 多个检索项组合查询<span style="padding-left: 250px;">3/3</span></div>',
|
|
|
},
|
|
|
content:'<div style="color: white;background: #4c8dff;display: inline;width:450px;font-size: 14px;' +
|
|
|
- 'border-radius:0 0 10px 10px;position: absolute;top:48px;padding:5px 15px 0px 15px;">' +
|
|
|
+ 'border-radius:0 0 10px 10px;position: absolute;bottom:-89px;padding:5px 15px 0px 15px;">' +
|
|
|
'1.首先须在下拉框中选择“井号"或“井名"的类别,输入想搜索的井<br/>' +
|
|
|
'2.再从下拉框中选择其他检索项如“产油量"等,输入该检索项具体<br/>' +
|
|
|
'要查询的值。例如想查看并号为001的产油量等于100的查询结果。<br/>' +
|
|
@@ -149,15 +154,20 @@ export default defineComponent({
|
|
|
buttonStop:' 明白了 '
|
|
|
}
|
|
|
});
|
|
|
- const showOverlay = ref<boolean>(true);
|
|
|
+
|
|
|
+ const curStepVal = ref(1);
|
|
|
+ const showOverlay = ref<boolean>(false);
|
|
|
|
|
|
const myCallbacks = ref({
|
|
|
onPreviousStep(){
|
|
|
+ curStepVal.value -=1;
|
|
|
loadStyle();
|
|
|
},
|
|
|
onNextStep(){
|
|
|
+ curStepVal.value +=1;
|
|
|
loadStyle();
|
|
|
},onStop:async function(){
|
|
|
+ curStepVal.value =1;
|
|
|
showOverlay.value = false;
|
|
|
const $input = document.getElementById('keyName');
|
|
|
$input?.focus();
|
|
@@ -211,8 +221,13 @@ export default defineComponent({
|
|
|
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:-2px;padding-top:4px;");
|
|
|
+ if(curStepVal.value==3){
|
|
|
+ div.setAttribute("style","background-color:#4c8dff;color:white;height:30px;width:100%;" +
|
|
|
+ "position: relative;top:-202px;padding-top:4px;");
|
|
|
+ }else{
|
|
|
+ div.setAttribute("style","background-color:#4c8dff;color:white;height:30px;width:100%;" +
|
|
|
+ "position: relative;top:-2px;padding-top:4px;");
|
|
|
+ }
|
|
|
}
|
|
|
const $buttons = document.getElementsByClassName("v-step__button");
|
|
|
for(let i=0;i < $buttons.length;i++) {
|
|
@@ -245,6 +260,13 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
function getQuery() {
|
|
|
+
|
|
|
+ if(showOverlay.value){
|
|
|
+ message.warn('请退出引导状态再进行操作!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ showOverlay.value = false;
|
|
|
+
|
|
|
//组装查询条件
|
|
|
let queryObject = {
|
|
|
queryList: [] as any,
|
|
@@ -263,14 +285,21 @@ export default defineComponent({
|
|
|
|
|
|
return {
|
|
|
formState, limiters, operTexts, fieldList, addQuery, onDelete, getQuery, formRef,
|
|
|
- steps,myOptions,curTour,showOverlay,loadStyle,myCallbacks
|
|
|
+ steps,myOptions,curTour,curStepVal,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();
|
|
|
+ const localData = localStorage.getItem('myTourShow');
|
|
|
+ const curTour = localData?JSON.parse(localData):null;
|
|
|
+ if(curTour==null||!curTour.ifShowed){
|
|
|
+ (this.curTour['myTour'] as any).start();
|
|
|
+ this.showOverlay = true;
|
|
|
+ const curLocalData = JSON.stringify({ifShowed:true});
|
|
|
+ localStorage.setItem('myTourShow',curLocalData);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
},beforeMount() {
|