日志按创建时间排序、源数据模糊查询
This commit is contained in:
parent
0e5ef66357
commit
747e27f11b
|
@ -4,6 +4,43 @@
|
|||
<div class="chunk" :class="{acivted:activeName==='1'}" @click="tabsHandleClick('1')">下发日志</div>
|
||||
<div class="chunk" :class="{acivted:activeName==='2'}" @click="tabsHandleClick('2')">写入日志</div>
|
||||
</div>
|
||||
<div class="search-container">
|
||||
<el-input
|
||||
v-model="inputValue"
|
||||
placeholder="源数据"
|
||||
|
||||
@input="handleInput"
|
||||
class="search-text"
|
||||
type="text"
|
||||
></el-input>
|
||||
<el-select
|
||||
v-model="selectedValue"
|
||||
class="search-text"
|
||||
@change="handleSelectChange"
|
||||
placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
class="searchIcon"
|
||||
@click="handleSearch"
|
||||
></el-button>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
type="primary"
|
||||
class="searchIcon"
|
||||
@click="clearInput"
|
||||
></el-button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table" v-loading="tableLoading">
|
||||
<baseTable :tableData="tableData" :tabLoading="tabLoading"
|
||||
:tableColumn="tableColumn" :border="false" tableHeight="73vh"
|
||||
|
@ -18,21 +55,74 @@
|
|||
</template>
|
||||
</baseTable>
|
||||
</div>
|
||||
|
||||
|
||||
<footer>
|
||||
<basePage :pageModel="pageModel" @update:pageModel="currentChangeHandle"></basePage>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--<template>-->
|
||||
<!-- <div>-->
|
||||
|
||||
<!-- <base-layout-->
|
||||
|
||||
<!-- >-->
|
||||
<!-- <div slot="main" slot-scope="{ tableHeight }">-->
|
||||
<!-- <div class="logsDeatil">-->
|
||||
<!-- <div class="tabs">-->
|
||||
<!-- <div class="chunk" :class="{acivted:activeName==='1'}" @click="tabsHandleClick('1')">下发日志</div>-->
|
||||
<!-- <div class="chunk" :class="{acivted:activeName==='2'}" @click="tabsHandleClick('2')">写入日志</div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="table" v-loading="tableLoading">-->
|
||||
<!-- <baseTable :tableData="tableData" :tabLoading="tabLoading"-->
|
||||
<!-- :tableColumn="tableColumn" :border="false" tableHeight="73vh"-->
|
||||
<!-- >-->
|
||||
<!-- <!– 状态–>-->
|
||||
<!-- <template #dataType="{row}">-->
|
||||
<!-- {{ row.dataType == 1 ? '成功' : '失败' }}-->
|
||||
<!-- </template>-->
|
||||
<!-- <!– 操作类型–>-->
|
||||
<!-- <template #optionType="{row}">-->
|
||||
<!-- {{ row.optionType }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </baseTable>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
<!-- <footer>-->
|
||||
<!-- <basePage :pageModel="pageModel" @update:pageModel="currentChangeHandle"></basePage>-->
|
||||
<!-- </footer>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </base-layout>-->
|
||||
<!-- </div>-->
|
||||
<!--</template>-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
|
||||
import basePage from '@/views/intergrationTask/compoments/basePage.vue'
|
||||
import { authApi } from '@/api/apis/auth'
|
||||
import baseLayout from "@/components/base/baseLayout/index.vue";
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: { basePage, BaseTable },
|
||||
components: {baseLayout,basePage, BaseTable },
|
||||
data() {
|
||||
return {
|
||||
inputValue:'',
|
||||
selectedValue:'',
|
||||
options:[
|
||||
{value:'1',label:'成功'},
|
||||
{value:'2',label:'失败'},
|
||||
{value:'',label:'不筛选'},
|
||||
],
|
||||
activeName: '1',
|
||||
tableData: [],
|
||||
tableColumn: [
|
||||
|
@ -63,6 +153,13 @@ export default {
|
|||
id: 'optionType'
|
||||
}
|
||||
],
|
||||
requirementList: [
|
||||
{
|
||||
placeholder: "源数据",
|
||||
prop: "sourceData",
|
||||
tag: "elInput",
|
||||
}
|
||||
],
|
||||
tabLoading: false,
|
||||
tableColumnTypeOne: [
|
||||
{
|
||||
|
@ -87,6 +184,10 @@ export default {
|
|||
id: 'remark',
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
id: 'create_time'
|
||||
},
|
||||
{
|
||||
title: '操作类型',
|
||||
id: 'optionType'
|
||||
|
@ -150,6 +251,17 @@ export default {
|
|||
this.pageModel.pageIndex = 1
|
||||
this.initMainTableData()
|
||||
},
|
||||
handleSelectChange(){
|
||||
|
||||
this.initMainTableData()
|
||||
},
|
||||
clearInput() {
|
||||
this.inputValue = ''; // 将inputValue重置为空字符串
|
||||
},
|
||||
handleSearch() {
|
||||
this.initMainTableData()
|
||||
},
|
||||
|
||||
// 页码
|
||||
currentChangeHandle(pageModel) {
|
||||
this.pageModel = pageModel
|
||||
|
@ -162,7 +274,9 @@ export default {
|
|||
const res = await authApi('mdmModuleService', '', 'queryMdmOptionLogPage', '', {
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: this.pageModel.limit,
|
||||
mdmCode: this.$route.query.mdmCode
|
||||
mdmCode: this.$route.query.mdmCode,
|
||||
sourceData: this.inputValue,
|
||||
dataType:this.selectedValue,
|
||||
})
|
||||
this.tableColumn = this.tableColumnTypeTwo
|
||||
this.tableData = res.attribute.list
|
||||
|
@ -171,7 +285,9 @@ export default {
|
|||
const res = await authApi('mdmModuleService', '', 'queryMdmDistributeLogPage', '', {
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: this.pageModel.limit,
|
||||
mdmCode: this.$route.query.mdmCode
|
||||
mdmCode: this.$route.query.mdmCode,
|
||||
sourceData: this.inputValue,
|
||||
dataType:this.selectedValue,
|
||||
})
|
||||
this.tableColumn = this.tableColumnTypeOne
|
||||
this.tableData = res.attribute.list
|
||||
|
@ -188,6 +304,31 @@ export default {
|
|||
|
||||
|
||||
<style scoped lang="scss">
|
||||
.search-container {
|
||||
display: flex; /* 使用Flexbox布局 */
|
||||
align-items: center; /* 垂直居中对齐 */
|
||||
justify-content: flex-start; /* 水平起始对齐 */
|
||||
margin-bottom: 15px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.searchIcon {
|
||||
font-size: 18px;
|
||||
/* padding: 0 12px; */
|
||||
height: 32px;
|
||||
/* line-height: 32px; */
|
||||
margin-left: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-text {
|
||||
//flex-grow: 1; /* 让输入框占据剩余空间 */
|
||||
margin-right: 10px; /* 与按钮保持一定间距 */
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.logsDeatil {
|
||||
margin-left: 5px;
|
||||
background-color: #fff;
|
||||
|
|
Loading…
Reference in New Issue