日志按创建时间排序、源数据模糊查询
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==='1'}" @click="tabsHandleClick('1')">下发日志</div>
|
||||||
<div class="chunk" :class="{acivted:activeName==='2'}" @click="tabsHandleClick('2')">写入日志</div>
|
<div class="chunk" :class="{acivted:activeName==='2'}" @click="tabsHandleClick('2')">写入日志</div>
|
||||||
</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">
|
<div class="table" v-loading="tableLoading">
|
||||||
<baseTable :tableData="tableData" :tabLoading="tabLoading"
|
<baseTable :tableData="tableData" :tabLoading="tabLoading"
|
||||||
:tableColumn="tableColumn" :border="false" tableHeight="73vh"
|
:tableColumn="tableColumn" :border="false" tableHeight="73vh"
|
||||||
|
@ -18,21 +55,74 @@
|
||||||
</template>
|
</template>
|
||||||
</baseTable>
|
</baseTable>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<basePage :pageModel="pageModel" @update:pageModel="currentChangeHandle"></basePage>
|
<basePage :pageModel="pageModel" @update:pageModel="currentChangeHandle"></basePage>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</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>
|
<script>
|
||||||
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
|
import BaseTable from '@/views/intergrationTask/compoments/baseTable.vue'
|
||||||
import basePage from '@/views/intergrationTask/compoments/basePage.vue'
|
import basePage from '@/views/intergrationTask/compoments/basePage.vue'
|
||||||
import { authApi } from '@/api/apis/auth'
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
import baseLayout from "@/components/base/baseLayout/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
components: { basePage, BaseTable },
|
components: {baseLayout,basePage, BaseTable },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
inputValue:'',
|
||||||
|
selectedValue:'',
|
||||||
|
options:[
|
||||||
|
{value:'1',label:'成功'},
|
||||||
|
{value:'2',label:'失败'},
|
||||||
|
{value:'',label:'不筛选'},
|
||||||
|
],
|
||||||
activeName: '1',
|
activeName: '1',
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableColumn: [
|
tableColumn: [
|
||||||
|
@ -63,6 +153,13 @@ export default {
|
||||||
id: 'optionType'
|
id: 'optionType'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
requirementList: [
|
||||||
|
{
|
||||||
|
placeholder: "源数据",
|
||||||
|
prop: "sourceData",
|
||||||
|
tag: "elInput",
|
||||||
|
}
|
||||||
|
],
|
||||||
tabLoading: false,
|
tabLoading: false,
|
||||||
tableColumnTypeOne: [
|
tableColumnTypeOne: [
|
||||||
{
|
{
|
||||||
|
@ -87,6 +184,10 @@ export default {
|
||||||
id: 'remark',
|
id: 'remark',
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
id: 'create_time'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '操作类型',
|
title: '操作类型',
|
||||||
id: 'optionType'
|
id: 'optionType'
|
||||||
|
@ -150,6 +251,17 @@ export default {
|
||||||
this.pageModel.pageIndex = 1
|
this.pageModel.pageIndex = 1
|
||||||
this.initMainTableData()
|
this.initMainTableData()
|
||||||
},
|
},
|
||||||
|
handleSelectChange(){
|
||||||
|
|
||||||
|
this.initMainTableData()
|
||||||
|
},
|
||||||
|
clearInput() {
|
||||||
|
this.inputValue = ''; // 将inputValue重置为空字符串
|
||||||
|
},
|
||||||
|
handleSearch() {
|
||||||
|
this.initMainTableData()
|
||||||
|
},
|
||||||
|
|
||||||
// 页码
|
// 页码
|
||||||
currentChangeHandle(pageModel) {
|
currentChangeHandle(pageModel) {
|
||||||
this.pageModel = pageModel
|
this.pageModel = pageModel
|
||||||
|
@ -162,7 +274,9 @@ export default {
|
||||||
const res = await authApi('mdmModuleService', '', 'queryMdmOptionLogPage', '', {
|
const res = await authApi('mdmModuleService', '', 'queryMdmOptionLogPage', '', {
|
||||||
pageNum: this.pageModel.pageIndex,
|
pageNum: this.pageModel.pageIndex,
|
||||||
pageSize: this.pageModel.limit,
|
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.tableColumn = this.tableColumnTypeTwo
|
||||||
this.tableData = res.attribute.list
|
this.tableData = res.attribute.list
|
||||||
|
@ -171,7 +285,9 @@ export default {
|
||||||
const res = await authApi('mdmModuleService', '', 'queryMdmDistributeLogPage', '', {
|
const res = await authApi('mdmModuleService', '', 'queryMdmDistributeLogPage', '', {
|
||||||
pageNum: this.pageModel.pageIndex,
|
pageNum: this.pageModel.pageIndex,
|
||||||
pageSize: this.pageModel.limit,
|
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.tableColumn = this.tableColumnTypeOne
|
||||||
this.tableData = res.attribute.list
|
this.tableData = res.attribute.list
|
||||||
|
@ -188,6 +304,31 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<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 {
|
.logsDeatil {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
Loading…
Reference in New Issue