jevononlie 5 months ago
parent 8b58eb28fd
commit 77ce4e50ba

@ -8,12 +8,12 @@
*/ */
module.exports = { module.exports = {
//测试环境接口配置 3333 //测试环境接口配置 3333
APIURl: 'http://222.71.165.187:30000' // APIURl: 'http://222.71.165.187:30000'
//生产环境接口配置 5555 //生产环境接口配置 5555
// APIURl: 'http://222.71.165.187:50000' // APIURl: 'http://222.71.165.187:50000'
// 开发环境接口配置 // 开发环境接口配置
// APIURl: 'http://127.0.0.1:30000' APIURl: 'http://127.0.0.1:30000'
// 测试环境接口配置 // 测试环境接口配置
// APIURl: 'http://192.168.0.23:30000' // APIURl: 'http://192.168.0.23:30000'
} }

@ -1,19 +1,19 @@
<template> <template>
<el-dialog :title="title" style="z-index: 9999;" :append-to-body="true" :close-on-click-modal="false" :visible="true" top="10vh" width="90%" append-to-body <el-dialog :title="title" style="z-index: 9999;" :append-to-body="true" :close-on-click-modal="false" :visible="true"
modal-append-to-body :before-close="handleClose" class="my-dialog"> top="10vh" width="90%" append-to-body modal-append-to-body :before-close="handleClose" class="my-dialog">
<div class="cont"> <div class="cont">
<div class="tips"> <div class="tips">
<p>1绘制鼠标左键点击及移动即可绘制图形; &nbsp;&nbsp; 2结束绘制鼠标左键双击即可结束绘制折线多边形会自动闭合圆形矩形椭圆单击即可结束</p> <p>1绘制鼠标左键点击及移动即可绘制图形; &nbsp;&nbsp; 2结束绘制鼠标左键双击即可结束绘制折线多边形会自动闭合圆形矩形椭圆单击即可结束</p>
</div> </div>
<div class="addpolygon"> <div class="addpolygon">
<div id="mapFencecontainer"> <div id="mapFencecontainer">
<div class="mapBtn"> <div class="mapBtn">
<template v-if="mode == 'add'"> <template v-if="mode == 'add'">
<el-button size="small" type="primary" @click="clearOverlays"></el-button> <el-button size="small" type="primary" @click="clearOverlays"></el-button>
<el-button size="small" type="primary" @click="combineOverlays"></el-button> <el-button size="small" type="primary" @click="combineOverlays"></el-button>
</template> </template>
<el-button size="small" type="primary" @click="sendLngLat"></el-button> <el-button v-else size="small" type="primary" @click="editCombineOverlays"></el-button>
</div> </div>
</div> </div>
<div class="loadMap" v-if="loadMapFlag">...</div> <div class="loadMap" v-if="loadMapFlag">...</div>
</div> </div>
@ -31,61 +31,23 @@ import axios from 'axios'
let overlaysArray = []; // , let overlaysArray = []; // ,
// //
export default { export default {
props: ['position', 'areaMapInfo', 'mode'], props: ['position', 'dataForm', 'mode'],
data() { data() {
return { return {
longitude: '', longitude: '',
latitude: '', latitude: '',
lngLatData: [], // lngLatData: [], //
polygonPath: [ polygonPath: [
{ // {
provider: 'provider1', // provider: 'provider1',
editable: false, // editable: false,
polygonsVOS: [ // areaMapInfo: '[{"lat":31.125083855992244,"lng":121.18080418556929},{"lat":31.123026545535918,"lng":121.18114750832319},{"lat":31.123816411075495,"lng":121.18724148720503},{"lat":31.126828861148027,"lng":121.18616860359907}]'
{ // },
lat: '31.035352998532925', // {
lng: '121.22047942131758', // provider: 'provider2',
}, // editable: false,
{ // areaMapInfo: '[{"lat":31.12153691930525,"lng":121.18181705474854},{"lat":31.117881352066963,"lng":121.18325471878052},{"lat":31.119222355395767,"lng":121.19102239608765},{"lat":31.12271254919646,"lng":121.18784666061401}]'
lat: '31.034433694479787', // }
lng: '121.22200291603804',
},
{
lat: '31.035408156493887',
lng: '121.22356932610273',
},
{
lat: '31.03625390789439',
lng: '121.22146647423506',
}
]
},
{
provider: 'provider2',
editable: true,
polygonsVOS: [
{
"lat": 31.036180364592568,
"lng": 121.22818272560835
},
{
"lat": 31.033992425381925,
"lng": 121.22753899544477
},
{
"lat": 31.03472787274239,
"lng": 121.22535031288862
},
{
"lat": 31.03625390789439,
"lng": 121.22625153511763
},
{
"lat": 31.036879023666664,
"lng": 121.2274531647563
}
]
}
], ],
editor: null, editor: null,
loadMapFlag: true, loadMapFlag: true,
@ -108,6 +70,9 @@ export default {
handleClose() { handleClose() {
this.$emit('areaVisibleChange', false) this.$emit('areaVisibleChange', false)
}, },
editCombineOverlays() {
this.$emit('areaVisibleChange', false, this.targetAreaPath)
},
combineOverlays() { combineOverlays() {
const lngLat = []; const lngLat = [];
for (var i = 0;i < overlaysArray.length;i++) { for (var i = 0;i < overlaysArray.length;i++) {
@ -121,13 +86,7 @@ export default {
} }
} }
this.targetAreaPath = lngLat this.targetAreaPath = lngLat
const obj = { this.$emit('areaVisibleChange', false, this.targetAreaPath)
provider: '新增商户',
editable: true,
polygonsVOS: lngLat,
}
this.polygonPath.push(obj)
this.setMapData(true)
}, },
// //
clearOverlays() { clearOverlays() {
@ -139,18 +98,29 @@ export default {
} }
overlaysArray = []; // overlaysArray = []; //
}, },
// clearOverlays() {
// polygon.setMap(null);
// },
sendLngLat() {
this.$emit('areaVisibleChange', false, this.targetAreaPath)
},
/** /**
* // * //
*/ */
getMyLocation() { getMyLocation() {
const geolocation = new qq.maps.Geolocation('U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6', '易回收后台'); // const url = `https://apis.map.qq.com/ws/location/v1/ip?key=U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6`
geolocation.getLocation(this.showPosition, this.showErr); // axios.get(url).then(function (response) {
// console.log('ip', response)
// })
// .catch(function (error) {
// console.error(error);
// });
// const ip =
// const url = `https://apis.map.qq.com/ws/location/v1/ip=${ip}&key=${key}`
// axios.get("").then(function (response) {
// _this.polygonPath = response.data
// _this.showArrayPolygon()
// })
// .catch(function (error) {
// console.error(error);
// });
const geolocation = new qq.maps.Geolocation('U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6', '易回收后台');
console.log('geolocation', geolocation)
geolocation.getLocation(this.showPosition, this.showErr);
}, },
showPosition(position) { showPosition(position) {
this.loadMapFlag = false this.loadMapFlag = false
@ -169,6 +139,7 @@ export default {
* 位置信息在地图上展示 * 位置信息在地图上展示
*/ */
setMapData(flag) { setMapData(flag) {
// const myLatlng = new qq.maps.LatLng(31.122163, 121.190419);
const myLatlng = new qq.maps.LatLng(this.position.latitude, this.position.longitude); const myLatlng = new qq.maps.LatLng(this.position.latitude, this.position.longitude);
console.log("当前位置:"+this.position.latitude, this.position.longitude, myLatlng) console.log("当前位置:"+this.position.latitude, this.position.longitude, myLatlng)
const myOptions = { const myOptions = {
@ -187,6 +158,8 @@ export default {
if (!flag) { if (!flag) {
// //
this.getAllPolygons() this.getAllPolygons()
} else { } else {
this.showArrayPolygon() this.showArrayPolygon()
/**绘制围栏 */ /**绘制围栏 */
@ -248,7 +221,7 @@ export default {
lng: lng lng: lng
}); });
} }
this.targetAreaPath = lngLat _this.targetAreaPath = lngLat
console.log("adjustNode后获得的"+JSON.stringify(lngLat,null,4)); // console.log("adjustNode后获得的"+JSON.stringify(lngLat,null,4)); //
}) })
}, },
@ -256,39 +229,33 @@ export default {
* 获取所有围栏 * 获取所有围栏
*/ */
getAllPolygons(){ getAllPolygons(){
debugger
const _this = this;
request({ request({
url: '/api/scm/StationArea/getOthersArea/', url: '/api/scm/StationArea/get/others',
method: 'post' method: 'get',
}).then(res => { }).then(res => {
console.log('getOthersArea',res) console.log('getOthersArea',res)
// this.dataInfo(res.data) this.polygonPath = res.data
this.polygonPath.forEach(e => {
e.editable = false
if (this.mode == 'edit' && this.dataForm.id == e.id) {
e.editable = true
}
})
this.showArrayPolygon()
/**绘制围栏 */
this.addpolygon();
}).catch(function (error) {
console.error(error);
}); });
// axios.get(url.url + "/v1/polygons/findAll").then(function (response) {
// _this.polygonPath = response.data
// _this.showArrayPolygon()
// })
// .catch(function (error) {
// console.error(error);
// });
if (this.mode == 'add') {
_this.polygonPath = _this.polygonPath.filter(e => !e.editable)
}
_this.showArrayPolygon()
/**绘制围栏 */
this.addpolygon();
}, },
/**循环调用显示围栏方法 */ /**循环调用显示围栏方法 */
showArrayPolygon(){ showArrayPolygon(){
const _this = this const _this = this
for (const polygonpath of _this.polygonPath) { for (const polygonpath of _this.polygonPath) {
path = [] const path = []
for (const polygonsvos of polygonpath.polygonsVOS) { const areaMapInfo = polygonpath.areaMapInfo && JSON.parse(polygonpath.areaMapInfo)
path.push(new qq.maps.LatLng(polygonsvos.lat, polygonsvos.lng)) for (const areaMapInfo of areaMapInfo) {
path.push(new qq.maps.LatLng(areaMapInfo.lat, areaMapInfo.lng))
} }
_this.showpolygons(path, polygonpath.editable) _this.showpolygons(path, polygonpath.editable)
} }
@ -310,7 +277,7 @@ export default {
const _this = this const _this = this
polygon = new qq.maps.Polygon({ polygon = new qq.maps.Polygon({
map: map, map: map,
editable, editable: editable,
strokeColor: new qq.maps.Color(202, 67, 58, 0.8), strokeColor: new qq.maps.Color(202, 67, 58, 0.8),
fillColor: new qq.maps.Color(202, 67, 58, 0.1) fillColor: new qq.maps.Color(202, 67, 58, 0.1)
}); });

@ -2,111 +2,110 @@
<template> <template>
<transition name="el-zoom-in-center"> <transition name="el-zoom-in-center">
<div class="JNPF-preview-main"> <div class="JNPF-preview-main">
<div class="JNPF-common-page-header"> <div class="JNPF-common-page-header">
<el-page-header @back="goBack" <el-page-header @back="goBack" :content="!dataForm.id ? '新建':'编辑'" />
:content="!dataForm.id ? '新建':'编辑'"/> <div class="options">
<div class="options"> <el-dropdown class="dropdown" placement="bottom">
<el-dropdown class="dropdown" placement="bottom"> <el-button style="width:70px">
<el-button style="width:70px"> <i class="el-icon-arrow-down el-icon--right"></i>
<i class="el-icon-arrow-down el-icon--right"></i> </el-button>
</el-button> <el-dropdown-menu slot="dropdown">
<el-dropdown-menu slot="dropdown"> <template v-if="dataForm.id">
<template v-if="dataForm.id"> <el-dropdown-item @click.native="prev" :disabled='prevDis'>
<el-dropdown-item @click.native="prev" :disabled='prevDis'> {{'上一条'}}
{{'上一条'}} </el-dropdown-item>
</el-dropdown-item> <el-dropdown-item @click.native="next" :disabled='nextDis'>
<el-dropdown-item @click.native="next" :disabled='nextDis'> {{'下一条'}}
{{'下一条'}} </el-dropdown-item>
</el-dropdown-item> </template>
</template> <el-dropdown-item type="primary" @click.native="dataFormSubmit(2)" :loading="continueBtnLoading"
<el-dropdown-item type="primary" @click.native="dataFormSubmit(2)" :disabled='btnLoading'>
:loading="continueBtnLoading" :disabled='btnLoading'> {{!dataForm.id ?'确定并新增':'确定并继续'}}</el-dropdown-item>
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-dropdown-item> </el-dropdown-menu>
</el-dropdown-menu> </el-dropdown>
</el-dropdown> <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading" :disabled='continueBtnLoading'>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading" :disabled='continueBtnLoading'> </el-button> </el-button>
<el-button @click="goBack"> </el-button> <el-button @click="goBack"> </el-button>
</div> </div>
</div> </div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}"> <el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right" > <el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
<template v-if="!loading"> label-position="right">
<!-- 具体表单 --> <template v-if="!loading">
<el-col :span="24" > <!-- 具体表单 -->
<jnpf-form-tip-item <el-col :span="24">
label="区域名称" tipLabel="围栏区域名称" prop="areaName" > <jnpf-form-tip-item label="区域名称" tipLabel="围栏区域名称" prop="areaName">
<JnpfInput v-model="dataForm.areaName" @change="changeData('areaName',-1)" <JnpfInput v-model="dataForm.areaName" @change="changeData('areaName',-1)" placeholder="电子围栏名称"
placeholder="电子围栏名称" clearable :style='{"width":"100%"}'> clearable :style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item <jnpf-form-tip-item label="区域类型" tipLabel="请选择围栏类型" prop="areaType">
label="区域类型" tipLabel="请选择围栏类型" prop="areaType" > <JnpfSelect v-model="dataForm.areaType" @change="changeData('areaType',-1)" placeholder="请选择围栏类型"
<JnpfSelect v-model="dataForm.areaType" @change="changeData('areaType',-1)" clearable :style='{"width":"100%"}' :options="areaTypeOptions" :props="areaTypeProps">
placeholder="请选择围栏类型" clearable :style='{"width":"100%"}' :options="areaTypeOptions" :props="areaTypeProps" > </JnpfSelect>
</JnpfSelect> </jnpf-form-tip-item>
</jnpf-form-tip-item> </el-col>
</el-col> <el-col :span="24">
<el-col :span="24" > <jnpf-form-tip-item label="绑定商户" prop="companyId">
<jnpf-form-tip-item <JnpfPopupSelect v-model="dataForm.companyId" @change="changeData('companyId',-1)" :rowIndex="null"
label="绑定商户" prop="companyId" > :formData="dataForm" :templateJson="interfaceRes.companyId" placeholder="请选择" hasPage
<JnpfPopupSelect v-model="dataForm.companyId" @change="changeData('companyId',-1)" propsValue="f_id" popupWidth="600px" popupTitle="选择商户" popupType="dialog"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.companyId" placeholder="请选择" hasPage propsValue="f_id" popupWidth="600px" popupTitle="选择商户" popupType="dialog" relationField='f_full_name' field='companyId' interfaceId="563326097714841605" :pageSize="20" :columnOptions="companyIdcolumnOptions" clearable :style='{"width":"100%"}'> relationField='f_full_name' field='companyId' interfaceId="563326097714841605" :pageSize="20"
</JnpfPopupSelect> :columnOptions="companyIdcolumnOptions" clearable :style='{"width":"100%"}'>
</jnpf-form-tip-item> </JnpfPopupSelect>
</el-col> </jnpf-form-tip-item>
<el-col :span="24" > </el-col>
<jnpf-form-tip-item <el-col :span="24">
label="是否启用" prop="status" > <jnpf-form-tip-item label="是否启用" prop="status">
<JnpfRadio v-model="dataForm.status" @change="changeData('status',-1)" <JnpfRadio v-model="dataForm.status" @change="changeData('status',-1)" optionType="default"
optionType="default" direction="horizontal" size="small" :options="statusOptions" :props="statusProps" > direction="horizontal" size="small" :options="statusOptions" :props="statusProps">
</JnpfRadio> </JnpfRadio>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item <jnpf-form-tip-item label="地图信息" tipLabel="在地图上绘制电子围栏" prop="areaMapInfo">
label="地图信息" tipLabel="在地图上绘制电子围栏" prop="areaMapInfo" > <JnpfInput v-model="dataForm.areaMapInfo" placeholder="绘制电子围栏区域" @focus="handLeArea" readonly
<JnpfInput v-model="dataForm.areaMapInfo" @change="changeData('areaMapInfo',-1)" :maxlength="65539" clearable prefix-icon='el-icon-map-location' :style='{"width":"100%"}'
placeholder="绘制电子围栏区域" @focus="handLeArea" readonly :maxlength="65539" clearable prefix-icon='el-icon-map-location' :style='{"width":"100%"}' show-password > show-password>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item <jnpf-form-tip-item label="区域描述" tipLabel="请输入区域描述" prop="areaDesc">
label="区域描述" tipLabel="请输入区域描述" prop="areaDesc" > <JnpfTextarea v-model="dataForm.areaDesc" @change="changeData('areaDesc',-1)"
<JnpfTextarea v-model="dataForm.areaDesc" @change="changeData('areaDesc',-1)" placeholder="请输入不超过两百字的区域描述" :style='{"width":"100%"}' true type="textarea"
placeholder="请输入不超过两百字的区域描述" :style='{"width":"100%"}' true type="textarea" :autosize='{"minRows":4,"maxRows":4}' > :autosize='{"minRows":4,"maxRows":4}'>
</JnpfTextarea> </JnpfTextarea>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item <jnpf-form-tip-item label="修改用户" prop="lastModifyUserId">
label="修改用户" prop="lastModifyUserId" > <JnpfInput v-model="dataForm.lastModifyUserId" @change="changeData('lastModifyUserId',-1)"
<JnpfInput v-model="dataForm.lastModifyUserId" @change="changeData('lastModifyUserId',-1)" placeholder="系统自动生成" readonly :style='{"width":"100%"}'>
placeholder="系统自动生成" readonly :style='{"width":"100%"}'> </JnpfInput>
</JnpfInput> </jnpf-form-tip-item>
</jnpf-form-tip-item> </el-col>
</el-col> <el-col :span="24">
<el-col :span="24" > <jnpf-form-tip-item label="修改时间" prop="lastModifyTime">
<jnpf-form-tip-item <JnpfInput v-model="dataForm.lastModifyTime" @change="changeData('lastModifyTime',-1)"
label="修改时间" prop="lastModifyTime" > placeholder="系统自动生成" readonly :style='{"width":"100%"}'>
<JnpfInput v-model="dataForm.lastModifyTime" @change="changeData('lastModifyTime',-1)" </JnpfInput>
placeholder="系统自动生成" readonly :style='{"width":"100%"}'> </jnpf-form-tip-item>
</JnpfInput> </el-col>
</jnpf-form-tip-item> <!-- 表单结束 -->
</el-col> </template>
<!-- 表单结束 --> </el-form>
</template> <area-dialog :mode="mode" :position="position" :dataForm="dataForm" v-if="areaVisible"
</el-form> @areaVisibleChange="handleAreaVisibleChange" />
<area-dialog :mode="mode" :position="position" :areaMapInfo="dataForm.areaMapInfo" v-if="areaVisible" @areaVisibleChange="handleAreaVisibleChange" /> <!-- <SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
<!-- <SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false"/> --> ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false"/> -->
</el-row> </el-row>
</div> </div>
</transition> </transition>
</template> </template>
@ -122,9 +121,10 @@
import { thousandsFormat } from "@/components/Generator/utils/index" import { thousandsFormat } from "@/components/Generator/utils/index"
export default { export default {
components: { areaDialog }, components: { areaDialog },
props: ['mode'], props: [],
data() { data() {
return { return {
mode: 'add',
position: {}, position: {},
areaVisible: false, areaVisible: false,
dataFormSubmitType: 0, dataFormSubmitType: 0,
@ -157,7 +157,7 @@
areaType : undefined, areaType : undefined,
companyId : "543049974737277765", companyId : "543049974737277765",
status : "1", status : "1",
areaMapInfo : "[{'lat':39.98423552382614,'lng':116.3059581286434},{'lat':39.986865947052266,'lng':116.3783954344508},{'lat':39.94897808062252,'lng':116.37942533460955},{'lat':39.94818852953558,'lng':116.3093911759388},{'lat':39.960820297511674,'lng':116.30801795711886}]", areaMapInfo: '',
areaDesc : undefined, areaDesc : undefined,
creatorUserId : undefined, creatorUserId : undefined,
creatorTime : undefined, creatorTime : undefined,
@ -216,7 +216,7 @@
areaType:[] , areaType:[] ,
companyId:[] , companyId:[] ,
status:[] , status:[] ,
areaMapInfo:[] , areaMapInfo:'',
areaDesc:[] , areaDesc:[] ,
creatorUserId:[] , creatorUserId:[] ,
creatorTime:[] , creatorTime:[] ,
@ -237,32 +237,13 @@
}, },
mounted() {}, mounted() {},
methods: { methods: {
//
showPosition(position){
console.log(position)
this.position = position
this.areaVisible = true
},
//
errorPosition() {
console.log('定位失败');
//
this.getPosition();
},
// Keyreferer
getPosition() {
const referer = '易回收后台';
const geolocation = new window.qq.maps.Geolocation('U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6', referer);
geolocation.getLocation(this.showPosition, this.errorPosition);
},
handLeArea() { handLeArea() {
this.areaVisible = true this.areaVisible = true
// this.getPosition()
}, },
handleAreaVisibleChange(areaVisible, targetAreaPath) { handleAreaVisibleChange(areaVisible, targetAreaPath) {
this.areaVisible = areaVisible this.areaVisible = areaVisible
if (targetAreaPath) { if (targetAreaPath) {
this.dataForm.areaMapInfo = targetAreaPath this.dataForm.areaMapInfo = JSON.stringify(targetAreaPath)
} }
}, },
prev() { prev() {
@ -381,6 +362,7 @@
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
if(this.dataForm.id){ if(this.dataForm.id){
this.mode = 'edit'
this.loading = true this.loading = true
request({ request({
url: '/api/scm/StationArea/'+this.dataForm.id, url: '/api/scm/StationArea/'+this.dataForm.id,
@ -389,6 +371,7 @@
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false this.loading = false
}); });
}else{ }else{
this.clearData() this.clearData()
this.initDefaultData() this.initDefaultData()

@ -6,154 +6,117 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16"> <el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="区域名称"> <el-form-item label="区域名称">
<el-input v-model="query.areaName" placeholder="请输入" clearable> </el-input> <el-input v-model="query.areaName" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="区域类型"> <el-form-item label="区域类型">
<JnpfSelect v-model="query.areaType" placeholder="请选择围栏类型" clearable <JnpfSelect v-model="query.areaType" placeholder="请选择围栏类型" clearable :options="areaTypeOptions"
:options="areaTypeOptions" :props="areaTypeProps" multiple>
:props="areaTypeProps" multiple > </JnpfSelect>
</JnpfSelect> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="6">
<el-col :span="6"> <el-form-item label="是否启用">
<el-form-item label="是否启用"> <JnpfSelect v-model="query.status" placeholder="请选择" clearable :options="statusOptions"
<JnpfSelect v-model="query.status" placeholder="请选择" clearable :props="statusProps">
:options="statusOptions" </JnpfSelect>
:props="statusProps" > </el-form-item>
</JnpfSelect> </el-col>
</el-form-item> <template v-if="showAll">
</el-col> <el-col :span="6">
<template v-if="showAll"> <el-form-item label="绑定商户">
<el-col :span="6"> <JnpfOrganizeSelect selectType="custom" :ableIds='[["@currentOrgAndSubOrg"]]' v-model="query.companyId"
<el-form-item label="绑定商户"> placeholder="请选择商户" clearable multiple />
<JnpfOrganizeSelect </el-form-item>
selectType="custom" :ableIds = '[["@currentOrgAndSubOrg"]]' v-model="query.companyId" placeholder="请选择商户" clearable </el-col>
multiple /> </template>
</el-form-item> <el-col :span="6">
</el-col> <el-form-item>
</template> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-col :span="6"> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-form-item> <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> 展开
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> </el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll"> <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
展开 收起
</el-button> </el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> </el-form-item>
收起 </el-col>
</el-button> </el-form>
</el-form-item> </el-row>
</el-col> <div class="JNPF-common-layout-main JNPF-flex-main">
</el-form> <div class="JNPF-common-head">
</el-row> <div>
<div class="JNPF-common-layout-main JNPF-flex-main"> <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()">
<div class="JNPF-common-head"> </el-button>
<div> </div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()"> <div class="JNPF-common-head-right">
</el-button> <el-tooltip content="高级查询" placement="top" v-if="true">
</div> <el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
<div class="JNPF-common-head-right"> @click="openSuperQuery()" />
<el-tooltip content="高级查询" placement="top" v-if="true"> </el-tooltip>
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false" <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
@click="openSuperQuery()" /> <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="initData()" />
</el-tooltip> </el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top"> </div>
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" </div>
@click="initData()" /> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' :span-method="arraySpanMethod">
</el-tooltip> <el-table-column prop="areaName" label="区域名称" align="center">
</div> </el-table-column>
</div> <el-table-column prop="areaType" label="区域类型" align="center">
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' </el-table-column>
:span-method="arraySpanMethod" <el-table-column prop="companyId" label="绑定商户" align="left">
</el-table-column>
> <el-table-column prop="status" label="是否启用" align="center">
<el-table-column </el-table-column>
prop="areaName" <!-- <el-table-column
label="区域名称" align="center"
>
</el-table-column>
<el-table-column
prop="areaType"
label="区域类型" align="center"
>
</el-table-column>
<el-table-column
prop="companyId"
label="绑定商户" align="left"
>
</el-table-column>
<el-table-column
prop="status"
label="是否启用" align="center"
>
</el-table-column>
<el-table-column
prop="areaMapInfo" prop="areaMapInfo"
label="地图信息" align="center" label="地图信息" align="center"
> >
</el-table-column> </el-table-column> -->
<el-table-column <el-table-column prop="areaDesc" label="区域描述" align="center">
prop="areaDesc" </el-table-column>
label="区域描述" align="center" <el-table-column prop="creatorUserId" label="创建用户" align="center">
> </el-table-column>
</el-table-column> <el-table-column prop="lastModifyUserId" label="修改用户" align="center">
<el-table-column </el-table-column>
prop="creatorUserId" <el-table-column prop="lastModifyTime" label="修改时间" align="center">
label="创建用户" align="center" </el-table-column>
> <el-table-column prop="creatorTime" label="创建时间" align="left">
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="操作" fixed="right" width="150">
prop="lastModifyUserId" <template slot-scope="scope">
label="修改用户" align="center" <el-button type="text" @click="addOrUpdateHandle(scope.row)" v-has="'btn_edit'">
> </el-button>
</el-table-column> <el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'" @click="handleDel(scope.row.id)">
<el-table-column </el-button>
prop="lastModifyTime" <el-button type="text" v-has="'btn_detail'" @click="goDetail(scope.row.id)">
label="修改时间" align="center" </el-button>
> </template>
</el-table-column> </el-table-column>
<el-table-column </JNPF-table>
prop="creatorTime" <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
label="创建时间" align="left" @pagination="initData" />
> </div>
</el-table-column> </div>
<el-table-column label="操作" <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
fixed="right" width="150" > <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<template slot-scope="scope" >
<el-button type="text"
@click="addOrUpdateHandle(scope.row)" v-has="'btn_edit'" >编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" v-has="'btn_detail'"
@click="goDetail(scope.row.id)">详情
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
</div>
</div>
<JNPF-Form :mode="mode" v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" /> <ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" /> <ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" <SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" @superQuery="superQuery" />
@superQuery="superQuery" /> </div>
</div>
</template> </template>
<script> <script>
@ -222,7 +185,6 @@
sidx: "", sidx: "",
}, },
formVisible: false, formVisible: false,
mode: '',
flowVisible: false, flowVisible: false,
flowListVisible: false, flowListVisible: false,
flowList: [], flowList: [],
@ -487,8 +449,6 @@
this.initData() this.initData()
}, },
addOrUpdateHandle(row, isDetail) { addOrUpdateHandle(row, isDetail) {
const mode = row ? 'edit' : 'add'
this.mode = mode
let id = row?row.id:"" let id = row?row.id:""
this.formVisible = true this.formVisible = true
this.$nextTick(() => { this.$nextTick(() => {

Loading…
Cancel
Save