2026.4.21 重点作业

master
xufei 2026-04-21 17:08:31 +08:00
parent 6ff9c4c9bb
commit 57477b37fd
15 changed files with 876 additions and 436 deletions

View File

@ -384,7 +384,7 @@ ul .tree-btn {
display: inline-block; display: inline-block;
width: 12px; width: 12px;
height: 12px; height: 12px;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M433.941 193.941l-51.882-51.882A48 48 0 0 0 348.118 128H320V80c0-26.51-21.49-48-48-48h-66.752C198.643 13.377 180.858 0 160 0s-38.643 13.377-45.248 32H48C21.49 32 0 53.49 0 80v288c0 26.51 21.49 48 48 48h80v48c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V227.882a48 48 0 0 0-14.059-33.941zm-22.627 22.627a15.888 15.888 0 0 1 4.195 7.432H352v-63.509a15.88 15.88 0 0 1 7.431 4.195l51.883 51.882zM160 30c9.941 0 18 8.059 18 18s-8.059 18-18 18-18-8.059-18-18 8.059-18 18-18zM48 384c-8.822 0-16-7.178-16-16V80c0-8.822 7.178-16 16-16h66.752c6.605 18.623 24.389 32 45.248 32s38.643-13.377 45.248-18H272c8.822 0 16 7.178 16 16v48H176c-26.51 0-48 21.49-48 48v208H48zm352 96H176c-8.822 0-16-7.178-16-16V176c0-8.822 7.178-16 16-16h144v72c0 13.2 10.8 24 24 24h72v208c0 8.822-7.178 16-16 16z" fill="%23999999" stroke="%23999999"/></svg>'); background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M433.941 193.941l-51.882-51.882A48 48 0 0 0 348.118 128H320V80c0-26.51-21.49-48-48-48h-66.752C198.643 13.377 180.858 0 160 0s-38.643 13.377-45.248 32H48C21.49 32 0 53.49 0 80v288c0 26.51 21.49 48 48 48h80v48c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V227.882a48 48 0 0 0-14.059-33.941zm-22.627 22.627a15.888 15.888 0 0 1 4.195 7.432H352v-63.509a15.88 15.88 0 0 1 7.431 4.195l51.883 51.882zM160 30c9.941 0 18 8.059 18 18s-8.059 18-18 18-18-8.059-18-18 8.059-18 18-18zM48 384c-8.822 0-16-7.178-16-16V80c0-8.822 7.178-16 16-16h66.752c6.605 18.623 24.389 32 45.248 32s38.643-13.377 45.248-32H272c8.822 0 16 7.178 16 16v48H176c-26.51 0-48 21.49-48 48v208H48zm352 96H176c-8.822 0-16-7.178-16-16V176c0-8.822 7.178-16 16-16h144v72c0 13.2 10.8 24 24 24h72v208c0 8.822-7.178 16-16 16z" fill="%23999999" stroke="%23999999"/></svg>');
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
vertical-align: middle; vertical-align: middle;

BIN
assets/images/50.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
assets/map/images/map/h.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,195 @@
!function(e, n) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = n() :
"function" == typeof define && define.amd ? define(n) : (e = e || self).uni = n()
}(this, (function() {
"use strict";
try {
var e = {};
Object.defineProperty(e, "passive", {
get: function() {
!0
}
}), window.addEventListener("test-passive", null, e)
} catch (e) {}
var n = Object.prototype.hasOwnProperty;
function i(e, i) {
return n.call(e, i)
}
var t = [];
function r() {
return window.__dcloud_weex_postMessage || window.__dcloud_weex_
}
var o = function(e, n) {
var i = {
options: {
timestamp: +new Date
},
name: e,
arg: n
};
if (r()) {
if ("postMessage" === e) {
var o = {
data: [n]
};
return window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessage(o) : window.__dcloud_weex_.postMessage(JSON.stringify(o))
}
var a = {
type: "WEB_INVOKE_APPSERVICE",
args: {
data: i,
webviewIds: t
}
};
window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessageToService(a) : window.__dcloud_weex_.postMessageToService(JSON.stringify(a))
}
if (!window.plus) return window.parent.postMessage({
type: "WEB_INVOKE_APPSERVICE",
data: i,
pageId: ""
}, "*");
if (0 === t.length) {
var d = plus.webview.currentWebview();
if (!d) throw new Error("plus.webview.currentWebview() is undefined");
var s = d.parent(),
w = "";
w = s ? s.id : d.id, t.push(w)
}
if (plus.webview.getWebviewById("__uniapp__service")) plus.webview.postMessageToUniNView({
type: "WEB_INVOKE_APPSERVICE",
args: {
data: i,
webviewIds: t
}
}, "__uniapp__service");
else {
var u = JSON.stringify(i);
plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("' . concat("WEB_INVOKE_APPSERVICE", '",' . concat(u, ",") . concat(JSON.stringify(t), ");")))
}
},
a = {
navigateTo: function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = e.url;
o("navigateTo", {
url: encodeURI(n)
})
},
navigateBack: function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = e.delta;
o("navigateBack", {
delta: parseInt(n) || 1
})
},
switchTab: function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = e.url;
o("switchTab", {
url: encodeURI(n)
})
},
reLaunch: function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = e.url;
o("reLaunch", {
url: encodeURI(n)
})
},
redirectTo: function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = e.url;
o("redirectTo", {
url: encodeURI(n)
})
},
getEnv: function(e) {
r() ? e({
nvue: !0
}) : window.plus ? e({
plus: !0
}) : e({
h5: !0
})
},
postMessage: function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
o("postMessage", e.data || {})
}
},
d = /uni-app/i.test(navigator.userAgent),
s = /Html5Plus/i.test(navigator.userAgent),
w = /complete|loaded|interactive/;
var u = window.my && navigator.userAgent.indexOf(["t", "n", "e", "i", "l", "C", "y", "a", "p", "i", "l", "A"].reverse().join("")) > -1;
var g = window.swan && window.swan.webView && /swan/i.test(navigator.userAgent);
var v = window.qq && window.qq.miniProgram && /QQ/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
var c = window.tt && window.tt.miniProgram && /toutiaomicroapp/i.test(navigator.userAgent);
var m = window.wx && window.wx.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
var p = window.qa && /quickapp/i.test(navigator.userAgent);
var f = window.ks && window.ks.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
var l = window.tt && window.tt.miniProgram && /Lark|Feishu/i.test(navigator.userAgent);
var _ = window.jd && window.jd.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
var E = window.xhs && window.xhs.miniProgram && /xhsminiapp/i.test(navigator.userAgent);
for (var h, P = function() {
window.UniAppJSBridge = !0, document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady", {
bubbles: !0,
cancelable: !0
}))
}, b = [function(e) {
if (d || s) return window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? document.addEventListener("DOMContentLoaded", e) : window.plus && w.test(document.readyState) ? setTimeout(e, 0) : document.addEventListener("plusready", e), a
}, function(e) {
if (m) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener("WeixinJSBridgeReady", e), window.wx.miniProgram
}, function(e) {
if (v) return window.QQJSBridge && window.QQJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener("QQJSBridgeReady", e), window.qq.miniProgram
}, function(e) {
if (u) {
document.addEventListener("DOMContentLoaded", e);
var n = window.my;
return {
navigateTo: n.navigateTo,
navigateBack: n.navigateBack,
switchTab: n.switchTab,
reLaunch: n.reLaunch,
redirectTo: n.redirectTo,
postMessage: n.postMessage,
getEnv: n.getEnv
}
}
}, function(e) {
if (g) return document.addEventListener("DOMContentLoaded", e), window.swan.webView
}, function(e) {
if (c) return document.addEventListener("DOMContentLoaded", e), window.tt.miniProgram
}, function(e) {
if (p) {
window.QaJSBridge && window.QaJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener("QaJSBridgeReady", e);
var n = window.qa;
return {
navigateTo: n.navigateTo,
navigateBack: n.navigateBack,
switchTab: n.switchTab,
reLaunch: n.reLaunch,
redirectTo: n.redirectTo,
postMessage: n.postMessage,
getEnv: n.getEnv
}
}
}, function(e) {
if (f) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener("WeixinJSBridgeReady", e), window.ks.miniProgram
}, function(e) {
if (l) return document.addEventListener("DOMContentLoaded", e), window.tt.miniProgram
}, function(e) {
if (_) return window.JDJSBridgeReady && window.JDJSBridgeReady.invoke ? setTimeout(e, 0) : document.addEventListener("JDJSBridgeReady", e), window.jd.miniProgram
}, function(e) {
if (E) return window.xhs && window.xhs.miniProgram
}, function(e) {
return document.addEventListener("DOMContentLoaded", e), a
}], y = 0; y < b.length && !(h = b[y](P)); y++);
h || (h = {});
var B = "undefined" != typeof uni ? uni : {};
if (!B.navigateTo) for (var S in h) i(h, S) && (B[S] = h[S]);
return B.webView = h, B
}));

