Browse Source

fix():修改路内bug

tags/PMS_Frontend_v1.0.6-develop
guoxin 1 year ago
parent
commit
dc88e45a1f
  1. 234
      src/components/Map/Apimap/index.jsx
  2. 293
      src/components/MapComponets/Marker/index.jsx
  3. 12
      src/components/MapComponets/Marker/index.scss
  4. 3
      src/pages/InRoadMgm/PersonMgm/Attendance/Fence/loadable.jsx
  5. 24
      src/pages/InRoadMgm/PersonMgm/Attendance/WorkerAttendance/index.scss
  6. 128
      src/pages/InRoadMgm/PersonMgm/Attendance/WorkerAttendance/loadable.jsx
  7. 1
      src/pages/InRoadMgm/PersonMgm/AuditMgm/AuditConf/loadable.jsx
  8. 15
      src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx

234
src/components/Map/Apimap/index.jsx

@ -1,95 +1,145 @@
// import React, { useState, useEffect, useRef, useLayoutEffect } from "react";import L from "leaflet";
// import "leaflet/dist/leaflet.css";
// import "leaflet.chinatmsproviders";
// import ajax from "@/services";
import React, { useState, useEffect, useRef, useLayoutEffect } from "react";
import L from "leaflet";
import "leaflet/dist/leaflet.css";
import "leaflet.chinatmsproviders";
import ajax from "@/services";
// function ModalMap(props) {
// const {
// setLnglat = () => {},
// getLntLat = () => {},
// searchLnglatValue = [],
// } = props;
// const mapConfig = {
// center: sysConfig.map.center,
// zoom: sysConfig.map.zoom,
// zooms: sysConfig.map.zooms,
// maxZoom: sysConfig.map.zooms[1],
// minZoom: sysConfig.map.zooms[0],
// mapTileHost: sysConfig.map.mapTileHost,
// zoomOffset: sysConfig.map.zoomOffset,
// mapTileType: sysConfig.map.mapTileType,
// };
// const [map, setMap] = useState(null);
// const mapRef = useRef(null);
// const initMap = () => {
// // console.log(mapConfig);
// // const _map = L.map("mapid", {
// // scrollWheelZoom: true,
// // zoomSnap: 1,
// // crs: L.CRS.EPSG3857,
// // }).setView([mapConfig.center[0], mapConfig.center[1]], mapConfig.zoom);
// // L.tileLayer("{mapTileHost}/v3/tile?z={z}&x={x}&y={y}", {
// // maxZoom: mapConfig.zooms[1],
// // minZoom: mapConfig.zooms[0],
// // zoomOffset: 0,
// // mapTileHost: mapConfig.mapTileHost,
// // }).addTo(_map);
// // _map.on("click", function (e) {
// // clearMarkers(_map);
// // L.marker(e.latlng).addTo(_map);
// // setLnglat([e.latlng.lng.toFixed(4), e.latlng.lat.toFixed(4)]);
// // getLntLat([e.latlng.lng.toFixed(4), e.latlng.lat.toFixed(4)]);
// // });
// // _map.invalidateSize();
// // setMap(_map);
// // mapRef.current = _map;
// let _map = new AMap.Map("mapid", {
// resizeEnable: true,
// layers: [
// new AMap.TileLayer.Satellite(),
// new AMap.TileLayer.RoadNet()
// ]
// });
// _map.setCenter([mapConfig.center[1], mapConfig.center[0]], mapConfig.zoom);
function ModalMap (props) {
const {
setLnglat = () => { },
getLntLat = () => { },
searchLnglatValue = [],
AmapConfig = { fullscreen: false }
} = props;
const [hasInit, setHasInit] = useState(false); //
// setMap(_map)
// _map.on('click', function(e) {
// console.log(e)
// // onClick(info)
// setLnglat([e.lnglat.lng.toFixed(4), e.lnglat.lat.toFixed(4)]);
// getLntLat([e.lnglat.lng.toFixed(4), e.lnglat.lat.toFixed(4)]);
// })
// mapRef.current = map
// };
// function clearMarkers(map) {
// map.eachLayer(function (layer) {
// if (layer instanceof L.Marker) {
// map.removeLayer(layer);
// }
// });
// }
// useEffect(() => {
// initMap();
// return () => {
// if (mapRef.current) {
// mapRef.current.remove();
// }
// };
// }, []);
// useEffect(() => {
// if (searchLnglatValue.length === 0) return;
// mapRef.current.setView(searchLnglatValue, 13);
// }, [searchLnglatValue]);
const mapConfig = {
center: sysConfig.map.center,
zoom: sysConfig.map.zoom,
zooms: sysConfig.map.zooms,
maxZoom: sysConfig.map.zooms[1],
minZoom: sysConfig.map.zooms[0],
mapTileHost: sysConfig.map.mapTileHost,
zoomOffset: sysConfig.map.zoomOffset,
mapTileType: sysConfig.map.mapTileType,
};
const [map, setMap] = useState(null);
const mapRef = useRef(null);
const initMap = () => {
let _map = new AMap.Map("map", {
resizeEnable: true,
mapStyle: 'amap://styles/whitesmoke', //
viewMode: '2D', //
layers: [
new AMap.TileLayer.Satellite(),
new AMap.TileLayer.RoadNet()
]
});
_map.setCenter([mapConfig.center[1], mapConfig.center[0]], mapConfig.zoom);
setMap(_map)
_map.on('click', function (e) {
console.log(e)
// onClick(info)
setLnglat([e.lnglat.lng.toFixed(4), e.lnglat.lat.toFixed(4)]);
getLntLat([e.lnglat.lng.toFixed(4), e.lnglat.lat.toFixed(4)]);
})
_map.on('complete', function () {
AMap.plugin(['AMap.Fullscreen'], function () {
map.addControl(new AMap.Fullscreen());
});
});
mapRef.current = map
setHasInit(true);
};
const renderChildren = (map) => {
return React.Children.map(props.children, (child) => {
if (child) {
const cType = child.type;
/*
* 1. 明确声明不需要注入的
* 2. DOM 元素
*/
if (cType.preventAmap || typeof cType === "string") {
return child;
}
return React.cloneElement(child, {
__map__: map,
});
}
return child;
});
};
function clearMarkers (map) {
map.eachLayer(function (layer) {
if (layer instanceof L.Marker) {
map.removeLayer(layer);
}
});
}
useEffect(() => {
initMap();
// return (
// <div
// id="mapid"
// className="map"
// style={{
// height: "100%",
// width: "100%",
// }}
// ></div>
// );
// }
// export default ModalMap;
return () => {
if (mapRef.current) {
mapRef.current.remove();
}
};
}, []);
//
//
var mapContainer = document.getElementById('map');
function enterFullscreen () {
if (mapContainer.requestFullscreen) {
mapContainer.requestFullscreen();
} else if (mapContainer.mozRequestFullScreen) {
mapContainer.mozRequestFullScreen();
} else if (mapContainer.webkitRequestFullscreen) {
mapContainer.webkitRequestFullscreen();
} else if (mapContainer.msRequestFullscreen) {
mapContainer.msRequestFullscreen();
}
}
// 退
function exitFullscreen () {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
}
useEffect(() => {
//
if (mapContainer) {
if (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) {
// 退
exitFullscreen();
} else {
//
enterFullscreen();
}
}
}, [AmapConfig.fullscreen])
useEffect(() => {
if (searchLnglatValue.length === 0) return;
mapRef.current.setView(searchLnglatValue, 13);
}, [searchLnglatValue]);
return (
<div
className="cc-map"
id={"map"}
>
<div>
<div id="panel"></div>
{hasInit ? renderChildren(map) : null}
</div>
</div>
);
}
export default ModalMap;

