Browse Source

21.04

develop
zhangjy 4 years ago
parent
commit
604b345bce
  1. 14
      src/router/views/index.js
  2. 35
      src/views/bigdata/city/index.vue
  3. 458
      src/views/bigdata/city/newCity.vue
  4. 7
      src/views/company/auction/api/api.js
  5. 27
      src/views/company/auction/index.vue
  6. 1026
      src/views/company/auction/insert.vue
  7. 3
      src/views/land/handLand/newLand.vue

14
src/router/views/index.js

@ -92,4 +92,18 @@ export default [{
import( /* webpackChunkName: "views" */ '../../views/land/noneHandLand/newLand')
},]
},
{
path: '/bigdata',
component: Layout,
redirect: '/bigdata',
children: [{
path: 'city/newCity',
name: '新增城市',
meta: {
keepAlive: false
},
component: () =>
import( /* webpackChunkName: "views" */ '@/views/bigdata/city/newCity')
}, ]
},
]

35
src/views/bigdata/city/index.vue

@ -430,22 +430,25 @@ export default {
//
newItem() {
this.$router.push({path:'/bigdata/city/newCity',query:{readOnly:'false',isEditOr:'false',}});
// cols
let newObj = {};
for (let col of this.cols) {
newObj[col.prop] = "";
}
this.editForm = newObj;
this.readOnly = false;
this.dialogFormVisible = true;
// 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;
// this.dialogTitle = "";
let data=JSON.stringify(row)
this.$router.push({path:'/bigdata/city/newCity',query:{readOnly:'false',isEditOr:'true',data:data}});
// this.readOnly = false;
// this.dialogFormVisible = true;
// this.editForm = row;
},
//
@ -457,10 +460,12 @@ export default {
//
viewItem(row) {
this.dialogTitle = "查看数据";
this.readOnly = true;
this.dialogFormVisible = true;
this.editForm = row;
let data=JSON.stringify(row)
this.$router.push({path:'/bigdata/city/newCity',query:{readOnly:'true',isEditOr:'false',data:data}});
// this.dialogTitle = "";
// this.readOnly = true;
// this.dialogFormVisible = true;
// this.editForm = row;
},
//

458
src/views/bigdata/city/newCity.vue

@ -0,0 +1,458 @@
<template>
<div>
<span class="tipsMy">*数据为必填项</span>
<el-form
:model="editForm"
style="flex: 1; overflow: auto; margin: 20px;width: calc(100% - 40px);margin-top: 0;"
:disabled="readOnly">
<el-row>
<el-col :span="8">
<el-form-item label="年份:">
<el-input v-model="editForm.year"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="城市:">
<el-input v-model="editForm.city"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="GDP(亿元):">
<el-input v-model="editForm.gdp"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="GDP增速(%):">
<el-input v-model="editForm.gdpGrowth"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="第一产业(亿元):">
<el-input v-model="editForm.primaryIndustry"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="第二产业(亿元):">
<el-input v-model="editForm.secondIndustry"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="第三产业(亿元):">
<el-input v-model="editForm.thirdIndustry"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="城镇常住人口(万人):">
<el-input v-model="editForm.urbanResidents"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="常住人口(万人):">
<el-input v-model="editForm.resident"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="城镇化率:">
<el-input v-model="editForm.urbanRate"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="主城九区常住人口(万人):">
<el-input v-model="editForm.mainUrbanResidents"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="城镇居民人均收入(元):">
<el-input v-model="editForm.urbanPerIncome"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="城镇居民收入增速(%):">
<el-input v-model="editForm.urbanIncomeIncrease"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="房地产投资额(亿元):">
<el-input v-model="editForm.realEstateInvest"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="固定资产投资额(亿元):">
<el-input v-model="editForm.fixedInvestments"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-bottom: 40px;">
<el-col :span="8">
<el-form-item label="房地产占比:">
<el-input v-model="editForm.perRealestate"></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="save" v-show="!readOnly"
>保存</el-button
>
</div>
</div>
</template>
<script>
import {
queryList,
addData,
updateData,
delData,
exportHandLandToListExcel,
downloadHandLandTemplate,
} from "@/views/bigdata/api/city";
export default {
name: "newCity",
data() {
return {
searchForm: {
//
annoId: "",
//
landCode: "",
//
landUsage: "",
//
annoDate: "",
},
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, //
},
//
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;
}
},
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;
},
//
delItem(row) {
delData(row.data_id).then((res) => {
console.debug(res);
});
},
//
viewItem(row) {
this.dialogTitle = "查看数据";
this.readOnly = true;
this.dialogFormVisible = true;
this.editForm = row;
},
//
save() {
if (!this.$route.query.isEditOr) {
addData(this.editForm).then((res) => {
this.dialogFormVisible = false;
if (res.data.success) {
this.$message("保存成功");
window.history.back()
} else {
console.debug(res);
this.$message.error("保存失败");
}
});
} else{
updateData(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"]);
}
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__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;
margin-top: 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;
}
</style>

7
src/views/company/auction/api/api.js

@ -8,4 +8,11 @@ export function queryList(param) {
params: param
})
}
export function putAuction(param) {
return request({
url: '/api/auction_record',
method: 'post',
data: param
})
}

27
src/views/company/auction/index.vue

@ -65,7 +65,7 @@
</div>
<div>
<el-button
><img src="@public/img/land/u1401.png" />导入</el-button
><img style="margin-right: 5px;" src="@public/img/land/u1401.png" />导入</el-button
>
</div>
<div>
@ -294,13 +294,11 @@ export default {
label: "成交时间",
prop: "landName",
width: 150,
fixed: true,
},
{
label: "举牌排名",
prop: "landName",
width: 150,
fixed: true,
},
{
label: "举牌企业",
@ -417,15 +415,18 @@ export default {
// this.editForm = newObj;
// this.readOnly = false;
// this.dialogFormVisible = true;
this.$router.push("/company/auction/insert");
this.$router.push({path:'/company/auction/insert',query:{readOnly:'false',isEditOr:'false',}});
// this.$router.push("/company/auction/insert");
},
//
editItem(row) {
this.dialogTitle = "编辑数据";
this.readOnly = false;
this.dialogFormVisible = true;
this.editForm = row;
let data=JSON.stringify(row)
this.$router.push({path:'/company/auction/insert',query:{readOnly:'false',isEditOr:'true',data:data}});
// this.dialogTitle = "";
// this.readOnly = false;
// this.dialogFormVisible = true;
// this.editForm = row;
},
//
@ -437,10 +438,12 @@ export default {
//
viewItem(row) {
this.dialogTitle = "查看数据";
this.readOnly = true;
this.dialogFormVisible = true;
this.editForm = row;
let data=JSON.stringify(row)
this.$router.push({path:'/company/auction/insert',query:{readOnly:'true',isEditOr:'false',data:data}});
// this.dialogTitle = "";
// this.readOnly = true;
// this.dialogFormVisible = true;
// this.editForm = row;
},
//

1026
src/views/company/auction/insert.vue

File diff suppressed because it is too large Load Diff

3
src/views/land/handLand/newLand.vue

@ -1766,8 +1766,7 @@
saveHandLandList(JSON.stringify(this.editForm),type).then((res) => {
if (res.data.success) {
this.$message("保存成功");
this.dialogFormVisible = false;
this.onSubmit();
window.history.back()
} else {
this.$message.error("保存失败");
}

Loading…
Cancel
Save