|
@@ -11,27 +11,24 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
- import { reactive, ref, defineEmits, defineProps, computed, getCurrentInstance } from 'vue';
|
|
|
|
|
|
|
+ import { reactive, ref, defineEmits, computed } from 'vue';
|
|
|
import ProSearch from '@/components/CommonPage/ProSearch2.vue';
|
|
import ProSearch from '@/components/CommonPage/ProSearch2.vue';
|
|
|
|
|
|
|
|
defineOptions({ name: 'page-search' });
|
|
defineOptions({ name: 'page-search' });
|
|
|
|
|
|
|
|
- const props = defineProps({
|
|
|
|
|
- status: {
|
|
|
|
|
- type: String,
|
|
|
|
|
- default: ''
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
const emit = defineEmits(['search']);
|
|
const emit = defineEmits(['search']);
|
|
|
const searchRef = ref(null);
|
|
const searchRef = ref(null);
|
|
|
|
|
|
|
|
// 初始值
|
|
// 初始值
|
|
|
const initKeys = reactive({
|
|
const initKeys = reactive({
|
|
|
isbn: '',
|
|
isbn: '',
|
|
|
- processor: '',
|
|
|
|
|
- isPush: '',
|
|
|
|
|
- pushStatus: props.status,
|
|
|
|
|
|
|
+ operateUser: '',
|
|
|
|
|
+ pushStatus: '',
|
|
|
|
|
+ pushRes: '',
|
|
|
|
|
+ createTimeStart: '',
|
|
|
|
|
+ createTimeEnd: '',
|
|
|
|
|
+ pushTimeStart: '',
|
|
|
|
|
+ pushTimeEnd: '',
|
|
|
createTimeRange: [],
|
|
createTimeRange: [],
|
|
|
pushTimeRange: []
|
|
pushTimeRange: []
|
|
|
});
|
|
});
|
|
@@ -42,53 +39,61 @@
|
|
|
{
|
|
{
|
|
|
type: 'input',
|
|
type: 'input',
|
|
|
label: 'ISBN',
|
|
label: 'ISBN',
|
|
|
- prop: 'isbn'
|
|
|
|
|
|
|
+ prop: 'bookIsbn'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
type: 'input',
|
|
type: 'input',
|
|
|
label: '处理人',
|
|
label: '处理人',
|
|
|
- prop: 'processor'
|
|
|
|
|
|
|
+ prop: 'operateUser'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- type: 'select',
|
|
|
|
|
|
|
+ type: 'dictSelect',
|
|
|
label: '是否推送',
|
|
label: '是否推送',
|
|
|
- prop: 'isPush',
|
|
|
|
|
- options: [
|
|
|
|
|
- { label: '是', value: '是' },
|
|
|
|
|
- { label: '否', value: '否' }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ prop: 'pushStatus',
|
|
|
|
|
+ props: {
|
|
|
|
|
+ code: 'book_stat_is_push'
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- type: 'select',
|
|
|
|
|
|
|
+ type: 'dictSelect',
|
|
|
label: '推送状态',
|
|
label: '推送状态',
|
|
|
- prop: 'pushStatus',
|
|
|
|
|
- options: [
|
|
|
|
|
- { label: '成功', value: '成功' },
|
|
|
|
|
- { label: '失败', value: '失败' },
|
|
|
|
|
- { label: '系统错误', value: '系统错误' },
|
|
|
|
|
- { label: '无数据', value: '无数据' }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ prop: 'pushRes',
|
|
|
|
|
+ props: {
|
|
|
|
|
+ code: 'book_stat_push_status'
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- type: 'daterange',
|
|
|
|
|
|
|
+ type: 'datetimerange',
|
|
|
label: '创建时间',
|
|
label: '创建时间',
|
|
|
prop: 'createTimeRange',
|
|
prop: 'createTimeRange',
|
|
|
props: {
|
|
props: {
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
- rangeSeparator: '到',
|
|
|
|
|
|
|
+ format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
startPlaceholder: '开始日期',
|
|
startPlaceholder: '开始日期',
|
|
|
- endPlaceholder: '结束日期'
|
|
|
|
|
|
|
+ endPlaceholder: '结束日期',
|
|
|
|
|
+ onChange: (value) => {
|
|
|
|
|
+ initKeys.createTimeStart = value ? value[0] : '';
|
|
|
|
|
+ initKeys.createTimeEnd = value ? value[1] : '';
|
|
|
|
|
+ initKeys.createTimeRange = value || [];
|
|
|
|
|
+ searchRef.value?.setData(initKeys);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- type: 'daterange',
|
|
|
|
|
|
|
+ type: 'datetimerange',
|
|
|
label: '推送时间',
|
|
label: '推送时间',
|
|
|
prop: 'pushTimeRange',
|
|
prop: 'pushTimeRange',
|
|
|
props: {
|
|
props: {
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
- rangeSeparator: '到',
|
|
|
|
|
|
|
+ format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
startPlaceholder: '开始日期',
|
|
startPlaceholder: '开始日期',
|
|
|
- endPlaceholder: '结束日期'
|
|
|
|
|
|
|
+ endPlaceholder: '结束日期',
|
|
|
|
|
+ onChange: (value) => {
|
|
|
|
|
+ initKeys.pushTimeStart = value ? value[0] : '';
|
|
|
|
|
+ initKeys.pushTimeEnd = value ? value[1] : '';
|
|
|
|
|
+ initKeys.pushTimeRange = value || [];
|
|
|
|
|
+ searchRef.value?.setData(initKeys);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
];
|
|
];
|
|
@@ -96,21 +101,9 @@
|
|
|
|
|
|
|
|
// 搜索
|
|
// 搜索
|
|
|
const search = (data) => {
|
|
const search = (data) => {
|
|
|
- const params = { ...data };
|
|
|
|
|
-
|
|
|
|
|
- // 处理时间范围
|
|
|
|
|
- if (params.createTimeRange && params.createTimeRange.length) {
|
|
|
|
|
- params.createTimeStart = params.createTimeRange[0];
|
|
|
|
|
- params.createTimeEnd = params.createTimeRange[1];
|
|
|
|
|
- delete params.createTimeRange;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (params.pushTimeRange && params.pushTimeRange.length) {
|
|
|
|
|
- params.pushTimeStart = params.pushTimeRange[0];
|
|
|
|
|
- params.pushTimeEnd = params.pushTimeRange[1];
|
|
|
|
|
- delete params.pushTimeRange;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ const params = JSON.parse(JSON.stringify(data));
|
|
|
|
|
+ delete params.createTimeRange;
|
|
|
|
|
+ delete params.pushTimeRange;
|
|
|
emit('search', params);
|
|
emit('search', params);
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|