Browse Source

Merge branch 'dev' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev

# Conflicts:
#	src/views/components/editResi.vue
V1.0
dai 4 years ago
parent
commit
e36d4e7beb
  1. 1
      package.json
  2. BIN
      src/assets/img/shuju/3d-pid-bg.png
  3. BIN
      src/assets/img/shuju/volunteer3.png
  4. 1
      src/assets/scss/modules/visual/search_1.scss
  5. 44
      src/assets/scss/modules/visual/shijianchulifenxi.scss
  6. 8
      src/mixins/view-module.js
  7. 493
      src/views/components/editResi.vue
  8. 14
      src/views/components/resiSearch.vue
  9. 61
      src/views/modules/base/community/buildForm.vue
  10. 22
      src/views/modules/base/community/buildTable.vue
  11. 95
      src/views/modules/base/community/community.vue
  12. 45
      src/views/modules/base/community/communityForm.vue
  13. 21
      src/views/modules/base/community/communityTable.vue
  14. 49
      src/views/modules/base/community/roomForm.vue
  15. 7
      src/views/modules/base/organization/organization.vue
  16. 10
      src/views/modules/cabaseinfo/caloudong.vue
  17. 10
      src/views/modules/cabaseinfo/capingfang.vue
  18. 10
      src/views/modules/cabaseinfo/carental.vue
  19. 10
      src/views/modules/cabaseinfo/caresident.vue
  20. 10
      src/views/modules/cabaseinfo/carotators.vue
  21. 233
      src/views/modules/cabaseinfo/wghSjxxb.vue
  22. 9
      src/views/modules/plugins/change/resideath.vue
  23. 174
      src/views/modules/plugins/point/icpointNoice.vue
  24. 464
      src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
  25. 542
      src/views/modules/plugins/point/icpointnucleicmonitoring.vue
  26. 601
      src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue
  27. 520
      src/views/modules/plugins/point/icpointvaccinesinoculation.vue
  28. 15
      src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue
  29. 12
      src/views/modules/visual/communityGovern/duoyuanfuwu/pieOption.js
  30. 276
      src/views/modules/visual/communityGovern/shijianchuli/chart.js
  31. 108
      src/views/modules/visual/communityGovern/shijianchuli/lineOption.js
  32. 311
      src/views/modules/visual/communityGovern/shijianchuli/pieOption.js
  33. 328
      src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi copy 2.vue
  34. 740
      src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi copy.vue
  35. 12
      src/views/modules/visual/communityParty/gridParty.vue
  36. 7
      src/views/modules/visual/components/screen-map/index.vue
  37. 17
      src/views/modules/visual/cpts/tb.vue

1
package.json

@ -23,6 +23,7 @@
"babel-eslint": "^8.0.1", "babel-eslint": "^8.0.1",
"babel-plugin-component": "^1.1.1", "babel-plugin-component": "^1.1.1",
"echarts": "^5.2.2", "echarts": "^5.2.2",
"echarts-gl": "^2.0.9",
"element-theme": "^2.0.1", "element-theme": "^2.0.1",
"element-ui": "^2.13.0", "element-ui": "^2.13.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",

BIN
src/assets/img/shuju/3d-pid-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
src/assets/img/shuju/volunteer3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

1
src/assets/scss/modules/visual/search_1.scss

