Browse Source

Merge branch 'dev-chaxun' into dev

shibei_master
jiangyy 4 years ago
parent
commit
b0b555a8ec
  1. BIN
      src/assets/img/add.png
  2. 157
      src/assets/scss/modules/management/categoryMain.scss
  3. 297
      src/views/components/resiChangeRecord.vue
  4. 20
      src/views/components/resiSearch.vue
  5. 479
      src/views/components/resiTransfer.vue
  6. 16
      src/views/main.vue
  7. 203
      src/views/modules/base/category/addCategory.vue
  8. 180
      src/views/modules/base/category/main.vue
  9. 274
      src/views/modules/base/resi.vue
  10. 6
      src/views/modules/communityParty/regionalParty/activitys.vue
  11. 8
      src/views/modules/communityParty/regionalParty/finishList.vue
  12. 2
      src/views/modules/communityParty/regionalParty/units.vue
  13. 5
      src/views/modules/visual/communityParty/community.vue

BIN
src/assets/img/add.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

157
src/assets/scss/modules/management/categoryMain.scss

@ -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;
}
}

297
src/views/components/resiChangeRecord.vue

@ -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>

20
src/views/components/resiSearch.vue

@ -207,10 +207,14 @@ export default {
formList: {
type: Array,
default: () => []
},
columnName: {
type: String,
default: ''
}
},
data() {
let initForm = (arr) => {
let initForm = (arr, columnName) => {
let _form = {}
// console.log('formInfo', obj)
// if (Object.keys(obj).length > 0) {
@ -218,12 +222,19 @@ export default {
// return _form
// }
arr.forEach((item) => {
_form[item.columnName] = ''
if (columnName && columnName === item.columnName) _form[item.columnName] = '1'
else _form[item.columnName] = ''
})
return _form
}
let form = initForm(this.formList)
let tempFormList = [...this.formList]
let form = initForm(this.formList, this.columnName)
let tempFormList = this.formList.map(item => {
return {
...item,
isChange: this.columnName && this.columnName === item.columnName ? true : false
}
})
let constForm = {
...form,
GRID_ID: '',
@ -339,6 +350,7 @@ export default {
// console.log('formcccc---', this.form)
this.getGridList()
this.getValiheList()
if (this.columnName) this.handleChangeForm(this.columnName)
},
methods: {
initForm() {

479
src/views/components/resiTransfer.vue

@ -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>

16
src/views/main.vue

@ -1,6 +1,5 @@
<template>
<div
v-loading.fullscreen.lock="loading"
<div v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="[
'aui-wrapper',
@ -10,16 +9,14 @@
$store.state.sidebarActiveSubMenuList.length == 0,
},
{ 'z-iframe': $store.state.inIframe },
]"
>
]">
<template v-if="!loading">
<main-navbar ref="ref_navbar" v-if="!$store.state.inIframe" />
<main-navbar ref="ref_navbar"
v-if="!$store.state.inIframe" />
<main-sidebar v-if="!$store.state.inIframe" />
<div class="aui-content__wrapper">
<main-content
v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName"
/>
<main-content v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName" />
</div>
<main-theme-tools v-if="!$store.state.inIframe" />
</template>
@ -174,6 +171,7 @@ export default {
// this.$store.state.user.gender = data.gender
localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
// this.$store.state.user.roleList = data.roleList
// this.$store.state.user.customerId = data.customerId
},

203
src/views/modules/base/category/addCategory.vue

@ -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>

180
src/views/modules/base/category/main.vue

@ -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>

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

@ -1,18 +1,21 @@
<template>
<div v-if="pageLoading" class="resi-container">
<resi-search
v-if="searchList.length > 0"
<div class="resi-container">
<resi-search v-if="searchList.length > 0"
ref="resiSearch"
:form-list="searchList"
@search="handleSearch"
/>
:column-name="defaultCategotyKey"
@search="handleSearch" />
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button type="success" size="small" @click="handleAdd">新增</el-button>
<el-button type="warning" size="small" :loading="exportBtn" @click="handleExport">{{exportBtnTitle}}</el-button>
<el-button type="success"
size="small"
@click="handleAdd">新增</el-button>
<el-button type="warning"
size="small"
:loading="exportBtn"
@click="handleExport">{{exportBtnTitle}}</el-button>
<!-- <el-button type="primary" size="small">下载人口模板</el-button> -->
<el-upload
ref="upload"
<el-upload ref="upload"
class="upload-demo"
action="uploadUlr"
:limit="1"
@ -22,159 +25,144 @@
:on-progress="handleProgress"
:on-success="handleExcelSuccess"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
>
<el-button type="danger" size="small" :loading="importLoading">{{importBtnTitle}}</el-button>
:http-request="uploadHttpRequest">
<el-button type="danger"
size="small"
:loading="importLoading">{{importBtnTitle}}</el-button>
</el-upload>
</div>
<el-table
:data="tableData"
<el-table :data="tableData"
v-loading="tableLoading"
border
style="width: 100%"
class="resi-table"
>
<el-table-column label="序号" type="index" align="center" width="50">
class="resi-table">
<el-table-column label="序号"
type="index"
align="center"
width="50">
</el-table-column>
<el-table-column
v-for="item in tableHeader"
<el-table-column v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
align="center"
:show-overflow-tooltip="true"
:width="item.itemType === 'radio' ? computedWidth(item.label) : 180"
>
:width="item.itemType === 'radio' ? computedWidth(item.label) : 180">
<template slot-scope="scope">
<span>{{ handleFilterSpan(scope.row, item) }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="120">
<el-table-column fixed="right"
label="操作"
align="center"
width="150">
<template slot-scope="scope">
<el-button
@click="handleLook(scope.row)"
<el-button @click="handleLook(scope.row)"
type="text"
size="small"
class="btn-color-look">查看</el-button>
<el-button @click="handleTransfer(scope.row)"
type="text"
size="small"
class="btn-color-look">调动</el-button>
<el-button @click="handleChangeRecord(scope.row)"
type="text"
size="small"
class="btn-color-look"
>查看</el-button
>
class="btn-color-look">调动记录</el-button>
<template v-if="filterEdit(scope.row.ORG_ID)">
<el-button
@click="handleEdit(scope.row)"
<el-button @click="handleEdit(scope.row)"
type="text"
size="small"
class="btn-color-edit"
>编辑</el-button
>
<el-popconfirm
title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row)"
>
<el-button
slot="reference"
class="btn-color-edit">编辑</el-button>
<el-popconfirm title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row)">
<el-button slot="reference"
type="text"
size="small"
class="btn-color-del"
>删除</el-button
>
class="btn-color-del">删除</el-button>
</el-popconfirm>
</template>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next"
:total="total"
>
:total="total">
</el-pagination>
</div>
</el-card>
<el-dialog
:title="formName"
<el-dialog :title="formName"
:visible.sync="dialogVisible"
width="80%"
append-to-body
:close-on-click-modal="false"
:before-close="handlerCancle"
>
<resi-form
v-if="dialogVisible"
:before-close="handlerCancle">
<resi-form v-if="dialogVisible"
ref="baseForm"
:fixed="true"
:form-list="formList"
@changegroup="handleChangeGroup"
/>
<div v-if="dialogVisible" class="resi-other">
@changegroup="handleChangeGroup" />
<div v-if="dialogVisible"
class="resi-other">
<div class="resi-other-title">其他</div>
<div class="tabs-other-info">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in tabsList"
<el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="item in tabsList"
:key="item.columnName"
:label="item.label"
:name="'group' + item.groupId"
>
<resi-form
:ref="'group' + item.groupId"
:name="'group' + item.groupId">
<resi-form :ref="'group' + item.groupId"
:columns="3"
:support-add="item.supportAdd"
:form-id="item.columnName"
:form-list="item.itemList"
/>
:form-list="item.itemList" />
</el-tab-pane>
</el-tabs>
</div>
</div>
<div class="resi-btns">
<el-button size="small" @click="handlerCancle">取消</el-button>
<el-button
type="primary"
<el-button size="small"
@click="handlerCancle">取消</el-button>
<el-button type="primary"
size="small"
:loading="btnLoading"
@click="handleSUbmit"
>提交</el-button
>
@click="handleSUbmit">提交</el-button>
</div>
</el-dialog>
<el-dialog
:title="formName"
<el-dialog :title="formName"
:visible.sync="dialogEditVisible"
width="80%"
append-to-body
:close-on-click-modal="false"
:before-close="handlerEditCancle"
>
<edit-resi
v-if="dialogEditVisible"
:before-close="handlerEditCancle">
<edit-resi v-if="dialogEditVisible"
ref="baseForm"
:disabled="disabled"
:form-info="editForm"
:fixed="true"
:form-list="formList"
:agency-id="editAgencyId"
@changegroup="handleChangeGroup"
/>
<div v-if="dialogEditVisible" class="resi-other">
@changegroup="handleChangeGroup" />
<div v-if="dialogEditVisible"
class="resi-other">
<div class="resi-other-title">其他</div>
<div class="tabs-other-info">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in tabsList"
<el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="item in tabsList"
:key="item.columnName"
:label="item.label"
:name="'group' + item.groupId"
>
<edit-resi
:ref="'group' + item.groupId"
:name="'group' + item.groupId">
<edit-resi :ref="'group' + item.groupId"
:columns="3"
:support-add="item.supportAdd"
:form-id="item.columnName"
@ -182,37 +170,64 @@
:form-list="item.itemList"
:disabled="disabled"
:label-width="'140px'"
:agency-id="editAgencyId"
/>
:agency-id="editAgencyId" />
</el-tab-pane>
</el-tabs>
</div>
</div>
<div class="resi-btns">
<el-button size="small" @click="handlerEditCancle">取消</el-button>
<el-button
v-if="!disabled"
<el-button size="small"
@click="handlerEditCancle">取消</el-button>
<el-button v-if="!disabled"
type="primary"
size="small"
:loading="btnLoading"
@click="handleEditSUbmit"
>提交</el-button
>
@click="handleEditSUbmit">提交</el-button>
</div>
</el-dialog>
<!-- 调动 -->
<el-dialog :visible.sync="tranferShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'人员调动'"
width="950px"
top="5vh"
@closed="diaClose">
<resi-transfer ref="ref_transfer"
@dialogCancle="transferClose"></resi-transfer>
</el-dialog>
<!-- 变更记录 -->
<el-dialog :visible.sync="changeRecordShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'变更记录'"
width="1150px"
top="5vh"
@closed="diaClose">
<resi-change-record ref="ref_changerecord"></resi-change-record>
</el-dialog>
</div>
</template>
<script>
import nextTick from 'dai-js/tools/nextTick'
import resiSearch from '../../components/resiSearch.vue'
import resiForm from '../../components/resiForm.vue'
import editResi from '../../components/editResi.vue'
import axios from 'axios'
import resiTransfer from '../../components/resiTransfer.vue'
import resiChangeRecord from '../../components/resiChangeRecord.vue'
export default {
components: {
resiSearch,
resiForm,
editResi
editResi,
resiTransfer,
resiChangeRecord
},
data () {
return {
@ -246,18 +261,73 @@ export default {
formName: '',
formList: [],
tableHeader: [],
tabsList: []
tabsList: [],
defaultCategotyKey: '',
tranferShow: false,
changeRecordShow: false,
}
},
props: {
},
async activated () {
if (this.$route.query) {
this.searchList = []
let query = this.$route.query
this.defaultCategotyKey = query.columnName
console.log(this.defaultCategotyKey)
await this.getSearchList()
this.$refs.resiSearch.handleSearch()
}
},
async created () {
if (this.$route.query) {
let query = this.$route.query
this.defaultCategotyKey = query.columnName
}
await this.getSearchList()
// await this.getFormList()
await this.getTableHeader()
this.getTableData()
// console.log('this.$refs.resiSearch', this)
this.$refs.resiSearch.handleSearch()
// this.handleSearch()
// this.getTableData()
this.pageLoading = true
console.log('storeoooo----0000', this.$store)
},
methods: {
//
async handleTransfer (row) {
this.tranferShow = true
await nextTick(200)
this.$refs.ref_transfer.initForm(row)
},
//
async handleChangeRecord (row) {
this.changeRecordShow = true
await nextTick(200)
this.$refs.ref_changerecord.initForm(row)
},
diaClose () {
this.tranferShow = false
this.changeRecordShow = false
},
transferClose () {
this.tranferShow = false
this.getTableData()
},
computedWidth (label) {
const wd = 20 * label.length
return wd > 80 ? wd : 80
@ -622,8 +692,8 @@ export default {
})
this.btnLoading = false
},
getTableHeader() {
this.$http
async getTableHeader () {
await this.$http
.post('/oper/customize/icform/tableheaders', {
formCode: 'resi_base_info'
})
@ -754,8 +824,8 @@ export default {
})
return options
},
getSearchList() {
this.$http
async getSearchList () {
await this.$http
.post('/oper/customize/icform/conditionlist', {
formCode: 'resi_base_info',
dynamic: true
@ -867,12 +937,12 @@ export default {
// height: 12px;
color: rgba(30, 122, 254, 1);
line-height: 20px;
background: rgba(30, 122, 254, .2);
background: rgba(30, 122, 254, 0.2);
// border-radius: 50%;
}
::v-deep .el-tabs__item.is-active {
color: #fff;
background: linear-gradient(90deg, #1A5AFD, #26C4FF);
background: linear-gradient(90deg, #1a5afd, #26c4ff);
}
}
.resi-container .resi-card-table {

6
src/views/modules/communityParty/regionalParty/activitys.vue

@ -337,11 +337,11 @@ export default {
//
async loadService () {
const url = "/heart/icresidemanddict/subcodelist"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icresidemanddict/subcodelist"
const url = "/heart/serviceitem/dict-list"
let params = {
parentCategoryCode: '1010'
// parentCategoryCode: '1010'
}
const { data, code, msg } = await requestPost(url, params)

8
src/views/modules/communityParty/regionalParty/finishList.vue

@ -122,11 +122,13 @@
min-width="150">
<template slot-scope="scope">
<div v-if="scope.row.isEdit">
<el-input-number class="item_width_1"
<el-input class="item_width_2"
v-model.trim="scope.row.score"></el-input>
<!-- <el-input-number class="item_width_1"
v-model="scope.row.score"
:precision="1"
:step="0.1"
:max="100"></el-input-number>
:max="100"></el-input-number> -->
</div>
<span v-else>{{scope.row.score}}</span>
</template>
@ -338,7 +340,7 @@ export default {
timeShow: '',
status: '',
unitId: '',
score: 0.0
score: null
}
this.tableData.push(obj)
},

2
src/views/modules/communityParty/regionalParty/units.vue

@ -375,7 +375,7 @@ export default {
//
async loadService () {
const url = "/heart/serviceitem/dict-list"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icresidemanddict/subcodelist"
let params = {
// parentCategoryCode: '1010'

5
src/views/modules/visual/communityParty/community.vue

@ -424,11 +424,10 @@ export default {
return y + '-' + m + '-' + d + ' 00:00:00'
},
async loadUnit () {
const url = "/heart/icresidemanddict/subcodelist"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option"
const url = "/heart/serviceitem/dict-list"
let params = {
parentCategoryCode: '1010'
}
const { data, code, msg } = await requestPost(url, params)

Loading…
Cancel
Save