View File

@ -4,134 +4,88 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>地图</title> <title>地图</title>
<!-- 天地图API -->
<script src="https://api.tianditu.gov.cn/api?v=4.0&tk=e8a16137fd226a62a23cc7ba5c9c78ce" type="text/javascript"></script>
<style>
html, body { height: 100%; margin: 0; padding: 0; }
#mapDiv { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
</style>
</head> </head>
<body onload="onLoad()"> <script src="https://api.tianditu.gov.cn/api?v=4.0&tk=e8a16137fd226a62a23cc7ba5c9c78ce" type="text/javascript">
<div id="mapDiv"></div> </script>
<script src="./js/uni.webview.1.5.4.js"></script>
<body onLoad="onLoad()">
<div id="mapDiv" style="position:absolute;width:100vw; height:100vh"></div>
</body> </body>
<style>
* {
margin: 0;
padding: 0;
}
</style>
<script type="text/javascript"> <script type="text/javascript">
var map; const userAgent = navigator.userAgent
var zoom = 14; if (/miniProgram/i.test(userAgent) && /micromessenger/i.test(userAgent)) {
var currentMarker = null; document.write('<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"><\/script>');
}
</script>
<script>
var map;
var zoom = 14;
function getUrlParam(name) { function getUrlParam(name) {
if (window.__injectedParams && window.__injectedParams[name] !== undefined) { const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
return window.__injectedParams[name].toString(); const r = window.location.search.substr(1).match(reg);
} if (r != null) return decodeURI(r[2]);
const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); return "";
const r = window.location.search.substr(1).match(reg); }
if (r != null) return decodeURI(r[2]);
return "";
}
function onLoad() { function onLoad() {
var imageURL = "https://t0.tianditu.gov.cn/img_w/wmts?" + var imageURL = "https://t0.tianditu.gov.cn/img_w/wmts?" +
"SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" + "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
"&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce"; "&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce";
var lay = new T.TileLayer(imageURL, {minZoom: 1, maxZoom: 18}); lay = new T.TileLayer(imageURL, {minZoom: 1, maxZoom: 18});
var config = {layers: [lay]}; var config = {layers: [lay]};
map = new T.Map("mapDiv", config); map = new T.Map("mapDiv", config);
map.centerAndZoom(new T.LngLat(getUrlParam('longitude'), getUrlParam('latitude')), zoom);
var initLng = parseFloat(getUrlParam('longitude')); map.enableScrollWheelZoom();
var initLat = parseFloat(getUrlParam('latitude')); if (getUrlParam('point')) {
if (isNaN(initLng) || isNaN(initLat) || initLng === 0 || initLat === 0) { var point = JSON.parse(decodeURIComponent(getUrlParam('point')));
initLng = 116.397428; for (let i = 0; i < point.length; i++) {
initLat = 39.90923; var icon = new T.Icon({
} iconUrl: point[i].iconPath.replaceAll('/static', './'),
map.centerAndZoom(new T.LngLat(initLng, initLat), zoom); iconSize: point[i].iconPath.indexOf('50.png') ? new T.Point(25, 27) : new T.Point(23, 25),
map.enableScrollWheelZoom(); iconAnchor: new T.Point(10, 25)
});
// 始终开启点击标点功能 var marker = new T.Marker(new T.LngLat(point[i].longitude, point[i].latitude), {icon: icon});
addMapClick();
}
function addMapClick() {
map.addEventListener("click", MapClick);
}
function MapClick(event) {
var lng = event.lnglat.getLng();
var lat = event.lnglat.getLat();
// 清除旧标记并添加新标记(使用默认图标)
map.clearOverLays();
var marker = new T.Marker(new T.LngLat(lng, lat));
map.addOverLay(marker);
// 保存选中位置
window.selectedLocation = {
longitude: lng,
latitude: lat
};
// 发送位置信息给 Flutter
sendLocationToFlutter(lat, lng);
}
function sendLocationToFlutter(lat, lng) {
var payload = {
data: [
{
latitude: lat,
longitude: lng
}
]
};
// Flutter WebView 桥接
if (typeof window.flutterPostMessage === 'function') {
window.flutterPostMessage(payload);
return;
}
// 备用桥接方法uniapp 或小程序)
uni.getEnv(function (res) {
if (res.plus) {
uni.postMessage({ data: { "longitude": lng, "latitude": lat } });
} else {
if (window.wx && window.wx.miniProgram) {
try {
window.wx.miniProgram.postMessage({ data: { "longitude": lng, "latitude": lat } });
window.wx.miniProgram.navigateBack();
} catch(e) {
console.log('wx miniProgram error', e);
}
}
}
});
}
// Flutter 获取选中位置的方法
function getSelectedLocation() {
try {
if (window.selectedLocation) {
return window.selectedLocation;
}
return null;
} catch (e) {
console.log('getSelectedLocation error', e);
return null;
}
}
// Flutter 调用,设置地图中心和标记
function setLocation(lng, lat) {
try {
map.centerAndZoom(new T.LngLat(lng, lat), zoom);
var marker = new T.Marker(new T.LngLat(lng, lat));
map.clearOverLays();
map.addOverLay(marker); map.addOverLay(marker);
window.selectedLocation = { longitude: lng, latitude: lat };
return true;
} catch (e) {
console.log('setLocation error', e);
return false;
} }
} else {
addMapClick()
} }
}
function addMapClick() {
map.addEventListener("click", MapClick);
}
function MapClick(event) {
var marker = new T.Marker(new T.LngLat(event.lnglat.getLng(), event.lnglat.getLat()));
map.clearOverLays();
map.addOverLay(marker);
uni.getEnv(function (res) {
if (res.plus) {
uni.postMessage({
data: {
"longitue": event.lnglat.getLng(),
"latitude": event.lnglat.getLat(),
}
})
}else {
wx.miniProgram.navigateBack()
wx.miniProgram.postMessage({
data: {
"longitue": event.lnglat.getLng(),
"latitude": event.lnglat.getLat(),
}
})
}
});
}
</script> </script>
</html> </html>