293
src/components/MapComponets/Marker/index.jsx

@ -14,8 +14,22 @@ import bankingImg from '@/assets/images/map/banking.png'
import otherImg from '@/assets/images/map/other.png'
import utils from '@/config/utils'
import mgreen from "@/assets/images/equip/home/mark_green.png";
import mgred from "@/assets/images/equip/home/mark_red.png";
import mgyellow from "@/assets/images/equip/home/mark_yellow.png";
function Marker (props, refs) {
const map = props.__map__
//
const labelsLayer = new AMap.LabelsLayer({
zooms: [3, 20],
zIndex: 1000,
collision: true, //
allowCollision: true, // allowCollisiontrue
});
//
const [massLayer, setMassLayer] = useState(labelsLayer);
// AMap.Text
const [textMarker, setTextMarker] = useState([])
const { validatorLongitude, validatorLatitude } = utils
const {
markerArr = [], //
@ -32,6 +46,7 @@ function Marker(props, refs) {
"41": bankingImg,
"69": otherImg,
},
AmapConfig = {},
iconHtmlCb = () => { }, // divhtml
iconSize = [35, 35], //
iconAnchor = [12, 24], //
@ -40,22 +55,37 @@ function Marker(props, refs) {
popupAnchor = [0, -12], //
contentCb = '', //
clickCb, //
classCb, // classclass
hideTypes = [], // type
fitBounds = true, //
getMapValue=''
} = props
console.log(getMapValue);
const Amapicon = {
type: 'image', // image
image: 'https://a.amap.com/jsapi_demos/static/demo-center/marker/express2.png', // url
size: [64, 30],//
anchor: 'center', // position bottom-center
};
const Amapicon1 = {
type: 'image', // image
image: 'https://webapi.amap.com/images/mass/mass2.png', // url
size: [64, 30],//
anchor: 'center', // position bottom-center
};
const text = {
content: type == "icon" ? "途经点" : "落脚点", //
direction: 'right', // icon icon position
offset: [-20, -5], // direction
style: { //
fontSize: 12,//
fillColor: '#22886f', //
strokeColor: '#fff', //
strokeWidth: 2, //
}
}
const [markers, setMarkers] = useState([])
const [getMarker,setGetMarker]=useState({})
const markersRef = useRef()
markersRef.current = markers
const circlesRef = useRef()
useImperativeHandle(refs, () => (markersRef.current))
const addMarkers = (arr = []) => {
const addMarkers = (arr = [], _massLayer) => {
if (!Array.isArray(arr)) {
console.warn('请传数组')
return false
@ -64,171 +94,120 @@ function Marker(props, refs) {
let _markers = []
arr.forEach(elem => {
if (validatorLatitude(elem.lat) && validatorLongitude(elem.lng)) {
if (type === 'icon') {
let html = `<span class="icon iconfont icon${icon[elem.type]}"></span>`
let className = ''
if (classCb) {
className = classCb(elem)
}
let Opts = L.divIcon({
className: className,
html: `${html}`,
iconSize: iconSize,
iconAnchor: iconAnchor,
tooltipAnchor: tooltipAnchor,
popupAnchor: popupAnchor
})
let content = ''
if (contentCb) {
content = contentCb(elem)
}
let marker = L.marker([elem.lat, elem.lng], { icon: Opts })
if (elem[tooltipKey]) {
marker.bindTooltip(elem[tooltipKey])
}
if (content) {
marker.bindPopup(content)
}
marker.data = elem
if (!hideTypes.includes(elem.type)) {
marker.addTo(map)
}
_markers.push(marker)
markers.push(marker)
if (clickCb) {
marker.addEventListener('click', function (e) {
clickCb(e.target)
})
}
} else if (type === 'img') {
let opts = L.icon({
iconUrl: elem.type ? icon[elem.type] : markerIcon,
iconSize: elem.type ? iconSize : [35, 35],
iconAnchor: elem.type ? iconAnchor : [8, 23],
tooltipAnchor: tooltipAnchor,
popupAnchor: popupAnchor
})
let marker = L.marker([elem.lat, elem.lng], { icon: opts })
if (elem[tooltipKey]) {
marker.bindTooltip(elem[tooltipKey])
}
let content = ''
if (contentCb) {
content = contentCb(elem)
}
if (content) {
marker.bindPopup(content)
}
marker.data = elem
marker.addTo(map)
_markers.push(marker)
markers.push(marker)
setGetMarker(marker.data);
if (clickCb) {
marker.addEventListener('click', function (e) {
clickCb(e.target)
})
}
if (elem.open) {
marker.openPopup()
}
} else if (type === 'div') {
let className = ''
if (classCb) {
className = classCb(elem)
}
let opts = L.divIcon({
className: className,
html: iconHtmlCb(elem),
iconSize: iconSize,
iconAnchor: iconAnchor,
tooltipAnchor: tooltipAnchor,
popupAnchor: popupAnchor
})
let marker = L.marker([elem.lat, elem.lng], { icon: opts })
if (elem[tooltipKey]) {
marker.bindTooltip(elem[tooltipKey])
}
let content = ''
if (contentCb) {
content = contentCb(elem)
}
if (content) {
marker.bindPopup(content)
}
marker.data = elem
marker.addTo(map)
if (type == "image") {
//
const labelMarker = new AMap.LabelMarker({
name: '标注2', // 使
position: [elem.lng, elem.lat],
zIndex: 16,
icon: Amapicon1, // icon icon
text: text,// text text
});
_markers.push(labelMarker)
} else {
// div
var markerContent = document.createElement('div');
markerContent.className = 'custom-marker'; //
markerContent.innerHTML = ''; //
//
var marker = new AMap.Marker({
position: [elem.lng, elem.lat], //
content: markerContent, //
map: map //
});
_markers.push(marker)
markers.push(marker)
if (clickCb) {
marker.addEventListener('click', function (e) {
clickCb(e.target)
})
}
if (elem.open) {
marker.openPopup()
}
}
map.setZoomAndCenter(15, ["120.031712", "35.877188"]);
}
})
if (fitBounds) {
if (_markers.length > 1) {
map.fitBounds(L.featureGroup(_markers).getBounds())
} else if (_markers.length == 1) {
map.setView(_markers[0]._latlng)
}
}
setMarkers(markersRef.current)
massLayer.add([..._markers]);
map.add(massLayer);
setMarkers([..._markers])
}
}
useEffect(()=>{
// useEffect(() => {
// if (markerArr.length) {
// addMarkers(markerArr)
// }
// }, [])
if(getMapValue){
console.log(getMarker);
let lng = getMarker.lng
let lat = getMarker.lat
circlesRef.current && map.removeLayer(circlesRef.current)
let circle = L.circle([lat, lng], { radius: getMapValue })
circle.addTo(map)
circlesRef.current = circle
}
},[getMapValue])
useEffect(() => {
if (map && !massLayer) {
let _massLayer = new AMap.MassMarks([], {
zIndex: 5, //
// cursor: "pointer",
style: {
zIndex: 0,
url: '', // url
size: new AMap.Size(30, 40), //
anchor: new AMap.Pixel(15, 20), // position bottom-center
}, //
// allowCollision: true,
}); //
setMassLayer(_massLayer);
if (markerArr.length) {
//
addMarkers(markerArr)
}
}
}, [map])
return () => {
if (map) {
markersRef.current.forEach(elem => {
map.removeLayer(elem)
})
useEffect(() => {
if (massLayer) {
massLayer.clear(); //
if (markerArr.length) {
addMarkers(markerArr, massLayer); //
} else {
//
massLayer.clear(); //
}
}
}, [])
}, [markerArr]);
//
useEffect(() => {
markersRef.current.forEach(elem => {
// map.removeLayer(elem)
elem.remove()
})
setMarkers([])
addMarkers(markerArr)
}, [markerArr])
let newMarkers = []; // 使
if (AmapConfig?.timeposition) {
//
markerArr.forEach((textMarkerData) => {
const textMarker = new window.AMap.Text({
position: [textMarkerData.lng, textMarkerData.lat],
zIndex: 30,
text: textMarkerData.location,
map,
});
newMarkers.push(textMarker); //
});
setTextMarker(newMarkers)
} else {
//
textMarker.forEach((textMarker) => {
console.log(textMarker);
textMarker.setMap(null);
});
}
//
setTextMarker([...newMarkers])
}, [AmapConfig.timeposition])
let currentIndex = useRef(0);
useEffect(() => {
markers.forEach(elem => {
map.removeLayer(elem)
if (!hideTypes.includes(elem.data.type)) {
elem.addTo(map)
}
})
}, [hideTypes.length])
currentIndex.current = 0
if (AmapConfig.timebackcheck) {
let index = currentIndex
const interval = setInterval(() => {
if (currentIndex.current < markerArr.length) {
const point = markerArr[currentIndex.current];
console.log('====================================');
console.log(point);
console.log('====================================');
map.setCenter([point.lng, point.lat]);
currentIndex.current ++;
} else {
clearInterval(interval);
}
}, 1000);
}
}, [AmapConfig.timebackcheck])
return (
null
)
}
export default forwardRef(Marker)

