Commit 2764e4ab authored by wangxl's avatar wangxl

444

parent a3a999e9
<template>
<div class="app-content">
<div class="submit-btn">
<a-form :form="form" :model="searchForm" layout="inline" class="search_form">
<a-form-item>
<a-button type="primary" class="search_input" style="margin-right: 10px;" @click="createBatch">添加</a-button>
</div>
<a-button type="primary" @click="search">刷新</a-button>
</a-form-item>
</a-form>
<a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading" bordered>
<template slot="option" slot-scope="record">
<a-button type="link" size="small" @click="recordClick(record,'edit')">修改</a-button>&nbsp;
......@@ -20,12 +23,14 @@
import { getType } from '@/views/utils/auth'
import batchEdit from '@/views/timeSet/batch/components/batchEdit'
import moment from 'moment'
import { isEmptyParams} from "@/views/utils/common"
export default {
name: 'batchSet',
components: { batchEdit },
data () {
return {
searchForm: { projType: getType(), timeType: 1, },
form: this.$form.createForm(this, { name: 'advanced_search' }),
tableData: [],
columns: [
{ key: '1', title: '申报年度', dataIndex: 'year', align: 'center' },
......@@ -56,7 +61,8 @@ export default {
moment,
getListByPage () {
this.loading = true
let par = { projType: getType(), timeType: 1, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize }
let pars = isEmptyParams(this.searchForm)
let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize }
this.$api.batch.getListByPage(par).then(({ data = {} }) => {
if (data) {
const { dataList = [], total = 0 } = data
......@@ -66,6 +72,14 @@ export default {
}
}).catch(() => { this.loading = false })
},
search () {
this.pagination.pageIndex = 1
this.getListByPage()
},
reset () {
this.pagination.pageIndex = 1
this.getListByPage()
},
change () {
this.getListByPage()
},
......
<template>
<div class="app-content">
<div class="submit-btn">
<a-form :form="form" :model="searchForm" layout="inline" class="search_form">
<a-form-item>
<a-button type="primary" class="search_input" style="margin-right: 10px;" @click="createBatch">添加</a-button>
</div>
<a-button type="primary" @click="search">刷新</a-button>
</a-form-item>
</a-form>
<a-table :dataSource="tableData" :columns="columns" rowKey="id" :pagination="false" :loading="loading" bordered>
<template slot="option" slot-scope="record">
<a-button type="link" size="small" @click="recordClick(record,'edit')">修改</a-button>&nbsp;
......@@ -20,12 +23,14 @@
import { getType } from '@/views/utils/auth'
import timeEdit from '@/views/timeSet/taskTimeSet/components/timeEdit'
import moment from 'moment'
import { isEmptyParams } from "@/views/utils/common"
export default {
name: 'taskTimeSet',
components: { timeEdit },
data () {
return {
searchForm: { projType: getType(), timeType: 2, },
form: this.$form.createForm(this, { name: 'advanced_search' }),
tableData: [],
columns: [
{ key: '1', title: '申报年度', dataIndex: 'year', align: 'center' },
......@@ -54,7 +59,8 @@ export default {
moment,
getListByPage () {
this.loading = true
let par = { projType: getType(), timeType: 2, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize }
let pars = isEmptyParams(this.searchForm)
let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize }
this.$api.batch.getListByPage(par).then(({ data = {} }) => {
if (data) {
const { dataList = [], total = 0 } = data
......@@ -64,6 +70,14 @@ export default {
}
}).catch(() => { this.loading = false })
},
search () {
this.pagination.pageIndex = 1
this.getListByPage()
},
reset () {
this.pagination.pageIndex = 1
this.getListByPage()
},
change () {
this.getListByPage()
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment