Browse Source

Merge branch 'mail_list_dev' into dev

feature
HAHA 3 years ago
parent
commit
1581d4c794
  1. BIN
      src/assets/img/icon-add.png
  2. 4
      src/assets/scss/modules/management/form-main.scss
  3. 1
      src/js/util.js
  4. 14
      src/views/modules/base/organization/organization.vue
  5. 111
      src/views/modules/communityService/fuwujilu/addForm.vue
  6. 94
      src/views/modules/communityService/fuwujilu/detailForm.vue
  7. 74
      src/views/modules/communityService/fuwujilu/fuwuList.vue
  8. 51
      src/views/modules/communityService/fuwujilu/fuwuList00.vue
  9. 51
      src/views/modules/communityService/fuwujilu/fuwuList01.vue
  10. 51
      src/views/modules/communityService/fuwujilu/fuwuList02.vue
  11. 51
      src/views/modules/communityService/fuwujilu/fuwuList03.vue
  12. 51
      src/views/modules/communityService/fuwujilu/fuwuList04.vue
  13. 51
      src/views/modules/communityService/fuwujilu/fuwuList05.vue
  14. 51
      src/views/modules/communityService/fuwujilu/fuwuList06.vue
  15. 51
      src/views/modules/communityService/fuwujilu/fuwuList07.vue
  16. 196
      src/views/modules/communityService/policy/addPolicy.vue
  17. 13
      src/views/modules/communityService/policy/policyList.vue
  18. 127
      src/views/modules/communityService/policy/rule.vue
  19. 0
      src/views/modules/plugins/.gitkeep
  20. 144
      src/views/modules/plugins/visit/visitor-add-or-update.vue
  21. 20
      src/views/modules/plugins/visit/visitvisitor.vue
  22. 629
      src/views/modules/visual/shundeju/controlCount.vue
  23. 346
      src/views/modules/visual/shundeju/screen-table.vue

BIN
src/assets/img/icon-add.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

4
src/assets/scss/modules/management/form-main.scss

@ -15,6 +15,10 @@
width: 220px;
}
.item_width_3{
width: 780px;
}
.list_item_width_1 {
width: 165px;
}

1
src/js/util.js

