Browse Source

积分记录

shibei_prod
jiangyy 4 years ago
parent
commit
22b909c187
  1. 2
      src/assets/scss/modules/visual/personCategory.scss
  2. 40
      src/views/components/scoreRecord.vue
  3. 189
      src/views/modules/communityParty/regionalParty/finishList.vue
  4. 7
      src/views/modules/communityParty/regionalParty/units.vue
  5. 10
      src/views/modules/systemManagement/serviceMatter/service.vue
  6. 4
      src/views/modules/systemManagement/serviceMatter/serviceForm.vue
  7. 64
      src/views/modules/visual/basicinfo/basicInfoMain.vue
  8. 10
      src/views/modules/visual/basicinfo/personCategory/Base.js
  9. 317
      src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue
  10. 147
      src/views/modules/visual/basicinfo/personCategory/index.vue
  11. 28
      src/views/modules/workSys/mapConfig.vue

2
src/assets/scss/modules/visual/personCategory.scss

@ -30,6 +30,8 @@
border: 1px solid #1043c0; border: 1px solid #1043c0;
box-shadow: 0px 83px 150px 0px #002790; box-shadow: 0px 83px 150px 0px #002790;
border-radius: 8px; border-radius: 8px;
margin-top: 10px;
margin-left: 10px;
margin-right: 15px; margin-right: 15px;
margin-bottom: 15px; margin-bottom: 15px;
cursor: pointer; cursor: pointer;

40
src/views/components/scoreRecord.vue

@ -24,7 +24,7 @@
<div> <div>
<el-form-item label="总计:" <el-form-item label="总计:"
prop="startTime"> prop="startTime">
<span>{{totalScore}}</span> <span>{{totalPoint}}</span>
</el-form-item> </el-form-item>
</div> </div>
@ -43,40 +43,40 @@
align="center" align="center"
type="index" type="index"
width="50"></el-table-column> width="50"></el-table-column>
<el-table-column prop="unitName" <el-table-column prop="categoryName"
header-align="center" header-align="center"
align="center" align="center"
label="需求类型" label="需求类型"
width="180"> width="180">
</el-table-column> </el-table-column>
<el-table-column prop="title" <el-table-column prop="demandUserName"
header-align="center" header-align="center"
align="center" align="center"
label="需求人" label="需求人"
width="100"> width="100">
</el-table-column> </el-table-column>
<el-table-column prop="address" <el-table-column prop="content"
header-align="center" header-align="center"
align="center" align="center"
label="需求内容" label="需求内容"
min-width="230"> min-width="230">
</el-table-column> </el-table-column>
<el-table-column prop="activityTime" <el-table-column prop="pointTime"
header-align="center" header-align="center"
align="center" align="center"
label="时间" label="时间"
width="150"> width="150">
</el-table-column> </el-table-column>
<el-table-column prop="activityTime" <el-table-column prop="score"
header-align="center" header-align="center"
align="center" align="center"
label="评价" label="评价"
width="80"> width="80">
</el-table-column> </el-table-column>
<el-table-column prop="activityTime" <el-table-column prop="point"
header-align="center" header-align="center"
align="center" align="center"
label="积分" label="积分"
@ -111,12 +111,12 @@ export default {
data () { data () {
return { return {
loading: false, loading: false,
totalScore: 100, totalPoint: 100,
total: 0, total: 0,
pageSize: 10, pageSize: 10,
pageNo: 0, pageNo: 0,
tableLoading: false, tableLoading: false,
agencyId: '', serviceId: '',
pickerOptions: { // pickerOptions: { //
disabledDate (time) { disabledDate (time) {
@ -152,11 +152,10 @@ export default {
methods: { methods: {
async initForm (row) { async initForm (row) {
this.initDate() this.initDate()
const { user } = this.$store.state
this.agencyId = user.agencyId
this.serviceId = row.id
// //
await this.loadTable() await this.loadTable()
}, },
@ -168,10 +167,11 @@ export default {
async loadTable () { async loadTable () {
this.tableLoading = true this.tableLoading = true
const url = "/heart/icpartyactivity/search" // const url = "/heart /userdemand/recordList"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list" const url = "http://yapi.elinkservice.cn/mock/245/heart/userdemand/recordList"
let params = { let params = {
agencyId: this.agencyId, serviceType: this.serviceType,
serviceId: this.serviceId,
pageSize: this.pageSize, pageSize: this.pageSize,
pageNo: this.pageNo, pageNo: this.pageNo,
...this.formData ...this.formData
@ -180,8 +180,9 @@ export default {
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
this.total = data.total this.totalPoint = data.totalPoint
this.tableData = data.list this.total = data.page.total
this.tableData = data.page.list
} else { } else {
this.$message.error(msg) this.$message.error(msg)
} }
@ -292,7 +293,10 @@ export default {
}, },
props: { props: {
serviceType: {
type: String,
default: ''
}
} }
} }
</script> </script>

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

@ -23,11 +23,12 @@
header-align="center" header-align="center"
align="center" align="center"
label="年份" label="年份"
min-width="90"> min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.isEdit"> <div v-if="scope.row.isEdit"
<el-select class="item_width_2" class="picker_year">
<!-- <el-select class="item_width_2"
v-model="scope.row.year" v-model="scope.row.year"
placeholder="请选择"> placeholder="请选择">
<el-option v-for="(item,index) in yearList" <el-option v-for="(item,index) in yearList"
@ -36,13 +37,19 @@
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select> -->
<el-date-picker v-model="scope.row.year"
type="year"
format="yyyy"
value-format="yyyy"
placeholder="选择年">
</el-date-picker>
</div> </div>
<span v-else>{{scope.row.year}}</span> <span v-else>{{scope.row.year}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="timeType" <el-table-column prop="type"
header-align="center" header-align="center"
align="center" align="center"
label="类型" label="类型"
@ -51,7 +58,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.isEdit"> <div v-if="scope.row.isEdit">
<el-select class="item_width_2" <el-select class="item_width_2"
v-model="scope.row.timeType" v-model="scope.row.type"
placeholder="请选择"> placeholder="请选择">
<el-option v-for="(item,index) in typeList" <el-option v-for="(item,index) in typeList"
@click.native="hancleChangeType(scope.row,index,scope.$index)" @click.native="hancleChangeType(scope.row,index,scope.$index)"
@ -65,7 +72,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="time" <el-table-column prop="monthQuarter"
header-align="center" header-align="center"
align="center" align="center"
label="时间" label="时间"
@ -74,7 +81,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.isEdit"> <div v-if="scope.row.isEdit">
<el-select class="item_width_3" <el-select class="item_width_3"
v-model="scope.row.time" v-model="scope.row.monthQuarter"
placeholder="请选择"> placeholder="请选择">
<el-option v-for="item in scope.row.timeList" <el-option v-for="item in scope.row.timeList"
:key="item.value" :key="item.value"
@ -83,11 +90,11 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<span v-else>{{scope.row.timeShow}}</span> <span v-else>{{scope.row.monthQuarterName}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="state" <el-table-column prop="status"
header-align="center" header-align="center"
align="center" align="center"
label="完成情况" label="完成情况"
@ -95,16 +102,16 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.isEdit"> <div v-if="scope.row.isEdit">
<el-select class="item_width_2" <el-select class="item_width_2"
v-model="scope.row.state" v-model="scope.row.status"
placeholder="全部"> placeholder="全部">
<el-option v-for="item in stateList" <el-option v-for="item in statusList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<span v-else>{{scope.row.state==='1'?'完成':'未完成'}}</span> <span v-else>{{scope.row.status==='1'?'完成':'未完成'}}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -170,86 +177,52 @@ export default {
data () { data () {
return { return {
tableLoading: false, tableLoading: false,
unitId: '',
typeList: [ typeList: [
{ {
value: 'quarter', value: 'quarter',
label: '季度' label: '季度'
}, },
{ {
value: 'month', value: 'monthly',
label: '月度' label: '月度'
} }
], ],
yearList: [ yearList: [],
{
value: '2019',
label: '2019'
},
{
value: '2020',
label: '2020'
},
{
value: '2021',
label: '2021'
},
],
quarterList: [ quarterList: [
{ {
value: '1', value: 'Q1',
label: '第一季度'
},
{
value: '2',
label: '第一季度' label: '第一季度'
}, },
{ {
value: '3', value: 'Q2',
label: '第二季度' label: '第二季度'
}, },
{ {
value: '4', value: 'Q3',
label: '第三季度' label: '第三季度'
}, },
{
value: 'Q4',
label: '第四季度'
},
], ],
monthlist: [], monthlist: [],
timeList: [], timeList: [],
stateList: [ statusList: [
{ {
value: '1', value: '1',
label: '完成' label: '完成'
}, },
{ {
value: '2', value: '0',
label: '未完成' label: '未完成'
}, },
], ],
tableData: [ tableData: [],
{
timeType: 'month',
typeShow: '月度',
year: '2019',
time: '12',
timeShow: '12月',
state: '1',
stateShow: '完成',
score: 90
},
{
timeType: 'quarter',
typeShow: '季度',
year: '2019',
time: '3',
timeShow: '第三季度',
state: '2',
stateShow: '未完成',
score: 90
}
],
} }
@ -261,7 +234,8 @@ export default {
methods: { methods: {
async initTable () { async initTable (row) {
this.unitId = row.id
// //
this.initData() this.initData()
@ -299,13 +273,13 @@ export default {
let empetArray = [] let empetArray = []
this.tableData[tableIndex].timeList = [...empetArray] this.tableData[tableIndex].timeList = [...empetArray]
let rowData = JSON.parse(JSON.stringify(row)) let rowData = JSON.parse(JSON.stringify(row))
rowData.time = '' rowData.monthQuarter = ''
this.$set(this.tableData, tableIndex, rowData) this.$set(this.tableData, tableIndex, rowData)
if (row.timeType === 'month') { if (row.type === 'monthly') {
this.tableData[tableIndex].timeList = [...this.monthlist] this.tableData[tableIndex].timeList = [...this.monthlist]
} else if (row.timeType === 'quarter') { } else if (row.type === 'quarter') {
this.tableData[tableIndex].timeList = [...this.quarterList] this.tableData[tableIndex].timeList = [...this.quarterList]
} }
}, },
@ -319,16 +293,9 @@ export default {
//form //form
async loadTable () { async loadTable () {
this.tableData.forEach(item => {
item.isEdit = false
item.timeList = []
});
return false
this.tableLoading = true this.tableLoading = true
const url = '/gov/org/placepatrolreviewrecord/getlist' // const url = '/heart/icpartyunitcompletion/list'
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolreviewrecord/getlist' const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/list'
let params = { let params = {
placePatrolRecordId: this.placePatrolRecordId placePatrolRecordId: this.placePatrolRecordId
} }
@ -338,14 +305,12 @@ export default {
if (code === 0) { if (code === 0) {
if (data.list && data.list.length > 0) { if (data.list && data.list.length > 0) {
data.list.forEach(item => { data.list.forEach(item => {
item.isEdit = false item.isEdit = false
item.isNew = false item.timeList = []
let arrayInspectors = item.inspectors.split(',') item.typeShow = item.type === 'monthly' ? '月度' : '季度'
item.inspectorArray = [...arrayInspectors]
let arrayReviewTime = item.reviewTime.split(' ')
item.reviewTime = arrayReviewTime[0]
}); });
this.tableData = [...data.list] this.tableData = [...data.list]
@ -362,13 +327,13 @@ export default {
let obj = { let obj = {
isEdit: true,// isEdit: true,//
timeType: '', type: '',
typeShow: '', typeShow: '',
year: '', year: '',
time: '', monthQuarter: '',
timeShow: '', timeShow: '',
state: '', status: '',
stateShow: '', unitId: '',
score: 0.0 score: 0.0
} }
this.tableData.push(obj) this.tableData.push(obj)
@ -380,9 +345,9 @@ export default {
rowData.isEdit = true rowData.isEdit = true
this.$set(this.tableData, tableIndex, rowData) this.$set(this.tableData, tableIndex, rowData)
if (row.timeType === 'month') { if (row.type === 'monthly') {
this.tableData[tableIndex].timeList = [...this.monthlist] this.tableData[tableIndex].timeList = [...this.monthlist]
} else if (row.timeType === 'quarter') { } else if (row.type === 'quarter') {
this.tableData[tableIndex].timeList = [...this.quarterList] this.tableData[tableIndex].timeList = [...this.quarterList]
} }
}, },
@ -402,27 +367,36 @@ export default {
}, },
async addReview (row, tableIndex) { async addReview (row, tableIndex) {
console.log(row)
return false
let url = "/gov/org/placepatrolreviewrecord/add" // let url = "/heart/icpartyunitcompletion/save"
if (row.placePatrolReviewRecordId) {
url = "/gov/org/placepatrolreviewrecord/edit" let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/save"
}
let params = JSON.parse(JSON.stringify(row)) let params = JSON.parse(JSON.stringify(row))
params.inspectors = params.inspectorArray.join(',')
params.reviewTime = params.reviewTime + ' 00:00:00'
params.unitId = this.unitId
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
let array = data.reviewTime.split(' ')
data.reviewTime = array[0]
data.isEdit = false
data.isNew = false
this.$set(this.tableData, tableIndex, data) row.isEdit = false
row.typeShow = row.type === 'monthly' ? '月度' : '季度'
if (row.type === 'monthly') {
row.monthQuarterName = row.monthQuarter + '月'
} else {
for (let index in row.timeList) {
if (row.timeList[index].value === row.monthQuarter) {
row.monthQuarterName = row.timeList[index].label
}
}
}
this.$set(this.tableData, tableIndex, row)
} else { } else {
@ -437,13 +411,13 @@ export default {
if (!row.year) { if (!row.year) {
message = message + '年份不能为空;' message = message + '年份不能为空;'
} }
if (!row.timeType) { if (!row.type) {
message = message + '类型不能为空;' message = message + '类型不能为空;'
} }
if (!row.time) { if (!row.monthQuarter) {
message = message + '时间不能为空;' message = message + '时间不能为空;'
} }
if (!row.state) { if (!row.status) {
message = message + '完成情况不能为空;' message = message + '完成情况不能为空;'
} }
@ -461,7 +435,7 @@ export default {
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
if (row.placePatrolReviewRecordId) {//id if (row.id) {//id
this.deleteRecord(row, tableIndex) this.deleteRecord(row, tableIndex)
} else {//id } else {//id
this.tableData.splice(tableIndex, 1); this.tableData.splice(tableIndex, 1);
@ -478,10 +452,11 @@ export default {
async deleteRecord (row, tableIndex) { async deleteRecord (row, tableIndex) {
const url = "/gov/org/placepatrolreviewrecord/del" // const url = "/heart/icpartyunitcompletion/delete"
const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunitcompletion/delete"
let params = { let params = {
placePatrolReviewRecordId: row.placePatrolReviewRecordId id: row.id
} }
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
@ -564,4 +539,10 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
.picker_year {
/deep/ .el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 140px;
}
}
</style> </style>

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

@ -103,9 +103,9 @@
:http-request="uploadFile"> :http-request="uploadFile">
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
size="small" size="small"
type="red">导入</el-button> --> type="red">导入</el-button>
</el-upload> </el-upload>-->
</div> </div>
@ -269,7 +269,8 @@
width="1050px" width="1050px"
top="5vh" top="5vh"
@closed="diaClose"> @closed="diaClose">
<score-record ref="ref_score"></score-record> <score-record ref="ref_score"
:serviceType="'party_unit'"></score-record>
</el-dialog> </el-dialog>
</div> </div>

10
src/views/modules/systemManagement/serviceMatter/service.vue

@ -143,8 +143,8 @@ export default {
async loadTable () { async loadTable () {
this.tableLoading = true this.tableLoading = true
// const url = "/heart/serviceitem/list" const url = "/heart/serviceitem/list"
const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/list" // const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/list"
let params = { let params = {
customerId: this.customerId customerId: this.customerId
} }
@ -217,11 +217,11 @@ export default {
}, },
async disableService (row, type) { async disableService (row, type) {
// const url = "/heart/serviceitem/updatestatus" const url = "/heart/serviceitem/updatestatus"
const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/updatestatus" // const url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/updatestatus"
let params = { let params = {
id: row.categoryId, categoryId: row.categoryId,
usableFlag: type === 'able' usableFlag: type === 'able'
} }

4
src/views/modules/systemManagement/serviceMatter/serviceForm.vue

@ -116,8 +116,8 @@ export default {
}, },
async addService () { async addService () {
// let url = '/heart/serviceitem/saveorupdate' let url = '/heart/serviceitem/saveorupdate'
let url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/saveorupdate" // let url = "http://yapi.elinkservice.cn/mock/245/heart/serviceitem/saveorupdate"
const { data, code, msg } = await requestPost(url, this.formData) const { data, code, msg } = await requestPost(url, this.formData)

64
src/views/modules/visual/basicinfo/basicInfoMain.vue

@ -155,7 +155,7 @@ var createTextStyle = function (feature) {
text: feature.values_.name, text: feature.values_.name,
backgroundFill: new Fill({ backgroundFill: new Fill({
// color: 'rgba(0, 146, 238, 0.75)' // color: 'rgba(0, 146, 238, 0.75)'
color: textColorArray[feature.values_.index - 1] color: textColorArray[feature.values_.colorIndex]
}), }),
padding: [4, 10, 4, 10], padding: [4, 10, 4, 10],
//text: "", //text: "",
@ -174,10 +174,10 @@ var polygonStyleFunction = (function () {
return new Style({ return new Style({
fill: new Fill({ fill: new Fill({
// color: [255, 255, 255, 0.3] // color: [255, 255, 255, 0.3]
color: polygonColorArray[feature.values_.index - 1] color: polygonColorArray[feature.values_.colorIndex]
}), }),
stroke: new Stroke({ stroke: new Stroke({
color: polygonColorArray[feature.values_.index - 1], color: polygonColorArray[feature.values_.colorIndex],
width: 3 width: 3
}), }),
@ -214,11 +214,14 @@ const vueGis = {
runNum: 0, runNum: 0,
runAgencyArray: [], runAgencyArray: [],
selUserId: '', selUserId: '',
center: [],
zoom: null,
} }
}, },
async mounted () { async mounted () {
// //
await this.loadOrgData() await this.loadOrgData()
@ -289,12 +292,14 @@ const vueGis = {
// type:polygon / search people // type:polygon / search people
async toSubAgency (type, e, searchName) { async toSubAgency (type, e, searchName) {
console.log(e) if (!e) {
this.runNum++ return false
this.runAgencyArray.push(this.orgData) }
//neighborHood //neighborHood
if (type === 'people') { if (type === 'people') {
this.runNum++
this.runAgencyArray.push(this.orgData)
this.orgLevel = 'people' this.orgLevel = 'people'
this.selUserId = e this.selUserId = e
this.orgId = '' this.orgId = ''
@ -305,9 +310,11 @@ const vueGis = {
} }
this.searchName = searchName this.searchName = searchName
} else if (type === 'search') {
} else if (type === 'search') {
this.runNum++
this.runAgencyArray.push(this.orgData)
this.orgLevel = 'search' this.orgLevel = 'search'
this.orgId = '' this.orgId = ''
this.orgData = { this.orgData = {
@ -320,8 +327,17 @@ const vueGis = {
}); });
} else { } else {
this.subAgencyArray.forEach(item => { if (!e.selected[0]) {
return false
}
this.runNum++
this.orgData.center = map.getView().getCenter()
this.orgData.zoom = map.getView().getZoom()
console.log('center', map.getView().getCenter())
console.log('zoom', map.getView().getZoom())
this.runAgencyArray.push(this.orgData)
this.subAgencyArray.forEach(item => {
if (item.id === e.selected[0].values_.id) { if (item.id === e.selected[0].values_.id) {
this.orgId = item.id this.orgId = item.id
this.orgLevel = item.level this.orgLevel = item.level
@ -332,7 +348,6 @@ const vueGis = {
if (this.orgLevel === 'neighborHood') { if (this.orgLevel === 'neighborHood') {
this.loadList() this.loadList()
this.$nextTick(() => { this.$nextTick(() => {
// id // id
this.$refs.ref_community.initData(this.orgData.id, this.orgData.name); this.$refs.ref_community.initData(this.orgData.id, this.orgData.name);
}); });
@ -343,7 +358,6 @@ const vueGis = {
} }
}, },
// //
@ -378,6 +392,8 @@ const vueGis = {
this.orgId = this.orgData.id this.orgId = this.orgData.id
this.orgLevel = this.orgData.level this.orgLevel = this.orgData.level
this.center = this.orgData.center
this.zoom = this.orgData.zoom
if (this.orgLevel === 'people') { if (this.orgLevel === 'people') {
@ -437,10 +453,14 @@ const vueGis = {
if (subAgencyArray && subAgencyArray.length > 0) {// if (subAgencyArray && subAgencyArray.length > 0) {//
let oneData = {} let oneData = {}
subAgencyArray.forEach(agencyItem => { let count = 0
for (let i = 0; i < subAgencyArray.length; i++) {
const agencyItem = subAgencyArray[i]
if (agencyItem.coordinates && agencyItem.coordinates !== '') {// if (agencyItem.coordinates && agencyItem.coordinates !== '') {//
let urlNum = this.getRndBetween(1, 3) let urlNum = count % 3
count++
oneData = { oneData = {
type: 'Feature', type: 'Feature',
@ -449,7 +469,7 @@ const vueGis = {
id: agencyItem.id, id: agencyItem.id,
level: agencyItem.level, level: agencyItem.level,
name: agencyItem.name, name: agencyItem.name,
index: urlNum// colorIndex: urlNum//
}, },
geometry: { geometry: {
type: 'Polygon', type: 'Polygon',
@ -474,7 +494,7 @@ const vueGis = {
oneData.geometry.coordinates.push(polygonArray) oneData.geometry.coordinates.push(polygonArray)
featureData.push(oneData) featureData.push(oneData)
} }
}); }
} }
if (featureData && featureData.length > 0) { if (featureData && featureData.length > 0) {
@ -515,7 +535,7 @@ const vueGis = {
scale: 0.5, scale: 0.5,
// src: "/img/largeScreen/icon_camra.png" // src: "/img/largeScreen/icon_camra.png"
// src: "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/a219130b6bc74b0b80b5ddb0fce0892a.png" // src: "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/a219130b6bc74b0b80b5ddb0fce0892a.png"
src: iconUrlArray[oneIcon.values_.index - 1] src: iconUrlArray[oneIcon.values_.colorIndex]
}) })
}); });
@ -532,18 +552,20 @@ const vueGis = {
}, },
// //
setMapLocation () { setMapLocation () {
this.centerPoint = []
if (this.center && this.center.length > 0) {
this.centerPoint = this.center
} else if (this.orgData.longitude && this.orgData.latitude) {
if (this.orgData.longitude && this.orgData.latitude) {
this.centerPoint = []
this.centerPoint.push(this.orgData.longitude) this.centerPoint.push(this.orgData.longitude)
this.centerPoint.push(this.orgData.latitude) this.centerPoint.push(this.orgData.latitude)
} else { } else {
this.centerPoint = centerPointGlobal this.centerPoint = centerPointGlobal
} }
if (!this.zoom) {
this.setZoom(this.orgData.agencyLevel) this.setZoom(this.orgData.agencyLevel)
}
}, },
// //

10
src/views/modules/visual/basicinfo/personCategory/Base.js

@ -1,10 +0,0 @@
class Base {
constructor() {
this.a = '3'
this.init()
}
init() {
console.log('1')
}
}
export default Base

317
src/views/modules/visual/basicinfo/personCategory/components/screen-table/index.vue

@ -3,11 +3,48 @@
<div class="table"> <div class="table">
<div class="table-header"> <div class="table-header">
<div class="table-header-th" <div class="table-header-th"
v-for="(item, index) in headerList" style="width:5%">
:key="item.title" {{ '序号' }}
:style="headerStyle[index]">
{{ item.title }}
</div> </div>
<div class="table-header-th"
style="width:10%">
{{ '姓名' }}
</div>
<div class="table-header-th"
style="width:15%">
{{ '调整时间' }}
</div>
<div class="table-header-th table-header-select"
style="width:10%"
@click.stop="handleShowType()">
<span>{{ typeShow }}</span>
<img src="@/assets/img/xiala.png" />
<div class="user_list"
v-show="showTypeSelect">
<div v-for="(item,index) in typeList"
:key="index"
class="user_item"
@click.stop="handleClickType(item.value,item.label)">
<div class="user_item_content">
<div class="name">{{item.label}}</div>
</div>
<div :class="['item_line',{'last_line':index==(typeList.length-1)}]"></div>
</div>
</div>
</div>
<div class="table-header-th"
style="width:20%">
{{ '网格' }}
</div>
<div class="table-header-th"
style="width:30%">
{{ '小区楼栋' }}
</div>
</div> </div>
<div class="table-body"> <div class="table-body">
<div class="table-body-tr" <div class="table-body-tr"
@ -15,22 +52,10 @@
:key="index"> :key="index">
<div class="td" <div class="td"
v-for="(item, indexs) in value" v-for="(item, indexs) in value"
:key="indexs" :style="{width:widthList[indexs]}"
:style="tableContentStyle[indexs]"> :key="indexs">
<span @click="toUserInfo(item)">{{ item }}</span> <span>{{ item }}</span>
<span v-if="indexs + 1 == value.length && item.length > 8"
class="more"
@click.stop="onClickMorePop(index)"
ref="morePop">
更多>
<span class="more-pop"
@click="toUserInfo(item)"
v-if="visiblePopList[index]">
<!-- 李佳琪刘阳赵欣丁一嘉敏李岩何嘉慧
李易峰赵敏何军曲树惠 -->
{{ item }}
</span>
</span>
</div> </div>
</div> </div>
<screen-loading v-if="visibleLoading">加载中</screen-loading> <screen-loading v-if="visibleLoading">加载中</screen-loading>
@ -48,144 +73,108 @@
<script> <script>
import ScreenLoading from "../screen-loading/index"; import ScreenLoading from "../screen-loading/index";
import { requestPost } from "@/js/dai/request";
import Vue from "vue"; import Vue from "vue";
export default { export default {
name: "warning-table", name: "warning-table",
components: { components: {
ScreenLoading, ScreenLoading,
}, },
props: { props: {
headerList: {
type: Array,
required: false,
default: () => {
return [
{ title: "序号" },
{ title: "所属网格" },
{ title: "所属小区" },
{ title: "楼号" },
{ title: "姓名" },
];
},
},
tableData: {
type: Array,
required: false,
default: () => {
return [
// [
// 1,
// "",
// "",
// "2",
// "",
// ],
// [
// 2,
// "",
// "",
// "2",
// "",
// ],
];
},
},
//
headerStyle: {
type: Array,
default: () => {
return [
// {
// width:'200px',
// border:'1px solid red'
// },
// {
// width:'200px'
// }
];
},
},
//
tableContentStyle: {
type: Array,
default: () => {
return [
// {
// width:'200px',
// border:'1px solid red'
// },
// {
// width:'200px'
// }
];
},
},
visibleLoading: {
type: Boolean,
default: true,
},
// //
// ava: {
// type: Number,
// default: 8
// },
// // --10%
// headerHeightAva: {
// type: String,
// default: '10%'
// },
// //
// tableContentAva: {
// type: Number,
// default: 5
// },
}, },
data () { data () {
return { return {
visiblePopList: [ visibleLoading: false,
false, tableData: [],
false, showTypeSelect: false,
false, widthList: ['5%', '10%', '15%', '10%', '20%', '30%'],
false,
false, typeList: [
false, {
false, value: '1',
false, label: '迁入'
false, },
false, {
value: '2',
label: '迁出'
},
{
value: '3',
label: '新增'
},
], ],
typeShow: '类别',
selType: '',
monthId: '',
categoryKey: '',
pageNo: '',
pageSize: '',
}; };
}, },
watch: { watch: {
tableData (arr) {
if (Array.isArray(arr)) {
this.visiblePopList = new Array(arr.length).fill(false);
}
},
}, },
mounted () { mounted () {
window.addEventListener("click", (e) => {
this.visiblePopList = new Array(this.visiblePopList.length).fill(false);
});
}, },
created () { }, created () { },
methods: { methods: {
toUserInfo (uid) {
// this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` }); //
async getUserwarnlist (monthId, categoryKey, pageNo, pageSize) {
this.visibleLoading = true
if (monthId) {
this.monthId = monthId
this.categoryKey = categoryKey
this.pageNo = pageNo
this.pageSize = pageSize
}
let tableData = [];
// const url = "/temp/record-list";
const url = "http://yapi.elinkservice.cn/mock/245/temp/record-list";
let params = {
categoryKey: this.categoryKey,
monthId: this.monthId,
type: this.selType,
pageNo: this.pageNo,
pageSize: this.pageSize,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
data.list.forEach((item, index) => {
tableData.push([
index + 1,
item.name ? item.name : '--',
item.changeTime ? item.changeTime : '--',
item.typeName ? item.typeName : '--',
item.gridName ? item.gridName : '--',
item.address ? item.address : '--',
]);
});
this.tableData = tableData;
this.total = data.total;
this.visibleLoading = false
} else {
}
}, },
onClickMorePop (index) { handleShowType () {
this.visiblePopList.forEach((item, indexs) => { this.showTypeSelect = !this.showTypeSelect
if (index == indexs) {
Vue.set(this.visiblePopList, index, true);
} else {
Vue.set(this.visiblePopList, indexs, false);
}
});
}, },
handleClickType (value, label) {
this.typeShow = label
this.selType = value
this.getUserwarnlist()
this.showTypeSelect = !this.showTypeSelect
},
}, },
}; };
</script> </script>
@ -213,6 +202,18 @@ export default {
text-align: center; text-align: center;
width: calc(100% / 5); width: calc(100% / 5);
} }
&-select {
position: relative;
cursor: pointer;
// display: flex;
// justify-content: space-around;
> img {
margin-left: 10px;
// width: 10px;
// height: 10px;
}
}
} }
&-body { &-body {
@ -304,4 +305,54 @@ export default {
} }
} }
} }
.user_list {
margin-top: 2px;
position: absolute;
z-index: 10;
left: 25%;
background: #020340;
border: 1px solid #0a359b;
border-radius: 4px;
box-shadow: 0 0 10px inset #1a5afd;
.user_item {
padding: 13px 8px 0 14px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
.user_item_content {
display: flex;
// justify-content: center;
align-items: center;
.name {
max-width: 80%;
text-align: left;
}
> img {
margin-left: auto;
margin-top: 4px;
width: 8px;
height: 12px;
}
}
.item_line {
margin-top: 9px;
width: 70px;
height: 0px;
border: 1px dotted #1797ff31;
border-width: 0.5px;
}
.last_line {
border: 1px dotted #1797ff00;
}
}
}
</style> </style>

147
src/views/modules/visual/basicinfo/personCategory/index.vue

@ -34,37 +34,35 @@
:class="{ :class="{
'top-item-active': activeIndex == index , 'top-item-active': activeIndex == index ,
}" }"
@click="onClickList(index)" @click="onClickList(item,index)"
v-for="(item, index) in warningList" v-for="(item, index) in categoryList"
:key="index"> :key="index">
<div class="top-item-img"> <div class="top-item-img">
<img :src="item.dataIcon" /> <img :src="item.dataIcon" />
<div class="top-item-left"> <div class="top-item-left">
<span>{{ item.label }}</span> <span>{{ item.categoryName }}</span>
<span>{{ item.count }}</span> <span>{{ item.total }}</span>
</div> </div>
</div> </div>
<div class="top-item-num"> <div class="top-item-num">
<div class="num-item"> <div class="num-item">
<div>较上月</div> <div>较上月</div>
<div> <div>
<div>{{ "+2000" }}</div> <div>{{ "+"+ item.immigration }}</div>
</div> </div>
</div> </div>
<div class="num-item"> <div class="num-item">
<div>{{" "}}</div> <div>{{" "}}</div>
<div> <div>
<div>{{ "-2000"}}</div> <div>{{ "-"+ item.emigration}}</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="warning-box-bottom"> <div class="warning-box-bottom">
<screen-table :headerList="headerList" <screen-table ref="ref_recordlist"></screen-table>
:tableData="tableData"
:visibleLoading="visibleLoading"></screen-table>
<div class="pagination"> <div class="pagination">
<el-pagination :current-page="pageNo" <el-pagination :current-page="pageNo"
:page-size="pageSize" :page-size="pageSize"
@ -87,7 +85,7 @@ import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick"; import nextTick from "dai-js/tools/nextTick";
export default { export default {
name: "warning-box",
components: { components: {
cptCard, cptCard,
screenTable, screenTable,
@ -111,35 +109,38 @@ export default {
dateIdShow: '', dateIdShow: '',
agencyId: '', agencyId: '',
dateId: '', level: '',
dateId: '',//yyyyMMdd
warningList: [], monthId: '',//yyyyMM
headerList: [ categoryKey: '',
{ title: "序号" }, agencyInfo: {},
{ title: "所属网格" },
{ title: "所属小区" }, categoryList: [],
{ title: "楼号" },
{ title: "姓名" },
],
tableData: [
// [1,'','','2',''],
],
visibleLoading: true,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
activeIndex: 0, activeIndex: 0,
activeLevel: "1",
}; };
}, },
async mounted () { async mounted () {
await nextTick(100); await nextTick(100);
this.initData() this.initData()
// await this.getAgencylist()//
this.getCategoryData() this.getApiData()
}, },
methods: { methods: {
async getApiData () {
//
await this.getCategoryData()
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
},
initData () { initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000; var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
var nowdate = new Date(time); // var nowdate = new Date(time); //
@ -149,76 +150,92 @@ export default {
this.dateIdShow = y + '-' + m + '-' + d; this.dateIdShow = y + '-' + m + '-' + d;
}, },
onClickList (index) { //
this.activeIndex = index; async getAgencylist () {
// this.activeLevel = level; const url = "/gov/org/customeragency/agencygridtree";
this.pageNo = 1;
this.getUserwarnlist(); let params = {};
},
//
async getUserwarnlist () {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
let params = {
configId: reqItem.configId,
buildingIdList: reqItem["buildingIdList" + activeLevel],
pageNo: this.pageNo,
pageSize: this.pageSize,
};
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
data.list.forEach((item, index) => { this.agencyInfo = data
tableData.push([ this.agencyId = this.agencyInfo.agencyId
index + 1, this.level = this.agencyInfo.level === 'grid' ? 'grid' : 'agency'
item.gridName,
item.neighborhoodName, //
item.buildingName, ++this.iscascaderShow
item.residentNames ? item.residentNames : "暂无", this.casOptions = []
]); this.agencyIdArray.length = []
});
this.tableData = tableData; if (data) {
this.total = data.total; this.casOptions.push(data)
this.agencyIdArray.push(this.agencyId)
}
} else { } else {
this.$message.error(msg);
} }
},
onClickList (item, index) {
this.activeIndex = index;
this.pageNo = 1;
this.categoryKey = item.categoryKey
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
}, },
// //
async getCategoryData () { async getCategoryData () {
// const url = "/data/aggregator/icuser/category-data"; // const url = "/data/aggregator/icuser/category-data";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/icuser/category-data"; const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/icuser/category-data";
let params = { let params = {
agencyId: this.$store.state.user.agencyId, orgType: this.level,
orgId: this.agencyId,
dateId: this.dateId,
}; };
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.warningList = data; this.categoryList = data;
this.visibleLoading = false; if (this.categoryList.length > 0) {
this.getUserwarnlist(); this.categoryKey = this.categoryList[0].categoryKey
}
} else { } else {
} }
}, },
async handleChangeDate (value) { async handleChangeDate (value) {
this.dateIdShow = value this.dateIdShow = value
// await this.getPieChart() this.getApiData()
// this.getPie()
}, },
async handleChangeAgency (value) { async handleChangeAgency (value) {
this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
this.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '' this.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
await this.getPieChart() this.getApiData()
this.getPie()
console.log(this.agencyIdArray)
}, },
pageSizeChangeHandleNew (val) { pageSizeChangeHandleNew (val) {
this.pageNo = 1; this.pageNo = 1;
this.pageSize = val; this.pageSize = val;
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
}, },
pageCurrentChangeHandleNew (val) { pageCurrentChangeHandleNew (val) {
this.pageNo = val; this.pageNo = val;
this.getUserwarnlist(); this.getUserwarnlist();
this.$refs.ref_recordlist.getUserwarnlist(this.monthId, this.categoryKey, this.pageNo, this.pageSize)
},
},
watch: {
dateIdShow () {
let dataArray = this.dateIdShow.split('-')
this.dateId = dataArray.join('')
this.monthId = this.dateId.substring(0, 6)
}, },
}, },
}; };
</script> </script>

28
src/views/modules/workSys/mapConfig.vue

@ -151,6 +151,8 @@ const vueGis = {
// //
runNum: 0, runNum: 0,
runAgency: [], runAgency: [],
center: [],
zoom: null,
} }
}, },
@ -172,11 +174,12 @@ const vueGis = {
methods: { methods: {
// //
orgChange (index) { orgChange (index) {
this.selAgencyIndex = index this.selAgencyIndex = index
selectedFeatures.clear() selectedFeatures.clear()
if (index || index === 0) { if (this.subAgencyArray.length > 0 && (index || index === 0)) {
this.showBtn = true this.showBtn = true
this.selAgency = this.subAgencyArray[index] this.selAgency = this.subAgencyArray[index]
if (this.selAgency.coordinates) { if (this.selAgency.coordinates) {
@ -210,9 +213,13 @@ const vueGis = {
// //
handleBack () { handleBack () {
this.center = this.runAgency[this.runNum - 1].center
this.zoom = this.runAgency[this.runNum - 1].zoom
this.selAgencyId = '' this.selAgencyId = ''
this.runNum-- this.runNum--
this.runAgency.pop() this.runAgency.pop()
if (this.runNum === 0) { if (this.runNum === 0) {
this.orgId = '' this.orgId = ''
this.orgLevel = '' this.orgLevel = ''
@ -336,6 +343,9 @@ const vueGis = {
}, },
// //
toSubAgency (e) { toSubAgency (e) {
if (!e.selected[0]) {
return false
}
if (this.method != 'mAddPolygon' && this.level != 'neighborHood') { if (this.method != 'mAddPolygon' && this.level != 'neighborHood') {
this.selAgencyId = '' this.selAgencyId = ''
@ -351,6 +361,11 @@ const vueGis = {
}); });
this.runNum++ this.runNum++
this.selPolygon.center = map.getView().getCenter()
this.selPolygon.zoom = map.getView().getZoom()
console.log('center', map.getView().getCenter())
console.log('zoom', map.getView().getZoom())
this.runAgency.push(this.selPolygon) this.runAgency.push(this.selPolygon)
this.selAgencyIndex = 0 this.selAgencyIndex = 0
this.refreshMap(true) this.refreshMap(true)
@ -374,9 +389,12 @@ const vueGis = {
}, },
// //
setMapLocation () { setMapLocation () {
this.centerPoint = []
if (this.center && this.center.length > 0) {
this.centerPoint = this.center
} else if (this.orgData.longitude && this.orgData.latitude) {
if (this.orgData.longitude && this.orgData.latitude) {
this.centerPoint = []
this.centerPoint.push(this.orgData.longitude) this.centerPoint.push(this.orgData.longitude)
this.centerPoint.push(this.orgData.latitude) this.centerPoint.push(this.orgData.latitude)
} else { } else {
@ -384,7 +402,9 @@ const vueGis = {
this.centerPoint = centerPointGlobal this.centerPoint = centerPointGlobal
} }
this.setZoom(this.orgData.agencyLevel) if (!this.zoom) {
this.setZoom(this.orgData.agencyLevel)
}
}, },
// //

Loading…
Cancel
Save