wangxianzhang 3 years ago
parent
commit
cdff4e8811
  1. 7
      src/assets/scss/modules/visual/houseStatic.scss
  2. 7
      src/assets/scss/modules/visual/people.scss
  3. 15
      src/views/modules/base/epidemic/natInfo/natDetail.vue
  4. 29
      src/views/modules/base/epidemic/natInfo/natForm.vue
  5. 24
      src/views/modules/base/epidemic/natInfo/natList.vue
  6. 100
      src/views/modules/visual/basicinfo/houseStatic/houseStatic.vue
  7. 6
      src/views/modules/visual/basicinfo/houseStatic/peopleList.vue
  8. 502
      src/views/modules/visual/basicinfo/people.vue
  9. 472
      src/views/modules/workSys/certify/certify.vue
  10. 205
      src/views/modules/workSys/certify/detailForm.vue
  11. 460
      src/views/modules/workSys/certify/editForm.vue

7
src/assets/scss/modules/visual/houseStatic.scss

@ -197,6 +197,13 @@
background: #e43c26;
border-radius: 4px;
}
.hzrbz{
background: #fac126;
}
.zbqc{
background: #fc8452;
}
>span{
margin-left:10px;
font-size: 10px;

7
src/assets/scss/modules/visual/people.scss

@ -372,7 +372,7 @@
z-index: 1;
}
.rel-bg {
height: 70px;
height: 78px;
width: 128px;
}
@ -384,7 +384,7 @@
left: 0;
width: 100%;
padding: 7px 10px;
line-height: 24px;
line-height: 20px;
text-align: center;
color: #fff;
font-size: 18px;
@ -395,6 +395,9 @@
.rel-name {
font-size: 14px;
}
.rel-call {
font-size: 15px;
}
}
&.z-zuo-2 {

15
src/views/modules/base/epidemic/natInfo/natDetail.vue

@ -25,7 +25,8 @@
<span class="info-title-2">证件号</span>
<span>{{ formData.showIdCard||'--' }}</span>
</div>
<div class="info-prop">
<div v-if="!isXiaozhaizi"
class="info-prop">
<span class="info-title-2">采样时间</span>
<span>{{ formData.sampleTime||'--' }}</span>
</div>
@ -57,6 +58,12 @@
</div>
</div>
<div v-if="isXiaozhaizi"
class="info-prop">
<span class="info-title-2">试管编号</span>
<span>{{ formData.testTubeCode||'--' }}</span>
</div>
</div>
</div>
@ -210,7 +217,11 @@ export default {
view_real_data: {//
type: Boolean,
default: false,
}
},
isXiaozhaizi: {
type: Boolean,
default: false
},
},
}
</script>

29
src/views/modules/base/epidemic/natInfo/natForm.vue