@ -12,6 +12,7 @@ export default {
* @param {*} messageObj
*/
validateRule(messageObj) {
let message = ''
for (var oneObj in messageObj) {
message = message + messageObj[oneObj][0].message + ' <br/> '

14
src/views/modules/base/organization/organization.vue

@ -1390,11 +1390,23 @@ export default {
async updatePeo () {
const url = "/gov/org/staff/editstaff"
console.log(this.peoForm.gender)
if(this.peoForm.gender === '男'){
this.peoForm.gender = 1
} else if (this.peoForm.gender === '女') {
this.peoForm.gender = 2
} else if (this.peoForm.gender === 1) {
this.peoForm.gender = 1
} else if (this.peoForm.gender === 2) {
this.peoForm.gender = 2
}
let params = {
staffId: this.userStaffId,
name: this.peoForm.name,
mobile: this.peoForm.mobile,
gender: this.peoForm.gender === '男' ? 1 : 0,
gender:this.peoForm.gender,
workType: this.peoForm.post,
roles: this.peoForm.duty,
newRoles: this.peoForm.newRoles,

111
src/views/modules/communityService/fuwujilu/addForm.vue

@ -75,7 +75,12 @@
:label="item.title"
:value="item.policyId">
</el-option>
</el-select>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handlePersonList">预览</el-button>
</el-form-item>
<el-form-item label="经办人"
@ -283,6 +288,24 @@
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
<el-dialog v-if="showPersonList"
:visible.sync="showPersonList"
:append-to-body="true"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'政策预览'"
width="1150px"
top="5vh"
class="dialog-h"
@closed="showPersonList = false">
<person-list ref="ref_detail_form"
:policyId="policyId"
:ruleList="ruleList"
@handleOk="handleOk"
@handleClose="handleClose">
</person-list>
</el-dialog>
</div>
</template>
@ -290,7 +313,7 @@
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import personList from "../policy/personList";
var map
@ -366,7 +389,7 @@ export default {
disabledDate: startDisabledDate
},
showFeedback: true,
showFeedback: false,
serviceOptions: [],
serviceOptiondList: [],
policyList: [],
@ -374,6 +397,12 @@ export default {
fileList: [],
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
policyId: '',
showPersonList: false,
ruleList: [],
firstInitMap: true,
}
},
@ -386,13 +415,18 @@ export default {
},
},
components: {},
components: { personList },
async mounted () {
this.startLoading()
this.initMap()
this.getDictOptions();
this.getPolicyList();
this.$refs.ref_form_feedback.resetFields();
if (this.showFeedback) {
this.initMap()
this.$refs.ref_form_feedback.resetFields();
}
if (this.formType === 'add') {
this.$refs.ref_form.resetFields();
await this.loadScopeTree()
@ -407,6 +441,49 @@ export default {
methods: {
//
async handlePersonList () {
if (!this.formData.policyId) {
this.$message.info('请先选择政策')
return false
}
this.policyId = this.formData.policyId
await this.loadRuleList()
this.showPersonList = true;
},
async loadRuleList () {
const url = "/heart/policy/rulelist/" + this.policyId
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.ruleList = data
} else {
this.$message.error(msg)
}
},
handleClose () {
this.showPersonList = false
},
handleOk () {
this.showPersonList = false
},
async getPolicyList () {
const url = '/heart/policy/policyListSelect'
@ -467,6 +544,13 @@ export default {
handleChangeFeedback (val) {
this.showFeedback = val
if (this.firstInitMap) {
this.$nextTick(() => {
this.initMap()
})
}
},
@ -533,6 +617,13 @@ export default {
app.util.validateRule(messageObj)
this.btnDisable = false
} else {
var oDate1 = new Date(this.formData.serviceTimeStart);
var oDate2 = new Date(this.formData.serviceTimeEnd);
if (oDate1.getTime() > oDate2.getTime()) {
this.$message.error('服务截止时间必须大于服务开始时间')
return false
}
if (this.showFeedback) {
this.$refs['ref_form_feedback'].validate((valid, messageObj) => {
@ -570,6 +661,7 @@ export default {
console.log(this.formData)
// return false
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
if (this.formData.principalContact && regPhone.test(this.formData.principalContact) === false) {
this.btnDisable = false
this.$message({
@ -583,7 +675,7 @@ export default {
const url = '/heart/icServiceRecordV2/add'
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/initiate'
let params = {
serviceCategoryKey: this.serviceCategoryKey,
...this.formData
}
@ -719,6 +811,7 @@ export default {
// init
initMap () {
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map()
@ -745,6 +838,8 @@ export default {
})
this.handleMoveCenter()
this.convert()
this.firstInitMap = false
},
setMarker (lat, lng) {
@ -926,6 +1021,10 @@ export default {
type: String,
required: ''
},
serviceCategoryKey: {
type: String,
required: ''
},
serviceProjectName: {//
type: String,
required: false,

94
src/views/modules/communityService/fuwujilu/detailForm.vue

@ -5,7 +5,6 @@
<el-form ref="ref_form"
:inline="true"
:model="formData"
:disabled="formType==='detail'"
:rules="dataRule"
class="div_form">
@ -69,7 +68,8 @@
prop="policyId"
label-width="150px"
style="display: block">
<el-select v-model="formData.policyId"
<el-select :disabled="formType==='detail'"
v-model="formData.policyId"
class="input-width-small"
placeholder="请选择"
clearable>
@ -79,13 +79,19 @@
:value="item.policyId">
</el-option>
</el-select>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handlePersonList">预览</el-button>
</el-form-item>
<el-form-item label="经办人"
prop="principalName"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
<el-input :disabled="formType==='detail'"
class="item_width_1"
placeholder="请输入经办人姓名"
v-model="formData.principalName">
</el-input>
@ -94,7 +100,8 @@
prop="principalContact"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
<el-input :disabled="formType==='detail'"
class="item_width_1"
placeholder="请输入联系方式"
v-model="formData.principalContact">
</el-input>
@ -103,7 +110,8 @@
<el-form-item label="服务时间"
label-width="150px"
prop="serviceTimeStart">
<el-date-picker v-model="formData.serviceTimeStart"
<el-date-picker :disabled="formType==='detail'"
v-model="formData.serviceTimeStart"
:picker-options="startPickerOptions"
class="item_width_2"
type="date"
@ -112,7 +120,8 @@
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="formData.serviceTimeEnd"
<el-date-picker :disabled="formType==='detail'"
v-model="formData.serviceTimeEnd"
:picker-options="endPickerOptions"
class="item_width_2 data-tag"
type="date"
@ -126,7 +135,8 @@
prop="remark"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
<el-input :disabled="formType==='detail'"
class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
@ -286,6 +296,24 @@
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
<el-dialog v-if="showPersonList"
:visible.sync="showPersonList"
:append-to-body="true"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'政策预览'"
width="1150px"
top="5vh"
class="dialog-h"
@closed="showPersonList = false">
<person-list ref="ref_detail_form"
:policyId="policyId"
:ruleList="ruleList"
@handleOk="handleOk"
@handleClose="handleClose">
</person-list>
</el-dialog>
</div>
</template>
@ -293,7 +321,7 @@
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import personList from "../policy/personList";
var map
@ -353,9 +381,13 @@ export default {
projectList: [],
fileList: [],
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile',
policyId: '',
showPersonList: false,
ruleList: []
}
},
components: {},
components: { personList },
mounted () {
this.getPolicyList()
if (this.serviceRecordId) {//
@ -368,6 +400,46 @@ export default {
methods: {
//
async handlePersonList () {
if (!this.formData.policyId) {
this.$message.info('请先选择政策')
return false
}
this.policyId = this.formData.policyId
await this.loadRuleList()
this.showPersonList = true;
},
async loadRuleList () {
const url = "/heart/policy/rulelist/" + this.policyId
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.ruleList = data
} else {
this.$message.error(msg)
}
},
handleClose () {
this.showPersonList = false
},
handleOk () {
this.showPersonList = false
},
async getPolicyList () {
const url = '/heart/policy/policyListSelect'
@ -398,7 +470,7 @@ export default {
this.feedbackFormData = { ...data.feedback }
this.fileList = []
if (data.feedback.fileList && data.feedback.fileList.length > 0) {
if (data.feedback && data.feedback.fileList && data.feedback.fileList.length > 0) {
data.feedback.fileList.forEach(element => {
let obj = {
name: element.name,
@ -435,7 +507,7 @@ export default {
},
async editFuwu () {
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
if (regPhone.test(this.formData.principalContact) === false) {
if (this.formData.principalContact && regPhone.test(this.formData.principalContact) === false) {
this.btnDisable = false
this.$message({
type: 'warning',

74
src/views/modules/communityService/fuwujilu/fuwuList.vue

@ -179,7 +179,7 @@
<el-table-column fixed="right"
label="操作"
align="center"
width="180">
width="220">
<template slot-scope="scope">
<el-button @click="handleDetail(scope.row)"
type="text"
@ -195,6 +195,11 @@
type="text"
size="small"
class="div-table-button--edit">反馈</el-button>
<el-button v-if="scope.row.policyId"
@click="handlePersonList(scope.row)"
type="text"
size="small"
class="div-table-button--edit">人员名单</el-button>
<el-button v-if="scope.row.serviceStatus==='in_service'"
@click="handleDel(scope.row)"
type="text"
@ -224,12 +229,14 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="addDiaTitle"
:modal-append-to-body="false"
width="850px"
top="5vh"
class="dialog-h"
@closed="showAdd = false">
<add-form ref="ref_add_form"
:formType="formType"
:serviceCategoryKey="serviceCategoryKey"
:statusArray="statusArray"
:satisfyArray="satisfyArray"
:serviceRecordId="serviceRecordId"
@ -242,6 +249,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="detailDiaTitle"
:modal-append-to-body="false"
width="850px"
top="5vh"
class="dialog-h"
@ -255,6 +263,23 @@
:formType="formType">
</detail-form>
</el-dialog>
<el-dialog v-if="showPersonList"
:visible.sync="showPersonList"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'人员名单'"
width="1150px"
top="5vh"
class="dialog-h"
@closed="showPersonList = false">
<person-list ref="ref_detail_form"
:policyId="policyId"
:ruleList="ruleList"
@handleOk="handleOk"
@handleClose="handleClose"
:formType="formType">
</person-list>
</el-dialog>
</div>
</template>
@ -268,9 +293,10 @@ import axios from "axios";
import addForm from "./addForm";
import detailForm from "./detailForm";
import feedBackForm from "./addForm";
import personList from "../policy/personList";
export default {
components: { addForm, detailForm, feedBackForm },
components: { addForm, detailForm, feedBackForm, personList },
data () {
let endDisabledDate = (time) => {//datareturn
@ -356,7 +382,9 @@ export default {
serviceOptions: [],
serviceOptiondList: [],
policyId: '',
showPersonList: false,
ruleList: []
};
},
computed: {
@ -441,6 +469,31 @@ export default {
return this.$message.error("网络错误");
});
},
//
async handlePersonList (row) {
this.policyId = row.policyId
await this.loadRuleList()
this.formType = 'personList'
this.showPersonList = true;
},
async loadRuleList () {
const url = "/heart/policy/rulelist/" + this.policyId
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.ruleList = data
} else {
this.$message.error(msg)
}
},
async handleAdd () {
@ -450,6 +503,7 @@ export default {
},
async handleDetail (row) {
this.detailDiaTitle = "服务详情"
this.serviceRecordId = row.serviceRecordId
this.serviceOrgName = row.serviceOrgName
@ -458,7 +512,9 @@ export default {
},
async handleEdit (row) {
this.detailDiaTitle = "编辑服务"
this.serviceRecordId = row.serviceRecordId
this.serviceOrgName = row.serviceOrgName
this.formType = 'edit'
this.showDetail = true
@ -541,6 +597,7 @@ export default {
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
serviceCategoryKey: this.serviceCategoryKey,
...formData,
});
@ -617,9 +674,18 @@ export default {
this.pageNo = 1
// this.getTableData()
this.getTableData()
},
},
props: {
serviceCategoryKey: {
type: String,
required: 'true'
},
}
};
</script>

51
src/views/modules/communityService/fuwujilu/fuwuList00.vue

@ -0,0 +1,51 @@
<template>
<div>
<fuwu-list :serviceCategoryKey="serviceCategoryKey"></fuwu-list>
</div>
</template>
<script>
import fuwuList from "./fuwuList";
export default {
components: { fuwuList },
data () {
return {
serviceCategoryKey: '00'
};
},
computed: {
},
watch: {
// "formData.serviceTimeEnd": function (val) {
// if (val && val != '') {
// let arrayTemp = val.split(' ')
// this.formData.serviceTimeEnd = arrayTemp[0] + ' 23:59:59'
// }
// },
},
mounted () {
},
methods: {
},
props: {
}
};
</script>
<style lang="scss" scoped>
</style>

51
src/views/modules/communityService/fuwujilu/fuwuList01.vue

@ -0,0 +1,51 @@
<template>
<div>
<fuwu-list :serviceCategoryKey="serviceCategoryKey"></fuwu-list>
</div>
</template>
<script>
import fuwuList from "./fuwuList";
export default {
components: { fuwuList },
data () {
return {
serviceCategoryKey: '01'
};
},
computed: {
},
watch: {
// "formData.serviceTimeEnd": function (val) {
// if (val && val != '') {
// let arrayTemp = val.split(' ')
// this.formData.serviceTimeEnd = arrayTemp[0] + ' 23:59:59'
// }
// },
},
mounted () {
},
methods: {
},
props: {
}
};
</script>
<style lang="scss" scoped>
</style>

51
src/views/modules/communityService/fuwujilu/fuwuList02.vue

@ -0,0 +1,51 @@
<template>
<div>
<fuwu-list :serviceCategoryKey="serviceCategoryKey"></fuwu-list>
</div>
</template>
<script>
import fuwuList from "./fuwuList";
export default {
components: { fuwuList },
data () {
return {
serviceCategoryKey: '02'
};
},
computed: {
},
watch: {
// "formData.serviceTimeEnd": function (val) {
// if (val && val != '') {
// let arrayTemp = val.split(' ')
// this.formData.serviceTimeEnd = arrayTemp[0] + ' 23:59:59'
// }
// },
},
mounted () {
},
methods: {
},
props: {
}
};
</script>
<style lang="scss" scoped>
</style>

51
src/views/modules/communityService/fuwujilu/fuwuList03.vue

@ -0,0 +1,51 @@
<template>
<div>
<fuwu-list :serviceCategoryKey="serviceCategoryKey"></fuwu-list>
</div>
</template>
<script>
import fuwuList from "./fuwuList";
export default {
components: { fuwuList },
data () {
return {
serviceCategoryKey: '03'
};
},
computed: {
},
watch: {
// "formData.serviceTimeEnd": function (val) {
// if (val && val != '') {
// let arrayTemp = val.split(' ')
// this.formData.serviceTimeEnd = arrayTemp[0] + ' 23:59:59'
// }
// },
},
mounted () {
},
methods: {
},
props: {
}
};
</script>
<style lang="scss" scoped>
</style>

51
src/views/modules/communityService/fuwujilu/fuwuList04.vue

@ -0,0 +1,51 @@
<template>
<div>
<fuwu-list :serviceCategoryKey="serviceCategoryKey"></fuwu-list>
</div>
</template>
<script>
import fuwuList from "./fuwuList";
export default {
components: { fuwuList },
data () {
return {
serviceCategoryKey: '04'
};
},
computed: {
},
watch: {
// "formData.serviceTimeEnd": function (val) {
// if (val && val != '') {
// let arrayTemp = val.split(' ')
// this.formData.serviceTimeEnd = arrayTemp[0] + ' 23:59:59'
// }
// },
},
mounted () {
},
methods: {
},
props: {
}
};
</script>
<style lang="scss" scoped>
</style>

51
src/views/modules/communityService/fuwujilu/fuwuList05.vue

@ -0,0 +1,51 @@
<template>
<div>
<fuwu-list :serviceCategoryKey="serviceCategoryKey"></fuwu-list>
</div>
</template>
<script>
import fuwuList from "./fuwuList";
export default {
components: { fuwuList },
data () {
return {
serviceCategoryKey: '05'
};
},
computed: {
},
watch: {
// "formData.serviceTimeEnd": function (val) {
// if (val && val != '') {
// let arrayTemp = val.split(' ')
// this.formData.serviceTimeEnd = arrayTemp[0] + ' 23:59:59'
// }
// },
},
mounted () {
},
methods: {
},
props: {
}
};
</script>
<style lang="scss" scoped>
</style>

51
src/views/modules/communityService/fuwujilu/fuwuList06.vue

@ -0,0 +1,51 @@
<template>
<div>
<fuwu-list :serviceCategoryKey="serviceCategoryKey"></fuwu-list>
</div>
</template>
<script>
import fuwuList from "./fuwuList";
export default {
components: { fuwuList },
data () {
return {
serviceCategoryKey: '06'
};
},
computed: {
},
watch: {
// "formData.serviceTimeEnd": function (val) {
// if (val && val != '') {
// let arrayTemp = val.split(' ')
// this.formData.serviceTimeEnd = arrayTemp[0] + ' 23:59:59'
// }
// },
},
mounted () {
},
methods: {
},
props: {
}
};
</script>
<style lang="scss" scoped>
</style>

51
src/views/modules/communityService/fuwujilu/fuwuList07.vue

@ -0,0 +1,51 @@
<template>
<div>
<fuwu-list :serviceCategoryKey="serviceCategoryKey"></fuwu-list>
</div>
</template>
<script>
import fuwuList from "./fuwuList";
export default {
components: { fuwuList },
data () {
return {
serviceCategoryKey: '07'
};
},
computed: {
},
watch: {
// "formData.serviceTimeEnd": function (val) {
// if (val && val != '') {
// let arrayTemp = val.split(' ')
// this.formData.serviceTimeEnd = arrayTemp[0] + ' 23:59:59'
// }
// },
},
mounted () {
},
methods: {
},
props: {
}
};
</script>
<style lang="scss" scoped>
</style>

196
src/views/modules/communityService/policy/addPolicy.vue

@ -61,20 +61,24 @@
prop="content"
label-width="150px"
style="display: block">
<el-input class="item_width_1"
<el-input class="item_width_3"
type="textarea"
maxlength="1000"
show-word-limit
:rows="3"
:rows="10"
placeholder="请输入政策内容"
v-model="formData.content"></el-input>
</el-form-item>
<div v-for="(item,index) in ruleList"
:key="index">
<div v-for="(item,index) in formData.ruleList"
:key="index"
style="margin-bottom:15px">
<el-form-item :label="'政策细则'+(index+1)"
prop="principalName"
:prop="`ruleList.${index}.ruleName`"
:rules="[
{ required: true, message: '政策细则'+(index+1)+'不能为空', trigger: 'change' },
]"
label-width="150px"
style="display: block">
<el-input class="item_width_short"
@ -89,21 +93,20 @@
style="margin-left:20px"
@click="delRule(index)">删除细则</el-button>
</el-form-item>
<div class="item_rule">
<div class="item_label">{{'匹配规则'+(index+1)}}</div>
<el-form-item :label="'匹配规则'+(index+1)"
prop="principalName"
label-width="150px"
style="display: block">
<rule :ref="'ref_rule'+index"
:formType="formType"
:index="index"></rule>
</el-form-item>
<div v-if="index===(ruleList.length-1)"
class="btn-add-rule">
<el-button type="primary"
size="mini"
@click="addRule">增加细则</el-button>
</div>
</div>
<div class="btn-add-rule">
<el-button type="primary"
size="mini"
@click="addRule">增加细则</el-button>
</div>
<el-form-item label="匹配资源类型"
@ -214,7 +217,14 @@ export default {
content: '',//
categoryList: [],
attachmentList: [],
ruleList: [],
ruleList: [
{
ruleName: '',
resiRuleList: [],
houseRuleList: [],
statRuleList: []
}
],
},
@ -267,10 +277,10 @@ export default {
detail: []
}
this.ruleList.push(obj)
this.formData.ruleList.push(obj)
},
delRule (index) {
this.ruleList.splice(index, 1);
this.formData.ruleList.splice(index, 1);
},
async loadFormInfo () {
@ -286,7 +296,7 @@ export default {
let arr = element.codePath.split(',')
this.demandIdArray.push(arr)
});
this.ruleList = data.ruleList
this.formData.ruleList = data.ruleList
this.formData = data
@ -373,66 +383,98 @@ export default {
},
async handleAdd () {
var oDate1 = new Date(this.formData.startDate);
var oDate2 = new Date(this.formData.endDate);
if (oDate1.getTime() > oDate2.getTime()) {
this.$message.error('结束日期必须大于开始日期')
return false
}
let isOk = false
for (let index = 0; index < this.ruleList.length; index++) {
let oneRule = this.ruleList[index]
for (let index = 0; index < this.formData.ruleList.length; index++) {
let oneRule = this.formData.ruleList[index]
let refObj = this.$refs['ref_rule' + index][0]
refObj.getRule(true, true, true)
refObj.getRule()
if (refObj.okflag) {
oneRule.resiRuleList = refObj.resiRuleList
oneRule.resiRuleList.forEach(element => {
element.itemList = []
element.colOption = []
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
if (!refObj.personChecked && !refObj.houseChecked && !refObj.staticChecked) {
this.$message.error('请选择匹配规则' + (index + 1))
isOk = false
break
} else {
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
if (refObj.personChecked) {
oneRule.resiRuleList = refObj.resiRuleList
oneRule.resiRuleList.forEach(element => {
element.itemList = []
element.colOption = []
});
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
oneRule.houseRuleList = refObj.houseRuleList
oneRule.houseRuleList.forEach(element => {
element.itemList = []
element.colOption = []
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
});
} else {
oneRule.resiRuleList = []
}
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
if (refObj.houseChecked) {
});
oneRule.houseRuleList = refObj.houseRuleList
oneRule.houseRuleList.forEach(element => {
element.itemList = []
element.colOption = []
oneRule.statRuleList = refObj.statRuleList
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
oneRule.statRuleList.forEach(element => {
element.itemList = []
element.colOption = []
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
});
} else {
oneRule.houseRuleList = []
}
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
if (refObj.staticChecked) {
});
oneRule.statRuleList = refObj.statRuleList
oneRule.statRuleList.forEach(element => {
element.itemList = []
element.colOption = []
isOk = true
if (!element.colValLabel) {
element.colValLabel = element.colVal
}
if (!element.nextLogicalRelName) {
element.nextLogicalRelName = ''
}
element.ruleDesc = element.itemGroupName + element.itemLabel + element.queryTypeName + element.colValLabel + element.nextLogicalRelName
});
} else {
oneRule.statRuleList = []
}
isOk = true
}
} else {
isOk = false
@ -446,9 +488,10 @@ export default {
return false
}
this.formData.ruleList = this.ruleList
// this.formData.ruleList = this.ruleList
console.log(this.formData.ruleList)
// return false
this.btnDisable = true
@ -457,7 +500,7 @@ export default {
}, 5000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
// app.util.validateRule(messageObj)
this.btnDisable = false
} else {
this.addFuwu()
@ -473,8 +516,9 @@ export default {
this.formData.attachmentList = [...this.fileList]
let url = '/heart/policy/add'
if (this.formType === 'add') {
if (this.formType === 'add' || this.formType === 'copy') {
url = '/heart/policy/add'
this.formData.policyId = ''
} else {
url = '/heart/policy/update'
this.formData.policyId = this.policyId
@ -639,6 +683,18 @@ export default {
},
computed: {
dataRule () {
// this.ruleList.forEach((element, index) => {
// let one = [
// { required: true, message: '' + (index + 1) + '', trigger: 'blur' }
// ]
// rules['ruleName' + (index + 1)] = one
// });
return {
policyLevel: [
@ -650,9 +706,7 @@ export default {
title: [
{ required: true, message: '政策标题不能为空', trigger: 'change' }
],
content: [
{ required: true, message: '政策内容不能为空', trigger: 'change' }
],
}
@ -690,4 +744,20 @@ export default {
.item_width_short {
width: 380px;
}
.item_rule {
display: flex;
justify-content: start;
}
.item_label {
flex: 0 0 150px;
line-height: 30px;
text-align: right;
padding-right: 12px;
}
.item_label:before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
</style>

13
src/views/modules/communityService/policy/policyList.vue

@ -126,7 +126,7 @@
<el-table-column fixed="right"
label="操作"
align="center"
width="200">
width="220">
<template slot-scope="scope">
<el-button @click="handleDetail(scope.row)"
type="text"
@ -136,6 +136,10 @@
type="text"
size="small"
class="div-table-button--edit">编辑</el-button>
<el-button @click="handleCopy(scope.row)"
type="text"
size="small"
class="div-table-button--edit">复制</el-button>
<el-button @click="handlePersonList(scope.row)"
type="text"
size="small"
@ -304,6 +308,13 @@ export default {
this.formType = 'edit'
this.showAdd = true;
},
async handleCopy (row) {
this.policyId = row.policyId
this.addDiaTitle = '新增政策'
this.formType = 'copy'
this.showAdd = true;
},
//

127
src/views/modules/communityService/policy/rule.vue

@ -17,21 +17,22 @@
plain
size="mini">预览</el-button>
<el-button v-if="formType!=='detail'"
<!-- <el-button v-if="formType!=='detail'"
class="diy-button--add"
@click="addRule"
plain
size="mini">增加</el-button>
size="mini">增加</el-button> -->
</div>
<div v-if="personSel">
<div v-if="personSel"
style="margin-top:10px">
<div v-for="(personItem,personIndex) in resiRuleList"
:key="personIndex"
class="row-item">
<el-select class="item_width_1"
v-model="personItem.itemGroupId"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in groupList"
@click.native="handleSelGroup(personIndex,item)"
:key="item.id"
@ -42,7 +43,7 @@
<el-select class="item_width_1"
v-model="personItem.itemId"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in personItem.itemList"
@click.native="handleSelGroupItem(personIndex,item)"
:key="item.itemId"
@ -53,7 +54,7 @@
<el-select class="item_width_1"
v-model="personItem.queryType"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in queryList"
@click.native="handleSelPersonQuery(personIndex,item)"
:key="item.value"
@ -67,7 +68,7 @@
class="item_width_2"
v-model="personItem.colVal"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in personItem.colOption"
@click.native="handleSelPersonValue(personIndex,item)"
:key="item.value"
@ -102,7 +103,7 @@
class="item_width_1"
v-model="personItem.nextLogicalRel"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in logicalList"
@click.native="handleSelPersonLogical(personIndex,item)"
:key="item.value"
@ -111,16 +112,21 @@
</el-option>
</el-select>
<img v-if="formType!=='detail'"
<img v-if="formType!=='detail' && personIndex<resiRuleList.length-1"
class="img_del"
src="@/assets/img/icon-del.png"
@click="delPerson(personIndex)">
<img v-if="formType!=='detail' && personIndex==resiRuleList.length-1"
class="img_del"
src="@/assets/img/icon-add.png"
@click="addPerson(personIndex)">
</div>
</div>
<div v-if="houseSel">
<div v-if="houseSel"
style="margin-top:10px">
<div v-for="(houseItem,houseIndex) in houseRuleList"
:key="houseIndex"
class="row-item">
@ -133,7 +139,7 @@
<el-select class="item_width_1"
v-model="houseItem.colKey"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in houseItemList"
@click.native="handleSelHouseItem(houseIndex,item)"
:key="item.colKey"
@ -144,7 +150,7 @@
<el-select class="item_width_1"
v-model="houseItem.queryType"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in queryList"
@click.native="handleSelHouseQuery(houseIndex,item)"
:key="item.value"
@ -158,7 +164,7 @@
class="item_width_2"
v-model="houseItem.colVal"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in houseItem.colOption"
@click.native="handleSelHouseValue(houseIndex,item)"
:key="item.value"
@ -193,7 +199,7 @@
class="item_width_1"
v-model="houseItem.nextLogicalRel"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in logicalList"
@click.native="handleSelHouseLogical(houseIndex,item)"
:key="item.value"
@ -202,20 +208,21 @@
</el-option>
</el-select>
<img v-if="formType!=='detail'"
<img v-if="formType!=='detail' && houseIndex<houseRuleList.length-1"
class="img_del"
src="@/assets/img/icon-del.png"
@click="delHouse(houseIndex)">
<!-- <el-button icon="el-icon-remove-outline"
circle
@click="delHouse(houseIndex)"
type="danger"></el-button> -->
<img v-if="formType!=='detail' && houseIndex==houseRuleList.length-1"
class="img_del"
src="@/assets/img/icon-add.png"
@click="addHouse(houseIndex)">
</div>
</div>
<div v-if="staticSel">
<div v-if="staticSel"
style="margin-top:10px">
<div v-for="(staticItem,staticIndex) in statRuleList"
:key="staticIndex"
class="row-item">
@ -228,7 +235,7 @@
<el-select class="item_width_1"
v-model="staticItem.colKey"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in staticItemList"
@click.native="handleSelStaticItem(staticIndex,item)"
:key="item.colKey"
@ -239,7 +246,7 @@
<el-select class="item_width_1"
v-model="staticItem.queryType"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in queryList"
@click.native="handleSelStaticQuery(staticIndex,item)"
:key="item.value"
@ -253,7 +260,7 @@
class="item_width_2"
v-model="staticItem.colVal"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in staticItem.colOption"
@click.native="handleSelStaticValue(staticIndex,item)"
:key="item.value"
@ -287,7 +294,7 @@
class="item_width_1"
v-model="staticItem.nextLogicalRel"
size="mini"
placeholder="全部">
placeholder="请选择">
<el-option v-for="item in logicalList"
@click.native="handleSelStaticLogical(houseIndex,item)"
:key="item.value"
@ -296,10 +303,14 @@
</el-option>
</el-select>
<img v-if="formType!=='detail'"
<img v-if="formType!=='detail' && staticIndex<statRuleList.length-1"
class="img_del"
src="@/assets/img/icon-del.png"
@click="delStatic(staticIndex)">
<img v-if="formType!=='detail' && staticIndex==statRuleList.length-1"
class="img_del"
src="@/assets/img/icon-add.png"
@click="addStatic(staticIndex)">
</div>
</div>
@ -357,8 +368,7 @@ export default {
],
houseItemList: [],//
staticItemList: [],//
resiRuleList: [],
resiRuleList1: [
resiRuleList: [
{
ruleDesc: '',//
nextLogicalRel: '',//andor
@ -377,12 +387,10 @@ export default {
queryTypeName: '',
colValLabel: '',
nextLogicalRelName: '',
}
],
houseRuleList: [],
houseTitleName: '房屋信息',
houseRuleList1: [
houseRuleList: [
{
ruleDesc: '',
nextLogicalRel: '',//andor
@ -401,9 +409,10 @@ export default {
nextLogicalRelName: '',
}
],
houseTitleName: '房屋信息',
statTitleName: '统计信息',
statRuleList: [],
statRuleList1: [
statRuleList: [
{
ruleDesc: '',
nextLogicalRel: '',//andor
@ -420,9 +429,9 @@ export default {
queryTypeName: '',
colValLabel: '',
nextLogicalRelName: '',
}
],
okflag: false,
showPersonList: false,
@ -455,8 +464,11 @@ export default {
}, 500);
return false
}
this.resiRuleList = resiRuleList
if (this.resiRuleList && this.resiRuleList.length > 0) {
this.personChecked = true
for (let i = 0; i < this.resiRuleList.length; i++) {
let element = this.resiRuleList[i]
@ -481,6 +493,7 @@ export default {
this.houseRuleList = houseRuleList
if (this.houseRuleList && this.houseRuleList.length > 0) {
this.houseChecked = true
this.houseRuleList.forEach((element, index) => {
let selHouseItem = this.houseItemList.filter((item) =>
@ -495,6 +508,7 @@ export default {
}
this.statRuleList = statRuleList
if (this.statRuleList && this.statRuleList.length > 0) {
this.staticChecked = true
this.statRuleList.forEach((element, index) => {
let selStaticItem = this.staticItemList.filter((item) =>
@ -512,10 +526,10 @@ export default {
},
getRule (valPerson, valHouse, valStatic) {
getRule () {
this.okflag = false
let messageObj = this.validateRule(valPerson, valHouse, valStatic)
let messageObj = this.validateRule(this.personChecked, this.houseChecked, this.staticChecked)
// console.log('resiRuleList', this.resiRuleList)
// console.log('houseRuleList', this.houseRuleList)
@ -547,6 +561,7 @@ export default {
let message = ''
if (valPerson) {
this.resiRuleList.forEach((item, index) => {
if (index === this.resiRuleList.length - 1) {
@ -573,6 +588,8 @@ export default {
}
});
}
if (valHouse) {
@ -635,7 +652,7 @@ export default {
return false
}
this.getRule(this.personChecked, this.houseChecked, this.staticChecked)
this.getRule()
if (!this.okflag) {
return false
}
@ -929,6 +946,18 @@ export default {
},
addPerson () {
// let array = this.resiRuleList[this.resiRuleList.length - 1]
// if (array.itemGroupId === '' ||
// array.itemId === '' ||
// array.queryType === '' ||
// array.colKey === '' ||
// array.colVal === '') {
// this.$message.info('')
// return false
// }
let obj = {
ruleDesc: '',//
nextLogicalRel: '',//andor
@ -957,6 +986,16 @@ export default {
},
addHouse () {
// let array = this.houseRuleList[this.houseRuleList.length - 1]
// if (array.itemGroupId === '' ||
// array.itemId === '' ||
// array.queryType === '' ||
// array.colKey === '' ||
// array.colVal === '') {
// this.$message.info('')
// return false
// }
let obj = {
ruleDesc: '',
nextLogicalRel: '',//andor
@ -983,6 +1022,16 @@ export default {
},
addStatic () {
// let array = this.statRuleList[this.statRuleList.length - 1]
// if (array.itemGroupId === '' ||
// array.itemId === '' ||
// array.queryType === '' ||
// array.colKey === '' ||
// array.colVal === '') {
// this.$message.info('')
// return false
// }
let obj = {
ruleDesc: '',
nextLogicalRel: '',//andor
@ -1165,7 +1214,7 @@ export default {
.row-item {
display: flex;
margin-bottom: 5px;
margin-bottom: 10px;
}
.item_width_1 {
width: 120px;
@ -1186,7 +1235,7 @@ export default {
.img_del {
width: 25px;
height: 25px;
margin-top: 6px;
margin-top: 3px;
cursor: pointer;
}
</style>

0
src/views/modules/plugins/.gitkeep

144
src/views/modules/plugins/visit/visitor-add-or-update.vue

@ -0,0 +1,144 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form disabled :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="姓名" prop="name">
<el-input v-model="dataForm.name" placeholder="姓名"></el-input>
</el-form-item>
<el-form-item label="身份证" prop="idCard">
<el-input v-model="dataForm.idCard" placeholder="身份证"></el-input>
</el-form-item>
<el-form-item label="性别" prop="gender">
<el-radio-group v-model="dataForm.gender">
<el-radio :label="'0'">{{ $t('user.gender1') }}</el-radio>
<el-radio :label="'1'">{{ $t('user.gender0') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="dataForm.mobile" placeholder="手机号"></el-input>
</el-form-item>
<el-form-item label="人员类型" prop="type">
<el-radio-group v-model="dataForm.gender">
<el-radio :label="'0'">{{ '访客' }}</el-radio>
<el-radio :label="'1'">{{ '租客' }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="来访事由" prop="visitReason">
<el-input type="textarea" v-model="dataForm.visitReason" placeholder="来访事由"></el-input>
</el-form-item>
<el-form-item label="头像" prop="faceImg">
<el-image :src="dataForm.faceImg" @click="imgShow(dataForm.faceImg)" style="width: 100px; height: 100px" />
</el-form-item>
<el-form-item label="小区" prop="residential">
<el-input v-model="dataForm.residential" placeholder="小区"></el-input>
</el-form-item>
<el-form-item label="楼栋" prop="building">
<el-input v-model="dataForm.building" placeholder="楼栋"></el-input>
</el-form-item>
<el-form-item label="单元" prop="unit">
<el-input v-model="dataForm.unit" placeholder="单元"></el-input>
</el-form-item>
<el-form-item label="房屋" prop="room">
<el-input v-model="dataForm.room" placeholder="房屋"></el-input>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<!-- <el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>-->
</template>
<el-dialog :visible.sync="dialogVisible" :modal="false">
<el-image width="100%" :src="dialogImageUrl" alt=""/>
</el-dialog>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dialogVisible: false,
dialogImageUrl: '',
dataForm: {
id: '',
name: '',
idCard: '',
gender: '',
mobile: '',
type: '',
state: '',
reason: '',
delFlag: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
customerId: '',
visitReason: '',
faceImg: '',
residential: '',
building: '',
unit: '',
room: ''
}
}
},
computed: {
dataRule () {
return {
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
//
imgShow(url){
this.dialogImageUrl = url
this.dialogVisible = true
},
//
getInfo () {
this.$http.get(`/pli/power/visitVisitor/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/pli/power/visitVisitor/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

20
src/views/modules/plugins/visit/visitvisitor.vue

@ -33,6 +33,9 @@
style="width:200px" @change="changeTime">
</el-date-picker>
</el-form-item>
<el-form-item label="所属社区" label-width="100px">
<el-input disabled v-model="dataForm.agency" placeholder='所属社区' clearable></el-input>
</el-form-item>
<br/>
<el-form-item label="所属小区"
prop="neighborhoodId" label-width="100px">
@ -112,16 +115,14 @@
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="name" label="姓名" header-align="center" align="center"></el-table-column>
<el-table-column prop="idCard" label="身份证" header-align="center" align="center"></el-table-column>
<el-table-column prop="gender" label="性别" header-align="center" align="center">
<template slot-scope="scope">{{scope.row.gender === '0' ? '女' : scope.row.gender === '1' ? '男' : '未知'}}</template>
</el-table-column>
<el-table-column prop="gender" label="性别" header-align="center" align="center"></el-table-column>
<el-table-column prop="mobile" label="手机号" header-align="center" align="center"></el-table-column>
<el-table-column prop="type" label="人员类型" header-align="center" align="center">
<template slot-scope="scope">{{scope.row.type === '0' ? '访客' : '租客'}}</template>
</el-table-column>
<el-table-column prop="createdTime" label="来访时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="visitReason" show-overflow-tooltip label="来访事由" header-align="center" align="center"></el-table-column>
<el-table-column prop="faceImg" label="头像" header-align="center" align="center">
<el-table-column prop="faceImg" label="人脸" header-align="center" align="center">
<template slot-scope="scope">
<el-image :src="scope.row.faceImg" @click="imgShow(scope.row.faceImg)" style="width: 100px; height: 100px" />
</template>
@ -132,7 +133,7 @@
<el-table-column prop="room" label="房屋" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id, $t('update'))">{{ $t('update') }}</el-button>
<!-- <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id, $t('update'))">{{ $t('update') }}</el-button>-->
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
@ -158,7 +159,7 @@
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './visitvisitor-add-or-update'
import AddOrUpdate from './visitor-add-or-update'
export default {
mixins: [mixinViewModule],
data () {
@ -177,7 +178,8 @@ export default {
houseArr: [],
dataForm: {
id: '',
agencyId: '1550309684605952002'
agencyId: '1550309684605952002',
agency: '顺德居社区'
}
}
},
@ -218,13 +220,13 @@ export default {
this.unitArr = []
this.houseArr = []
this.$http
.post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.dataForm.neighborhoodIdoodId})
.post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.dataForm.neighborhoodId})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.builidingArr = res.data
this.buildingArr = res.data
}
})
.catch(() => {

629
src/views/modules/visual/shundeju/controlCount.vue

@ -0,0 +1,629 @@
<template>
<div class="warning-box">
<cpt-card :min-full-screen="true">
<div class="card-title">
<img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" />
<div class="title-label">
访客统计分析
</div>
</div>
<div class="card-left-title mt30">
访客分析 &nbsp;&nbsp;
<div class="title-time new-time">
<!-- <div class="title-time-label">选择时间</div> -->
<div class="second-select">
<!-- <el-date-picker v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
value-format="yyyy-MM-dd"
>
</el-date-picker> -->
<el-date-picker
v-model="lineTime"
type="date"
placeholder="选择日期">
</el-date-picker>
</div>
</div>
</div>
<div class="echarts-container">
<div id="echartsBox" class="echarts-boxs"></div>
</div>
<div class="card-left-title mt30">
访客记录
&nbsp;&nbsp;
<div class="title-time new-time">
<!-- <div class="title-time-label">选择时间</div> -->
<div class="second-select">
<el-date-picker v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</div>
</div>
</div>
<div class="warning-box-bottom">
<screen-table
:operate="false"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:headerList="headerList"
:tableData="tableData"
:visibleLoading="visibleLoading"
></screen-table>
<div class="pagination">
<el-pagination hide-on-single-page
:current-page="pageNo"
:page-size="pageSize"
background
layout="prev, pager, next"
@size-change="pageSizeChangeHandleNew"
@current-change="pageCurrentChangeHandleNew"
:total="total"
>
</el-pagination>
</div>
</div>
</cpt-card>
</div>
</template>
<script>
import { requestPost, requestGet } from "@/js/dai/request";
import screenTable from "./screen-table";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
import * as echarts from 'echarts';
export default {
name: "warning-box",
components: {
cptCard,
screenTable
},
data() {
return {
headerStyle: [
{
'max-width': '100px'
},
{
'min-width': '150px'
},
{
'min-width': '210px'
},
{
'min-width': '20px'
},
{
'min-width': '20px'
},
{
'min-width': '20px'
},
{
'min-width': '210px'
},
{
'min-width': '400px',
'white-space':'pre-wrap'
},
{
'min-width': '50px'
},
{
'min-width': '50px'
},
{
'min-width': '50px'
},
{
'min-width': '50px'
}
],
headerList: [
{ title: "姓名", coulmn: 'name' },
{ title: "人脸", coulmn: 'faceImg' },
{ title: "身份证", coulmn: 'idCard' },
{ title: "性别", coulmn: 'gender' },
{ title: "手机号", coulmn: 'mobile' },
{ title: "类型", coulmn: 'type' },
{ title: "出入时间", coulmn: 'createdTime' },
{ title: "进入原因", coulmn: 'visitReason' },
{ title: "小区", coulmn: 'residential' },
{ title: "楼号", coulmn: 'building' },
{ title: "单元", coulmn: 'unit' },
{ title: "房间", coulmn: 'room' },
],
timeRange: '',
tableData: [],
visibleLoading: true,
pageNo: 1,
pageSize: 10,
total: 0,
startTime: '',
endTime: '',
lineTime: new Date()
};
},
watch: {
timeRange(val) {
console.log('val-www', JSON.stringify(val))
if (!val) return false
this.pageNo = 1;
this.pageSize = 10;
this.total = 0;
this.startTime = val[0]
this.endTime = val[1]
this.getVisitVisitorPage()
},
lineTime (val) {
if (val) {
this.getChartTraffic()
}
},
},
async mounted() {
this.initTime()
await nextTick(100);
await this.getChartTraffic()
await this.getVisitVisitorPage()
},
methods: {
//
async getChartTraffic () {
const url = "/pli/power/visitVisitor/chart/traffic";
let params = {
date: this.timeFormat(this.lineTime)
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
console.log('pie-data', data)
let xData = []
let yData = []
if (data && data.length > 0) {
data.forEach(item => {
xData.push(item.hour)
yData.push(item.num)
});
}
this.initCharts(xData, yData)
} else {
}
},
async getVisitVisitorPage () {
const url = "/pli/power/visitVisitor/page";
let params = {
page: this.pageNo,
limit: this.pageSize,
startTime: this.startTime,
endTime: this.endTime
};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
this.tableData = data.list.map((item, index) => {
return {
...item,
index: index + 1
}
})
this.total = data.total
} else {
}
this.visibleLoading = false;
},
initCharts(xData, yData) {
const eId = document.getElementById('echartsBox')
let _charts = echarts.init(eId)
let option = {
tooltip: {
trigger: 'axis',
axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
},
backgroundColor: 'transprant',
borderColor: 'transprant',
textStyle: {
color: '#fff'
},
formatter: params => {
const total = params[0].data
const xName = params[0].axisValue
let title = `<div style='margin-bottom: 10px;'><span>${xName} 时 -- </span>${total}人</div>`
return title
}
},
xAxis: {
type: 'category',
axisLabel: {
color: '#8ec7dc',
fontSize: 16
},
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: '#0c4b59'
}
},
data: xData
},
yAxis: {
nameTextStyle: {
color: '#8ec7dc',
fontSize: 18
},
splitNumber: 4,
minInterval: 1,
show: true,
type: 'value',
axisLabel: {
color: '#8ec7dc',
fontSize: 18
},
axisTick: {
show: false
},
splitLine: {
lineStyle: {
color: ['#145968'],
type: 'dotted'
}
},
axisLine: {
show: true,
symbol: ['none', 'arrow'],
symbolOffset: [0, 15],
lineStyle: {
color: '#0c4b59'
}
}
},
series: [
{
name: '数量',
type: 'line',
smooth: true,
barWidth: 15,
areaStyle: {},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0, 1, 0, 0,
[
{ offset: 0, color: 'rgba(121, 55, 255, 0)' },
{ offset: 1, color: '#6339FF' }
]
)
}
},
{
data: yData,
type: 'line',
areaStyle: {}
}
]
};
option && _charts.setOption(option);
},
initTime() {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
console.log('time-rtt', this.timeFormat(start), this.timeFormat(end))
this.timeRange = [this.timeFormat(start), this.timeFormat(end)]
},
timeFormat(date) {
if (!date || typeof date === 'string') {
return false
}
var y = date.getFullYear() //
var m = date.getMonth() + 1 //
if (m < 10) m = '0' + m
var d = date.getDate() //
if (d < 10) d = '0' + d
return y + '-' + m + '-' + d
},
handleCascader(val) {
console.log('val-vvv', val)
if (val.length > 0) {
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
// this.getServicePie(_arr[0], orgType)
}
},
pageSizeChangeHandleNew(val) {
this.pageNo = 1;
this.pageSize = val;
this.getVisitVisitorPage()
},
pageCurrentChangeHandleNew(val) {
this.pageNo = val;
this.getVisitVisitorPage()
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/warning.scss"
scoped
></style>
<style lang="scss" scoped>
.new-time{
display: flex;
align-items: center;
}
.warning-box-bottom {
margin-top: 10px;
}
.card-title {
display: flex;
align-items: center;
cursor: pointer;
margin-bottom: 10px;
padding: 4px 2px;
.title-icon {
display: block;
// width: 46px;
// height: 34px;
box-sizing: border-box;
margin-right: 5px;
}
::v-deep .el-dropdown {
font-size: 16px;
color: #fff;
font-weight: 800;
}
.title-time {
display: flex;
align-items: center;
box-sizing: border-box;
margin-left: 10px;
font-size: 14px;
color: #fff;
.title-time-label {
margin-right: 10px;
}
::v-deep .el-date-editor--month {
width: 100px;
.el-input__inner {
width: 100px;
height: 24px;
box-sizing: border-box;
padding: 0;
font-size: 14px;
color: #fff;
line-height: 24px;
text-align: center;
background: #06186D;
border: 1px solid #1A64CC;
border-radius: 2px;
}
.el-input__prefix {
display: none;
}
.el-input__suffix {
right: 0;
.el-input__icon {
line-height: 24px;
}
}
}
}
.title-label {
font-size: 22px;
font-family: PingFang SC;
font-weight: 800;
::v-deep .el-input {
width: 180px;
.el-input__inner {
font-size: 18px;
// font-weight: 800;
color: #fff;
background: #06186d;
border: 1px solid #1a64cc;
}
.el-icon-arrow-down::before {
content: "\e790";
}
}
}
}
.card-left-title {
position: relative;
padding-left: 40px;
font-size: 16px;
font-weight: 500;
color: #fff;
}
.card-left-title::after {
content: '';
position: absolute;
top: 50%;
left: 20px;
width: 12px;
height: 12px;
box-sizing: border-box;
margin-top: -6px;
background: #2865FA;
border-radius: 50%;
}
.second-select {
margin: 0 10px 0 0;
::v-deep .el-input {
width: 180px;
height: 36px;
.el-input__inner {
height: 100%;
padding: 0 10px;
color: #fff;
line-height: 36px;
background: #06186d;
border: 1px solid #1a64cc;
}
.el-icon-arrow-up:before {
content: "\e78f";
}
// .el-select__caret:before {
// content: '\E790'
// }
}
::v-deep .el-date-editor {
width: 360px;
position: relative;
background: #06186d;
border: 1px solid #1a64cc;
.el-range-input {
color: #fff;
background: #06186d;
}
.el-range-separator {
color: #fff;
}
.el-range__icon {
position: absolute;
right: 5px;
// float: right;
}
.el-input__prefix {
left: unset;
right: 5px;
}
}
}
.card-echart {
display: flex;
margin-top: 40px;
.card-left {
position: relative;
flex: 1;
display: flex;
}
}
.echart-wr {
position: relative;
flex-shrink: 0;
width: 50%;
height: 320px;
box-sizing: border-box;
.echart-org {
width: 100%;
height: 100%;
}
.echart-cicle {
position: absolute;
top: 50%;
left: 50%;
width: 240px;
height: 240px;
box-sizing: border-box;
margin-top: -120px;
margin-left: -120px;
border: 1px dashed rgba(0, 96, 240, 1);
border-radius: 50%;
}
}
.echarts-tips {
width: 40%;
// flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.echarts-tips-wd50 {
width: 50%;
}
.tips-list, .tips-item, .tips-lists, .tips-items-num {
display: flex;
align-items: center;
}
.tips-list {
// width: 100%;
// height: 100%;
flex-wrap: wrap;
// justify-content: center;
.tips-item {
// flex: 1;
width: 50%;
margin-top: 20px;
// margin-right: 40px;
cursor: pointer;
.tips-item-icon {
width: 20px;
height: 10px;
box-sizing: border-box;
margin-right: 8px;
background: #1B51FF;
border-radius: 2px;
}
.tips-item-text {
font-size: 16px;
color: #D2E7FF;
}
}
}
.tips-lists {
width: 100%;
flex-wrap: wrap;
.tips-items {
margin-bottom: 30px;
width: 50%;
.tips-items-title {
font-size: 16px;
}
.tips-items-num {
justify-content: space-between;
box-sizing: border-box;
margin-top: 20px;
padding-right: 30px;
font-size: 20px;
.tips-item-has {
font-size: 14px;
}
}
}
}
.echarts-boxs {
width: 100%;
height: 400px;
}
.ecahrts-button {
width: 100%;
text-align: right;
::v-deep .el-button--warning {
background: linear-gradient(90deg, #0863EA, #3B9FFC);
border: 0;
}
}
.mt30 {
margin-top: 30px;
display: flex;
align-items: center;
}
</style>

346
src/views/modules/visual/shundeju/screen-table.vue

@ -0,0 +1,346 @@
<template>
<div class="warning-table">
<div class="table">
<div class="table-header">
<div
class="table-header-th"
v-for="(item, index) in headerList"
:key="item.title"
:style="headerStyle[index]"
>
{{ item.title }}
</div>
<div
v-if="operate"
class="table-header-th"
>
操作
</div>
</div>
<div class="table-body">
<div
class="table-body-tr"
v-for="(value, index) in tableData"
:key="index"
@click.stop="handleClickRow(value)"
>
<div
class="td"
v-for="(item, indexs) in headerList"
:key="indexs"
:style="tableContentStyle[indexs]"
>
<div v-if="item.coulmn == 'faceImg'">
<img
:src= "value[item.coulmn]"
alt=""
srcset=""
style="width: 40px;height: 40px;"
/>
</div>
<div v-else>
{{ value[item.coulmn] }}
</div>
<!-- <span
v-if="indexs + 1 == value.length && item.length > 8"
class="more"
@click.stop="onClickMorePop(index)"
ref="morePop"
>
更多>
<span class="more-pop" v-if="visiblePopList[index]">
{{ value[item.coulmn] }}
</span>
</span> -->
</div>
<div v-if="operate" class="td td-btn" @click="look(value)">查看</div>
</div>
<screen-loading v-if="visibleLoading">加载中</screen-loading>
<div class="no-data" v-if="tableData.length == 0 && !visibleLoading">
<img
src="../../../../assets/img/modules/visual/noData.png"
alt=""
srcset=""
class="no-data-img"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import ScreenLoading from "../components/screen-loading/index";
import Vue from "vue";
export default {
name: "warning-table",
components: {
ScreenLoading,
},
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,
},
operate: {
type: Boolean,
default: true
}
// //
// ava: {
// type: Number,
// default: 8
// },
// // --10%
// headerHeightAva: {
// type: String,
// default: '10%'
// },
// //
// tableContentAva: {
// type: Number,
// default: 5
// },
},
data() {
return {
visiblePopList: [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
],
};
},
watch: {
tableData(arr) {
if (Array.isArray(arr)) {
this.visiblePopList = new Array(arr.length).fill(false);
}
},
},
mounted() {
window.addEventListener("click", (e) => {
this.visiblePopList = new Array(this.visiblePopList.length).fill(false);
});
},
created() {},
methods: {
onClickMorePop(index) {
this.visiblePopList.forEach((item, indexs) => {
if (index == indexs) {
Vue.set(this.visiblePopList, index, true);
} else {
Vue.set(this.visiblePopList, indexs, false);
}
});
},
look(val) {
console.log('look-----l', val)
this.$emit('look', val)
},
handleClickRow(val) {
this.$emit('row', val)
}
},
};
</script>
<style lang="scss" scoped>
.warning-table {
box-sizing: border-box;
width: 100%;
height: 100%;
.table {
width: 100%;
height: 100%;
&-header {
width: 100%;
height: 50px;
display: flex;
justify-content: space-around;
align-items: center;
background: rgba(8, 37, 134, 0.85);
font-size: 16px;
font-weight: 400;
color: #ffffff;
&-th {
text-align: center;
width: calc(100% / 5);
}
}
&-body {
box-sizing: border-box;
width: 100%;
height: calc(100% - 50px);
font-size: 18px;
font-weight: 400;
color: #ffffff;
&-tr {
width: 100%;
height: 50px;
// height: calc(100% / 10);
display: flex;
justify-content: space-around;
align-items: center;
.td {
text-align: center;
width: calc(100% / 5);
box-sizing: border-box;
padding: 0 15px;
cursor: pointer;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
.more {
font-size: 18px;
font-weight: 400;
color: #e4dc00;
position: relative;
cursor: pointer;
&-pop {
box-sizing: border-box;
display: block;
box-sizing: border-box;
width: 215px;
height: auto;
line-height: 20px;
border: 1px solid red;
position: absolute;
right: -100%;
top: 150%;
background: #06186d;
border: 1px solid #1a64cc;
border-radius: 5px;
font-size: 9px;
font-weight: 400;
color: #ffffff;
padding: 16px 8px 10px 9px;
z-index: 1;
cursor: default;
// &::after{
// position: absolute;
// left: 30%;
// top: -30%;
// display: flex;
// content:'';
// width: 0;
// height: 0;
// border-width: 13px;
// border-style: solid;
// border-color: transparent transparent rgba(26, 100, 204,0.5) transparent;
// // border-color: transparent transparent red transparent;
// transform: translate(-50%,0);
// }
}
}
}
}
.td-btn {
color: #e4dc00;
}
&-tr:nth-child(2n) {
background: rgba(16, 75, 164, 0.24);
}
&-tr:hover {
background: url("../../../../assets/img/modules/visual/hover-bac.png")
no-repeat center;
background-size: 100% 100%;
}
//
.no-data {
width: 100%;
height: calc(100% - 50px);
display: flex;
align-items: center;
justify-content: center;
&-img {
width: 249px;
height: 172px;
}
}
}
}
}
</style>
Loading…
Cancel
Save