12
src/components/MapComponets/Marker/index.scss

@ -1,3 +1,15 @@
.leaflet-popup-content-wrapper {
border-radius: 0;
}
.custom-marker{
width: 20px;
height: 20px;
border-radius: 50%;
background-color: greenyellow;
}
.custom-marker1{
width: 20px;
height: 20px;
border-radius: 50%;
background-color: red;
}

3
src/pages/InRoadMgm/PersonMgm/Attendance/Fence/loadable.jsx

@ -507,6 +507,7 @@ function Fence(props) {
</div>
{
getStatus == '2' ?
<>
<div className="yisaSearch ">
<div className="redLogo">*</div>
<label>有效范围</label>
@ -524,6 +525,8 @@ function Fence(props) {
/>
<label></label>
</div>
<div className="logoTip">考勤打卡和检测的工作范围可以输入[100,2000]</div>
</>
: ''
}

24
src/pages/InRoadMgm/PersonMgm/Attendance/WorkerAttendance/index.scss

@ -201,6 +201,12 @@ $color-primary : var(--color-primary);
}
}
}
.ant-switch{
background-color: #b8b9bc;
}
.ant-switch-checked {
background-color: #177ddc;
}
.AttendanceMap{
width: 1600px !important;
.mapTable{
@ -210,6 +216,24 @@ $color-primary : var(--color-primary);
.personMap{
width: 780px;
height: 600px;
position: relative;
.amap-control{
position: absolute;
top: 20px;
right: 20px;
width: 300px;
height: 30px;
z-index: 100;
display: flex;
background: white;
color: black;
align-items: center;
p{
margin: 0;
padding: 0 10px;
}
}
.yisa-table .ant-table-thead .ant-table-cell{
background-color: #616b83 !important;
color: #ffffff !important;

128
src/pages/InRoadMgm/PersonMgm/Attendance/WorkerAttendance/loadable.jsx

@ -1,6 +1,6 @@
import React, { useState, useRef, useEffect } from "react";
import { Apimap, Marker, ExportBtn, ResultFlowResult } from "@/components"
import { Select, Input, Button, Table, message, Pagination, DatePicker, Space, Modal } from 'antd'
import { Select, Input, Button, Table, message, Pagination, DatePicker, Space, Modal, Switch } from 'antd'
import {
operator,
name,
@ -10,6 +10,7 @@ import moment from "moment";
import "./index.scss";
import { SearchOutlined, DeleteOutlined } from '@ant-design/icons';
import ajax from '@/services'
import { isBoolean } from "lodash";
// import image1 from '@/assets/images/default-marker.png'
const { Option } = Select;
const { RangePicker } = DatePicker;
@ -22,11 +23,16 @@ function WorkerAttendance(props) {
export_url: '',
process_url: ""
})
const [mapConfig, setMapConfig] = useState({
timebackcheck: false,
timeposition: false,
fullscreen: false
})
const [formData, setFormData] = useState({
pdaManagerName: '',//
pdaManagerCode: '',//
pdaManagerRole: '-1',//
operator: '0',//
pdaManagerRole: '',//
operator: '',//
start_time: type === 'day' ? moment().subtract(30, 'days').startOf('day').format('YYYY-MM-DD') : moment().startOf('month').format('YYYY-MM'),
end_time: type === 'day' ? moment().format('YYYY-MM-DD') : moment().format('YYYY-MM'),
pn: 1,
@ -197,17 +203,24 @@ function WorkerAttendance(props) {
if (res.status === 20000) {
setAttendanceVisible(true)
setGetTrajectory(res.data.list)
res.data.list.map((res, index) => {
setMarkers([{
lng: res.go_work_lng,
lat: res.go_work_lat
}])
let arr = res.data.list.map((item, index) => {
return {
lng: item.go_work_lng,
lat: item.go_work_lat,
...item
}
})
console.log('====================================');
console.log(arr);
console.log('====================================');
// setMarkers([...arr])
}
})
}
//
const [footMarkers, setFootMarkers] = useState([]);
//
const [markers, setMarkers] = useState([])
const Check = (record) => {
let data = {
id: getDetailId.id,
@ -215,39 +228,45 @@ function WorkerAttendance(props) {
}
ajax.getLat(data).then(res => {
if (res.status === 20000) {
setFootMarkers(res.data)
let { go_lng_lat, off_lng_lat, list } = res.data
setFootMarkers([
{ lng: go_lng_lat.split(",")[1], lat: go_lng_lat.split(",")[0] }
,
{ lng: off_lng_lat.split(",")[1], lat: off_lng_lat.split(",")[0] }
]);
setMarkers([...list])
}
})
}
const markerConf = {
markerArr: footMarkers,
iconSize: [48, 54],
type: "img",
iconSize: [80, 80],
type: "image",
popupAnchor: [12, -12],
tooltipAnchor: [16, 0],
contentCb: (data) => {
let tem = ``;
tem = `
<div class="foot-popup-container">
<p>
<label>
<i class="iconfont iconshijian"></i>时间:
</label>
<span>${data.go_work_time}</span>
</p>
<p>
<label>
<i class="iconfont iconweizhi_line"></i>地点:
</label>
<span class="location-name" title="${data.go_work_location}">${data.go_work_location}</span>
</p>
</div>
`;
return tem;
},
clickCb: (e) => {
console.log(e);
},
// contentCb: (data) => {
// let tem = ``;
// tem = `
// <div class="foot-popup-container">
// <p>
// <label>
// <i class="iconfont iconshijian"></i>:
// </label>
// <span>${data.go_work_time}</span>
// </p>
// <p>
// <label>
// <i class="iconfont iconweizhi_line"></i>:
// </label>
// <span class="location-name" title="${data.go_work_location}">${data.go_work_location}</span>
// </p>
// </div>
// `;
// return tem;
// },
// clickCb: (e) => {
// console.log(e);
// },
};
//
const attendanceModal = () => {
@ -295,7 +314,6 @@ function WorkerAttendance(props) {
setLastFormData(Object.assign({}, lastFormData, { pn: 1, page_size: length }))
getData(Object.assign({}, formData, { pn: 1, page_size: length }))
}
const [markers, setMarkers] = useState([])
//
const getSearchData = (data = formData) => {
getData(data)
@ -486,12 +504,44 @@ function WorkerAttendance(props) {
pagination={false}
loading={ajaxLoading}
/>
<Apimap >
{/* <Marker
<Apimap AmapConfig={mapConfig}>
<div className="amap-control">
<p className="time-control">时间回放<Switch checked={mapConfig.timebackcheck} onChange={(checked) => {
if (checked) {
setMapConfig({ ...mapConfig, timebackcheck: checked, timeposition: !checked, })
} else {
setMapConfig({ ...mapConfig, timebackcheck: checked })
}
}}
/></p>
<p className="time-position">定位时间<Switch checked={mapConfig.timeposition} onChange={(checked) => {
if (checked) {
console.log(checked);
setMapConfig({ ...mapConfig, timeposition: checked, timebackcheck: !checked })
} else {
setMapConfig({ ...mapConfig, timeposition: checked, })
}
}} /></p>
<p className="full-screen" onClick={() => { setMapConfig({ ...mapConfig, fullscreen: !mapConfig.fullscreen }) }}>全屏</p>
</div>
{/* 开始,结束 */}
<Marker
{...markerConf}
/>
{/* 路径 */}
<Marker
markerArr={markers}
refresh={true}
AmapConfig={mapConfig}
/>
{/* {
!!isBoolean(mapConfig.timeposition) &&
<Marker
// getMapValue={getEditModal.attend}
markerArr={markers}
AmapConfig={mapConfig}
/>
} */}
{/* <Marker
markerArr={markers}
refresh={true}
type="img"

1
src/pages/InRoadMgm/PersonMgm/AuditMgm/AuditConf/loadable.jsx

@ -138,7 +138,6 @@ function AuditConf() {
.getEvidenceByOperator({ id: id, ...pageData })
.then((res) => {
if (res.status === 20000) {
message.success(res.message);
setTreeData(res.data.list);
setTotal(res.data.total);
}

15
src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx

@ -23,13 +23,13 @@ function StuffMgm(props) {
process_url: ""
})
const parameter = {
region_id: [],//
region_id: ['5910983100858368'],//
code: '',//
brand_id: '0',//
model_id: '',//
operatorid: '0',//
name: '',//
status: '',//
status: '3',//
uid: 0,//
pn: 1,
page_size: Number(pageSizeOptions[0]), //
@ -156,7 +156,10 @@ function StuffMgm(props) {
<Popover content={
<div className="operateBtn">
<div onClick={() => { CheckBtn(record) }}>查看</div>
<div onClick={() => { translateBtn(record) }}>编辑</div>
<div onClick={() =>
{ translateBtn(record) }}>
编辑</div>
</div>}>
<button className="scheduleBtn colorBtn">操作</button>
</Popover>
@ -223,6 +226,8 @@ function StuffMgm(props) {
const translateBtn = (record) => {
setGetId(record)
setEditVisible(true)
setGetBrandId(record.brand_id)
setGetOperatorValue(record.operatorid)
console.log(record);
/**
*
@ -742,6 +747,10 @@ function StuffMgm(props) {
value: '2',
label: '废弃'
},
{
value: '3',
label: '全部'
},
]}
/>
</div>

Loading…
Cancel
Save