@ -24,6 +24,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
margin-left:40px; margin-left:40px;
z-index: 10;
.second-select { .second-select {

44
src/assets/scss/modules/visual/shijianchulifenxi.scss

@ -21,8 +21,8 @@
} }
.l_bottom { .l_bottom {
height: calc(100vh - 200px - 355px); height: calc(100vh - 200px - 365px);
margin-top: 20px; margin-top: 0;
} }
} }
@ -35,25 +35,7 @@
} }
.l_bottom { .l_bottom {
.bottom_label {
position: relative;
padding-left: 40px;
font-size: 16px;
font-weight: 500;
color: #fff;
}
.bottom_label::after {
content: '';
position: absolute;
top: 50%;
left: 20px;
width: 12px;
height: 12px;
box-sizing: border-box;
margin-top: -6px;
background: #2865fa;
border-radius: 50%;
}
> span { > span {
font-size: 18px; font-size: 18px;
font-family: PingFang SC; font-family: PingFang SC;
@ -66,6 +48,26 @@
} }
} }
.bottom_label {
position: relative;
padding-left: 40px;
font-size: 16px;
font-weight: 500;
color: #fff;
}
.bottom_label::after {
content: '';
position: absolute;
top: 50%;
left: 20px;
width: 12px;
height: 12px;
box-sizing: border-box;
margin-top: -6px;
background: #2865fa;
border-radius: 50%;
}
.g-r { .g-r {
.m-tb { .m-tb {

8
src/mixins/view-module.js

@ -102,14 +102,6 @@ export default {
this.page = 1 this.page = 1
this.query() this.query()
}, },
// 新增 / 修改
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id
this.$refs.addOrUpdate.init()
})
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) { if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) {

493
src/views/components/editResi.vue

@ -1,92 +1,120 @@
<template> <template>
<div :id="formId" class="resi-container"> <div :id="formId"
<el-form :ref="formId" class="resi-form" :model="form" :rules="rulesForm" :label-width="labelWidth"> class="resi-container">
<el-form :ref="formId"
class="resi-form"
:model="form"
:rules="rulesForm"
:label-width="labelWidth">
<template v-if="supportAdd"> <template v-if="supportAdd">
<el-row style="margin-bottom: 10px;"> <el-row style="margin-bottom: 10px;">
<el-col :span="24"> <el-col :span="24">
<el-button icon="el-icon-plus" size="small" @click="handleAddRow"></el-button> <el-button icon="el-icon-plus"
size="small"
@click="handleAddRow"></el-button>
</el-col> </el-col>
</el-row> </el-row>
<edit-form v-for="(item, index) in addList" :key="index" :ref="'baseForms' + index" :columns="3" <edit-form v-for="(item, index) in addList"
:form-list="item.itemList || formList" :form-id="'baseForms' + item.row" /> :key="index"
:ref="'baseForms' + index"
:columns="3"
:form-list="item.itemList || formList"
:form-id="'baseForms' + item.row" />
</template> </template>
<template v-else> <template v-else>
<el-row v-if="fixed" class="resi-row"> <el-row v-if="fixed"
class="resi-row">
<!-- <el-col v-for="n in item" :key="n.id" :span="n.itemType === 'textarea'&&24 || (24/columns)"> --> <!-- <el-col v-for="n in item" :key="n.id" :span="n.itemType === 'textarea'&&24 || (24/columns)"> -->
<el-col :span="6"> <el-col :span="6">
<el-form-item prop="GRID_ID" label="所属网格"> <el-form-item prop="GRID_ID"
label="所属网格">
<!-- <div class="resi-cell"> --> <!-- <div class="resi-cell"> -->
<!-- <div class="resi-cell-label">{{n.label}}</div> --> <!-- <div class="resi-cell-label">{{n.label}}</div> -->
<div class="resi-cell-value"> <div class="resi-cell-value">
<el-select v-model.trim="form.GRID_ID" :disabled="disabled" placeholder="请选择网格" size="small" <el-select v-model.trim="form.GRID_ID"
clearable class="resi-cell-select" @change="handleChangeGrid" :disabled="disabled"
> placeholder="请选择网格"
<el-option size="small"
v-for="item in optionsG" clearable
:key="item.value" class="resi-cell-select"
:label="item.label" @change="handleChangeGrid">
:value="item.value"> <el-option v-for="item in optionsG"
</el-option> :key="item.value"
</el-select> :label="item.label"
</div> :value="item.value">
</el-option>
</el-select>
</div>
<!-- </div> --> <!-- </div> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-form-item label="所属房屋" required> <el-form-item label="所属房屋"
<div class="resi-cell-value"> required>
<div class="resi-cell-col"> <div class="resi-cell-value">
<el-form-item prop="VILLAGE_ID"> <div class="resi-cell-col">
<el-select v-model.trim="form.VILLAGE_ID" placeholder="请选择小区" size="small" <el-form-item prop="VILLAGE_ID">
clearable class="resi-cell-select" :disabled="disabled" @change="handleChangeV" <el-select v-model.trim="form.VILLAGE_ID"
> placeholder="请选择小区"
<el-option size="small"
v-for="item in optionsV" clearable
:key="item.value" class="resi-cell-select"
:label="item.label" :disabled="disabled"
:value="item.value"> @change="handleChangeV">
</el-option> <el-option v-for="item in optionsV"
</el-select> :key="item.value"
</el-form-item> :label="item.label"
<el-form-item prop="BUILD_ID"> :value="item.value">
<el-select v-model.trim="form.BUILD_ID" placeholder="请选择楼号" size="small" </el-option>
clearable :disabled="disabled" class="resi-cell-select resi-cell-select-middle" @change="handleChangeB" </el-select>
> </el-form-item>
<el-option <el-form-item prop="BUILD_ID">
v-for="item in optionsB" <el-select v-model.trim="form.BUILD_ID"
:key="item.value" placeholder="请选择楼号"
:label="item.label" size="small"
:value="item.value"> clearable
</el-option> :disabled="disabled"
</el-select> class="resi-cell-select resi-cell-select-middle"
</el-form-item> @change="handleChangeB">
<el-form-item prop="UNIT_ID"> <el-option v-for="item in optionsB"
<el-select v-model.trim="form.UNIT_ID" placeholder="请选择单元" size="small" :key="item.value"
clearable :disabled="disabled" class="resi-cell-select resi-cell-select-middle" @change="handleChangeD" :label="item.label"
> :value="item.value">
<el-option </el-option>
v-for="item in optionsD" </el-select>
:key="item.value" </el-form-item>
:label="item.label" <el-form-item prop="UNIT_ID">
:value="item.value"> <el-select v-model.trim="form.UNIT_ID"
</el-option> placeholder="请选择单元"
</el-select> size="small"
</el-form-item> clearable
<el-form-item prop="HOME_ID"> :disabled="disabled"
<el-select v-model.trim="form.HOME_ID" placeholder="请选择房号" size="small" class="resi-cell-select resi-cell-select-middle"
clearable :disabled="disabled" class="resi-cell-select resi-cell-select-middle" @change="handleChangeD">
@change="handleChangeH" <el-option v-for="item in optionsD"
> :key="item.value"
<el-option :label="item.label"
v-for="item in optionsH" :value="item.value">
:key="item.value" </el-option>
:label="item.label" </el-select>
:value="item.value"> </el-form-item>
</el-option> <el-form-item prop="HOME_ID">
</el-select> <el-select v-model.trim="form.HOME_ID"
</el-form-item> placeholder="请选择房号"
</div> size="small"
<!-- <el-col :span="6"> clearable
:disabled="disabled"
class="resi-cell-select resi-cell-select-middle"
@change="handleChangeH">
<el-option v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<!-- <el-col :span="6">
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -98,7 +126,7 @@
<el-col :span="6"> <el-col :span="6">
</el-col> --> </el-col> -->
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="6"> <!-- <el-col :span="6">
@ -134,37 +162,38 @@
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
</el-row> </el-row>
<el-row v-for="(item, index) in sliceList(formList, columns)" :key="index" class="resi-row"> <el-row v-for="(item, index) in sliceList(formList, columns)"
<!-- <el-col v-for="n in item" :key="n.id" :span="n.itemType === 'textarea'&&24 || (24/columns)"> --> :key="index"
<el-col v-for="n in item" :key="n.itemId" :span="item.length === 1 ? 24 : (24/columns)" class="resi-row">
:style="n.itemType === 'divider' && 'display: none;'"> <!-- <el-col v-for="n in item" :key="n.id" :span="n.itemType === 'textarea'&&24 || (24/columns)"> -->
<el-form-item :prop="n.columnName" :label="n.label"> <el-col v-for="n in item"
<!-- <div class="resi-cell"> --> :key="n.itemId"
<!-- <div class="resi-cell-label">{{n.label}}</div> --> :span="item.length === 1 ? 24 : (24/columns)"
<div class="resi-cell-value"> :style="n.itemType === 'divider' && 'display: none;'">
<template v-if="n.itemType === 'input' || n.itemType === 'textarea'"> <el-form-item :prop="n.columnName"
<el-input :label="n.label">
v-if="n.validType" <!-- <div class="resi-cell"> -->
v-model.trim="form[n.columnName]" <!-- <div class="resi-cell-label">{{n.label}}</div> -->
:disabled="disabled" <div class="resi-cell-value">
class="resi-cell-input" <template v-if="n.itemType === 'input' || n.itemType === 'textarea'">
size="small" <el-input v-if="n.validType"
clearable v-model.trim="form[n.columnName]"
placeholder="请输入内容" :disabled="disabled"
> class="resi-cell-input"
</el-input> size="small"
<el-input clearable
v-else placeholder="请输入内容">
v-model.trim="form[n.columnName]" </el-input>
:disabled="disabled" <el-input v-else
class="resi-cell-input" v-model.trim="form[n.columnName]"
size="small" :disabled="disabled"
clearable class="resi-cell-input"
placeholder="请输入内容" size="small"
> clearable
</el-input> placeholder="请输入内容">
</template> </el-input>
<!-- <template v-if="n.itemType === 'textarea'"> </template>
<!-- <template v-if="n.itemType === 'textarea'">
<el-input <el-input
v-model.trim="form[n.columnName]" v-model.trim="form[n.columnName]"
class="resi-cell-textarea" class="resi-cell-textarea"
@ -175,89 +204,92 @@
> >
</el-input> </el-input>
</template> --> </template> -->
<el-date-picker <el-date-picker v-else-if="n.itemType === 'datepicker'"
v-else-if="n.itemType === 'datepicker'" v-model.trim="form[n.columnName]"
v-model.trim="form[n.columnName]" :disabled="disabled"
:disabled="disabled" class="resi-cell-input"
class="resi-cell-input" type="date"
type="date" size="small"
size="small" clearable
clearable placeholder="选择日期"
placeholder="选择日期" format="yyyy 年 MM 月 dd 日"
format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
value-format="yyyy-MM-dd"> </el-date-picker>
</el-date-picker> <el-date-picker v-else-if="n.itemType === 'daterange'"
<el-date-picker v-model.trim="form[n.columnName]"
v-else-if="n.itemType === 'daterange'" :disabled="disabled"
v-model.trim="form[n.columnName]" type="daterange"
:disabled="disabled" align="right"
type="daterange" unlink-panels
align="right" value-format="yyyy-MM-dd"
unlink-panels range-separator="至"
value-format="yyyy-MM-dd" start-placeholder="开始日期"
range-separator="至" end-placeholder="结束日期">
start-placeholder="开始日期" </el-date-picker>
end-placeholder="结束日期" <el-time-picker v-else-if="n.itemType === 'timepicker'"
> v-model.trim="form[n.columnName]"
</el-date-picker> :disabled="disabled"
<el-time-picker placeholder="任意时间点">
v-else-if="n.itemType === 'timepicker'" </el-time-picker>
v-model.trim="form[n.columnName]" <el-time-picker v-else-if="n.itemType === 'timerange'"
:disabled="disabled" v-model.trim="form[n.columnName]"
placeholder="任意时间点"> :disabled="disabled"
</el-time-picker> is-range
<el-time-picker range-separator="至"
v-else-if="n.itemType === 'timerange'" start-placeholder="开始时间"
v-model.trim="form[n.columnName]" end-placeholder="结束时间"
:disabled="disabled" placeholder="选择时间范围">
is-range </el-time-picker>
range-separator="至" <el-select v-else-if="n.itemType === 'select'"
start-placeholder="开始时间" v-model.trim="form[n.columnName]"
end-placeholder="结束时间" :multiple="n.multiSelect"
placeholder="选择时间范围"> :disabled="disabled"
</el-time-picker> placeholder="请选择"
<el-select v-else-if="n.itemType === 'select'" v-model.trim="form[n.columnName]" size="small"
:multiple="n.multiSelect" clearable
:disabled="disabled" class="resi-cell-select">
placeholder="请选择" size="small" clearable class="resi-cell-select"> <el-option v-for="item in n.options || options"
<el-option :key="item.value"
v-for="item in n.options || options" :label="item.label"
:key="item.value" :value="item.value">
:label="item.label" </el-option>
:value="item.value"> </el-select>
</el-option> <!-- <el-cascader
</el-select>
<!-- <el-cascader
:options="options" :options="options"
:props="{ checkStrictly: true }" :props="{ checkStrictly: true }"
clearable></el-cascader> --> clearable></el-cascader> -->
<el-cascader <el-cascader v-else-if="n.itemType === 'cascader'"
v-else-if="n.itemType === 'cascader'" v-model.trim="form[n.columnName]"
v-model.trim="form[n.columnName]" :options="n.options"
:options="n.options" :props="{ checkStrictly: true }"
:props="{ checkStrictly: true, emitPath: false }" :disabled="disabled"
:disabled="disabled" clearable
clearable size="small"
size="small" class="resi-cell-select">
class="resi-cell-select"> </el-cascader>
</el-cascader> <template v-else-if="n.itemType === 'radio'">
<template v-else-if="n.itemType === 'radio'"> <el-radio v-for="ns in n.options"
<el-radio v-for="ns in n.options" :key="ns.value" v-model.trim="form[n.columnName]" :disabled="disabled" :key="ns.value"
:label="ns.value"> v-model.trim="form[n.columnName]"
{{ ns.label }} :disabled="disabled"
</el-radio> :label="ns.value">
<!-- <el-radio v-model.trim="form[n.columnName]" label="1">备选项</el-radio> --> {{ ns.label }}
</template> </el-radio>
<template v-else-if="n.itemType === 'checkbox'"> <!-- <el-radio v-model.trim="form[n.columnName]" label="1">备选项</el-radio> -->
<el-checkbox-group v-model.trim="form[n.columnName]"> </template>
<el-checkbox v-for="ns in n.options" :key="ns.value" :label="ns.value" :disabled="disabled">{{ns.label}}</el-checkbox> <template v-else-if="n.itemType === 'checkbox'">
<!-- <el-checkbox label="n.la"></el-checkbox> --> <el-checkbox-group v-model.trim="form[n.columnName]">
</el-checkbox-group> <el-checkbox v-for="ns in n.options"
</template> :key="ns.value"
</div> :label="ns.value"
<!-- </div> --> :disabled="disabled">{{ns.label}}</el-checkbox>
</el-form-item> <!-- <el-checkbox label="n.la"></el-checkbox> -->
</el-col> </el-checkbox-group>
</template>
</div>
<!-- </div> -->
</el-form-item>
</el-col>
</el-row> </el-row>
</template> </template>
</el-form> </el-form>
@ -348,7 +380,7 @@ export default {
_form = { ...obj } _form = { ...obj }
// return _form // return _form
} }
const itemTypes = ['daterange', 'timerange'] const itemTypes = ['cascader', 'daterange', 'timerange']
arr.forEach(item => { arr.forEach(item => {
if (item.multiSelect || itemTypes.includes(item.itemType)) { if (item.multiSelect || itemTypes.includes(item.itemType)) {
if (item.columnValue && item.columnValue.indexOf(',') > -1) _form[item.columnName] = item.columnValue.split(',') if (item.columnValue && item.columnValue.indexOf(',') > -1) _form[item.columnName] = item.columnValue.split(',')
@ -381,7 +413,7 @@ export default {
} }
let form = initForm(this.formInfo, this.formList) let form = initForm(this.formInfo, this.formList)
let rules = initRules(this.formList) let rules = initRules(this.formList)
let tempFormList = [ ...this.formList ] let tempFormList = [...this.formList]
let constForm = { let constForm = {
...form ...form
} }
@ -525,13 +557,13 @@ export default {
} }
}) })
}, },
getTreeData(data){ getTreeData (data) {
if (!Array.isArray(data)) return [] if (!Array.isArray(data)) return []
let arr = data.map(item => { let arr = data.map(item => {
let _item = {} let _item = {}
if (item.children) { if (item.children) {
if (item.children.length === 0) _item = { ...item, children: undefined } if (item.children.length === 0) _item = { ...item, children: undefined }
else _item = { ...item, children: this.getTreeData(item.children)} else _item = { ...item, children: this.getTreeData(item.children) }
} else { } else {
_item = { ...item } _item = { ...item }
} }
@ -613,9 +645,9 @@ export default {
this.getHouseList() this.getHouseList()
}, },
// //
handleChangeH(val){ handleChangeH (val) {
let item = this.optionsH.find(item => item.value === val); let item = this.optionsH.find(item => item.value === val);
if(item && item.type == '1'){ if (item && item.type == '1') {
this.form.IS_TENANT = '1' this.form.IS_TENANT = '1'
console.log('item-----', item) console.log('item-----', item)
} else this.form.IS_TENANT = '0' } else this.form.IS_TENANT = '0'
@ -624,7 +656,7 @@ export default {
let arr = [] let arr = []
this.addList.forEach(item => { this.addList.forEach(item => {
// console.log('handlerMuscForm----000', this.$refs['baseForms' + item.row || item][0].handleForm()) // console.log('handlerMuscForm----000', this.$refs['baseForms' + item.row || item][0].handleForm())
arr.push([ ...this.$refs['baseForms' + item.row][0].handleForm() ]) arr.push([...this.$refs['baseForms' + item.row][0].handleForm()])
}) })
if (arr.length === 0) return arr if (arr.length === 0) return arr
let arr2 = arr.reduce(function (a, b) { return a.concat(b) }) let arr2 = arr.reduce(function (a, b) { return a.concat(b) })
@ -807,17 +839,16 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.resi-form { .resi-form {
:deep .el-date-editor.el-input, .el-date-editor.el-input__inner { :deep .el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 100% !important; width: 100% !important;
} }
} }
.resi-cell-value .resi-cell-input { .resi-cell-value .resi-cell-input {
width: 190px; width: 190px;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.resi-form .resi-row { .resi-form .resi-row {
margin-bottom: 0; margin-bottom: 0;
} }
@ -825,43 +856,43 @@ export default {
// .resi-form .resi-cell { // .resi-form .resi-cell {
// display: flex; // display: flex;
// align-items: center; // align-items: center;
// .resi-cell-label { // .resi-cell-label {
// width: 70px; // width: 70px;
// box-sizing: border-box; // box-sizing: border-box;
// margin-right: 15px; // margin-right: 15px;
// text-align: right; // text-align: right;
// } // }
// .resi-cell-value-radio { // .resi-cell-value-radio {
// display: flex; // display: flex;
// align-items: center; // align-items: center;
// min-height: 36px; // min-height: 36px;
// } // }
// .resi-cell-value .resi-cell-input { // .resi-cell-value .resi-cell-input {
// width: 180px; // width: 180px;
// } // }
.resi-cell-value .resi-cell-textarea { .resi-cell-value .resi-cell-textarea {
width: 300px; width: 300px;
} }
.resi-cell-col { .resi-cell-col {
display: flex; display: flex;
.el-form-item { .el-form-item {
margin-right: 10px;
}
}
.resi-cell-select {
width: 190px;
box-sizing: border-box;
margin-right: 10px; margin-right: 10px;
&-middle {
width: 130px;
}
&-small {
width: 88px;
}
} }
.resi-cell-select:last-child { }
margin-right: 0; .resi-cell-select {
width: 190px;
box-sizing: border-box;
margin-right: 10px;
&-middle {
width: 130px;
} }
&-small {
width: 88px;
}
}
.resi-cell-select:last-child {
margin-right: 0;
}
// } // }
</style> </style>

14
src/views/components/resiSearch.vue

@ -187,6 +187,7 @@
size="small" size="small"
clearable clearable
class="resi-cell-select" class="resi-cell-select"
:collapse-tags="n.multiSelect == 1 ? true : false"
:multiple="n.multiSelect == 1 ? true : false" :multiple="n.multiSelect == 1 ? true : false"
> >
<el-option <el-option
@ -270,10 +271,13 @@ export default {
// } // }
arr.forEach((item) => { arr.forEach((item) => {
if (item.itemType == 'checkbox') _form[item.columnName] = [] if (item.itemType == 'checkbox') _form[item.columnName] = []
else if (columnName && columnName === item.columnName) _form[item.columnName] = '1' else if (item.queryType == 'resi_category' && columnName ){
_form[item.columnName] = [columnName]
} else if (columnName && columnName === item.columnName) _form[item.columnName] = '1'
else if (item.itemType == 'inputRange') _form[item.columnName] = { start: '', end: ''} else if (item.itemType == 'inputRange') _form[item.columnName] = { start: '', end: ''}
else _form[item.columnName] = '' else _form[item.columnName] = ''
}) })
console.log('_form----------rrr', _form)
return _form return _form
} }
let itemList = this.formList.map(item => { let itemList = this.formList.map(item => {
@ -289,7 +293,7 @@ export default {
return { return {
...item, ...item,
isChange: this.columnName && this.columnName === item.columnName ? true : false isChange:( item.queryType == 'resi_category' && this.columnName) || this.columnName === item.columnName ? true : false
} }
}) })
let constForm = { let constForm = {
@ -783,13 +787,13 @@ export default {
min-height: 32px; min-height: 32px;
} }
.resi-cell-input { .resi-cell-input {
width: 200px; max-width: 200px;
} }
.resi-cell--daterange { .resi-cell--daterange {
max-width: 235px; max-width: 240px;
} }
.resi-cell-select { .resi-cell-select {
width: 200px; max-width: 200px;
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px; margin-right: 10px;
&-middle { &-middle {

61
src/views/modules/base/community/buildForm.vue

@ -24,6 +24,21 @@
v-model="dataForm.buildingName"> v-model="dataForm.buildingName">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="楼栋编码"
prop="coding"
label-width="150px"
style="display: block">
<el-input class="item_width_2"
maxlength="50"
placeholder="请输入楼栋编码"
v-model="dataForm.coding">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleCode">生成</el-button>
</el-form-item>
<el-form-item label="楼栋类型" <el-form-item label="楼栋类型"
prop="type" prop="type"
label-width="150px" label-width="150px"
@ -73,6 +88,16 @@
:max="9999" :max="9999"
label="总户数"></el-input-number> label="总户数"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="人口数"
style="display: block"
prop="realPerson"
label-width="150px">
<el-input-number class="item_width_4"
v-model="dataForm.realPerson"
:min="0"
:max="9999"
label="人口数"></el-input-number>
</el-form-item>
<el-form-item label="楼长姓名" <el-form-item label="楼长姓名"
prop="buildingLeaderName" prop="buildingLeaderName"
label-width="150px" label-width="150px"
@ -128,6 +153,16 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="楼栋地址"
prop="coordinatePosition"
label-width="150px"
style="display: block">
<!-- <span>{{ dataForm.coordinatePosition }}</span> -->
<el-input class="item_width_1"
placeholder="请选择楼栋地址"
disabled
v-model="dataForm.coordinatePosition" />
</el-form-item>
</el-form> </el-form>
</div> </div>
@ -169,9 +204,13 @@ export default {
totalUnitNum: 1,// totalUnitNum: 1,//
totalFloorNum: 0,// totalFloorNum: 0,//
totalHouseNum: 0,// totalHouseNum: 0,//
realPerson: 0,
buildingLeaderName: '',// buildingLeaderName: '',//
buildingLeaderMobile: '',// buildingLeaderMobile: '',//
type: '',// type: '',//
coordinatePosition: '',
sysCoding: '',
coding: '',
location: '', // location: '', //
longitude: '', // longitude: '', //
latitude: '' // latitude: '' //
@ -199,7 +238,8 @@ export default {
if (row) { if (row) {
this.dataForm = JSON.parse(JSON.stringify(row)) this.dataForm = JSON.parse(JSON.stringify(row))
this.buildingId = this.dataForm.buildingId this.buildingId = this.dataForm.buildingId
this.buildType = this.dataForm.buildingTypeKey // this.buildType = this.dataForm.buildingTypeKey
this.buildType = this.dataForm.type
map.setCenter(new TMap.LatLng(this.dataForm.latitude, this.dataForm.longitude)) map.setCenter(new TMap.LatLng(this.dataForm.latitude, this.dataForm.longitude))
this.setMarker(this.dataForm.latitude, this.dataForm.longitude) this.setMarker(this.dataForm.latitude, this.dataForm.longitude)
@ -226,6 +266,18 @@ export default {
}) })
}, },
async handleCode() {
const { data, code, msg } = await requestPost(
"/gov/org/houseInformation/getBuildingCoding/" + this.dataForm.neighborHoodId);
console.log('data----', data)
console.log('code----', code)
console.log('msg----', msg)
if (msg == "success" && code == 0) {
this.dataForm.coding = data.coding
this.dataForm.sysCoding = data.sysCoding
}
},
async addBuild () { async addBuild () {
if (this.dataForm.buildingLeaderMobile) { if (this.dataForm.buildingLeaderMobile) {
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; // const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
@ -328,12 +380,14 @@ export default {
let { data } = result let { data } = result
if (Array.isArray(data) && data.length > 0) { if (Array.isArray(data) && data.length > 0) {
const { const {
location: { lat, lng } location: { lat, lng },
address
} = data[0] } = data[0]
map.setCenter(new TMap.LatLng(lat, lng)) map.setCenter(new TMap.LatLng(lat, lng))
this.setMarker(lat, lng) this.setMarker(lat, lng)
this.dataForm.latitude = lat this.dataForm.latitude = lat
this.dataForm.longitude = lng this.dataForm.longitude = lng
this.dataForm.coordinatePosition = address
} else { } else {
this.$message.error('未检索到相关位置坐标') this.$message.error('未检索到相关位置坐标')
} }
@ -405,6 +459,9 @@ export default {
totalUnitNum: [ totalUnitNum: [
{ required: true, message: '单元数不能为空', trigger: 'blur' } { required: true, message: '单元数不能为空', trigger: 'blur' }
], ],
coding: [
{ required: true, message: '楼栋编码不能为空', trigger: 'blur' }
]
// totalFloorNum: [ // totalFloorNum: [
// { required: true, message: '', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
// ], // ],

22
src/views/modules/base/community/buildTable.vue

@ -360,11 +360,12 @@ export default {
this.formShow = false this.formShow = false
}, },
handleDetail (row) { async handleDetail (row) {
this.formTitle = '楼栋详情' this.formTitle = '楼栋详情'
this.formShow = true this.formShow = true
const _data = await this.detail(row)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row, this.agencyObj) this.$refs.ref_form.initForm('detail', _data, this.agencyObj)
}) })
}, },
@ -376,11 +377,12 @@ export default {
}) })
}, },
handleEdit (row) { async handleEdit (row) {
this.formTitle = '修改楼栋' this.formTitle = '修改楼栋'
this.formShow = true this.formShow = true
const _data = await this.detail(row)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row, this.agencyObj) this.$refs.ref_form.initForm('edit', _data, this.agencyObj)
}) })
}, },
@ -508,6 +510,18 @@ export default {
this.$message.error(msg) this.$message.error(msg)
} }
}, },
async detail (row) {
const url = "/gov/org/houseInformation/getBuildingDetail/" + row.buildingId
const { data, code, msg } = await requestPost(url)
if (code === 0) {
return data
} else {
this.$message.error(msg)
}
},
// //
async handleExport () { async handleExport () {

95
src/views/modules/base/community/community.vue

@ -131,15 +131,50 @@
class="diy-button--reset" class="diy-button--reset"
@click="resetSearch">重置</el-button> @click="resetSearch">重置</el-button>
</div> </div>
</div> </el-form>
<div class="resi-cell"> </div>
<div class="resi-cell-label">房主手机</div> <div class=div_left_table>
<div class="resi-cell-value"> <build-table v-if="selTreeObj.level==='neighborHood'&&!showRoomTable"
<el-input v-model="ownerPhone" ref="ref_neighTable"
size="small" :staffAgencyId="staffAgencyId"
clearable :showImportBtn="showImportBtn"
placeholder="请输入内容"> :ownerName="ownerName"
</el-input> :ownerPhone="ownerPhone"
:rentFlag="rentFlag"
:purpose="purpose"
:remark="remark"
:updateStartDate="updateStartDate"
:updateEndDate="updateEndDate"
@toNextLevel="toNextLevel"
@refreshTree="refreshTree"></build-table>
<room-table v-if="showRoomTable||selTreeObj.level==='building'"
:staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn"
:ownerName="ownerName"
:ownerPhone="ownerPhone"
:rentFlag="rentFlag"
:purpose="purpose"
:remark="remark"
:updateStartDate="updateStartDate"
:updateEndDate="updateEndDate"
ref="ref_buildingTable"
@refreshTree="refreshTree"></room-table>
<community-table v-if="selTreeObj.level!=='building'&&selTreeObj.level!=='neighborHood'&&!showRoomTable"
@toNextLevel="toNextLevel"
:staffAgencyId="staffAgencyId"
:ownerName="ownerName"
:ownerPhone="ownerPhone"
:rentFlag="rentFlag"
:purpose="purpose"
:remark="remark"
:updateStartDate="updateStartDate"
:updateEndDate="updateEndDate"
ref="ref_communityTable"
@refreshTree="refreshTree"></community-table>
</div>
</div>
</div> </div>
</template> </template>
@ -508,6 +543,7 @@ export default {
} }
</script> </script>
<style> <style>
/* .aui-content > .el-tabs > .el-tabs__content { /* .aui-content > .el-tabs > .el-tabs__content {
padding: 0px; padding: 0px;
@ -528,6 +564,47 @@ export default {
<style lang="scss" scoped > <style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss"; @import "@/assets/scss/modules/visual/communityManage.scss";
@import "@/assets/scss/modules/management/list-main.scss";
</style>
<style lang="scss" scoped >
.div_main {
display: flex;
}
.scrollar {
margin-top: 10px;
}
.div_tree {
flex: 0 0 280px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
overflow-y: hidden;
}
.filter_tree {
overflow-x: auto;
}
// .div_table {
// margin-left: 15px;
// // flex: 1;
// width: calc(100% - 300px);
// background-color: #ffffff;
// border-radius: 5px;
// padding: 10px;
// }
.div_left {
// flex: 1;
width: calc(100% - 300px);
}
.div_left_table {
margin-top: 10px;
margin-left: 15px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
}
</style> </style>

45
src/views/modules/base/community/communityForm.vue

@ -41,6 +41,21 @@
v-model="dataForm.neighborHoodName"> v-model="dataForm.neighborHoodName">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="小区编码"
prop="coding"
label-width="150px"
style="display: block">
<el-input class="item_width_2"
maxlength="50"
placeholder="请输入楼栋编码"
v-model="dataForm.coding">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleCode">生成</el-button>
</el-form-item>
<el-form-item label="关联物业" <el-form-item label="关联物业"
prop="propertyId" prop="propertyId"
label-width="150px" label-width="150px"
@ -62,6 +77,16 @@
size="small" size="small"
@click="handleAddProperty">添加物业</el-button> @click="handleAddProperty">添加物业</el-button>
</el-form-item> </el-form-item>
<el-form-item label="实有楼栋"
style="display: block"
prop="realBuilding"
label-width="150px">
<el-input-number class="item_width_4"
v-model="dataForm.realBuilding"
:min="0"
:max="9999"
label="总户数"></el-input-number>
</el-form-item>
<el-form-item label="详细地址" <el-form-item label="详细地址"
prop="address" prop="address"
label-width="150px" label-width="150px"
@ -181,7 +206,10 @@ export default {
remark: '', //500 remark: '', //500
location: '', // location: '', //
longitude: '', // longitude: '', //
latitude: '' // latitude: '', //
realBuilding: 0,
coding: '',
sysCoding: ''
}, },
propertyFormShow: false, propertyFormShow: false,
@ -285,6 +313,7 @@ export default {
this.formType = type this.formType = type
if (row) { if (row) {
this.dataForm = JSON.parse(JSON.stringify(row)) this.dataForm = JSON.parse(JSON.stringify(row))
this.dataForm.neighborHoodId = this.dataForm.id
this.neighborHoodId = this.dataForm.neighborHoodId this.neighborHoodId = this.dataForm.neighborHoodId
map.setCenter(new TMap.LatLng(this.dataForm.latitude, this.dataForm.longitude)) map.setCenter(new TMap.LatLng(this.dataForm.latitude, this.dataForm.longitude))
this.setMarker(this.dataForm.latitude, this.dataForm.longitude) this.setMarker(this.dataForm.latitude, this.dataForm.longitude)
@ -298,7 +327,16 @@ export default {
await this.loadGrid() await this.loadGrid()
await this.loadProperty() await this.loadProperty()
}, },
async handleCode() {
if (!this.dataForm.gridId) return this.$message.error('请选择网格')
const { data, code, msg } = await requestPost(
"/gov/org/houseInformation/getNeighborHoodCoding/" + this.dataForm.gridId);
if (msg == "success" && code == 0) {
this.dataForm.coding = data.coding
this.dataForm.sysCoding = data.sysCoding
}
},
// //
async loadAgency () { async loadAgency () {
const url = '/epmetuser/customerstaff/staffbasicinfo' const url = '/epmetuser/customerstaff/staffbasicinfo'
@ -489,6 +527,9 @@ export default {
gridId: [ gridId: [
{ required: true, message: '所属网格不能为空', trigger: 'blur' } { required: true, message: '所属网格不能为空', trigger: 'blur' }
], ],
coding: [
{ required: true, message: '小区编码不能为空', trigger: 'blur' }
],
address: [ address: [
{ required: true, message: '详细地址不能为空', trigger: 'blur' } { required: true, message: '详细地址不能为空', trigger: 'blur' }
], ],

21
src/views/modules/base/community/communityTable.vue

@ -356,11 +356,12 @@ export default {
this.formShow = false this.formShow = false
}, },
handleDetail (row) { async handleDetail (row) {
this.formTitle = '小区详情' this.formTitle = '小区详情'
this.formShow = true this.formShow = true
const _data = await this.detail(row)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row, this.agencyObj) this.$refs.ref_form.initForm('detail', _data, this.agencyObj)
}) })
}, },
@ -371,7 +372,18 @@ export default {
this.$refs.ref_form.initForm('add', null, this.agencyObj) this.$refs.ref_form.initForm('add', null, this.agencyObj)
}) })
}, },
async detail (row) {
const url = "/gov/org/houseInformation/neighborhoodDetail/" + row.neighborHoodId
const { data, code, msg } = await requestPost(url)
if (code === 0) {
return data
} else {
this.$message.error(msg)
}
},
// //
async handleYhymInfo () { async handleYhymInfo () {
this.yhymLoading = true this.yhymLoading = true
@ -400,11 +412,12 @@ export default {
} }
}, },
handleEdit (row) { async handleEdit (row) {
this.formTitle = '修改小区' this.formTitle = '修改小区'
this.formShow = true this.formShow = true
const _data = await this.detail(row)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row, this.agencyObj) this.$refs.ref_form.initForm('edit', _data, this.agencyObj)
}) })
}, },

49
src/views/modules/base/community/roomForm.vue

@ -11,7 +11,7 @@
<el-form-item label="所属楼栋" <el-form-item label="所属楼栋"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<span>{{ dataForm.neighborHoodName }}{{dataForm.buildingName}}</span> <span>{{ agencyObj.neighborHoodName }}-{{agencyObj.label}}</span>
</el-form-item> </el-form-item>
<el-form-item label="单元号" <el-form-item label="单元号"
@ -39,7 +39,21 @@
v-model="dataForm.doorName"> v-model="dataForm.doorName">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="formType != 'detail'" label="房屋编码"
prop="coding"
label-width="150px"
style="display: block">
<el-input class="item_width_2"
maxlength="50"
placeholder="请输入楼栋编码"
v-model="dataForm.coding">
</el-input>
<el-button style="margin-left: 10px"
type="primary"
size="small"
@click="handleCode">生成</el-button>
</el-form-item>
<div v-if="formType === 'detail'"> <div v-if="formType === 'detail'">
<el-form-item label="房屋编码" <el-form-item label="房屋编码"
prop="houseCode" prop="houseCode"
@ -59,6 +73,16 @@
target="_blank">下载</a> target="_blank">下载</a>
</div> </div>
</div> </div>
<!-- <el-form-item label="居住人数"
style="display: block"
prop="realPerson"
label-width="150px">
<el-input-number class="item_width_4"
v-model="dataForm.realPerson"
:min="0"
:max="9999"
label="居住人数"></el-input-number>
</el-form-item> -->
<el-form-item label="房屋类型" <el-form-item label="房屋类型"
prop="houseType" prop="houseType"
label-width="150px" label-width="150px"
@ -184,7 +208,10 @@ export default {
ownerPhone: '', // ownerPhone: '', //
ownerName: '', // ownerName: '', //
ownerIdCard: '', // ownerIdCard: '', //
remark: '' remark: '',
// realPerson: 0,
coding: '',
sysCoding: ''
}, },
keyWords: '', keyWords: '',
@ -203,6 +230,7 @@ export default {
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj this.agencyObj = agencyObj
this.formType = type this.formType = type
console.log('agencyObj-----', agencyObj)
if (row) { if (row) {
this.houseId = row.houseId this.houseId = row.houseId
@ -217,7 +245,7 @@ export default {
// this.rentFlag = parseInt(this.dataForm.rentFlagKey) // this.rentFlag = parseInt(this.dataForm.rentFlagKey)
} else { } else {
this.dataForm.neighborHoodId = this.agencyObj.neighborHoodId this.dataForm.neighborHoodId = this.agencyObj.neighborHoodId
this.dataForm.buildingId = this.agencyObj.id this.dataForm.buildingId = this.agencyObj.id
} }
@ -264,6 +292,16 @@ export default {
this.$message.error(msg) this.$message.error(msg)
} }
}, },
async handleCode() {
if (!this.dataForm.buildingUnitId) return this.$message.error('请选择单元')
const { data, code, msg } = await requestPost(
"/gov/org/houseInformation/getHouseCoding/" + this.dataForm.buildingUnitId);
if (msg == "success" && code == 0) {
this.dataForm.coding = data.coding
this.dataForm.sysCoding = data.sysCoding
}
},
async handleComfirm () { async handleComfirm () {
this.btnDisable = true this.btnDisable = true
@ -382,6 +420,9 @@ export default {
doorName: [ doorName: [
{ required: true, message: '门牌号不能为空', trigger: 'blur' } { required: true, message: '门牌号不能为空', trigger: 'blur' }
], ],
coding: [
{ required: true, message: '房屋编码不能为空', trigger: 'blur' }
],
houseType: [ houseType: [
{ required: true, message: '房屋类型不能为空', trigger: 'blur' } { required: true, message: '房屋类型不能为空', trigger: 'blur' }
], ],

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

@ -2188,7 +2188,12 @@ export default {
document.getElementById("con").innerHTML = '当前点击坐标为:<span id="pos"></span>' document.getElementById("con").innerHTML = '当前点击坐标为:<span id="pos"></span>'
var position = document.getElementById("pos"); var position = document.getElementById("pos");
var center = new window.TMap.LatLng(this.latitude, this.longitude);// if(this.latitude === null || this.latitude === "" || this.longitude === null || this.longitude === ""){
var center = new window.TMap.LatLng(36.116796, 120.339959);
}else {
var center = new window.TMap.LatLng(this.latitude, this.longitude);//
}
// //
var map = new window.TMap.Map("con", { var map = new window.TMap.Map("con", {
center: center center: center

10
src/views/modules/cabaseinfo/caloudong.vue

@ -26,6 +26,13 @@
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所处位置" prop="buildingAddr">
<el-input
v-model="dataForm.buildingAddr"
placeholder="所处位置"
clearable
></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button> <el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item> </el-form-item>
@ -176,7 +183,8 @@ export default {
dataForm: { dataForm: {
buildingName: "", buildingName: "",
communityName: "", communityName: "",
gridId:"" gridId:"",
buildingAddr:""
}, },
caLouDongOptions:[], caLouDongOptions:[],
optionsG:[] optionsG:[]

10
src/views/modules/cabaseinfo/capingfang.vue

@ -26,6 +26,13 @@
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所处位置" prop="buildingAddr">
<el-input
v-model="dataForm.buildingAddr"
placeholder="所处位置"
clearable
></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button> <el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item> </el-form-item>
@ -176,7 +183,8 @@ export default {
dataForm: { dataForm: {
buildingName: "", buildingName: "",
communityName: "", communityName: "",
gridId:"" gridId:"",
buildingAddr:""
}, },
caLouDongOptions:[], caLouDongOptions:[],
optionsG:[] optionsG:[]

10
src/views/modules/cabaseinfo/carental.vue

@ -33,6 +33,13 @@
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="房屋地址" prop="houseAddress">
<el-input
v-model="dataForm.houseAddress"
placeholder="房屋地址"
clearable
></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button> <el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item> </el-form-item>
@ -177,7 +184,8 @@ export default {
houseName: "", houseName: "",
residentName: "", residentName: "",
renterName: "", renterName: "",
gridId:"" gridId:"",
houseAddress:""
}, },
caLouDongOptions:[], caLouDongOptions:[],
optionsG:[] optionsG:[]

10
src/views/modules/cabaseinfo/caresident.vue

@ -29,6 +29,13 @@
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="现居住地址" prop="curliveAddressDetail">
<el-input
v-model="dataForm.curliveAddressDetail"
placeholder="现居住地址"
clearable
></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button> <el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item> </el-form-item>
@ -189,7 +196,8 @@ export default {
idCard: "", idCard: "",
residentName: "", residentName: "",
telephone: "", telephone: "",
gridId:"" gridId:"",
curliveAddressDetail:""
}, },
caLouDongOptions:[], caLouDongOptions:[],
optionsG:[] optionsG:[]

10
src/views/modules/cabaseinfo/carotators.vue

@ -29,6 +29,13 @@
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="现居住地址" prop="curliveAddressDetail">
<el-input
v-model="dataForm.curliveAddressDetail"
placeholder="现居住地址"
clearable
></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button> <el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item> </el-form-item>
@ -165,7 +172,8 @@ export default {
idCard: "", idCard: "",
residentName: "", residentName: "",
telephone: "", telephone: "",
gridId:"" gridId:"",
curliveAddressDetail:""
}, },
caLouDongOptions:[], caLouDongOptions:[],
optionsG:[] optionsG:[]

233
src/views/modules/cabaseinfo/wghSjxxb.vue

@ -0,0 +1,233 @@
<template>
<div class="mod-axis__caLoudong}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="事件来源" prop="wgymc">
<el-input
v-model="dataForm.wgymc"
placeholder="网格员名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="所属街道" prop="ssjdbq">
<el-input
v-model="dataForm.ssjdbq"
placeholder="所属街道"
clearable
></el-input>
</el-form-item>
<el-form-item label="所属社区" prop="sssqbq">
<el-input
v-model="dataForm.sssqbq"
placeholder="所属社区"
clearable
></el-input>
</el-form-item>
<el-form-item label="核查意见" prop="hcyj">
<el-input
v-model="dataForm.hcyj"
placeholder="核查意见"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card shadow="never" class="aui-card--fill">
<el-table
v-loading="dataListLoading"
:data="dataList"
border
@selection-change="dataListSelectionChangeHandle"
style="width: 100%"
>
<el-table-column
type="selection"
header-align="center"
align="center"
width="50"
></el-table-column>
<el-table-column
prop="wgymc"
label="网格员名称"
header-align="center"
align="center"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="ssjdbq"
label="所属街道"
header-align="center"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column
prop="sssqbq"
label="所属社区"
header-align="center"
align="center"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="hcyj"
label="核查意见"
header-align="center"
align="center"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="hcsj"
label="核查时间"
header-align="center"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column
:show-overflow-tooltip="true"
prop="sjms"
label="事件描述"
header-align="center"
align="center">
</el-table-column>
<el-table-column :label="$t('handle')" fixed="right" align="center" width="100">
<template slot-scope="row">
<el-button
type="text"
class="div-table-button--detail"
size="small"
@click="getDetailById(row)"
>查看</el-button>
<el-button
type="text"
class="div-table-button--detail"
size="small"
@click="jumplink">去处置</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
>
</el-pagination>
</el-card>
<el-dialog
title="事件信息详情"
:visible.sync="dialogVisible"
width="37%"
:before-close="handleClose">
<el-form ref="form" :model="detailForm" label-width="100px">
<el-form-item label="网格员名称:">
<el-input
style="width:300px;margin-left:20px"
v-model="detailForm.wgymc"
:disabled="true">
</el-input>
</el-form-item>
<el-form-item label="所属街道:">
<el-input
style="width:300px;margin-left:20px"
v-model="detailForm.ssjdbq"
:disabled="true">
</el-input>
</el-form-item>
<el-form-item label="所属社区:">
<el-input
style="width:300px;margin-left:20px"
v-model="detailForm.sssqbq"
:disabled="true">
</el-input>
</el-form-item>
<el-form-item label="核查意见:">
<el-input
type="textarea"
style="width:300px;margin-left:20px"
v-model="detailForm.hcyj"
:disabled="true">
</el-input>
</el-form-item>
<el-form-item label="核查时间:">
<el-input
style="width:300px;margin-left:20px"
v-model="detailForm.hcsj"
:disabled="true">
</el-input>
</el-form-item>
<el-form-item label="事件描述:">
<el-input
style="width:300px;margin-left:20px"
v-model="detailForm.sjms"
:disabled="true">
</el-input>
</el-form-item>
<el-form-item>
<el-button style="margin-left:100px" @click="dialogVisible = false" type="primary"> </el-button>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
import mixinViewModule from "@/mixins/view-post";
export default {
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: "/opendata/wghSjxx/todo/wghSjxxPage",
getDataListIsPage: true,
deleteURL: "",
deleteIsBatch: true,
},
dataForm: {
wgymc: "",
ssjdbq: "",
sssqbq:"",
hcyj:""
},
detailForm:{
wgymc: "",
ssjdbq: "",
sssqbq:"",
hcyj:"",
hcsj:"",
sjms:"",
},
optionsG:[],
dialogVisible: false
};
},
methods:{
getDetailById(row){
this.dialogVisible = true
this.$http.post(`/opendata/wghSjxx/getWghSjxxDetail`,{
recid:row.row.recid
}).then(resp => {
this.detailForm = resp.data.data
}).catch(error => {
this.$message.error(error)
})
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
dialogVisible = false
})
.catch(_ => {});
},
jumplink(){
window.open('http://120.221.72.15:8089/sbwgh/bizsys/login.htm','_blank')
}
},
};
</script>

9
src/views/modules/plugins/change/resideath.vue

@ -442,7 +442,14 @@ export default {
userId: this.rowData.icResiUserId, userId: this.rowData.icResiUserId,
joinReason: this.blacklistReason, joinReason: this.blacklistReason,
welfareFlag: this.welfareFlag, welfareFlag: this.welfareFlag,
deathDate: this.deathDate deathDate: this.deathDate
}
if (this.deathDate === '') {
this.$message({
message: '请选择死亡日期',
type:'warning'
})
return false
} }
this.$http.post('/epmetuser/rentDeath/save', params).then(({ data: res }) => { this.$http.post('/epmetuser/rentDeath/save', params).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {

174
src/views/modules/plugins/point/icpointNoice.vue

@ -0,0 +1,174 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<el-form
ref="ref_form1"
:inline="true"
:model="formData"
:rules="dataRule"
class="form"
>
<el-form-item
label="通知渠道"
prop="isSelChannel"
label-width="150px"
style="display: block"
>
<span>小程序通知</span>
<!-- <el-checkbox v-model="formData.isSelChannel"
key="0"
label="0">小程序通知</el-checkbox> -->
<!-- <el-checkbox-group v-model="formData.channel">
<el-checkbox key="1"
label="1">小程序通知</el-checkbox>
<el-checkbox key="2"
label="2">短信通知</el-checkbox>
</el-checkbox-group> -->
</el-form-item>
<el-form-item
label="通知内容"
prop="content"
label-width="150px"
style="display: block"
>
<el-input
class="item_width_1"
type="textarea"
maxlength="500"
show-word-limit
:autosize="{ minRows: 10, maxRows: 15 }"
clearable
placeholder="请输入通知内容"
v-model="formData.content"
></el-input>
</el-form-item>
</el-form>
</div>
<div class="form_div_btn">
<el-button size="small" @click="handleCancle"> </el-button>
<el-button
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"
> </el-button
>
</div>
</div>
</template>
<script>
import { Loading } from "element-ui"; // Loading
import { requestPost } from '@/js/dai/request'
let loading; //
export default {
data() {
return {
btnDisable: false,
formData: {
origin: null,
isSelChannel: false,
channel: [],
content: "",
},
};
},
props:{
noticeOrigin:{
type:String,
default:null
}
},
components: {},
mounted() {
this.formData.origin = this.noticeOrigin
},
methods: {
handleCancle() {
this.$emit("diaClose");
},
async handleComfirm() {
this.formData.channel = ["0"];
if (!this.formData.content) {
this.$message({
type: "warning",
message: "请填写通知内容",
});
return false;
}
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
}, 5000);
let url = "";
url = "/epmetuser/icNotice/sendPointNotice";
const { data, code, msg } = await requestPost(url, this.formData);
if (code === 0) {
this.$message({
type: "success",
message: "操作成功",
});
this.resetData();
this.btnDisable = false;
this.handleCancle();
} else {
this.btnDisable = false;
this.$message.error(msg);
}
},
resetData() {
this.formData = {
origin: null,
isSelChannel: false,
channel: [],
content: "",
};
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
computed: {
dataRule() {
return {
channel: [
{ required: true, message: "通知渠道不能为空", trigger: "blur" },
],
content: [
{ required: true, message: "通知内容不能为空", trigger: "blur" },
],
};
},
},
};
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/epidemic.scss";
</style>

464
src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue

@ -0,0 +1,464 @@
<template>
<div style="height: 600px; overflow: auto; padding: 20px" class="form-class">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="120px"
>
<el-form-item label="所属组织名称" prop="orgId">
<el-select
v-model="dataForm.orgId"
placeholder="所属组织名称"
@change="orgChangeHandle"
:disabled="dialogTitle == '查看'"
>
<el-option
ref="org"
v-for="item in organizationList"
:key="item.orgId"
:label="item.orgName"
:value="item.orgId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="核酸检测点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="核酸检测点名称"
:disabled="dialogTitle == '查看'"
></el-input>
</el-form-item>
<el-form-item label="服务时间" prop="serveTime">
<el-input
v-model="dataForm.serveTime"
type="textarea"
:rows="2"
placeholder="请输入服务时间,如:每日开放 上午:8:00-11:30 ;下午:13:00-17:00"
:disabled="dialogTitle == '查看'"
></el-input>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
placeholder="咨询电话"
:change="check_num()"
:disabled="dialogTitle == '查看'"
></el-input>
</el-form-item>
<el-form-item label="检测点地址" prop="address">
<el-input
v-model="dataForm.address"
placeholder="例:青岛市时代国际广场"
style="width:65%;"
></el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
>
</el-form-item>
<el-form-item
label="位置坐标"
prop="longitude"
style="display: block"
class="position_label"
>
<div>
<!-- <el-input
class="item_width_4"
maxlength="50"
placeholder="例:青岛市时代国际广场"
v-model="keyWords"
style="width: 200px"
:disabled='dialogTitle == "查看"'
>
</el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
> -->
<div
id="map_add"
class="div_map"
style="width: 500px; height: 300px; margin-top: 20px"
></div>
<div style="margin-top: 10px" v-show="false">
<span>经度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude"
disabled
style="width: 200px; margin-left: 20px"
>
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude"
disabled
style="width: 200px; margin-left: 20px"
>
</el-input>
</div>
</div>
</el-form-item>
</el-form>
<div class="submit">
<el-button @click="closeSubmit">{{ $t("cancel") }}</el-button>
<el-button
v-if="dialogTitle != '查看'"
type="primary"
@click="dataFormSubmitHandle()"
>{{ $t("confirm") }}</el-button
>
</div>
</div>
</template>
<script>
import debounce from "lodash/debounce";
var map;
var search;
var markers;
var geocoder;
var infoWindowList;
export default {
data() {
return {
dataForm: {
id: "",
customerId: "",
orgId: "",
orgName: "",
pid: "",
pids: "",
name: "",
serveTime: "",
mobile: "",
address: "",
longitude: '',
latitude: '',
},
keyWords: null,
organizationList: [],
};
},
computed: {
dataRule() {
return {
customerId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
orgId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
orgName: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
name: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
serveTime: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
mobile: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
address: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
longitude: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
latitude: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
};
},
},
created() {
this.getFormInfo();
},
props: {
dialogTitle: {
type: String,
default: "",
},
},
methods: {
closeSubmit() {
this.$emit("closeDialog");
},
orgChangeHandle(val) {
for (var i = 0; i < this.organizationList.length; i++) {
if (this.organizationList[i].orgId === val) {
this.dataForm.orgName = this.organizationList[i].orgName;
return false;
}
}
},
// init
initMap() {
let { latitude, longitude } = this.$store.state.user;
//
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
console.log(latitude,longitude);
var center = new window.TMap.LatLng(latitude, longitude);
// map TMap.Map()
map = new window.TMap.Map(document.getElementById("map_add"), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45, //
});
search = new window.TMap.service.Search({ pageSize: 10 });
//
markers = new TMap.MultiMarker({
map: map,
geometries: [],
});
infoWindowList = Array(10);
geocoder = new TMap.service.Geocoder(); //
//
map.on("panend", () => {
this.handleMoveCenter();
});
// this.handleMoveCenter()
this.convert();
},
handleMoveCenter() {
//
const center = map.getCenter();
const lat = center.getLat();
const lng = center.getLng();
this.dataForm.latitude = lat;
this.dataForm.longitude = lng;
this.setMarker(lat, lng);
this.convert(lat, lng);
},
//
handleSearchMap() {
infoWindowList.forEach((infoWindow) => {
infoWindow.close();
});
infoWindowList.length = 0;
markers.setGeometries([]);
//
search
.searchRectangle({
keyword: this.dataForm.address,
bounds: map.getBounds(),
})
.then((result) => {
let { data } = result;
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng },
} = data[0];
map.setCenter(new TMap.LatLng(lat, lng));
this.setMarker(lat, lng);
this.dataForm.latitude = lat;
this.dataForm.longitude = lng;
this.convert();
} else {
this.$message.error("未检索到相关位置坐标");
}
});
},
convert(lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location;
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(
this.dataForm.latitude,
this.dataForm.longitude
);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: "main", //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.dataForm.address =
this.dataForm.address !== "" &&
this.dataForm.address !== null &&
(this.dataForm.longitude === "" || this.dataForm.longitude === null)
? this.dataForm.address
: result.result.address;
//
console.log(this.dataForm.address);
});
},
setMarker(lat, lng) {
markers.setGeometries([]);
markers.add([
{
id: "4",
styleId: "marker",
position: new TMap.LatLng(lat, lng),
properties: {
title: "marker4",
},
},
]);
},
//
getFormInfo() {
this.$http
.post(`/gov/org/agency/communityListByCustomerId`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.organizationList = res.data;
})
.catch(() => {});
},
init() {
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
} else {
this.initMap();
}
});
},
//
getInfo() {
this.$http
.get(`/epmetuser/icPointNucleicMonitoring/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
this.initMap();
})
.catch(() => {});
},
//
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](
"/epmetuser/icPointNucleicMonitoring/",
this.dataForm
)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.$emit("refreshDataList");
this.closeSubmit();
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
//
check_num: function () {
this.dataForm.mobile = this.dataForm.mobile.replace(
/[^\a-\z\A-\Z0-9]/g,
""
);
},
},
};
</script>
<style scoped>
.position_label >>> .el-form-item__label::before {
color: #fff !important;
}
.submit {
text-align: center;
margin: auto;
}
.form-class .el-input {
width: 75%;
}
.form-class .el-textarea {
width: 75% !important;
}
</style>

542
src/views/modules/plugins/point/icpointnucleicmonitoring.vue

@ -0,0 +1,542 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<el-form-item label="所属组织名称" prop="orgName" label-width="130px">
<el-cascader
ref="org"
v-model="orgIds"
:options="organizationList"
:props="{ checkStrictly: true, multiple: false, emitPath: true }"
style="width: 200px"
clearable
@change="orgChangeHandle"
>
</el-cascader>
</el-form-item>
<el-form-item label="核酸检测点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="核酸检测点名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
placeholder="咨询电话"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
class="diy-button--search"
size="small"
@click="getDataList()"
>{{ $t("query") }}</el-button
>
</el-form-item>
<el-form-item>
<el-button size="small" class="diy-button--reset" @click="resetSearch"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="div_table">
<div class="exportBtn">
<el-button
class="diy-button--add"
type="primary"
size="small"
@click="addOrUpdateHandle('', '新增检测点')"
>{{ $t("add") }}</el-button
>
<el-button
style="margin-left: 10px"
class="diy-button--export"
size="small"
@click="handleExportModule()"
>下载模板</el-button
>
<el-upload
style=""
ref="upload"
:multiple="false"
:show-file-list="false"
:before-upload="
(file) => {
beforeUpload(file);
}
"
action=""
accept=".xls,.xlsx"
:http-request="
() => {
uploadFile();
}
"
>
<el-button
style="margin-left: 10px"
size="small"
class="diy-button--delete"
>导入</el-button
>
</el-upload>
<el-button
style="float: left; margin-left: 10px"
class="diy-button--reset"
size="small"
@click="handleExport"
>导出</el-button
>
<!--<el-button class="diy-button&#45;&#45;reset" style="float:left;margin-left:10px"-->
<!--size="small" @click="exportHandle()">{{ $t('export') }}</el-button>-->
<el-button
style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
v-if="noticeVisible"
>发送通知</el-button
>
</div>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
:row-key="row => { return row.id.toString() }"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%; height: 564px"
><el-table-column
label="序号"
header-align="center"
align="center"
type="index"
width="50"
></el-table-column>
<el-table-column
prop="orgName"
label="所属组织名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="name"
label="核酸检测点名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="serveTime"
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="address"
label="检测点地址"
header-align="center"
align="center"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="操作"
header-align="center"
align="center"
width="150"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
class="div-table-button--detail"
@click="addOrUpdateHandle(scope.row.id, '查看')"
>{{ "查看" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--edit"
@click="addOrUpdateHandle(scope.row.id, '修改')"
>{{ scope.row.longitude === null ? "待完善" : "修改" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--delete--noline"
@click="handleDelete(scope.row.id)"
>{{ $t("delete") }}</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog
:visible.sync="addOrUpdateVisible"
:title="dialogTitle"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
width="850px"
top="5vh"
custom-class="dialog-h"
>
<add-or-update
ref="addOrUpdate"
@refreshDataList="getDataList"
@closeDialog="closeDialog"
:dialogTitle="dialogTitle"
></add-or-update>
</el-dialog>
<!-- 发送通知弹出框 -->
<el-dialog
:visible.sync="sendNoticeFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="发送通知"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose"
:destroy-on-close="true"
>
<icpoint-noice
ref="ref_sendnotice"
@diaClose="diaClose"
:noticeOrigin="noticeOrigin"
></icpoint-noice>
</el-dialog>
</div>
</template>
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./icpointnucleicmonitoring-add-or-update";
import icpointNoice from "./icpointNoice";
import { requestPost } from "@/js/dai/request";
export default {
mixins: [mixinViewModule],
data() {
return {
dataForm: {
name: "",
mobile: "",
orgId: "",
},
organizationList: [],
orgIds: [],
dialogTitle: "",
sendNoticeFormShow: false,
noticeVisible: false,
noticeOrigin: "3",
pageSize: 20,
pageNo: 0,
total: 0,
dataListLoading:false
};
},
components: {
AddOrUpdate,
icpointNoice,
},
created() {
this.noticeFun();
this.getFormInfo();
},
methods: {
async loadTable() {
this.dataListLoading = true;
const url = "/epmetuser/icPointNucleicMonitoring/page";
let params = {
limit: this.pageSize,
page: this.pageNo,
};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
console.log(data.list);
this.dataList = data.list;
this.total = data.total;
} else {
this.$message.error(msg);
}
this.dataListLoading = false;
},
handleSizeChange(val) {
this.pageSize = val;
this.pageNo = 1;
this.loadTable();
},
handleCurrentChange(val) {
this.pageNo = val;
this.loadTable();
},
async handleDelete(id) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteNat(id);
})
.catch((err) => {
if (err == "cancel") {
}
});
},
async deleteNat(id) {
const url = "/epmetuser/icPointNucleicMonitoring/delete";
let params = [id];
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "删除成功",
});
this.getDataList();
} else {
this.$message.error(msg);
}
},
//
async handleExport() {
let title = "核酸检测点";
const url = "/epmetuser/icPointNucleicMonitoring/point-export";
app.ajax.exportFilePost(
url,
this.dataForm,
(data, rspMsg) => {
this.download(data, title + ".xlsx");
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
resetSearch() {
this.dataForm = {
name: "",
mobile: "",
orgId: "",
};
this.pageNo = 1;
this.orgIds = [];
},
//
handleSendNotice() {
this.sendNoticeFormShow = true;
},
//
diaClose() {
this.sendNoticeFormShow = false;
},
// /
addOrUpdateHandle(id, title) {
this.dialogTitle = title;
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id;
this.$refs.addOrUpdate.init();
});
this.addOrUpdateVisible = true;
},
//
closeDialog() {
this.addOrUpdateVisible = false;
this.dialogTitle = "";
},
//
getFormInfo() {
this.$http
.post(`/gov/org/agency/getOrgTreeListByCustomerId`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.organizationList = res.data;
this.deleteChildren(this.organizationList);
})
.catch(() => {});
},
//
noticeFun() {
this.$http
.post(`/epmetuser/icPointNucleicMonitoring/getShowType`)
.then(({ data: res }) => {
if (res.code === 0 && res.data) {
this.noticeVisible = true;
}
})
.catch(() => {});
},
deleteChildren(arr) {
let childs = arr;
for (let i = childs.length; i--; i > 0) {
if (childs[i].children) {
if (childs[i].children.length) {
this.deleteChildren(childs[i].children);
} else {
delete childs[i].children;
}
}
}
return arr;
},
orgChangeHandle() {
this.dataForm.orgId = this.orgIds[this.orgIds.length - 1];
console.log(this.dataForm);
},
handleExportModule() {
let title = "核酸检测点模板";
let url = "/epmetuser/icPointNucleicMonitoring/exporttemplate";
let params = {};
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + ".xls");
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
download(data, fileName) {
if (!data) {
return;
}
var csvData = new Blob([data]);
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, fileName);
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
var url = window.URL.createObjectURL(csvData);
a.href = url;
a.download = fileName;
a.click();
a.remove();
window.URL.revokeObjectURL(url);
}
},
//
beforeUpload(file) {
this.files = file;
const isText = file.type === "application/vnd.ms-excel";
const isTextComputer =
file.type ===
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
if (!isText && !isTextComputer) {
this.$message.error("请选择正确格式的文件");
this.files = null;
this.fileName = "";
return false;
} else {
this.fileName = file.name;
return true;
}
},
async uploadFile() {
if (this.fileName == "") {
this.$message.warning("请选择要上传的文件!");
return false;
}
this.$message({
showClose: true,
message: "导入中,请到系统管理-导入记录中查看进度",
duration: 0,
});
//
this.$refs["upload"].clearFiles();
let url = "";
let fileFormData = new FormData();
fileFormData.append("file", this.files); //filenamefiletest.zip
url = "/epmetuser/icPointNucleicMonitoring/pointImport";
window.app.ajax.post2(
url,
fileFormData,
(data, rspMsg) => {
if (data.code === 0 && data.msg == "success") {
// this.$message.success('')
} else {
// this.$message({
// showClose: true,
// message: rspMsg,
// duration: 0,
// type: "error"
// })
// this.$message.error(rspMsg)
}
this.loadTable();
},
(rspMsg, data) => {},
{ headers: { "Content-Type": "multipart/form-data" } }
);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManage.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.exportBtn {
display: flex;
align-items: center;
margin-bottom: 20px;
margin-top: 10px;
margin-left: 10px;
}
.div_left_table {
margin-top: 10px;
margin-left: 15px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
}
.dialog-h >>> .el-dialog__body {
overflow: scroll;
}
</style>

601
src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue

@ -0,0 +1,601 @@
<template>
<div style="height: 600px; overflow: auto; padding: 20px" class="form-class">
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()"
label-width="120px"
>
<!--<el-form-item label="所属组织名称" prop="orgName">-->
<!--<el-select v-model="dataForm.orgName" placeholder="所属组织名称">-->
<!--<el-option-->
<!--v-for="item in organizationList"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"-->
<!--&gt;-->
<!--</el-option>-->
<!--</el-select>-->
<!--</el-form-item>-->
<el-form-item label="疫苗接种点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="疫苗接种点名称"
:disabled="dialogTitle == '查看'"
></el-input>
</el-form-item>
<el-form-item
label="接种时间"
:class="dataForm.noAvailableVaccines != '2' ? '' : 'time-class'"
>
<div class="data-block">
<div style="width: 30%">
<el-date-picker
v-model="dataForm.inoculationDate"
value-format="yyyy-MM-dd"
type="date"
:clearable="false"
placeholder="选择日期"
:disabled="dialogTitle == '查看'"
>
</el-date-picker>
</div>
<div class="time-block">
<div>
<span>上午</span>
<el-time-picker
is-range
v-model="morningTime"
format="HH:mm"
value-format="HH:mm"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="startTimeChange"
:disabled="dialogTitle == '查看'"
:clearable="false"
:editable="false"
style="width: 56%"
>
</el-time-picker>
</div>
<div>
<span>下午</span>
<el-time-picker
is-range
v-model="afterTime"
format="HH:mm"
value-format="HH:mm"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="endTimeChange"
:disabled="dialogTitle == '查看'"
:clearable="false"
:editable="false"
style="width: 56%"
>
</el-time-picker>
</div>
</div>
</div>
</el-form-item>
<el-form-item label="" prop="noAvailableVaccines">
<el-checkbox
v-model="dataForm.noAvailableVaccines"
true-label="1"
false-label="2"
:disabled="dialogTitle == '查看'"
>暂无疫苗</el-checkbox
>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
:disabled="dialogTitle == '查看'"
placeholder="咨询电话"
></el-input>
</el-form-item>
<el-form-item label="接种点地址" prop="address">
<el-input
v-model="dataForm.address"
placeholder="例:青岛市时代国际广场"
style="width: 65%"
></el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
>
</el-form-item>
<el-form-item
label="位置坐标"
class="position_label"
prop="longitude"
style="display: block"
>
<div>
<!-- <el-input
class="item_width_4"
maxlength="50"
placeholder="例:青岛市时代国际广场"
v-model="keyWords"
style="width: 200px"
:disabled='dialogTitle == "查看"'
>
</el-input>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleSearchMap"
>查询</el-button
> -->
<div
id="map_add"
class="div_map"
style="width: 500px; height: 300px; margin-top: 20px"
></div>
<div style="margin-top: 10px" v-show="false">
<span>经度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入经度"
v-model="dataForm.longitude"
disabled
style="width: 200px; margin-left: 20px"
>
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="item_width_3"
maxlength="50"
placeholder="请输入纬度"
v-model="dataForm.latitude"
disabled
style="width: 200px; margin-left: 20px"
>
</el-input>
</div>
</div>
</el-form-item>
</el-form>
<div class="submit">
<el-button @click="closeSubmit">{{ $t("cancel") }}</el-button>
<el-button
v-if="dialogTitle != '查看'"
type="primary"
@click="dataFormSubmitHandle()"
>{{ $t("confirm") }}</el-button
>
</div>
</div>
</template>
<script>
import debounce from "lodash/debounce";
var map;
var search;
var markers;
var geocoder;
var infoWindowList;
export default {
data() {
return {
visible: false,
dataForm: {
id: "",
customerId: "",
orgId: "",
orgName: "",
pid: "",
pids: "",
name: "",
inoculationDate: "",
moStartTime: "",
moEndTime: "",
afStartTime: "",
afEndTime: "",
noAvailableVaccines: "1",
mobile: "",
address: "",
longitude: "",
latitude: "",
},
keyWords: null,
// organizationList: [],
morningTime: null,
afterTime: null,
};
},
computed: {
dataRule() {
return {
customerId: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
name: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
noAvailableVaccines: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
mobile: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
address: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
longitude: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
latitude: [
{
required: true,
message: this.$t("validate.required"),
trigger: "blur",
},
],
};
},
},
props: {
dialogTitle: {
type: String,
default: "",
},
},
methods: {
startTimeChange() {
if (Array.isArray(this.morningTime) && this.morningTime.length > 0) {
let hour_0 = Number(this.morningTime[0].substring(0, 2));
let hour_1 = Number(this.morningTime[1].substring(0, 2));
let minute_0 = Number(this.morningTime[0].substring(3, 5));
let minute_1 = Number(this.morningTime[1].substring(3, 5));
let second_0 = Number(this.morningTime[0].substring(6, 8));
let second_1 = Number(this.morningTime[1].substring(6, 8));
if (hour_0 > 12 || hour_1 > 12) {
this.$message.error("请选择00:00-12:00时间段的时间");
this.morningTime = null;
return false;
}
if (hour_0 == 12) {
if (minute_0 > 0 || second_0 > 0) {
this.$message.error("请选择00:00-12:00时间段的时间");
this.morningTime = null;
return false;
}
}
if (hour_1 == 12) {
if (minute_1 > 0 || second_1 > 0) {
this.$message.error("请选择00:00-12:00时间段的时间");
this.morningTime = null;
return false;
}
}
this.dataForm.moStartTime = this.morningTime[0];
this.dataForm.moEndTime = this.morningTime[1];
}
},
endTimeChange() {
if (Array.isArray(this.afterTime) && this.afterTime.length > 0) {
let hour_0 = Number(this.afterTime[0].substring(0, 2));
let hour_1 = Number(this.afterTime[1].substring(0, 2));
let minute_0 = Number(this.afterTime[0].substring(3, 5));
let minute_1 = Number(this.afterTime[1].substring(3, 5));
let second_0 = Number(this.afterTime[0].substring(6, 8));
let second_1 = Number(this.afterTime[1].substring(6, 8));
if (hour_0 < 12 || hour_1 < 12) {
this.$message.error("请选择12:01-23:59时间段的时间");
this.afterTime = null;
return false;
}
if (hour_0 == 12) {
if (minute_0 == 0 && second_0 == 0) {
this.$message.error("请选择12:01-23:59时间段的时间");
this.afterTime = null;
return false;
}
}
if (hour_1 == 12) {
if (minute_1 == 0 && second_1 == 0) {
this.$message.error("请选择12:01-23:59时间段的时间");
this.afterTime = null;
return false;
}
}
this.dataForm.afStartTime = this.afterTime[0];
this.dataForm.afEndTime = this.afterTime[1];
}
},
closeSubmit() {
this.$emit("closeDialog");
},
// init
initMap() {
let { latitude, longitude } = this.$store.state.user;
//
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
console.log(latitude, longitude);
var center = new window.TMap.LatLng(latitude, longitude);
// map TMap.Map()
map = new window.TMap.Map(document.getElementById("map_add"), {
center: center, //
zoom: 17.2, //
pitch: 43.5, //
rotation: 45, //
});
search = new window.TMap.service.Search({ pageSize: 10 });
//
markers = new TMap.MultiMarker({
map: map,
geometries: [],
});
infoWindowList = Array(10);
geocoder = new TMap.service.Geocoder(); //
//
map.on("panend", () => {
this.handleMoveCenter();
});
// this.handleMoveCenter()
this.convert();
},
handleMoveCenter() {
//
const center = map.getCenter();
const lat = center.getLat();
const lng = center.getLng();
this.dataForm.latitude = lat;
this.dataForm.longitude = lng;
this.setMarker(lat, lng);
this.convert(lat, lng);
},
//
handleSearchMap() {
infoWindowList.forEach((infoWindow) => {
infoWindow.close();
});
infoWindowList.length = 0;
markers.setGeometries([]);
//
search
.searchRectangle({
keyword: this.dataForm.address,
bounds: map.getBounds(),
})
.then((result) => {
let { data } = result;
if (Array.isArray(data) && data.length > 0) {
const {
location: { lat, lng },
} = data[0];
map.setCenter(new TMap.LatLng(lat, lng));
this.setMarker(lat, lng);
this.dataForm.latitude = lat;
this.dataForm.longitude = lng;
this.convert();
} else {
this.$message.error("未检索到相关位置坐标");
}
});
},
convert(lat, lng) {
markers.setGeometries([]);
// var input = document.getElementById('location').value.split(',');
let location;
if (lat && lng) {
location = new TMap.LatLng(lat, lng);
} else {
location = new TMap.LatLng(
this.dataForm.latitude,
this.dataForm.longitude
);
}
// map.setCenter(location);
markers.updateGeometries([
{
id: "main", //
position: location,
},
]);
geocoder
.getAddress({ location: location }) //
.then((result) => {
this.dataForm.address =
this.dataForm.address !== "" &&
this.dataForm.address !== null &&
(this.dataForm.longitude === "" || this.dataForm.longitude === null)
? this.dataForm.address
: result.result.address;
//
console.log(this.dataForm.address);
});
},
setMarker(lat, lng) {
markers.setGeometries([]);
markers.add([
{
id: "4",
styleId: "marker",
position: new TMap.LatLng(lat, lng),
properties: {
title: "marker4",
},
},
]);
},
//
// getFormInfo() {
// this.$http
// .post(`/gov/org/agency/community-list`)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// }
// this.organizationList = res.data;
// })
// .catch(() => {});
// },
init() {
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.getInfo();
} else {
this.initMap();
}
});
},
//
getInfo() {
this.$http
.get(`/epmetuser/icPointVaccinesInoculation/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dataForm = {
...this.dataForm,
...res.data,
};
if (res.data.moStartTime !== "") {
this.morningTime = [res.data.moStartTime, res.data.moEndTime];
}
if (res.data.afStartTime !== "") {
this.afterTime = [res.data.afStartTime, res.data.afEndTime];
}
this.initMap();
})
.catch(() => {});
},
//
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
if (
!this.dataForm.inoculationDate &&
this.dataForm.noAvailableVaccines === "2"
) {
this.$message.error("请选择接种日期");
return false;
}
if (
this.morningTime === null &&
this.dataForm.noAvailableVaccines === "2"
) {
this.$message.error("请填写上午接种时间");
return false;
}
if (
this.afterTime === null &&
this.dataForm.noAvailableVaccines === "2"
) {
this.$message.error("请填写下午接种时间");
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](
"/epmetuser/icPointVaccinesInoculation/",
this.dataForm
)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(
res.internalMsg ? res.internalMsg : res.msg
);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
this.closeSubmit();
},
});
})
.catch(() => {});
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>
<style scoped>
.data-block {
display: flex;
}
.time-block > div {
margin-bottom: 10px;
}
.time-block span {
padding: 10px;
}
.position_label >>> .el-form-item__label::before {
color: #fff !important;
}
.submit {
text-align: center;
margin: auto;
}
.form-class .el-input {
width: 75%;
}
.form-class .el-textarea {
width: 75% !important;
}
.time-class {
position: relative;
}
.time-class::before {
content: "*";
color: #f56c6c;
position: absolute;
left: 42px;
top: 10px;
}
</style>

520
src/views/modules/plugins/point/icpointvaccinesinoculation.vue

@ -0,0 +1,520 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<el-form-item label="疫苗接种点名称" prop="name">
<el-input
v-model="dataForm.name"
placeholder="核酸检测点名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="咨询电话" prop="mobile">
<el-input
v-model="dataForm.mobile"
placeholder="咨询电话"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
class="diy-button--search"
size="small"
@click="getDataList()"
>{{ $t("query") }}</el-button
>
</el-form-item>
<el-form-item>
<el-button size="small" class="diy-button--reset" @click="resetSearch"
>重置</el-button
>
</el-form-item>
<!--<el-form-item>-->
<!--<el-button type="danger" @click="deleteHandle()">{{-->
<!--$t("deleteBatch")-->
<!--}}</el-button>-->
<!--</el-form-item>-->
</el-form>
</div>
<div class="div_table">
<div class="exportBtn">
<el-button
class="diy-button--add"
type="primary"
size="small"
@click="addOrUpdateHandle('', '新增接种点')"
>{{ $t("add") }}</el-button
>
<el-button
style="margin-left: 10px"
class="diy-button--export"
size="small"
@click="handleExportModule()"
>下载模板</el-button
>
<el-upload
style=""
ref="upload"
:multiple="false"
:show-file-list="false"
:before-upload="
(file) => {
beforeUpload(file);
}
"
action=""
accept=".xls,.xlsx"
:http-request="
() => {
uploadFile();
}
"
>
<el-button
style="margin-left: 10px"
size="small"
class="diy-button--delete"
>导入</el-button
>
</el-upload>
<el-button
style="float: left; margin-left: 10px"
class="diy-button--reset"
size="small"
@click="handleExport"
>导出</el-button
>
<el-button
style="margin-left: 15px"
class="diy-button--more"
size="small"
@click="handleSendNotice"
v-if="noticeVisible"
>发送通知</el-button
>
</div>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
:row-key="row => { return row.id.toString() }"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%; height: 564px;overflow: auto;"
>
<el-table-column
label="序号"
header-align="center"
align="center"
type="index"
width="50"
></el-table-column>
<el-table-column
prop="name"
label="疫苗接种点名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="inoculationDate"
label="接种日期"
header-align="center"
align="center"
></el-table-column>
<el-table-column
label="上午接种时间"
header-align="center"
align="center"
>
<template slot-scope="scope">
<div>{{ scope.row.moStartTime }} - {{ scope.row.moEndTime }}</div>
</template>
</el-table-column>
<el-table-column
label="下午接种时间"
header-align="center"
align="center"
>
<template slot-scope="scope">
<div>{{ scope.row.afStartTime }} - {{ scope.row.afEndTime }}</div>
</template>
</el-table-column>
<el-table-column
prop="noAvailableVaccines"
label="暂无疫苗"
header-align="center"
width="100"
align="center"
></el-table-column>
<el-table-column
prop="mobile"
label="咨询电话"
header-align="center"
width="150"
align="center"
></el-table-column>
<el-table-column
prop="address"
label="接种点地址"
header-align="center"
align="center"
width="230"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="操作"
header-align="center"
align="center"
width="150"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
class="div-table-button--detail"
@click="addOrUpdateHandle(scope.row.id, '查看')"
>{{ "查看" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--edit"
@click="addOrUpdateHandle(scope.row.id, '修改')"
>{{ scope.row.longitude === null ? "待完善" : "修改" }}</el-button
>
<el-button
type="text"
size="small"
class="div-table-button--delete--noline"
@click="handleDelete(scope.row.id)"
>{{ $t("delete") }}</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog
:visible.sync="addOrUpdateVisible"
:title="dialogTitle"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
width="850px"
top="5vh"
custom-class="dialog-h"
>
<add-or-update
ref="addOrUpdate"
@refreshDataList="getDataList"
@closeDialog="closeDialog"
:dialogTitle="dialogTitle"
></add-or-update>
</el-dialog>
<!-- 发送通知弹出框 -->
<el-dialog
:visible.sync="sendNoticeFormShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="发送通知"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose"
:destroy-on-close="true"
>
<icpoint-noice
ref="ref_sendnotice"
@diaClose="diaClose"
:noticeOrigin="noticeOrigin"
></icpoint-noice>
</el-dialog>
</div>
</template>
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./icpointvaccinesinoculation-add-or-update";
import icpointNoice from "./icpointNoice";
import { requestPost , requestGet} from "@/js/dai/request";
export default {
mixins: [mixinViewModule],
data() {
return {
dataForm: {
name: "",
mobile: "",
},
updateId: null,
sendNoticeFormShow: false,
noticeVisible: false,
noticeOrigin: "4",
dialogTitle: "",
pageSize: 20,
pageNo: 0,
total: 0,
dataListLoading:false,
};
},
components: {
AddOrUpdate,
icpointNoice,
},
mounted() {
this.loadTable();
this.noticeFun();
},
methods: {
async loadTable() {
this.dataListLoading = true;
const url = "/epmetuser/icPointVaccinesInoculation/page";
let params = {
limit: this.pageSize,
page: this.pageNo,
};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
console.log(data.list);
this.dataList = data.list;
this.total = data.total;
} else {
this.$message.error(msg);
}
this.dataListLoading = false;
},
handleSizeChange(val) {
this.pageSize = val;
this.pageNo = 1;
this.loadTable();
},
handleCurrentChange(val) {
this.pageNo = val;
this.loadTable();
},
async handleDelete(id) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteNat(id);
})
.catch((err) => {
if (err == "cancel") {
}
});
},
async deleteNat(id) {
const url = "/epmetuser/icPointVaccinesInoculation/delete";
let params = [id];
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "删除成功",
});
this.getDataList();
} else {
this.$message.error(msg);
}
},
//
async handleExport() {
let title = "疫苗接种点";
const url = "/epmetuser/icPointVaccinesInoculation/point-export";
app.ajax.exportFilePost(
url,
this.dataForm,
(data, rspMsg) => {
this.download(data, title + ".xlsx");
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
resetSearch() {
this.dataForm = {
name: "",
mobile: "",
};
this.pageNo = 1;
},
//
handleSendNotice() {
this.sendNoticeFormShow = true;
},
//
diaClose() {
this.sendNoticeFormShow = false;
},
//
noticeFun() {
this.$http
.post(`/epmetuser/icPointNucleicMonitoring/getShowType`)
.then(({ data: res }) => {
if (res.code === 0 && res.data) {
this.noticeVisible = true;
}
})
.catch(() => {});
},
// /
addOrUpdateHandle(id, title) {
this.dialogTitle = title;
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id;
this.$refs.addOrUpdate.init();
});
this.addOrUpdateVisible = true;
},
//
closeDialog() {
this.addOrUpdateVisible = false;
this.dialogTitle = "";
},
handleExportModule() {
let title = "疫苗接种点模板";
let url = "/epmetuser/icPointVaccinesInoculation/exporttemplate";
let params = {};
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + ".xls");
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
//
download(data, fileName) {
if (!data) {
return;
}
var csvData = new Blob([data]);
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, fileName);
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
var url = window.URL.createObjectURL(csvData);
a.href = url;
a.download = fileName;
a.click();
a.remove();
window.URL.revokeObjectURL(url);
}
},
//
beforeUpload(file) {
this.files = file;
const isText = file.type === "application/vnd.ms-excel";
const isTextComputer =
file.type ===
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
if (!isText && !isTextComputer) {
this.$message.error("请选择正确格式的文件");
this.files = null;
this.fileName = "";
return false;
} else {
this.fileName = file.name;
return true;
}
},
async uploadFile() {
if (this.fileName == "") {
this.$message.warning("请选择要上传的文件!");
return false;
}
this.$message({
showClose: true,
message: "导入中,请到系统管理-导入记录中查看进度",
duration: 0,
});
//
this.$refs["upload"].clearFiles();
let url = "";
let fileFormData = new FormData();
fileFormData.append("file", this.files); //filenamefiletest.zip
url = "/epmetuser/icPointVaccinesInoculation/pointImport";
window.app.ajax.post2(
url,
fileFormData,
(data, rspMsg) => {
if (data.code === 0 && data.msg == "success") {
// this.$message.success('')
} else {
// this.$message({
// showClose: true,
// message: rspMsg,
// duration: 0,
// type: "error"
// })
// this.$message.error(rspMsg)
}
this.loadTable();
},
(rspMsg, data) => {},
{ headers: { "Content-Type": "multipart/form-data" } }
);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/visual/communityManage.scss";
@import "@/assets/scss/modules/management/list-main.scss";
.exportBtn {
display: flex;
align-items: center;
margin-bottom: 20px;
margin-top: 10px;
margin-left: 10px;
}
.div_left_table {
margin-top: 10px;
margin-left: 15px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
}
.dialog-h {
overflow: scroll;
}
</style>

15
src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue

@ -62,7 +62,9 @@
@clickFeature="clickMap" @clickFeature="clickMap"
:showIconLayer="true" :showIconLayer="true"
:showPolygonLayer="true" :showPolygonLayer="true"
:showPolIconLayer="true"
:clickType="'popup'" :clickType="'popup'"
:areaScale="0.1"
:isAddOpenlay="true"></screen-map> :isAddOpenlay="true"></screen-map>
</div> </div>
<div class="map-tips"> <div class="map-tips">
@ -111,6 +113,7 @@ const legendList = [
{ name: '#8fc41e', icon: require('../../../../../assets/img/shuju/volunteer7.png') }, { name: '#8fc41e', icon: require('../../../../../assets/img/shuju/volunteer7.png') },
{ name: '#00a1be', icon: require('../../../../../assets/img/shuju/volunteer8.png') }, { name: '#00a1be', icon: require('../../../../../assets/img/shuju/volunteer8.png') },
{ name: '#0067b6', icon: require('../../../../../assets/img/shuju/volunteer9.png') }, { name: '#0067b6', icon: require('../../../../../assets/img/shuju/volunteer9.png') },
{ name: '#e5007f', icon: require('../../../../../assets/img/shuju/volunteer3.png') },
{ name: '', icon: require('../../../../../assets/img/shuju/volunteer1.png') } { name: '', icon: require('../../../../../assets/img/shuju/volunteer1.png') }
] ]
const defaultLegendIcon = require('../../../../../assets/img/shuju/volunteer1.png') const defaultLegendIcon = require('../../../../../assets/img/shuju/volunteer1.png')
@ -164,10 +167,10 @@ export default {
require('../../../../../assets/img/shuju/volunteer5.png'), // require('../../../../../assets/img/shuju/volunteer5.png'), //
require('../../../../../assets/img/shuju/volunteer7.png'), // require('../../../../../assets/img/shuju/volunteer7.png'), //
require('../../../../../assets/img/shuju/volunteer8.png'), // require('../../../../../assets/img/shuju/volunteer8.png'), //
require('../../../../../assets/img/shuju/volunteer3.png'), //
require('../../../../../assets/img/shuju/volunteer9.png'), // require('../../../../../assets/img/shuju/volunteer9.png'), //
require('../../../../../assets/img/shuju/volunteer1.png'), // require('../../../../../assets/img/shuju/volunteer1.png'), //
require('../../../../../assets/img/shuju/volunteer2.png'), // require('../../../../../assets/img/shuju/volunteer2.png'), //
require('../../../../../assets/img/shuju/volunteer3.png'), //
require('../../../../../assets/img/shuju/volunteer6.png'), // require('../../../../../assets/img/shuju/volunteer6.png'), //
], ],
polygonList: [] polygonList: []
@ -220,7 +223,7 @@ export default {
} }
this.pieData.push(ob) this.pieData.push(ob)
}) })
this.getMapData() // this.getMapData()
} else { } else {
this.$message.error(msg) this.$message.error(msg)
} }
@ -364,6 +367,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.agencyInfo.agencyLevel = data.agencyLevel,
this.agencyInfo.longitude = data.longitude,
this.agencyInfo.latitude = data.latitude
let subPolygonList = [] let subPolygonList = []
data.children.forEach((item, index) => { data.children.forEach((item, index) => {
if (item.coordinates && item.coordinates.length > 0) { if (item.coordinates && item.coordinates.length > 0) {
@ -765,7 +771,10 @@ export default {
align-items: center; align-items: center;
margin-top: 10px; margin-top: 10px;
margin-right: 40px; margin-right: 40px;
.title-icon {
width: 40px;
height: 34px;
}
.map-tips-icon { .map-tips-icon {
width: 20px; width: 20px;
height: 10px; height: 10px;

12
src/views/modules/visual/communityGovern/duoyuanfuwu/pieOption.js

@ -44,7 +44,7 @@ export function pieOption (_charts) {
// tooltip: { // tooltip: {
// }, // },
center: center, center: center,
radius: ['53%', '53.3%'], radius: ['48%', '48.3%'],
label: { label: {
show: false show: false
}, },
@ -70,7 +70,7 @@ export function pieOption (_charts) {
// name: 'Access From', // name: 'Access From',
type: 'pie', type: 'pie',
center: center, center: center,
radius: ['30%', '43%'], radius: ['25%', '38%'],
avoidLabelOverlap: false, avoidLabelOverlap: false,
// top: top + '%', // top: top + '%',
// height: '80%', // height: '80%',
@ -87,14 +87,14 @@ export function pieOption (_charts) {
edgeDistance: 1, edgeDistance: 1,
lineHeight: 15, lineHeight: 15,
color: '#fff', color: '#fff',
fontSize: 10, fontSize: 8,
// distanceToLabelLine: -60, // distanceToLabelLine: -60,
rich: { rich: {
name: { name: {
padding: [0, 6, 0, 6] padding: [0, 6, 0, 6]
}, },
a: { a: {
fontSize: 25, fontSize: 23,
color: '#fff', color: '#fff',
padding: [0, 6, 6, 6] padding: [0, 6, 6, 6]
}, },
@ -110,9 +110,9 @@ export function pieOption (_charts) {
labelLine: { labelLine: {
show: false, show: false,
smooth: 0.2, smooth: 0.2,
length: 40, length: 20,
length2: 0, length2: 0,
maxSurfaceAngle: 80 maxSurfaceAngle: 60
}, },
labelLayout: function (params) { labelLayout: function (params) {

276
src/views/modules/visual/communityGovern/shijianchuli/chart.js

@ -0,0 +1,276 @@
/**
* 绘制3d图
* @param pieData 总数据
* @param internalDiameterRatio:透明的空心占比
* @param distance 视角到主体的距离
* @param alpha 旋转角度
* @param pieHeight 立体的高度
* @param opacity 饼或者环的透明度
*/
const getPie3D = (pieData, internalDiameterRatio, distance, alpha, pieHeight, opacity = 1) => {
const series = []
let sumValue = 0
let startValue = 0
let endValue = 0
let legendData = []
let legendBfb = []
const k = 1 - internalDiameterRatio
pieData.sort((a, b) => {
return b.value - a.value
})
// 为每一个饼图数据,生成一个 series-surface 配置
for (let i = 0; i < pieData.length; i++) {
sumValue += pieData[i].value
const seriesItem = {
name:
typeof pieData[i].name === 'undefined'
? `series${i}`
: pieData[i].name,
type: 'surface',
parametric: true,
wireframe: {
show: false
},
pieData: pieData[i],
pieStatus: {
selected: false,
hovered: false,
k: k
},
center: ['10%', '50%']
}
if (typeof pieData[i].itemStyle !== 'undefined') {
const itemStyle = {}
itemStyle.color =
typeof pieData[i].itemStyle.color !== 'undefined'
? pieData[i].itemStyle.color
: opacity
itemStyle.opacity =
typeof pieData[i].itemStyle.opacity !== 'undefined'
? pieData[i].itemStyle.opacity
: opacity
seriesItem.itemStyle = itemStyle
}
series.push(seriesItem)
}
// 使用上一次遍历时,计算出的数据和 sumValue,调用 getParametricEquation 函数,
// 向每个 series-surface 传入不同的参数方程 series-surface.parametricEquation,也就是实现每一个扇形。
legendData = []
legendBfb = []
for (let i = 0; i < series.length; i++) {
endValue = startValue + series[i].pieData.value
series[i].pieData.startRatio = startValue / sumValue
series[i].pieData.endRatio = endValue / sumValue
series[i].parametricEquation = getParametricEquation(
series[i].pieData.startRatio,
series[i].pieData.endRatio,
false,
false,
k,
series[i].pieData.value
)
startValue = endValue
const bfb = fomatFloat(series[i].pieData.value / sumValue, 4)
legendData.push({
name: series[i].name,
value: bfb
})
legendBfb.push({
name: series[i].name,
value: bfb
})
}
const boxHeight = getHeight3D(series, pieHeight) // 通过pieHeight设定3d饼/环的高度,单位是px
// 准备待返回的配置项,把准备好的 legendData、series 传入。
const option = {
legend: {
show: false,
data: legendData,
orient: 'vertical',
left: 10,
top: 10,
itemGap: 10,
textStyle: {
color: '#A1E2FF'
},
icon: 'circle',
formatter: function (param) {
const item = legendBfb.filter(item => item.name === param)[0]
const bfs = fomatFloat(item.value * 100, 2) + '%'
return `${item.name} ${bfs}`
}
},
labelLine: {
show: true,
lineStyle: {
color: '#fff'
}
},
label: {
show: true,
position: 'outside',
formatter: '{b} \n{c} {d}%'
},
tooltip: {
backgroundColor: '#033b77',
borderColor: '#21f2c4',
textStyle: {
color: '#fff',
fontSize: 13
},
formatter: params => {
// if (
// params.seriesName !== 'mouseoutSeries' &&
// params.seriesName !== 'pie2d'
// ) {
// const bfb = (
// (option.series[params.seriesIndex].pieData.endRatio -
// option.series[params.seriesIndex].pieData.startRatio) *
// 100
// ).toFixed(2)
// return (
// `${params.seriesName}<br/>` +
// `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${params.color};"></span>` +
// `${bfb}%`
// )
// }
}
},
xAxis3D: {
min: -1,
max: 1
},
yAxis3D: {
min: -1,
max: 1
},
zAxis3D: {
min: -1,
max: 1
},
grid3D: {
show: false,
boxHeight: boxHeight, // 圆环的高度
viewControl: {
// 3d效果可以放大、旋转等,请自己去查看官方配置
alpha, // 角度
beta: -40,
distance, // 调整视角到主体的距离,类似调整zoom
rotateSensitivity: 0, // 设置为0无法旋转
zoomSensitivity: 0, // 设置为0无法缩放
panSensitivity: 0, // 设置为0无法平移
autoRotate: false // 自动旋转
}
},
series: series
}
return option
}
/**
* 生成扇形的曲面参数方程用于 series-surface.parametricEquation
*/
const getParametricEquation = (startRatio, endRatio, isSelected, isHovered, k, h) => {
// 计算
const midRatio = (startRatio + endRatio) / 2
const startRadian = startRatio * Math.PI * 2
const endRadian = endRatio * Math.PI * 2
const midRadian = midRatio * Math.PI * 2
// 如果只有一个扇形,则不实现选中效果。
if (startRatio === 0 && endRatio === 1) {
isSelected = false
}
// 通过扇形内径/外径的值,换算出辅助参数 k(默认值 1/3)
k = typeof k !== 'undefined' ? k : 1 / 3
// 计算选中效果分别在 x 轴、y 轴方向上的位移(未选中,则位移均为 0)
const offsetX = isSelected ? Math.cos(midRadian) * 0.1 : 0
const offsetY = isSelected ? Math.sin(midRadian) * 0.1 : 0
// 计算高亮效果的放大比例(未高亮,则比例为 1)
const hoverRate = isHovered ? 1.05 : 1
// 返回曲面参数方程
return {
u: {
min: -Math.PI,
max: Math.PI * 3,
step: Math.PI / 32
},
v: {
min: 0,
max: Math.PI * 2,
step: Math.PI / 20
},
x: function (u, v) {
if (u < startRadian) {
return (
offsetX +
Math.cos(startRadian) * (1 + Math.cos(v) * k) * hoverRate
)
}
if (u > endRadian) {
return (
offsetX + Math.cos(endRadian) * (1 + Math.cos(v) * k) * hoverRate
)
}
return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate
},
y: function (u, v) {
if (u < startRadian) {
return (
offsetY +
Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate
)
}
if (u > endRadian) {
return (
offsetY + Math.sin(endRadian) * (1 + Math.cos(v) * k) * hoverRate
)
}
return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate
},
z: function (u, v) {
if (u < -Math.PI * 0.5) {
return Math.sin(u)
}
if (u > Math.PI * 2.5) {
return Math.sin(u) * h * 0.1
}
return Math.sin(v) > 0 ? 1 * h * 0.1 : -1
}
}
}
/**
* 获取3d丙图的最高扇区的高度
*/
const getHeight3D = (series, height) => {
series.sort((a, b) => {
return b.pieData.value - a.pieData.value
})
return (height * 25) / series[0].pieData.value
}
/**
* 格式化浮点数
*/
const fomatFloat = (num, n) => {
let f = parseFloat(num)
if (isNaN(f)) {
return false
}
f = Math.round(num * Math.pow(10, n)) / Math.pow(10, n) // n 幂
let s = f.toString()
let rs = s.indexOf('.')
// 判定如果是整数,增加小数点再补0
if (rs < 0) {
rs = s.length
s += '.'
}
while (s.length <= rs + n) {
s += '0'
}
return s
}
export { getPie3D, getParametricEquation }

108
src/views/modules/visual/communityGovern/shijianchuli/lineOption.js

@ -1,4 +1,11 @@
import * as echarts from 'echarts' import * as echarts from 'echarts'
let circleList = [
'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAhCAYAAAC4JqlRAAAFdklEQVRYhY1YTY/bRBh+/BHbiRN7l02bqst+st1dVT0gceXABYk7PfYPwIELv4IfABJ3euuBCxKCKxckBEKi2y1F6Xa3abTZT+fLHxnbaMZje+zE3Y70aiLPzPs888w778xEin/8EO9YJKGbVDEkrvhdWdSKBumGehGJReBVdVZyApsPk/roicSdi4aKb4sUEK38jeLEHIdVRQWOnsgLgORCLWsKzFUDqlmHXEvGRzMCMnEx6XmIgpCDRaU6saMnMTYfRpmMQgzIJdCiNTebqHc6kHUbMYkQBT7ikCReFBWypkNSZUS+A/f0FOOjMSdRtlgglikgypwCK8z0FQPWzgYkpQn/8grT3jFmo0ggjMxhrSWjsWqhcXcP9c4Yo5fH8AYugFDQOSVBx8apAqkzRQBXYd1bhnF7G8HVNZznV4hDhZNWuIkEQm4EkhLC3luGtrwEb9DF8MUV+560R7xmpFXMB1kCYu+1obc3MD7qY9qbAagDqHFTKwhQkBnicIbrgyEaqy6am9uQ5Fdwnp8LfaW0FpcgX3NzvcXARy/6cAchB9e5aZxEqhaEWVGiAQCftU97PuJZH617GzBdH5Njh4/JglKdi3i1XkNzbQuTNwO4A8LBjZJpXAWRAOHgnkBOgjtwoZgD5tM/ewripkHJMFMHuQr2fgehTzB+ORVmTUmYAJoAWgAsAHbJLN7W5H1z1agv6pP6LgZvYRdIkGsKVLOD64Mel1njM6fOGtxxg33rfLwNe3+DjXYOX+H0t64we0nYasnSjLrnWLq/CrnWZ3mDkygSsHdtRLMA/iXhYJqgQELAuvc+9r98BOPWeqbdnU+Ajc+PcfjdDxi+eC2Akywu/MsJ800xrp6epQTkwi5QmzYCZ8yJqYIKCYn6nTYefP1FATwt9Btto31y+TVh16jMN8UQMOWCAnKtgeDaK+SCnISGDx59CrW5PAeeLWhzmfVJ+xe3rMx8yzVTPE+KQSgpOmbD2cKMyBLTzoNK8LQkfcRkJWdKU9+SoolBKJeGS4gjlLZmbkrdupGA0rAqx+e+s1ImEPNVKR+riYX+6EYCoTeqHJ/7XkggRhwGqFk1IYqjQo4fdZ/dSGDUPRTyfij4iZlviiGQSAkkDKPZFJplCMBEyHABuo9/BZlWq0Dbuo9/yfrn4xMi1DfFEC4ossAmBpk4qC01CwdLnts9TE5Ocfjt9wicwRx44CRttE+SkHw+dpaRoL4phoCpZuDURl0HKx9tQVuiW6ac25MMd/l3F79/9Q1WP7uP1vY6l/0YvZ8PEIf07J9yc/nYRAnqU9F1XP/jiAoUCZApAZkO0Npq4+KvMz5YFRJWcuzSdXz90x8A/uTjIz5TnwOnBHIVWlu3mG+KUVoCCCQiOAd9KA0d5pohKJA6pVmSxsCQngAlG/K28ZwC1JfSMJjv/EaEVAFxq0QgLoHbfwlzfQdk2oN/4S3I7W+7D/gF01ckmOsduP3/mO/SJbW4BKkjGguKfgJ7fw3Df9/AO/OEwAxuvBGlshu3FFi7dxFcnjCf+bYsxEB6RUovCSGrr58NYO9FsHY3ob93Aee5w52rhQuHuHzi1rX3bOjtFfjnR/w6Fop3wXRceikt3/9TABX1TgOt7Q12unnnV5icjBB65fhJlkExAHOtBaO9zOQfdV/BPZ1yUlFJgUgkAIFA+V2QkLF2LRjt25BVC2HgI/LpuyCZiaTIkHUdiqYjIkP4F2dcsaiUDefeBSKBRQeIPFerpgJz3YRq1NlDhAlJIhDPxeR4AjKZm2U58BblgfTNFvPnWeHqLMQHQCYSnGd+xeM0fwNWAGbPMv42rHqelx+gVa/lcnnba1gkl5Wq53m587v8NyCOXfR7vgD4H8khvGFl000HAAAAAElFTkSuQmCC',
'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAhCAYAAAC4JqlRAAAFb0lEQVRYhY1YW28bRRT+ZtbrS24mjVu3btPUDoiqFIEQ4gUh8dKX8hf4A/wT+Am88cA7b5GgrxVPFIREL0rapHHbOHGcxM7Fa3u9c9BMZrZn1+umI43W2j2Xb75z5pwZi89/JLznEExMTFGhKb+njtyUD+KCZxaILOfTnvGIAfj3z5/hmjGcnpjyLosBPtPvtB+yfsxIMBCuQWY4komnD09eRVHMoISc1R9jTH0EahcDhIisM5V6mhmugfz75t35qlgOyJTTxJQ3MCcqqIo8yhRBIcQQCmOrmYOPgvAgaYQedbCnXuPUgkhPYsBiBjjNzrGnp1hEUd7CCiTmqIsjtYsmnRllyfSMQTELKa5iQVTxsXcZp6qJJh0gAAwrbjgQWpc4gLTznKxjUSyhgR660Qu8hDLv8w5cCkBEZ4joBU4h0fNWsSjr+IQWsKm2cDQlYQ2AdJKdO2+gIi5hhV6jpXYRAijpHLIzlwXAZAMQ6gBFGziWVxGIG2hIgW21iQ6TFe7JGYhjLmuY187VS7SoYwxr5wU78xaEZ+VhaY2Mc2AEYKi/q10MxRgtHUI5wFDtoGd14qTMpTNeFOHLGupqD23qmBVp58XUzFsWOICxdT5g4AR1EFAJbW2TDvGYBnFSCs5AzIJcRZVGGKtX6AOYsasu2d8lxoafAhDalfPwmOTUtsQi5rXt6DFe8zqSTEIfnphBNdrAG+sgb1fuAMzaZ7FxG40rNaxo5fYOtjefYZOtXrCtZkKjmuh4H+E6fLQQGrbEBACvjjKFGFHXCMxaAJyB2cvXcOPre/h+dgE33SpW7wCffoXmnw/w637LrJBYWExeUBdn2rb2Ea1j3wGQiV0wgzKdmAKSs9PnIOY/QOXb7/ADd+7G3AJu6m9ahoUpz3ZNztieQZn7lJwB4WOGjg2NcS1gIPJffoN7+SIW087d0N+0jJNPbVmpbQvfMCs4A2+TUKKAU0PZREXUhipV3J3m3A0rk2N6MmZa25YGWJyEMqUvSLGkTE0/j4WLAPgFI5Opz2zHIw2AbFDSbfW8k4U4uQhAODIymfrMdiYAgsIIcyZuxDpY5MrsYRtPLwJw2MYzm/1OT8UNSNtWplglWnC8YhqjL+bNvlestrsKN3r0EA/sCqeu/tFD/OHkmb4Bom1rH/yAIhkaQh89MY+5RGN5W9sH3QPsPfwdPwd9tNPOg/75Ny1jC9LQ6oYOhLHdN/0g0Q1jBlQTPe8u6qIMSb2J2m4q3M42Nn/7BT/d/gx3KtXzetDZQ/PZv3hCyvT+vp2B1TVMaJsij0K0HgMwIBIAKMCYBmjLZVSinqlWI9Z0XHmNSGH09B/8BeBvq897QcAAxCzIZVzWtrWPLAAOhFIbaMm7qMgaimrHKPNEdeV1eEE3HHAGtC1RRDH6D+vsRAQHgG8VRQOMqY0tUcOHIsAbOjJG0rX9XeeBIZ9iEULUUFVtPNe2kTqkJkLgDOlckHm8kqtYVlvYoQMDImKrfPeJyNIuluDJOmrUxSttk23LRAjcEckdErSQUM/Rlg0or45bqowDtWkMhLy2pw+lfOvKBsryEpbUIV7a45irC/GJOM2AYB+MoFakE/TlMla8L1CmQxypFk4MuZNVVOn+J6+Z45xuWMNoG09o3yTkGMnjOTJ3AYvn252xj9NoH09lHQtiCVdyVdwifScYYYjIynqmxRSEjwKNcUxdbKkXhjGVqoYqlXMTu4BnO88LqbZwiC10RQmeuI5ZUUAJecvCGIqOEag3OKMgEefM21F6F5hh72xkr2eJozPLD1AAQc9NELIup9x4VkOCu5ZN3A3dC+6MGZt2W06Pd92G3QITY9r1PEHTe/43wHWzfk8OAP8D28XBfaJJ48oAAAAASUVORK5CYII='
]
let className = ['1号停车场', '2号停车场', '3号停车场', '4号停车场', '5号停车场', '6号停车场', '7号停车场']
let serviceCount = [50, 28, 17, 38, 90, 73, 39]
export function lineOption () { export function lineOption () {
return { return {
@ -11,6 +18,13 @@ export function lineOption () {
} }
} }
}, },
// grid: {
// left: '5%',
// right: '5%',
// bottom: '5%',
// top: '10%',
// containLabel: true
// },
xAxis: { xAxis: {
type: 'category', type: 'category',
// boundaryGap: false, // boundaryGap: false,
@ -25,7 +39,8 @@ export function lineOption () {
lineStyle: { lineStyle: {
color: '#0c4b59' color: '#0c4b59'
} }
} },
// data: className
}, },
yAxis: { yAxis: {
nameTextStyle: { nameTextStyle: {
@ -58,29 +73,82 @@ export function lineOption () {
} }
} }
}, },
// 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: [820, 932, 901, 934, 1290, 1330, 1320],
// // type: 'line',
// // areaStyle: {}
// // }
// ]
series: [ series: [
{ {
name: '项目数', name: '',
type: 'line', type: 'bar',
smooth: true, zlevel: 1,
barWidth: 15, itemStyle: {
areaStyle: {},
itemStyle: { normal: {
color: new echarts.graphic.LinearGradient( barBorderRadius: 0,
0, 1, 0, 0, color: function (params) {
[ // 大于等于50%的是黄色 反之为蓝色
{ offset: 0, color: 'rgba(121, 55, 255, 0)' }, var colorList = [
{ offset: 1, color: '#6339FF' } ['rgba(252, 210, 152, .2)', 'rgba(252, 210, 152, 1)'],
] ['rgba(36, 253, 231, .2)', 'rgba(36, 253, 231, 1)'],
) ];
} var colorItem
colorItem = colorList[1];
// 设置线条渐变色
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: colorItem[0]
},
{
offset: 1,
color: colorItem[1]
}
], false);
}
},
},
barWidth: 4,
// data: serviceCount
},
{
name: 'XXX',
type: 'pictorialBar',
symbol: function (params, value) {
// 设置图片
return circleList[1]
}, },
// { symbolPosition: 'end',
// data: [820, 932, 901, 934, 1290, 1330, 1320], symbolSize: [30, 30],
// type: 'line', symbolOffset: [0, -12],
// areaStyle: {} z: 20,
// } // data: serviceCount
}
] ]
} }
} }

