3 changed files with 311 additions and 431 deletions
@ -1,459 +1,326 @@
|
||||
<template> |
||||
<div> |
||||
<span class="tipsMy">带*数据为必填项</span> |
||||
<el-form |
||||
:model="editForm" |
||||
class="myForm" |
||||
:disabled="readOnly"> |
||||
<el-form :model="editForm" class="myForm" :disabled="readOnly"> |
||||
<el-row> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="城市:"> |
||||
<el-input v-model="editForm.city"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="地块编号:"> |
||||
<el-input v-model="editForm.auctionRecordId"></el-input> |
||||
<el-input v-model="editForm.landCode"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="地块名称:"> |
||||
<el-input v-model="editForm.landName"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
<el-row> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="成交时间:"> |
||||
<el-date-picker |
||||
type="date" |
||||
placeholder="选择成交时间" |
||||
v-model="editForm.createDate" |
||||
value-format="yyyy-MM-dd" |
||||
format="yyyy-MM-dd" |
||||
type="date" |
||||
placeholder="选择成交时间" |
||||
v-model="editForm.createDate" |
||||
value-format="yyyy-MM-dd" |
||||
format="yyyy-MM-dd" |
||||
></el-date-picker> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="8"> |
||||
</el-row> |
||||
<el-row> |
||||
<el-col :span="6"> |
||||
<el-form-item label="举牌排名:"> |
||||
<el-input v-model="editForm.ranking"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="举牌企业:"> |
||||
<el-input v-model="editForm.raiseEnterprise"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
<el-row> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="举牌价(万元):"> |
||||
<el-input v-model="editForm.raisePrice"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="名义楼面价(元/㎡):"> |
||||
<el-input v-model="editForm.nominalFloorPrice"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="8"> |
||||
</el-row> |
||||
<el-row> |
||||
<el-col :span="6"> |
||||
<el-form-item label="无偿移交比例(%)::"> |
||||
<el-input v-model="editForm.percentUnpaidTransfers"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
<el-row> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="实际楼面价(元/㎡):"> |
||||
<el-input v-model="editForm.actualFloorPrice"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="溢价率(%):"> |
||||
<el-input v-model="editForm.premiumRate"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="最后轮次:"> |
||||
<el-input v-model="editForm.finalRound"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
<el-row> |
||||
<el-col :span="8"> |
||||
<el-col :span="6"> |
||||
<el-form-item label="竞得企业:"> |
||||
<el-input v-model="editForm.winnerEnterprises"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="8"> </el-col> |
||||
<!-- <el-col :span="8">--> |
||||
<!-- <el-button v-show="!readOnly" @click="save">保存</el-button>--> |
||||
<!-- </el-col>--> |
||||
</el-row> |
||||
</el-form> |
||||
<div class="dialog_op"> |
||||
<el-button type="primary" @click="goBack" |
||||
>返回</el-button |
||||
> |
||||
<el-button type="primary" @click="goBack">返回</el-button> |
||||
<el-button type="primary" @click="save" v-show="!readOnly" |
||||
>保存</el-button |
||||
>保存</el-button |
||||
> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
queryList, |
||||
addData, |
||||
updateData, |
||||
delData, |
||||
exportHandLandToListExcel, |
||||
downloadHandLandTemplate, |
||||
} from "@/views/bigdata/api/city"; |
||||
import {putAuction} from "./api/api"; |
||||
import { putAuction, queryData } from "./api/api"; |
||||
|
||||
export default { |
||||
name: "newCity", |
||||
data() { |
||||
return { |
||||
searchForm: { |
||||
// 公告序号 |
||||
annoId: "", |
||||
// 地块编号 |
||||
landCode: "", |
||||
// 土地用途 |
||||
landUsage: "", |
||||
// 公告日期 |
||||
annoDate: "", |
||||
export default { |
||||
name: "newCity", |
||||
data() { |
||||
return { |
||||
searchForm: { |
||||
// 公告序号 |
||||
annoId: "", |
||||
// 地块编号 |
||||
landCode: "", |
||||
// 土地用途 |
||||
landUsage: "", |
||||
// 公告日期 |
||||
annoDate: "", |
||||
}, |
||||
tableData: [], |
||||
// 列 |
||||
cols: [ |
||||
{ |
||||
label: "年份", |
||||
prop: "year", |
||||
width: 150, |
||||
}, |
||||
tableData: [], |
||||
// 列 |
||||
cols: [ |
||||
{ |
||||
label: "年份", |
||||
prop: "year", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "城市", |
||||
prop: "city", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "GDP(亿元)", |
||||
prop: "gdp", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "GDP增速(%)", |
||||
prop: "gdpGrowth", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "第一产业(亿元)", |
||||
prop: "primaryIndustry", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "第二产业(亿元)", |
||||
prop: "secondIndustry", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "第三产业(亿元)", |
||||
prop: "thirdIndustry", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "城镇常住人口(万人)", |
||||
prop: "urbanResidents", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "常住人口(万人)", |
||||
prop: "resident", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "城镇化率", |
||||
prop: "urbanRate", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "主城九区常住人口(万人)", |
||||
prop: "mainUrbanResidents", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "城镇居民人均收入(元)", |
||||
prop: "urbanPerIncome", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "城镇居民收入增速(%)", |
||||
prop: "urbanIncomeIncrease", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "房地产投资额(亿元)", |
||||
prop: "realEstateInvest", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "固定资产投资额(亿元)", |
||||
prop: "fixedInvestments", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "房地产占比(%)", |
||||
prop: "perRealestate", |
||||
width: 150, |
||||
}, |
||||
], |
||||
// 表格加载 |
||||
loading: false, |
||||
// 选中的数据 |
||||
selectedData: [], |
||||
page: { |
||||
total: 0, // 总页数 |
||||
currentPage: 1, // 当前页数 |
||||
pageSize: 10, // 每页显示多少条 |
||||
{ |
||||
label: "城市", |
||||
prop: "city", |
||||
width: 150, |
||||
}, |
||||
// 只读 |
||||
readOnly: true, |
||||
// 有选中数据 |
||||
hasSelectData: false, |
||||
// 编辑或新增窗口 |
||||
dialogFormVisible: false, |
||||
dialogTitle: "新增数据", |
||||
// 编辑Form |
||||
editForm: {}, |
||||
}; |
||||
}, |
||||
created() { |
||||
let newObj = {}; |
||||
for (let col of this.cols) { |
||||
newObj[col.prop] = ""; |
||||
} |
||||
this.editForm = newObj; |
||||
if (this.$route.query.readOnly==='true'){ |
||||
this.readOnly = true; |
||||
let row=JSON.parse(this.$route.query.data) |
||||
this.editForm = row; |
||||
}else { |
||||
this.readOnly = false; |
||||
} |
||||
if (this.$route.query.isEditOr==='true'){ |
||||
let row=JSON.parse(this.$route.query.data) |
||||
this.editForm = row; |
||||
console.log(row); |
||||
} |
||||
}, |
||||
methods: { |
||||
goBack(){ |
||||
window.history.back() |
||||
}, |
||||
// 清空选中 |
||||
clearSelection() { |
||||
this.$refs.multipleTable.clearSelection(); |
||||
}, |
||||
|
||||
// 查询 |
||||
onSubmit() { |
||||
this.tableLoading = true; |
||||
let param = Object.assign( |
||||
{ |
||||
current: this.page.currentPage, |
||||
size: this.page.pageSize, |
||||
}, |
||||
this.searchForm |
||||
); |
||||
queryList(param).then((response) => { |
||||
this.tableData = response.data.data.records; |
||||
this.page.total = response.data.data.total; |
||||
this.loading = false; |
||||
}); |
||||
}, |
||||
|
||||
// 重置 |
||||
onReset() { |
||||
for (let item in this.searchForm) { |
||||
this.searchForm[item] = ""; |
||||
} |
||||
}, |
||||
|
||||
handleSizeChange(val) { |
||||
this.page.pageSize = val; |
||||
}, |
||||
|
||||
handleCurrentChange(val) { |
||||
this.page.currentPage = val; |
||||
}, |
||||
|
||||
// 选中更改 |
||||
handleSelectionChange(val) { |
||||
this.selectedData = val; |
||||
}, |
||||
|
||||
// 新建 |
||||
newItem() { |
||||
// 从cols里面拷贝字段 |
||||
let newObj = {}; |
||||
for (let col of this.cols) { |
||||
newObj[col.prop] = ""; |
||||
} |
||||
this.editForm = newObj; |
||||
this.readOnly = false; |
||||
this.dialogFormVisible = true; |
||||
}, |
||||
|
||||
// 编辑 |
||||
editItem(row) { |
||||
this.dialogTitle = "编辑数据"; |
||||
this.readOnly = false; |
||||
this.dialogFormVisible = true; |
||||
this.editForm = row; |
||||
{ |
||||
label: "GDP(亿元)", |
||||
prop: "gdp", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "GDP增速(%)", |
||||
prop: "gdpGrowth", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "第一产业(亿元)", |
||||
prop: "primaryIndustry", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "第二产业(亿元)", |
||||
prop: "secondIndustry", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "第三产业(亿元)", |
||||
prop: "thirdIndustry", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "城镇常住人口(万人)", |
||||
prop: "urbanResidents", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "常住人口(万人)", |
||||
prop: "resident", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "城镇化率", |
||||
prop: "urbanRate", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "主城九区常住人口(万人)", |
||||
prop: "mainUrbanResidents", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "城镇居民人均收入(元)", |
||||
prop: "urbanPerIncome", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "城镇居民收入增速(%)", |
||||
prop: "urbanIncomeIncrease", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "房地产投资额(亿元)", |
||||
prop: "realEstateInvest", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "固定资产投资额(亿元)", |
||||
prop: "fixedInvestments", |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: "房地产占比(%)", |
||||
prop: "perRealestate", |
||||
width: 150, |
||||
}, |
||||
], |
||||
// 表格加载 |
||||
loading: false, |
||||
// 选中的数据 |
||||
selectedData: [], |
||||
page: { |
||||
total: 0, // 总页数 |
||||
currentPage: 1, // 当前页数 |
||||
pageSize: 10, // 每页显示多少条 |
||||
}, |
||||
|
||||
// 删除单个 |
||||
delItem(row) { |
||||
delData(row.data_id).then((res) => { |
||||
// 只读 |
||||
readOnly: true, |
||||
// 有选中数据 |
||||
hasSelectData: false, |
||||
// 编辑或新增窗口 |
||||
dialogFormVisible: false, |
||||
dialogTitle: "新增数据", |
||||
// 编辑Form |
||||
editForm: {}, |
||||
}; |
||||
}, |
||||
created() { |
||||
let newObj = {}; |
||||
for (let col of this.cols) { |
||||
newObj[col.prop] = ""; |
||||
} |
||||
this.editForm = newObj; |
||||
if (this.$route.query.readOnly === "true") { |
||||
this.readOnly = true; |
||||
queryData(this.$route.query.data).then((res) => { |
||||
console.log(res); |
||||
this.editForm = res.data.data; |
||||
}); |
||||
} else { |
||||
this.readOnly = false; |
||||
} |
||||
if (this.$route.query.isEditOr === "true") { |
||||
queryData(this.$route.query.data).then((res) => { |
||||
console.log(res); |
||||
this.editForm = res.data.data; |
||||
}); |
||||
} |
||||
}, |
||||
methods: { |
||||
goBack() { |
||||
window.history.back(); |
||||
}, |
||||
// 保存 |
||||
save() { |
||||
putAuction(this.editForm).then((res) => { |
||||
if (res.data.success) { |
||||
this.$message("保存成功"); |
||||
window.history.back(); |
||||
} else { |
||||
console.debug(res); |
||||
}); |
||||
}, |
||||
|
||||
// 查看 |
||||
viewItem(row) { |
||||
this.dialogTitle = "查看数据"; |
||||
this.readOnly = true; |
||||
this.dialogFormVisible = true; |
||||
this.editForm = row; |
||||
}, |
||||
|
||||
// 保存 |
||||
save() { |
||||
// if (this.dialogTitle == "新增数据") { |
||||
// addData(this.editForm).then((res) => { |
||||
// this.dialogFormVisible = false; |
||||
// if (res.success) { |
||||
// this.$message("保存成功"); |
||||
// this.dialogFormVisible = false; |
||||
// } else { |
||||
// console.debug(res); |
||||
// this.$message.error("保存失败"); |
||||
// } |
||||
// }); |
||||
// } else if (this.dialogTitle == "编辑数据") { |
||||
putAuction(this.editForm).then((res) => { |
||||
if (res.data.success) { |
||||
this.$message("保存成功"); |
||||
window.history.back() |
||||
} else { |
||||
console.debug(res); |
||||
this.$message.error("保存失败"); |
||||
} |
||||
}); |
||||
// } |
||||
}, |
||||
|
||||
// 下载模板 |
||||
downloadTemplate() { |
||||
downloadHandLandTemplate().then((res) => { |
||||
let url = res.data.data; |
||||
downUrlFile(url); |
||||
}); |
||||
}, |
||||
|
||||
// 导出数据 |
||||
exportData() { |
||||
if (this.selectedData.length < 1) { |
||||
this.$message({ |
||||
message: "未选中数据", |
||||
type: "warning", |
||||
}); |
||||
return; |
||||
} |
||||
//proposedseriaId |
||||
let ids = []; |
||||
for (let item of this.selectedData) { |
||||
ids.push(item["proposedseriaId"]); |
||||
this.$message.error("保存失败"); |
||||
} |
||||
console.debug(ids); |
||||
exportHandLandToListExcel(ids.toString()).then((res) => { |
||||
console.debug(res); |
||||
}); |
||||
}, |
||||
}); |
||||
// } |
||||
}, |
||||
} |
||||
}, |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped lang="less"> |
||||
/deep/ .el-collapse-item__header{ |
||||
padding: 0 20px; |
||||
} |
||||
/deep/ .el-input { |
||||
width: 90%; |
||||
} |
||||
/deep/ .el-collapse-item { |
||||
margin-bottom: 10px; |
||||
padding-left: 10px; |
||||
background-color: white; |
||||
} |
||||
/deep/ .el-collapse-item__header { |
||||
padding: 0 20px; |
||||
} |
||||
/deep/ .el-input { |
||||
width: 90%; |
||||
} |
||||
/deep/ .el-collapse-item { |
||||
margin-bottom: 10px; |
||||
padding-left: 10px; |
||||
background-color: white; |
||||
} |
||||
|
||||
/deep/ .el-collapse-item__wrap { |
||||
border-top: 1px solid #e8eaec; |
||||
} |
||||
/deep/ .upload-demo { |
||||
text-align: center; |
||||
} |
||||
/deep/ .el-upload__tip { |
||||
text-align: right; |
||||
} |
||||
.ti-box { |
||||
span { |
||||
font-size: 1rem; |
||||
} |
||||
/deep/ .el-collapse-item__wrap { |
||||
border-top: 1px solid #e8eaec; |
||||
} |
||||
/deep/ .upload-demo { |
||||
text-align: center; |
||||
} |
||||
/deep/ .el-upload__tip { |
||||
text-align: right; |
||||
} |
||||
.ti-box { |
||||
span { |
||||
font-size: 1rem; |
||||
} |
||||
} |
||||
|
||||
.dialog_op { |
||||
position: absolute; |
||||
left: 0; |
||||
bottom: 0; |
||||
width: 100%; |
||||
text-align: right; |
||||
background-color: white; |
||||
border-top: 1px solid #e8eaec; |
||||
padding: 5px; |
||||
z-index: 99999; |
||||
} |
||||
.tipsMy{ |
||||
font-size: 11px; |
||||
margin-left: 20px; |
||||
margin-top: 20px; |
||||
display: inline-block; |
||||
} |
||||
/deep/ .el-row{ |
||||
padding: 0 20px; |
||||
padding-top: 10px; |
||||
background-color: white; |
||||
box-shadow: 0px 5px 20px 0px rgba(208, 208, 208, 0.18); |
||||
} |
||||
/deep/ .el-form-item{ |
||||
display: flex; |
||||
padding-top: 20px; |
||||
} |
||||
/deep/ .el-form-item__label{ |
||||
width: 180px; |
||||
} |
||||
.myForm{ |
||||
flex: 1; |
||||
overflow: auto; |
||||
margin: 20px; |
||||
padding: 20px 0; |
||||
width: calc(100% - 40px); |
||||
/*margin-top: 0;*/ |
||||
background-color: white; |
||||
box-shadow: 0px 5px 20px 0px rgba(208, 208, 208, 0.18); |
||||
} |
||||
.dialog_op { |
||||
position: absolute; |
||||
left: 0; |
||||
bottom: 0; |
||||
width: 100%; |
||||
text-align: right; |
||||
background-color: white; |
||||
border-top: 1px solid #e8eaec; |
||||
padding: 5px; |
||||
z-index: 99999; |
||||
} |
||||
.tipsMy { |
||||
font-size: 11px; |
||||
margin-left: 20px; |
||||
margin-top: 20px; |
||||
display: inline-block; |
||||
} |
||||
/deep/ .el-row { |
||||
padding: 0 20px; |
||||
padding-top: 10px; |
||||
background-color: white; |
||||
box-shadow: 0px 5px 20px 0px rgba(208, 208, 208, 0.18); |
||||
} |
||||
/deep/ .el-form-item { |
||||
display: flex; |
||||
padding-top: 20px; |
||||
} |
||||
/deep/ .el-form-item__label { |
||||
width: 180px; |
||||
} |
||||
.myForm { |
||||
flex: 1; |
||||
overflow: auto; |
||||
margin: 20px; |
||||
padding: 20px 0; |
||||
width: calc(100% - 40px); |
||||
/*margin-top: 0;*/ |
||||
background-color: white; |
||||
box-shadow: 0px 5px 20px 0px rgba(208, 208, 208, 0.18); |
||||
} |
||||
</style> |
Loading…
Reference in new issue