Browse Source

智能填报

feature
dai 3 years ago
parent
commit
4d7dc61c3a
  1. 17
      src/views/modules/base/community/buildTable.vue
  2. 18
      src/views/modules/base/community/communityTable.vue
  3. 28
      src/views/modules/base/community/roomTable.vue
  4. 21
      src/views/modules/base/resi.vue
  5. 138
      src/views/modules/cpts/baobiao/index.vue

17
src/views/modules/base/community/buildTable.vue

@ -57,6 +57,9 @@
size="small"
:disabled="yihuyidangDisabled"
@click="handleExportYihuyidang()">导出一户一档</el-button>
<el-button size="small"
class="diy-button--add"
@click="reportForm">智能填报</el-button>
</div>
<div class="div_table_item">
@ -194,6 +197,7 @@
@dialogOk="addFormOk"></build-form>
</el-dialog>
<baobiao ref="baobiao" />
</div>
</template>
@ -204,6 +208,7 @@ import BuildForm from './buildForm'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import baobiao from "@/views/modules/cpts/baobiao";
let loading //
export default {
@ -233,6 +238,7 @@ export default {
}
},
components: {
baobiao,
BuildForm
},
async mounted () {
@ -248,6 +254,17 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
reportForm(){
let paramMap = {
neighborHoodId: this.agencyObj.id
};
this.$refs.baobiao.init({
elseParams: {
categoryKeys:['house_info'], categoryKey: 'house_info', paramMap
}
})
},
indexMethod (index) {
return index + 1;
},

18
src/views/modules/base/community/communityTable.vue

@ -88,6 +88,9 @@
:disabled="yihuyidangDisabled"
@click="handleExportYihuyidang()">导出一户一档</el-button> -->
<el-button size="small"
class="diy-button--add"
@click="reportForm">智能填报</el-button>
</div>
<div class="div_table_item">
@ -214,6 +217,7 @@
</span>
</el-dialog>
<baobiao ref="baobiao" />
</div>
</template>
@ -225,6 +229,7 @@ import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import axios from 'axios'
import baobiao from "@/views/modules/cpts/baobiao";
let loading //
export default {
@ -265,6 +270,7 @@ export default {
}
},
components: {
baobiao,
CommunityForm
},
async mounted () {
@ -279,7 +285,17 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
reportForm(){
let paramMap = {
level: this.agencyObj.level,
id: this.agencyObj.id
};
this.$refs.baobiao.init({
elseParams: {
categoryKeys:['house_info'], categoryKey: 'house_info', paramMap
}
})
},
async loadTable (fromTree, treeObj) {
console.log(111, this.staffAgencyId)
//

28
src/views/modules/base/community/roomTable.vue

@ -40,6 +40,9 @@
size="small"
:disabled="yihuyidangDisabled"
@click="handleExportYihuyidang()">导出一户一档</el-button>
<el-button size="small"
class="diy-button--add"
@click="reportForm">智能填报</el-button>
</div>
<div class="div_table_item ">
@ -187,16 +190,16 @@
@dialogOk="addFormOk"></room-form>
</el-dialog>
<baobiao ref="baobiao" />
</div>
</template>
<script>
import roomForm from './roomForm'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import baobiao from "@/views/modules/cpts/baobiao";
let loading //
export default {
@ -242,11 +245,10 @@ export default {
],
yihuyidangDisabled: false,
}
},
components: {
baobiao,
roomForm
},
async mounted () {
@ -261,6 +263,24 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
reportForm(){
let paramMap = {
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
rentFlag: this.rentFlag,
purpose: this.purpose,
remark: this.remark,
updateStartDate: this.updateStartDate,
updateEndDate: this.updateEndDate,
buildingId: this.agencyObj.id
};
this.$refs.baobiao.init({
elseParams: {
categoryKeys:['house_info'], categoryKey: 'house_info', paramMap
}
})
},
indexMethod (index) {
return index + 1;
},

21
src/views/modules/base/resi.vue

@ -77,6 +77,9 @@
@click="deleteBatch">批量删除</el-button>
<!-- <el-button type="primary" size="small">下载人口模板</el-button> -->
<el-button size="small"
class="diy-button--add"
@click="reportForm">智能填报</el-button>
</div>
<el-table ref="ref_table"
:data="tableData"
@ -315,7 +318,7 @@
:userId="lookInfo.userId"
:gridName="lookInfo.gridName"
@close="handleCancleLook" />
<baobiao ref="baobiao" />
</div>
</template>
@ -329,11 +332,13 @@ import { mapGetters } from 'vuex'
import resiTransfer from '../../components/resiTransfer.vue'
import resiChangeRecord from '../../components/resiChangeRecord.vue'
import peopleMore from "@/views/modules/shequ/cpts/people-more";
import baobiao from "@/views/modules/cpts/baobiao";
import diyInfo from './diyInfo.vue'
import { requestPost } from "@/js/dai/request";
export default {
components: {
baobiao,
resiSearch,
resiForm,
editResi,
@ -394,7 +399,7 @@ export default {
lookInfo: {
userId: '',
gridName: ''
}
},
}
},
props: {
@ -449,6 +454,18 @@ export default {
console.log('document.documentElement.clientWidth', document.documentElement.clientHeight)
},
methods: {
reportForm(){
this.$refs.baobiao.init({
elseParams: {
categoryKeys:['resi_info'], categoryKey: 'resi_info', paramMap:{
formCode: 'resi_base_info',
pageNo: this.currentPage,
pageSize: this.pageSize,
conditions: this.conditions
}
}
})
},
checkSelect (row, index) {
return row.isChecked

138
src/views/modules/cpts/baobiao/index.vue

@ -0,0 +1,138 @@
<template>
<el-dialog
:visible.sync="visible"
:title="'智能填表'"
:close-on-click-modal="true"
:close-on-press-escape="true"
width="850px"
:top="diaTop"
>
<el-table
v-loading="loading"
:data="list"
row-key="id"
border
:height="tableHeight"
style="width: 100%"
>
<el-table-column type="index" label="序号" width="50" />
<el-table-column
prop="reportName"
label="模板名称"
header-align="center"
min-width="150"
></el-table-column>
<el-table-column
label="客户配置"
fixed="right"
header-align="center"
align="center"
width="150"
>
<template slot-scope="scope">
<el-button type="text" size="small" @click="fillIn(scope.row)"
>填写</el-button
>
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost, requestGet } from "@/js/dai/request";
import { mapGetters } from "vuex";
export default {
data() {
return {
loading: false,
visible: false,
list: [], //
elseParams: {},
};
},
computed: {
tableHeight() {
// return this.resolution === 'small' ? this.clientHeight - 210 : this.clientHeight - 220
return this.clientHeight - 300;
},
diaWidth() {
return this.resolution === "small" ? 60 : 50;
},
diaHeight() {
return this.resolution === "small" ? 350 : 600;
},
diaTop() {
return this.resolution === "small" ? "30px" : "100px";
},
...mapGetters(["clientHeight", "resolution"]),
},
mounted() {},
methods: {
async init(row) {
console.log("1111111111", row);
const { elseParams } = row;
this.visible = true;
this.elseParams = { ...elseParams };
this.customerList = [];
await this.getList();
},
//
async getList() {
this.loading = true;
const { elseParams } = this;
const { data, code, msg } = await requestPost(
"/oper/customize/icCustomerReport/report-list",
{
...elseParams,
}
);
this.loading = false;
if (code === 0) {
this.list = data.map((item) => {
return item;
});
} else {
this.$message.error(msg);
}
},
async fillIn(item) {
const { reportId } = item;
const url = "/oper/customize/icCustomerReport/preview";
const parmas = {
...this.elseParams,
reportId,
};
const { data, code, msg } = await requestPost(url, parmas);
if (code === 0) {
let token = localStorage.getItem("token");
let prefix = window.SITE_CONFIG["apiURL"].slice(0, -4);
window.open(
`${prefix}/jmreport/view/${reportId}?token=${token}&paramKey=${data.paramKey}`
);
// this.visible = false;
this.$emit("afterFillIn");
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" scoped></style>
Loading…
Cancel
Save