This commit is contained in:
wangyan 2024-05-17 16:00:03 +08:00
parent 47f0e67984
commit 2f2e89439d

View File

@ -36,24 +36,12 @@
end-placeholder="投标具体结束日期"
/>
<el-date-picker
v-model="searchObj.value2"
clearable
class="filter-item el-range-editor--small"
style="width:400px"
type="datetimerange"
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
start-placeholder="报名截止开始日期"
end-placeholder="报名截止结束日期"
/>
<el-button
class="filter-item"
type="success"
icon="el-icon-search"
@click="searchBtn"
>搜索</el-button
>搜索</el-button
>
<!-- 新增 -->
<div style="display: inline-block;margin: 0px 2px;">
@ -63,10 +51,9 @@
type="primary"
icon="el-icon-plus"
@click="handleLinkAdd"
>新增</el-button
>新增</el-button
>
</div>
</div>
<!--表单组件-->
<eForm ref="form" :is-add="isAdd" />
@ -86,7 +73,7 @@
<af-table-column prop="projectName" label="项目简称" />
<!-- <af-table-column prop="projectLongName" label="项目名称" /> -->
<af-table-column prop="registrationLotNumber" label="报名标段编号" />
<af-table-column prop="registrationDeadline" label="报名截止时间" />
<!-- <af-table-column prop="registrationFee" label="报名费用" /> -->
<!-- <af-table-column prop="registrationMethod" label="报名方式" />
<af-table-column prop="biddingDateTime" label="投标具体时间" /> -->
@ -142,14 +129,14 @@
size="mini"
type="text"
@click="$refs[scope.row.id].doClose()"
>取消</el-button
>取消</el-button
>
<el-button
:loading="delLoading"
type="primary"
size="mini"
@click="subDelete(scope.row.id)"
>确定</el-button
>确定</el-button
>
</div>
<el-button
@ -175,11 +162,11 @@
</template>
<script>
import Pagination from '@/components/Pagination'
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { del, downloadBiddingInfo, list } from '@/api/biddingInfo'
import eForm from './form'
import Pagination from "@/components/Pagination";
import checkPermission from "@/utils/permission";
import initData from "@/mixins/initData";
import { del, downloadBiddingInfo, list } from "@/api/biddingInfo";
import eForm from "./form";
export default {
components: { eForm, Pagination },
mixins: [initData],
@ -193,27 +180,26 @@ export default {
},
delLoading: false,
queryTypeOptions: [
{ key: 'projectId', display_name: '项目编号' },
{ key: 'projectName', display_name: '项目简称' },
{ key: 'projectLongName', display_name: '项目名称' }
{ key: "projectId", display_name: "项目编号" },
{ key: "projectName", display_name: "项目简称" },
{ key: "projectLongName", display_name: "项目名称" }
]
}
};
},
created() {
this.getList()
this.getList();
},
methods: {
getList(
registrationDeadlineStartDate = '',
registrationDeadlineEndDate = '',
biddingDateTimeStartDate = '',
biddingDateTimeEndDate = '',
registrationDeadlineStartDate = "",
registrationDeadlineEndDate = "",
biddingDateTimeStartDate = "",
biddingDateTimeEndDate = ""
) {
const { projectId, projectName, projectLongName } = this.searchObj
const { projectId, projectName, projectLongName } = this.searchObj;
const obj = {
page: this.listQuery.page - 1,
size: this.listQuery.limit,
sort: 'registrationDeadline,desc',
registrationDeadlineStartDate,
registrationDeadlineEndDate,
biddingDateTimeStartDate,
@ -221,24 +207,24 @@ export default {
projectId,
projectName,
projectLongName
}
};
list(obj).then(res => {
// console.log(res);
this.list = res.content
this.total = res.totalElements
})
this.list = res.content;
this.total = res.totalElements;
});
},
paginations(item) {
// console.log(item);
this.listQuery.page = item.page
this.listQuery.limit = item.limit
const { projectId, projectName, projectLongName } = this.searchObj
const time = this.searchObj.value1
const biddingDateTimeStartDate = time ? time[0] : ''
const biddingDateTimeEndDate = time ? time[1] : ''
const time2 = this.searchObj.value2
const registrationDeadlineStartDate = time2 ? time2[0] : ''
const registrationDeadlineEndDate = time2 ? time2[1] : ''
this.listQuery.page = item.page;
this.listQuery.limit = item.limit;
const { projectId, projectName, projectLongName } = this.searchObj;
const time = this.searchObj.value1;
const biddingDateTimeStartDate = time ? time[0] : "";
const biddingDateTimeEndDate = time ? time[1] : "";
const time2 = this.searchObj.value2;
const registrationDeadlineStartDate = time2 ? time2[0] : "";
const registrationDeadlineEndDate = time2 ? time2[1] : "";
this.getList(
registrationDeadlineStartDate,
registrationDeadlineEndDate,
@ -247,16 +233,16 @@ export default {
projectId,
projectName,
projectLongName
)
);
},
searchBtn() {
const time = this.searchObj.value1
const biddingDateTimeStartDate = time ? time[0] : ''
const biddingDateTimeEndDate = time ? time[1] : ''
const time2 = this.searchObj.value2
const registrationDeadlineStartDate = time2 ? time2[0] : ''
const registrationDeadlineEndDate = time2 ? time2[1] : ''
const { projectId, projectName, projectLongName } = this.searchObj
const time = this.searchObj.value1;
const biddingDateTimeStartDate = time ? time[0] : "";
const biddingDateTimeEndDate = time ? time[1] : "";
const time2 = this.searchObj.value2;
const registrationDeadlineStartDate = time2 ? time2[0] : "";
const registrationDeadlineEndDate = time2 ? time2[1] : "";
const { projectId, projectName, projectLongName } = this.searchObj;
this.getList(
registrationDeadlineStartDate,
registrationDeadlineEndDate,
@ -265,78 +251,78 @@ export default {
projectId,
projectName,
projectLongName
)
);
},
handleLinkAdd() {
localStorage.setItem('editData', null)
this.$router.push({ path: 'create' })
localStorage.setItem("editData", null);
this.$router.push({ path: "create" });
},
handleLinkDetail(scope) {
localStorage.setItem('date', JSON.stringify(scope.row))
localStorage.setItem("date", JSON.stringify(scope.row));
this.$router.push({
path: '/newproject/bidding/detail',
path: "/newproject/bidding/detail",
query: {
source: 0
}
})
});
},
checkPermission,
beforeInit() {
this.url = 'api/biddingInfo'
const sort = 'registrationDeadline,desc'
this.params = { page: this.page, size: this.size, sort: sort }
const query = this.query
const type = query.type
const value = query.value
this.url = "api/biddingInfo";
const sort = "id,desc";
this.params = { page: this.page, size: this.size, sort: sort };
const query = this.query;
const type = query.type;
const value = query.value;
if (type && value) {
this.params[type] = value
this.params[type] = value;
}
return true
return true;
},
subDelete(id) {
this.delLoading = true
this.delLoading = true;
del(id)
.then(res => {
this.delLoading = false
this.$refs[id].doClose()
this.dleChangePage()
this.getList()
this.delLoading = false;
this.$refs[id].doClose();
this.dleChangePage();
this.getList();
this.$notify({
title: '删除成功',
type: 'success',
title: "删除成功",
type: "success",
duration: 2500
})
});
})
.catch(err => {
this.delLoading = false
this.$refs[id].doClose()
console.log(err.response.data.message)
})
this.delLoading = false;
this.$refs[id].doClose();
console.log(err.response.data.message);
});
},
add() {
this.isAdd = true
this.$refs.form.dialog = true
this.isAdd = true;
this.$refs.form.dialog = true;
},
edit(scope) {
localStorage.setItem('editData', JSON.stringify(scope.row))
this.$router.push('/newproject/bidding/create')
localStorage.setItem("editData", JSON.stringify(scope.row));
this.$router.push("/newproject/bidding/create");
},
//
download() {
this.beforeInit()
this.downloadLoading = true
this.beforeInit();
this.downloadLoading = true;
downloadBiddingInfo(this.params)
.then(result => {
downloadFile(result, 'BiddingInfo列表', 'xlsx')
this.downloadLoading = false
downloadFile(result, "BiddingInfo列表", "xlsx");
this.downloadLoading = false;
})
.catch(() => {
this.downloadLoading = false
})
this.downloadLoading = false;
});
}
}
}
};
</script>
<style scoped></style>