24 changed files with 2492 additions and 1408 deletions
File diff suppressed because it is too large
@ -0,0 +1,108 @@ |
|||||
|
<template> |
||||
|
<div v-if="iniLoaded"> |
||||
|
<base-page |
||||
|
:searchParams="searchParams" |
||||
|
:tableParams="tableParams" |
||||
|
:tableUrl="tableUrl" |
||||
|
:operateCol="false" |
||||
|
idName="icDangerousChemicalsId" |
||||
|
></base-page> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import basePage from "@/views/modules/cpts/base/index"; |
||||
|
import { getItemByIdInCascader, collapse } from "@/utils/cascader"; |
||||
|
|
||||
|
export default { |
||||
|
props: { |
||||
|
orgId: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
orgIds: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
iniLoaded: false, |
||||
|
|
||||
|
searchParams: [ |
||||
|
{ |
||||
|
field: "选择范围", |
||||
|
keyName: "org", |
||||
|
type: "cascader", |
||||
|
value: "", |
||||
|
// optionUrl: "/gov/org/customeragency/agencygridtree", |
||||
|
optionUrl: "/gov/org/customeragency/my-subagency-list", |
||||
|
optionUrlParams: { |
||||
|
agencyId: this.$store.state.user.agencyId, |
||||
|
}, |
||||
|
optionList: [], |
||||
|
optionProps: { |
||||
|
multiple: false, |
||||
|
value: "agencyId", |
||||
|
label: "agencyName", |
||||
|
children: "subAgencyList", |
||||
|
checkStrictly: true, |
||||
|
}, |
||||
|
optionCook(obj) { |
||||
|
return [obj]; |
||||
|
}, |
||||
|
supKeys: ["orgId", "orgType"], |
||||
|
supValues: ["", ""], |
||||
|
handleChangeFn(vals, item) { |
||||
|
const { optionList } = item; |
||||
|
if (vals.length > 0) { |
||||
|
item["supValues"][0] = vals[vals.length - 1]; |
||||
|
item["supValues"][1] = getItemByIdInCascader( |
||||
|
optionList, |
||||
|
vals, |
||||
|
"agencyId", |
||||
|
"subAgencyList" |
||||
|
)[vals.length - 1]["level"]; |
||||
|
item["supValues"][1] = |
||||
|
item["supValues"][1] == "grid" ? "grid" : "agency"; |
||||
|
} else { |
||||
|
item["supValues"][0] = ""; |
||||
|
item["supValues"][1] = ""; |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
|
||||
|
tableParams: [ |
||||
|
{ field: "序号", keyName: "", type: "no" }, |
||||
|
{ field: "所属组织", keyName: "orgName", type: "text", width: "220" }, |
||||
|
{ field: "人口总数", keyName: "userTotal", type: "text" }, |
||||
|
{ field: "常住人口数", keyName: "czUserTotal", type: "text" }, |
||||
|
{ field: "流动人口数", keyName: "ldUserTotal", type: "text" }, |
||||
|
{ field: "房屋总数", keyName: "houseTotal", type: "text" }, |
||||
|
{ field: "自住房屋数", keyName: "zzHouseTotal", type: "text" }, |
||||
|
{ field: "出租房屋数", keyName: "czHouseTotal", type: "text" }, |
||||
|
{ field: "闲置房屋数", keyName: "xzHouseTotal", type: "text" }, |
||||
|
], |
||||
|
tableUrl: "/gov/org/house/usingCommunityUserHouseStats", |
||||
|
}; |
||||
|
}, |
||||
|
components: { basePage }, |
||||
|
computed: {}, |
||||
|
watch: {}, |
||||
|
|
||||
|
async mounted() { |
||||
|
this.searchParams[0].value = this.orgIds; |
||||
|
this.searchParams[0].supValues[0] = this.orgId; |
||||
|
if (this.orgId) { |
||||
|
this.searchParams[0].supValues[1] = "agency"; |
||||
|
} |
||||
|
this.iniLoaded = true; |
||||
|
}, |
||||
|
|
||||
|
methods: {}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped></style> |
@ -0,0 +1,364 @@ |
|||||
|
<template> |
||||
|
<el-card class="g-cnt"> |
||||
|
<div class="m-cards"> |
||||
|
<div |
||||
|
class="item" |
||||
|
:key="item.name" |
||||
|
@click="handleClickCard(item)" |
||||
|
v-for="item in list" |
||||
|
> |
||||
|
<div class="item-left"> |
||||
|
<div class="num">{{ item.num }}</div> |
||||
|
<div class="name">{{ item.name }}</div> |
||||
|
</div> |
||||
|
<div class="item-right"> |
||||
|
<div class="hint"> |
||||
|
<div class="hint-title">较上月</div> |
||||
|
<b v-if="item.variation >= 0">+ {{ item.variationAbs }}</b> |
||||
|
<b v-else>- {{ item.variationAbs }}</b> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="m-tb"> |
||||
|
<h3>下级平台使用进度汇总</h3> |
||||
|
<el-table |
||||
|
:data="tableData" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
class="tb" |
||||
|
:height="maxTableHeight" |
||||
|
align="center" |
||||
|
> |
||||
|
<el-table-column label="序号" type="index" align="center" width="50" /> |
||||
|
<el-table-column |
||||
|
prop="orgName" |
||||
|
label="所属组织" |
||||
|
width="150" |
||||
|
align="center" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="usingCommunityNum" |
||||
|
label="开通平台社区数" |
||||
|
align="center" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<a style="cursor: pointer" @click="showDetail(scope.row.orgId)">{{ |
||||
|
scope.row.usingCommunityNum |
||||
|
}}</a> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="userTotal" |
||||
|
label="人口总数" |
||||
|
align="center" |
||||
|
></el-table-column> |
||||
|
<el-table-column |
||||
|
prop="czUserTotal" |
||||
|
label="常住人口总数" |
||||
|
align="center" |
||||
|
></el-table-column> |
||||
|
<el-table-column |
||||
|
prop="ldUserTotal" |
||||
|
label="流动人口总数" |
||||
|
align="center" |
||||
|
></el-table-column> |
||||
|
<el-table-column |
||||
|
prop="houseTotal" |
||||
|
label="房屋总数" |
||||
|
align="center" |
||||
|
></el-table-column> |
||||
|
<el-table-column |
||||
|
prop="zzHouseTotal" |
||||
|
label="自住房屋总数" |
||||
|
align="center" |
||||
|
></el-table-column> |
||||
|
<el-table-column |
||||
|
prop="czHouseTotal" |
||||
|
label="出租房屋总数" |
||||
|
align="center" |
||||
|
></el-table-column> |
||||
|
<el-table-column |
||||
|
prop="xzHouseTotal" |
||||
|
label="闲置房屋总数" |
||||
|
align="center" |
||||
|
></el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 修改弹出框 --> |
||||
|
<el-dialog |
||||
|
v-if="displayedDetail" |
||||
|
:visible="true" |
||||
|
title="社区列表 " |
||||
|
width="1150px" |
||||
|
top="5vh" |
||||
|
@close="displayedDetail = false" |
||||
|
> |
||||
|
<shequtongji |
||||
|
ref="shequtongji" |
||||
|
:orgId="detailOrgId" |
||||
|
:orgIds="[orgId, detailOrgId]" |
||||
|
/> |
||||
|
</el-dialog> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { requestPost } from "@/js/dai/request"; |
||||
|
import nextTick from "dai-js/tools/nextTick"; |
||||
|
import { mapGetters } from "vuex"; |
||||
|
import shequtongji from "./cpts/shequtongji"; |
||||
|
|
||||
|
export default { |
||||
|
name: "renFangTongJi", |
||||
|
components: { shequtongji }, |
||||
|
data() { |
||||
|
return { |
||||
|
displayedDetail: false, |
||||
|
tableData: [], |
||||
|
|
||||
|
orgId: "", |
||||
|
orgType: "", |
||||
|
|
||||
|
detailOrgId: "", |
||||
|
|
||||
|
list: [ |
||||
|
{ |
||||
|
name: "开通平台社区数", |
||||
|
num: "--", |
||||
|
variation: 0, |
||||
|
variationAbs: "0", |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name: "人口总数", |
||||
|
num: "--", |
||||
|
variation: 0, |
||||
|
variationAbs: "0", |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name: "常住人口数", |
||||
|
num: "--", |
||||
|
variation: 0, |
||||
|
variationAbs: "0", |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name: "流动人口数", |
||||
|
num: "--", |
||||
|
variation: 0, |
||||
|
variationAbs: "0", |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name: "房屋总数", |
||||
|
num: "--", |
||||
|
variation: 0, |
||||
|
variationAbs: "0", |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name: "自住房屋数", |
||||
|
num: "--", |
||||
|
variation: 0, |
||||
|
variationAbs: "0", |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name: "出租房屋数", |
||||
|
num: "--", |
||||
|
variation: 0, |
||||
|
variationAbs: "0", |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name: "闲置房屋数", |
||||
|
num: "--", |
||||
|
variation: 0, |
||||
|
variationAbs: "0", |
||||
|
}, |
||||
|
], |
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
maxTableHeight() { |
||||
|
return this.clientHeight - 420; |
||||
|
}, |
||||
|
...mapGetters(["clientHeight"]), |
||||
|
}, |
||||
|
watch: { |
||||
|
orgId() { |
||||
|
this.getTableData(); |
||||
|
}, |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getCommunityData(); |
||||
|
this.getResiData(); |
||||
|
this.getHouseData(); |
||||
|
this.getTableData(); |
||||
|
}, |
||||
|
methods: { |
||||
|
handleClickCard(item) { |
||||
|
if (item.name == "开通平台社区数") { |
||||
|
this.showDetail(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async showDetail(orgId = "") { |
||||
|
this.displayedDetail = true; |
||||
|
this.detailOrgId = orgId; |
||||
|
}, |
||||
|
|
||||
|
async getCommunityData() { |
||||
|
const url = "/gov/org/agency/usingCommunityStats"; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, { |
||||
|
orgId: this.orgId, |
||||
|
orgType: this.orgType, |
||||
|
}); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
const { list } = this; |
||||
|
let item1 = list.find((item) => item.name == "开通平台社区数"); |
||||
|
item1.num = data.usingCommunityNum; |
||||
|
item1.variation = parseInt(data.usingCommunityNumJSY); |
||||
|
item1.variationAbs = Math.abs(item1.variation); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async getResiData() { |
||||
|
const url = "/epmetuser/icresiuser/userchart"; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, { |
||||
|
orgId: this.orgId, |
||||
|
orgType: this.orgType, |
||||
|
}); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
const { list } = this; |
||||
|
this.orgId = data.orgId; |
||||
|
this.orgType = data.orgType; |
||||
|
let item1 = list.find((item) => item.name == "人口总数"); |
||||
|
item1.num = data.userTotal; |
||||
|
item1.variation = parseInt(data.userTotalJSY); |
||||
|
item1.variationAbs = Math.abs(item1.variation); |
||||
|
let item2 = list.find((item) => item.name == "常住人口数"); |
||||
|
item2.num = data.czUserTotal; |
||||
|
item2.variation = parseInt(data.czUserTotalJSY); |
||||
|
item2.variationAbs = Math.abs(item2.variation); |
||||
|
let item3 = list.find((item) => item.name == "流动人口数"); |
||||
|
item3.num = data.ldUserTotal; |
||||
|
item3.variation = parseInt(data.ldUserTotalJSY); |
||||
|
item3.variationAbs = Math.abs(item3.variation); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async getHouseData() { |
||||
|
const url = "/gov/org/house/housechart"; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, { |
||||
|
orgId: this.orgId, |
||||
|
orgType: this.orgType, |
||||
|
}); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
const { list } = this; |
||||
|
let item1 = list.find((item) => item.name == "房屋总数"); |
||||
|
item1.num = data.houseTotal; |
||||
|
item1.variation = parseInt(data.houseTotalJSY); |
||||
|
item1.variationAbs = Math.abs(item1.variation); |
||||
|
let item2 = list.find((item) => item.name == "自住房屋数"); |
||||
|
item2.num = data.zzHouseTotal; |
||||
|
item2.variation = parseInt(data.zzHouseTotalJSY); |
||||
|
item2.variationAbs = Math.abs(item2.variation); |
||||
|
let item3 = list.find((item) => item.name == "出租房屋数"); |
||||
|
item3.num = data.czHouseTotal; |
||||
|
item3.variation = parseInt(data.czHouseTotalJSY); |
||||
|
item3.variationAbs = Math.abs(item3.variation); |
||||
|
let item4 = list.find((item) => item.name == "闲置房屋数"); |
||||
|
item4.num = data.xzHouseTotal; |
||||
|
item4.variation = parseInt(data.xzHouseTotalJSY); |
||||
|
item4.variationAbs = Math.abs(item4.variation); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async getTableData() { |
||||
|
const url = "/gov/org/house/subuserhouselist"; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, { |
||||
|
orgId: this.orgId, |
||||
|
orgType: this.orgType, |
||||
|
}); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.tableData = data |
||||
|
? data.map((item) => { |
||||
|
return item; |
||||
|
}) |
||||
|
: []; |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/assets/scss/c/config.scss"; |
||||
|
@import "@/assets/scss/c/function.scss"; |
||||
|
|
||||
|
.m-cards { |
||||
|
display: flex; |
||||
|
flex-wrap: wrap; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
|
||||
|
.item { |
||||
|
display: flex; |
||||
|
width: 24%; |
||||
|
margin-top: 15px; |
||||
|
// margin-right: 1%; |
||||
|
box-sizing: border-box; |
||||
|
color: #ffffff; |
||||
|
padding: 12px; |
||||
|
border-radius: 4px; |
||||
|
background-image: linear-gradient(to left, #43c8c4, #2aa5c6); |
||||
|
cursor: pointer; |
||||
|
|
||||
|
.item-right { |
||||
|
margin-left: auto; |
||||
|
} |
||||
|
|
||||
|
.item-left { |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.num { |
||||
|
font-size: 28px; |
||||
|
font-weight: bold; |
||||
|
line-height: 40px; |
||||
|
} |
||||
|
.name { |
||||
|
font-size: 14px; |
||||
|
line-height: 20px; |
||||
|
} |
||||
|
|
||||
|
.hint { |
||||
|
margin-top: 10px; |
||||
|
line-height: 20px; |
||||
|
text-align: center; |
||||
|
font-size: 18px; |
||||
|
.hint-title { |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.m-tb { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,178 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<base-page |
||||
|
ref="basePage" |
||||
|
:searchParams="searchParams" |
||||
|
:tableParams="tableParams" |
||||
|
:tableUrl="tableUrl" |
||||
|
:delMultipleUrl="delMultipleUrl" |
||||
|
:infoUrl="infoUrl" |
||||
|
:exportUrl="exportUrl" |
||||
|
:editParams="editParams" |
||||
|
:editParamsDiv="5" |
||||
|
idName="id" |
||||
|
> |
||||
|
<template v-slot:listBtn="{ multipleSelection }"> |
||||
|
<el-button @click="handleSyncMultiple(multipleSelection)" size="small" |
||||
|
>批量更新</el-button |
||||
|
> |
||||
|
</template> |
||||
|
|
||||
|
<template v-slot:listBtnSup="{ item }"> |
||||
|
<el-button type="text" @click="handleSync(item)" size="small" |
||||
|
>全部更新</el-button |
||||
|
> |
||||
|
</template> |
||||
|
|
||||
|
<template v-slot:editBottomSup="{ id, info }"> |
||||
|
<div class="m-duibi"> |
||||
|
<h3>对比信息</h3> |
||||
|
<el-table |
||||
|
:data="cookInfo(info)" |
||||
|
style="width: 100%" |
||||
|
:row-class-name="tableRowClassName" |
||||
|
> |
||||
|
<el-table-column prop="resiInfo" label="数据库信息"> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="result" label="结果"></el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
</template> |
||||
|
</base-page> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import basePage from "@/views/modules/cpts/base/index"; |
||||
|
import { requestPost } from "@/js/dai/request"; |
||||
|
|
||||
|
export default { |
||||
|
props: {}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
searchParams: [ |
||||
|
{ field: "姓名", keyName: "name", type: "input" }, |
||||
|
{ field: "证件号", keyName: "idCard", type: "input" }, |
||||
|
{ field: "手机", keyName: "mobile", type: "input" }, |
||||
|
], |
||||
|
|
||||
|
tableParams: [ |
||||
|
{ field: "选择框", keyName: "", type: "selection" }, |
||||
|
{ field: "序号", keyName: "", type: "no" }, |
||||
|
{ field: "姓名", keyName: "name", type: "text" }, |
||||
|
{ field: "证件号", keyName: "idCard", type: "text", width: 200 }, |
||||
|
{ field: "手机", keyName: "mobile", type: "text", width: 120 }, |
||||
|
{ field: "性别", keyName: "genderCn", type: "text" }, |
||||
|
{ field: "民族", keyName: "mzCn", type: "text" }, |
||||
|
{ field: "家庭住址", keyName: "address", type: "text" }, |
||||
|
{ field: "残疾类别", keyName: "cjlbCn", type: "text" }, |
||||
|
{ field: "残疾等级", keyName: "cjzkCn", type: "text" }, |
||||
|
{ field: "残疾证号", keyName: "cardNum", type: "text", width: 200 }, |
||||
|
{ field: "监护人", keyName: "guardian", type: "text" }, |
||||
|
{ field: "状态", keyName: "dealStatusName", type: "text" }, |
||||
|
{ field: "失败原因", keyName: "dealResult", type: "text" }, |
||||
|
], |
||||
|
|
||||
|
tableUrl: "/epmetuser/dataSyncRecordDisability/page", |
||||
|
delMultipleUrl: "/epmetuser/dataSyncRecordDisability/delete", |
||||
|
|
||||
|
infoUrl: "/epmetuser/dataSyncRecordDisability/detail/", |
||||
|
// delUrl: "/gov/org/icDangerousChemicals/del", |
||||
|
exportUrl: "/epmetuser/dataSyncRecordDisability/export", |
||||
|
|
||||
|
editParams: [ |
||||
|
{ field: "姓名", keyName: "name", type: "input" }, |
||||
|
{ field: "证件号", keyName: "idCard", type: "input" }, |
||||
|
{ field: "手机", keyName: "mobile", type: "input" }, |
||||
|
{ field: "性别", keyName: "genderCn", type: "input" }, |
||||
|
{ field: "民族", keyName: "mzCn", type: "input" }, |
||||
|
{ field: "家庭住址", keyName: "address", type: "input" }, |
||||
|
{ field: "残疾类别", keyName: "cjlbCn", type: "input" }, |
||||
|
{ field: "残疾等级", keyName: "cjzkCn", type: "input" }, |
||||
|
{ field: "残疾证号", keyName: "cardNum", type: "input" }, |
||||
|
{ field: "监护人", keyName: "guardian", type: "input" }, |
||||
|
{ field: "状态", keyName: "dealStatusName", type: "input" }, |
||||
|
{ field: "失败原因", keyName: "dealResult", type: "input" }, |
||||
|
], |
||||
|
}; |
||||
|
}, |
||||
|
components: { basePage }, |
||||
|
computed: {}, |
||||
|
watch: {}, |
||||
|
|
||||
|
async mounted() {}, |
||||
|
|
||||
|
methods: { |
||||
|
cookInfo(info) { |
||||
|
let arr = [ |
||||
|
{ field: "姓名", keyName: "name", type: "text" }, |
||||
|
{ field: "证件号", keyName: "idCard", type: "text" }, |
||||
|
{ field: "手机", keyName: "mobile", type: "text" }, |
||||
|
{ field: "性别", keyName: "genderCn", type: "text" }, |
||||
|
{ field: "民族", keyName: "mzCn", type: "text" }, |
||||
|
{ field: "家庭住址", keyName: "address", type: "text" }, |
||||
|
{ field: "残疾类别", keyName: "cjlbCn", type: "text" }, |
||||
|
{ field: "残疾等级", keyName: "cjzkCn", type: "text" }, |
||||
|
{ field: "残疾证号", keyName: "cardNum", type: "text" }, |
||||
|
{ field: "监护人", keyName: "guardian", type: "text" }, |
||||
|
]; |
||||
|
return arr.map((item) => { |
||||
|
let val = (info && info[item.keyName]) || "--"; |
||||
|
let resiVal = |
||||
|
(info && info.resiInfo && info.resiInfo[item.keyName]) || "--"; |
||||
|
|
||||
|
return { |
||||
|
resiInfo: item.field + ":" + resiVal, |
||||
|
result: resiVal == val ? "一致" : "不一致", |
||||
|
}; |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
tableRowClassName({ row }) { |
||||
|
if (row.result === "不一致") { |
||||
|
return "z-stress"; |
||||
|
} |
||||
|
return ""; |
||||
|
}, |
||||
|
|
||||
|
async handleSync(item) { |
||||
|
const { data, code, msg } = await requestPost( |
||||
|
"/epmetuser/dataSyncRecordDisability/batchUpdate", |
||||
|
[item["id"]] |
||||
|
); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.$message.success("更新成功!"); |
||||
|
this.$refs.basePage.getTableData(); |
||||
|
} else { |
||||
|
this.$message.error("操作失败!"); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async handleSyncMultiple(multipleSelection) { |
||||
|
const { data, code, msg } = await requestPost( |
||||
|
"/epmetuser/dataSyncRecordDisability/batchUpdate", |
||||
|
[...multipleSelection.map((item) => item["id"])] |
||||
|
); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.$message.success("批量更新成功!"); |
||||
|
this.$refs.basePage.getTableData(); |
||||
|
} else { |
||||
|
this.$message.error("操作失败!"); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.m-duibi { |
||||
|
padding: 10px; |
||||
|
} |
||||
|
|
||||
|
::v-deep .el-table .z-stress { |
||||
|
background: oldlace; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,122 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<base-page |
||||
|
ref="basePage" |
||||
|
:searchParams="searchParams" |
||||
|
:tableParams="tableParams" |
||||
|
:tableUrl="tableUrl" |
||||
|
:delMultipleUrl="delMultipleUrl" |
||||
|
:infoUrl="infoUrl" |
||||
|
:exportUrl="exportUrl" |
||||
|
:editParams="editParams" |
||||
|
:cookTableData="cookTableData" |
||||
|
idName="id" |
||||
|
> |
||||
|
<template v-slot:listBtn="{ multipleSelection }"> |
||||
|
<el-button @click="handleSyncMultiple(multipleSelection)" size="small" |
||||
|
>批量更新</el-button |
||||
|
> |
||||
|
</template> |
||||
|
|
||||
|
<template v-slot:listBtnSup="{ item }"> |
||||
|
<el-button type="text" @click="handleSync(item)" size="small" |
||||
|
>全部更新</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</base-page> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import basePage from "@/views/modules/cpts/base/index"; |
||||
|
import { requestPost } from "@/js/dai/request"; |
||||
|
|
||||
|
export default { |
||||
|
props: {}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
searchParams: [ |
||||
|
{ field: "姓名", keyName: "name", type: "input" }, |
||||
|
{ field: "证件号", keyName: "idCard", type: "input" }, |
||||
|
], |
||||
|
|
||||
|
tableParams: [ |
||||
|
{ field: "选择框", keyName: "", type: "selection" }, |
||||
|
{ field: "序号", keyName: "", type: "no" }, |
||||
|
{ field: "姓名", keyName: "name", type: "text" }, |
||||
|
{ field: "证件号", keyName: "idCard", type: "text", width: 200 }, |
||||
|
{ field: "死亡日期", keyName: "deathDate", type: "text", width: 120 }, |
||||
|
{ field: "现年龄", keyName: "age", type: "text" }, |
||||
|
{ field: "家庭住址", keyName: "address", type: "text" }, |
||||
|
{ field: "状态", keyName: "dealStatusName", type: "text" }, |
||||
|
{ field: "失败原因", keyName: "dealResult", type: "text" }, |
||||
|
], |
||||
|
|
||||
|
tableUrl: "/epmetuser/dataSyncRecordDeath/page", |
||||
|
delMultipleUrl: "/epmetuser/dataSyncRecordDeath/delete", |
||||
|
|
||||
|
infoUrl: "/epmetuser/dataSyncRecordDeath/detail/", |
||||
|
// delUrl: "/gov/org/icDangerousChemicals/del", |
||||
|
exportUrl: "/epmetuser/dataSyncRecordDeath/export", |
||||
|
|
||||
|
editParams: [ |
||||
|
{ field: "姓名", keyName: "name", type: "input" }, |
||||
|
{ field: "证件号", keyName: "idCard", type: "input" }, |
||||
|
{ field: "死亡日期", keyName: "deathDate", type: "input" }, |
||||
|
{ field: "现年龄", keyName: "age", type: "input" }, |
||||
|
{ field: "家庭住址", keyName: "address", type: "input" }, |
||||
|
], |
||||
|
}; |
||||
|
}, |
||||
|
components: { basePage }, |
||||
|
computed: {}, |
||||
|
watch: {}, |
||||
|
|
||||
|
async mounted() {}, |
||||
|
|
||||
|
methods: { |
||||
|
cookTableData(tableData) { |
||||
|
return tableData.map((item) => { |
||||
|
item.dealStatusName = |
||||
|
!item.dealStatus || item.dealStatus == 0 |
||||
|
? "未处理" |
||||
|
: item.dealStatus == 1 |
||||
|
? "处理成功" |
||||
|
: "处理失败"; |
||||
|
return item; |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
async handleSync(item) { |
||||
|
const { data, code, msg } = await requestPost( |
||||
|
"/epmetuser/dataSyncRecordDeath/batchupdate", |
||||
|
[item["id"]] |
||||
|
); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.$message.success("更新成功!"); |
||||
|
this.$refs.basePage.getTableData(); |
||||
|
} else { |
||||
|
this.$message.error("操作失败!"); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async handleSyncMultiple(multipleSelection) { |
||||
|
const { data, code, msg } = await requestPost( |
||||
|
"/epmetuser/dataSyncRecordDeath/batchupdate", |
||||
|
[...multipleSelection.map((item) => item["id"])] |
||||
|
); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.$message.success("批量更新成功!"); |
||||
|
this.$refs.basePage.getTableData(); |
||||
|
} else { |
||||
|
this.$message.error("操作失败!"); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped></style> |
Loading…
Reference in new issue