[add] 文档对比迁移

This commit is contained in:
lideqin
2023-08-17 19:18:16 +08:00
parent e0cc6e726f
commit 9f86c9bbb7
13 changed files with 3233 additions and 284 deletions
+136 -215
View File
@@ -4,165 +4,146 @@
<a-col :md="(24 / (minLength + 1))" :sm="(24 / minLength)" v-for="(item,index) in searchList" :key="index" style="line-height: 48px">
<template v-if="index < minLength">
<!-- 树形选择器 -->
<div class="box-title-text" v-if="item.field_show_type === FieldType.TREE.value">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<a-tree-select
tree-node-filter-prop="title"
class="box-input"
v-model="queryParam[item.db_field_name]"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
:tree-data="item.tree"
tree-checkable
:placeholder="$t('pleaseSelect')+item.db_field_txt"
/>
</div>
<template v-if="item.field_show_type === FieldType.TREE.value">
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
tree-node-filter-prop="title"
v-model="queryParam[item.db_field_name]"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
:tree-data="item.tree"
tree-checkable
:placeholder="$t('pleaseSelect')+item.db_field_txt"
/>
</a-form-item>
</template>
<!-- 输入框 -->
<div class="box-title-text"
<template
v-else-if="[FieldType.TEXT_STRING.value, FieldType.TEXT.value,FieldType.PERSON.value,
FieldType.STANDARD.value, FieldType.TEXT_LINK.value].includes(item.field_show_type)">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<a-input class="box-input" :placeholder="$t('pleaseEnter')+item.db_field_txt"
v-model="queryParam[item.db_field_name]"></a-input>
</div>
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+item.db_field_txt"
v-model="queryParam[item.db_field_name]"></a-input>
</a-form-item>
</template>
<!-- 数字输入框 -->
<div class="box-title-text" v-else-if="item.field_show_type === FieldType.TEXT_NUMBER.value">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<a-input-number class="box-input" :placeholder="$t('pleaseEnter')+item.db_field_txt"
v-model="queryParam[item.db_field_name]" :min="1" :max="99999999"/>
</div>
<template v-else-if="item.field_show_type === FieldType.TEXT_NUMBER.value">
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-number :placeholder="$t('pleaseEnter')+item.db_field_txt"
v-model="queryParam[item.db_field_name]" :min="1" :max="99999999"/>
</a-form-item>
</template>
<!-- 字典多选框 -->
<div class="box-title-text" v-else-if="item.field_show_type === FieldType.PULL_MORE.value">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<j-multi-select-tag class="box-input" v-model="queryParam[item.db_field_name]"
:placeholder="$t('pleaseSelect')+item.db_field_txt" :type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
</div>
<template v-else-if="item.field_show_type === FieldType.PULL_MORE.value">
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-multi-select-tag v-model="queryParam[item.db_field_name]"
:placeholder="$t('pleaseSelect')+item.db_field_txt" :type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
</a-form-item>
</template>
<!-- 日期区间 -->
<div class="box-title-text" v-else-if="[FieldType.DATE_SINGLE.value, FieldType.DATE_MORE.value].includes(item.field_show_type)">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<a-range-picker class="box-input" v-model="queryParam[item.db_field_name]"
:placeholder="$t('pleaseSelect')+item.db_field_txt"
format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="onChange(item.db_field_name)"></a-range-picker>
</div>
<tempalet v-else-if="[FieldType.DATE_SINGLE.value, FieldType.DATE_MORE.value].includes(item.field_show_type)">
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker v-model="queryParam[item.db_field_name]"
:placeholder="$t('pleaseSelect')+item.db_field_txt"
format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="onChange(item.db_field_name)"></a-range-picker>
</a-form-item>
</tempalet>
<!-- 字典单选框 -->
<div class="box-title-text" v-else-if="item.field_show_type === FieldType.PULL_SINGLE.value">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam[item.db_field_name]"
:placeholder="$t('pleaseSelect')+item.db_field_txt"
:type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
</div>
<template v-else-if="item.field_show_type === FieldType.PULL_SINGLE.value">
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag v-model="queryParam[item.db_field_name]"
:placeholder="$t('pleaseSelect')+item.db_field_txt"
:type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
</a-form-item>
</template>
<!-- 单选框 -->
<!-- <div class="box-title-text" v-else-if="item.field_show_type === '12'">-->
<!-- <div class="title-text" :title="item.db_field_txt">-->
<!-- <span>{{item.db_field_txt}}</span>-->
<!-- </div>-->
<!-- <a-select :placeholder="$t('pleaseSelect')+item.db_field_txt"-->
<!-- class="box-input"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- allowClear-->
<!-- v-model="queryParam[item.db_field_name]">-->
<!-- <a-select-option v-for="(item, key) in item.option"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </div>-->
<!-- <template v-else-if="item.field_show_type === '12'">-->
<!-- <a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
<!-- <a-select :placeholder="$t('pleaseSelect')+item.db_field_txt"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- allowClear-->
<!-- v-model="queryParam[item.db_field_name]">-->
<!-- <a-select-option v-for="(item, key) in item.option"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </a-form-item>-->
<!-- </template>-->
</template>
<template v-if="index >= minLength && toggleSearchStatus">
<div class="box-title-text" v-if="item.field_show_type === FieldType.TREE.value">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<a-tree-select
tree-node-filter-prop="title"
class="box-input"
v-model="queryParam[item.db_field_name]"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
:tree-data="item.tree"
tree-checkable
:placeholder="$t('pleaseSelect')+item.db_field_txt"
/>
</div>
<div class="box-title-text" v-else-if="[FieldType.TEXT_STRING.value, FieldType.TEXT.value,FieldType.PERSON.value,
<template v-if="item.field_show_type === FieldType.TREE.value">
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
tree-node-filter-prop="title"
v-model="queryParam[item.db_field_name]"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
:tree-data="item.tree"
tree-checkable
:placeholder="$t('pleaseSelect')+item.db_field_txt"
/>
</a-form-item>
</template>
<template v-else-if="[FieldType.TEXT_STRING.value, FieldType.TEXT.value,FieldType.PERSON.value,
FieldType.STANDARD.value, FieldType.TEXT_LINK.value].includes(item.field_show_type)">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<a-input class="box-input" :placeholder="$t('pleaseEnter')+item.db_field_txt"
v-model="queryParam[item.db_field_name]"></a-input>
</div>
<div class="box-title-text" v-else-if="item.field_show_type === FieldType.TEXT_NUMBER.value">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<a-input-number class="box-input" :placeholder="$t('pleaseEnter')+item.db_field_txt"
v-model="queryParam[item.db_field_name]" :min="1" :max="99999999"/>
</div>
<div class="box-title-text" v-else-if="item.field_show_type === FieldType.PULL_MORE.value">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<j-multi-select-tag class="box-input" v-model="queryParam[item.db_field_name]"
:placeholder="$t('pleaseSelect')+item.db_field_txt" :type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
</div>
<div class="box-title-text" v-else-if="[FieldType.DATE_SINGLE.value, FieldType.DATE_MORE.value].includes(item.field_show_type)">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<a-range-picker class="box-input" v-model="queryParam[item.db_field_name]"
format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="onChange(item.db_field_name)"></a-range-picker>
</div>
<div class="box-title-text" v-else-if="item.field_show_type === FieldType.PULL_SINGLE.value">
<div class="title-text" :title="item.db_field_txt">
<span>{{item.db_field_txt}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam[item.db_field_name]"
:placeholder="$t('pleaseSelect')+item.db_field_txt"
:type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
</div>
<!-- <div class="box-title-text" v-else-if="item.field_show_type === '12'">-->
<!-- <div class="title-text" :title="item.db_field_txt">-->
<!-- <span>{{item.db_field_txt}}</span>-->
<!-- </div>-->
<!-- <a-select :placeholder="$t('pleaseSelect')+item.db_field_txt"-->
<!-- class="box-input"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- allowClear-->
<!-- v-model="queryParam[item.db_field_name]">-->
<!-- <a-select-option v-for="(item, key) in item.option"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </div>-->
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+item.db_field_txt"
v-model="queryParam[item.db_field_name]"></a-input>
</a-form-item>
</template>
<template v-else-if="item.field_show_type === FieldType.TEXT_NUMBER.value">
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-number :placeholder="$t('pleaseEnter')+item.db_field_txt"
v-model="queryParam[item.db_field_name]" :min="1" :max="99999999"/>
</a-form-item>
</template>
<template v-else-if="item.field_show_type === FieldType.PULL_MORE.value">
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-multi-select-tag v-model="queryParam[item.db_field_name]"
:placeholder="$t('pleaseSelect')+item.db_field_txt" :type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
</a-form-item>
</template>
<template v-else-if="[FieldType.DATE_SINGLE.value, FieldType.DATE_MORE.value].includes(item.field_show_type)">
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker v-model="queryParam[item.db_field_name]"
format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="onChange(item.db_field_name)"></a-range-picker>
</a-form-item>
</template>
<template v-else-if="item.field_show_type === FieldType.PULL_SINGLE.value">
<a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag v-model="queryParam[item.db_field_name]"
:placeholder="$t('pleaseSelect')+item.db_field_txt"
:type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
</a-form-item>
</template>
<!-- <template v-else-if="item.field_show_type === '12'">-->
<!-- <a-form-item :label="item.db_field_txt" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
<!-- <a-select :placeholder="$t('pleaseSelect')+item.db_field_txt"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- allowClear-->
<!-- v-model="queryParam[item.db_field_name]">-->
<!-- <a-select-option v-for="(item, key) in item.option"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </a-form-item>-->
<!-- </template>-->
</template>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
@@ -170,8 +151,8 @@
{{ !toggleSearchStatus ? $t('open') : $t('putAway') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
</a-col>
</span>
</a-row>
@@ -215,7 +196,13 @@ export default {
FieldType,
queryParam: {},
toggleSearchStatus: false,
searchList: []
searchList: [],
labelCol: {
span: 6
},
wrapperCol: {
span: 14
}
}
},
mounted () {
@@ -331,70 +318,4 @@ export default {
</script>
<style scoped lang="less">
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
.title-text {
width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
/*min-width: 200px;*/
display: inline-block;
width: calc(100% - 116px);
height: 38px;
margin-top: 2px;
/deep/ .ant-select-selection--single {
height: 38px;
}
/deep/ .ant-select-selection--multiple {
height: 38px;
.ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
}
/deep/ .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
/deep/ .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
/deep/ .ant-calendar-picker-input {
height: 38px;
}
/deep/ .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
/deep/ .ant-select-tree {
width: auto;
height: 300px;
overflow: auto;
position: absolute;
/*background: #fff;*/
}
/deep/ .ant-select-tree-dropdown {
min-height: 320px;
}
}
</style>