From c43b9d04dea89ee0adf731ce46c4f48eed11ffb9 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 18 九月 2023 10:34:48 +0800
Subject: [PATCH] 代码提交
---
Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue | 114 +++++++++++++++++++++++++-------------------------------
1 files changed, 51 insertions(+), 63 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue b/Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue
index 76e9e0c..fa4fa40 100644
--- a/Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue
+++ b/Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue
@@ -4,24 +4,29 @@
3銆佺敤鎴疯緭鍏ョ殑鍊间細浠onditionMap[field]鐨勬牸寮忔嫾鎺ュソ杩涜鍥炰紶锛岀劧鍚庡氨闇�瑕佷娇鐢ㄧ殑鍦版柟鑷杩涜鏌ヨ鐨勮皟鐢紱
-->
<template>
- <el-dialog
+ <el-dialog
title="楂樼骇鏌ヨ"
append-to-body
- width="55vw"
- style="height: 115vh; margin-top: -10vh; overflow: hidden"
+ width="46vw"
+ style="height: 100vh;overflow: hidden"
+ v-dialogDrag
:visible.sync="isShowDialog"
+ lock-scroll
+ class="avue-dialog avue-dialog--top"
+ top="-3%"
+ destroy-on-close
@close="recoverPage">
<div class="search-total">
<!-- 澶撮儴鎸夐挳鍖哄煙 -->
- <div slot="title" class="dialog-search-button">
- <el-button
- type="primary"
+ <div slot="title" class="dialog-search-button">
+ <el-button
+ type="primary"
size="small"
icon="el-icon-search"
@click="searchSubmit">
鏌ヨ
</el-button>
- <el-button
+ <el-button
type="warning"
size="small"
icon="el-icon-refresh"
@@ -31,11 +36,11 @@
</div>
<!-- 椤甸潰涓讳綋鍐呭鍖哄煙 -->
<div class="search-content">
- <el-row
+ <el-row
v-for="(item,index) in initOptions"
:key="item.queryField"
:span="24">
- <el-col :span="5">
+ <el-col :span="6">
<div class="grid-content">
<el-select disabled placeholder="璇烽�夋嫨" v-model="searchFormArrays[index].queryField">
<el-option
@@ -65,9 +70,9 @@
<el-select v-else-if="item.fieldType==='combox'" v-model="searchFormArrays[index].fieldValue" placeholder="璇烽�夋嫨">
<el-option
v-for="option in item.data"
- :key="option.itemValue"
- :label="option.itemName"
- :value="option.itemValue">
+ :key="option.itemValue || option.value"
+ :label="option.itemName || option.label"
+ :value="option.itemValue || option.value">
</el-option>
</el-select>
<el-switch v-else-if="item.fieldType==='truefalse'" v-model="searchFormArrays[index].fieldValue"></el-switch>
@@ -86,7 +91,7 @@
</vci-web-refer>
</div>
</el-col>
- <el-col :span="2">
+ <el-col :span="1">
<div class="grid-content">
<i class="el-icon-close" @click="removeInput(index)"></i>
</div>
@@ -172,7 +177,7 @@
label: "涓嶇瓑浜�",
},{
value: "_ge", //澶т簬锛岄粯璁や负澶т簬绛変簬
- label: "澶т簬",
+ label: "澶т簬",
},{
value: "_le", //灏忎簬锛岄粯璁や负灏忎簬绛変簬
label: "灏忎簬",
@@ -203,8 +208,8 @@
let array = [];
this.initOptions.forEach((item,index) => {
if(item.fieldType==='combox') {
- let enumCach = JSON.parse(localStorage.getItem(item.comboxKey));
- if(enumCach != null) {
+ let enumCach = item.data || JSON.parse(localStorage.getItem(item.comboxKey));
+ if(enumCach != null && enumCach.length > 0) {
item.data = enumCach;
}else {
getDictionary({code: item.comboxKey}).then(res=>{
@@ -221,22 +226,22 @@
options: Object.assign(item.referConfig,{width:"80%"}),
})
//console.log(item.referConfigData.options);
- //console.log(item);
+ //console.log(item);
}
// TODO: 杩欏効淇敼涓�涓嬪弬鐓х殑鏌ヨ鏉′欢
let conditions = [];
if(item.fieldType==='text'){
conditions = this.searchConditions;
- }else if (item.fieldType==='combox'){
- conditions = this.dateConditions;
+ }else if (item.fieldType==='combox'|| item.fieldType==='truefalse'){
+ conditions = this.switchSearchConditions;
}else if (item.fieldType==='datetime') {
- conditions = this.switchSearchConditions;
+ conditions = this.dateConditions;
}else {
conditions = this.referSearchConditions;
}
// console.log(conditions);
this.$set(item,"conditions",conditions)
-
+
let add = {
queryField: String(item.queryField),
condition: item.fieldType==='text' ? String("_like"):String("_equal"),
@@ -252,13 +257,10 @@
/** 涓哄弬鐓х被鍨嬫椂鍊奸�夋嫨涔嬪悗鐨勫鐞� */
setReferValue(data,index){
- // console.log(index);
if(data.field) {
this.searchFormArrays[index][data.fieldValue] = data.value || '';
this.initOptions[index][data.showField] = data.text || '';
}
- // console.log(this.initOptions[index][data.showField]);
- // console.log(data);
},
// 灞炴�у垏鎹㈡椂鏌ヨ鏉′欢鍜屾煡璇㈠�间篃闇�瑕佸杈撳叆妗嗚繘琛屽垏鎹�
@@ -286,7 +288,7 @@
// },
// 绉婚櫎鎼滅储妗�
-
+
removeInput(index){
//console.log(this.initOptions);
this.$delete(this.initOptions,index);
@@ -322,32 +324,18 @@
console.log(condtionParam);
this.$emit('echoContion',condtionParam)
this.isShowDialog = false;
- },
+ },
}
}
</script>
<style lang="scss" scoped>
-
.search-total {
- border-radius: 4px;
- min-height: 70vh;
- // margin-left: 35px;
- margin-top: -8px;
- overflow-y: auto;
- height: 70vh;
+ border-radius: 4px;
+ margin-top: -10px;
}
.dialog-search-button {
- border-top: 1px solid #E9E7E7;
- border-bottom: 1px solid #E9E7E7;
- padding: 10px 10px 10px;
- position: fixed;
- display: block;
- background-color: #fff;
- // top: 10%;
- margin-top: -30px;
- width: 50%;
- z-index: 1000;
+ margin-bottom: 15px;
}
// .search-total > .search-content > .el-row{
// margin-bottom: 5px;
@@ -356,39 +344,39 @@
// }
// }
.search-total > .search-content {
- margin-top: 40px;
}
.search-total > .search-content > .el-row > .el-col {
- border-radius: 4px;
+ border-radius: 4px;
}
.search-total > .search-content > .el-row > .el-col > .grid-content {
- border-radius: 4px;
- min-height: 36px;
+ border-radius: 4px;
+ min-height: 36px;
}
.search-total > .search-content > .el-row > .el-col {
- margin-right: 6px;
- &:last-child {
- margin-right: 0;
- }
+ margin-right: 6px;
+ &:last-child {
+ margin-right: 0;
+ }
}
.grid-content > .el-icon-close {
- font-size: 35px;
- cursor: pointer;
- color: rgb(222, 130, 105);
+ font-size: 30px;
+ line-height: 40px;
+ cursor: pointer;
+ color: rgb(222, 130, 105);
}
- .grid-content > .el-icon-close:hover{
- font-size: 38px;
- color: rgb(219, 52, 6);
+ .grid-content > .el-icon-close:hover {
+ font-size: 30px;
+ color: rgb(219, 52, 6);
}
.grid-content > .el-select {
- width: 100%;
+ width: 100%;
}
.grid-content > .el-switch {
- line-height: 40px;
- height: 40px;
+ line-height: 40px;
+ height: 40px;
}
- .grid-content > .el-date-editor.el-input, .el-date-editor.el-input__inner{
- width: 100%;
+ .grid-content > .el-date-editor.el-input, .el-date-editor.el-input__inner {
+ width: 100%;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3