master
jevononlie 5 months ago
commit ec8aecf93e

@ -5,11 +5,11 @@ import jnpf.entity.StationAreaEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
* nx_station_area *
* V3.5 * V3.5
* https://www.jnpfsoft.com * https://www.jnpfsoft.com
* JNPF * JNPF
* 2024-05-15 * 2024-05-20
*/ */
public interface StationAreaMapper extends BaseMapper<StationAreaEntity> { public interface StationAreaMapper extends BaseMapper<StationAreaEntity> {

@ -1,23 +1,22 @@
package jnpf.service; package jnpf.service;
import jnpf.entity.StationAreaEntity;
import jnpf.model.stationarea.*; import jnpf.model.stationarea.*;
import jnpf.entity.*;
import java.util.*; import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.model.stationarea.StationAreaForm; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/** /**
* stationArea *
* V3.5 * V3.5
* https://www.jnpfsoft.com * https://www.jnpfsoft.com
* JNPF * JNPF
* 2024-05-15 * 2024-05-20
*/ */
public interface StationAreaService extends IService<StationAreaEntity> { public interface StationAreaService extends IService<StationAreaEntity> {
List<StationAreaEntity> getList(StationAreaPagination stationAreaPagination); List<StationAreaEntity> getList(StationAreaPagination stationAreaPagination);
List<StationAreaEntity> getTypeList(StationAreaPagination stationAreaPagination, String dataType); List<StationAreaEntity> getTypeList(StationAreaPagination stationAreaPagination,String dataType);
StationAreaEntity getInfo(String id); StationAreaEntity getInfo(String id);
@ -29,7 +28,7 @@ public interface StationAreaService extends IService<StationAreaEntity> {
//子表方法 //子表方法
//副表数据方法 //副表数据方法
String checkForm(StationAreaForm form, int i); String checkForm(StationAreaForm form,int i);
void saveOrUpdate(StationAreaForm stationAreaForm,String id, boolean isSave) throws Exception; void saveOrUpdate(StationAreaForm stationAreaForm,String id, boolean isSave) throws Exception;

@ -32,11 +32,11 @@ import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
/** /**
* *
* stationArea *
* V3.5 * V3.5
* https://www.jnpfsoft.com * https://www.jnpfsoft.com
* JNPF * JNPF
* 2024-05-15 * 2024-05-20
*/ */
@Service @Service
public class StationAreaServiceImpl extends ServiceImpl<StationAreaMapper, StationAreaEntity> implements StationAreaService{ public class StationAreaServiceImpl extends ServiceImpl<StationAreaMapper, StationAreaEntity> implements StationAreaService{
@ -52,7 +52,7 @@ public class StationAreaServiceImpl extends ServiceImpl<StationAreaMapper, Stati
} }
/** 列表查询 */ /** 列表查询 */
@Override @Override
public List<StationAreaEntity> getTypeList(StationAreaPagination stationAreaPagination, String dataType){ public List<StationAreaEntity> getTypeList(StationAreaPagination stationAreaPagination,String dataType){
String userId=userProvider.get().getUserId(); String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList(); List<String> AllIdList =new ArrayList();
List<List<String>> intersectionList =new ArrayList<>(); List<List<String>> intersectionList =new ArrayList<>();
@ -144,32 +144,13 @@ public class StationAreaServiceImpl extends ServiceImpl<StationAreaMapper, Stati
} }
} }
if(isPc){ if(isPc){
if(ObjectUtil.isNotEmpty(stationAreaPagination.getStationCode())){ if(ObjectUtil.isNotEmpty(stationAreaPagination.getAreaName())){
stationAreaNum++; stationAreaNum++;
List<String> idList = new ArrayList<>(); String value = stationAreaPagination.getAreaName() instanceof List ?
try { JsonUtil.getObjectToString(stationAreaPagination.getAreaName()) :
String[][] stationCode = JsonUtil.getJsonToBean(stationAreaPagination.getStationCode(),String[][].class); String.valueOf(stationAreaPagination.getAreaName());
for(int i=0;i<stationCode.length;i++){ stationAreaQueryWrapper.lambda().like(StationAreaEntity::getAreaName,value);
if(stationCode[i].length>0){
idList.add(JsonUtil.getObjectToString(Arrays.asList(stationCode[i])));
}
}
}catch (Exception e1){
try {
List<String> stationCode = JsonUtil.getJsonToList(stationAreaPagination.getStationCode(),String.class);
if(stationCode.size()>0){
idList.addAll(stationCode);
}
}catch (Exception e2){
idList.add(String.valueOf(stationAreaPagination.getStationCode()));
}
}
stationAreaQueryWrapper.lambda().and(t->{
idList.forEach(tt->{
t.like(StationAreaEntity::getStationCode, tt).or();
});
});
} }
@ -202,16 +183,6 @@ public class StationAreaServiceImpl extends ServiceImpl<StationAreaMapper, Stati
} }
if(ObjectUtil.isNotEmpty(stationAreaPagination.getAreaName())){
stationAreaNum++;
String value = stationAreaPagination.getAreaName() instanceof List ?
JsonUtil.getObjectToString(stationAreaPagination.getAreaName()) :
String.valueOf(stationAreaPagination.getAreaName());
stationAreaQueryWrapper.lambda().like(StationAreaEntity::getAreaName,value);
}
if(ObjectUtil.isNotEmpty(stationAreaPagination.getStatus())){ if(ObjectUtil.isNotEmpty(stationAreaPagination.getStatus())){
stationAreaNum++; stationAreaNum++;
@ -329,8 +300,16 @@ public class StationAreaServiceImpl extends ServiceImpl<StationAreaMapper, Stati
if(isSave){ if(isSave){
String mainId = RandomUtil.uuId() ; String mainId = RandomUtil.uuId() ;
entity.setCreatorUserId(userInfo.getUserId());
entity.setDeleteTime(DateUtil.getNowDate());
entity.setLastModifyUserId(null);
entity.setLastModifyTime(null);
entity.setId(mainId); entity.setId(mainId);
}else{ }else{
entity.setCreatorUserId(userInfo.getUserId());
entity.setDeleteTime(DateUtil.getNowDate());
entity.setLastModifyUserId(null);
entity.setLastModifyTime(null);
} }
this.saveOrUpdate(entity); this.saveOrUpdate(entity);

@ -30,15 +30,15 @@ import jnpf.exception.WorkFlowException;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
/** /**
* *
* @ V3.5 * @ V3.5
* @ https://www.jnpfsoft.com * @ https://www.jnpfsoft.com
* @ JNPF * @ JNPF
* @ 2024-05-16 * @ 2024-05-20
*/ */
@Slf4j @Slf4j
@RestController @RestController
@Tag(name = "回收站地图围栏" , description = "scm") @Tag(name = "回收站电子围栏" , description = "scm")
@RequestMapping("/api/scm/StationArea") @RequestMapping("/api/scm/StationArea")
public class StationAreaController { public class StationAreaController {

@ -9,7 +9,7 @@ import java.util.Date;
* @ V3.5 * @ V3.5
* @ https://www.jnpfsoft.com * @ https://www.jnpfsoft.com
* @ JNPF * @ JNPF
* @ 2024-05-16 * @ 2024-05-20
*/ */
@Data @Data
@TableName("nx_station_area") @TableName("nx_station_area")

@ -6,11 +6,11 @@ import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* *
* @ V3.5 * @ V3.5
* @ https://www.jnpfsoft.com * @ https://www.jnpfsoft.com
* @ JNPF * @ JNPF
* @ 2024-05-16 * @ 2024-05-20
*/ */
@Data @Data
public class StationAreaForm { public class StationAreaForm {
@ -26,13 +26,25 @@ public class StationAreaForm {
/** 是否启用 **/ /** 是否启用 **/
@JsonProperty("status") @JsonProperty("status")
private String status; private String status;
/** 所属回收站 **/ /** 点编号 **/
@JsonProperty("stationCode") @JsonProperty("stationCode")
private Object stationCode; private String stationCode;
/** 地图信息 **/ /** 地图信息 **/
@JsonProperty("areaMapInfo") @JsonProperty("areaMapInfo")
private String areaMapInfo; private String areaMapInfo;
/** 区域描述 **/ /** 区域描述 **/
@JsonProperty("areaDesc") @JsonProperty("areaDesc")
private String areaDesc; private String areaDesc;
/** 创建用户 **/
@JsonProperty("creatorUserId")
private String creatorUserId;
/** 删除时间 **/
@JsonProperty("deleteTime")
private String deleteTime;
/** 修改用户 **/
@JsonProperty("lastModifyUserId")
private String lastModifyUserId;
/** 修改时间 **/
@JsonProperty("lastModifyTime")
private String lastModifyTime;
} }

@ -7,11 +7,11 @@ import java.util.List;
/** /**
* *
* *
* @ V3.5 * @ V3.5
* @ https://www.jnpfsoft.com * @ https://www.jnpfsoft.com
* @ JNPF * @ JNPF
* @ 2024-05-16 * @ 2024-05-20
*/ */
@Data @Data
public class StationAreaPagination extends Pagination { public class StationAreaPagination extends Pagination {
@ -27,15 +27,12 @@ public class StationAreaPagination extends Pagination {
private String moduleId; private String moduleId;
/** 菜单id */ /** 菜单id */
private String menuId; private String menuId;
/** 所属回收站 */
@JsonProperty("stationCode")
private Object stationCode;
/** 区域类型 */
@JsonProperty("areaType")
private Object areaType;
/** 区域名称 */ /** 区域名称 */
@JsonProperty("areaName") @JsonProperty("areaName")
private Object areaName; private Object areaName;
/** 区域类型 */
@JsonProperty("areaType")
private Object areaType;
/** 是否启用 */ /** 是否启用 */
@JsonProperty("status") @JsonProperty("status")
private Object status; private Object status;

@ -29,13 +29,14 @@
"management-system" "management-system"
], ],
"dependencies": { "dependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
"@fullcalendar/core": "^6.1.4", "@fullcalendar/core": "^6.1.4",
"@fullcalendar/daygrid": "^6.1.4", "@fullcalendar/daygrid": "^6.1.4",
"@fullcalendar/interaction": "^6.1.4", "@fullcalendar/interaction": "^6.1.4",
"@fullcalendar/timegrid": "^6.1.4", "@fullcalendar/timegrid": "^6.1.4",
"@fullcalendar/vue": "^6.1.4", "@fullcalendar/vue": "^6.1.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "@map-component/vue-tmap": "^1.0.1",
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
"@tinymce/tinymce-vue": "^3.2.0", "@tinymce/tinymce-vue": "^3.2.0",
"axios": "0.18.1", "axios": "0.18.1",
"clipboard": "2.0.4", "clipboard": "2.0.4",

@ -1,3 +1,11 @@
<!--
* @Author: jevononlie 728254585@qq.com
* @Date: 2024-05-17 17:34:18
* @LastEditors: jevononlie 728254585@qq.com
* @LastEditTime: 2024-05-20 17:09:53
* @FilePath: /jnpf-web/public/index.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@ -9,6 +17,8 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title> <title><%= webpackConfig.name %></title>
<script src="<%= BASE_URL %>cdn/echarts/echarts.min.js"></script> <script src="<%= BASE_URL %>cdn/echarts/echarts.min.js"></script>
<!-- 先在vue的index.html里面引入腾讯地图包 -->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6&libraries=drawing"></script>
<!-- <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=nYAafE0e8IXpGM0ykV3BO2k7CVRHI79Y"></script> --> <!-- <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=nYAafE0e8IXpGM0ykV3BO2k7CVRHI79Y"></script> -->
</head> </head>

@ -25,8 +25,8 @@
</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="所属回收站" <jnpf-form-tip-item label="点编号"
prop="stationCode" > prop="stationCode" tip-label="绑定站点编码" >
<p>{{dataForm.stationCode}}</p> <p>{{dataForm.stationCode}}</p>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
@ -42,6 +42,18 @@
<p>{{dataForm.areaDesc}}</p> <p>{{dataForm.areaDesc}}</p>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="修改用户"
prop="lastModifyUserId" >
<p>{{dataForm.lastModifyUserId}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="修改时间"
prop="lastModifyTime" >
<p>{{dataForm.lastModifyTime}}</p>
</jnpf-form-tip-item>
</el-col>
</template> </template>
</el-form> </el-form>
</el-row> </el-row>
@ -70,15 +82,18 @@
dataForm: { dataForm: {
id :'', id :'',
areaName : '', areaName : '',
areaType : "1", areaType : "",
status : "1", status : "1",
stationCode : "", stationCode : "",
areaMapInfo : '', areaMapInfo : '',
areaDesc : '', areaDesc : '',
creatorUserId : "",
deleteTime : "",
lastModifyUserId : "",
lastModifyTime : "",
}, },
areaTypeProps:{"label":"fullName","value":"enCode" }, areaTypeProps:{"label":"fullName","value":"enCode" },
statusProps:{"label":"fullName","value":"enCode" }, statusProps:{"label":"fullName","value":"enCode" },
stationCodeProps:{"label":"fullName","value":"id" },
} }
}, },

@ -1,43 +1,237 @@
<template> <template>
<el-dialog title="电子围栏" :visible="true" top="20vh" width="50%" append-to-body modal-append-to-body <div class="cont">
:before-close="handleClose" class="my-dialog"> <div id="mapFencecontainer" class="mapBox" style="width:100%;height:100%;position: absolute;">
<div class="cont">112</div> <div class="mapBtn">
</el-dialog> <!-- <el-button size="small" type="danger" @click="delpolygon()"></el-button> -->
<el-button size="small" type="danger" @click="clearOverlays()"></el-button>
<el-button size="small" type="primary" @click="sendLngLat"></el-button>
<el-button size="small" type="primary" @click="sendMsg"></el-button>
</div>
</div>
<!-- <p>给地图绑定了点击事件当点击地图时会在点击位置显示Marker</p> -->
</div>
</template> </template>
<script> <script>
import request from '@/utils/request' import { Notification } from 'element-ui';
import { mapGetters } from "vuex"; let map, marker, polygon, drawingManager, lngLat; //
const markersArray = []; let overlaysArray = []; // ,
let path4 = [];//
//
let arr = [{ 'lat': 34.80506482194067, 'lng': 113.59760284423828 },
{ 'lat': 34.780394716350614, 'lng': 113.59365463256836 },
{ 'lat': 34.760794345237514, 'lng': 113.58541488647461 },
{ 'lat': 34.7330074293797, 'lng': 113.58455657958984 },
{ 'lat': 34.70281206762318, 'lng': 113.61854553222656 },
{ 'lat': 34.70027176815597, 'lng': 113.62884521484375 },
{ 'lat': 34.6987193245323, 'lng': 113.63296508789062 },
{ 'lat': 34.69914272113635, 'lng': 113.63880157470703 },
{ 'lat': 34.699001589175694, 'lng': 113.64498138427734 },
{ 'lat': 34.698578191849535, 'lng': 113.68309020996094 },
{ 'lat': 34.73907339121123, 'lng': 113.68206024169922 },
{ 'lat': 34.738932327388824, 'lng': 113.6920166015625 },
{ 'lat': 34.76319176276739, 'lng': 113.69218826293945 },
{ 'lat': 34.763050740134055, 'lng': 113.70386123657227 },
{ 'lat': 34.7864571976711, 'lng': 113.70214462280273 },
{ 'lat': 34.786739162702524, 'lng': 113.68206024169922 },
{ 'lat': 34.809997957307736, 'lng': 113.68223190307617 },
{ 'lat': 34.81098454894641, 'lng': 113.64789962768555 },
{ 'lat': 34.81366238099493, 'lng': 113.62936019897461 }]; //
export default { export default {
components: { props: ['parentmsg'],
},
props: [],
data() { data() {
return { return {
visible: true, longitude: '',
loading: false, latitude: '',
} lngLatData: [] //
}, };
computed: {
...mapGetters(['userInfo'])
}, },
watch: {}, mounted() {
created() { this.init();
}, },
mounted() { },
methods: { methods: {
handleClose() { // ()
this.$emit('areaVisibleChange', false) sendMsg() {
// func: this.msg:
this.$emit('funcCancle', false);
},
// ()
sendLngLat() {
if (lngLat == undefined) {
lngLat = path4;
}
const h = this.$createElement;
},
//
init() {
map = new qq.maps.Map(document.getElementById('mapFencecontainer'), {
center: new qq.maps.LatLng(34.764152, 113.667636), //
zoom: 13
});
//
this.addMarker(new qq.maps.LatLng(30.925788712587014, 103.8922119140625)); //
this.markerOnly();
//
// 便
// path4 = [];
arr.forEach(item => {
path4.push(new qq.maps.LatLng(item.lat, item.lng));
});
console.log(path4);
this.showpolygon(path4);
//
this.addpolygon();
},
//
markerOnly() {
qq.maps.event.addListener(map, 'click', function (event) {
this.addMarker(event.latLng);
qq.maps.event.addListener(map, 'click', function (event) {
this.deleteOverlays(); //
marker = new qq.maps.Marker({
position: event.latLng,
map: map
});
});
var gps = event.latLng.getLat() + ',' + event.latLng.getLng(); // 便
});
},
//
addMarker(location) {
this.deleteOverlays();
var marker = new qq.maps.Marker({
position: location,
map: map
});
markersArray.push(marker);
},
//
deleteOverlays() {
if (markersArray) {
// for (i in markersArray) {
for (var i = 0; i < markersArray.length; i++) {
markersArray[i].setMap(null);
}
markersArray.length = 0;
}
if (marker !== undefined) {
marker.setMap(null);
}
},
/**
* 多边形绘制
*/
//
addpolygon() {
drawingManager = new qq.maps.drawing.DrawingManager({
drawingMode: qq.maps.drawing.OverlayType.POLYGON, //
drawingControl: true,
drawingControlOptions: {
position: qq.maps.ControlPosition.TOP_CENTER,
// drawingModes: [
// qq.maps.drawing.OverlayType.POLYGON
// ]
//
drawingModes: [
qq.maps.drawing.OverlayType.MARKER,
qq.maps.drawing.OverlayType.CIRCLE,
qq.maps.drawing.OverlayType.POLYGON,
qq.maps.drawing.OverlayType.POLYLINE,
qq.maps.drawing.OverlayType.RECTANGLE
]
},
markerOptions: {
visible: false
},
//
polygonOptions: {
editable: true,
strokeColor: new qq.maps.Color(202, 67, 58, 0.8),
fillColor: new qq.maps.Color(202, 67, 58, 0.1),
clickable: false
},
//
circleOptions: {
fillColor: new qq.maps.Color(255, 208, 70, 0.3),
strokeColor: new qq.maps.Color(88, 88, 88, 1),
strokeWeight: 3,
clickable: false
}
});
drawingManager.setMap(map);
qq.maps.event.addListener(drawingManager, 'overlaycomplete', function (event) {
// clearOverlays(overlaysArray)
lngLat = [];
overlaysArray.push(event.overlay);
for (const item of event.overlay.getPath().elems) {
const lng = item.getLng();
const lat = item.getLat();
lngLat.push({
lat: lat,
lng: lng
});
}
console.log(lngLat); //
});
},
//
showpolygon(path3) {
polygon = new qq.maps.Polygon({
map: map,
editable: true,
strokeColor: new qq.maps.Color(202, 67, 58, 0.8),
fillColor: new qq.maps.Color(202, 67, 58, 0.1)
});
polygon.setPath(path3);
},
//
delpolygon() {
const a = [];
polygon.setPath(a);
},
//
clearOverlays() {
arr = []; //
path4 = [];
polygon.setPath(path4);
if (overlaysArray) { // ifvuefor in if0
// for (i in overlaysArray) {
for (var i = 0; i < overlaysArray.length; i++) {
overlaysArray[i].setMap(null);
}
}
overlaysArray = []; //
lngLat = [];
console.log(drawingManager);
this.init();
} }
},
} }
};
</script> </script>
<style lang="scss" scoped> <style scoped lang="scss">
.my-dialog { .cont {
.cont { width: 800px;
min-height: 600px; height: 400px;
} }
.mapBox {
position: relative;
.mapBtn {
position: absolute;
bottom: 20px;
right: 20px;
z-index: 999;
} }
}
</style> </style>

File diff suppressed because one or more lines are too long

@ -2,13 +2,12 @@
<template> <template>
<el-dialog :title="!dataForm.id ? '新建' :'编辑'" modal-append-to-body="false" :close-on-click-modal="false" <el-dialog :title="!dataForm.id ? '新建' :'编辑'" :modal-append-to-body="false" :close-on-click-modal="false"
append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="600px"> append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" <el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right"> label-position="right">
<template v-if="!loading"> <template v-if="!loading">
{{ areaVisible }}
<!-- 具体表单 --> <!-- 具体表单 -->
<el-col :span="24"> <el-col :span="24">
<jnpf-form-tip-item label="区域名称" tipLabel="围栏区域名称" prop="areaName"> <jnpf-form-tip-item label="区域名称" tipLabel="围栏区域名称" prop="areaName">
@ -53,15 +52,12 @@
</JnpfTextarea> </JnpfTextarea>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<!-- <el-dialog title="登录" v-if="areaVisible" :visible="true" top="20vh" width="30%" append-to-body
modal-append-to-body>
</el-dialog> -->
<area-dialog v-if="areaVisible" @areaVisibleChange="handleAreaVisibleChange" ref="JNPFForm" /> <area-dialog v-if="areaVisible" @areaVisibleChange="handleAreaVisibleChange" ref="JNPFForm" />
<!-- 表单结束 --> <!-- 表单结束 -->
</template> </template>
</el-form> </el-form>
<SelectDialog v-if="1" :config="currTableConf" :formData="dataForm" ref="selectDialog" @select="addForSelect" <!-- <SelectDialog v-if="1" :config="currTableConf" :formData="dataForm" ref="selectDialog" @select="addForSelect"
@close="selectDialogVisible=false" /> @close="selectDialogVisible=false" /> -->
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">

@ -1,488 +1,513 @@
<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="区域名称">
<JnpfSelect v-model="query.stationCode" placeholder="选择本组织回收站进行绑定" clearable :options="stationCodeOptions" <el-input v-model="query.areaName" placeholder="请输入" clearable> </el-input>
:props="stationCodeProps" multiple> </el-form-item>
</JnpfSelect> </el-col>
</el-form-item> <el-col :span="6">
</el-col> <el-form-item label="区域类型">
<el-col :span="6"> <JnpfSelect v-model="query.areaType" placeholder="请选择围栏类型" clearable
<el-form-item label="区域类型"> :options="areaTypeOptions"
<JnpfSelect v-model="query.areaType" placeholder="请选择围栏类型" clearable :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
<el-input v-model="query.areaName" placeholder="请输入" clearable> </el-input> :options="statusOptions"
</el-form-item> :props="statusProps" >
</el-col> </JnpfSelect>
<template v-if="showAll"> </el-form-item>
<el-col :span="6"> </el-col>
<el-form-item label="是否启用"> <el-col :span="6">
<JnpfSelect v-model="query.status" placeholder="请选择" clearable :options="statusOptions" <el-form-item>
:props="statusProps"> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
</JnpfSelect> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </el-form>
<el-col :span="6"> </el-row>
<el-form-item> <div class="JNPF-common-layout-main JNPF-flex-main">
<el-button type="primary" icon="el-icon-search" @click="search()">{{ areaVisible }}</el-button> <div class="JNPF-common-head">
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> <div>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll"> <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()">
展开 </el-button>
</el-button> </div>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else> <div class="JNPF-common-head-right">
收起 <el-tooltip content="高级查询" placement="top" v-if="true">
</el-button> <el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
</el-form-item> @click="openSuperQuery()" />
</el-col> </el-tooltip>
</el-form> <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
</el-row> <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
<div class="JNPF-common-layout-main JNPF-flex-main"> @click="initData()" />
<div class="JNPF-common-head"> </el-tooltip>
<div> </div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()"> </div>
</el-button> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'
</div> :span-method="arraySpanMethod"
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true"> >
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false" <el-table-column
@click="openSuperQuery()" /> prop="stationCode"
</el-tooltip> label="站点编号" align="center"
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top"> sortable="custom" >
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="initData()" /> </el-table-column>
</el-tooltip> <el-table-column
</div> prop="areaName"
label="区域名称" align="center"
>
</el-table-column>
<el-table-column
prop="areaType"
label="区域类型" align="center"
>
</el-table-column>
<el-table-column
prop="status"
label="是否启用" align="center"
>
</el-table-column>
<el-table-column
prop="areaMapInfo"
label="地图信息" align="center"
>
</el-table-column>
<el-table-column
prop="areaDesc"
label="区域描述" align="center"
>
</el-table-column>
<el-table-column
prop="creatorUserId"
label="创建用户" align="center"
>
</el-table-column>
<el-table-column
prop="lastModifyUserId"
label="修改用户" align="center"
>
</el-table-column>
<el-table-column
prop="lastModifyTime"
label="修改时间" align="center"
>
</el-table-column>
<el-table-column label="操作"
fixed="right" width="150" >
<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> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' :span-method="arraySpanMethod"> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<el-table-column prop="areaName" label="区域名称" align="left"> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
</el-table-column>
<el-table-column prop="areaType" label="区域类型" align="left">
</el-table-column>
<el-table-column prop="stationCode" label="所属回收站" align="left">
</el-table-column>
<el-table-column prop="status" label="是否启用" align="left">
</el-table-column>
<el-table-column prop="areaMapInfo" label="地图信息" align="left">
</el-table-column>
<el-table-column prop="areaDesc" label="区域描述" align="left">
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<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 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="superQuery" /> <SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
</div> @superQuery="superQuery" />
</div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import JNPFForm from './form' import JNPFForm from './form'
import Detail from './Detail' import Detail from './Detail'
import ExportBox from '@/components/ExportBox' import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail' import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev' import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user' import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize' import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList' import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index" import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery' import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson' import superQueryJson from './superQueryJson'
export default { export default {
components: { components: {
JNPFForm, JNPFForm,
Detail, Detail,
ExportBox, ToFormDetail, SuperQuery ExportBox,ToFormDetail , SuperQuery
}, },
data() { data() {
return { return {
keyword: '', keyword:'',
expandsTree: true, expandsTree: true,
refreshTree: true, refreshTree: true,
toFormDetailVisible: false, toFormDetailVisible:false,
expandObj: {}, expandObj:{},
columnOptions: [], columnOptions: [],
mergeList: [], mergeList: [],
exportList: [], exportList:[],
columnList, columnList,
showAll: false, superQueryVisible: false,
superQueryVisible: false, superQueryJson,
superQueryJson, uploadBoxVisible: false,
uploadBoxVisible: false, detailVisible: false,
detailVisible: false, query: {
query: { areaName:undefined,
stationCode: undefined, areaType:undefined,
areaType: undefined, status:undefined,
areaName: undefined, },
status: undefined, treeProps: {
}, children: 'children',
treeProps: { label: 'fullName',
children: 'children', value: 'id',
label: 'fullName', isLeaf: 'isLeaf'
value: 'id', },
isLeaf: 'isLeaf' list: [],
}, listLoading: true,
list: [], total: 0,
listLoading: true, queryData: {},
total: 0, listQuery: {
queryData: {}, superQueryJson: '',
listQuery: { currentPage: 1,
superQueryJson: '', pageSize: 20,
currentPage: 1, sort: "desc",
pageSize: 20, sidx: "",
sort: "desc", },
sidx: "", formVisible: false,
}, flowVisible: false,
formVisible: false, flowListVisible: false,
flowVisible: false, flowList: [],
flowListVisible: false, exportBoxVisible: false,
flowList: [], areaTypeOptions:[],
exportBoxVisible: false, areaTypeProps:{"label":"fullName","value":"enCode" },
areaTypeOptions: [], statusOptions:[],
areaTypeProps: { "label": "fullName", "value": "enCode" }, statusProps:{"label":"fullName","value":"enCode" },
statusOptions: [], interfaceRes: {
statusProps: { "label": "fullName", "value": "enCode" }, stationCode:[] ,
stationCodeOptions: [], },
stationCodeProps: { "label": "fullName", "value": "id" },
interfaceRes: {
},
}
},
computed: {
...mapGetters(['userInfo']),
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.getColumnList(),
this.initSearchDataAndListData()
this.getstationCodeOptions();
this.getareaTypeOptions();
this.getstatusOptions();
this.queryData = JSON.parse(JSON.stringify(this.query))
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue)
})
})
},
toggleTreeExpand(expands) {
this.refreshTree = false
this.expandsTree = expands
this.$nextTick(() => {
this.refreshTree = true
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null)
})
})
},
filterNode(value, data) {
if (!value) return true;
return data[this.treeProps.label].indexOf(value) !== -1;
},
loadNode(node, resolve) {
const nodeData = node.data
const config = {
treeInterfaceId: "",
treeTemplateJson: []
}
if (config.treeInterfaceId) {
//
if (config.treeTemplateJson && config.treeTemplateJson.length) {
for (let i = 0; i < config.treeTemplateJson.length; i++) {
const element = config.treeTemplateJson[i];
element.defaultValue = nodeData[element.relationField] || ''
}
}
//
let query = {
paramList: config.treeTemplateJson || [],
}
//
getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let data = res.data
if (Array.isArray(data)) {
resolve(data);
} else {
resolve([]);
}
})
}
},
getColumnList() {
//
this.columnOptions = this.transformColumnList(this.columnList)
},
transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
} }
} },
} computed: {
} ...mapGetters(['userInfo']),
this.getMergeList(list) menuId() {
this.getExportList(list) return this.$route.meta.modelId || ''
return list
},
arraySpanMethod({ column }) {
for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
}
}
},
getMergeList(list) {
let newList = JSON.parse(JSON.stringify(list))
newList.forEach(item => {
if (item.children && item.children.length) {
let child = {
prop: item.prop + '-child-first'
}
item.children.unshift(child)
}
})
newList.forEach(item => {
if (item.children && item.children.length) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
prop: child.prop,
rowspan: 1,
colspan: item.children.length
})
} else {
this.mergeList.push({
prop: child.prop,
rowspan: 0,
colspan: 0
})
} }
}) },
} else { created() {
this.mergeList.push({ this.getColumnList(),
prop: item.prop, this.initSearchDataAndListData()
rowspan: 1, this.getareaTypeOptions();
colspan: 1 this.getstatusOptions();
}) this.queryData = JSON.parse(JSON.stringify(this.query))
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue)
})
})
},
toggleTreeExpand(expands) {
this.refreshTree = false
this.expandsTree = expands
this.$nextTick(() => {
this.refreshTree = true
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null)
})
})
},
filterNode(value, data) {
if (!value) return true;
return data[this.treeProps.label].indexOf(value) !== -1;
},
loadNode(node, resolve) {
const nodeData = node.data
const config ={
treeInterfaceId:"",
treeTemplateJson:[]
}
if (config.treeInterfaceId) {
//
if (config.treeTemplateJson && config.treeTemplateJson.length) {
for (let i = 0; i < config.treeTemplateJson.length; i++) {
const element = config.treeTemplateJson[i];
element.defaultValue = nodeData[element.relationField] || ''
}
}
//
let query = {
paramList: config.treeTemplateJson || [],
}
//
getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let data = res.data
if (Array.isArray(data)) {
resolve(data);
} else {
resolve([]);
}
})
}
},
getColumnList() {
//
this.columnOptions = this.transformColumnList(this.columnList)
},
transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
}
}
}
}
this.getMergeList(list)
this.getExportList(list)
return list
},
arraySpanMethod({ column }) {
for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
}
}
},
getMergeList(list) {
let newList = JSON.parse(JSON.stringify(list))
newList.forEach(item => {
if (item.children && item.children.length) {
let child = {
prop: item.prop + '-child-first'
}
item.children.unshift(child)
}
})
newList.forEach(item => {
if (item.children && item.children.length ) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
prop: child.prop,
rowspan: 1,
colspan: item.children.length
})
} else {
this.mergeList.push({
prop: child.prop,
rowspan: 0,
colspan: 0
})
}
})
} else {
this.mergeList.push({
prop: item.prop,
rowspan: 1,
colspan: 1
})
}
})
},
getExportList(list) {
let exportList = []
for (let i = 0; i < list.length; i++) {
if (list[i].jnpfKey === 'table') {
for (let j = 0; j < list[i].children.length; j++) {
exportList.push(list[i].children[j])
}
} else {
exportList.push(list[i])
}
}
this.exportList = exportList
},
getareaTypeOptions() {
getDictionaryDataSelector('560423985691492677').then(res => {
this.areaTypeOptions = res.data.list
})
},
getstatusOptions() {
getDictionaryDataSelector('519107761586309125').then(res => {
this.statusOptions = res.data.list
})
},
goDetail(id){
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
async initSearchDataAndListData() {
await this.initSearchData()
this.initData()
},
//
async initSearchData() {
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
keyword: this.keyword,
dataType: 0,
menuId:this.menuId,
moduleId:'560427626187981125',
type:1,
};
request({
url: `/api/scm/StationArea/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/StationArea/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handelUpload(){
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("","scm/StationArea")
})
},
openSuperQuery() {
this.superQueryVisible = true
this.$nextTick(() => {
this.$refs.SuperQuery.init()
})
},
superQuery(queryJson) {
this.listQuery.superQueryJson = queryJson
this.listQuery.currentPage = 1
this.initData()
},
addOrUpdateHandle(row, isDetail) {
let id = row?row.id:""
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail,this.list)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList)
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
request({
url: `/api/scm/StationArea/Actions/Export`,
method: 'post',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery.currentPage=1
this.listQuery.pageSize=20
this.listQuery.sort="desc"
this.listQuery.sidx=""
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
this.query = JSON.parse(JSON.stringify(this.queryData))
this.search()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()
},
} }
})
},
getExportList(list) {
let exportList = []
for (let i = 0; i < list.length; i++) {
if (list[i].jnpfKey === 'table') {
for (let j = 0; j < list[i].children.length; j++) {
exportList.push(list[i].children[j])
}
} else {
exportList.push(list[i])
}
}
this.exportList = exportList
},
getstationCodeOptions() {
getDataInterfaceRes('520259300875047493').then(res => {
let data = res.data
this.stationCodeOptions = data
})
},
getareaTypeOptions() {
getDictionaryDataSelector('560423985691492677').then(res => {
this.areaTypeOptions = res.data.list
})
},
getstatusOptions() {
getDictionaryDataSelector('519107761586309125').then(res => {
this.statusOptions = res.data.list
})
},
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
async initSearchDataAndListData() {
await this.initSearchData()
this.initData()
},
//
async initSearchData() {
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
keyword: this.keyword,
dataType: 0,
menuId: this.menuId,
moduleId: '560427626187981125',
type: 1,
};
request({
url: `/api/scm/StationArea/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/StationArea/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handelUpload() {
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("", "scm/StationArea")
})
},
openSuperQuery() {
this.superQueryVisible = true
this.$nextTick(() => {
this.$refs.SuperQuery.init()
})
},
superQuery(queryJson) {
this.listQuery.superQueryJson = queryJson
this.listQuery.currentPage = 1
this.initData()
},
addOrUpdateHandle(row, isDetail) {
let id = row ? row.id : ""
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail, this.list)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList)
})
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({
url: `/api/scm/StationArea/Actions/Export`,
method: 'post',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
this.query = JSON.parse(JSON.stringify(this.queryData))
this.search()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()
} }
}
}
</script> </script>

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save