@ -95,7 +95,8 @@
v-model="formData.idCard">
</el-input>
</el-form-item>
<el-form-item label="采样时间"
<el-form-item v-if="!isXiaozhaizi"
label="采样时间"
style="display: block"
prop="sampleTime"
label-width="150px">
@ -173,6 +174,19 @@
</el-upload>
</el-form-item>
<el-form-item v-if="isXiaozhaizi"
label="试管编号"
prop="testTubeCode"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
placeholder="请输入试管编号"
clearable
v-model="formData.testTubeCode">
</el-input>
</el-form-item>
<div v-if=" formType!=='detail'">
<el-form-item label="通知渠道"
prop="isSelChannel"
@ -272,6 +286,7 @@ export default {
natAddress: '',
natResult: '',
sampleTime: '',
testTubeCode: '',
isSelChannel: false,
channel: [],
content: '',
@ -625,6 +640,7 @@ export default {
natAddress: '',
natResult: '',
sampleTime: '',
testTubeCode: '',
isSelChannel: false,
channel: [],
content: '',
@ -689,13 +705,10 @@ export default {
},
props: {
// serviceList: {
// type: Array,
// default: []
// },
isXiaozhaizi: {
type: Boolean,
default: false
},
}
}
</script>

24
src/views/modules/base/epidemic/natInfo/natList.vue

@ -31,7 +31,8 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="采样时间"
<el-form-item v-if="!isXiaozhaizi"
label="采样时间"
label-width="110px"
prop="sampleStartTime">
<el-date-picker v-model="sampleTimeRange"
@ -180,7 +181,8 @@
label="证件号"
min-width="170">
</el-table-column>
<el-table-column prop="sampleTime"
<el-table-column v-if="!isXiaozhaizi"
prop="sampleTime"
header-align="center"
align="center"
label="采样时间"
@ -216,7 +218,14 @@
label="本辖区居民"
width="120">
</el-table-column>
<el-table-column v-if="isXiaozhaizi"
prop="testTubeCode"
header-align="center"
align="center"
show-overflow-tooltip
label="试管编号"
width="120">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="160"
@ -280,6 +289,7 @@
class="dialog-h"
@closed="diaClose">
<nat-form ref="ref_form"
:isXiaozhaizi="isXiaozhaizi"
@dialogCancle="diaClose"
@dialogOk="addFormOk"></nat-form>
</el-dialog>
@ -293,6 +303,7 @@
class="dialog-h"
@closed="diaDetailClose">
<nat-detail ref="ref_detail"
:isXiaozhaizi="isXiaozhaizi"
:view_real_data="btnAuths.ic_nat_view_real_data"
@dialogCancle="diaDetailClose"></nat-detail>
</el-dialog>
@ -321,6 +332,7 @@ export default {
isResiUser: true,
customerId: '',
isYantai: false,
isXiaozhaizi: false,
agencyId: '',
orgTypeList: [
@ -387,12 +399,16 @@ export default {
async mounted () {
//1580460084738760705
//id: 1535072605621841922
//id: 1536638904600752130
this.customerId = localStorage.getItem("customerId");
this.isYantai = false
this.isXiaozhaizi = false
if (this.customerId === '1535072605621841922') {
this.isYantai = true
}
if (this.customerId === '1536638904600752130') {
this.isXiaozhaizi = true
}
this.updateBtnAuths();

100
src/views/modules/visual/basicinfo/houseStatic/houseStatic.vue

@ -91,11 +91,19 @@
<div class="div-tip2">
<div class="cz-tip">
<div class="cz-tip-dot"></div>
<span>常住人口数</span>
<span>人户一致</span>
</div>
<div class="ld-tip">
<div class="ld-tip-dot"></div>
<span>流动人口数</span>
<span>人在户不在</span>
</div>
<div class="ld-tip">
<div class="ld-tip-dot hzrbz"></div>
<span>户在人不在</span>
</div>
<div class="ld-tip">
<div class="ld-tip-dot zbqc"></div>
<span>暂不清楚</span>
</div>
</div>
@ -110,14 +118,24 @@
</div>
<div class="pie-table-line"></div>
<div class="pie-table-total "
@click="handleClickPeople('cz')">
<div class="pie-table-total-count zz">{{userData.czUserTotal}}</div>
<div class="pie-table-title">常住人口数</div>
@click="handleClickPeople('rhyz')">
<div class="pie-table-total-count zz">{{userData.rhyzUserTotal}}</div>
<div class="pie-table-title">人户一致</div>
</div>
<div class="pie-table-total "
@click="handleClickPeople('ld')">
<div class="pie-table-total-count cz">{{userData.ldUserTotal}}</div>
<div class="pie-table-title">流动人口数</div>
@click="handleClickPeople('rzhbz')">
<div class="pie-table-total-count cz">{{userData.rzhbzUserTotal}}</div>
<div class="pie-table-title">人在户不在</div>
</div>
<div class="pie-table-total "
@click="handleClickPeople('hzrbz')">
<div class="pie-table-total-count xz">{{userData.hzrbzUserTotal}}</div>
<div class="pie-table-title">户在人不在</div>
</div>
<div class="pie-table-total "
@click="handleClickPeople('no')">
<div class="pie-table-total-count wsc">{{userData.zbqcUserTotal}}</div>
<div class="pie-table-title">暂不清楚</div>
</div>
</div>
@ -186,15 +204,27 @@
<div class="pie-table-line"></div>
<div class="pie-table-total ">
<div class="pie-table-total-count colorwhite"
@click="handleClickPeople('cz',item)">{{item.czUserTotal}}</div>
<div class="pie-table-title table-table-title">{{item.czUserRatio+'%'}}</div>
<div class="pie-table-title table-table-title">常住人口数</div>
@click="handleClickPeople('rhyz',item)">{{item.rhyzUserTotal}}</div>
<div class="pie-table-title table-table-title">{{item.rhyzUserRatio+'%'}}</div>
<div class="pie-table-title table-table-title">人户一致</div>
</div>
<div class="pie-table-total ">
<div class="pie-table-total-count colorwhite"
@click="handleClickPeople('rzhbz',item)">{{item.rzhbzUserRatio}}</div>
<div class="pie-table-title table-table-title">{{item.rzhbzUserRatio+'%'}}</div>
<div class="pie-table-title table-table-title">人在户不在</div>
</div>
<div class="pie-table-total ">
<div class="pie-table-total-count colorwhite"
@click="handleClickPeople('hzrbz',item)">{{item.hzrbzUserTotal}}</div>
<div class="pie-table-title table-table-title">{{item.hzrbzUserRatio+'%'}}</div>
<div class="pie-table-title table-table-title">户在人不在</div>
</div>
<div class="pie-table-total ">
<div class="pie-table-total-count colorwhite"
@click="handleClickPeople('ld',item)">{{item.ldUserTotal}}</div>
<div class="pie-table-title table-table-title">{{item.ldUserRatio+'%'}}</div>
<div class="pie-table-title table-table-title">流动人口数</div>
@click="handleClickPeople('no',item)">{{item.zbqcUserTotal}}</div>
<div class="pie-table-title table-table-title">{{item.zbqcUserRatio+'%'}}</div>
<div class="pie-table-title table-table-title">暂不清楚</div>
</div>
</div>
@ -224,7 +254,7 @@
<people-list v-if="showPeopleList "
:orgId="selOrgId"
:orgType="selOrgType"
:type="type"
:rhType="rhType"
@close="showPeopleList = false">
</people-list>
@ -310,13 +340,17 @@ export default {
orgId: '',//Id
orgType: '',// agency grid village
userTotal: 198000,//
czUserTotal: 2000,//
czUserRatio: '90%',//
ldUserTotal: 30,//
ldUserRatio: '5%',//
rhyzUserTotal: 2000,//
rhyzUserRatio: '90%',//
rzhbzUserTotal: 30,//
rzhbzUserRatio: '5%',//
hzrbzUserTotal: 30,//
hzrbzUserRatio: '5%',//
zbqcUserTotal: 30,//
zbqcUserRatio: '5%',//
},
userColorArray: ['#3dda83', '#e43c26'],
userColorArray: ['#3dda83', '#e43c26', '#fac126', '#fc8452'],
userPieData: [],
subList: [],
@ -330,7 +364,7 @@ export default {
parentPolygon: [],
rentType: '',//
type: '',//
rhType: '',//
showPeopleList: false,
showHouseList: false,
selOrgId: '',
@ -375,7 +409,7 @@ export default {
this.showHouseList = true
},
//
handleClickPeople (type, item) {
handleClickPeople (rhType, item) {
if (item) {
this.selOrgId = item.orgId
this.selOrgType = item.orgType
@ -384,7 +418,7 @@ export default {
this.selOrgType = this.houseData.orgType
}
this.toSubAgency('people')
this.type = type
this.rhType = rhType
this.showPeopleList = true
},
@ -495,7 +529,7 @@ export default {
this.$refs.userPieChart.showLoading()
}
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icresiuser/userchart";
const url = '/epmetuser/icresiuser/userchart'
const url = '/epmetuser/icresiuser/rhzk'
let params = {
orgId: this.orgId,
orgType: this.orgType
@ -537,17 +571,27 @@ export default {
// let maxIndex = 0
let obj1 = {
name: '常住人口数',
value: this.userData.czUserRatio,
name: '人户一致',
value: this.userData.rhyzUserRatio,
selected: true
}
let obj2 = {
name: '流动人口数',
value: this.userData.ldUserRatio
name: '人在户不在',
value: this.userData.rzhbzUserRatio
}
let obj3 = {
name: '户在人不在',
value: this.userData.hzrbzUserRatio
}
let obj4 = {
name: '暂不清楚',
value: this.userData.zbqcUserRatio
}
this.userPieData.push(obj1)
this.userPieData.push(obj2)
this.userPieData.push(obj3)
this.userPieData.push(obj4)
this.userPieOption.title.text = this.userData.userTotal
this.userPieOption.series[1].itemStyle = {

6
src/views/modules/visual/basicinfo/houseStatic/peopleList.vue

@ -124,7 +124,7 @@ export default {
let params = {
orgId: this.orgId,
orgType: this.orgType,
type: this.type,
rhType: this.rhType,
pageSize: this.pageSize,
pageNo: this.pageNo
}
@ -172,6 +172,10 @@ export default {
type: String,
default: "",
},
rhType: {//:rhyzrzhbzhzrbzno
type: String,
default: "",
},
},
};

502
src/views/modules/visual/basicinfo/people.vue

@ -1,12 +1,11 @@
<template>
<div class="g-wrr">
<div class="g-bread" v-if="breadList.length > 1">
<div class="g-bread"
v-if="breadList.length > 1">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item
v-for="item in breadList"
:key="item.path"
:to="{ path: item.path }"
>
<el-breadcrumb-item v-for="item in breadList"
:key="item.path"
:to="{ path: item.path }">
{{ item.meta.title }}
</el-breadcrumb-item>
</el-breadcrumb>
@ -20,9 +19,11 @@
<img src="@/assets/img/shuju/title-tip.png" />
<span>人员情况</span>
</div>
<div class="more" @click="showedMoreInfo = true">查看更多</div>
<div class="more"
@click="showedMoreInfo = true">查看更多</div>
<div class="ren">
<img class="pic-ren" src="@/assets/img/shuju/people/ren.png" />
<img class="pic-ren"
src="@/assets/img/shuju/people/ren.png" />
<div class="ren-name">
<span>{{ info.name }}</span>
<img src="@/assets/img/shuju/people/arrow.png" />
@ -116,13 +117,11 @@
</cpt-card>
</div>
<people-more
v-show="showedMoreInfo"
v-if="userId"
:userId="userId"
:gridName="info.gridName"
@close="showedMoreInfo = false"
/>
<people-more v-show="showedMoreInfo"
v-if="userId"
:userId="userId"
:gridName="info.gridName"
@close="showedMoreInfo = false" />
<div class="m-relation">
<cpt-card>
@ -132,14 +131,10 @@
</div>
<div class="info">
<div class="huzhu">
<img
class="huzhu-bg"
src="@/assets/img/shuju/people/huzhu.png"
/>
<img
class="huzhu-ico"
src="@/assets/img/shuju/people/huzhu-home.png"
/>
<img class="huzhu-bg"
src="@/assets/img/shuju/people/huzhu.png" />
<img class="huzhu-ico"
src="@/assets/img/shuju/people/huzhu-home.png" />
<div class="huzhu-name">
{{
houseInfo && houseInfo.ownerName
@ -150,159 +145,129 @@
<p>户主</p>
</div>
<div
class="rel z-zuo-2"
@click="toUserInfo(houseInfo.userList[0].userId)"
v-if="houseInfo.userList[0]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo2.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[0].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel z-zuo-2"
@click="toUserInfo(houseInfo.userList[0].userId)"
v-if="houseInfo.userList[0]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo2.png" />
<div class="rel-text"
:class="houseInfo.userList[0].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">
{{ houseInfo.userList[0].relation }}
</div>
<div class="rel-name">
{{ houseInfo.userList[0].userName }}
</div>
<div class="rel-name">
{{ houseInfo.userList[0].renHuCondition }}
</div>
</div>
</div>
<div
class="rel z-you-2"
@click="toUserInfo(houseInfo.userList[1].userId)"
v-if="houseInfo.userList[1]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you2.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[1].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel z-you-2"
@click="toUserInfo(houseInfo.userList[1].userId)"
v-if="houseInfo.userList[1]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you2.png" />
<div class="rel-text"
:class="houseInfo.userList[1].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">
{{ houseInfo.userList[1].relation }}
</div>
<div class="rel-name">
{{ houseInfo.userList[1].userName }}
</div>
<div class="rel-name">
{{ houseInfo.userList[1].renHuCondition }}
</div>
</div>
</div>
<div
class="rel z-zuo-1"
@click="toUserInfo(houseInfo.userList[2].userId)"
v-if="houseInfo.userList[2]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo1.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[2].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel z-zuo-1"
@click="toUserInfo(houseInfo.userList[2].userId)"
v-if="houseInfo.userList[2]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo1.png" />
<div class="rel-text"
:class="houseInfo.userList[2].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">
{{ houseInfo.userList[2].relation }}
</div>
<div class="rel-name">
{{ houseInfo.userList[2].userName }}
</div>
<div class="rel-name">
{{ houseInfo.userList[2].renHuCondition }}
</div>
</div>
</div>
<div
class="rel z-you-1"
@click="toUserInfo(houseInfo.userList[3].userId)"
v-if="houseInfo.userList[3]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you1.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[3].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel z-you-1"
@click="toUserInfo(houseInfo.userList[3].userId)"
v-if="houseInfo.userList[3]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you1.png" />
<div class="rel-text"
:class="houseInfo.userList[3].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">
{{ houseInfo.userList[3].relation }}
</div>
<span class="rel-name">{{
houseInfo.userList[3].userName
}}</span>
<div class="rel-name">
{{ houseInfo.userList[3].renHuCondition }}
</div>
</div>
</div>
<div
class="rel z-zuo-3"
@click="toUserInfo(houseInfo.userList[4].userId)"
v-if="houseInfo.userList[4]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo3.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[4].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel z-zuo-3"
@click="toUserInfo(houseInfo.userList[4].userId)"
v-if="houseInfo.userList[4]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-zuo.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/zuo3.png" />
<div class="rel-text"
:class="houseInfo.userList[4].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">
{{ houseInfo.userList[4].relation }}
</div>
<div class="rel-name">
{{ houseInfo.userList[4].userName }}
</div>
<div class="rel-name">
{{ houseInfo.userList[4].renHuCondition }}
</div>
</div>
</div>
<div
class="rel z-you-3"
@click="toUserInfo(houseInfo.userList[5].userId)"
v-if="houseInfo.userList[5]"
>
<img
class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png"
/>
<img
class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you3.png"
/>
<div
class="rel-text"
:class="houseInfo.userList[5].isSelf == '1' ? 'z-on' : ''"
>
<div class="rel z-you-3"
@click="toUserInfo(houseInfo.userList[5].userId)"
v-if="houseInfo.userList[5]">
<img class="rel-bg"
src="@/assets/img/shuju/people/huzhu-kuang-you.png" />
<img class="rel-line"
src="@/assets/img/shuju/people/huzhu-line/you3.png" />
<div class="rel-text"
:class="houseInfo.userList[5].isSelf == '1' ? 'z-on' : ''">
<div class="rel-call">
{{ houseInfo.userList[5].relation }}
</div>
<div class="rel-name">
{{ houseInfo.userList[5].userName }}
</div>
<div class="rel-name">
{{ houseInfo.userList[5].renHuCondition }}
</div>
</div>
</div>
</div>
@ -318,24 +283,21 @@
</div>
<div class="tb">
<cpt-tb
:col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="handleOperateDemandList"
></cpt-tb>
<div class="m-pagination" v-if="demand.total > demand.pageSize">
<el-pagination
hide-on-single-page
:current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeDemand"
>
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="handleOperateDemandList"></cpt-tb>
<div class="m-pagination"
v-if="demand.total > demand.pageSize">
<el-pagination hide-on-single-page
:current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeDemand">
</el-pagination>
</div>
</div>
@ -343,98 +305,82 @@
</div>
<div class="m-row">
<div class="m-list" :class="{'z-only': isShundeju}">
<div class="m-list"
:class="{'z-only': isShundeju}">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<a
:class="{ 'z-on': showedIncidentOrTopic == 'incident' }"
@click="showedIncidentOrTopic = 'incident'"
>上报事件</a
>
<a
:class="{ 'z-on': showedIncidentOrTopic == 'topic' }"
@click="showedIncidentOrTopic = 'topic'"
>发布话题</a
>
<a :class="{ 'z-on': showedIncidentOrTopic == 'incident' }"
@click="showedIncidentOrTopic = 'incident'">上报事件</a>
<a :class="{ 'z-on': showedIncidentOrTopic == 'topic' }"
@click="showedIncidentOrTopic = 'topic'">发布话题</a>
</div>
<div
class="list-wrap"
v-show="showedIncidentOrTopic == 'incident'"
>
<div class="list-wrap"
v-show="showedIncidentOrTopic == 'incident'">
<div class="list">
<div
class="item"
:key="'incident' + index"
v-for="(item, index) in incident.list"
@click="handleClickIncident(index)"
>
<div class="item"
:key="'incident' + index"
v-for="(item, index) in incident.list"
@click="handleClickIncident(index)">
<div class="item-title">{{ item.eventContent }}</div>
<div class="item-date">{{ item.reportTime }}</div>
</div>
</div>
<div
class="m-pagination"
v-if="incident.total > incident.pageSize"
>
<el-pagination
hide-on-single-page
:current-page="incident.pageNo"
:page-size="incident.pageSize"
:total="incident.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeIncident"
>
<div class="m-pagination"
v-if="incident.total > incident.pageSize">
<el-pagination hide-on-single-page
:current-page="incident.pageNo"
:page-size="incident.pageSize"
:total="incident.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeIncident">
</el-pagination>
</div>
<div v-if="incident.list.length == 0" class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
<div v-if="incident.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
<div class="list-wrap" v-show="showedIncidentOrTopic == 'topic'">
<div class="list-wrap"
v-show="showedIncidentOrTopic == 'topic'">
<div class="list">
<div
class="item"
:key="'topic' + index"
v-for="(item, index) in topic.list"
@click="handleClickTopic(index)"
>
<div class="item"
:key="'topic' + index"
v-for="(item, index) in topic.list"
@click="handleClickTopic(index)">
<div class="item-title">{{ item.topicContent }}</div>
<div class="item-date">{{ item.releaseTime }}</div>
</div>
</div>
<div class="m-pagination" v-if="topic.total > topic.pageSize">
<el-pagination
hide-on-single-page
:current-page="topic.pageNo"
:page-size="topic.pageSize"
:total="topic.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeTopic"
>
<div class="m-pagination"
v-if="topic.total > topic.pageSize">
<el-pagination hide-on-single-page
:current-page="topic.pageNo"
:page-size="topic.pageSize"
:total="topic.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangeTopic">
</el-pagination>
</div>
<div v-if="topic.list.length == 0" class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
<div v-if="topic.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</cpt-card>
</div>
<div class="m-list" v-if="!isShundeju">
<div class="m-list"
v-if="!isShundeju">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
@ -443,12 +389,10 @@
<div class="list-wrap">
<div class="list">
<div
class="item"
:key="'point' + index"
v-for="(item, index) in point.list"
@click="handleClickPoint(index)"
>
<div class="item"
:key="'point' + index"
v-for="(item, index) in point.list"
@click="handleClickPoint(index)">
<div class="item-row">
<div class="item-l">
<div class="item-point">{{ item.point }}</div>
@ -461,24 +405,22 @@
</div>
</div>
<div class="m-pagination" v-if="point.total > point.pageSize">
<el-pagination
hide-on-single-page
:current-page="point.pageNo"
:page-size="point.pageSize"
:total="point.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangePoint"
>
<div class="m-pagination"
v-if="point.total > point.pageSize">
<el-pagination hide-on-single-page
:current-page="point.pageNo"
:page-size="point.pageSize"
:total="point.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChangePoint">
</el-pagination>
</div>
<div v-if="point.list.length == 0" class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
<div v-if="point.list.length == 0"
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</cpt-card>
@ -486,41 +428,33 @@
</div>
</div>
<demand-info
v-if="demand.list.length > 0 && showedDemandInfo"
:userId="userId"
queryOrigin="personal-data"
:demandId="demand.srcList[demand.currentIndex].demandRecId"
@close="showedDemandInfo = false"
@handleAssignOk="handleAssignOk"
/>
<demand-info v-if="demand.list.length > 0 && showedDemandInfo"
:userId="userId"
queryOrigin="personal-data"
:demandId="demand.srcList[demand.currentIndex].demandRecId"
@close="showedDemandInfo = false"
@handleAssignOk="handleAssignOk" />
<template v-if="incident.list.length > 0 && incident.showedInfo">
<incident-info
v-if="
<incident-info v-if="
$store.state.user.customerId == 'b09527201c4409e19d1dbc5e3c3429a1'
"
:resiEventId="incident.list[incident.currentIndex].resiEventId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="incident.showedInfo = false"
/>
<event-info
v-else
:eventId="incident.list[incident.currentIndex].resiEventId"
:orgId="$store.state.user.agencyId"
orgType="agency"
@close="incident.showedInfo = false"
/>
:resiEventId="incident.list[incident.currentIndex].resiEventId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="incident.showedInfo = false" />
<event-info v-else
:eventId="incident.list[incident.currentIndex].resiEventId"
:orgId="$store.state.user.agencyId"
orgType="agency"
@close="incident.showedInfo = false" />
</template>
<topic-info
v-if="topic.list.length > 0 && topic.showedInfo"
:topicId="topic.list[topic.currentIndex].topicId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="topic.showedInfo = false"
/>
<topic-info v-if="topic.list.length > 0 && topic.showedInfo"
:topicId="topic.list[topic.currentIndex].topicId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="topic.showedInfo = false" />
</div>
</div>
</template>
@ -557,7 +491,7 @@ export default {
},
},
data() {
data () {
return {
breadList: [],
showedMoreInfo: false,
@ -660,12 +594,12 @@ export default {
},
computed: {
isShundeju() {
isShundeju () {
return this.$store.state.user.customerId == "1550309684576591874";
},
},
beforeRouteEnter(to, from, next) {
beforeRouteEnter (to, from, next) {
console.log("让我看看", to);
if (from) {
const arr = [{ ...from }, { ...to, meta: { title: "个人详情" } }];
@ -677,14 +611,14 @@ export default {
}
},
watch: {
uid(id) {
uid (id) {
this.userId = id;
},
userId() {
userId () {
this.getApiData();
window.scrollTo(0, 0);
},
$route(route) {
$route (route) {
// if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith("/redirect/")) {
return;
@ -693,21 +627,21 @@ export default {
},
},
async mounted() {
async mounted () {
this.userId = this.uid;
console.log(this.$router);
this.getApiData();
},
deactivated() {
deactivated () {
this.breadList = [];
console.log("breadList-----", this.breadList);
},
destroyed() {
destroyed () {
this.breadList = [];
console.log("breadList-----", this.breadList);
},
methods: {
getBreadcrumb() {
getBreadcrumb () {
// only show routes with meta.title
console.log("routest----", this.$route);
let matched = this.$route.matched.filter(
@ -723,16 +657,16 @@ export default {
(item) => item.meta && item.meta.title && item.meta.breadcrumb !== false
);
},
isDashboard(route) {
isDashboard (route) {
const name = route && route.name;
if (!name) {
return false;
}
return name.trim().toLocaleLowerCase() === "Home".toLocaleLowerCase();
},
handleSearch() {},
handleSearch () { },
async getApiData() {
async getApiData () {
await this.getInfo();
this.getHouseInfo();
this.getDemandData();
@ -741,12 +675,12 @@ export default {
this.getPointData();
},
toUserInfo(uid) {
toUserInfo (uid) {
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
},
//
async getInfo() {
async getInfo () {
const url = "/epmetuser/icresiuser/persondata";
let params = {
userId: this.userId,
@ -762,7 +696,7 @@ export default {
},
//
async getHouseInfo() {
async getHouseInfo () {
const url = "/epmetuser/icresiuser/ownerrelation";
let params = {
userId: this.userId,
@ -777,12 +711,12 @@ export default {
}
},
handlePageNoChangeDemand(val) {
handlePageNoChangeDemand (val) {
this.demand.pageNo = val;
this.getDemandData();
},
handleOperateDemandList(index, type) {
handleOperateDemandList (index, type) {
if (type == "查看") {
this.showedDemandInfo = true;
this.demand.currentIndex = index;
@ -790,12 +724,12 @@ export default {
},
//
handleAssignOk() {
handleAssignOk () {
this.getDemandData();
},
//
async getDemandData() {
async getDemandData () {
const url = "/heart/userdemand/mydemand";
let params = {
epmetUserIdList: this.info.epmetUserIdList,
@ -825,18 +759,18 @@ export default {
}
},
handlePageNoChangeIncident(val) {
handlePageNoChangeIncident (val) {
this.incident.pageNo = val;
this.getIncidentData();
},
handleClickIncident(index) {
handleClickIncident (index) {
this.incident.showedInfo = true;
this.incident.currentIndex = index;
},
//
async getIncidentData() {
async getIncidentData () {
let url = "/gov/project/icEvent/icevent-pageuserreported";
// 沿
@ -864,18 +798,18 @@ export default {
}
},
handlePageNoChangeTopic(val) {
handlePageNoChangeTopic (val) {
this.topic.pageNo = val;
this.getTopicData();
},
handleClickTopic(index) {
handleClickTopic (index) {
this.topic.showedInfo = true;
this.topic.currentIndex = index;
},
//
async getTopicData() {
async getTopicData () {
const url = "/data/aggregator/resigroup/pageusertopic";
let params = {
epmetUserIdList: this.info.epmetUserIdList,
@ -895,18 +829,18 @@ export default {
}
},
handlePageNoChangePoint(val) {
handlePageNoChangePoint (val) {
this.point.pageNo = val;
this.getPointData();
},
handleClickPoint(index) {
handleClickPoint (index) {
this.point.showedInfo = true;
this.point.currentIndex = index;
},
//
async getPointData() {
async getPointData () {
const url = "/point/resi/point/pageuserpoint";
let params = {
epmetUserIdList: this.info.epmetUserIdList,

472
src/views/modules/workSys/certify/certify.vue

@ -0,0 +1,472 @@
<template>
<div class="div_main">
<div ref="searchCard"
class="div_search">
<el-form ref="searchForm"
:inline="true"
:model="formData"
size="small">
<el-form-item label="统计类型"
prop="name"
label-width="90px">
<el-radio-group v-model="formData.type">
<el-radio label="0">本级工作人员</el-radio>
<el-radio label="1">本级及下级工作人员</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="组织"
prop="name"
label-width="90px">
<el-cascader ref="myCascader"
v-model="agencyIdArray"
style="width:540px"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChange"
clearable></el-cascader>
</el-form-item>
<el-form-item label="姓名"
prop="name"
label-width="90px">
<el-input v-model="formData.name"
style="width:290px"
placeholder="请输入姓名"
:clearable="true"></el-input>
</el-form-item>
<el-form-item label="手机号"
prop="mobile"
label-width="90px">
<el-input v-model="formData.mobile"
style="width:290px"
placeholder="请输入手机号"
:clearable="true"></el-input>
</el-form-item>
<el-form-item label="状态"
prop="status"
label-width="90px">
<el-select v-model="formData.status"
style="width:290px"
placeholder="选择状态"
clearable>
<el-option v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-button type="primary"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button class="diy-button--reset"
size="small"
@click="handleReset">重置</el-button>
</el-form>
</div>
<div class="div_table">
<el-table :data="tableData"
ref="ref_customertable"
border
:height="tableHeight"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%;">
<el-table-column label="所属组织"
header-align="center"
align="center"
prop="orgName"></el-table-column>
<el-table-column label="姓名"
header-align="center"
align="center"
width="120"
prop="userName"></el-table-column>
<el-table-column label="手机号"
header-align="center"
align="center"
width="120"
prop="telephoneNumber"></el-table-column>
<el-table-column label="性别"
header-align="center"
align="center"
width="80"
prop="gender">
<template slot-scope="scope">
<span v-if="scope.row.gender==='0'">{{'未知'}}</span>
<span v-if="scope.row.gender==='1'">{{''}}</span>
<span v-if="scope.row.gender==='2'">{{''}}</span>
</template>
</el-table-column>
<el-table-column label="状态"
header-align="center"
align="center"
width="80"
prop="status">
<template slot-scope="scope">
<span v-if="scope.row.status==='0'">{{'未创建'}}</span>
<span v-if="scope.row.status==='1'">{{'已创建'}}</span>
</template>
</el-table-column>
<el-table-column label="备注"
header-align="center"
align="center"
prop="remark"></el-table-column>
<el-table-column :label="$t('handle')"
fixed="right"
header-align="center"
align="center"
width="200">
<template slot-scope="scope">
<el-button v-if="scope.row.status === '0'"
type="text"
size="small"
@click="handleEdit(scope.row,'add')">新增</el-button>
<el-button v-if="scope.row.status === '1'"
type="text"
size="small"
@click="handleEdit(scope.row,'edit')">修改</el-button>
<el-button v-if="scope.row.status === '1'"
type="text"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination :current-page="pageNo"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"></el-pagination>
</div>
<el-dialog v-if="showEdit"
:title="editTitle"
:visible.sync="showEdit"
width="850"
:before-close="dialogCancle">
<edit-form ref="ref_edit"
@dialogOk="dialogOk"
@dialogCancle="dialogCancle"></edit-form>
</el-dialog>
<el-dialog v-if="showDetail"
title="详情"
:visible.sync="showDetail"
width="850"
:before-close="dialogCancle">
<detail-form ref="ref_detail"
@dialogCancle="dialogCancle"></detail-form>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { requestPost } from "@/js/dai/request";
import editForm from './editForm'
import detailForm from './detailForm'
export default {
data () {
return {
tableData: [],
statusList: [
{
value: '0',
label: '未创建'
},
{
value: '1',
label: '已创建'
}
],
selOrgId: '',
casOptions: [],
agencyIdArray: [],
iscascaderShow: 0,
optionProps: {
multiple: false,
// value: 'orgId',
// label: 'orgName',
// children: 'subAgencyList',
checkStrictly: true,
lazy: true,
lazyLoad: this.lzayLoadAgency
},
pageNo: 1,
pageSize: 20,
total: 0,
formData: {
name: '',
status: '',
mobile: '',
type: '0',
orgId: ''
},
showEdit: false,
showDetail: false,
editTitle: '新增'
}
},
components: {
editForm, detailForm
},
async created () {
await this.loadTable()
},
watch: {
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight () {
const h = this.clientHeight - 360 + this.iframeHeigh;
const _h = this.clientHeight - 360;
return this.$store.state.inIframe ? h : _h;
},
},
methods: {
lzayLoadAgency (node, resolve) {
this.getAgency(node, resolve)
// setTimeout(() => {
// this.getAgency(node, resolve)
// }, 200)
},
async getAgency (node, resolve) {
const url = '/third/dataSync/ytorglist'
// const url = 'http://yapi.elinkservice.cn/mock/102/third/dataSync/ytorglist'
let params = {
orgId: node.data ? node.data.value : '0',
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
const nodes = data.map(item => ({
value: item.orgId, //
label: item.orgName,
// leaf: node.level >= 2 // 5
leaf: !item.haveChild // 5
}))
resolve(nodes)
} else {
this.$message.error(msg)
}
},
handleChange (value) {
if (value && value.length > 0) {
let selAgency = this.$refs["myCascader"].getCheckedNodes()[0].data
console.log(selAgency)
this.formData.orgId = selAgency.value
} else {
this.formData.orgId = ''
}
},
async loadTable () {
const url = "/third/dataSync/page-user"
// const url = "http://yapi.elinkservice.cn/mock/102/third/dataSync/page-user"
const params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.formData
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.tableData = data.list
this.total = data.total
} else {
this.$message.error(msg)
}
},
handleSearch () {
this.loadTable()
},
async handleEdit (row, editType) {
this.editTitle = editType === 'edit' ? '修改' : '新增'
this.showEdit = true
this.$nextTick(() => {
this.$refs.ref_edit.initForm(editType, row);
});
},
dialogCancle () {
this.showEdit = false
this.showDetail = false
},
dialogOk () {
this.showEdit = false
this.loadTable()
},
//
handleDetail (row) {
this.showDetail = true
this.$nextTick(() => {
this.$refs.ref_detail.initForm(row.staffId, row.customerId);
});
},
handleReset () {
this.agencyIdArray = []
this.formData = {
name: '',
status: '',
mobile: '',
type: '0',
orgId: ''
}
},
pageCurrentChangeHandle (val) {
this.pageNo = val
this.loadTable()
},
pageSizeChangeHandle (val) {
this.pageSize = val
this.loadTable()
},
},
}
</script>
<style lang="scss" scoped >
.div_main {
width: 100%;
}
.div_search {
background: #ffffff;
border-radius: 4px;
padding: 30px 20px 5px;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
}
.div_table {
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
margin-top: 15px;
padding: 23px 30px 10px;
.table {
margin-top: 20px;
}
}
</style>
<style>
.block {
position: absolute;
left: 0px;
display: inline-block;
width: 35px;
height: 50px;
background: #fff;
}
.cascader-block .el-cascader-node > .el-radio {
display: none;
}
</style>
<style lang="scss" scoped>
.blacklist-reason {
width: 100%;
height: 80px;
border: 1px solid #e4e4e4;
border-radius: 4px;
resize: none;
padding: 8px;
box-sizing: border-box;
}
</style>
<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;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
</style>

205
src/views/modules/workSys/certify/detailForm.vue

@ -0,0 +1,205 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div class="m-row">
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">姓名</span>
<span>{{ peoForm.name||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">手机号</span>
<span>{{ peoForm.mobile||'--' }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">性别</span>
<span v-if="peoForm.gender==='0'">{{'未知'}}</span>
<span v-if="peoForm.gender==='1'">{{''}}</span>
<span v-if="peoForm.gender==='2'">{{''}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">专兼职</span>
<span v-if="peoForm.workType==='fulltime'">{{'专职'}}</span>
<span v-if="peoForm.workType==='parttime'">{{'兼职'}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">组织/部门</span>
<span>{{peoForm.orgName||'--'}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">激活时间</span>
<span>{{peoForm.activeTime||'未激活'}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">是否禁用</span>
<span>{{peoForm.disableFlag||'--'}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">职责</span>
<span>{{peoForm.rolesShow||''}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">角色</span>
<span>{{peoForm.szsqRolesShow||''}}</span>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleClose"> </el-button>
</div>
</div>
</template>
<script>
// import ConfigItem from './ConfigItem'
// import FootbarList from '../../productConfig/footbar/FootbarList'
import { requestPost, requestGet } from "@/js/dai/request";
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
staffId: '',
customerId: '',
agencyId: '',
peoForm: {
name: "",
mobile: "",
gender: "",
orgId: '',
orgType: "",
orgName: "",
activeTime: "",
workType: "",
roles: [],
newRoles: [],
},
}
},
components: {
},
async mounted () {
},
methods: {
async initForm (staffId, customerId) {
this.startLoading()
this.staffId = staffId
this.customerId = customerId
await this.lookAngency()
this.endLoading()
},
//
async lookAngency () {
const url = "/data/aggregator/org/staffdetailv2";
let params = {
staffId: this.staffId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.peoForm = data;
if (data.enableFlag === "enable") {
this.peoForm.disableFlag = "已启用";
} else {
this.peoForm.disableFlag = "已禁用";
}
if (this.peoForm.roles && this.peoForm.roles.length > 0) {
this.peoForm.rolesShow = this.peoForm.roles.join(',')
} else {
this.peoForm.rolesShow = '--'
}
if (this.peoForm.szsqRoles && this.peoForm.szsqRoles.length > 0) {
this.peoForm.szsqRolesShow = this.peoForm.szsqRoles.join(',')
} else {
this.peoForm.szsqRolesShow = '--'
}
} else {
this.$message.error(msg);
}
},
resetForm () {
this.peoForm = {
name: "",
mobile: "",
gender: "",
orgId: '',
orgType: "",
orgName: "",
workType: "",
roles: [],
newRoles: [],
}
},
handleClose () {
this.resetForm()
this.$emit("dialogCancle")
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
},
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/detail-main.scss";
.div-btn {
margin-top: 20px;
display: flex;
justify-content: center;
}
</style>

460
src/views/modules/workSys/certify/editForm.vue

@ -0,0 +1,460 @@
<template>
<div>
<el-form :model="peoForm"
label-width="120px"
ref="editPeoForm"
:rules="rulesPeo">
<el-form-item label="姓名"
prop="name">
<span>{{peoForm.name}}</span>
</el-form-item>
<el-form-item label="手机号"
prop="mobile">
<span>{{peoForm.mobile}}</span>
</el-form-item>
<el-form-item label="性别"
prop="gender">
<span v-if="peoForm.gender===0||peoForm.gender==='0'">{{'未知'}}</span>
<span v-if="peoForm.gender===1||peoForm.gender==='1'">{{''}}</span>
<span v-if="peoForm.gender===2||peoForm.gender==='2'">{{''}}</span>
</el-form-item>
<el-form-item v-if="formType==='add'"
label="组织/部门"
prop="orgId">
<el-cascader ref="myCascader"
v-model="agencyIdArray"
class="item-width-2"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
</el-form-item>
<el-form-item v-if="formType==='edit'"
label="组织/部门"
prop="agencyName">
<span>{{peoForm.agencyName||'--'}}</span>
</el-form-item>
<el-form-item label="专兼职"
prop="workType">
<el-select v-model="peoForm.workType"
clearable
placeholder="专兼职">
<el-option v-for="item in postList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="职责"
prop="roles">
<el-select v-model="peoForm.roles"
class="item-width-2"
multiple
@change="$forceUpdate()"
placeholder="请选择">
<el-option v-for="item in dutyList"
:key="item.roleId"
:label="item.roleName"
:value="item.roleId"
:disabled="item.disabled">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="角色"
prop="newRoles">
<el-select v-model="peoForm.newRoles"
class="item-width-2"
multiple
@change="$forceUpdate()"
placeholder="请选择">
<el-option v-for="item in roleList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div class="div-btn">
<el-button size="small"
@click="handleClose"> </el-button>
<el-button size="small"
type="primary"
@click="handleConfirm"> </el-button>
</div>
</div>
</template>
<script>
// import ConfigItem from './ConfigItem'
// import FootbarList from '../../productConfig/footbar/FootbarList'
import { requestPost, requestGet } from "@/js/dai/request";
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
formType: 'add',
staffId: '',
customerId: '',
agencyId: '',
agencyIdArray: [],
casOptions: [],
iscascaderShow: 0,
optionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
peoForm: {
name: "",
mobile: "",
gender: "",
orgId: '',
orgType: "",
orgName: "",
workType: "",
roles: [],
newRoles: [],
},
//
dutyList: [],
//
postList: [
{ value: "fulltime", label: "专职" },
{ value: "parttime", label: "兼职" },
],
genderList: [
{ value: 1, label: "男" },
{ value: 2, label: "女" },
{ value: 0, label: "未知" },
],
editAgencyIdArray: [],
roleList: [],
}
},
components: {
},
async mounted () {
},
methods: {
async initForm (formType, row) {
this.startLoading()
this.formType = formType
this.customerId = row.customerId
this.getDutyList()
this.getRoleList()
if (formType === 'edit') {
this.staffId = row.staffId
await this.xiuGridPeo()
}
if (formType === 'add') {
this.peoForm.name = row.userName
this.peoForm.mobile = row.telephoneNumber
this.peoForm.gender = row.gender
}
if (formType === 'add') {
await this.getAgencyList()
}
this.endLoading()
},
handleChangeAgency (value) {
if (value && value.length > 0) {
let selAgency = this.$refs["myCascader"].getCheckedNodes()[0].data
this.peoForm.orgName = selAgency.agencyName
this.peoForm.orgType = selAgency.level === 'grid' || selAgency.level === 'dept' ? selAgency.level : 'agency'
this.peoForm.orgId = selAgency.agencyId
} else {
this.peoForm.orgName = ''
this.peoForm.orgType = ''
this.peoForm.orgId = ''
}
},
handleConfirm () {
if (this.formType === 'add') {
this.submitPeoDo()
} else if (this.formType === 'edit') {
this.updatePeoDo()
}
},
//
async submitPeoDo () {
this.$refs['editPeoForm'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
} else {
this.addPeo()
}
})
},
async addPeo () {
if (this.peoForm.roles.length === 0) {
this.$message.error("请选择职责");
return false
}
if (this.peoForm.newRoles.length === 0) {
this.$message.error("请选择角色");
return false
}
const url = "/gov/org/staff/addstaffv2";
// console.log('this.peoForm', this.peoForm)
// return false
let params = {
customerId: this.customerId,
...this.peoForm
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("操作成功");
this.peoForm = [];
this.dialogOk()
} else {
this.$message.error(msg);
}
},
//
async updatePeoDo () {
this.$refs['editPeoForm'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
} else {
this.editPeo()
}
})
},
async editPeo () {
if (this.peoForm.roles.length === 0) {
this.$message.error("请选择职责");
return false
}
if (this.peoForm.newRoles.length === 0) {
this.$message.error("请选择角色");
return false
}
const url = "/gov/org/staff/editstaff";
let params = {
staffId: this.staffId,
agencyId: this.agencyId,
customerId: this.customerId,
...this.peoForm
};
// console.log('params', params)
// return false
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message.success("操作成功");
this.dialogOk()
} else {
this.$message.error(msg);
}
},
//
async xiuGridPeo () {
this.peoForm.orgType = "grid";
const url = "/gov/org/staff/editstaffinit";
let params = {
staffId: this.staffId,
customerId: this.customerId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.agencyId = data.agencyId
this.peoForm = { ...data };
//
let existedDutyArr = [];
data.roleList.forEach(function (sysDuty) {
if (sysDuty.selected === true) {
existedDutyArr.push(sysDuty.roleId);
}
});
this.peoForm.roles = existedDutyArr;
//
let existedRoleArr = [];
data.newRoleList.forEach(function (sysRole) {
if (sysRole.selected === true) {
existedRoleArr.push(sysRole.roleId);
}
});
this.peoForm.newRoles = existedRoleArr;
} else {
this.$message.error(msg);
}
},
async getAgencyList () {
const url = '/gov/org/customeragency/agencylist'
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist'
const params = {
customerId: this.customerId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
}
} else {
this.$message.error(msg)
}
},
/** 查询系统工作人员角色(职责) */
async getDutyList () {
const url = "/gov/org/staff/rolelist";
let params = {
customerId: this.customerId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.dutyList = data;
} else {
this.$message.error(msg);
}
},
/** 查询系统工作人员角色(职责) */
async getRoleList () {
this.tableLoading = true;
const url = "/gov/access/govrole/list";
let params = {};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
this.roleList = data;
} else {
this.$message.error(msg);
}
this.tableLoading = false;
},
resetForm () {
this.peoForm = {
name: "",
mobile: "",
gender: "",
orgId: '',
orgType: "",
orgName: "",
workType: "",
roles: [],
newRoles: [],
}
},
handleClose () {
this.resetForm()
this.$emit("dialogCancle")
},
dialogOk () {
this.resetForm()
this.$emit("dialogOk")
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
rulesPeo () {
return {
// name: [{ required: true, message: "", trigger: "change" }],
// mobile: [{ required: true, message: "", trigger: "change" }],
// gender: [{ required: true, message: "", trigger: "change" }],
// gender: [{ required: true, message: "", trigger: "change" }],
orgId: [{ required: true, message: "组织/部门必填", trigger: "change" }],
workType: [{ required: true, message: "专兼职必填", trigger: "change" }],
roles: [{ required: true, message: "职责必填", trigger: "change" }],
newRoles: [{ required: true, message: "角色必填", trigger: "change" }],
}
},
},
}
</script>
<style scoped>
.item-width-1 {
width: 200px;
}
.item-width-2 {
width: 400px;
}
.div-btn {
margin-top: 20px;
display: flex;
justify-content: center;
}
</style>
Loading…
Cancel
Save