数据平台接口迁移
This commit is contained in:
@ -34,3 +34,10 @@ export function export2File(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getYearMonthList() {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/compute/yearmonth',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
36
ruoyi-ui/src/api/data/lianJiaCommunity.js
Normal file
36
ruoyi-ui/src/api/data/lianJiaCommunity.js
Normal file
@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询链家小区列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/data/adrdict/lianjia/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询链家小区详细
|
||||
export function get(id) {
|
||||
return request({
|
||||
url: '/data/adrdict/lianjia/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改链家小区
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/data/adrdict/lianjia',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导出链家小区
|
||||
export function export2File(query) {
|
||||
return request({
|
||||
url: '/data/adrdict/lianjia/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询【请填写功能名称】列表
|
||||
export function listUltimate(query) {
|
||||
// 查询办公基价列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/data/compute/price/office/list',
|
||||
method: 'get',
|
||||
@ -9,25 +9,16 @@ export function listUltimate(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询【请填写功能名称】详细
|
||||
export function getUltimate(id) {
|
||||
// 查询办公基价详细
|
||||
export function getById(yearMonth, id) {
|
||||
return request({
|
||||
url: '/data/compute/price/office/' + id,
|
||||
url: '/data/compute/price/office/' + yearMonth + '/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// // 新增【请填写功能名称】
|
||||
// export function addUltimate(data) {
|
||||
// return request({
|
||||
// url: '/data/compute/price/office',
|
||||
// method: 'post',
|
||||
// data: data
|
||||
// })
|
||||
// }
|
||||
|
||||
// 修改【请填写功能名称】
|
||||
export function updateUltimate(data) {
|
||||
// 修改办公基价
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/data/compute/price/office',
|
||||
method: 'put',
|
||||
@ -35,19 +26,19 @@ export function updateUltimate(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// // 删除【请填写功能名称】
|
||||
// export function delUltimate(id) {
|
||||
// return request({
|
||||
// url: '/data/compute/price/office/' + id,
|
||||
// method: 'delete'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 导出【请填写功能名称】
|
||||
export function exportUltimate(query) {
|
||||
// 导出办公基价
|
||||
export function export2File(query) {
|
||||
return request({
|
||||
url: '/data/compute/price/office/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 年月
|
||||
export function getYearMonthList() {
|
||||
return request({
|
||||
url: '/data/compute/price/office/yearmonth',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
36
ruoyi-ui/src/api/data/ultimateResidenceRentPrice.js
Normal file
36
ruoyi-ui/src/api/data/ultimateResidenceRentPrice.js
Normal file
@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询最终住宅租赁基价列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/ultimate/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询最终住宅租赁基价详细
|
||||
export function get(id) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/ultimate/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改最终住宅租赁基价
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/ultimate',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导出最终住宅租赁基价
|
||||
export function export2File(query) {
|
||||
return request({
|
||||
url: '/data/rentprice/residence/ultimate/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
430
ruoyi-ui/src/views/data/basis/LianJiaCommunity.vue
Normal file
430
ruoyi-ui/src/views/data/basis/LianJiaCommunity.vue
Normal file
@ -0,0 +1,430 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
|
||||
<el-form-item label="链家小区ID" prop="lianJiaCommunityId" clearable>
|
||||
<el-input
|
||||
v-model="queryParams.lianJiaCommunityId"
|
||||
placeholder="请输入链家小区ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联城小区ID" prop="communityId" clearable>
|
||||
<el-input
|
||||
v-model="queryParams.communityId"
|
||||
placeholder="请输入联城小区ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="楼栋ID" prop="buildingId" clearable>
|
||||
<el-input
|
||||
v-model="queryParams.buildingId"
|
||||
placeholder="请输入楼栋ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="案例URL" prop="lianJiaUrl" clearable>
|
||||
<el-input
|
||||
v-model="queryParams.lianJiaUrl"
|
||||
placeholder="请输入案例URL"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:user:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleImport"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>导入</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="案例小区ID" align="center" prop="lianJiaCommunityId" />
|
||||
<el-table-column label="案例小区名称" align="center" prop="lianJiaCommunityName" />
|
||||
<el-table-column label="案例小区地址" align="center" prop="lianJiaCommunityAddress" />
|
||||
<el-table-column label="链家小区url" align="center" prop="lianJiaCommunityUrl" width="400">
|
||||
<template slot-scope="scope">
|
||||
<a :href="scope.row.lianJiaCommunityUrl" target="_blank">{{scope.row.lianJiaCommunityUrl}}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="链家案例url" align="center" prop="lianJiaUrl" width="400">
|
||||
<template slot-scope="scope">
|
||||
<a :href="scope.row.lianJiaUrl" target="_blank">{{scope.row.lianJiaUrl}}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联城小区id" align="center" prop="communityId" />
|
||||
<el-table-column label="联城楼栋id" align="center" prop="buildingId" />
|
||||
<el-table-column label="小区名称(不带特殊符号的)" align="center" prop="cleanCommunityName" />
|
||||
<el-table-column label="小区地址(不带特殊符号的)" align="center" prop="cleanCommunityAddress" />
|
||||
<el-table-column label="楼栋地址(不带特殊符号的)" align="center" prop="cleanBuildingAddress" />
|
||||
<el-table-column label="是否有效" align="center" prop="enable" :formatter="yesOrNotFormatter" />
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>删除</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageIndex"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改办公基价对话框 -->
|
||||
<!-- <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="160px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="小区ID">
|
||||
<el-input v-model="form.communityId" disabled="true" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="楼栋ID">
|
||||
<el-input v-model="form.buildingId" disabled="true" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力基价(元/㎡)">
|
||||
<el-input v-model="form.mainPrice" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力租金(元/月·㎡)">
|
||||
<el-input v-model="form.mainPriceRent" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力基价涨跌幅">
|
||||
<el-input v-model="form.mainPricePst" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力租金涨跌幅">
|
||||
<el-input v-model="form.mainPriceRentPst" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力基价类型">
|
||||
<el-input v-model="form.mainPriceType" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主力租金类型">
|
||||
<el-input v-model="form.mainPriceRentType" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { list, get, update, export2File } from "@/api/data/lianJiaCommunity";
|
||||
|
||||
export default {
|
||||
name: "lianJiaCommunity",
|
||||
data() {
|
||||
// 年月
|
||||
var checkYearMonth = (rule, value, callback) => {
|
||||
console.log(value);
|
||||
if (value === "" || !isNaN(parseInt(value))) {
|
||||
callback(new Error("请输入年月"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 办公基价表格数据
|
||||
dataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
lianJiaCommunityId: undefined,
|
||||
lianJiaUrl: undefined,
|
||||
communityId: undefined,
|
||||
buildingId: undefined,
|
||||
lianJiaUrl: undefined,
|
||||
pageIndex: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
statusOptions: [
|
||||
{ value: 1, text: "正常" },
|
||||
{ value: 1, text: "失效" }
|
||||
],
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url:
|
||||
process.env.VUE_APP_BASE_API +
|
||||
"/data/rentprice/residence/ultimate/importData"
|
||||
},
|
||||
// 表单参数
|
||||
form: {}
|
||||
// 表单校验
|
||||
// rules: {
|
||||
// yearMonth: [{ validator: checkYearMonth, trigger: "blur" }]
|
||||
// }
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||
if (cellValue) return "是";
|
||||
return "否";
|
||||
},
|
||||
statusFormatter: function(row, column, cellValue, index) {
|
||||
if (cellValue) return "正常";
|
||||
return "失效";
|
||||
},
|
||||
dateFormatter: function(row, column, cellValue, index) {
|
||||
if (cellValue) {
|
||||
return cellValue.substring(0, 10);
|
||||
}
|
||||
return "";
|
||||
},
|
||||
/** 查询办公基价列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
// this.$refs["queryForm"].validate(valid => {
|
||||
// if (valid) {
|
||||
// list(this.queryParams).then(response => {
|
||||
// this.dataList = response.rows;
|
||||
// this.total = response.total;
|
||||
// this.loading = false;
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
// handleAdd() {
|
||||
// this.reset();
|
||||
// this.open = true;
|
||||
// this.title = "添加办公基价";
|
||||
// },
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
get(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改办公基价";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
update(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// addUltimate(this.form).then(response => {
|
||||
// if (response.code === 200) {
|
||||
// this.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// } else {
|
||||
// this.msgError(response.msg);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm("是否确认导出所有住宅租赁基价数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return export2File(queryParams);
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
handleImport() {
|
||||
this.upload.title = "办公基价导入";
|
||||
this.upload.open = true;
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
||||
this.getList();
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
|
||||
<el-form-item label="年月" prop="yearMonth" clearable>
|
||||
<el-date-picker
|
||||
v-model="queryParams.yearMonth"
|
||||
format="yyyyMM"
|
||||
value-format="yyyyMM"
|
||||
type="month"
|
||||
placeholder="选择年月"
|
||||
@keyup.enter.native="handleQuery"
|
||||
></el-date-picker>
|
||||
<el-form :model="queryParams" :rules="rules" ref="queryForm" :inline="true" label-width="100px">
|
||||
<el-form-item label="年月" prop="yearMonth">
|
||||
<el-select v-model="queryParams.yearMonth" placeholder="请选择年月">
|
||||
<el-option
|
||||
v-for="item in yearMonthList"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联城小区ID" prop="communityId" clearable>
|
||||
<el-input
|
||||
@ -259,7 +259,8 @@ import {
|
||||
list,
|
||||
get,
|
||||
update,
|
||||
export2File
|
||||
export2File,
|
||||
getYearMonthList
|
||||
} from "@/api/data/computeResidenceRentPrice";
|
||||
|
||||
export default {
|
||||
@ -267,8 +268,9 @@ export default {
|
||||
data() {
|
||||
// 年月
|
||||
var checkYearMonth = (rule, value, callback) => {
|
||||
console.log(value);
|
||||
if (value === "" || !isNaN(parseInt(value))) {
|
||||
if (!value) {
|
||||
callback(new Error("请输入年月"));
|
||||
} else if (value === "" || isNaN(parseInt(value))) {
|
||||
callback(new Error("请输入年月"));
|
||||
} else {
|
||||
callback();
|
||||
@ -300,6 +302,7 @@ export default {
|
||||
pageIndex: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
yearMonthList: [],
|
||||
statusOptions: [
|
||||
{ value: 1, text: "正常" },
|
||||
{ value: 1, text: "失效" }
|
||||
@ -322,13 +325,18 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
yearMonth: [{ validator: checkYearMonth, trigger: "blur" }]
|
||||
yearMonth: [
|
||||
{ validator: checkYearMonth, trigger: "blur" },
|
||||
{ validator: checkYearMonth, trigger: "change" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.loading = false;
|
||||
// this.getList();
|
||||
getYearMonthList().then(response => {
|
||||
this.yearMonthList = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||
@ -346,10 +354,10 @@ export default {
|
||||
return "";
|
||||
},
|
||||
/** 查询办公基价列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
getList(formName) {
|
||||
this.$refs[formName].validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
@ -373,7 +381,7 @@ export default {
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageIndex = 1;
|
||||
this.getList();
|
||||
this.getList("queryForm");
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
|
@ -1,14 +1,15 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
|
||||
<el-form-item label="年月" prop="yearMonth" clearable>
|
||||
<el-date-picker
|
||||
v-model="queryParams.yearMonth"
|
||||
format="yyyyMM"
|
||||
type="month"
|
||||
placeholder="选择年月"
|
||||
@keyup.enter.native="handleQuery"
|
||||
></el-date-picker>
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px" :rules="rules">
|
||||
<el-form-item label="年月" prop="yearMonth">
|
||||
<el-select v-model="queryParams.yearMonth" placeholder="请选择年月">
|
||||
<el-option
|
||||
v-for="item in yearMonthList"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联城小区ID" prop="communityId" clearable>
|
||||
<el-input
|
||||
@ -71,11 +72,23 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="ultimateList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="年月" align="center" prop="yearMonth" />
|
||||
<el-table-column label="小区ID" align="center" prop="communityId" />
|
||||
<el-table-column label="楼栋ID" align="center" prop="buildingId" />
|
||||
<el-table-column label="项目名称" align="center" prop="communityName" />
|
||||
<el-table-column label="办公项目地址" align="center" prop="communityAddress" />
|
||||
<el-table-column label="楼栋地址" align="center" prop="buildingAddress" />
|
||||
<el-table-column label="区域-板块-环线-街道" align="center" :formatter="regionFormatter" width="300" />
|
||||
<el-table-column label="建成年代" align="center" prop="year" />
|
||||
<el-table-column label="平均面积" align="center" prop="avgArea" />
|
||||
<el-table-column label="总层数" align="center" prop="totalFloorSum" />
|
||||
<el-table-column label="地上层数" align="center" prop="upperFloorSum" />
|
||||
<el-table-column label="办公分类" align="center" prop="officeClass" />
|
||||
<el-table-column label="办公等级" align="center" prop="officeLevel" />
|
||||
<el-table-column label="主力基价(上期)" align="center" prop="mainPrice_1" />
|
||||
<el-table-column label="主力租金(上期)" align="center" prop="mainPriceRent_1" />
|
||||
<el-table-column label="主力基价" align="center" prop="mainPrice" />
|
||||
<el-table-column label="主力租金" align="center" prop="mainPriceRent" />
|
||||
<el-table-column label="主力基价涨跌幅" align="center" prop="mainPricePst" />
|
||||
@ -208,15 +221,27 @@
|
||||
<script>
|
||||
import { getToken } from "@/utils/auth";
|
||||
import {
|
||||
listUltimate,
|
||||
getUltimate,
|
||||
updateUltimate,
|
||||
exportUltimate
|
||||
list,
|
||||
getById,
|
||||
update,
|
||||
export2File,
|
||||
getYearMonthList
|
||||
} from "@/api/data/ultimateOfficeBasePrice";
|
||||
|
||||
export default {
|
||||
name: "Ultimate",
|
||||
data() {
|
||||
// 年月
|
||||
var checkYearMonth = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error("请输入年月"));
|
||||
} else if (value === "" || isNaN(parseInt(value))) {
|
||||
callback(new Error("请输入年月"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -234,6 +259,7 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
yearMonthList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
yearMonth: undefined,
|
||||
@ -262,13 +288,33 @@ export default {
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
rules: {
|
||||
yearMonth: [
|
||||
{ validator: checkYearMonth, trigger: "blur" },
|
||||
{ validator: checkYearMonth, trigger: "change" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.loading = false;
|
||||
getYearMonthList().then(response => {
|
||||
this.yearMonthList = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
regionFormatter: function(row, column, cellValue, index) {
|
||||
// 区域-板块-环线-街道
|
||||
return (
|
||||
row["countyName"] +
|
||||
"-" +
|
||||
row["blockName"] +
|
||||
"-" +
|
||||
row["loopName"] +
|
||||
"-" +
|
||||
row["streetName"]
|
||||
);
|
||||
},
|
||||
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||
if (cellValue) return "是";
|
||||
return "否";
|
||||
@ -285,11 +331,15 @@ export default {
|
||||
},
|
||||
/** 查询办公基价列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listUltimate(this.queryParams).then(response => {
|
||||
this.ultimateList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
@ -320,17 +370,12 @@ export default {
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
// handleAdd() {
|
||||
// this.reset();
|
||||
// this.open = true;
|
||||
// this.title = "添加办公基价";
|
||||
// },
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getUltimate(id).then(response => {
|
||||
const yearMonth = row.yearMonth;
|
||||
getById(yearMonth, id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改办公基价";
|
||||
@ -340,27 +385,15 @@ export default {
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updateUltimate(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addUltimate(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
update(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -373,7 +406,7 @@ export default {
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return exportUltimate(queryParams);
|
||||
return export2File(queryParams);
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
@ -5,6 +5,7 @@
|
||||
<el-date-picker
|
||||
v-model="queryParams.yearMonth"
|
||||
format="yyyyMM"
|
||||
value-format="yyyyMM"
|
||||
type="month"
|
||||
placeholder="选择年月"
|
||||
@keyup.enter.native="handleQuery"
|
||||
@ -19,21 +20,6 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联城楼栋ID" prop="buildingId" clearable>
|
||||
<el-input
|
||||
v-model="queryParams.buildingId"
|
||||
placeholder="请输入联城楼栋ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-option label="正常" value="1"></el-option>
|
||||
<el-option label="失效" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -48,7 +34,7 @@
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:ultimate:edit']"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -71,26 +57,39 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="ultimateList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="年月" align="center" prop="yearMonth" />
|
||||
<el-table-column label="小区ID" align="center" prop="communityId" />
|
||||
<el-table-column label="楼栋ID" align="center" prop="buildingId" />
|
||||
<el-table-column label="主力基价" align="center" prop="mainPrice" />
|
||||
<el-table-column label="主力租金" align="center" prop="mainPriceRent" />
|
||||
<el-table-column label="主力基价涨跌幅" align="center" prop="mainPricePst" />
|
||||
<el-table-column label="主力租金涨跌幅" align="center" prop="mainPriceRentPst" />
|
||||
<el-table-column label="主力基价类型" align="center" prop="mainPriceType" />
|
||||
<el-table-column label="主力租金类型" align="center" prop="mainPriceRentType" />
|
||||
<el-table-column label="小区名称" align="center" prop="communityName" />
|
||||
<el-table-column label="小区地址" align="center" prop="communityAddress" />
|
||||
|
||||
<el-table-column label="区域" align="center" prop="county" />
|
||||
<el-table-column label="板块" align="center" prop="block" />
|
||||
<el-table-column label="环线" align="center" prop="loop" />
|
||||
<el-table-column label="国际社区分" align="center" prop="loop" />
|
||||
<el-table-column label="重点小学名称" align="center" prop="loop" />
|
||||
<el-table-column label="物业档次" align="center" prop="loop" />
|
||||
<el-table-column label="室数量-AI" align="center" prop="loop" />
|
||||
|
||||
<el-table-column label="标准基价(元/㎡·月)" align="center" prop="rentPrice" />
|
||||
<el-table-column label="平均租金(元/㎡·月)" align="center" prop="rentPrice" />
|
||||
<el-table-column label="散租挂牌案例" align="center" prop="散租挂牌案例" />
|
||||
<el-table-column label="租金涨跌幅" align="center" prop="voppa" />
|
||||
<el-table-column label="租金-工房1室" align="center" prop="gf_1Room" />
|
||||
<el-table-column label="租金-工房2室" align="center" prop="gf_2Room" />
|
||||
<el-table-column label="租金-公寓2室" align="center" prop="gy_2Room" />
|
||||
<el-table-column label="租金-公寓3室" align="center" prop="gy_3Room" />
|
||||
<el-table-column label="租金-1房" align="center" prop="one_Room" />
|
||||
<el-table-column label="租金-2房" align="center" prop="two_Room" />
|
||||
<el-table-column label="租金-3房" align="center" prop="three_Room" />
|
||||
<el-table-column label="整租比" align="center" prop="entireRentRatio" />
|
||||
<el-table-column label="整租案例" align="center" prop="entireRentNum" />
|
||||
<el-table-column label="分租比" align="center" prop="shareRentRatio" />
|
||||
<el-table-column label="分租案例" align="center" prop="shareRentNum" />
|
||||
<el-table-column label="租售比" align="center" prop="saleRentRatio" />
|
||||
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormatter" />
|
||||
<el-table-column
|
||||
label="标准楼栋"
|
||||
align="center"
|
||||
prop="standardBuilding"
|
||||
:formatter="yesOrNotFormatter"
|
||||
/>
|
||||
<el-table-column label="价格更改说明" align="center" prop="adjustPriceComment" />
|
||||
<el-table-column label="更新日期" align="center" prop="updateDate" :formatter="dateFormatter" />
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -114,13 +113,13 @@
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:page.sync="queryParams.pageIndex"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改办公基价对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<!-- <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="160px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
@ -201,22 +200,32 @@
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from "@/utils/auth";
|
||||
import {
|
||||
listUltimate,
|
||||
getUltimate,
|
||||
updateUltimate,
|
||||
exportUltimate
|
||||
} from "@/api/data/ultimateOfficeBasePrice";
|
||||
list,
|
||||
get,
|
||||
update,
|
||||
export2File
|
||||
} from "@/api/data/ultimateResidenceRentPrice";
|
||||
|
||||
export default {
|
||||
name: "Ultimate",
|
||||
name: "computeResidenceRentBasePrice",
|
||||
data() {
|
||||
// 年月
|
||||
var checkYearMonth = (rule, value, callback) => {
|
||||
console.log(value);
|
||||
if (value === "" || !isNaN(parseInt(value))) {
|
||||
callback(new Error("请输入年月"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -229,7 +238,7 @@ export default {
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 办公基价表格数据
|
||||
ultimateList: [],
|
||||
dataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -238,8 +247,8 @@ export default {
|
||||
queryParams: {
|
||||
yearMonth: undefined,
|
||||
communityId: undefined,
|
||||
buildingId: undefined,
|
||||
pageNum: 1,
|
||||
communityName: undefined,
|
||||
pageIndex: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
statusOptions: [
|
||||
@ -257,16 +266,20 @@ export default {
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url:
|
||||
process.env.VUE_APP_BASE_API + "/data/compute/price/office/importData"
|
||||
process.env.VUE_APP_BASE_API +
|
||||
"/data/rentprice/residence/ultimate/importData"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
rules: {
|
||||
yearMonth: [{ validator: checkYearMonth, trigger: "blur" }]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.loading = false;
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
yesOrNotFormatter: function(row, column, cellValue, index) {
|
||||
@ -286,10 +299,14 @@ export default {
|
||||
/** 查询办公基价列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listUltimate(this.queryParams).then(response => {
|
||||
this.ultimateList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
this.$refs["queryForm"].validate(valid => {
|
||||
if (valid) {
|
||||
list(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
@ -306,7 +323,7 @@ export default {
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
@ -330,7 +347,7 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getUltimate(id).then(response => {
|
||||
get(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改办公基价";
|
||||
@ -341,7 +358,7 @@ export default {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updateUltimate(this.form).then(response => {
|
||||
update(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -351,15 +368,15 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addUltimate(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
// addUltimate(this.form).then(response => {
|
||||
// if (response.code === 200) {
|
||||
// this.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// } else {
|
||||
// this.msgError(response.msg);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -367,13 +384,13 @@ export default {
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm("是否确认导出所有办公基价数据项?", "警告", {
|
||||
this.$confirm("是否确认导出所有住宅租赁基价数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return exportUltimate(queryParams);
|
||||
return export2File(queryParams);
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
Reference in New Issue
Block a user