Browse Source

用接口

feature
zhangyuan 3 years ago
parent
commit
96508e564b
  1. 556
      src/views/modules/base/community/communityExportInfo.vue
  2. 114
      src/views/modules/base/community/communityTable.vue
  3. 2
      src/views/modules/base/diyInfo.vue
  4. 2
      src/views/modules/base/resi copy.vue
  5. 2
      src/views/modules/base/resi.vue

556
src/views/modules/base/community/communityExportInfo.vue

@ -104,6 +104,8 @@
<el-input v-model="form.name"
maxlength="20"
class="wd200 mr10" />
<div>自定义表头</div>
<el-input v-model="form.title" maxlength="20" class="wd200 mr10" />
<el-checkbox v-model="form.isSaveTemp">保存为常用模板</el-checkbox>
</div>
</div>
@ -371,7 +373,7 @@ export default {
},
async getTemplateList () {
let params = {
formCode: 'resi_base_info'
formCode: 'community_info'
}
await this.$http
.post('/oper/customize/icExportTemplate/templateList', params)
@ -427,277 +429,291 @@ export default {
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let dataTemp = []
if (groupId === '45687aa479955f9d06204d415238f7cc_0') {
dataTemp = [
{
columnName: "GRID_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
itemId: "20220422102809_1001",
itemType: null,
label: "所属组织",
optionSourceType: "remote",
optionSourceValue: "/gov/org/customergrid/gridoption",
options: null,
sort: 0,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "VILLAGE_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
itemId: "20220422102809_1002",
itemType: null,
label: "所属网格",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityQuarters/listQuartersOptions?20220422102809_1001",
options: null,
sort: 1,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "BUILD_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
itemId: "20220422102809_1003",
itemType: null,
label: "小区名称",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityBuilding/buildingoption?20220422102809_1002",
options: null,
sort: 2,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "UNIT_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
itemId: "20220422102809_10031",
itemType: null,
label: "关联物业",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityBuildingUnit/unitoption?20220422102809_1003",
options: null,
sort: 3,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "HOME_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
itemId: "20220422102809_1004",
itemType: null,
label: "详细地址",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityHouse/houseoption?20220422102809_10031",
options: null,
sort: 4,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "IS_BDHJ",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
itemId: "20220422102809_1005",
itemType: null,
label: "备注",
optionSourceType: "local",
optionSourceValue: "options表取",
options: null,
sort: 5,
supportAdd: false,
tableName: "ic_resi_user",
},
]
}
if (groupId === '20220422102809_101') {
dataTemp = [
{
columnName: "GRID_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_101",
itemId: "20220422102809_1001",
itemType: null,
label: "所属小区",
optionSourceType: "remote",
optionSourceValue: "/gov/org/customergrid/gridoption",
options: null,
sort: 0,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "VILLAGE_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_101",
itemId: "20220422102809_1002",
itemType: null,
label: "楼栋名称",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityQuarters/listQuartersOptions?20220422102809_1001",
options: null,
sort: 1,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "BUILD_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_101",
itemId: "20220422102809_1003",
itemType: null,
label: "楼栋类型",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityBuilding/buildingoption?20220422102809_1002",
options: null,
sort: 2,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "UNIT_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_101",
itemId: "20220422102809_10031",
itemType: null,
label: "单元数",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityBuildingUnit/unitoption?20220422102809_1003",
options: null,
sort: 3,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "HOME_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_101",
itemId: "20220422102809_1004",
itemType: null,
label: "楼栋地址",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityHouse/houseoption?20220422102809_10031",
options: null,
sort: 4,
supportAdd: false,
tableName: "ic_resi_user",
},
]
}
if (groupId === '20220422102809_102') {
dataTemp = [
{
columnName: "GRID_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_102",
itemId: "20220422102809_1001",
itemType: null,
label: "所属楼栋",
optionSourceType: "remote",
optionSourceValue: "/gov/org/customergrid/gridoption",
options: null,
sort: 0,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "VILLAGE_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_102",
itemId: "20220422102809_1002",
itemType: null,
label: "单元号",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityQuarters/listQuartersOptions?20220422102809_1001",
options: null,
sort: 1,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "BUILD_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_102",
itemId: "20220422102809_1003",
itemType: null,
label: "门牌号",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityBuilding/buildingoption?20220422102809_1002",
options: null,
sort: 2,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "UNIT_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_102",
itemId: "20220422102809_10031",
itemType: null,
label: "房屋类型",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityBuildingUnit/unitoption?20220422102809_1003",
options: null,
sort: 3,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "HOME_ID",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_102",
itemId: "20220422102809_1004",
itemType: null,
label: "房屋用途",
optionSourceType: "remote",
optionSourceValue: "/actual/base/communityHouse/houseoption?20220422102809_10031",
options: null,
sort: 4,
supportAdd: false,
tableName: "ic_resi_user",
},
{
columnName: "IS_BDHJ",
customerId: "45687aa479955f9d06204d415238f7cc",
itemGroupId: "20220422102809_102",
itemId: "20220422102809_1005",
itemType: null,
label: "房屋状态",
optionSourceType: "local",
optionSourceValue: "options表取",
options: null,
sort: 5,
supportAdd: false,
tableName: "ic_resi_user",
},
]
}
return dataTemp
data.forEach((item) => {
(async (id) => {
// item.queryItemList = await this.getExportChildList(id)
item.queryItemList = [];
})(item.id);
});
this.exportList = [...data];
this.$nextTick(() => {
this.diyDialog = true;
});
console.log("获取详情成功getExportList----", this.exportList);
} else {
this.$message.error(msg)
}
this.$message.error(msg);
}
// if (code === 0) {
// let dataTemp = []
//
// if (groupId === '45687aa479955f9d06204d415238f7cc_0') {
// dataTemp = [
// {
// columnName: "GRID_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
// itemId: "20220422102809_1001",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/gov/org/customergrid/gridoption",
// options: null,
// sort: 0,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
// {
// columnName: "VILLAGE_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
// itemId: "20220422102809_1002",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityQuarters/listQuartersOptions?20220422102809_1001",
// options: null,
// sort: 1,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
// {
// columnName: "BUILD_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
// itemId: "20220422102809_1003",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityBuilding/buildingoption?20220422102809_1002",
// options: null,
// sort: 2,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
// {
// columnName: "UNIT_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
// itemId: "20220422102809_10031",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityBuildingUnit/unitoption?20220422102809_1003",
// options: null,
// sort: 3,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
// {
// columnName: "HOME_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
// itemId: "20220422102809_1004",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityHouse/houseoption?20220422102809_10031",
// options: null,
// sort: 4,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
// {
// columnName: "IS_BDHJ",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "45687aa479955f9d06204d415238f7cc_0",
// itemId: "20220422102809_1005",
// itemType: null,
// label: "",
// optionSourceType: "local",
// optionSourceValue: "options",
// options: null,
// sort: 5,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
//
// ]
// }
//
// if (groupId === '20220422102809_101') {
// dataTemp = [
// {
// columnName: "GRID_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_101",
// itemId: "20220422102809_1001",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/gov/org/customergrid/gridoption",
// options: null,
// sort: 0,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
//
// {
// columnName: "VILLAGE_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_101",
// itemId: "20220422102809_1002",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityQuarters/listQuartersOptions?20220422102809_1001",
// options: null,
// sort: 1,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
//
// {
// columnName: "BUILD_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_101",
// itemId: "20220422102809_1003",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityBuilding/buildingoption?20220422102809_1002",
// options: null,
// sort: 2,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
//
// {
// columnName: "UNIT_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_101",
// itemId: "20220422102809_10031",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityBuildingUnit/unitoption?20220422102809_1003",
// options: null,
// sort: 3,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
//
// {
// columnName: "HOME_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_101",
// itemId: "20220422102809_1004",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityHouse/houseoption?20220422102809_10031",
// options: null,
// sort: 4,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
// ]
// }
//
// if (groupId === '20220422102809_102') {
// dataTemp = [
// {
// columnName: "GRID_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_102",
// itemId: "20220422102809_1001",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/gov/org/customergrid/gridoption",
// options: null,
// sort: 0,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
//
// {
// columnName: "VILLAGE_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_102",
// itemId: "20220422102809_1002",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityQuarters/listQuartersOptions?20220422102809_1001",
// options: null,
// sort: 1,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
//
// {
// columnName: "BUILD_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_102",
// itemId: "20220422102809_1003",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityBuilding/buildingoption?20220422102809_1002",
// options: null,
// sort: 2,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
//
// {
// columnName: "UNIT_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_102",
// itemId: "20220422102809_10031",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityBuildingUnit/unitoption?20220422102809_1003",
// options: null,
// sort: 3,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
//
// {
// columnName: "HOME_ID",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_102",
// itemId: "20220422102809_1004",
// itemType: null,
// label: "",
// optionSourceType: "remote",
// optionSourceValue: "/actual/base/communityHouse/houseoption?20220422102809_10031",
// options: null,
// sort: 4,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
// {
// columnName: "IS_BDHJ",
// customerId: "45687aa479955f9d06204d415238f7cc",
// itemGroupId: "20220422102809_102",
// itemId: "20220422102809_1005",
// itemType: null,
// label: "",
// optionSourceType: "local",
// optionSourceValue: "options",
// options: null,
// sort: 5,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
// ]
// }
//
// return dataTemp
//
// } else {
// this.$message.error(msg)
// }
},
formatData (res) {
const fileReader = new FileReader()

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

@ -756,66 +756,21 @@ export default {
},
async getExportList (type) {
const url = "/oper/customize//icformitemgroup/list";
const url = "/oper/customize/icformitemgroup/list";
let params = {
formCode: "resi_base_info",
formCode: "community_info",
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
//
let dataTemp = [
{
childShowFlag: "0",
customerId: "45687aa479955f9d06204d415238f7cc",
display: false,
formCode: "resi_base_info",
formId: "20220422102809_1",
groupCode: "jcxx",
id: "45687aa479955f9d06204d415238f7cc_0",
label: "小区信息",
policyFlag: "1",
sort: 0,
supportAdd: false,
tableName: "ic_resi_user"
},
{
childShowFlag: "0",
customerId: "45687aa479955f9d06204d415238f7cc",
display: true,
formCode: "resi_base_info",
formId: "20220422102809_1",
groupCode: "jyxx",
id: "20220422102809_101",
label: "楼栋信息",
policyFlag: "1",
sort: 1,
supportAdd: false,
tableName: "ic_resi_user",
},
{
childShowFlag: "0",
customerId: "45687aa479955f9d06204d415238f7cc",
display: true,
formCode: "resi_base_info",
formId: "20220422102809_1",
groupCode: "xqah",
id: "20220422102809_102",
label: "房屋信息",
policyFlag: "1",
sort: 2,
supportAdd: false,
tableName: "ic_resi_user",
}
]
dataTemp.forEach((item) => {
data.forEach((item) => {
(async (id) => {
// item.queryItemList = await this.getExportChildList(id)
item.queryItemList = [];
})(item.id);
});
this.exportList = [...dataTemp];
this.exportList = [...data];
this.$nextTick(() => {
this.diyDialog = true;
});
@ -823,6 +778,67 @@ export default {
} else {
this.$message.error(msg);
}
// if (code === 0) {
// //
// let dataTemp = [
// {
// childShowFlag: "0",
// customerId: "45687aa479955f9d06204d415238f7cc",
// display: false,
// formCode: "resi_base_info",
// formId: "20220422102809_1",
// groupCode: "jcxx",
// id: "45687aa479955f9d06204d415238f7cc_0",
// label: "",
// policyFlag: "1",
// sort: 0,
// supportAdd: false,
// tableName: "ic_resi_user"
// },
// {
// childShowFlag: "0",
// customerId: "45687aa479955f9d06204d415238f7cc",
// display: true,
// formCode: "resi_base_info",
// formId: "20220422102809_1",
// groupCode: "jyxx",
// id: "20220422102809_101",
// label: "",
// policyFlag: "1",
// sort: 1,
// supportAdd: false,
// tableName: "ic_resi_user",
// },
// {
// childShowFlag: "0",
// customerId: "45687aa479955f9d06204d415238f7cc",
// display: true,
// formCode: "resi_base_info",
// formId: "20220422102809_1",
// groupCode: "xqah",
// id: "20220422102809_102",
// label: "",
// policyFlag: "1",
// sort: 2,
// supportAdd: false,
// tableName: "ic_resi_user",
// }
// ]
// dataTemp.forEach((item) => {
// (async (id) => {
// // item.queryItemList = await this.getExportChildList(id)
// item.queryItemList = [];
// })(item.id);
// });
// this.exportList = [...dataTemp];
// this.$nextTick(() => {
// this.diyDialog = true;
// });
// console.log("getExportList----", this.exportList);
// } else {
// this.$message.error(msg);
// }
},
//
async handleExport () {

2
src/views/modules/base/diyInfo.vue

@ -84,6 +84,8 @@
<div class="flex-div">
<div>模板名称</div>
<el-input v-model="form.name" maxlength="20" class="wd200 mr10" />
<div>自定义表头</div>
<el-input v-model="form.title" maxlength="20" class="wd200 mr10" />
<el-checkbox v-model="form.isSaveTemp">保存为常用模板</el-checkbox>
</div>
</div>

2
src/views/modules/base/resi copy.vue

@ -1335,7 +1335,7 @@ export default {
});
},
async getExportList (type) {
const url = "/oper/customize//icformitemgroup/list";
const url = "/oper/customize/icformitemgroup/list";
let params = {
formCode: "resi_base_info",
};

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

@ -1492,7 +1492,7 @@ export default {
});
},
async getExportList(type) {
const url = "/oper/customize//icformitemgroup/list";
const url = "/oper/customize/icformitemgroup/list";
let params = {
formCode: "resi_base_info",
};

Loading…
Cancel
Save