137
assets/map/map1.html Normal file
View File

@ -0,0 +1,137 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>地图</title>
<!-- 天地图API -->
<script src="https://api.tianditu.gov.cn/api?v=4.0&tk=e8a16137fd226a62a23cc7ba5c9c78ce" type="text/javascript"></script>
<style>
html, body { height: 100%; margin: 0; padding: 0; }
#mapDiv { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
</style>
</head>
<body onload="onLoad()">
<div id="mapDiv"></div>
</body>
<script type="text/javascript">
var map;
var zoom = 14;
var currentMarker = null;
function getUrlParam(name) {
if (window.__injectedParams && window.__injectedParams[name] !== undefined) {
return window.__injectedParams[name].toString();
}
const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
const r = window.location.search.substr(1).match(reg);
if (r != null) return decodeURI(r[2]);
return "";
}
function onLoad() {
var imageURL = "https://t0.tianditu.gov.cn/img_w/wmts?" +
"SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
"&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e8a16137fd226a62a23cc7ba5c9c78ce";
var lay = new T.TileLayer(imageURL, {minZoom: 1, maxZoom: 18});
var config = {layers: [lay]};
map = new T.Map("mapDiv", config);
var initLng = parseFloat(getUrlParam('longitude'));
var initLat = parseFloat(getUrlParam('latitude'));
if (isNaN(initLng) || isNaN(initLat) || initLng === 0 || initLat === 0) {
initLng = 116.397428;
initLat = 39.90923;
}
map.centerAndZoom(new T.LngLat(initLng, initLat), zoom);
map.enableScrollWheelZoom();
// 始终开启点击标点功能
addMapClick();
}
function addMapClick() {
map.addEventListener("click", MapClick);
}
function MapClick(event) {
var lng = event.lnglat.getLng();
var lat = event.lnglat.getLat();
// 清除旧标记并添加新标记(使用默认图标)
map.clearOverLays();
var marker = new T.Marker(new T.LngLat(lng, lat));
map.addOverLay(marker);
// 保存选中位置
window.selectedLocation = {
longitude: lng,
latitude: lat
};
// 发送位置信息给 Flutter
sendLocationToFlutter(lat, lng);
}
function sendLocationToFlutter(lat, lng) {
var payload = {
data: [
{
latitude: lat,
longitude: lng
}
]
};
// Flutter WebView 桥接
if (typeof window.flutterPostMessage === 'function') {
window.flutterPostMessage(payload);
return;
}
// 备用桥接方法uniapp 或小程序)
uni.getEnv(function (res) {
if (res.plus) {
uni.postMessage({ data: { "longitude": lng, "latitude": lat } });
} else {
if (window.wx && window.wx.miniProgram) {
try {
window.wx.miniProgram.postMessage({ data: { "longitude": lng, "latitude": lat } });
window.wx.miniProgram.navigateBack();
} catch(e) {
console.log('wx miniProgram error', e);
}
}
}
});
}
// Flutter 获取选中位置的方法
function getSelectedLocation() {
try {
if (window.selectedLocation) {
return window.selectedLocation;
}
return null;
} catch (e) {
console.log('getSelectedLocation error', e);
return null;
}
}
// Flutter 调用,设置地图中心和标记
function setLocation(lng, lat) {
try {
map.centerAndZoom(new T.LngLat(lng, lat), zoom);
var marker = new T.Marker(new T.LngLat(lng, lat));
map.clearOverLays();
map.addOverLay(marker);
window.selectedLocation = { longitude: lng, latitude: lat };
return true;
} catch (e) {
console.log('setLocation error', e);
return false;
}
}
</script>
</html>

