master
lion 1 year ago
parent 57260df8e6
commit 18b36e7a0c

@ -59,24 +59,17 @@
}, },
methods: { methods: {
async getList() { async getList() {
this.nowDate = this.$moment().format("YYYY-MM-DD") // this.nowDate = this.$moment().format("YYYY-MM-DD")
this.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD") // this.nowDate = this.$moment().add(1, 'months').format('YYYY-MM-DD')
console.log("this.nowDate",this.nowDate,this.startDate) // this.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD")
// console.log("this.nowDate",this.nowDate,this.startDate)
const res = await index({ const res = await index({
page_size: 9999, page_size: 9999,
page: 1, page: 1,
table_name: 'records', table_name: 'records',
is_auth: 1, is_auth: 1,
catalogs_id: '', catalogs_id: '',
filter:[{ records_status:1
key:'end_date',
op:'range',
value:[this.startDate,this.nowDate]
},{
key:'status',
op:'eq',
value:0
}]
}) })
this.list.dateTotal = res.total this.list.dateTotal = res.total
}, },

@ -116,7 +116,7 @@
<template v-slot:footerContent> <template v-slot:footerContent>
<div> <div>
<Button ghost type="primary" @click="isShow = false">取消</Button> <Button ghost type="primary" @click="isShow = false">取消</Button>
<Button type="primary" v-if="form.status<2 || is_next" @click="clickSubmit"></Button> <Button type="primary" v-if="form.status!=2 || is_next" @click="clickSubmit"></Button>
<Button type="primary" v-else @click="addLink"></Button> <Button type="primary" v-else @click="addLink"></Button>
</div> </div>
</template> </template>
@ -160,6 +160,9 @@
id: 0, id: 0,
name: '正常' name: '正常'
}, { }, {
id: 3,
name: '已结束'
},{
id: 1, id: 1,
name: '已到期' name: '已到期'
}, { }, {

@ -148,7 +148,10 @@
statusList: [{ statusList: [{
id: 0, id: 0,
name: '正常' name: '正常'
}, { }, {
id: 3,
name: '已结束'
},{
id: 1, id: 1,
name: '已到期' name: '已到期'
}, { }, {

@ -51,6 +51,12 @@
@change="changeEnd" v-model="select.endRange" type="daterange" format="yyyy-MM-dd" @change="changeEnd" v-model="select.endRange" type="daterange" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" range-separator="至" start-placeholder="结束日期" end-placeholder=""> value-format="yyyy-MM-dd" range-separator="至" start-placeholder="结束日期" end-placeholder="">
</el-date-picker> </el-date-picker>
</div>
<div>
<el-select style="width:200px" v-model="select.records_status" placeholder="请选择是否到期">
<el-option v-for="item in rsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div> </div>
<div> <div>
<el-button type="primary" size="small" @click="select.page=1,getList()"></el-button> <el-button type="primary" size="small" @click="select.page=1,getList()"></el-button>
@ -87,7 +93,7 @@
<xy-table @getHeight="initHeight" :list="list" :total="total" @pageIndexChange="pageIndexChange" <xy-table @getHeight="initHeight" :list="list" :total="total" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item"> @pageSizeChange="pageSizeChange" :table-item="table_item">
<template v-slot:catalog_name> <template v-slot:catalog_name>
<el-table-column align='left' label="所属目录" width="240" header-align="left"> <el-table-column align='center' label="所属目录" width="240" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.catalog_id_details && scope.row.catalog_id_details.length>0"> <div v-if="scope.row.catalog_id_details && scope.row.catalog_id_details.length>0">
<el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.catalog_id_details"> <el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.catalog_id_details">
@ -97,7 +103,7 @@
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:area_name> <template v-slot:area_name>
<el-table-column align='left' label="所属区域" width="240" header-align="left"> <el-table-column align='center' label="所属区域" width="240" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.area_ids_details && scope.row.area_ids_details.length>0"> <div v-if="scope.row.area_ids_details && scope.row.area_ids_details.length>0">
<el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.area_ids_details"> <el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.area_ids_details">
@ -107,7 +113,7 @@
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:tag_name> <template v-slot:tag_name>
<el-table-column align='left' label="标签" width="240" header-align="left"> <el-table-column align='center' label="标签" width="240" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.tag_ids_details && scope.row.tag_ids_details.length>0"> <div v-if="scope.row.tag_ids_details && scope.row.tag_ids_details.length>0">
<el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.tag_ids_details"> <el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.tag_ids_details">
@ -146,7 +152,7 @@
</template> </template>
<template v-slot:btns> <template v-slot:btns>
<el-table-column align='left' fixed="right" label="操作" width="240" header-align="center"> <el-table-column align='center' fixed="right" label="操作" width="240" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="primary" size="small" @click="editIndex('child',scope.row.id,scope.row.name)"></el-button> --> <!-- <el-button type="primary" size="small" @click="editIndex('child',scope.row.id,scope.row.name)"></el-button> -->
<el-button type="primary" size="small" @click="showIndex('show',scope.row.id)"></el-button> <el-button type="primary" size="small" @click="showIndex('show',scope.row.id)"></el-button>
@ -268,7 +274,14 @@
picker.$emit('pick', [start, end]); picker.$emit('pick', [start, end]);
} }
}] }]
}, },
rsList:[{
id:1,
name:'是'
},{
id:0,
name:'否'
}],
select: { select: {
title: '', title: '',
table_name: 'records', table_name: 'records',
@ -280,7 +293,8 @@
area_id: '', area_id: '',
tag_id: '', tag_id: '',
startRange: [], startRange: [],
endRange: [] endRange: [],
records_status:''
}, },
hasMenu: false, hasMenu: false,
myHeight: 0, myHeight: 0,
@ -304,10 +318,14 @@
id: 0, id: 0,
name: '正常', name: '正常',
type: '' type: ''
}, {
id: 3,
name: '已结束',
type: 'info'
}, { }, {
id: 1, id: 1,
name: '已到期', name: '已到期',
type: 'info' type: 'warning'
}, { }, {
id: 2, id: 2,
name: '已延续', name: '已延续',
@ -389,8 +407,9 @@
this.is_search = true this.is_search = true
} }
if (this.$route.query.dateTotal) { if (this.$route.query.dateTotal) {
this.select.endRange = [this.startDate, this.nowDate] // this.select.endRange = [this.startDate, this.nowDate]
this.select.status = 0 // this.select.status = 0
this.select.records_status = 1
this.is_search = true this.is_search = true
} }
// this.getCatalogList() // this.getCatalogList()
@ -530,7 +549,8 @@
this.select.area_id = [] this.select.area_id = []
this.select.tag_id = [] this.select.tag_id = []
this.select.startRange = [] this.select.startRange = []
this.select.endRange = [] this.select.endRange = []
this.select.records_status = ""
if (this.is_search) { if (this.is_search) {
this.select.catalog_id = '' this.select.catalog_id = ''
this.select.catalog_name = '' this.select.catalog_name = ''
@ -566,7 +586,8 @@
sort_name: 'date', sort_name: 'date',
catalogs_id: this.select.catalog_id ? this.select.catalog_id : '', catalogs_id: this.select.catalog_id ? this.select.catalog_id : '',
area_ids: this.select.area_id ? this.select.area_id : '', area_ids: this.select.area_id ? this.select.area_id : '',
tag_ids: this.select.tag_id ? this.select.tag_id : '', tag_ids: this.select.tag_id ? this.select.tag_id : '',
records_status:this.select.records_status,
filter: [{ filter: [{
"key": "title", "key": "title",
"op": "like", "op": "like",

Loading…
Cancel
Save