311
src/views/modules/visual/communityGovern/shijianchuli/pieOption.js

@ -1,183 +1,184 @@
export function pieOption (_charts) { export function pieOption (_charts) {
const center= ['50%', '170px'] const center= ['50%', '170px']
return { return {
title: { title: {
text: '0', text: '0',
top: 140, top: 140,
left: 'center', left: 'center',
textStyle: { textStyle: {
width: '100%', width: '100%',
fontSize: 32, fontSize: 32,
color: '#FFFFFF', color: '#FFFFFF',
fontWeight: 400 fontWeight: 400
},
itemGap: 5,
subtext: '总数',
subtextStyle: {
fontSize: 20,
color: '#fff',
fontWeight: 400
}
},
tooltip: {
show: false
},
// legend: {
// top: 350,
// bottom: 0,
// itemWidth: 20,
// itemHeight: 10,
// textStyle: {
// color: '#D2E7FF',
// fontSize: 16,
// lineHeight: 20,
// },
// },
series: [
// 外侧圆环
{
type: 'pie',
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
startAngle: 0,
hoverAnimation: false,
// tooltip: {
// },
center: center,
radius: ['58%', '58.3%'],
label: {
normal: {
show: false
}
},
labelLine: {
normal: {
show: false
}
}, },
data: [{ itemGap: 5,
value: 360, subtext: '总数',
itemStyle: { subtextStyle: {
normal: { fontSize: 20,
color: 'rgba(40, 101, 250, 0)', color: '#fff',
width:0, fontWeight: 400
borderColor: 'rgba(40, 101, 250, 0.5)',
borderWidth: 1,
borderType: 'dotted'
}
}
} }
]
}, },
tooltip: {
// 突出的 show: false
{
hoverAnimation: false,
// name: 'Access From',
type: 'pie',
center: center,
radius: ['35%', '48%'],
avoidLabelOverlap: false,
// top: top + '%',
// height: '80%',
selectedMode: 'single',
left: 'center',
width: 400,
label: {
// show: false,
position: 'outside',
alignTo: 'edge',
// formatter: '{a|{c}}\n\n{name|{b}}',
formatter: '{a|{c}%}\n{r|}\n{name|{b}}',
minMargin: 5,
edgeDistance: 1,
lineHeight: 15,
color: '#fff',
fontSize: 12,
// distanceToLabelLine: -60,
rich: {
name: {
padding: [0, 6, 0, 6]
},
a: {
fontSize: 30,
color: '#fff',
padding: [0, 6, 6, 6]
},
r: {
backgroundColor: 'auto',
borderRadius: 6,
width: 6,
height: 6,
// padding: [3, 3, 0, -12]
}
}
},
labelLine: {
show: false,
smooth: 0.2,
length: 30,
length2: 0,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < _charts.getWidth() / 2;
const points = params.labelLinePoints;
// Update the end point.
if (points) {
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
}
return {
labelLinePoints: points
};
},
itemStyle: {
color:function(params) {
//自定义颜色
var colorList = [ '#FAC126', '#3DDA83'];
return colorList[params.dataIndex]
}
},
data: [],
}, },
// 中间圆环 // legend: {
{ // top: 350,
// bottom: 0,
// itemWidth: 20,
// itemHeight: 10,
// textStyle: {
// color: '#D2E7FF',
// fontSize: 16,
// lineHeight: 20,
// },
// },
series: [
// 外侧圆环
{
type: 'pie', type: 'pie',
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。 // 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
startAngle: 0, startAngle: 0,
hoverAnimation: false, hoverAnimation: false,
center: center,
// tooltip: { // tooltip: {
// }, // },
radius: ['0%', '25%'], center: center,
radius: ['58%', '58.3%'],
label: { label: {
normal: {
show: false show: false
}
}, },
labelLine: { labelLine: {
normal: {
show: false show: false
}
}, },
data: [{ data: [{
value: 360, value: 360,
itemStyle: { itemStyle: {
normal: { normal: {
color: 'rgba(8, 37, 134, 1)', color: 'rgba(40, 101, 250, 0)',
width:0,
borderColor: 'rgba(40, 101, 250, 0.5)',
borderWidth: 1,
borderType: 'dotted'
} }
} }
} }
] ]
}, },
]
// 突出的
{
hoverAnimation: false,
// name: 'Access From',
type: 'pie',
center: center,
radius: ['35%', '48%'],
avoidLabelOverlap: false,
// top: top + '%',
// height: '80%',
selectedMode: 'single',
left: 'center',
width: 400,
label: {
// show: false,
position: 'outside',
alignTo: 'edge',
// formatter: '{a|{c}}\n\n{name|{b}}',
formatter: '{a|{c}%}\n{r|}\n{name|{b}}',
minMargin: 5,
edgeDistance: 1,
lineHeight: 15,
color: '#fff',
fontSize: 12,
// distanceToLabelLine: -60,
rich: {
name: {
padding: [0, 6, 0, 6]
},
a: {
fontSize: 30,
color: '#fff',
padding: [0, 6, 6, 6]
},
r: {
backgroundColor: 'auto',
borderRadius: 6,
width: 6,
height: 6,
// padding: [3, 3, 0, -12]
}
}
},
labelLine: {
show: false,
smooth: 0.2,
length: 30,
length2: 0,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
const isLeft = params.labelRect.x < _charts.getWidth() / 2;
const points = params.labelLinePoints;
// Update the end point.
if (points) {
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
}
return {
labelLinePoints: points
};
},
itemStyle: {
color:function(params) {
//自定义颜色
var colorList = [ '#FAC126', '#3DDA83'];
return colorList[params.dataIndex]
}
},
data: [],
},
// 中间圆环
{
type: 'pie',
// 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。
startAngle: 0,
hoverAnimation: false,
center: center,
// tooltip: {
// },
radius: ['0%', '25%'],
label: {
show: false
},
labelLine: {
show: false
},
data: [{
value: 360,
itemStyle: {
normal: {
color: 'rgba(8, 37, 134, 1)',
}
}
}
]
},
]
}
} }
}

