大屏
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chart1" style="width: 100%; height: 160px;"></div>
|
<div class="chart1" style="width: 100%; height: 150px;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="title">居民群统计</div>
|
<div class="title">居民群统计</div>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chart2" style="width: 100%; height: 160px;"></div>
|
<div class="chart2" style="width: 100%; height: 150px;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item item-tags">
|
<div class="item item-tags">
|
||||||
<div class="title">宣发统计</div>
|
<div class="title">宣发统计</div>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<p>{{ xfInfo.receiveCount || 0 }}</p>
|
<p>{{ xfInfo.receiveCount || 0 }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chart11" style="width: 336px; margin-top: 10px; height: 160px;"></div>
|
<div class="chart11" style="width: 336px; margin-top: 10px; height: 150px;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-content__item" v-show="leftIndex === 1">
|
<div class="tab-content__item" v-show="leftIndex === 1">
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<template>
|
||||||
|
<div class="doc-circulation ailist-wrapper">
|
||||||
|
<keep-alive :include="['List']">
|
||||||
|
<component ref="component" :moduleName="moduleName" :moduleId="moduleId" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||||
|
</keep-alive>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import List from './components/List'
|
||||||
|
import Add from './components/Add'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AppCheckpointManage',
|
||||||
|
label: '卡口管理',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object
|
||||||
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
component: 'List',
|
||||||
|
params: {},
|
||||||
|
moduleId: '',
|
||||||
|
include: [],
|
||||||
|
moduleName: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
components: {
|
||||||
|
Add,
|
||||||
|
List
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onChange (data) {
|
||||||
|
if (data.type === 'Add') {
|
||||||
|
this.component = 'Add'
|
||||||
|
this.params = data.params
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.type === 'list') {
|
||||||
|
this.component = 'List'
|
||||||
|
this.params = data.params
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (data.isRefresh) {
|
||||||
|
this.$refs.component.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.doc-circulation {
|
||||||
|
height: 100%;
|
||||||
|
background: #F3F6F9;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
<template>
|
||||||
|
<ai-detail class="content-add">
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title :title="params.id ? '编辑卡口' : '添加卡口'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||||
|
</ai-title>
|
||||||
|
</template>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-card title="基本信息">
|
||||||
|
<template #content>
|
||||||
|
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
||||||
|
<el-form-item prop="name" style="width: 100%;" label="卡口名称" :rules="[{required: true, message: '请输入卡口名称', trigger: 'blur'}]">
|
||||||
|
<el-input size="small" v-model="form.name" placeholder="请输入卡口名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="remark" style="width: 100%;" label="备注" :rules="[{required: true, message: '请输入备注', trigger: 'blur'}]">
|
||||||
|
<el-input size="small" type="textarea" :rows="5" placeholder="请输入备注" v-model="form.remark"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
</ai-card>
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="cancel">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirm">提交</el-button>
|
||||||
|
</template>
|
||||||
|
</ai-detail>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Add',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
params: Object
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
info: {},
|
||||||
|
form: {
|
||||||
|
name: '',
|
||||||
|
remark: ''
|
||||||
|
},
|
||||||
|
id: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created () {
|
||||||
|
if (this.params && this.params.id) {
|
||||||
|
this.id = this.params.id
|
||||||
|
this.getInfo(this.params.id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getInfo (id) {
|
||||||
|
this.instance.post(`/app/appepidemicpreventiongateway/queryDetailById?id=${id}`).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.form = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
confirm () {
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.instance.post(`/app/appepidemicpreventiongateway/addOrUpdate`, {
|
||||||
|
...this.form
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('提交成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
this.cancel(true)
|
||||||
|
}, 600)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
cancel (isRefresh) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'list',
|
||||||
|
isRefresh: !!isRefresh
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
181
project/pingchang/apps/AppCheckpointManage/components/List.vue
Normal file
181
project/pingchang/apps/AppCheckpointManage/components/List.vue
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
<template>
|
||||||
|
<ai-list class="notice">
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title title="卡口管理" isShowBottomBorder></ai-title>
|
||||||
|
</template>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-search-bar class="search-bar">
|
||||||
|
<template #left>
|
||||||
|
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">添加</el-button>
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<el-input
|
||||||
|
v-model="search.name"
|
||||||
|
class="search-input"
|
||||||
|
size="small"
|
||||||
|
v-throttle="() => {search.current = 1, getList()}"
|
||||||
|
placeholder="卡口名称"
|
||||||
|
clearable
|
||||||
|
@clear="search.current = 1, search.name = '', getList()"
|
||||||
|
suffix-icon="iconfont iconSearch">
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</ai-search-bar>
|
||||||
|
<ai-table
|
||||||
|
:tableData="tableData"
|
||||||
|
:col-configs="colConfigs"
|
||||||
|
:total="total"
|
||||||
|
style="margin-top: 6px;"
|
||||||
|
v-loading="isLoading"
|
||||||
|
:current.sync="search.current"
|
||||||
|
:size.sync="search.size"
|
||||||
|
@getList="getList">
|
||||||
|
<el-table-column slot="qrcode" width="200px" label="二维码" align="center">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<div class="qrcode">
|
||||||
|
<el-button type="text" @click="qrcode(row.qrCode, row.id)">{{ row.qrCode ? '预览' : '生成' }}</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column slot="options" width="180px" fixed="right" label="操作" align="center">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<div class="table-options">
|
||||||
|
<el-button type="text" @click="downloadImg(row.qrCode)">下载二维码</el-button>
|
||||||
|
<el-button type="text" @click="toAdd(row.id)">编辑</el-button>
|
||||||
|
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
<div class="qrCode" v-viewer="{movable: true}" v-show="false">
|
||||||
|
<img :src="img">
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Viewer from 'v-viewer'
|
||||||
|
import Vue from 'vue'
|
||||||
|
Vue.use(Viewer)
|
||||||
|
export default {
|
||||||
|
name: 'List',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
search: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
name: ''
|
||||||
|
},
|
||||||
|
img: '',
|
||||||
|
isLoading: false,
|
||||||
|
total: 10,
|
||||||
|
colConfigs: [
|
||||||
|
{ type: 'index', label: '序号', align: 'left' },
|
||||||
|
{ prop: 'name', label: '卡口名称', align: 'center' },
|
||||||
|
{ prop: 'remark', label: '备注', align: 'center' },
|
||||||
|
{ slot: 'qrcode', label: '二维码', align: 'center' },
|
||||||
|
{ slot: 'options', label: '操作', align: 'center' }
|
||||||
|
],
|
||||||
|
tableData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.instance.post(`/app/appepidemicpreventiongateway/list`, null, {
|
||||||
|
params: {
|
||||||
|
...this.search
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
downloadImg (url) {
|
||||||
|
if (!url) {
|
||||||
|
return this.$message.error('请先生成二维码')
|
||||||
|
}
|
||||||
|
|
||||||
|
this.isLoading = true
|
||||||
|
let image = new Image()
|
||||||
|
image.setAttribute('crossOrigin', 'anonymous')
|
||||||
|
image.onload = function () {
|
||||||
|
let canvas = document.createElement('canvas')
|
||||||
|
canvas.width = image.width
|
||||||
|
canvas.height = image.height
|
||||||
|
let context = canvas.getContext('2d')
|
||||||
|
context.drawImage(image, 0, 0, image.width, image.height)
|
||||||
|
let url = canvas.toDataURL("image/png")
|
||||||
|
let a = document.createElement("a")
|
||||||
|
let event = new MouseEvent("click")
|
||||||
|
a.download = '二维码'
|
||||||
|
a.href = url
|
||||||
|
a.dispatchEvent(event)
|
||||||
|
}
|
||||||
|
image.src = url
|
||||||
|
this.isLoading = false
|
||||||
|
},
|
||||||
|
|
||||||
|
qrcode (qrcode, id) {
|
||||||
|
if (!qrcode) {
|
||||||
|
this.isLoading = true
|
||||||
|
this.instance.post(`/app/appepidemicpreventiongateway/createQRCode?id=${id}&width=400&height=400`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('二维码生成成功!')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
this.isLoading = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.img = qrcode
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
const viewer = this.$el.querySelector('.qrCode').$viewer
|
||||||
|
viewer.view()
|
||||||
|
}, 600)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
remove(id) {
|
||||||
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
|
this.instance.post(`/app/appepidemicpreventiongateway/delete?ids=${id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('删除成功!')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
toAdd(id) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'Add',
|
||||||
|
params: {
|
||||||
|
id: id || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.notice {
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -11,6 +11,9 @@
|
|||||||
<el-form-item prop="areaId" style="width: 100%;" label="选择地区" :rules="[{required: true, message: '请选择地区', trigger: 'change'}]">
|
<el-form-item prop="areaId" style="width: 100%;" label="选择地区" :rules="[{required: true, message: '请选择地区', trigger: 'change'}]">
|
||||||
<ai-area-select clearable @fullname="v => form.areaName = v" always-show :instance="instance" v-model="form.areaId"></ai-area-select>
|
<ai-area-select clearable @fullname="v => form.areaName = v" always-show :instance="instance" v-model="form.areaId"></ai-area-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item prop="address" style="width: 100%;" label="详细地址">
|
||||||
|
<el-input size="small" type="textarea" :rows="5" placeholder="请输入详细地址" v-model="form.address"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="风险等级" style="width: 100%;" prop="level" :rules="[{required: true, message: '请选择风险等级', trigger: 'change'}]">
|
<el-form-item label="风险等级" style="width: 100%;" prop="level" :rules="[{required: true, message: '请选择风险等级', trigger: 'change'}]">
|
||||||
<ai-select
|
<ai-select
|
||||||
v-model="form.level"
|
v-model="form.level"
|
||||||
@@ -47,7 +50,8 @@
|
|||||||
form: {
|
form: {
|
||||||
level: '',
|
level: '',
|
||||||
areaId: '',
|
areaId: '',
|
||||||
areaName: ''
|
areaName: '',
|
||||||
|
address: ''
|
||||||
},
|
},
|
||||||
id: ''
|
id: ''
|
||||||
}
|
}
|
||||||
@@ -68,7 +72,7 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getInfo (id) {
|
getInfo (id) {
|
||||||
this.instance.post(`/app/appepidemicdangerousarea/queryDetailById?id=${id}`).then(res => {
|
this.instance.post(`/app/appepidemicpreventionriskarea/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form = res.data
|
this.form = res.data
|
||||||
}
|
}
|
||||||
@@ -78,7 +82,7 @@
|
|||||||
confirm () {
|
confirm () {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.instance.post(`/app/appepidemicdangerousarea/addOrUpdate`, {
|
this.instance.post(`/app/appepidemicpreventionriskarea/addOrUpdate`, {
|
||||||
...this.form
|
...this.form
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
{ prop: 'district', label: '区级', align: 'center' },
|
{ prop: 'district', label: '区级', align: 'center' },
|
||||||
{ prop: 'town', label: '镇级', align: 'center' },
|
{ prop: 'town', label: '镇级', align: 'center' },
|
||||||
{ prop: 'village', label: '村级', align: 'center' },
|
{ prop: 'village', label: '村级', align: 'center' },
|
||||||
|
{ prop: 'address', label: '详细地址', align: 'center' },
|
||||||
{ prop: 'level', label: '等级', align: 'center', formart: v => this.dict.getLabel('epidemicDangerousAreaLevel', v) },
|
{ prop: 'level', label: '等级', align: 'center', formart: v => this.dict.getLabel('epidemicDangerousAreaLevel', v) },
|
||||||
{ prop: 'createTime', label: '设置时间', align: 'center' },
|
{ prop: 'createTime', label: '设置时间', align: 'center' },
|
||||||
{ prop: 'createUserName', label: '添加人', align: 'center' },
|
{ prop: 'createUserName', label: '添加人', align: 'center' },
|
||||||
@@ -100,7 +101,7 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appepidemicdangerousarea/list`, null, {
|
this.instance.post(`/app/appepidemicpreventionriskarea/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
...this.search
|
...this.search
|
||||||
}
|
}
|
||||||
@@ -114,7 +115,7 @@
|
|||||||
|
|
||||||
remove(id) {
|
remove(id) {
|
||||||
this.$confirm('确定删除该数据?').then(() => {
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
this.instance.post(`/app/appepidemicdangerousarea/delete?ids=${id}`).then(res => {
|
this.instance.post(`/app/appepidemicpreventionriskarea/delete?ids=${id}`).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success('删除成功!')
|
this.$message.success('删除成功!')
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|||||||
Reference in New Issue
Block a user