13 changed files with 1661 additions and 264 deletions
After Width: | Height: | Size: 618 B |
@ -0,0 +1,157 @@ |
|||
.div_main { |
|||
box-sizing: border-box; |
|||
height: 100%; |
|||
width: 100%; |
|||
background: #ffffff; |
|||
border-radius: 5px; |
|||
padding: 35px 0 15px; |
|||
} |
|||
.div_tip { |
|||
font-size: 24px; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
margin-left: 42px; |
|||
} |
|||
.div_list { |
|||
box-sizing: border-box; |
|||
margin-top: 5px; |
|||
height: calc(100vh - 210px); |
|||
} |
|||
|
|||
.div_all_list { |
|||
height: calc(100vh - 260px); |
|||
} |
|||
|
|||
.div_room { |
|||
// height: calc(88vh - 40px); |
|||
// margin-top: 9px; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
justify-content: flex-start; |
|||
margin-left: 42px; |
|||
// margin: 0 21px 0 21px; |
|||
|
|||
.item { |
|||
width: 340px; |
|||
height: 120px; |
|||
background: #ffffff; |
|||
box-shadow: 0px 0px 17px 3px #eaeaea; |
|||
border-radius: 6px; |
|||
margin: 15px 25px 15px 0; |
|||
display: flex; |
|||
position: relative; |
|||
|
|||
.item_category { |
|||
width: 100%; |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 17px 16px; |
|||
> img { |
|||
width: 86px; |
|||
height: 86px; |
|||
} |
|||
.item_content { |
|||
margin-left: 16px; |
|||
width: 100%; |
|||
text-align: left; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: flex-start; |
|||
|
|||
.item_count { |
|||
font-size: 28px; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
} |
|||
.item_row2 { |
|||
margin-top: 21px; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
|
|||
.row_left { |
|||
font-size: 20px; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #202020; |
|||
} |
|||
|
|||
.row_right { |
|||
margin: 5px 10px 0 0; |
|||
font-size: 16px; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
text-decoration: underline; |
|||
color: #00a7a9; |
|||
cursor: pointer; |
|||
} |
|||
} |
|||
} |
|||
|
|||
> span { |
|||
margin-left: 16px; |
|||
font-size: 24px; |
|||
} |
|||
} |
|||
|
|||
.item_add { |
|||
cursor: pointer; |
|||
font-size: 24px; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 17px 16px; |
|||
|
|||
> img { |
|||
width: 86px; |
|||
height: 86px; |
|||
} |
|||
|
|||
> span { |
|||
font-size: 24px; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
|
|||
margin-left: 16px; |
|||
} |
|||
} |
|||
|
|||
.icon_circle { |
|||
cursor: pointer; |
|||
position: absolute; |
|||
top: -10px; |
|||
right: -10px; |
|||
height: 23px; |
|||
width: 23px; |
|||
background-color: #ffffff; |
|||
border-radius: 50%; |
|||
border: 1px solid #a5a5a5; |
|||
} |
|||
|
|||
.icon_sel { |
|||
cursor: pointer; |
|||
background-color: #6bb9f8; |
|||
border: 1px solid #6bb9f8; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.div_room::after { |
|||
content: ''; |
|||
flex: 1; |
|||
} |
|||
|
|||
.div_btn { |
|||
margin-top: 15px; |
|||
display: flex; |
|||
width: 100%; |
|||
justify-content: center; |
|||
|
|||
.btn_right { |
|||
margin-left: 50px; |
|||
} |
|||
} |
@ -0,0 +1,297 @@ |
|||
<template> |
|||
<div class="div_main"> |
|||
|
|||
<el-table class="table" |
|||
:data="tableData" |
|||
border |
|||
:height="tableHeight" |
|||
v-loading="tableLoading" |
|||
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
|||
style="width: 100%"> |
|||
|
|||
<el-table-column label="序号" |
|||
header-align="center" |
|||
align="center" |
|||
type="index" |
|||
width="50"></el-table-column> |
|||
<el-table-column prop="typeName" |
|||
header-align="center" |
|||
align="center" |
|||
label="变更类型" |
|||
width="80"> |
|||
</el-table-column> |
|||
<el-table-column prop="beforeChangeName" |
|||
header-align="center" |
|||
align="center" |
|||
label="变更前" |
|||
width="230"> |
|||
</el-table-column> |
|||
<el-table-column prop="afterChanegName" |
|||
header-align="center" |
|||
align="center" |
|||
label="变更后" |
|||
min-width="230"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="changeTime" |
|||
header-align="center" |
|||
align="center" |
|||
label="调整时间" |
|||
width="160"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="operatorName" |
|||
header-align="center" |
|||
align="center" |
|||
label="操作人" |
|||
width="80"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="remark" |
|||
header-align="center" |
|||
align="center" |
|||
label="备注" |
|||
width="120"> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
<div> |
|||
<el-pagination @size-change="handleSizeChange" |
|||
@current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" |
|||
:page-sizes="[10, 20, 50]" |
|||
:page-size="pageSize" |
|||
layout="sizes, prev, pager, next, total" |
|||
:total="total"> |
|||
</el-pagination> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
|
|||
import util from '@js/util.js'; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import { mapGetters } from 'vuex' |
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
|
|||
let loading // 加载动画 |
|||
export default { |
|||
data () { |
|||
return { |
|||
loading: false, |
|||
total: 0, |
|||
pageSize: 10, |
|||
pageNo: 0, |
|||
tableLoading: false, |
|||
|
|||
tableData: [], |
|||
icUserId: '', |
|||
|
|||
|
|||
} |
|||
}, |
|||
|
|||
|
|||
async mounted () { |
|||
|
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
async initForm (row) { |
|||
this.icUserId = row.icResiUserId |
|||
|
|||
//获取数据 |
|||
await this.loadTable() |
|||
}, |
|||
|
|||
handleSearch () { |
|||
this.loadTable() |
|||
}, |
|||
|
|||
|
|||
async loadTable () { |
|||
this.tableLoading = true |
|||
|
|||
const url = "/epmetuser/icuserchangerecord/list" |
|||
|
|||
let params = { |
|||
icUserId: this.icUserId, |
|||
pageSize: this.pageSize, |
|||
pageNo: this.pageNo, |
|||
|
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
|
|||
this.total = data.total |
|||
this.tableData = data.list |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
this.tableLoading = false |
|||
}, |
|||
|
|||
//初始化时间 |
|||
initDate () { |
|||
let yesterday = new Date((new Date).getTime() - 24 * 60 * 60 * 1000) |
|||
|
|||
let year = yesterday.getFullYear() |
|||
let month = yesterday.getMonth() + 1 //月 |
|||
let day = yesterday.getDate() //日 |
|||
|
|||
let days = new Date(year, month, 0); |
|||
days = days.getDate(); //获取当前月的天数 |
|||
let year2 = year; |
|||
let month2 = parseInt(month) - 1; |
|||
if (month2 == 0) { |
|||
year2 = parseInt(year2) - 1; |
|||
month2 = 12; |
|||
} |
|||
let day2 = day; |
|||
let days2 = new Date(year2, month2, 0); |
|||
days2 = days2.getDate(); |
|||
if (day2 > days2) { |
|||
day2 = days2; |
|||
} |
|||
if (month2 < 10) { |
|||
month2 = '0' + month2; |
|||
} |
|||
if (month < 10) { |
|||
month = '0' + month; |
|||
} |
|||
if (day < 10) { |
|||
day = '0' + day; |
|||
} |
|||
if (day2 < 10) { |
|||
day2 = '0' + day2; |
|||
} |
|||
let t2 = year2 + '-' + month2 + '-' + day2; |
|||
let t1 = year + '-' + month + '-' + day; |
|||
// let t3 = formate(t2, style); |
|||
this.formData.startTime = t2 + ' 00:00:00' |
|||
this.formData.endTime = t1 + ' 23:59:59' |
|||
|
|||
this.timeRange = [t2, t1] |
|||
}, |
|||
|
|||
|
|||
handleTimeChange (time) { |
|||
if (time) { |
|||
const startTimeArray = util.dateFormatter(time[0], 'date').split('-') |
|||
const endTimeArray = util.dateFormatter(time[1], 'date').split('-') |
|||
|
|||
this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + ' 00:00:00' |
|||
this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59' |
|||
|
|||
// this.startTimeShow = startTimeArray[0] + '年' + startTimeArray[1] + '月' + startTimeArray[2] + '日' |
|||
// this.endTimeShow = endTimeArray[0] + '年' + endTimeArray[1] + '月' + endTimeArray[2] + '日' |
|||
} else { |
|||
this.formData.startTime = '' |
|||
this.formData.endTime = '' |
|||
// this.startTimeShow = '' |
|||
// this.endTimeShow = '' |
|||
} |
|||
|
|||
this.loadTable() |
|||
|
|||
}, |
|||
|
|||
handleSizeChange (val) { |
|||
this.pageSize = val |
|||
this.pageNo = 1 |
|||
this.loadTable() |
|||
}, |
|||
handleCurrentChange (val) { |
|||
this.pageNo = val |
|||
this.loadTable() |
|||
}, |
|||
|
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
tableHeight () { |
|||
|
|||
return (this.clientHeight - 460) |
|||
|
|||
}, |
|||
rowHeight () { |
|||
return (this.clientHeight - 200) + 'px' |
|||
}, |
|||
...mapGetters(['clientHeight']) |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
props: { |
|||
serviceType: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped > |
|||
@import "@/assets/scss/buttonstyle.scss"; |
|||
|
|||
.div_main { |
|||
background: #ffffff; |
|||
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1); |
|||
border-radius: 4px; |
|||
margin-top: 15px; |
|||
padding: 23px 30px 10px; |
|||
} |
|||
|
|||
.div_search { |
|||
background: #ffffff; |
|||
border-radius: 4px; |
|||
padding: 30px 20px 5px; |
|||
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1); |
|||
} |
|||
|
|||
.item_width_1 { |
|||
width: 260px; |
|||
} |
|||
.item_width_2 { |
|||
width: 495px; |
|||
} |
|||
|
|||
.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; |
|||
} |
|||
} |
|||
|
|||
.el-row { |
|||
/* margin-bottom: 20px; */ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
margin-top: 10px; |
|||
margin-right: 50px; |
|||
} |
|||
</style> |
@ -0,0 +1,479 @@ |
|||
<template> |
|||
<div> |
|||
<div> |
|||
<el-form ref="ref_form" |
|||
:inline="false" |
|||
:model="dataForm" |
|||
:rules="dataRule" |
|||
class="form"> |
|||
|
|||
<el-form-item label="当前组织" |
|||
label-width="150px" |
|||
style="display: block"> |
|||
<span>{{ gridName }}</span> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="迁出类型" |
|||
prop="type" |
|||
label-width="150px" |
|||
style="display: block"> |
|||
<el-radio-group v-model="dataForm.type"> |
|||
|
|||
<el-radio :label="'in'">{{'迁往'+rootAgency.rootAgencyName+'内其他区域'}}</el-radio> |
|||
<el-radio :label="'out'">其他</el-radio> |
|||
|
|||
</el-radio-group> |
|||
</el-form-item> |
|||
|
|||
<div v-if="dataForm.type==='in'"> |
|||
<el-form-item label="迁出至" |
|||
prop='newAgencyId' |
|||
label-width="150px"> |
|||
<el-cascader ref="myCascader" |
|||
v-model="agencyIdArray" |
|||
style="width:480px" |
|||
:key="iscascaderShow" |
|||
:options="casOptions" |
|||
:props="optionProps" |
|||
@change="handleChangeAgency" |
|||
clearable></el-cascader> |
|||
</el-form-item> |
|||
|
|||
<el-form-item label="所属家庭" |
|||
label-width="150px" |
|||
prop="newNeighborHoodId" |
|||
required> |
|||
|
|||
<div class="resi-cell-col"> |
|||
|
|||
<el-select v-model.trim="dataForm.newNeighborHoodId" |
|||
placeholder="请选择小区" |
|||
clearable |
|||
class="item_width_1" |
|||
@change="handleChangeCommunity"> |
|||
<el-option v-for="item in communityList" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
<el-select v-model.trim="dataForm.newBuildingId" |
|||
placeholder="请选择楼号" |
|||
clearable |
|||
class="item_width_1 margin_left10" |
|||
@change="handleChangeBuilding"> |
|||
<el-option v-for="item in buildingList" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
<el-select v-model.trim="dataForm.newBuildingUnitId" |
|||
placeholder="请选择单元" |
|||
clearable |
|||
class="item_width_1 margin_left10" |
|||
@change="handleChangeUnit"> |
|||
<el-option v-for="item in unitList" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
<el-select v-model.trim="dataForm.newHouseId" |
|||
placeholder="请选择房号" |
|||
clearable |
|||
class="item_width_1 margin_left10"> |
|||
<el-option v-for="item in roomList" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
</div> |
|||
|
|||
</el-form-item> |
|||
|
|||
</div> |
|||
<el-form-item label="备注" |
|||
prop="remark" |
|||
label-width="150px"> |
|||
<el-input type="textarea" |
|||
:autosize="{ minRows: 4, maxRows: 7}" |
|||
:rows="5" |
|||
resize="none" |
|||
style="width:600px" |
|||
placeholder='请输入备注' |
|||
v-model="dataForm.remark"> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
</div> |
|||
<div class="div_btn"> |
|||
<el-button @click="handleCancle">取 消</el-button> |
|||
<el-button type="primary" |
|||
:disabled="btnDisable" |
|||
@click="handleComfirm">确 定</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '@js/util.js'; |
|||
import { Loading } from 'element-ui' // 引入Loading服务 |
|||
import { requestPost } from '@/js/dai/request' |
|||
|
|||
let loading // 加载动画 |
|||
export default { |
|||
data () { |
|||
return { |
|||
|
|||
btnDisable: false, |
|||
communityList: [], |
|||
buildingList: [], |
|||
unitList: [], |
|||
roomList: [], |
|||
|
|||
dataForm: { |
|||
icUserId: '', // 被调动人ID |
|||
type: 'in',//操作类型【客户外out,客户内in】 |
|||
newAgencyId: '',//调动到的组织Id |
|||
newGridId: '',//调动到的网格Id |
|||
newNeighborHoodId: '',//调动到的小区ID |
|||
newBuildingId: '',//调动到的楼宇Id |
|||
newBuildingUnitId: '',//调动到的单元Id |
|||
newHouseId: '', //调动到的房屋Id |
|||
transferTime: '', //调动时间【日期类型】 |
|||
remark: '' //备注 |
|||
}, |
|||
|
|||
staffId: '',//工作人员id |
|||
userId: '',//操作人员id |
|||
gridName: '', |
|||
rootAgency: {}, |
|||
|
|||
casOptions: [], |
|||
agencyIdArray: [], |
|||
customerList: [], |
|||
iscascaderShow: 0, |
|||
|
|||
optionProps: { |
|||
multiple: false, |
|||
value: 'agencyId', |
|||
label: 'agencyName', |
|||
children: 'subAgencyList', |
|||
checkStrictly: true |
|||
}, |
|||
|
|||
selGrid: {}, |
|||
|
|||
} |
|||
}, |
|||
components: {}, |
|||
mounted () { |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
async initForm (row) { |
|||
this.staffId = localStorage.getItem("staffId"); |
|||
|
|||
this.$refs.ref_form.resetFields(); |
|||
|
|||
// this.icUserId = row.icResiUserId |
|||
this.gridName = row.GRID_ID |
|||
this.dataForm.icUserId = row.icResiUserId |
|||
|
|||
await this.loadRootAgency() |
|||
await this.getAgencylist() |
|||
|
|||
}, |
|||
|
|||
//根据人员id获取根组织信息 |
|||
async loadRootAgency () { |
|||
|
|||
const url = '/gov/org/customeragency/root-orglist-by-staffid' |
|||
|
|||
let params = { |
|||
staffId: this.staffId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
if (data && data.length > 0) { |
|||
this.rootAgency = data[0] |
|||
} |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
async getAgencylist () { |
|||
|
|||
const url = '/gov/org/customeragency/rootagencygridtree' |
|||
|
|||
|
|||
const params = { |
|||
agencyId: this.rootAgency.rootAgencyId |
|||
} |
|||
const { data, code, msg } = await requestPost(url, params) |
|||
if (code === 0) { |
|||
++this.iscascaderShow |
|||
this.casOptions = [] |
|||
this.agencyIdArray.length = [] |
|||
// this.tableParams.agencyId = '' |
|||
if (data) { |
|||
this.casOptions.push(data) |
|||
} |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
handleChangeAgency () { |
|||
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data) |
|||
this.selGrid = this.$refs["myCascader"].getCheckedNodes()[0].data |
|||
this.dataForm.newAgencyId = this.selGrid.pid |
|||
this.dataForm.newGridId = this.selGrid.agencyId |
|||
this.loadCommunityList() |
|||
this.dataForm.newNeighborHoodId = ''//调动到的小区ID |
|||
this.dataForm.newBuildingId = ''//调动到的楼宇Id |
|||
this.dataForm.newBuildingUnitId = ''//调动到的单元Id |
|||
this.dataForm.newHouseId = '' //调动到的房屋Id |
|||
|
|||
}, |
|||
|
|||
async loadCommunityList () { |
|||
const url = '/gov/org/icneighborhood/neighborhoodoption' |
|||
|
|||
let params = { |
|||
gridId: this.dataForm.newGridId, |
|||
agencyId: this.dataForm.newAgencyId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.communityList = [] |
|||
this.communityList = [...data] |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
async handleChangeCommunity () { |
|||
|
|||
const url = '/gov/org/icbuilding/buildingoption' |
|||
|
|||
let params = { |
|||
neighborHoodId: this.dataForm.newNeighborHoodId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.buildingList = [] |
|||
this.buildingList = [...data] |
|||
this.dataForm.newBuildingId = ''//调动到的楼宇Id |
|||
this.dataForm.newBuildingUnitId = ''//调动到的单元Id |
|||
this.dataForm.newHouseId = '' //调动到的房屋Id |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
async handleChangeBuilding () { |
|||
|
|||
const url = '/gov/org/icbuildingunit/unitoption' |
|||
|
|||
let params = { |
|||
buildingId: this.dataForm.newBuildingId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.unitList = [] |
|||
this.unitList = [...data] |
|||
this.dataForm.newBuildingUnitId = ''//调动到的单元Id |
|||
this.dataForm.newHouseId = '' //调动到的房屋Id |
|||
|
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
async handleChangeUnit () { |
|||
|
|||
const url = '/gov/org/ichouse/houseoption' |
|||
|
|||
let params = { |
|||
unitId: this.dataForm.newBuildingUnitId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.roomList = [] |
|||
this.roomList = [...data] |
|||
this.dataForm.newHouseId = '' //调动到的房屋Id |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
async handleComfirm () { |
|||
this.btnDisable = true |
|||
setTimeout(() => { |
|||
this.btnDisable = false |
|||
}, 2000) |
|||
|
|||
|
|||
this.$refs['ref_form'].validate((valid, messageObj) => { |
|||
if (!valid) { |
|||
app.util.validateRule(messageObj) |
|||
|
|||
} else { |
|||
if (this.dataForm.type === 'in') { |
|||
|
|||
|
|||
if (!this.dataForm.newBuildingId) { |
|||
this.$message.warning('请选择楼宇') |
|||
return false |
|||
} |
|||
if (!this.dataForm.newBuildingUnitId) { |
|||
this.$message.warning('请选择单元') |
|||
return false |
|||
} |
|||
if (!this.dataForm.newHouseId) { |
|||
this.$message.warning('请选择房间') |
|||
return false |
|||
} |
|||
} |
|||
this.saveForm() |
|||
} |
|||
|
|||
}) |
|||
}, |
|||
|
|||
async saveForm () { |
|||
const url = '/epmetuser/icusertransferrecord/add' |
|||
let noData = new Date() |
|||
noData = util.dateFormatter(noData, 'time') |
|||
this.dataForm.transferTime = noData |
|||
|
|||
const { data, code, msg } = await requestPost(url, this.dataForm) |
|||
|
|||
if (code === 0) { |
|||
this.$message.success('调动成功') |
|||
this.handleCancle() |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
handleCancle () { |
|||
this.resetData() |
|||
this.$emit('dialogCancle') |
|||
|
|||
}, |
|||
|
|||
resetData () { |
|||
this.dataForm = { |
|||
icUserId: '', // 被调动人ID |
|||
type: 'in',//操作类型【客户外out,客户内in】 |
|||
newAgencyId: '',//调动到的组织Id |
|||
newGridId: '',//调动到的网格Id |
|||
newNeighborHoodId: '',//调动到的小区ID |
|||
newBuildingId: '',//调动到的楼宇Id |
|||
newBuildingUnitId: '',//调动到的单元Id |
|||
newHouseId: '', //调动到的房屋Id |
|||
transferTime: '', //调动时间【日期类型】 |
|||
remark: '' //备注 |
|||
} |
|||
|
|||
this.staffId = ''//工作人员id |
|||
this.userId = ''//操作人员id |
|||
this.gridName = '' |
|||
this.rootAgency = {} |
|||
|
|||
this.selGrid = {} |
|||
|
|||
}, |
|||
// 开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: '正在加载……', // 加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' // 背景颜色 |
|||
}) |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading () { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close() |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
dataRule () { |
|||
return { |
|||
type: [ |
|||
{ required: true, message: '操作类型不能为空', trigger: 'blur' }, |
|||
], |
|||
newAgencyId: [ |
|||
{ required: true, message: '所选组织不能为空', trigger: 'blur' } |
|||
], |
|||
newNeighborHoodId: [ |
|||
{ required: true, message: '所属家庭不能为空', trigger: 'blur' } |
|||
], |
|||
|
|||
} |
|||
}, |
|||
|
|||
}, |
|||
props: {} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.item_width_1 { |
|||
width: 150px; |
|||
} |
|||
.item_width_2 { |
|||
width: 400px; |
|||
} |
|||
.item_width_3 { |
|||
margin-left: 10px; |
|||
width: 200px; |
|||
} |
|||
|
|||
.div_btn { |
|||
display: flex; |
|||
justify-content: flex-end; |
|||
} |
|||
.resi-cell-col { |
|||
width: 750px; |
|||
display: flex; |
|||
justify-content: start; |
|||
} |
|||
|
|||
.margin_left10 { |
|||
margin-left: 10px; |
|||
} |
|||
</style> |
|||
<style> |
|||
.el-dialog__body { |
|||
padding: 0 10px 20px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,203 @@ |
|||
<template> |
|||
<div> |
|||
<div class="div_tip"> |
|||
全部类别 |
|||
</div> |
|||
|
|||
<div class="div_list div_all_list"> |
|||
<el-scrollbar style="height:100%"> |
|||
<div class="div_room"> |
|||
|
|||
<div v-for="(item,index) in defaultList" |
|||
:key="index" |
|||
class="item" |
|||
@click="handelSelCategory(index)"> |
|||
<div v-if="item.selected" |
|||
class="icon_circle icon_sel"> |
|||
<!-- <icon name="el-icon-check" |
|||
scale="20"></icon> --> |
|||
<i class="el-icon-check" |
|||
style="font-size: 17px; color: #5d5d5d ;margin-left:1px;margin-top:2px" /> |
|||
</div> |
|||
<div v-if="!item.selected" |
|||
class="icon_circle"></div> |
|||
|
|||
<div class="item_category"> |
|||
<img :src="item.managementIcon" |
|||
alt /> |
|||
<span>{{item.label}}</span> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</el-scrollbar> |
|||
|
|||
</div> |
|||
<div class="div_btn"> |
|||
<el-button type="warning" |
|||
@click="handleCancle">取消</el-button> |
|||
<el-button type="primary" |
|||
class="btn_right" |
|||
@click="handleConfirm">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from "vuex"; |
|||
import { Loading } from 'element-ui'; //引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
|
|||
|
|||
let loading;//加载动画 |
|||
|
|||
export default { |
|||
|
|||
data () { |
|||
return { |
|||
defaultList: [], |
|||
addList: [] |
|||
|
|||
} |
|||
}, |
|||
async mounted () { |
|||
|
|||
|
|||
}, |
|||
methods: { |
|||
async initData () { |
|||
this.startLoading() |
|||
await this.getDefaultCategoryList() |
|||
this.endLoading() |
|||
this.addList = [...this.categoryList] |
|||
this.addList.pop() |
|||
}, |
|||
//获取默认分类信息 |
|||
async getDefaultCategoryList () { |
|||
const url = "/oper/customize/icindividualcategorymanage/individualcategoryalllist" |
|||
// const url = "http://yapi.elinkservice.cn/mock/245/oper/customize/icindividualcategorymanage/individualcategoryalllist" |
|||
|
|||
let params = {} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
// this.defaultList = [] |
|||
this.defaultList = [...data] |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
handelSelCategory (index) { |
|||
let obj = JSON.parse(JSON.stringify(this.defaultList[index])) |
|||
|
|||
if (!obj.selected) {//原状态不是选中状态,在数组最后添加 |
|||
this.addList.push(obj) |
|||
} else {//原状态是选中状态,从数组里找到并去除 |
|||
for (let itemIndex in this.addList) { |
|||
// debugger |
|||
let tempObj = this.addList[itemIndex] |
|||
if (obj.columnName === tempObj.columnName) { |
|||
this.addList.splice(itemIndex, 1); |
|||
break |
|||
|
|||
} |
|||
} |
|||
|
|||
this.addList.forEach(element => { |
|||
console.log(element.label) |
|||
}); |
|||
|
|||
} |
|||
|
|||
obj.selected = !obj.selected |
|||
this.$set(this.defaultList, index, obj) |
|||
|
|||
}, |
|||
|
|||
async handleConfirm () { |
|||
this.addList.forEach((element, index) => { |
|||
element.sort = index |
|||
element.columnId = element.id |
|||
}); |
|||
|
|||
const url = "/oper/customize/icindividualcategorymanage/editindividualcategory" |
|||
|
|||
|
|||
const { data, code, msg } = await requestPost(url, this.addList) |
|||
|
|||
if (code === 0) { |
|||
this.$emit('handleConfirm') |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
handleCancle () { |
|||
this.$emit('handleCancle') |
|||
}, |
|||
|
|||
|
|||
|
|||
//开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, //是否锁定 |
|||
text: '正在加载……', //加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' //背景颜色 |
|||
}); |
|||
|
|||
}, |
|||
|
|||
//结束加载动画 |
|||
endLoading () { |
|||
//clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
}, |
|||
props: { |
|||
categoryList: { |
|||
type: Array, |
|||
default () { |
|||
return [] |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
// selectWidth () { |
|||
// let width = this.selHouseName.length * 200 |
|||
// console.log(width) |
|||
// return width + 'px'; |
|||
// }, |
|||
|
|||
mapHeight () { |
|||
|
|||
return this.clientHeight - 120; |
|||
|
|||
}, |
|||
|
|||
...mapGetters(["clientHeight"]) |
|||
|
|||
}, |
|||
components: {}, |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/management/categoryMain.scss" |
|||
scoped |
|||
></style> |
|||
|
|||
<style lang=scss > |
|||
.el-scrollbar__wrap { |
|||
overflow-x: hidden !important; |
|||
} |
|||
</style> |
@ -0,0 +1,180 @@ |
|||
<template> |
|||
|
|||
<div class="div_main"> |
|||
<div v-if="!showAddForm"> |
|||
<div class="div_tip"> |
|||
类别信息 |
|||
</div> |
|||
<div class="div_list"> |
|||
<el-scrollbar style="height:100%"> |
|||
<div class="div_room"> |
|||
|
|||
<div v-for="(item,index) in categoryList" |
|||
:key="index" |
|||
class="item"> |
|||
<div v-if="index==(categoryList.length-1)" |
|||
class="item_add" |
|||
@click="handleAddCategory"> |
|||
|
|||
<img :src="item.managementIcon" |
|||
alt /> |
|||
<span>{{item.label}}</span> |
|||
|
|||
</div> |
|||
<div v-else |
|||
class="item_category"> |
|||
<img :src="item.managementIcon" |
|||
alt /> |
|||
|
|||
<div class="item_content"> |
|||
<div class="item_count">{{item.count}}</div> |
|||
|
|||
<div class="item_row2"> |
|||
<div class="row_left">{{item.label}}</div> |
|||
<div class="row_right" |
|||
@click="toPersonList(item)">管理</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</el-scrollbar> |
|||
</div> |
|||
</div> |
|||
<add-category v-if="showAddForm" |
|||
ref="ref_add" |
|||
:categoryList="categoryList" |
|||
@handleCancle="handleCancle" |
|||
@handleConfirm="handleConfirm"></add-category> |
|||
</div> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from "vuex"; |
|||
import nextTick from 'dai-js/tools/nextTick' |
|||
import { Loading } from 'element-ui'; //引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import addCategory from "./addCategory"; |
|||
|
|||
let loading;//加载动画 |
|||
|
|||
export default { |
|||
|
|||
data () { |
|||
return { |
|||
categoryList: [], |
|||
showAddForm: false, |
|||
} |
|||
}, |
|||
async mounted () { |
|||
this.startLoading() |
|||
await this.getCategoryList() |
|||
this.endLoading() |
|||
|
|||
}, |
|||
methods: { |
|||
//获取分类信息 |
|||
async getCategoryList () { |
|||
const url = "/oper/customize/icindividualcategorymanage/individualcategorylist" |
|||
|
|||
let params = {} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.categoryList = data |
|||
let obj = { |
|||
managementIcon: require('@/assets/img/add.png'), |
|||
label: '新建分类' |
|||
} |
|||
this.categoryList.push(obj) |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
|
|||
async handleAddCategory () { |
|||
this.showAddForm = true |
|||
await nextTick(200) |
|||
|
|||
this.$refs['ref_add'].initData() |
|||
}, |
|||
|
|||
handleConfirm () { |
|||
this.showAddForm = false |
|||
|
|||
this.getCategoryList() |
|||
}, |
|||
|
|||
handleCancle () { |
|||
this.showAddForm = false |
|||
}, |
|||
|
|||
toPersonList (item) { |
|||
this.$router.push({ |
|||
path: "/main/base-resi", |
|||
query: { |
|||
columnName: item.columnName |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
//开启加载动画 |
|||
startLoading () { |
|||
loading = Loading.service({ |
|||
lock: true, //是否锁定 |
|||
text: '正在加载……', //加载中需要显示的文字 |
|||
background: 'rgba(0,0,0,.7)' //背景颜色 |
|||
}); |
|||
|
|||
}, |
|||
|
|||
//结束加载动画 |
|||
endLoading () { |
|||
//clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
}, |
|||
props: { |
|||
|
|||
}, |
|||
computed: { |
|||
// selectWidth () { |
|||
// let width = this.selHouseName.length * 200 |
|||
// console.log(width) |
|||
// return width + 'px'; |
|||
// }, |
|||
|
|||
mapHeight () { |
|||
|
|||
return this.clientHeight - 120; |
|||
|
|||
}, |
|||
|
|||
...mapGetters(["clientHeight"]) |
|||
|
|||
}, |
|||
components: { addCategory }, |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/management/categoryMain.scss" |
|||
scoped |
|||
></style> |
|||
|
|||
<style lang=scss > |
|||
.el-scrollbar__wrap { |
|||
overflow-x: hidden !important; |
|||
} |
|||
</style> |
Loading…
Reference in new issue