328
src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi copy 2.vue

@ -0,0 +1,328 @@
<template>
<div class="chart-container">
<div class="chart"
id="cityGreenLand"
ref="chart"></div>
<!-- 底座背景 -->
<div class="bg"></div>
</div>
</template>
<script>
import * as echarts from 'echarts';
// import echarts from 'echarts'
import 'echarts-gl';
import { getPie3D, getParametricEquation } from './chart.js' //js
const color = ['#005aff', '#f8b551']
export default {
name: 'chart',
data () {
return {
optionData: [
{
name: '处理中',
value: 28
},
{
name: '已完成',
value: 72
}
],
statusChart: null,
option: {}
}
},
created () {
this.setLabel()
},
mounted () {
this.initChart()
//
const that = this
window.onresize = function () {
that.changeSize()
}
},
methods: {
// label
setLabel () {
this.optionData.forEach((item, index) => {
item.itemStyle = {
color: color[index]
}
item.label = {
normal: {
show: true,
color: color[index],
formatter: [
'{d|{d}%}',
'{b|{b}}'
].join('\n'), // \n
rich: {
b: {
color: '#fff',
lineHeight: 25,
align: 'left',
fontSize: 16,
marginTop: 20
},
c: {
fontSize: 22,
color: '#fff',
textShadowColor: '#1c90a6',
textShadowOffsetX: 0,
textShadowOffsetY: 2,
textShadowBlur: 5
},
d: {
color: color[index],
fontSize: 25,
align: 'left'
}
}
}
}
item.labelLine = {
normal: {
length: 30,
length2: 80,
lineStyle: {
width: 1,
color: 'rgba(255,255,255,0.7)'
}
}
}
item.labelLayout = function (params) {
const isLeft = params.labelRect.x < myChart.getWidth() / 2;
const points = params.labelLinePoints;
// Update the end point.
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
}
})
},
//
initChart () {
// let statusChart = echarts.init(document.getElementById('cityGreenLand-charts'));
this.statusChart = echarts.init(document.getElementById('cityGreenLand'));
// option, 3d,
this.option = getPie3D(this.optionData, 0.8, 220, 28, 22, 0.4)
this.statusChart.setOption(this.option)
// label线2d使labelLine3dsetOption
this.option.series.push({
name: '电梯状态', //
backgroundColor: 'transparent',
type: 'pie',
label: {
opacity: 1,
fontSize: 13,
lineHeight: 20
},
startAngle: 40, // [0, 360]
clockwise: false, // 3d
radius: ['40%', '50%'],
center: ['50%', '50%'],
data: this.optionData,
itemStyle: {
opacity: 0 //02d
}
})
this.statusChart.setOption(this.option)
this.bindListen(this.statusChart)
},
//
// optionNameoptionopiton
bindListen (myChart, optionName = 'option') {
let selectedIndex = ''
let hoveredIndex = ''
//
myChart.on('click', (params) => {
// option.series
const isSelected = !this[optionName].series[params.seriesIndex].pieStatus
.selected
const isHovered =
this[optionName].series[params.seriesIndex].pieStatus.hovered
const k = this[optionName].series[params.seriesIndex].pieStatus.k
const startRatio =
this[optionName].series[params.seriesIndex].pieData.startRatio
const endRatio =
this[optionName].series[params.seriesIndex].pieData.endRatio
// option
if (selectedIndex !== '' && selectedIndex !== params.seriesIndex) {
this[optionName].series[
selectedIndex
].parametricEquation = getParametricEquation(
this[optionName].series[selectedIndex].pieData.startRatio,
this[optionName].series[selectedIndex].pieData.endRatio,
false,
false,
k,
this[optionName].series[selectedIndex].pieData.value
)
this[optionName].series[selectedIndex].pieStatus.selected = false
}
// / option
this[optionName].series[
params.seriesIndex
].parametricEquation = getParametricEquation(
startRatio,
endRatio,
isSelected,
isHovered,
k,
this[optionName].series[params.seriesIndex].pieData.value
)
this[optionName].series[params.seriesIndex].pieStatus.selected = isSelected
// seriesIndex
selectedIndex = isSelected ? params.seriesIndex : null
// 使 option
myChart.setOption(this[optionName])
})
// mouseover
// myChart.on('mouseover', (params) => {
// //
// let isSelected
// let isHovered
// let startRatio
// let endRatio
// let k
// // mouseover
// if (hoveredIndex === params.seriesIndex) {
// //
// } else {
// // option
// if (hoveredIndex !== '') {
// // option.series false
// isSelected = this[optionName].series[hoveredIndex].pieStatus.selected
// isHovered = false
// startRatio = this[optionName].series[hoveredIndex].pieData.startRatio
// endRatio = this[optionName].series[hoveredIndex].pieData.endRatio
// k = this[optionName].series[hoveredIndex].pieStatus.k
// // option
// this[optionName].series[
// hoveredIndex
// ].parametricEquation = getParametricEquation(
// startRatio,
// endRatio,
// isSelected,
// isHovered,
// k,
// this[optionName].series[hoveredIndex].pieData.value
// )
// this[optionName].series[hoveredIndex].pieStatus.hovered = isHovered
// // seriesIndex
// hoveredIndex = ''
// }
// // mouseover option
// if (
// params.seriesName !== 'mouseoutSeries' &&
// params.seriesName !== 'pie2d'
// ) {
// // option.series true
// isSelected =
// this[optionName].series[params.seriesIndex].pieStatus.selected
// isHovered = true
// startRatio =
// this[optionName].series[params.seriesIndex].pieData.startRatio
// endRatio = this[optionName].series[params.seriesIndex].pieData.endRatio
// k = this[optionName].series[params.seriesIndex].pieStatus.k
// // option
// this[optionName].series[
// params.seriesIndex
// ].parametricEquation = getParametricEquation(
// startRatio,
// endRatio,
// isSelected,
// isHovered,
// k,
// this[optionName].series[params.seriesIndex].pieData.value + 60
// )
// this[optionName].series[
// params.seriesIndex
// ].pieStatus.hovered = isHovered
// // seriesIndex
// hoveredIndex = params.seriesIndex
// }
// // 使 option
// myChart.setOption(this[optionName])
// }
// })
// // bug
// myChart.on('globalout', () => {
// //
// let isSelected
// let isHovered
// let startRatio
// let endRatio
// let k
// if (hoveredIndex !== '') {
// // option.series true
// isSelected = this[optionName].series[hoveredIndex].pieStatus.selected
// isHovered = false
// k = this[optionName].series[hoveredIndex].pieStatus.k
// startRatio = this[optionName].series[hoveredIndex].pieData.startRatio
// endRatio = this[optionName].series[hoveredIndex].pieData.endRatio
// // option
// this[optionName].series[
// hoveredIndex
// ].parametricEquation = getParametricEquation(
// startRatio,
// endRatio,
// isSelected,
// isHovered,
// k,
// this[optionName].series[hoveredIndex].pieData.value
// )
// this[optionName].series[hoveredIndex].pieStatus.hovered = isHovered
// // seriesIndex
// hoveredIndex = ''
// }
// // 使 option
// myChart.setOption(this[optionName])
// })
},
//
changeSize () {
this.statusChart.resize()
}
}
}
</script>
<style lang='scss' scoped>
.chart-container {
position: relative;
width: 100%;
height: 800px;
.chart,
.bg {
width: 100%;
height: 800px;
z-index: 2;
}
.bg {
position: absolute;
bottom: 180px;
left: 50%;
z-index: 1;
width: 570px;
height: 340px;
background: no-repeat center;
background-image: url("../../../../../assets/img/shuju/3d-pid-bg.png");
background-size: 100% 100%;
transform: translateX(-50%);
}
}
</style>

