4 changed files with 2665 additions and 0 deletions
@ -0,0 +1,384 @@ |
|||
@import '../../c/config'; |
|||
@import '../../c/function'; |
|||
@import './c/common'; |
|||
|
|||
.m-pop { |
|||
@include shield; |
|||
background-color: rgba(#000, 0.9); |
|||
overflow-y: auto; |
|||
|
|||
.wrap { |
|||
position: relative; |
|||
margin: 120px auto; |
|||
width: 1020px; |
|||
|
|||
.title { |
|||
padding: 10px; |
|||
font-size: 22px; |
|||
font-family: PingFang SC; |
|||
font-weight: 800; |
|||
color: #ffffff; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
img { |
|||
display: block; |
|||
margin-right: 5px; |
|||
} |
|||
span { |
|||
display: block; |
|||
} |
|||
} |
|||
|
|||
.btn-close { |
|||
position: absolute; |
|||
top: -15px; |
|||
right: -15px; |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.line { |
|||
margin: 20px auto; |
|||
width: 900px; |
|||
height: 1px; |
|||
border: 1px dashed #1257c9; |
|||
} |
|||
|
|||
.tabs { |
|||
margin-top: 30px; |
|||
display: flex; |
|||
align-items: center; |
|||
padding-left: 20px; |
|||
padding-left: 58px; |
|||
|
|||
.tab-btn { |
|||
width: 30px; |
|||
text-align: center; |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.tab { |
|||
margin: 0 5px; |
|||
min-width: 76px; |
|||
padding: 0 5px; |
|||
height: 30px; |
|||
background: rgba(255, 255, 255, 0); |
|||
border: 1px solid #1257c9; |
|||
box-shadow: 0 0 10px 0 inset #1257c9; |
|||
border-radius: 2px; |
|||
text-align: center; |
|||
font-size: 14px; |
|||
font-family: PingFang SC; |
|||
font-weight: 400; |
|||
color: #ffffff; |
|||
line-height: 30px; |
|||
cursor: pointer; |
|||
transition: all ease 0.5s; |
|||
&.z-on { |
|||
background: linear-gradient(90deg, #1a5afd, #009cff); |
|||
box-shadow: none; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.m-info { |
|||
padding-left: 62px; |
|||
font-size: 14px; |
|||
font-family: PingFang SC; |
|||
font-weight: 400; |
|||
color: #ffffff; |
|||
line-height: 24px; |
|||
width: 500px; |
|||
|
|||
.info-title { |
|||
margin-top: 30px; |
|||
font-size: 20px; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #ffffff; |
|||
line-height: 30px; |
|||
} |
|||
.info-content { |
|||
margin: 20px 0; |
|||
} |
|||
.info-pics { |
|||
display: flex; |
|||
margin: 20px 0; |
|||
img { |
|||
display: block; |
|||
width: 32%; |
|||
height: 90px; |
|||
margin-right: 9px; |
|||
object-fit: cover; |
|||
} |
|||
} |
|||
|
|||
.info-prop { |
|||
position: relative; |
|||
margin: 10px 0; |
|||
display: flex; |
|||
padding-left: 15px; |
|||
.info-title-2 { |
|||
width: 70px; |
|||
flex: 0 0 1; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
> span, |
|||
> div { |
|||
display: block; |
|||
max-width: 300px; |
|||
} |
|||
|
|||
&::before { |
|||
content: ''; |
|||
display: block; |
|||
position: absolute; |
|||
top: 9px; |
|||
left: 0; |
|||
width: 7px; |
|||
height: 7px; |
|||
background: #0c81fe; |
|||
border-radius: 3px; |
|||
margin-right: 10px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.m-case { |
|||
@include scrollBar; |
|||
height: 600px; |
|||
padding: 20px 0 20px 0; |
|||
overflow-y: auto; |
|||
} |
|||
|
|||
.m-row { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.m-yanpan { |
|||
padding-left: 62px; |
|||
padding-right: 0; |
|||
min-height: 300px; |
|||
} |
|||
|
|||
.m-hint { |
|||
position: relative; |
|||
height: 300px; |
|||
|
|||
// 暂无数据 |
|||
img { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
margin: auto; |
|||
} |
|||
} |
|||
|
|||
.m-line { |
|||
min-width: 400px; |
|||
|
|||
.stat { |
|||
margin: 20px 0 10px; |
|||
display: flex; |
|||
.stat-item { |
|||
width: 33%; |
|||
text-align: center; |
|||
|
|||
div { |
|||
font-size: 17px; |
|||
font-family: Source Han Serif SC; |
|||
font-weight: 500; |
|||
color: rgba(#fff, 0.5); |
|||
line-height: 24px; |
|||
&.z-weak { |
|||
font-size: 12px; |
|||
font-family: Source Han Serif SC; |
|||
font-weight: 500; |
|||
color: rgba(#fff, 0.5); |
|||
line-height: 24px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.m-tb { |
|||
padding-left: 62px; |
|||
padding-right: 40px; |
|||
} |
|||
|
|||
.m-pagination { |
|||
box-sizing: border-box; |
|||
margin-top: 20px; |
|||
width: 100%; |
|||
height: 40px; |
|||
display: flex; |
|||
justify-content: flex-end; |
|||
|
|||
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active { |
|||
background: #0266d1; |
|||
color: #000d3f; |
|||
} |
|||
|
|||
/deep/ .el-pagination .el-pager li { |
|||
background: #002e74; |
|||
} |
|||
|
|||
/deep/ .el-pagination .btn-prev { |
|||
background: #002e74; |
|||
} |
|||
|
|||
/deep/ .el-pagination .btn-next { |
|||
background: #002e74; |
|||
} |
|||
} |
|||
|
|||
.m-process { |
|||
width: 400px; |
|||
|
|||
.process-title { |
|||
margin-bottom: 25px; |
|||
margin-left: -5px; |
|||
font-size: 16px; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #ffffff; |
|||
line-height: 18px; |
|||
} |
|||
|
|||
.list { |
|||
position: relative; |
|||
box-sizing: border-box; |
|||
margin-top: 30px/2; |
|||
margin-left: 50px/2; |
|||
padding: 0 0 0 30px/2; |
|||
width: 680px/2; |
|||
border-left: 3px solid #0c81fe; |
|||
padding-right: 10px; |
|||
|
|||
&::before { |
|||
content: ''; |
|||
position: absolute; |
|||
z-index: 1; |
|||
display: block; |
|||
top: -2px/2; |
|||
left: -2px/2; |
|||
width: 5px/2; |
|||
height: 20px/2; |
|||
background-color: #ffffff; |
|||
} |
|||
|
|||
.item { |
|||
position: relative; |
|||
z-index: 2; |
|||
margin-bottom: 8px; |
|||
padding-bottom: 8px; |
|||
font-size: 16px; |
|||
font-family: PingFang SC; |
|||
font-weight: 400; |
|||
color: #fefefe; |
|||
line-height: 24px; |
|||
padding-left: 20px; |
|||
padding-top: 1px; |
|||
|
|||
&::before { |
|||
content: ''; |
|||
display: block; |
|||
position: absolute; |
|||
top: -5px; |
|||
left: -11px; |
|||
width: 18px; |
|||
height: 18px; |
|||
background: #0c81fe; |
|||
border: 4px solid lighten(#0c81fe, 15); |
|||
border-radius: 100%; |
|||
} |
|||
|
|||
&.z-on { |
|||
&::before { |
|||
background: #e08400; |
|||
border-color: lighten(#e08400, 15); |
|||
} |
|||
} |
|||
|
|||
&:last-child { |
|||
margin-bottom: 0; |
|||
padding-bottom: 0; |
|||
border-bottom: none; |
|||
} |
|||
|
|||
.item-row { |
|||
margin-top: -10px; |
|||
margin-bottom: 10px; |
|||
display: flex; |
|||
} |
|||
|
|||
.name { |
|||
position: relative; |
|||
padding: 0 10px; |
|||
font-size: 12px; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #fefefe; |
|||
line-height: 22px; |
|||
height: 22px; |
|||
border-radius: 10px 0 10px 0; |
|||
background-color: #0c81fe; |
|||
// background-color: #e08400; |
|||
} |
|||
|
|||
.date { |
|||
margin-left: 10px; |
|||
font-size: 12px; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #7ca1d2; |
|||
line-height: 25px; |
|||
} |
|||
|
|||
.detail { |
|||
@include cs; |
|||
font-size: 16px; |
|||
line-height: 20px; |
|||
margin-bottom: 5px; |
|||
display: flex; |
|||
|
|||
.detail-field { |
|||
width: 22%; |
|||
text-align: justify; |
|||
text-align-last: justify; |
|||
} |
|||
.detail-value { |
|||
width: 78%; |
|||
.detail-link { |
|||
display: inline; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.attachement-list { |
|||
padding-left: 80px; |
|||
a { |
|||
display: block; |
|||
cursor: pointer; |
|||
color: #4df0ff; |
|||
font-size: 14px; |
|||
|
|||
i { |
|||
color: #fff; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.m-top { |
|||
display: flex; |
|||
} |
@ -0,0 +1,882 @@ |
|||
<template> |
|||
<div> |
|||
<div class="dialog-h-content scroll-h"> |
|||
<el-form |
|||
ref="ref_form" |
|||
:inline="true" |
|||
:model="fmData" |
|||
:rules="dataRule" |
|||
:disabled="formType === 'detail'" |
|||
class="form" |
|||
> |
|||
<el-form-item |
|||
label="所属网格 " |
|||
prop="gridId" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-select |
|||
v-model.trim="fmData.gridId" |
|||
placeholder="请选择" |
|||
size="small" |
|||
clearable |
|||
class="resi-cell-select" |
|||
@change="handleChangeGrid" |
|||
:disabled="formType === 'edit'" |
|||
style="width: 250px" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsG" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="所属房屋 " |
|||
prop="homeId" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-select |
|||
v-model.trim="fmData.villageId" |
|||
placeholder="请选择小区" |
|||
size="small" |
|||
clearable |
|||
class="resi-cell-select" |
|||
@clear="handleClearVillage" |
|||
@change="handleChangeV" |
|||
:disabled="formType === 'edit'" |
|||
style="margin-right: 8px; width: 120px" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsV" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
<el-select |
|||
v-model.trim="fmData.buildId" |
|||
placeholder="楼号" |
|||
size="small" |
|||
clearable |
|||
style="margin-right: 8px; width: 120px" |
|||
class="resi-cell-select" |
|||
:disabled="changeVDisabled || formType === 'edit'" |
|||
@clear="handleClearBuild" |
|||
@change="handleChangeB" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsB" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
<el-select |
|||
v-model.trim="fmData.unitId" |
|||
:disabled="changeBDisabled || formType === 'edit'" |
|||
placeholder="单元" |
|||
size="small" |
|||
clearable |
|||
style="margin-right: 8px; width: 120px" |
|||
class="resi-cell-select" |
|||
@click="handleClearDan" |
|||
@change="handleChangeD" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsD" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
<el-select |
|||
v-model.trim="fmData.homeId" |
|||
:disabled="changeDDisabled || formType === 'edit'" |
|||
placeholder="房号" |
|||
size="small" |
|||
clearable |
|||
@change="handleChangeH" |
|||
style="width: 120px" |
|||
class="resi-cell-select" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsH" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="姓名" |
|||
prop="name" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="30" |
|||
show-word-limit |
|||
style="width: 200px; margin-right: 20px" |
|||
placeholder="请输入姓名 " |
|||
:disabled="formType === 'edit'" |
|||
v-model="fmData.name" |
|||
> |
|||
</el-input> |
|||
|
|||
<el-checkbox |
|||
v-model="fmData.isWelfare" |
|||
:disabled="formType === 'edit'" |
|||
true-label="1" |
|||
false-label="0" |
|||
>享受福利</el-checkbox |
|||
> |
|||
<el-checkbox |
|||
v-model="fmData.isCheck" |
|||
true-label="1" |
|||
false-label="0" |
|||
:disabled="formType === 'edit'" |
|||
@change="checkResiAvailable" |
|||
>补充居民信息</el-checkbox |
|||
> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="手机号" |
|||
prop="mobile" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="30" |
|||
show-word-limit |
|||
placeholder="请输入手机号 " |
|||
v-model="fmData.mobile" |
|||
:disabled="formType === 'edit'" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="身份证号" |
|||
prop="idCard" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="30" |
|||
placeholder="请输入身份证号" |
|||
v-model="fmData.idCard" |
|||
@blur="handleBlurId" |
|||
:disabled="formType === 'edit'" |
|||
></el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="性别" |
|||
prop="principalName" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-select |
|||
v-model.trim="fmData.gender" |
|||
placeholder="性别" |
|||
size="small" |
|||
clearable |
|||
style="width: 120px" |
|||
class="resi-cell-select" |
|||
:disabled="formType === 'edit'" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsGender" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="出生日期" |
|||
prop="birthday" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-date-picker |
|||
v-model="fmData.birthday" |
|||
type="date" |
|||
placeholder="出生日期" |
|||
value-format="yyyy-MM-dd" |
|||
:disabled="formType === 'edit'" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="出生地" |
|||
prop="birthplace" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="50" |
|||
show-word-limit |
|||
placeholder="请输入出生地" |
|||
v-model="fmData.birthplace" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="出生人父亲姓名" |
|||
prop="father" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="30" |
|||
show-word-limit |
|||
placeholder="请输入出生人父亲姓名" |
|||
v-model="fmData.father" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="出生人母亲姓名" |
|||
prop="mother" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="30" |
|||
show-word-limit |
|||
placeholder="请输入出生人母亲姓名" |
|||
v-model="fmData.mother" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="胎次" |
|||
prop="count" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input-number |
|||
v-model="fmData.count" |
|||
:min="1" |
|||
:max="50" |
|||
label="请输入胎次" |
|||
></el-input-number> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="申报户口日期" |
|||
prop="reportDate" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-date-picker |
|||
v-model="fmData.reportDate" |
|||
placeholder="申报户口日期" |
|||
value-format="yyyy-MM-dd" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="户主姓名" |
|||
prop="householderName" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="50" |
|||
show-word-limit |
|||
placeholder="请输入户主姓名" |
|||
:disabled="fmData.alreadyHaveMaster" |
|||
v-model="fmData.householderName" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="与户主关系" |
|||
prop="householderRelation" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-select |
|||
v-model.trim="fmData.householderRelation" |
|||
placeholder="与户主关系" |
|||
size="small" |
|||
clearable |
|||
style="width: 120px" |
|||
class="resi-cell-select" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsRelation" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
v-if="false" |
|||
label="备注" |
|||
prop="remark" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
type="textarea" |
|||
maxlength="500" |
|||
show-word-limit |
|||
:rows="3" |
|||
placeholder="请输入备注,不超过500字" |
|||
v-model="fmData.remark" |
|||
></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<div class="div_btn resi-btns"> |
|||
<el-button size="small" @click="handleCancle">取 消</el-button> |
|||
<el-button |
|||
v-if="formType != 'detail'" |
|||
type="primary" |
|||
size="small" |
|||
:disabled="btnDisable" |
|||
@click="handleComfirm" |
|||
>确 定</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import formVltHelper from "dai-js/tools/formVltHelper"; |
|||
import { computedCard } from "@/utils/index"; |
|||
import { isCard } from "@/utils/validate"; |
|||
|
|||
let loading; // 加载动画 |
|||
|
|||
function iniFmData() { |
|||
return { |
|||
id: "", |
|||
gridId: "", |
|||
villageId: "", |
|||
buildId: "", |
|||
unitId: "", |
|||
homeId: "", |
|||
name: "", |
|||
mobile: "", |
|||
idCard: "", |
|||
isWelfare: "0", //福利0否,1是 |
|||
isCheck: "0", |
|||
isReplace: "0", |
|||
gender: "", |
|||
birthplace: "", |
|||
father: "", |
|||
mother: "", |
|||
count: "", |
|||
reportDate: "", |
|||
householderName: "", |
|||
householderRelation: "", |
|||
alreadyHaveMaster: false, |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
formType: "add", //表单操作类型 add新增,edit编辑,detail详情 |
|||
|
|||
btnDisable: false, |
|||
|
|||
optionsV: [], |
|||
optionsB: [], |
|||
optionsH: [], |
|||
optionsD: [], |
|||
optionsG: [], |
|||
optionsRelation: [], |
|||
optionsGender: [ |
|||
{ |
|||
value: "1", |
|||
label: "男", |
|||
}, |
|||
{ |
|||
value: "2", |
|||
label: "女", |
|||
}, |
|||
], |
|||
|
|||
fmData: iniFmData(), |
|||
checkResult: {}, |
|||
}; |
|||
}, |
|||
components: {}, |
|||
computed: { |
|||
dataRule() { |
|||
let checkIdCard = (rule, value, callback) => { |
|||
if (value === "") { |
|||
callback(new Error("请输入身份证")); |
|||
} else { |
|||
if (!isCard(value)) { |
|||
callback(new Error("身份证号格式不正确")); |
|||
} |
|||
callback(); |
|||
} |
|||
}; |
|||
|
|||
return { |
|||
gridId: [ |
|||
{ required: true, message: "所属网格不能为空", trigger: "blur" }, |
|||
], |
|||
homeId: [ |
|||
{ required: true, message: "所属房屋不能为空", trigger: "blur" }, |
|||
], |
|||
name: [{ required: true, message: "姓名不能为空", trigger: "blur" }], |
|||
idCard: [ |
|||
{ required: true, message: "身份证号不能为空", trigger: "blur" }, |
|||
{ required: true, validator: checkIdCard, trigger: "blur" }, |
|||
], |
|||
birthplace: [ |
|||
{ required: true, message: "出生地不能为空", trigger: "blur" }, |
|||
], |
|||
}; |
|||
}, |
|||
|
|||
changeVDisabled() { |
|||
return !this.fmData.villageId; |
|||
}, |
|||
changeBDisabled() { |
|||
return !this.fmData.buildId; |
|||
}, |
|||
changeDDisabled() { |
|||
return !this.fmData.unitId; |
|||
}, |
|||
}, |
|||
props: {}, |
|||
watch: {}, |
|||
|
|||
async mounted() { |
|||
this.getGridList(); |
|||
this.getValiheList(); |
|||
this.getRelationList(); |
|||
}, |
|||
|
|||
methods: { |
|||
async checkResiAvailable() { |
|||
const { |
|||
fmData: { idCard, isCheck }, |
|||
} = this; |
|||
if (isCheck == "1" && isCard(idCard)) { |
|||
const { data, code, msg } = await requestPost( |
|||
"/epmetuser/icresiuser/checkuser", |
|||
{ |
|||
idCard, |
|||
agencyId: this.$store.state.user.agencyId, |
|||
} |
|||
); |
|||
if (code === 0) { |
|||
this.checkResult = data; |
|||
if (!data.moveInstatus) { |
|||
this.$message({ |
|||
type: "error", |
|||
message: `请联系${data.resiAgencyName}迁出该居民后操作`, |
|||
}); |
|||
} |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
} |
|||
}, |
|||
|
|||
handleBlurId() { |
|||
const { sex, birth, age } = computedCard(this.fmData.idCard); |
|||
if (birth) { |
|||
this.fmData.birthday = birth; |
|||
this.fmData.gender = sex == 1 ? "1" : "2"; |
|||
this.checkResiAvailable(); |
|||
} |
|||
}, |
|||
|
|||
handleClearVillage() { |
|||
this.fmData.buildId = ""; |
|||
this.fmData.homeId = ""; |
|||
}, |
|||
handleClearBuild() { |
|||
this.fmData.buildId = ""; |
|||
this.fmData.unitId = ""; |
|||
this.fmData.homeId = ""; |
|||
}, |
|||
handleClearDan() { |
|||
this.fmData.unitId = ""; |
|||
this.fmData.homeId = ""; |
|||
}, |
|||
handleChangeGrid(val) { |
|||
console.log("val", val); |
|||
this.fmData.villageId = ""; |
|||
this.fmData.buildId = ""; |
|||
this.fmData.unitId = ""; |
|||
this.fmData.homeId = ""; |
|||
this.getValiheList(); |
|||
}, |
|||
handleChangeV(val) { |
|||
console.log("val", val); |
|||
this.fmData.buildId = ""; |
|||
this.fmData.unitId = ""; |
|||
this.fmData.homeId = ""; |
|||
this.getBuildList(); |
|||
}, |
|||
handleChangeB(val) { |
|||
console.log("val", val); |
|||
this.fmData.unitId = ""; |
|||
this.fmData.homeId = ""; |
|||
this.getUniList(); |
|||
}, |
|||
handleChangeD(val) { |
|||
console.log("val", val); |
|||
this.fmData.homeId = ""; |
|||
this.getHouseList(); |
|||
}, |
|||
handleChangeH(val) { |
|||
console.log("val", val); |
|||
this.getHouseMaster(); |
|||
}, |
|||
|
|||
getRelationList() { |
|||
const { user } = this.$store.state; |
|||
this.$http |
|||
.post("/sys/dict/data/relationship", { |
|||
formCode: "resi_base_info", |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
if (res.data) { |
|||
this.optionsRelation = res.data; |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
getGridList() { |
|||
const { user } = this.$store.state; |
|||
this.$http |
|||
.post("/gov/org/customergrid/gridoption", { |
|||
agencyId: user.agencyId, |
|||
purpose: "query", |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
this.optionsG = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
getValiheList() { |
|||
const { user } = this.$store.state; |
|||
this.$http |
|||
.post("/gov/org/icneighborhood/neighborhoodoption", { |
|||
gridId: this.fmData.gridId, |
|||
agencyId: "", |
|||
// agencyId: user.agencyId |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
this.optionsV = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
getBuildList() { |
|||
this.$http |
|||
.post("/gov/org/icbuilding/buildingoption", { |
|||
neighborHoodId: this.fmData.villageId, |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
this.optionsB = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
getUniList() { |
|||
this.$http |
|||
.post("/gov/org/icbuildingunit/unitoption", { |
|||
buildingId: this.fmData.buildId, |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
this.optionsD = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
getHouseList() { |
|||
this.$http |
|||
.post("/gov/org/ichouse/houseoption", { unitId: this.fmData.unitId }) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
this.optionsH = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
|
|||
getHouseMaster() { |
|||
const { homeId } = this.fmData; |
|||
if (!homeId) return (this.alreadyHaveMaster = false); |
|||
|
|||
this.$http |
|||
.post("/epmetuser/icresiuser/queryhousehold/" + homeId, {}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取户主信息成功", res.data); |
|||
const { name } = res.data; |
|||
if (name) { |
|||
this.fmData.householderName = name; |
|||
this.alreadyHaveMaster = true; |
|||
} else { |
|||
this.alreadyHaveMaster = false; |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
async initForm(type, row) { |
|||
this.$refs.ref_form.resetFields(); |
|||
|
|||
this.formType = type; |
|||
console.log(row); |
|||
if (row) { |
|||
// this.fmData = { ...this.fmData, ...row }; |
|||
await this.getInfo(row.id); |
|||
this.getValiheList(); |
|||
this.getBuildList(); |
|||
this.getUniList(); |
|||
this.getHouseList(); |
|||
} |
|||
}, |
|||
|
|||
async getInfo(id) { |
|||
const { data, code, msg } = await requestPost( |
|||
"/epmetuser/icBirthRecord/" + id, |
|||
{ |
|||
// id, |
|||
} |
|||
); |
|||
if (code === 0) { |
|||
this.fmData = { ...this.fmData, ...data }; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
async handleComfirm() { |
|||
this.btnDisable = true; |
|||
setTimeout(() => { |
|||
this.btnDisable = false; |
|||
}, 10000); |
|||
this.$refs["ref_form"].validate((valid, messageObj) => { |
|||
if (!valid) { |
|||
app.util.validateRule(messageObj); |
|||
this.btnDisable = false; |
|||
} else { |
|||
if (!formVltHelper.userOrMobile(this.fmData.mobile)) { |
|||
return this.$message({ |
|||
type: "error", |
|||
message: "手机号格式有误", |
|||
}); |
|||
} |
|||
this.submit(); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
async submit() { |
|||
let url = ""; |
|||
if (this.formType === "add") { |
|||
url = "/epmetuser/icBirthRecord/save"; |
|||
} else if (this.formType === "edit") { |
|||
url = "/epmetuser/icBirthRecord/update"; |
|||
} else { |
|||
return; |
|||
} |
|||
|
|||
const { fmData, checkResult } = this; |
|||
if ( |
|||
fmData.isCheck == "1" && |
|||
checkResult.resiHomeId != fmData.homeId && |
|||
checkResult.status == "0" |
|||
) { |
|||
await this.$confirm( |
|||
"居民信息中房屋信息与当前选择房屋不一致,是否更新?", |
|||
"提示", |
|||
{ |
|||
confirmButtonText: "更新", |
|||
cancelButtonText: "不更新", |
|||
type: "warning", |
|||
center: true, |
|||
} |
|||
) |
|||
.then(() => { |
|||
this.fmData.isReplace = "1"; |
|||
}) |
|||
.catch(() => { |
|||
this.fmData.isReplace = "0"; |
|||
}); |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, fmData); |
|||
|
|||
if (code === 0) { |
|||
this.$message({ |
|||
type: "success", |
|||
message: "操作成功", |
|||
}); |
|||
this.resetData(); |
|||
this.$emit("dialogOk"); |
|||
this.btnDisable = false; |
|||
} else { |
|||
this.btnDisable = false; |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
handleCancle() { |
|||
this.resetData(); |
|||
this.$emit("dialogCancle"); |
|||
}, |
|||
resetData() { |
|||
this.checkResult = {}; |
|||
this.optionsB = []; |
|||
this.optionsH = []; |
|||
this.optionsD = []; |
|||
this.fmData = iniFmData(); |
|||
}, |
|||
// 开启加载动画 |
|||
startLoading() { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading() { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.item_width_1 { |
|||
width: 500px; |
|||
} |
|||
.item_width_2 { |
|||
width: 400px; |
|||
} |
|||
.item_width_3 { |
|||
margin-left: 10px; |
|||
width: 200px; |
|||
} |
|||
.item_width_4 { |
|||
width: 200px; |
|||
} |
|||
|
|||
.div_map { |
|||
margin-top: 10px; |
|||
} |
|||
|
|||
.div_btn { |
|||
// display: flex; |
|||
// justify-content: flex-end; |
|||
} |
|||
.el-tabs { |
|||
margin: 0 20px; |
|||
} |
|||
.el-upload__tip { |
|||
color: rgb(155, 155, 155); |
|||
margin: 0; |
|||
} |
|||
.form { |
|||
margin-top: 30px; |
|||
} |
|||
|
|||
.m-staffs { |
|||
width: 468px; |
|||
.item { |
|||
display: flex; |
|||
justify-content: space-around; |
|||
margin-bottom: 7px; |
|||
} |
|||
.item-add { |
|||
} |
|||
} |
|||
</style> |
|||
|
|||
<style> |
|||
.el-dialog__body { |
|||
padding: 0 10px 20px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,703 @@ |
|||
<template> |
|||
<div class="m-pop"> |
|||
<div class="wrap"> |
|||
<cpt-card> |
|||
<div class="title"> |
|||
<img src="@/assets/img/shuju/title-tip.png" /> |
|||
<span>项目详情</span> |
|||
</div> |
|||
|
|||
<div class="btn-close" @click="handleClose"> |
|||
<img src="@/assets/img/shuju/people/close.png" /> |
|||
</div> |
|||
<div class="m-top"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span>项目标题:</span> |
|||
<span>{{ projectInfo.projectTitle }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>项目背景:</span> |
|||
<span>{{ projectInfo.backGround }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>项目方案:</span> |
|||
<span>{{ projectInfo.publicReply }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>内部备注:</span> |
|||
<span>{{ projectInfo.internalRemark || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>当前处理部门:</span> |
|||
<span>{{ projectInfo.departmentNameList.join("、") }}</span> |
|||
</div> |
|||
<div class="info-prop" v-if="projectCate.length > 0"> |
|||
<span>分类:</span> |
|||
<fold-text :row="3"> |
|||
<div :key="item.name" v-for="item in projectCate"> |
|||
{{ item.name }} |
|||
</div> |
|||
</fold-text> |
|||
</div> |
|||
<div class="info-prop" v-if="projectTag.length > 0"> |
|||
<span>标签:</span> |
|||
<fold-text :row="3"> |
|||
<div :key="item.name" v-for="item in projectTag"> |
|||
{{ item.name }} |
|||
</div> |
|||
</fold-text> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-process" v-if="projectProcess.length > 0"> |
|||
<div class="process-title">处理进展</div> |
|||
<div class="list"> |
|||
<div |
|||
class="item" |
|||
:class="index === 0 ? 'z-on' : ''" |
|||
:key="item.processId" |
|||
v-for="(item, index) in projectProcess" |
|||
> |
|||
<div class="item-row"> |
|||
<div class="name">{{ item.processName }}</div> |
|||
<div class="date"> |
|||
{{ item.processTime }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="detail"> |
|||
<div class="detail-field">处理部门:</div> |
|||
<div class="detail-value">{{ item.departmentName }}</div> |
|||
</div> |
|||
|
|||
<div |
|||
class="detail" |
|||
v-if="item.processName != '转项目' && item.publicReply" |
|||
> |
|||
<div class="detail-field">说 明:</div> |
|||
<div class="detail-value"> |
|||
<fold-text :row="3">{{ item.publicReply }}</fold-text> |
|||
</div> |
|||
</div> |
|||
|
|||
<div |
|||
class="detail" |
|||
v-if="item.processName != '转项目' && item.internalRemark" |
|||
> |
|||
<div class="detail-field">内部备注:</div> |
|||
<div class="detail-value"> |
|||
<fold-text :row="3">{{ item.internalRemark }}</fold-text> |
|||
</div> |
|||
</div> |
|||
<div class="detail"> |
|||
<div class="attachement-list"> |
|||
<a |
|||
:href="att.url" |
|||
target="_blank" |
|||
:key="att.url" |
|||
v-for="att in item.internalFile" |
|||
> |
|||
<i class="el-icon-folder-opened"></i> |
|||
{{ att.name }} |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div v-if="projectInfo.origin !== 'agency'" class="tabs"> |
|||
<div |
|||
class="tab-btn" |
|||
@click="subStartGroupIndex" |
|||
v-if="groupList.length > 9" |
|||
> |
|||
<img src="@/assets/img/shuju/people/arrow-double-left.png" /> |
|||
</div> |
|||
<div |
|||
v-show="index >= startGroupIndex && index < startGroupIndex + 9" |
|||
class="tab" |
|||
:class="groupIndex % groupList.length == index ? 'z-on' : ''" |
|||
:key="'tab' + index" |
|||
@click="groupIndex = index" |
|||
v-for="(item, index) in groupList" |
|||
> |
|||
{{ item.label }} |
|||
</div> |
|||
<div |
|||
class="tab-btn" |
|||
@click="addStartGroupIndex" |
|||
v-if="groupList.length > 9" |
|||
> |
|||
<img src="@/assets/img/shuju/people/arrow-double-right.png" /> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-case" v-if="projectInfo.origin !== 'agency'"> |
|||
<div class="m-yanpan" v-if="groupIndex == 0"> |
|||
<div v-if="projectId || true"> |
|||
<screen-loading v-if="!yanPan.loading">加载中</screen-loading> |
|||
<analyse |
|||
v-else-if="yanPan.singleTitle" |
|||
:singleTitle="yanPan.singleTitle" |
|||
:moreTitle="yanPan.moreTitle" |
|||
:userList="yanPan.homeUserList" |
|||
:userName="yanPan.icUserName" |
|||
:singleList="yanPan.singleList" |
|||
:hasEvent="yanPan.hasEvent" |
|||
:moreList="yanPan.moreList" |
|||
@user="toUserInfo" |
|||
@project="toProjectInfo" |
|||
/> |
|||
<div v-else class="m-hint"> |
|||
<img |
|||
src="@/assets/img/modules/visual/noData.png" |
|||
class="no-data-img" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div v-if="groupIndex == 1"> |
|||
<div |
|||
class="m-row" |
|||
v-if="projectInfo.originId && projectInfo.origin !== 'work_event'" |
|||
> |
|||
<div v-if="projectInfo.origin === 'issue'" class="m-info"> |
|||
<div class="info-prop"> |
|||
<span>议题标题:</span> |
|||
<span>{{ issueInfo.issueTitle }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>议题建议:</span> |
|||
<span>{{ issueInfo.issueSuggestion }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>所属网格:</span> |
|||
<span>{{ issueInfo.belongsGridName || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>议题发起人:</span> |
|||
<span>{{ issueInfo.issueInitiator }}</span> |
|||
</div> |
|||
<div |
|||
v-if="issueInfo.topicInfo && issueInfo.topicInfo.groupName" |
|||
class="info-prop" |
|||
> |
|||
<span>议题来源:</span> |
|||
<span>{{ issueInfo.topicInfo.groupName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>转议题时间:</span> |
|||
<span>{{ issueInfo.shiftIssueTime }}</span> |
|||
</div> |
|||
</div> |
|||
<div v-if="projectInfo.origin === 'resi_event'" class="m-info"> |
|||
<div class="info-title">事件内容</div> |
|||
<div class="info-content">{{ info.eventContent }}</div> |
|||
<div class="info-pics"> |
|||
<img |
|||
:src="src" |
|||
:key="src" |
|||
v-for="src in info.eventImgs" |
|||
@click="watchImg(src)" |
|||
/> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">提交时间:</span> |
|||
<span>{{ info.eventTime }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">报事人:</span> |
|||
<span>{{ info.eventPeopleName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">所属网格:</span> |
|||
<span>{{ info.gridName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">提报给:</span> |
|||
<div> |
|||
<div>{{ info.eventPersonShow }}</div> |
|||
<div>{{ info.eventOrgShow }}</div> |
|||
</div> |
|||
|
|||
<!-- <span>{{ info.eventPerson.join("、") || "--" }}</span> --> |
|||
</div> |
|||
</div> |
|||
|
|||
<div v-if="projectInfo.origin === 'issue'" class="m-line"> |
|||
<div class="stat"> |
|||
<div class="stat-item"> |
|||
<div> |
|||
{{ issueTrend.realityVoteCount }}/{{ |
|||
issueTrend.shouldVoteCount |
|||
}} |
|||
</div> |
|||
<div class="z-weak">已表决/应表决</div> |
|||
</div> |
|||
<div class="stat-item"> |
|||
<div>{{ issueTrend.supportAmount }}</div> |
|||
<div class="z-weak">支持</div> |
|||
</div> |
|||
<div class="stat-item"> |
|||
<div>{{ issueTrend.oppositionAmount }}</div> |
|||
<div class="z-weak">反对</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<line-chart |
|||
v-if="issueChartData.length > 0" |
|||
:list="issueChartData" |
|||
/> |
|||
</div> |
|||
</div> |
|||
<div v-else class="m-hint"> |
|||
<img |
|||
src="@/assets/img/modules/visual/noData.png" |
|||
class="no-data-img" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</cpt-card> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import cptCard from "@/views/modules/visual/cpts/card"; |
|||
import screenLoading from "@/views/modules/visual/cpts/loading"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import cptTb from "@/views/modules/visual/cpts/tb"; |
|||
import lineChart from "@/views/modules/visual/cpts/line-chart"; |
|||
import analyse from "@/views/modules/visual/cpts/analyse"; |
|||
import foldText from "@/views/components/foldText"; |
|||
import dateFormat from "dai-js/tools/dateFormat"; |
|||
|
|||
function iniData() { |
|||
return { |
|||
projectIdCopy: this.projectId, |
|||
groupList: [{ label: "研判分析" }, { label: "项目来源" }], |
|||
groupIndex: 0, |
|||
startGroupIndex: 0, |
|||
|
|||
projectProcess: [], |
|||
|
|||
projectInfo: { |
|||
backGround: "", |
|||
departmentList: [ |
|||
// { departmentName: "南宁社区-南宁第二网格", staffList: ["周相成"] }, |
|||
], |
|||
departmentNameList: [], |
|||
internalRemark: "", |
|||
isSend: false, |
|||
locateAddress: "", |
|||
locateDimension: "", |
|||
locateLongitude: "", |
|||
origin: "", |
|||
originId: "", |
|||
platformIds: [], |
|||
processable: false, |
|||
projectId: "", |
|||
projectStatus: "pending", |
|||
projectTitle: "", |
|||
publicReply: "", |
|||
returnable: false, |
|||
}, |
|||
|
|||
issueInfo: { |
|||
attitude: "", |
|||
belongsGridName: "", |
|||
issueIdea: "", |
|||
issueInitiator: "", |
|||
issueStatus: "", |
|||
issueSuggestion: "", |
|||
issueTitle: "", |
|||
joinVote: true, |
|||
projectId: "", |
|||
projectStatus: false, |
|||
publishIdeaFlag: false, |
|||
}, |
|||
|
|||
issueTrend: {}, |
|||
issueChartData: [], |
|||
|
|||
eventInfo: { |
|||
eventTime: "", |
|||
eventContent: "", |
|||
eventAddress: "", |
|||
gridName: "", |
|||
isClosed: true, |
|||
isResolve: true, |
|||
isRollback: true, |
|||
eventImgs: [], |
|||
eventPerson: [], |
|||
eventOrg: [], |
|||
eventPeopleName: "", |
|||
projectInfo: { |
|||
projectId: "", |
|||
operationName: "", |
|||
operationTime: "", |
|||
projectDeclare: "", |
|||
}, |
|||
}, |
|||
|
|||
projectCate: [], |
|||
projectTag: [], |
|||
|
|||
yanPan: { |
|||
loading: false, |
|||
|
|||
icResiUserId: "", |
|||
houseId: "", |
|||
icUserName: "", |
|||
|
|||
homeUserList: [ |
|||
// { |
|||
// homeId: '', |
|||
// icUserId: '', |
|||
// icUserName: '', |
|||
// } |
|||
], |
|||
projectData: [ |
|||
// { |
|||
// firstCategoryCode: '', |
|||
// firstCategoryName: '', |
|||
// projectList: [], |
|||
// } |
|||
], |
|||
hasEvent: false, |
|||
singleTitle: "", |
|||
moreTitle: "", |
|||
singleList: [], //楼院小组 |
|||
moreList: [], // |
|||
}, |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
name: "demandInfo", |
|||
props: { |
|||
projectId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
userId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
categoryCodes: { |
|||
type: Array, |
|||
default: [], |
|||
}, |
|||
}, |
|||
|
|||
components: { |
|||
cptCard, |
|||
cptTb, |
|||
analyse, |
|||
screenLoading, |
|||
lineChart, |
|||
foldText, |
|||
}, |
|||
|
|||
data: iniData, |
|||
|
|||
computed: {}, |
|||
|
|||
watch: { |
|||
projectId() { |
|||
let data = iniData(); |
|||
Object.keys(data).forEach((k) => { |
|||
this[k] = data[k]; |
|||
}); |
|||
this.getApiData(); |
|||
}, |
|||
// projectIdCopy () { |
|||
|
|||
// }, |
|||
}, |
|||
|
|||
mounted() { |
|||
console.log(this.projectIdCopy); |
|||
this.getApiData(); |
|||
}, |
|||
|
|||
methods: { |
|||
watchImg(src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
addStartGroupIndex() { |
|||
const { startGroupIndex, groupList } = this; |
|||
if (startGroupIndex < groupList.length - 9) { |
|||
this.startGroupIndex = startGroupIndex + 1; |
|||
} else { |
|||
this.startGroupIndex = groupList.length - 9; |
|||
} |
|||
}, |
|||
subStartGroupIndex() { |
|||
const { startGroupIndex, groupList } = this; |
|||
if (startGroupIndex > 0) { |
|||
this.startGroupIndex = startGroupIndex - 1; |
|||
} else { |
|||
this.startGroupIndex = 0; |
|||
} |
|||
}, |
|||
handleClose() { |
|||
this.$emit("close"); |
|||
}, |
|||
|
|||
async getApiData() { |
|||
await this.getProjectInfo(); |
|||
this.getProjectCate(); |
|||
this.getProjectProcess(); |
|||
if (this.projectInfo.origin === "issue") { |
|||
this.getIssueInfo(); |
|||
this.getIssueTrend(); |
|||
} else if (this.projectInfo.origin === "resi_event") { |
|||
this.getEventInfo(); |
|||
} |
|||
if (this.projectInfo.origin !== "agency") { |
|||
await this.getYanPan(); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getProjectInfo() { |
|||
const url = "/gov/project/trace/projectdetail"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.projectInfo = data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getIssueInfo() { |
|||
const url = "/resi/hall/issue/detail"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueId: this.projectInfo.originId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.issueInfo = data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getIssueTrend() { |
|||
const url = "/resi/hall/issue/votingtrend"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueId: this.projectInfo.originId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.issueTrend = data; |
|||
let chartData = []; |
|||
data.polyLine.forEach((item) => { |
|||
let date = dateFormat(new Date(item.voteDate * 1000), "yyyy-MM-dd"); |
|||
// console.log("date:" + date); |
|||
chartData.push( |
|||
{ |
|||
date, |
|||
value: item.supportIncrement, |
|||
type: "支持", |
|||
}, |
|||
{ |
|||
date, |
|||
value: item.oppositionIncrement, |
|||
type: "反对", |
|||
} |
|||
); |
|||
}); |
|||
this.issueChartData = chartData; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getEventInfo() { |
|||
const url = "/gov/project/resievent/eventdetail-icdata"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
resiEventId: this.projectInfo.originId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
if (data.eventOrg && data.eventOrg.length > 0) { |
|||
data.eventOrgShow = data.eventOrg.join("、"); |
|||
} |
|||
if (data.eventPerson && data.eventPerson.length > 0) { |
|||
data.eventPersonShow = data.eventPerson.join("、"); |
|||
} |
|||
this.info = { ...data }; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getProjectProcess() { |
|||
const url = "/gov/project/trace/processlist-v2"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.projectProcess = data.map((item) => { |
|||
item.processTime = dateFormat( |
|||
new Date(item.processTime * 1000), |
|||
"yyyy-MM-dd hh:mm" |
|||
); |
|||
return item; |
|||
}); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
async getProjectCate() { |
|||
const url = "/gov/project/projectcategory/categorytaglist"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.projectCate = data.categoryList; |
|||
this.projectTag = data.tagList; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getYanPan() { |
|||
const url = "/data/aggregator/project/projectanalysis"; |
|||
|
|||
if (!this.userId) return (this.yanPan.loading = true); |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
categoryCodeList: this.categoryCodes, |
|||
userId: this.userId, |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
data.icResiUserId = data.icUserId; |
|||
data.homeUserList.forEach((item) => { |
|||
item.icResiUserId = item.icUserId; |
|||
}); |
|||
|
|||
let array1 = []; |
|||
let array2 = []; |
|||
|
|||
//楼院小组、居民上报都存在是,研判分析显示两个分支 |
|||
if ( |
|||
data.groupProjectList && |
|||
data.groupProjectList.length > 0 && |
|||
data.eventProjectList && |
|||
data.eventProjectList.length > 0 |
|||
) { |
|||
this.yanPan.hasEvent = true; |
|||
this.yanPan.singleTitle = "楼院小组"; |
|||
this.yanPan.moreTitle = "事件上报"; |
|||
array1 = [...data.groupProjectList]; |
|||
array2 = [...data.eventProjectList]; |
|||
} else { |
|||
this.yanPan.hasEvent = false; |
|||
if (data.groupProjectList && data.groupProjectList.length > 0) { |
|||
array1 = [...data.groupProjectList]; |
|||
this.yanPan.singleTitle = "楼院小组"; |
|||
} else if ( |
|||
data.eventProjectList && |
|||
data.eventProjectList.length > 0 |
|||
) { |
|||
array1 = [...data.eventProjectList]; |
|||
this.yanPan.singleTitle = "事件上报"; |
|||
} else { |
|||
array1 = []; |
|||
} |
|||
} |
|||
|
|||
if (array1.length > 0) { |
|||
data.singleList = array1.map((item) => { |
|||
return { |
|||
categoryCode: item.categoryCode, |
|||
categoryName: item.categoryName, |
|||
showItem: true, |
|||
projectList: item.projectList.map((subItem) => { |
|||
return { |
|||
title: subItem.title, |
|||
status: subItem.status, |
|||
statusName: subItem.status == "pending" ? "待处理" : "结案", |
|||
projectId: subItem.projectId, |
|||
}; |
|||
}), |
|||
}; |
|||
}); |
|||
} |
|||
if (array2.length > 0) { |
|||
data.moreList = array2.map((item) => { |
|||
return { |
|||
categoryCode: item.categoryCode, |
|||
categoryName: item.categoryName, |
|||
showItem: true, |
|||
projectList: item.projectList.map((subItem) => { |
|||
return { |
|||
title: subItem.title, |
|||
status: subItem.status, |
|||
statusName: subItem.status == "pending" ? "待处理" : "结案", |
|||
projectId: subItem.projectId, |
|||
}; |
|||
}), |
|||
}; |
|||
}); |
|||
} |
|||
|
|||
this.yanPan = { ...this.yanPan, ...data }; |
|||
console.log(this.yanPan); |
|||
this.yanPan.loading = true; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
toUserInfo(item) { |
|||
this.$router.push({ |
|||
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`, |
|||
}); |
|||
}, |
|||
|
|||
toProjectInfo(item) { |
|||
console.log(item); |
|||
this.projectIdCopy = item.projectId; |
|||
// let data = iniData(); |
|||
// Object.keys(data).forEach((k) => { |
|||
// this[k] = data[k]; |
|||
// }); |
|||
this.getApiData(); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/visual/incident-info.scss" |
|||
scoped |
|||
></style> |
@ -0,0 +1,696 @@ |
|||
<template> |
|||
<div class="resi-container"> |
|||
<div class="g-page" v-show="pageType == 'list'"> |
|||
<el-card ref="searchCard" class="search-card"> |
|||
<el-form |
|||
ref="searchForm" |
|||
:inline="true" |
|||
:model="fmData" |
|||
:label-width="'100px'" |
|||
class="demo-form-inline" |
|||
> |
|||
<div> |
|||
<el-form-item label="项目标题" prop="titleTemp"> |
|||
<el-input |
|||
v-model="fmData.titleTemp" |
|||
class="resi-cell-input" |
|||
size="small" |
|||
clearable |
|||
placeholder="请输入" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="转项目时间" prop="birthdayTime"> |
|||
<el-date-picker |
|||
v-model="fmData.birthdayTime" |
|||
type="daterange" |
|||
range-separator="至" |
|||
start-placeholder="开始日期" |
|||
end-placeholder="结束日期" |
|||
value-format="yyyy-MM-dd" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="状态" prop="remark"> |
|||
<el-select |
|||
v-model.trim="fmData.statusTemp" |
|||
placeholder="请选择" |
|||
size="small" |
|||
clearable |
|||
style="width: 120px" |
|||
class="resi-cell-select" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsStatus" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item style="margin-left: 35px"> |
|||
<el-button |
|||
class="diy-button--search" |
|||
size="small" |
|||
@click="handleSearch" |
|||
>查询</el-button |
|||
> |
|||
<el-button |
|||
class="diy-button--reset" |
|||
size="small" |
|||
@click="resetForm('searchForm')" |
|||
>重置</el-button |
|||
> |
|||
</el-form-item> |
|||
</div> |
|||
</el-form> |
|||
</el-card> |
|||
|
|||
<el-card class="resi-card-table"> |
|||
<div class="resi-row-btn"> |
|||
<el-button |
|||
v-if="false" |
|||
class="diy-button--add" |
|||
size="small" |
|||
@click="handleAdd" |
|||
>新增</el-button |
|||
> |
|||
<el-button |
|||
v-if="false" |
|||
class="diy-button--export" |
|||
size="small" |
|||
@click="handleExportModule('room')" |
|||
>下载模板</el-button |
|||
> |
|||
<el-upload |
|||
v-if="false" |
|||
ref="upload" |
|||
class="upload-btn" |
|||
action="uploadUlr" |
|||
:limit="1" |
|||
:accept="'.xls,.xlsx'" |
|||
:with-credentials="true" |
|||
:show-file-list="false" |
|||
:auto-upload="true" |
|||
:on-progress="handleProgress" |
|||
:on-success="handleExcelSuccess" |
|||
:before-upload="beforeExcelUpload" |
|||
:http-request="uploadHttpRequest" |
|||
> |
|||
<el-button |
|||
size="small" |
|||
class="diy-button--delete" |
|||
:loading="importLoading" |
|||
>{{ importBtnTitle }}</el-button |
|||
> |
|||
</el-upload> |
|||
|
|||
<el-button @click="handleChu" class="diy-button--reset" size="small" |
|||
>导出</el-button |
|||
> |
|||
</div> |
|||
|
|||
<el-table |
|||
:data="tableData" |
|||
border |
|||
style="width: 100%" |
|||
class="resi-table" |
|||
:height="maxTableHeight" |
|||
> |
|||
<el-table-column |
|||
label="序号" |
|||
fixed="left" |
|||
type="index" |
|||
align="center" |
|||
width="50" |
|||
/> |
|||
|
|||
<el-table-column prop="name" fixed="left" label="姓名" align="center"> |
|||
<template slot-scope="scope"> |
|||
<a class="name-a" @click="handleWatch(scope.$index)"> |
|||
{{ scope.row.name }} |
|||
</a> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="gridName" |
|||
align="center" |
|||
label="所属网格" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="home" |
|||
label="所属房屋" |
|||
align="center" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="mobile" |
|||
width="100" |
|||
align="center" |
|||
label="手机号" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="idCard" |
|||
align="center" |
|||
label="身份证号" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="gender" align="center" label="性别"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="birthday" |
|||
align="center" |
|||
label="出生日期" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="birthplace" |
|||
align="center" |
|||
label="出生地" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="parentName" |
|||
align="center" |
|||
label="出生人父/母姓名" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="count" align="center" label="胎次"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="reportDate" |
|||
align="center" |
|||
label="申报户口日期" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="householderName" |
|||
align="center" |
|||
label="户主姓名" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
prop="householderRelation" |
|||
align="center" |
|||
label="与户主关系" |
|||
:show-overflow-tooltip="true" |
|||
> |
|||
</el-table-column> |
|||
|
|||
<el-table-column |
|||
fixed="right" |
|||
label="操作" |
|||
align="center" |
|||
width="160" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
@click="handleWatch(scope.$index)" |
|||
type="text" |
|||
size="small" |
|||
>查看</el-button |
|||
> |
|||
|
|||
<el-button |
|||
@click="handleEdit(scope.$index)" |
|||
type="text" |
|||
size="small" |
|||
class="div-table-button--edit" |
|||
>处理</el-button |
|||
> |
|||
|
|||
<el-popconfirm |
|||
v-if="false" |
|||
title="删除之后无法回复,确认删除?" |
|||
@onConfirm="handleDel(scope.row, scope.$index)" |
|||
@confirm="handleDel(scope.row, scope.$index)" |
|||
> |
|||
<el-button |
|||
slot="reference" |
|||
type="text" |
|||
size="small" |
|||
class="div-table-button--delete" |
|||
style="margin-left: 10px" |
|||
>删除</el-button |
|||
> |
|||
</el-popconfirm> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<div> |
|||
<el-pagination |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" |
|||
:page-sizes="[20, 50, 100, 200]" |
|||
:page-size="parseInt(pageSize)" |
|||
layout="sizes, prev, pager, next, total" |
|||
:total="total" |
|||
> |
|||
</el-pagination> |
|||
</div> |
|||
</el-card> |
|||
</div> |
|||
|
|||
<div class="g-page" v-if="pageType == 'edit' || pageType == 'info'"> |
|||
<project-info |
|||
ref="eleEditForm" |
|||
:type="pageType" |
|||
:projectId="currentProject.projectId" |
|||
@dialogCancle="handleClose" |
|||
@dialogOk="handleEditSuccess" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import nextTick from "dai-js/tools/nextTick"; |
|||
import { mapGetters } from "vuex"; |
|||
import projectInfo from "./cpts/project-info"; |
|||
import axios from "axios"; |
|||
|
|||
export default { |
|||
components: { projectInfo }, |
|||
|
|||
data() { |
|||
return { |
|||
pageType: "list", // 列表list 处理dispose 详情info 议题详情issue-info |
|||
|
|||
pageNo: 1, |
|||
pageSize: window.localStorage.getItem("pageSize") || 20, |
|||
total: 1, |
|||
|
|||
tableData: [], |
|||
|
|||
optionsStatus: [ |
|||
{ |
|||
value: "1", |
|||
label: "未结案", |
|||
}, |
|||
{ |
|||
value: "0", |
|||
label: "已结案", |
|||
}, |
|||
], |
|||
|
|||
fmData: { |
|||
title: "", |
|||
status: "", |
|||
birthdayStart: "", |
|||
birthdayEnd: "", |
|||
birthdayTime: ["", ""], |
|||
}, |
|||
|
|||
importBtnTitle: "导入", |
|||
importLoading: false, |
|||
|
|||
currentProject: { |
|||
projectId: "", |
|||
userId: "", |
|||
categoryCodes: [], |
|||
}, |
|||
}; |
|||
}, |
|||
computed: { |
|||
maxTableHeight() { |
|||
return this.$store.state.inIframe |
|||
? this.clientHeight - 360 + this.iframeHeigh |
|||
: this.clientHeight - 360; |
|||
}, |
|||
...mapGetters(["clientHeight", "iframeHeight"]), |
|||
}, |
|||
watch: { |
|||
"fmData.birthdayTime": function (val) { |
|||
if (Array.isArray(val) && val.length == 2) { |
|||
this.fmData.birthdayStart = val[0]; |
|||
this.fmData.birthdayEnd = val[1]; |
|||
} else { |
|||
this.fmData.birthdayStart = ""; |
|||
this.fmData.birthdayEnd = ""; |
|||
} |
|||
}, |
|||
}, |
|||
mounted() { |
|||
this.getTableData(); |
|||
}, |
|||
methods: { |
|||
async handleExportModule() { |
|||
let url = "/heart/iccommunityselforganization/import-template-download"; |
|||
|
|||
let params = {}; |
|||
await this.$http({ |
|||
method: "POST", |
|||
url, |
|||
responseType: "blob", |
|||
data: params, |
|||
}) |
|||
.then((res) => { |
|||
// this.download(res.data, title + '.xls') |
|||
if (res.headers["content-disposition"]) { |
|||
let fileName = window.decodeURI( |
|||
res.headers["content-disposition"].split(";")[1].split("=")[1] |
|||
); |
|||
console.log("filename", fileName); |
|||
let blob = new Blob([res.data], { |
|||
type: "application/vnd.ms-excel", |
|||
}); |
|||
var url = window.URL.createObjectURL(blob); |
|||
var aLink = document.createElement("a"); |
|||
aLink.style.display = "none"; |
|||
aLink.href = url; |
|||
aLink.setAttribute("download", fileName); |
|||
document.body.appendChild(aLink); |
|||
aLink.click(); |
|||
document.body.removeChild(aLink); //下载完成移除元素 |
|||
window.URL.revokeObjectURL(url); //释放掉blob对象 |
|||
} else this.$message.error("下载失败"); |
|||
}) |
|||
.catch((err) => { |
|||
console.log("err", err); |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
// 上传大图标成功 |
|||
handleExcelSuccess(res, file) { |
|||
if (res.code === 0 && res.msg === "success") { |
|||
console.log("resss---ppp", res); |
|||
} else { |
|||
this.$message.error(res.msg); |
|||
} |
|||
}, |
|||
handleProgress(event, file, fileList) { |
|||
console.log("percentage", file.percentage); |
|||
}, |
|||
|
|||
beforeExcelUpload(file) { |
|||
console.log("file", file); |
|||
const isType = file.type === "application/vnd.ms-excel"; |
|||
const isTypeComputer = |
|||
file.type === |
|||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; |
|||
const fileType = isType || isTypeComputer; |
|||
const isLt1M = file.size / 1024 / 1024 < 10; |
|||
if (!fileType) { |
|||
this.$message.error("上传文件只能是xls/xlsx格式!"); |
|||
} |
|||
|
|||
if (!isLt1M) { |
|||
this.$message.error("上传文件大小不能超过 10MB!"); |
|||
} |
|||
return fileType && isLt1M; |
|||
}, |
|||
async uploadHttpRequest(file) { |
|||
this.importLoading = true; |
|||
this.importBtnTitle = "正在上传中..."; |
|||
this.$message({ |
|||
showClose: true, |
|||
message: "导入中,请到系统管理-导入记录中查看进度", |
|||
duration: 0, |
|||
}); |
|||
const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 |
|||
formData.append("file", file.file); //添加文件对象 |
|||
await this.$http |
|||
.post( |
|||
"/heart/iccommunityselforganization/importcommunityselforganization", |
|||
formData |
|||
) |
|||
.then((res) => { |
|||
console.log("res-up", res); |
|||
if (res.data.code == 0 && res.data.msg == "success") { |
|||
// this.$message.success('导入成功') |
|||
this.getTableData(); |
|||
} else this.$message.error(res.data.msg); |
|||
}) |
|||
.catch((err) => { |
|||
console.log("失败", err); |
|||
file.onError(); //上传失败的文件会从文件列表中删除 |
|||
// this.$message.error('导入失败') |
|||
}); |
|||
// axios({ |
|||
// url: |
|||
// window.SITE_CONFIG["apiURL"] + |
|||
// "/heart/iccommunityselforganization/importcommunityselforganization", |
|||
// method: "post", |
|||
// data: formData, |
|||
// // responseType: "blob", |
|||
// }) |
|||
// .then((res) => { |
|||
// this.importLoading = false; |
|||
// this.importBtnTitle = "导入"; |
|||
// console.log("resresresresresresres", res); |
|||
|
|||
// this.getTableData(); |
|||
// if (res.data.code == 0) { |
|||
// return this.$message.success(res.data.data || "导入成功"); |
|||
// } else { |
|||
// return this.$message.error(res.data.msg); |
|||
// } |
|||
// }) |
|||
// .catch((err) => { |
|||
// console.log("失败", err); |
|||
// }); |
|||
this.importLoading = false; |
|||
this.importBtnTitle = "导入"; |
|||
this.$refs.upload.clearFiles(); |
|||
}, |
|||
|
|||
handleSizeChange(val) { |
|||
console.log(`每页 ${val} 条`); |
|||
this.pageSize = val; |
|||
window.localStorage.setItem("pageSize", val); |
|||
this.getTableData(); |
|||
}, |
|||
handleCurrentChange(val) { |
|||
console.log(`当前页: ${val}`); |
|||
this.pageNo = val; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
handleSearch(val) { |
|||
console.log(this.fmData); |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
}, |
|||
resetForm(formName) { |
|||
this.$refs[formName].resetFields(); |
|||
this.handleSearch(); |
|||
}, |
|||
|
|||
async handleChu() { |
|||
const url = "/epmetuser/icBirthRecord/export"; |
|||
const { pageSize, pageNo, fmData } = this; |
|||
axios({ |
|||
url: window.SITE_CONFIG["apiURL"] + url, |
|||
method: "post", |
|||
data: { |
|||
pageSize, |
|||
pageNo, |
|||
...fmData, |
|||
}, |
|||
responseType: "blob", |
|||
}) |
|||
.then((res) => { |
|||
let fileName = window.decodeURI( |
|||
res.headers["content-disposition"].split(";")[1].split("=")[1] |
|||
); |
|||
console.log("filename", fileName); |
|||
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" }); |
|||
var url = window.URL.createObjectURL(blob); |
|||
var aLink = document.createElement("a"); |
|||
aLink.style.display = "none"; |
|||
aLink.href = url; |
|||
aLink.setAttribute("download", fileName); |
|||
document.body.appendChild(aLink); |
|||
aLink.click(); |
|||
document.body.removeChild(aLink); //下载完成移除元素 |
|||
window.URL.revokeObjectURL(url); //释放掉blob对象 |
|||
}) |
|||
.catch((err) => { |
|||
console.log("获取导出情失败", err); |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
|
|||
async handleAdd() {}, |
|||
async handleWatch(rowIndex) { |
|||
let item = this.tableData[rowIndex]; |
|||
this.currentProject = { |
|||
projectId: item.projectId, |
|||
}; |
|||
this.pageType = "info"; |
|||
}, |
|||
|
|||
async handleEdit(rowIndex) { |
|||
let item = this.tableData[rowIndex]; |
|||
this.currentProject = { |
|||
projectId: item.projectId, |
|||
}; |
|||
this.pageType = "edit"; |
|||
}, |
|||
|
|||
handleClose() { |
|||
this.pageType = "list"; |
|||
this.currentProject = { |
|||
projectId: "", |
|||
}; |
|||
}, |
|||
|
|||
handleEditSuccess() { |
|||
this.handleClose(); |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
async handleDel(rowData, rowIndex) { |
|||
console.log(rowData, rowIndex); |
|||
const url = |
|||
"/heart/iccommunityselforganization/delcommunityselforganization"; |
|||
const { tableData } = this; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
orgId: tableData[rowIndex].orgId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.$message.success("删除成功!"); |
|||
this.getTableData(); |
|||
} else { |
|||
this.$message.success("操作失败!"); |
|||
} |
|||
}, |
|||
|
|||
async getTableData() { |
|||
const url = "/epmetuser/icBirthRecord/page"; |
|||
const { pageSize, pageNo, fmData } = this; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
...fmData, |
|||
}); |
|||
if (code === 0) { |
|||
console.log("列表请求成功!!!!!!!!!!!!!!"); |
|||
this.total = data.total || 0; |
|||
this.tableData = data.list |
|||
? data.list.map((item) => { |
|||
return item; |
|||
}) |
|||
: []; |
|||
} else { |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/buttonstyle.scss"; |
|||
|
|||
.resi-container .resi-card-table { |
|||
::v-deep .el-table th { |
|||
color: #fff; |
|||
background-color: rgba(33, 149, 254, 1); |
|||
// border-right: 1px solid rgba(33, 149, 254, 1); |
|||
} |
|||
} |
|||
.resi-table { |
|||
::v-deep .el-button--text { |
|||
text-decoration: underline; |
|||
} |
|||
} |
|||
.resi-card-table { |
|||
margin-top: 20px; |
|||
} |
|||
.resi-row-btn { |
|||
margin-bottom: 13px; |
|||
.upload-btn { |
|||
display: inline-block; |
|||
margin: 0 10px; |
|||
} |
|||
} |
|||
|
|||
.resi-btns { |
|||
margin-top: 20px; |
|||
text-align: center; |
|||
} |
|||
|
|||
.resi-container .resi-card { |
|||
position: relative; |
|||
overflow: visible; |
|||
} |
|||
|
|||
.demo-form-inline { |
|||
// display: flex; |
|||
// align-items: center; |
|||
// margin-bottom: 20px; |
|||
|
|||
.resi-cell-label { |
|||
flex-shrink: 0; |
|||
min-width: 0; |
|||
box-sizing: border-box; |
|||
margin-right: 15px; |
|||
// text-align: right; |
|||
// line-height: 32; |
|||
} |
|||
.resi-cell-label1 { |
|||
width: max-content; |
|||
} |
|||
.resi-cell-value-radio { |
|||
display: flex; |
|||
align-items: center; |
|||
min-height: 32px; |
|||
} |
|||
.resi-cell-input { |
|||
width: 200px; |
|||
} |
|||
.resi-cell--daterange { |
|||
max-width: 260px; |
|||
} |
|||
.resi-cell-select { |
|||
width: 200px; |
|||
box-sizing: border-box; |
|||
margin-right: 10px; |
|||
&-middle { |
|||
width: 130px; |
|||
} |
|||
&-small { |
|||
width: 88px; |
|||
} |
|||
} |
|||
.resi-cell-select:last-child { |
|||
margin-right: 0; |
|||
} |
|||
} |
|||
|
|||
.mt10 { |
|||
margin-top: 10px; |
|||
} |
|||
</style> |
Loading…
Reference in new issue