parent
a58517868e
commit
0f2b5c897e
@ -0,0 +1,41 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
export function index (params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/gov-plane/index',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function show (params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/gov-plane/show',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function store (data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/gov-plane/store',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function save (data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/gov-plane/save',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function destroy (params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/admin/gov-plane/destroy',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -0,0 +1,174 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<Modal
|
||||||
|
transfer
|
||||||
|
title="政府采购计划"
|
||||||
|
v-model="dialogVisible"
|
||||||
|
width="60">
|
||||||
|
<template>
|
||||||
|
<xy-table :table-item="table" highlight-current-row :list="data" @cellClick="cellClick">
|
||||||
|
<template #btns></template>
|
||||||
|
</xy-table>
|
||||||
|
|
||||||
|
<div style="display: flex;justify-content: center;margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
small
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
@current-change="e => {
|
||||||
|
select.page = e
|
||||||
|
getData()
|
||||||
|
}">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||||
|
</template>
|
||||||
|
</Modal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { index } from "@/api/govPlane"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
|
||||||
|
isLoading: false,
|
||||||
|
total: 0,
|
||||||
|
data: [],
|
||||||
|
table: [
|
||||||
|
{
|
||||||
|
prop: "department.name",
|
||||||
|
label: "责任科室",
|
||||||
|
width: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "name",
|
||||||
|
label: "项目名称",
|
||||||
|
width: 180,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "content",
|
||||||
|
label: "项目内容",
|
||||||
|
minWidth: 220,
|
||||||
|
align: "left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "plan_money",
|
||||||
|
label: "采购预算",
|
||||||
|
width: 160,
|
||||||
|
align: "right",
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "public_plane_date",
|
||||||
|
label: "采购意向公开计划时间",
|
||||||
|
width: 190,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "public_act_date",
|
||||||
|
label: "采购意向公开实际时间",
|
||||||
|
width: 190,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "invite_plane_date",
|
||||||
|
label: "招标文件挂网计划时间",
|
||||||
|
width: 190,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "invite_act_date",
|
||||||
|
label: "招标文件挂网实际时间",
|
||||||
|
width: 190,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "open_plane_date",
|
||||||
|
label: "项目开标计划时间",
|
||||||
|
width: 180,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "open_act_date",
|
||||||
|
label: "项目开标实际时间",
|
||||||
|
width: 180,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
select: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 10,
|
||||||
|
keyword: ''
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
selected: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
show() {
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
hide() {
|
||||||
|
this.dialogVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
unique (arr) {
|
||||||
|
const res= new Map()
|
||||||
|
return arr.filter((a)=> !res.has(a.id) && res.set(a.id,1))
|
||||||
|
},
|
||||||
|
|
||||||
|
async getData() {
|
||||||
|
this.isLoading = true
|
||||||
|
const res = await index(this.select)
|
||||||
|
this.data = res.data
|
||||||
|
this.total = res.total
|
||||||
|
this.isLoading = false
|
||||||
|
},
|
||||||
|
|
||||||
|
selectionChange(selection) {
|
||||||
|
this.selected = selection
|
||||||
|
},
|
||||||
|
confirm () {
|
||||||
|
this.$emit('selected', this.selected)
|
||||||
|
this.hide()
|
||||||
|
},
|
||||||
|
|
||||||
|
cellClick (row) {
|
||||||
|
this.selected = row
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {
|
||||||
|
dialogVisible(newVal) {
|
||||||
|
if (newVal) {
|
||||||
|
this.getData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
@ -0,0 +1,182 @@
|
|||||||
|
<template>
|
||||||
|
<div style="padding: 0 20px">
|
||||||
|
<lx-header
|
||||||
|
icon="md-apps"
|
||||||
|
text="政府采购计划"
|
||||||
|
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
|
||||||
|
>
|
||||||
|
<div slot="content"></div>
|
||||||
|
<slot>
|
||||||
|
<span style="padding: 0 6px; word-break: keep-all">关键字</span>
|
||||||
|
<span>
|
||||||
|
<Input
|
||||||
|
v-model="select.keyword"
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
style="width: 180px"
|
||||||
|
></Input>
|
||||||
|
</span>
|
||||||
|
<Button type="primary" style="margin-left: 10px" ghost @click=""
|
||||||
|
>重置</Button
|
||||||
|
>
|
||||||
|
<Button type="primary" style="margin-left: 10px" @click="getList"
|
||||||
|
>查询</Button
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
@click="
|
||||||
|
$refs['addGovPlane'].setType('add'), $refs['addGovPlane'].show()
|
||||||
|
"
|
||||||
|
>新增</Button
|
||||||
|
>
|
||||||
|
</slot>
|
||||||
|
</lx-header>
|
||||||
|
|
||||||
|
<xy-table
|
||||||
|
:list="list"
|
||||||
|
:table-item="table"
|
||||||
|
@editor="
|
||||||
|
(e) => {
|
||||||
|
$refs['addGovPlane'].setType('editor');
|
||||||
|
$refs['addGovPlane'].setId(e.id);
|
||||||
|
$refs['addGovPlane'].show();
|
||||||
|
}
|
||||||
|
"
|
||||||
|
@delete="destroy"
|
||||||
|
></xy-table>
|
||||||
|
|
||||||
|
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
|
||||||
|
<Page
|
||||||
|
:total="total"
|
||||||
|
show-elevator
|
||||||
|
@on-change="
|
||||||
|
(e) => {
|
||||||
|
select.page = e;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<addGovPlane ref="addGovPlane" @refresh="getList"></addGovPlane>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import addGovPlane from "@/views/statisticalReport/components/addGovPlane.vue";
|
||||||
|
import { index, destroy } from "@/api/govPlane";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
addGovPlane,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
select: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 10,
|
||||||
|
keyword: "",
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
list: [],
|
||||||
|
table: [
|
||||||
|
{
|
||||||
|
prop: "department.name",
|
||||||
|
label: "责任科室",
|
||||||
|
width: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "name",
|
||||||
|
label: "项目名称",
|
||||||
|
width: 180,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "content",
|
||||||
|
label: "项目内容",
|
||||||
|
minWidth: 220,
|
||||||
|
align: "left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "plan_money",
|
||||||
|
label: "采购预算",
|
||||||
|
width: 160,
|
||||||
|
align: "right",
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "public_plane_date",
|
||||||
|
label: "采购意向公开计划时间",
|
||||||
|
width: 190,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "public_act_date",
|
||||||
|
label: "采购意向公开实际时间",
|
||||||
|
width: 190,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "invite_plane_date",
|
||||||
|
label: "招标文件挂网计划时间",
|
||||||
|
width: 190,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "invite_act_date",
|
||||||
|
label: "招标文件挂网实际时间",
|
||||||
|
width: 190,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "open_plane_date",
|
||||||
|
label: "项目开标计划时间",
|
||||||
|
width: 180,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "open_act_date",
|
||||||
|
label: "项目开标实际时间",
|
||||||
|
width: 180,
|
||||||
|
formatter: (cell, data, value) => {
|
||||||
|
return this.$moment(new Date(value)).format("YYYY年MM月DD");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getList() {
|
||||||
|
const res = await index(this.select);
|
||||||
|
this.total = res.total;
|
||||||
|
this.list = res.data;
|
||||||
|
},
|
||||||
|
|
||||||
|
destroy (row) {
|
||||||
|
destroy({ id: row.id }).then(res => {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功'
|
||||||
|
})
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
Loading…
Reference in new issue