740
src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi copy.vue

@ -0,0 +1,740 @@
<template>
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>事件处理分析</span>
<div class="search">
<div class="second-select cascader">
<el-cascader class="customer_cascader"
ref="myCascader"
v-model="agencyIdArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
<div class="second-select">
<el-select v-model="dataType"
:popper-append-to-body="false"
placeholder="请选择">
<el-option v-for="(item) in dateArray"
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="handleChangeDate(item.value)">
</el-option>
</el-select>
</div>
<div v-if="dataType==='0'"
class="second-select range-data">
<el-date-picker v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
@change="handleSelectChange">
</el-date-picker>
</div>
</div>
</div>
<div class="g-cpt-resi">
<div class="g-l">
<div class="l_top">
<div v-if="!pieNoData && !dataLoading"
class="g-pie">
<screen-echarts-frame class="echart-wr"
@myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
<div class="pie-legend">
<div :class="['legend_item',{'item_last':index===legendArray.length-1}]"
v-for="(item,index) in legendArray"
:key="index">
<div class="item_name">{{item.name}}</div>
<img :src="item.url" />
<!-- <div class="item_num">
<span class="item_count">{{item.count}}</span>
<span class="item_percent">{{item.percent}}</span>
</div> -->
</div>
</div>
</div>
<screen-nodata class="nodata"
v-if="pieNoData&& !dataLoading"></screen-nodata>
<div class="table-status"
v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
<div class="l_bottom">
<div class="bottom_label">月度新增事件统计</div>
<screen-echarts-frame v-if="!lineNoData&& !dataLoading"
class="echart-line"
@myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame>
<screen-nodata class="nodata"
v-if="lineNoData&& !dataLoading"></screen-nodata>
<div class="table-status"
v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
</div>
<div class="g-r">
<div class="m-tb">
<div class="tb">
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="toEventInfo"></cpt-tb>
</div>
<div class="m-pagination">
<el-pagination :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next,total"
@current-change="handlePageNoChange_demand">
</el-pagination>
</div>
</div>
</div>
</div>
<event-info v-if="showProject"
:eventId="eventId"
:orgId="orgId"
:orgType="orgType"
@close="showProject = false" />
</cpt-card>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import cptTb from "@/views/modules/visual/cpts/tb";
import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame";
import ScreenLoading from "@/views/modules/visual/components/screen-loading";
import ScreenNodata from "@/views/modules/visual/components/screen-nodata";
import eventInfo from "./event-info";
import { pieOption } from './pieOption.js'
import { lineOption } from './lineOption.js'
import nextTick from 'dai-js/tools/nextTick'
import dateFormat from "dai-js/tools/dateFormat";
export default {
name: "shijianchulifenxi",
data () {
return {
dataLoading: true,
pieNoData: false,
lineNoData: false,
isfirstInit: true,//
projectTotal: 0,
processingCount: 0,
processingRatio: 0,
lineChart: '',
lineOption: {},
lineInitState: false,
lineColorArray: [],
lineData: [],
lineXaxis: [],
lineSeriesData: [],
pieChartS: null,
pieChart: '',
pieOption: {},
pieInitState: false,
pieData: [],
legendArray: [
{
name: '未结案',
count: 0,
percent: '0%',
url: require('@/assets/img/shuju/measure/huang@2x.png')
},
{
name: '已结案',
count: 0,
percent: '0%',
url: require('@/assets/img/shuju/measure/lv@2x.png')
}
],
timeRange: [],
orgId: '',
orgType: 'agency',
queryStartTime: '',
queryEndTime: '',
processStatus: 'closed_case',
dataType: '1',
casOptions: [],
agencyIdArray: [],
customerList: [],
iscascaderShow: 0,
optionProps: {
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
},
dateArray: [
{
label: '近一年',
value: '1'
},
{
label: '近一个月',
value: '2'
},
{
label: '近三个月',
value: '3'
},
{
label: '近半年',
value: '4'
},
{
label: '自定义',
value: '0'
},
],
tableList: [],
demand: {
loading: true,
colList: [
{
align: "center",
width: "5%",
},
{
align: "center",
width: "15%",
},
{
align: "center",
width: "25%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "5%",
},
{
align: "center",
width: "10%",
},
],
header: ["序号", "所属组织", "事件内容", "上报渠道", "报事人", "手机号", "状态", "操作"],
list: [],
pageSize: 10,
pageNo: 1,
total: 0,
},
showProject: false,
eventId: '',
};
},
// mixins: [animate]
beforeDestroy () {
},
async created () {
},
async mounted () {
this.dataLoading = true
//
this.initData()
await this.getAgencylist()//
this.handleChangeDate(this.dataType)
//
await this.getProjectTotal()
await this.getLineChart()
this.dataLoading = false
// this.assignData()
},
methods: {
async getApiData () {
await this.getProjectTotal()
await this.getLineChart()
this.assignData()
},
async handleChangeDate (index) {
let end = new Date();
let start = new Date();
if (index === '1') {//
start.setFullYear(start.getFullYear() - 1);
console.log(start.getDate())
} else if (index === '2') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
} else if (index === '3') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
} else if (index === '4') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 183);
}
if (index != '0') {
this.queryStartTime = dateFormat(start, 'yyyy-MM-dd') + " 00:00:00"
this.queryEndTime = dateFormat(end, 'yyyy-MM-dd') + " 23:59:59"
}
if (index !== '0') {
await this.getApiData()
// this.assignPieChart()
}
},
assignData () {
this.getPie()
this.getLine()
},
handleSelectChange (value) {
this.queryStartTime = value[0] + " 00:00:00"
this.queryEndTime = value[1] + " 23:59:59"
this.getApiData();
},
//
async getAgencylist () {
const url = "/gov/org/customeragency/agencygridtree";
//const url = '/gov/org/customeragency/agencylist'
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.orgId = data.agencyId
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.orgId)
}
} else {
this.$message.error(msg);
}
},
//
async getProjectTotal () {
if (this.$refs.pieChart) {
this.$refs.pieChart.showLoading()
this.$refs.pieChart.clear()
}
const url = "/gov/project/icEvent/processAnalysis/processStatusRatio";
//const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/processStatusRatio";
let params = {
orgId: this.orgId,
orgType: this.orgType,
queryStartTime: this.queryStartTime,
queryEndTime: this.queryEndTime,
};
const { data, code, msg } = await requestPost(url, params);
if (this.$refs.pieChart) {
this.$refs.pieChart.hideLoading()
}
if (code === 0) {
this.projectTotal = parseInt(data.processingCount) + parseInt(data.closedCount);
this.legendArray = [
{
name: '已完成',
count: data.closedCount,
percent: data.closedRatio,
url: require('@/assets/img/shuju/measure/huang@2x.png')
},
{
name: '处理中',
count: data.processingCount,
percent: data.processingRatio,
url: require('@/assets/img/shuju/measure/lv@2x.png')
}
]
this.pieData = [
{
name: "已完成",
value: Math.floor(data.closedRatio * 10000) / 100
},
{
name: "处理中",
value: Math.floor(data.processingRatio * 10000) / 100
},
]
} else {
this.$message.error(msg);
}
},
//
async getTable () {
const url = "/gov/project/icEvent/processAnalysis/eventList";
//const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/processAnalysis/eventList";
let params = {
processStatus: this.processStatus,
orgId: this.orgId,
orgType: this.orgType,
queryStartTime: this.queryStartTime,
queryEndTime: this.queryEndTime,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
biz: 'eventProcessAnalysis'
};
const { data, code, msg } = await requestPost(url, params);
this.demand.loading = false;
if (code === 0) {
this.demand.total = data.total;
this.tableList = data.list
this.demand.list = data.list.map((item, index) => {
return [
index + 1,
item.gridName ? item.gridName : '',
item.eventContent ? item.eventContent : '',
item.sourceTypeName ? item.sourceTypeName : '',
item.reportUserName ? item.reportUserName : '',
item.mobile ? item.mobile : 'processing',
item.processStatus ? item.processStatus === 'closed_case' ? '已完成' : '处理中' : '',
{ type: "operate", list: ["查看"] },
];
});
} else {
this.$message.error(msg);
}
},
handlePageNoChange_demand (val) {
this.demand.pageNo = val;
this.getTable();
},
toEventInfo (index) {
const { tableList } = this;
this.eventId = tableList[index].eventId
this.showProject = true
},
pieInitOk (dom) {
this.pieChartS = dom
this.pieInitState = true
},
lineInitOk () {
this.lineInitState = true
},
getLine () {
if (this.lineInitState) {
this.assignLineChart()
} else {
setTimeout(() => {
this.getLine()
}, 500)
}
},
// 线
async getLineChart () {
if (this.$refs.lineChart) {
this.$refs.lineChart.clear()
this.$refs.lineChart.showLoading()
}
const _that = this
// this.$refs.pieChart.showLoading()
const url = "/gov/project/icEvent/processAnalysis/monthlyIncrement";
//const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/monthlyIncrement";
let params = {
orgId: this.orgId,
orgType: this.orgType,
queryStartTime: this.queryStartTime,
queryEndTime: this.queryEndTime,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
// pieChart
this.lineXaxis = []
this.lineSeriesData = []
if (data && data.length > 0) {
this.lineNoData = false
data.forEach(item => {
this.lineXaxis.push(item.monthName)
this.lineSeriesData.push(item.increment)
});
this.lineData = data
} else {
this.lineNoData = true
}
if (this.$refs.lineChart) {
this.$refs.lineChart.hideLoading()
}
} else {
this.$message.error(msg);
}
},
assignLineChart () {
this.lineOption = lineOption()
this.$refs.lineChart.setOption(this.lineOption, true)
this.$refs.lineChart.setOption({
xAxis: { data: this.lineXaxis },
series: [
{ data: this.lineSeriesData },
]
}, true)
},
getPie () {
if (this.pieInitState) {
this.assignPieChart()
} else {
setTimeout(() => {
this.getPie()
}, 500)
}
},
//
async assignPieChart () {
let maxIndex = 0
const _that = this
// pieChart
this.pieOption = pieOption(this.pieChartS)
this.pieData[0].selected = false
this.pieData[1].selected = false
this.pieOption.title.text = this.projectTotal
this.clickPie()
let fun = function (params) {
_that.clickPie(params)
}
this.$refs.pieChart.handleClick(fun)
},
clickPie (params) {
let dataIndex = params ? params.dataIndex : null
let componentIndex = params ? params.componentIndex : null
if (componentIndex === 1) {//
if (dataIndex === 0) {
this.processStatus = 'closed_case'
} else if (dataIndex === 1) {
this.processStatus = 'processing'
}
} else if (componentIndex === 2) {//
this.processStatus = ''
dataIndex = 3
}
if (dataIndex === 3) {
this.$refs.pieChart.clear()
}
this.pieData.forEach((element, index) => {
if (index === dataIndex) {
element.selected = true
element.label = {
show: true,
};
element.labelLine = {
show: true,
lineStyle: {
opacity: 1,
}
};
// element.selected = !element.selected
} else {
element.selected = false
element.label = {
show: false,
};
element.labelLine = {
show: false,
lineStyle: {
opacity: 0,
color: 'rgba(255,255,255,0)'
}
};
element.selected = false
}
});
this.pieOption.series[1].data = this.pieData
this.demand.pageNo = 1
this.getTable()
// this.$refs.pieChart.hideLoading()
this.$refs.pieChart.setOption(this.pieOption)
},
handleChangeAgency () {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
this.orgType = obj.level === 'grid' ? 'grid' : 'agency'
this.orgId = obj.agencyId
} else {
this.orgId = ''
this.orgType = ''
}
this.getApiData()
},
//
initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
var nowdate = new Date(time); //
var y = nowdate.getFullYear();
var m = nowdate.getMonth() + 1 < 10 ? "0" + (nowdate.getMonth() + 1) : nowdate.getMonth() + 1;
var d = nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate();
this.dateIdShow = y + '-' + m + '-' + d;
},
},
props: {
uid: {
type: String,
default: "",
// default: "8ada68cb6f1e4b9a8333348a39ef3aee",
},
},
computed: {},
components: {
cptCard,
cptTb,
screenEchartsFrame,
eventInfo,
ScreenLoading,
ScreenNodata
},
watch: {
dateIdShow () {
// let dataArray = this.dateIdShow.split('-')
// this.dateId = dataArray.join('')
},
uid (id) {
this.userId = id;
},
userId () {
// this.getApiData();
window.scrollTo(0, 0);
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/shijianchulifenxi.scss"
scoped
></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/search_1.scss"
scoped
></style>

12
src/views/modules/visual/communityParty/gridParty.vue

@ -166,7 +166,7 @@ export default {
await this.loadOrgData() await this.loadOrgData()
// this.loadMap() // this.loadMap()
this.getMapData() this.getMapData()
await this.getWorkUserInfo() // await this.getWorkUserInfo()
// this.isfirstInit = false // this.isfirstInit = false
// end // end
}, },
@ -458,6 +458,16 @@ export default {
if (code === 0) { if (code === 0) {
this.orgData = data this.orgData = data
this.agencyInfo = data //
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
this.orgId = this.orgData.id this.orgId = this.orgData.id
this.orgType = this.orgData.level this.orgType = this.orgData.level
this.parentPolygon = [] this.parentPolygon = []

7
src/views/modules/visual/components/screen-map/index.vue

@ -189,8 +189,8 @@ const vueGis = {
], ],
//icon //icon
iconUrlArray: [], iconUrlArray: [],
iconTextColor: "#ffffff", iconTextColor: '#ffffff',
distanceMax: null, // distanceMax: null,//
input_lat: null, input_lat: null,
input_lon: null, input_lon: null,
@ -652,8 +652,9 @@ const vueGis = {
}); });
map.addLayer(polygonLayer) map.addLayer(polygonLayer)
if (this.$route.path == '/main-shuju/visual-communityParty-gridParty' || this.$route.path == '/main-shuju/visual-communityParty-community') { // 2022.6.9 if (this.$route.path == '/main-shuju/visual-communityGovern-duoyuanfuwu-duoyuanfuwufenxi' || this.$route.path == '/main-shuju/visual-communityParty-gridParty' || this.$route.path == '/main-shuju/visual-communityParty-community') { // 2022.6.9
console.log('去掉默认点击') console.log('去掉默认点击')
} else { } else {
map.addInteraction(select); map.addInteraction(select);

17
src/views/modules/visual/cpts/tb.vue

@ -21,22 +21,13 @@
<tbody class="table-body"> <tbody class="table-body">
<tr class="table-body-tr" <tr class="table-body-tr"
v-for="(value, index) in list" v-for="(value, index) in list"
:key="index" :key="index">
@click="handleClickRow(index)">
<td class="td" <td class="td"
v-for="(item, indexs) in value" v-for="(item, indexs) in value"
:key="indexs"> :key="indexs">
<div v-if="typeof item === 'string' || typeof item === 'number'"> <div v-if="typeof item === 'string' || typeof item === 'number'">
{{ item }} {{ item }}
</div> </div>
<div v-if="typeof item === 'object'&& item.type === 'img'">
<!-- <span>{{ item.type+ item.src}}</span> -->
<img style="width:18px;height:18px"
:src="item.src"
alt="" />
</div>
<div v-if="typeof item === 'object' && item && item.type == 'index'"> <div v-if="typeof item === 'object' && item && item.type == 'index'">
<img v-if="highlightTop3 && index == 0" <img v-if="highlightTop3 && index == 0"
src="@/assets/img/shuju/top/1.png" src="@/assets/img/shuju/top/1.png"
@ -148,10 +139,6 @@ export default {
created () { }, created () { },
methods: { methods: {
//
handleClickRow (index) {
this.$emit("handleClickRow", index);
},
handleClickBtn (index, type) { handleClickBtn (index, type) {
this.$emit("operate", index, type); this.$emit("operate", index, type);
}, },
@ -204,7 +191,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
border: none; border: none;
padding: 10px 5px; padding: 20px 5px;
> div { > div {
overflow: hidden; overflow: hidden;

Loading…
Cancel
Save