13818 批量推送和单独推送 文字修改 监管部门不合适

2024年2月1日V1.0.53.2
liujun 2024-01-25 20:03:38 +08:00
parent 8159bc677c
commit 760adc19f5
4 changed files with 615 additions and 18 deletions

View File

@ -41,14 +41,12 @@
<el-table-column label="操作" width="200px">
<template slot-scope="{row}">
<el-button
v-show="edit"
type="primary"
icon="el-icon-edit"
size="mini"
@click="handleEdit(row)">修改
</el-button>
<el-button
v-show="del"
type="danger"
icon="el-icon-delete"
size="mini"
@ -516,13 +514,6 @@ export default {
})
return false
}
if (this.addForm.info.CORPINFO_ID === '') {
this.$message({
message: '请检查所属分公司不可为空',
type: 'warning'
})
return false
}
if (this.addForm.info.LONGTITUDEANDLATITUDE === '') {
this.$message({
message: '请检查经纬度不可为空',

View File

@ -41,14 +41,12 @@
<el-table-column label="操作" width="200px">
<template slot-scope="{row}">
<el-button
v-show="edit"
type="primary"
icon="el-icon-edit"
size="mini"
@click="handleEdit(row)">修改
</el-button>
<el-button
v-show="del"
type="danger"
icon="el-icon-delete"
size="mini"
@ -495,13 +493,6 @@ export default {
})
return false
}
if (this.addForm.info.CORPINFO_ID === '') {
this.$message({
message: '请检查所属分公司不可为空',
type: 'warning'
})
return false
}
if (this.addForm.info.LONGTITUDEANDLATITUDE === '') {
this.$message({
message: '请检查经纬度不可为空',

View File

@ -0,0 +1,582 @@
<template>
<div class="app-container">
<div class="rightCont">
<el-form label-width="50px">
<el-col :span="5">
<el-form-item label="名称:" label-width="110px">
<el-input v-model="form.FIRERESOURCES_NAME" style="width:206px" placeholder="请输入内容"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-form>
<div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="FIRERESOURCES_NAME" label="名称"/>
<el-table-column prop="FIRERESOURCES_TYPENAME" label="消防资源类型"/>
<el-table-column prop="LONGTITUDE" label="消防资源经纬度">
<template slot-scope="{row}">
{{ row.LONGTITUDE }} -- {{ row.LATITUDE }}
</template>
</el-table-column>
<!-- <el-table-column prop="DESCR" label="消防资源描述"/>-->
<el-table-column prop="CREATIME" label="创建时间"/>
<el-table-column label="操作" width="200px">
<template slot-scope="{row}">
<el-button
type="primary"
icon="el-icon-edit"
size="mini"
@click="handleEdit(row)">修改
</el-button>
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
@click="handleDelete(row.FIRERESOURCES_ID,row.FIRERESOURCES_NAME)">删除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
</div>
<pagination
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList()"/>
</div>
</div>
</div>
<el-dialog
:visible.sync="addForm.dialogVisible"
:title="addForm.dialogType === 'add' ? '新增' : '编辑'"
width="60%">
<el-form
ref="addForm"
:rules="addForm.rules"
:model="addForm.info"
label-position="right"
label-width="150px"
style="padding:10px 10px">
<el-row>
<el-col :span="12">
<el-row>
<el-form-item label="名称:" class="is-required">
<el-input v-model="addForm.info.FIRERESOURCES_NAME" style="width:206px" placeholder="请输入内容"/>
</el-form-item>
</el-row>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-row>
<el-form-item label="状态:" class="is-required">
<el-select v-model="addForm.info.STATE" placeholder="请选择" style="width: 205px">
<el-option
v-for="item in stateData"
:key="item.NAME"
:label="item.NAME"
:value="item.BIANMA"/>
</el-select>
</el-form-item>
</el-row>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="经纬度:" class="is-required">
<el-input v-model="addForm.info.LONGTITUDEANDLATITUDE" style="width:206px" placeholder="请选择" disabled/>
<el-button style="margin-left: 10px" type="primary" @click="handleMap"></el-button>
</el-form-item>
</el-col>
</el-row>
<el-row >
<div v-for="(item,index) in describeList" :key="item.index" >
<el-col v-if="(index%2) == 0" :span="10">
<el-form-item :label="item.label+''" prop="LABEL" class="is-required">
<el-input v-model="item.value" style="width:206px" class="required" placeholder="请输入内容"/>
</el-form-item>
</el-col>
<el-col v-if="(index%2) == 1" :span="10">
<el-form-item :label="item.label+''" prop="LABEL" class="is-required">
<el-input v-model="item.value" style="width:206px" class="required" placeholder="请输入内容"/>
</el-form-item>
</el-col>
</div>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="addForm.dialogVisible = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormMap" title="定位" width="1050px" class="dy-dialog">
<div id="map"/>
<div slot="footer" class="dialog-footer">
<span>经度</span>
<el-input v-model="LONGTITUDE" style="width: 200px" placeholder="请输入内容" disabled/>
<span>纬度</span>
<el-input v-model="LATITUDE" style="width: 200px" placeholder="请输入内容" disabled/>
<el-button @click="dialogFormMap = false"> </el-button>
<el-button type="primary" @click="setPosition"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree'
import TiandiMap from '../../../../components/TianMap/TiandiMap'
export default {
components: { Pagination, SelectTree, TiandiMap },
directives: { waves },
data() {
return {
dialogFormMap: false,
map: null,
corpList: [],
marker: null,
describeList: [
{ label: '名称', value: '' },
{ label: '水源位置', value: '' },
{ label: '吸水口规格', value: '' },
{ label: '接口形式', value: '' },
{ label: '水源类型', value: '' },
{ label: '水源编号', value: '' },
{ label: '所属单位或部门', value: '' },
{ label: '水源容量', value: '' },
{ label: '供水能力', value: '' },
{ label: '设备清单', value: '' }
],
addBtnType: true,
FIRE_RESOURCES_TYPE: '',
listLoading: true,
add: false,
del: false,
edit: false,
form: {
FIRERESOURCES_NAME: '',
FIRERESOURCES_TYPE: 'xfsy01'
},
addForm: {
dialogType: 'add', // or
dialogVisible: false,
rules: {
FIRERESOURCES_NAME: [{ required: true, message: '不可为空', trigger: 'blur' }],
FIRERESOURCES_TYPE: [{ required: true, message: '请选择消防资源类型', trigger: 'blur' }],
LONGTITUDEANDLATITUDE: [{ required: true, message: '请经纬度不可为空', trigger: 'blur' }],
CORPINFO_ID: [{ required: true, message: '请选择分公司', trigger: 'blur' }],
STATE: [{ required: true, message: '请选择状态', trigger: 'blur' }],
DESCR: [{ required: true, message: '不可为空', trigger: 'blur' }]
},
info: {
FIRERESOURCES_ID: '', //
FIRERESOURCES_NAME: '', //
FIRERESOURCES_TYPE: 'xfsy01', //
STATE: '', //
CORPINFO_ID: '', //
LONGTITUDE: '', //
LATITUDE: '', //
LONGTITUDEANDLATITUDE: '', //
DESCR: '' //
}
},
LONGTITUDE: '', //
LATITUDE: '', //
keySelect: {
FIRE_DEVICE_TYPE_ID: ''
},
treeData: [],
typeData: [],
stateData: [
{
NAME: '正常',
BIANMA: 0
}, {
NAME: '异常',
BIANMA: 1
}
],
varRegionList: [],
listQuery: {
page: 1,
limit: 20
},
ls: [],
dates: [],
total: 0,
KEYWORDS: '',
FIRE_POINT_NAME: '',
FIRE_POINT_CODE: '',
//
filterText: '',
varList: [],
pd: [],
defaultProps: {
value: 'id',
children: 'children',
label: 'name'
}
}
},
watch: {
filterText(val) {
console.log(val)
this.$refs.tree.filter(val)
}
},
created() {
this.getList()
this.hasButton()
// this.getDeviceType()
this.getDict()
this.getTreeData()
},
methods: {
addDescribe() {
this.describeList.push(
{ label: '名称', value: '' },
{ label: '水源位置', value: '' },
{ label: '吸水口规格', value: '' },
{ label: '接口形式', value: '' },
{ label: '水源类型', value: '' },
{ label: '水源编号', value: '' },
{ label: '所属单位或部门', value: '' },
{ label: '水源容量', value: '' },
{ label: '供水能力', value: '' },
{ label: '设备清单', value: '' }
)
},
removeDescribe(index) {
this.describeList.splice(this.describeList.length - 10, 10)
},
setPosition() {
this.addForm.info.LONGTITUDEANDLATITUDE = this.LATITUDE + '--' + this.LONGTITUDE
this.dialogFormMap = false
},
initTDT() {
console.log(window)
console.log(window.T)
return new Promise((resolve, reject) => {
if (window.T) {
console.log('天地图初始化成功...')
resolve(window.T)
reject('error')
} else {
console.info(999999999)
}
}).then(T => {
window.T = T
})
},
/**
* 初始化地图
* @param {*} lng 经度
* @param {*} lat 纬度
* @param {*} zoom 缩放比例(1~18)
*/
initMap(lng, lat, zoom) {
this.initTDT().then((T) => {
const imageURL = 'http://t0.tianditu.gov.cn/img_w/wmts?' + 'SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles' + '&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce'
//
this.lay = new window.T.TileLayer(imageURL, { minZoom: 1, maxZoom: 18 })
//
this.map = new window.T.Map('map')
this.initCenter(lng, lat, zoom)
})
},
initCenter(lng, lat, zoom) {
//
if (!this.LONGTITUDE && !this.LATITUDE) {
this.map.centerAndZoom(new window.T.LngLat(119.58, 39.94), zoom)
console.log(123)
} else {
this.map.centerAndZoom(new window.T.LngLat(lng, lat), zoom)
this.marker && this.map.removeOverLay(this.marker)
this.LONGTITUDE = lng
this.LATITUDE = lat
this.marker = new window.T.Marker(new window.T.LngLat(lng, lat))
//
this.map.addOverLay(this.marker)
}
//
this.map.setMapType(window.TMAP_HYBRID_MAP)
//
this.map.enableScrollWheelZoom()
//
this.map.enableInertia()
//
this.map.addEventListener('click', this.MapClick)
},
MapClick(event) {
this.marker && this.map.removeOverLay(this.marker)
this.LONGTITUDE = event.lnglat.getLng()
this.LATITUDE = event.lnglat.getLat()
this.marker = new window.T.Marker(new window.T.LngLat(event.lnglat.getLng(), event.lnglat.getLat()))
//
this.map.addOverLay(this.marker)
},
handleMap() {
this.dialogFormMap = true
this.$nextTick(() => {
console.log(!this.map)
if (!this.map) this.initMap(this.LONGTITUDE, this.LATITUDE, 16)
else this.initCenter(this.LONGTITUDE, this.LATITUDE, 16)
})
},
confirm() {
this.$refs.addForm.validate(valid => {
if (this.addForm.info.FIRERESOURCES_NAME === '') {
this.$message({
message: '名称不可为空',
type: 'warning'
})
return false
}
if (this.addForm.info.STATE === '') {
this.$message({
message: '请检查状态不可为空',
type: 'warning'
})
return false
}
if (this.addForm.info.LONGTITUDEANDLATITUDE === '') {
this.$message({
message: '请检查经纬度不可为空',
type: 'warning'
})
return false
}
if (this.describeList.length > 0) {
for (var i = 0; i < this.describeList.length; i++) {
if (this.describeList[i].value === '') {
this.$message({
message: this.describeList[i].label + '不可为空',
type: 'warning'
})
return false
}
}
}
this.addForm.info.DESCR = JSON.stringify(this.describeList)
this.addForm.info.LATITUDE = this.LATITUDE
this.addForm.info.LONGTITUDE = this.LONGTITUDE
if (valid) {
requestFN(
'/fireResources/' + this.addForm.dialogType,
{
...this.addForm.info
}
).then((data) => {
this.$message.success('保存成功')
this.getList()
this.addForm.dialogVisible = false
}).catch((e) => {
})
} else {
return false
}
})
},
getTreeData() {
requestFN(
'/department/listTree',
{}
).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
},
handleEdit(row) {
this.resetAddForm()
this.addForm.info.FIRERESOURCES_ID = row.FIRERESOURCES_ID
this.addForm.info.FIRERESOURCES_NAME = row.FIRERESOURCES_NAME
this.addForm.info.FIRERESOURCES_TYPE = row.FIRERESOURCES_TYPE
this.addForm.info.LATITUDE = row.LATITUDE
this.addForm.info.LONGTITUDE = row.LONGTITUDE
this.addForm.info.STATE = row.STATE
this.addForm.info.CORPINFO_ID = row.CORPINFO_ID
this.LONGTITUDE = row.LONGTITUDE
this.LATITUDE = row.LATITUDE
this.addForm.info.LONGTITUDEANDLATITUDE = row.LATITUDE + '--' + row.LONGTITUDE
this.describeList = []
if (row.DESCR) {
this.describeList = JSON.parse(row.DESCR)
}
this.addForm.dialogType = 'edit'
this.addForm.dialogVisible = true
},
getRowKey(row) {
return row.FIRE_DEVICE_ID
},
//
handleAdd() {
this.resetAddForm()
this.describeList = [
{ label: '名称', value: '' },
{ label: '水源位置', value: '' },
{ label: '吸水口规格', value: '' },
{ label: '接口形式', value: '' },
{ label: '水源类型', value: '' },
{ label: '水源编号', value: '' },
{ label: '所属单位或部门', value: '' },
{ label: '水源容量', value: '' },
{ label: '供水能力', value: '' },
{ label: '设备清单', value: '' }
]
this.addForm.dialogType = 'add'
this.addForm.dialogVisible = true
},
resetAddForm() {
this.LATITUDE = ''
this.LONGTITUDE = ''
this.addForm.info = {
FIRERESOURCES_ID: '', //
FIRERESOURCES_NAME: '', //
FIRERESOURCES_TYPE: 'xfsy01', //
STATE: '', //
CORPINFO_ID: '', //
LONGTITUDE: '', //
LATITUDE: '', //
LONGTITUDEANDLATITUDE: '', //
DESCR: '' //
}
},
//
getQuery() {
this.getList()
},
//
getList() {
this.listLoading = true
this.varList = []
this.FIRE_POINT_ID =
requestFN(
'/fireResources/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
FIRERESOURCES_NAME: this.form.FIRERESOURCES_NAME,
FIRERESOURCES_TYPE: this.form.FIRERESOURCES_TYPE
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
}).catch((e) => {
this.listLoading = false
})
},
goKeyReset() {
this.form.FIRERESOURCES_NAME = ''
this.getList()
},
getDict() {
requestFN(
'dictionaries/getLevels',
{
DICTIONARIES_ID: '6bba977985f6427e9d0b52afe8884d1a'
}
).then((data) => {
this.typeData = data.list
})
.catch((e) => {
this.listLoading = false
})
},
handleDelete(id, name) {
this.$confirm('确定要删除编号为[' + name + ']的消防资源吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/fireResources/delete',
{
FIRERESOURCES_ID: id
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList(this.FIRE_POINT_ID)
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
hasButton: function() {
var keys = 'fireresources:add,fireresources:del,fireresources:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.fireresourcesfhadminadd //
this.del = data.fireresourcesfhadmindel //
this.edit = data.fireresourcesfhadminedit //
this.toExcel = data.toExcel // excel
}).catch((e) => {
this.listLoading = false
})
}
}
}
</script>
<style scoped>
.returnBtn {
float: right;
}
.app-container {
display: flex; /**/
align-items: baseline;
}
.rightCont {
width: 100%
}
#map {
width: 1000px;
height: 500px;
}
</style>

View File

@ -0,0 +1,33 @@
<template>
<!-- <component :is="activeName" />-->
<div>
<List v-show="activeName=='List'" ref="list" />
</div>
</template>
<script>
import List from './components/list.vue'
export default {
components: {
List: List
},
data() {
return {
activeName: 'List'
}
},
watch: {
activeName(val) {
if (val == 'List') {
this.$refs.list.getList()
this.$refs.list.getTreeList()
}
}
}
}
</script>
<style scoped>
</style>