BIN
assets/map/static/50.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -390,6 +390,9 @@ enum UploadFileType {
/// - : '169', : 'key_project_initiation_image' /// - : '169', : 'key_project_initiation_image'
keyProjectInitiationImage('169', 'key_project_initiation_image'), keyProjectInitiationImage('169', 'key_project_initiation_image'),
/// - : '170', : 'key_homework_acceptance_pictures'
keyHomeworkAcceptancePictures('170', 'key_homework_acceptance_pictures'),
/// - : '172', : 'key_projects_hidden_dangers_Pictures' /// - : '172', : 'key_projects_hidden_dangers_Pictures'
keyProjectsHiddenDangersPictures('172', 'key_projects_hidden_dangers_pictures'), keyProjectsHiddenDangersPictures('172', 'key_projects_hidden_dangers_pictures'),

View File

@ -163,6 +163,12 @@ class _KeyTasksHiddenDangerDetailState extends State<KeyTasksHiddenDangerDetail>
UploadFileType.keyHomeworkRectificationPictures, UploadFileType.keyHomeworkRectificationPictures,
); );
} }
if (pd['acceptRecord'] != null){
_getImagePath(
widget.itemId,
UploadFileType.keyHomeworkAcceptancePictures,
);
}
}); });
} else { } else {
@ -204,6 +210,8 @@ class _KeyTasksHiddenDangerDetailState extends State<KeyTasksHiddenDangerDetail>
videoList.addAll(images); videoList.addAll(images);
}else if (UploadFileType.keyHomeworkRectificationPictures == type) { }else if (UploadFileType.keyHomeworkRectificationPictures == type) {
files2.addAll(images); files2.addAll(images);
}else if (UploadFileType.keyHomeworkAcceptancePictures == type) {
files5.addAll(images);
} }
@ -516,6 +524,85 @@ class _KeyTasksHiddenDangerDetailState extends State<KeyTasksHiddenDangerDetail>
), ),
], ],
//
if (pd['acceptRecord'] != null) ...[
SizedBox(height: 10),
// const Divider(height: 10,color: Colors.grey,),
Card(
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
top: 10,
left: 10,
right: 10,
),
child: Row(
children: [
Container(
width: 3,
height: 15,
color: Colors.blue,
),
const SizedBox(width: 8),
Text(
"验收信息",
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
],
),
),
_buildInfoItem(
'验收部门',
pd["acceptRecord"]['acceptDepartmentName'] ?? '',
),
Divider(height: 1),
_buildInfoItem(
'验收人',
pd["acceptRecord"]['acceptUserName'] ?? '',
),
Divider(height: 1),
_buildInfoItem(
'验收时间',
_changeTime( pd["acceptRecord"]['acceptTime'] ?? ''),
// pd["rectificationRecord"]['rectificationTime'] ?? '',
),
// Divider(height: 1),
// _buildInfoItem(
// '整改描述',
// // _changeTime( pd["hiddenUserPresetsCO"]['rectifyDeadline'] ?? ''),
// pd["acceptRecord"]['rectificationDesc'] ?? '',
// ),
ListItemFactory.createTextImageItem(
text: "验收图片",
imageUrls:
files5.map((item) => item['filePath'].toString()).toList(),
horizontalPadding: 10,
onImageTapped: (index) {
presentOpaque(
SingleImageViewer(
imageUrl:
ApiService.baseImgPath + files5[index]['filePath'],
),
context,
);
},
),
],
),
),
],
// // // //
// if (pd['hiddenRectifyUserCO'] != null && // if (pd['hiddenRectifyUserCO'] != null &&
@ -1062,11 +1149,14 @@ class _KeyTasksHiddenDangerDetailState extends State<KeyTasksHiddenDangerDetail>
// } // }
String _getSourceDangers(final item) { String _getSourceDangers(final item) {
//,1-,2-() 3-()
int type = item["source"] ?? 0; int type = item["source"] ?? 0;
if (1 == type) { if (1 == type) {
return "隐患来源:安全环保检查(监管端)"; return "隐患来源:视频识别报警";
} else if (2 == type) { } else if (2 == type) {
return "隐患来源:安全环保检查(企业端)"; return "隐患来源:安全环保检查(监管端)";
} else if (3 == type) {
return "隐患来源:安全环保检查(企业端)";
} else { } else {
return "隐患来源:"; return "隐患来源:";
} }

View File

@ -146,13 +146,17 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
onFilterPressed: () async { onFilterPressed: () async {
// //
// String searchData=''; // String searchData='';
keyTasksHiddenDangerListData = await pushPage( final searchData= await pushPage(
KeyTasksHiddenFilterPage( KeyTasksHiddenFilterPage(
searchData: keyTasksHiddenDangerListData, searchData: keyTasksHiddenDangerListData,
), ),
context, context,
); );
_performSearch(); if(searchData!=null){
keyTasksHiddenDangerListData=searchData;
_performSearch();
}
}, },
), ),
@ -356,8 +360,8 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
), ),
], ],
if (pageData['acceptUserId'] != null && if (pageData['acceptUserTime'] != null &&
pageData['acceptUserId'].isNotEmpty)...[ pageData['acceptUserTime'].isNotEmpty)...[
SizedBox(height: 8), SizedBox(height: 8),
Padding( Padding(
padding: EdgeInsets.only(left: 10, right: 10), padding: EdgeInsets.only(left: 10, right: 10),
@ -365,16 +369,21 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
// //
Text( Expanded(
'验收人: ${pageData['acceptUserName'] ?? ''}', child:
style: TextStyle(fontSize: 14, color: Colors.black87), Text(
'验收人: ${pageData['acceptUserName'] ?? ''}',
style: TextStyle(fontSize: 14, color: Colors.black87),
),
), ),
Expanded(
Text( child:
'隐患验收时间: ${_changeTime(pageData['acceptUserTime']??'')}', Text(
style: TextStyle( '验收时间: ${_changeTime(pageData['acceptUserTime']??'')}',
fontSize: 14, style: TextStyle(
color: Colors.black87, fontSize: 14,
color: Colors.black87,
),
), ),
), ),
], ],
@ -384,6 +393,34 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
], ],
SizedBox(height: 8),
Padding(
padding: EdgeInsets.only(left: 10, right: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
//
Expanded(
child:
Text(
'重点作业名称: ${pageData['projectName'] ?? ''}',
style: TextStyle(fontSize: 14, color: Colors.black87),
),
),
// Expanded(
// child:
// Text(
// '',
// style: TextStyle(
// fontSize: 14,
// color: Colors.black87,
// ),
// ),
// ),
],
),
),
SizedBox(height: 8), SizedBox(height: 8),
Row( Row(
@ -396,7 +433,7 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
height: 35, height: 35,
onPressed: () async { onPressed: () async {
// print('查看: ${pageData['title']}'); // print('查看: ${pageData['title']}');
pushPage( await pushPage(
KeyTasksHiddenDangerDetail( KeyTasksHiddenDangerDetail(
2, 2,
pageData['id'], pageData['id'],
@ -406,6 +443,8 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
), ),
context, context,
); );
_page = 1;
_getListData(false);
}, },
backgroundColor: h_backGroundColor(), backgroundColor: h_backGroundColor(),
textStyle: const TextStyle(color: Colors.black), textStyle: const TextStyle(color: Colors.black),
@ -422,7 +461,7 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
child: CustomButton( child: CustomButton(
height: 35, height: 35,
onPressed: () async { onPressed: () async {
pushPage( await pushPage(
KeyTasksHiddenDangerDetail( KeyTasksHiddenDangerDetail(
1, 1,
pageData['id'], pageData['id'],
@ -432,6 +471,8 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
), ),
context, context,
); );
_page = 1;
_getListData(false);
}, },
backgroundColor: h_AppBarColor(), backgroundColor: h_AppBarColor(),
textStyle: const TextStyle(color: Colors.white), textStyle: const TextStyle(color: Colors.white),
@ -524,11 +565,14 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
} }
String _getSourceDangers(final item) { String _getSourceDangers(final item) {
//,1-,2-() 3-()
int type = item["source"] ?? 0; int type = item["source"] ?? 0;
if (1 == type) { if (1 == type) {
return "隐患来源:安全环保检查(监管端)"; return "隐患来源:视频识别报警";
} else if (2 == type) { } else if (2 == type) {
return "隐患来源:安全环保检查(企业端)"; return "隐患来源:安全环保检查(监管端)";
} else if (3 == type) {
return "隐患来源:安全环保检查(企业端)";
} else { } else {
return "隐患来源:"; return "隐患来源:";
} }
@ -590,7 +634,18 @@ class _KeyTasksHiddenDangerListState extends State<KeyTasksHiddenDangerList> {
"hiddenDesc": "", "hiddenDesc": "",
"stateList": [], "stateList": [],
"pageSize": 20, "pageSize": 20,
"pageIndex": 1 "pageIndex": 1,
"source": "",
'sourceName': "",
"startTime": "",
"endTime": "",
"projectName": "",
"hiddenFindUserName": "",
"orderBy": "",
"orderDirection": "",
"groupBy": "",
}; };

View File

@ -336,9 +336,9 @@ class _KeyTasksHiddenFilterPageState extends State<KeyTasksHiddenFilterPage> {
try { try {
List<dynamic> newList = [ List<dynamic> newList = [
{'dataId':'1','dataName':'安全环保检查(监管端)',}, {'dataId':'1','dataName':'视频识别报警',},
{'dataId':'2','dataName':'安全环保检查(企业端)',}, {'dataId':'2','dataName':'安全环保检查(监管端)',},
{'dataId':'3','dataName':'视频监控',}, {'dataId':'3','dataName':'安全环保检查(企业端)',},
]; ];
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
@ -453,16 +453,17 @@ class _KeyTasksHiddenFilterPageState extends State<KeyTasksHiddenFilterPage> {
_initiatorInspectionController.clear(); _initiatorInspectionController.clear();
_inspectorController.clear(); _inspectorController.clear();
searchData['place']=''; searchData['hiddenDesc']='';
searchData['createName']=''; searchData['source']='';
searchData['inspectionDepartmentId']=''; searchData['sourceName']='';
searchData['inspectionDepartmentName']=''; searchData['startTime']='';
searchData['timeStart']=''; searchData['endTime']='';
searchData['timeEnd']='';
searchData['inspectedCorpinfoName']='';
searchData['projectName']=''; searchData['projectName']='';
searchData['inspectionUserName']=''; searchData['hiddenFindUserName']='';
searchData['year']=''; searchData['orderBy']='';
searchData['orderDirection']='';
searchData['groupBy']='';
}); });
final Map<String, dynamic> pd = { final Map<String, dynamic> pd = {
...searchData, ...searchData,

View File

@ -52,6 +52,9 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
String responsibleId = "";// String responsibleId = "";//
String responsibleName = ""; String responsibleName = "";
// key
GlobalKey _mapPreviewKey = GlobalKey();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -158,7 +161,7 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
itemCount: fileList.length, itemCount: fileList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
final file = fileList[index]; final file = fileList[index];
final fileName = file['fileName'] ?? '协议${index + 1}'; final fileName = _subText(file,index);
final fileUrl = file['filePath'] ?? ''; final fileUrl = file['filePath'] ?? '';
return ItemListWidget.OneRowButtonTitleText( return ItemListWidget.OneRowButtonTitleText(
@ -199,6 +202,7 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
upKeyTasksData["latitude"] = result['latitude'].toString(); upKeyTasksData["latitude"] = result['latitude'].toString();
centerLng=double.parse(upKeyTasksData['longitude']); centerLng=double.parse(upKeyTasksData['longitude']);
centerLat=double.parse(upKeyTasksData['latitude']); centerLat=double.parse(upKeyTasksData['latitude']);
_mapPreviewKey = GlobalKey(); // key
}); });
} }
@ -209,6 +213,7 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
margin: EdgeInsetsGeometry.symmetric(horizontal: 15), margin: EdgeInsetsGeometry.symmetric(horizontal: 15),
child: child:
MapPreviewWidget( MapPreviewWidget(
key: _mapPreviewKey, // key
width: MediaQuery.of(context).size.width - 30, width: MediaQuery.of(context).size.width - 30,
height: 200, height: 200,
points: [ points: [
@ -216,7 +221,8 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
"longitude": centerLng, "longitude": centerLng,
"latitude": centerLat, "latitude": centerLat,
// iconPath assets/map/static/marker50.png // iconPath assets/map/static/marker50.png
"iconPath": "map/50.png" // "iconPath": "https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png", // 使
"iconPath": "images/map/50.png"
}, },
// //
], ],
@ -572,6 +578,16 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
return typeText; return typeText;
} }
String _subText(final item,index) {
final fileName = item['fileName'] ?? '协议${index + 1}';
if (fileName.length > 23) {
return '${fileName.substring(0, 23)}...';
}
return fileName;
}
String _getSupervisionUnitFlag(final item) { String _getSupervisionUnitFlag(final item) {
//,1:,0: //,1:,0:
int type = item["supervisionUnitFlag"]??''; int type = item["supervisionUnitFlag"]??'';

File diff suppressed because it is too large Load Diff

View File

@ -154,6 +154,11 @@ flutter:
- assets/icon-apps/ - assets/icon-apps/
- assets/js/ - assets/js/
- assets/map/ - assets/map/
- assets/map/map.html
- assets/map/js/
- assets/map/images/
- assets/map/images/map/
- assets/map/static/
- assets/tabbar/ - assets/tabbar/
- assets/study/ - assets/study/
- assets/route/routes.txt - assets/route/routes.txt