From 7ace04669865965bf849cd871ed5e0109c4b359a Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Fri, 17 Oct 2025 15:35:18 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E5=A1=94=E6=A3=80=E6=B5=8B=E4=BA=8C?=
=?UTF-8?q?=E7=BA=A7=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
js/pages/index/dialog.js | 35 +-
js/pages/towerAssInspect/dialog.js | 210 ++++++
js/pages/towerAssInspect/towerAssInspect.js | 733 ++++++++++++--------
pages/towerAssInspect/dialog.html | 94 +++
pages/towerAssInspect/towerAssInspect.html | 36 +-
5 files changed, 797 insertions(+), 311 deletions(-)
create mode 100644 js/pages/towerAssInspect/dialog.js
create mode 100644 pages/towerAssInspect/dialog.html
diff --git a/js/pages/index/dialog.js b/js/pages/index/dialog.js
index 54a347a..6b9b194 100644
--- a/js/pages/index/dialog.js
+++ b/js/pages/index/dialog.js
@@ -149,10 +149,41 @@ function ConstructionQualityList() {
{ field: "bdName", align: "center", title: "边带名称" },
{ field: "deviceName", align: "center", title: "设备名称" },
{ field: "modelName", align: "center", title: "检测属性" },
- { field: "val", align: "center", title: "检测值" }, // 拼接
+ {
+ field: "val",
+ align: "center",
+ title: "检测值",
+ templet: function (d) {
+ // 自定义检测值显示
+ if (d.val !== null && d.val !== undefined) {
+ // 根据检测值添加单位或特殊格式
+ return (
+ '' +
+ d.val +
+ " " +
+ d.unit +
+ ""
+ );
+ }
+ return '--';
+ },
+ },
{ field: "createTime", align: "center", title: "检测时间" },
{ field: "changeVal", align: "center", title: "变化值" },
- { field: "isWarn", align: "center", title: "是否告警" }, // 拼接
+ {
+ field: "isWarn",
+ align: "center",
+ title: "是否告警",
+ templet: function (d) {
+ // 自定义是否告警显示
+ if (d.isWarn == 1) {
+ return '是';
+ } else if (d.isWarn === 0) {
+ return '否';
+ }
+ return '--';
+ },
+ },
],
],
initComplete: function () {
diff --git a/js/pages/towerAssInspect/dialog.js b/js/pages/towerAssInspect/dialog.js
new file mode 100644
index 0000000..d9da1a9
--- /dev/null
+++ b/js/pages/towerAssInspect/dialog.js
@@ -0,0 +1,210 @@
+let element, layer, laydate;
+const bidCode = parent.parent.$("#bidPro").val();
+var table;
+var alarmTableIns;
+var qualityInspectionTableIns;
+layui.use(["layer", "element", "table"], function () {
+ element = layui.element;
+ layer = layui.layer;
+ laydate = layui.laydate;
+ table = layui.table;
+
+ //下拉选
+ getConstruction();
+ getRegion();
+ //施工质量列表
+ ConstructionQualityList();
+ // laydate.render({
+ // elem: "#ID-laydate-type-datetime",
+ // });
+
+ laydate.render({
+ elem: "#ID-laydate-rangeLinked",
+ range: ["#ID-laydate-start-date-1", "#ID-laydate-end-date-1"],
+ rangeLinked: true, // 开启日期范围选择时的区间联动标注模式 --- 2.8+ 新增
+ });
+});
+
+//下拉选
+function getConstruction() {
+ const url = commonUrl + "system/sys/select/getBuildLists"; // 建管单位url
+ ajaxRequest(
+ url,
+ "get",
+ null,
+ true,
+ function () {},
+ function (result) {
+ if (result.code === 200) {
+ let html = "";
+ if (result.data && result.data.length > 0) {
+ $.each(result.data, function (index, item) {
+ html +=
+ '";
+ });
+ }
+ $("#construction").empty().append(html);
+ layui.form.render();
+ } else if (result.code === 500) {
+ layer.msg(result.msg, { icon: 2 });
+ }
+ },
+ function (xhr) {
+ error(xhr);
+ }
+ );
+}
+
+function getRegion() {
+ const url = commonUrl + "system/sys/select/getAreaLists"; // 建管单位url
+ ajaxRequest(
+ url,
+ "get",
+ null,
+ true,
+ function () {},
+ function (result) {
+ if (result.code === 200) {
+ let html = "";
+ if (result.data && result.data.length > 0) {
+ $.each(result.data, function (index, item) {
+ html +=
+ '";
+ });
+ }
+ $("#region").empty().append(html);
+ layui.form.render();
+ } else if (result.code === 500) {
+ layer.msg(result.msg, { icon: 2 });
+ }
+ },
+ function (xhr) {
+ error(xhr);
+ }
+ );
+}
+
+function ConstructionQualityList() {
+ const url = commonUrl + "screen/sj/twoPage/getEnvironmentList";
+
+ console.log("bidCode", bidCode);
+
+ let times = "";
+ let startTime = "";
+ let endTime = "";
+ if ($("#ID-laydate-start-date-1").val() != "") {
+ times =
+ $("#ID-laydate-start-date-1").val() +
+ " - " +
+ $("#ID-laydate-end-date-1").val();
+ startTime = $("#ID-laydate-start-date-1").val();
+ endTime = $("#ID-laydate-end-date-1").val();
+ } else {
+ times = "";
+ startTime = "";
+ endTime = "";
+ }
+
+ console.log("times", times);
+
+ qualityInspectionTableIns = table.render({
+ elem: "#demo",
+ url: url,
+ skin: "line",
+ headers: {
+ decrypt: "decrypt",
+ Authorization: token,
+ },
+ where: {
+ roleCode: roleCode,
+ orgId: orgId,
+ userId: userId,
+ bidCode: bidCode,
+ deviceType: "1901",
+ startTime,
+ endTime,
+ deviceName: $("#deviceName").val(),
+ modelName: $("#modelName").val(),
+ // month: $('#ID-laydate-type-datetime').val(),
+ },
+ cols: [
+ [
+ {
+ field: "number",
+ width: 80,
+ title: "序号",
+ align: "center",
+ type: "numbers",
+ fixed: "left",
+ },
+ { field: "bdName", align: "center", title: "边带名称" },
+ { field: "deviceName", align: "center", title: "设备名称" },
+ { field: "modelName", align: "center", title: "检测属性" },
+ {
+ field: "val",
+ align: "center",
+ title: "检测值",
+ templet: function (d) {
+ // 自定义检测值显示
+ if (d.val !== null && d.val !== undefined) {
+ // 根据检测值添加单位或特殊格式
+ return (
+ '' +
+ d.val +
+ " " +
+ d.unit +
+ ""
+ );
+ }
+ return '--';
+ },
+ },
+ { field: "createTime", align: "center", title: "检测时间" },
+ { field: "changeVal", align: "center", title: "变化值" },
+ {
+ field: "isWarn",
+ align: "center",
+ title: "是否告警",
+ templet: function (d) {
+ // 自定义是否告警显示
+ if (d.isWarn == 1) {
+ return '是';
+ } else if (d.isWarn === 0) {
+ return '否';
+ }
+ return '--';
+ },
+ },
+ ],
+ ],
+ initComplete: function () {
+ // 在表格渲染完成后,重新渲染序号列
+ var that = this.elem.next();
+ var tool = that
+ .children(".layui-table-box")
+ .children(".layui-table-fixed")
+ .children(".layui-table-body")
+ .children(".layui-table");
+ tool.find("tr").each(function (index, item) {
+ $(this)
+ .find('td[data-field="LAY_TABLE_INDEX"]')
+ .text(index + 1);
+ });
+ },
+ done: function (res, curr, count, origin) {
+ console.log(res);
+ },
+ page: true, //开启分页
+ loading: true, //数据加载中。。。
+ limits: [5, 10, 20, 100],
+ limit: 20,
+ });
+}
diff --git a/js/pages/towerAssInspect/towerAssInspect.js b/js/pages/towerAssInspect/towerAssInspect.js
index abe8600..8013f07 100644
--- a/js/pages/towerAssInspect/towerAssInspect.js
+++ b/js/pages/towerAssInspect/towerAssInspect.js
@@ -1,297 +1,445 @@
-let layer,table,form;
-let myChart = echarts.init(document.getElementById('tendency'));
-const bidCode = parent.$('#bidPro').val();
+let layer, table, form;
+let myChart = echarts.init(document.getElementById("tendency"));
+const bidCode = parent.$("#bidPro").val();
-$('#modelIframe').attr('src', '../../pages/3Dglb/index.html');
+$("#modelIframe").attr("src", "../../pages/3Dglb/index.html");
-layui.use(['layer','table','form'], function () {
+layui.use(["layer", "table", "form"], function () {
layer = layui.layer;
- table = layui.table;
- form = layui.form;
- // 标段工程下拉选监听
- form.on('select(gt)', function (data) {
- getDeviceList(data.value);
- });
- // 响应成功后的拦截器
- $.ajaxSetup({
- beforeSend: function(xhr, options) {
- var originalSuccess = options.success
- options.success = function(data, textStatus, jqXhr) {
- data = modifyResponseData(data);
- // success(data,textStatus, jqXhr);
- originalSuccess.apply(this, arguments)
- }
- }
- })
- //杆塔下拉选
- getGtLists();
+ table = layui.table;
+ form = layui.form;
+ // 标段工程下拉选监听
+ form.on("select(gt)", function (data) {
+ getDeviceList(data.value);
+ });
+ // 响应成功后的拦截器
+ $.ajaxSetup({
+ beforeSend: function (xhr, options) {
+ var originalSuccess = options.success;
+ options.success = function (data, textStatus, jqXhr) {
+ data = modifyResponseData(data);
+ // success(data,textStatus, jqXhr);
+ originalSuccess.apply(this, arguments);
+ };
+ },
+ });
+ //杆塔下拉选
+ getGtLists();
});
-function getGtLists(){
- const url = commonUrl + "system/sys/select/getGtLists?bidCode="+ bidCode; // 杆塔url
- ajaxRequest(url, "get", null , true, function () {
- }, function (result) {
- if (result.code === 200) {
- let html = '';
- if (result.data && result.data.length > 0 && result.data[0] !== null) {
- $.each(result.data, function (index, item) {
- html += ''
- })
- // 设备列表
- getDeviceList(result.data[0].gtId);
- }else{
- html += ''
- getDeviceList("");
- }
- $('#gt').empty().append(html);
- layui.form.render();
- } else if (result.code === 500) {
- layer.msg(result.msg, { icon: 2 });
- }
- }, function (xhr) {
- layer.msg(xhr, { icon: 2 });
- });
+function getGtLists() {
+ const url = commonUrl + "system/sys/select/getGtLists?bidCode=" + bidCode; // 杆塔url
+ ajaxRequest(
+ url,
+ "get",
+ null,
+ true,
+ function () {},
+ function (result) {
+ if (result.code === 200) {
+ let html = "";
+ if (
+ result.data &&
+ result.data.length > 0 &&
+ result.data[0] !== null
+ ) {
+ $.each(result.data, function (index, item) {
+ html +=
+ '";
+ });
+ // 设备列表
+ getDeviceList(result.data[0].gtId);
+ } else {
+ html += '';
+ getDeviceList("");
+ }
+ $("#gt").empty().append(html);
+ layui.form.render();
+ } else if (result.code === 500) {
+ layer.msg(result.msg, { icon: 2 });
+ }
+ },
+ function (xhr) {
+ layer.msg(xhr, { icon: 2 });
+ }
+ );
}
-function getDeviceList(gtId){
- const paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '>Id=' + gtId;
- let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
- const url = commonUrl + "screen/largeScreen/towerAssInspect/getDeviceList?params="+montageParam; // url
- ajaxRequestGet(url, "get", true, function () {
- }, function (result) {
- let html = '';
- if (result.code === 200) {
- if (result.data && result.data.length > 0 && result.data[0] !== null) {
- $.each(result.data, function (index, item) {
- html += '
';
- html +='
';
- if(item.type=="1"){
- html += '
';
- }else if(item.type=="2"){
- html += '
';
- }else if(item.type=="0"){
- html += '
';
- }
- html += '
'+ item.deviceName +'
';
- html +='
';
- })
- getInfo(result.data[0].deviceId)
- }else{
- html += '无数据
'
- getInfo("")
- }
- } else if (result.code === 500) {
- layer.msg(result.msg, { icon: 2 });
- }
- $('#deviceList').empty().append(html);
- }, function (xhr , status, error) {
- error(xhr, status, error)
- }, aqEnnable);
+function getDeviceList(gtId) {
+ const paramData =
+ "bidCode=" +
+ bidCode +
+ "&roleCode=" +
+ roleCode +
+ "&orgId=" +
+ orgId +
+ "&userId=" +
+ userId +
+ ">Id=" +
+ gtId;
+ let montageParam = aqEnnable
+ ? encryptCBC(paramData)
+ : " &" + encryptCBC(paramData);
+ const url =
+ commonUrl +
+ "screen/largeScreen/towerAssInspect/getDeviceList?params=" +
+ montageParam; // url
+ ajaxRequestGet(
+ url,
+ "get",
+ true,
+ function () {},
+ function (result) {
+ let html = "";
+ if (result.code === 200) {
+ if (
+ result.data &&
+ result.data.length > 0 &&
+ result.data[0] !== null
+ ) {
+ $.each(result.data, function (index, item) {
+ html +=
+ '";
+ html +=
+ '
';
+ if (item.type == "1") {
+ html += '
';
+ } else if (item.type == "2") {
+ html += '
';
+ } else if (item.type == "0") {
+ html += '
';
+ }
+ html +=
+ '
' +
+ item.deviceName +
+ "
";
+ html += "
";
+ });
+ getInfo(result.data[0].deviceId);
+ } else {
+ html += '无数据
';
+ getInfo("");
+ }
+ } else if (result.code === 500) {
+ layer.msg(result.msg, { icon: 2 });
+ }
+ $("#deviceList").empty().append(html);
+ },
+ function (xhr, status, error) {
+ error(xhr, status, error);
+ },
+ aqEnnable
+ );
}
//根据点击的设备去查询其他信息
-function getInfo(deviceId){
- //实时检测
- getRealTimeDetection(deviceId);
-
- //实时告警
- getRealTimeAlarmList(deviceId)
-
- //历史记录
- getHistoryList(deviceId)
+function getInfo(deviceId) {
+ //实时检测
+ getRealTimeDetection(deviceId);
+
+ //实时告警
+ getRealTimeAlarmList(deviceId);
+
+ //历史记录
+ getHistoryList(deviceId);
}
-function getRealTimeDetection(deviceId){
- let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId;
- let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
- const url = commonUrl + "screen/largeScreen/towerAssInspect/getRealTimeDetection?params="+montageParam; // url
- ajaxRequestGet(url, "get", true, function () {
- }, function (result) {
- let html = '';
- if (result.code === 200) {
- if (result.data && result.data.length > 0 && result.data[0] !== null) {
- $.each(result.data, function (index, item) {
- let modeName = nullToEmpty(item.modeName);
- let val = nullToEmpty(item.val);
- html +='' ;
- html +='
';
- html +='
'+ modeName +'
';
- html +='
'+ val +'
';
- html +='
';
- html +='
';
- })
- //当日检测变化趋势
- getTrend(deviceId,result.data[0].id)
- }else{
- html += '无数据
'
- }
- } else if (result.code === 500) {
- layer.msg(result.msg, { icon: 2 });
- }
- $('#detection').empty().append(html);
- }, function (xhr, status, error) {
- error(xhr, status, error)
- setData(null);
- }, aqEnnable);
+// 双击设备列表的设备,打开设备详情
+function onDeviceDoubleClick(deviceId) {
+ openIframeByParamObj(
+ "handleData2",
+ "组塔监测信息",
+ "./dialog.html",
+ "72%",
+ "95%",
+ null,
+ 1
+ );
}
-function nullToEmpty(name){
- if (name === null || name === undefined) {
- name = "";
- }
- return name
+function getRealTimeDetection(deviceId) {
+ let paramData =
+ "bidCode=" +
+ bidCode +
+ "&roleCode=" +
+ roleCode +
+ "&orgId=" +
+ orgId +
+ "&userId=" +
+ userId +
+ "&deviceId=" +
+ deviceId;
+ let montageParam = aqEnnable
+ ? encryptCBC(paramData)
+ : " &" + encryptCBC(paramData);
+ const url =
+ commonUrl +
+ "screen/largeScreen/towerAssInspect/getRealTimeDetection?params=" +
+ montageParam; // url
+ ajaxRequestGet(
+ url,
+ "get",
+ true,
+ function () {},
+ function (result) {
+ let html = "";
+ if (result.code === 200) {
+ if (
+ result.data &&
+ result.data.length > 0 &&
+ result.data[0] !== null
+ ) {
+ $.each(result.data, function (index, item) {
+ let modeName = nullToEmpty(item.modeName);
+ let val = nullToEmpty(item.val);
+ html +=
+ '";
+ html += '
';
+ html +=
+ '
' +
+ modeName +
+ "
";
+ html +=
+ '
' +
+ val +
+ "
";
+ html += "
";
+ html += "
";
+ });
+ //当日检测变化趋势
+ getTrend(deviceId, result.data[0].id);
+ } else {
+ html += '无数据
';
+ }
+ } else if (result.code === 500) {
+ layer.msg(result.msg, { icon: 2 });
+ }
+ $("#detection").empty().append(html);
+ },
+ function (xhr, status, error) {
+ error(xhr, status, error);
+ setData(null);
+ },
+ aqEnnable
+ );
}
-function getTrend(deviceId,id){
- let paramData = 'bidCode=' + bidCode + '&roleCode=' + roleCode + '&orgId=' + orgId + '&userId=' + userId + '&deviceId=' + deviceId + '&id=' + id;
- let montageParam = aqEnnable ? encryptCBC(paramData) : ' &' + encryptCBC(paramData);
- const url = commonUrl + "screen/largeScreen/towerAssInspect/getTrend?params="+montageParam; // url
- ajaxRequestGet(url, "GET", true, function () {
- }, function (result) {
- let html = '';
- if (result.code === 200) {
- if (result.data && result.data.length > 0 && result.data[0] !== null) {
- let xLabel =[];
- let dataValue = [];
- $.each(result.data, function (index, item) {
- xLabel.push(item.time);
- dataValue.push(item.changeVal);
- });
- initEchartsOne(xLabel,dataValue);
- }else{
- initEchartsOne([],[]);
- }
-
- } else if (result.code === 500) {
- layer.msg(result.msg, { icon: 2 });
- }
- }, function (xhr, status, error) {
- error(xhr, status, error)
- setData(null);
- }, aqEnnable);
+function nullToEmpty(name) {
+ if (name === null || name === undefined) {
+ name = "";
+ }
+ return name;
}
-
-function getRealTimeAlarmList(deviceId){
- const url = commonUrl + "screen/largeScreen/towerAssInspect/getRealTimeAlarmList"; // 建管单位url
- table.render({
- elem: '#demo1',
- height:'full-530',
- url: url,
- skin: 'line',
- page: true,
- headers:{
- decrypt:"decrypt",
- "Authorization":token
- },
- where: {
- deviceId:deviceId
- },
- cols: [[
- {type: 'numbers', title: '序号'}, // 添加序号列
- {field: 'warnContent', title: '告警内容',align:'center'},
- {field: 'warnTime', title: '预警时间',align:'center'}
- ]],
- initComplete: function () {
- // 在表格渲染完成后,重新渲染序号列
- var that = this.elem.next();
- var tool = that.children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-body').children('.layui-table');
- tool.find("tr").each(function (index, item) {
- $(this).find('td[data-field="LAY_TABLE_INDEX"]').text(index + 1);
- });
- },
- done:function(res, curr, count, origin){
- console.log(res);
- }
- })
+function getTrend(deviceId, id) {
+ let paramData =
+ "bidCode=" +
+ bidCode +
+ "&roleCode=" +
+ roleCode +
+ "&orgId=" +
+ orgId +
+ "&userId=" +
+ userId +
+ "&deviceId=" +
+ deviceId +
+ "&id=" +
+ id;
+ let montageParam = aqEnnable
+ ? encryptCBC(paramData)
+ : " &" + encryptCBC(paramData);
+ const url =
+ commonUrl +
+ "screen/largeScreen/towerAssInspect/getTrend?params=" +
+ montageParam; // url
+ ajaxRequestGet(
+ url,
+ "GET",
+ true,
+ function () {},
+ function (result) {
+ let html = "";
+ if (result.code === 200) {
+ if (
+ result.data &&
+ result.data.length > 0 &&
+ result.data[0] !== null
+ ) {
+ let xLabel = [];
+ let dataValue = [];
+ $.each(result.data, function (index, item) {
+ xLabel.push(item.time);
+ dataValue.push(item.changeVal);
+ });
+ initEchartsOne(xLabel, dataValue);
+ } else {
+ initEchartsOne([], []);
+ }
+ } else if (result.code === 500) {
+ layer.msg(result.msg, { icon: 2 });
+ }
+ },
+ function (xhr, status, error) {
+ error(xhr, status, error);
+ setData(null);
+ },
+ aqEnnable
+ );
}
-function getHistoryList(deviceId){
- const url = commonUrl + "screen/largeScreen/towerAssInspect/getHistoryList"; // 建管单位url
- table.render({
- elem: '#demo2',
- height:'full-560',
- url: url,
- skin: 'line',
- page: true,
- headers:{
- decrypt:"decrypt",
- "Authorization":token
- },
- where: {
- deviceId:deviceId,
- },
- cols: [[
- {type: 'numbers', title: '序号'}, // 添加序号列
- //{field: 'areaName', align: 'center', title: '区域名称'},
- {field: 'deviceName', align: 'center', title: '设备名称'},
- {field: 'modeName', align: 'center', title: '施工工艺'},
- {field: 'changeVal', align: 'center', title: '变化值'},
- {field: 'val', align: 'center', title: '检测值'},
- {field: 'createTime', align: 'center', title: '检测时间'},
- {field: 'isWarn', align: 'center', title: '是否告警'},
+function getRealTimeAlarmList(deviceId) {
+ const url =
+ commonUrl + "screen/largeScreen/towerAssInspect/getRealTimeAlarmList"; // 建管单位url
+ table.render({
+ elem: "#demo1",
+ height: "full-530",
+ url: url,
+ skin: "line",
+ page: true,
+ headers: {
+ decrypt: "decrypt",
+ Authorization: token,
+ },
+ where: {
+ deviceId: deviceId,
+ },
+ cols: [
+ [
+ { type: "numbers", title: "序号" }, // 添加序号列
+ { field: "warnContent", title: "告警内容", align: "center" },
+ { field: "warnTime", title: "预警时间", align: "center" },
+ ],
+ ],
+ initComplete: function () {
+ // 在表格渲染完成后,重新渲染序号列
+ var that = this.elem.next();
+ var tool = that
+ .children(".layui-table-box")
+ .children(".layui-table-fixed")
+ .children(".layui-table-body")
+ .children(".layui-table");
+ tool.find("tr").each(function (index, item) {
+ $(this)
+ .find('td[data-field="LAY_TABLE_INDEX"]')
+ .text(index + 1);
+ });
+ },
+ done: function (res, curr, count, origin) {
+ console.log(res);
+ },
+ });
+}
- // {field: 'areaName', title: '区域名称',align:'center'},
- // {field: 'modeName', title: '检测点名称',align:'center'},
- // {field: 'val', title: '检测值',align:'center'},
- // {field: 'thisChangeVal', title: '本次变化值',align:'center'},
- // {field: 'changeVal', title: '累计变化值',align:'center'},
- // {field: 'updateTime', title: '检测时间',align:'center'},
- // {field: 'isWarn', title: '状态',align:'center'}
- ]],
- initComplete: function () {
- // 在表格渲染完成后,重新渲染序号列
- var that = this.elem.next();
- var tool = that.children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-body').children('.layui-table');
- tool.find("tr").each(function (index, item) {
- $(this).find('td[data-field="LAY_TABLE_INDEX"]').text(index + 1);
- });
- },
- done:function(res, curr, count, origin){
- console.log(res);
- }
- })
+function getHistoryList(deviceId) {
+ const url = commonUrl + "screen/largeScreen/towerAssInspect/getHistoryList"; // 建管单位url
+ table.render({
+ elem: "#demo2",
+ height: "full-560",
+ url: url,
+ skin: "line",
+ page: true,
+ headers: {
+ decrypt: "decrypt",
+ Authorization: token,
+ },
+ where: {
+ deviceId: deviceId,
+ },
+ cols: [
+ [
+ { type: "numbers", title: "序号" }, // 添加序号列
+ //{field: 'areaName', align: 'center', title: '区域名称'},
+ { field: "deviceName", align: "center", title: "设备名称" },
+ { field: "modeName", align: "center", title: "施工工艺" },
+ { field: "changeVal", align: "center", title: "变化值" },
+ { field: "val", align: "center", title: "检测值" },
+ { field: "createTime", align: "center", title: "检测时间" },
+ { field: "isWarn", align: "center", title: "是否告警" },
+
+ // {field: 'areaName', title: '区域名称',align:'center'},
+ // {field: 'modeName', title: '检测点名称',align:'center'},
+ // {field: 'val', title: '检测值',align:'center'},
+ // {field: 'thisChangeVal', title: '本次变化值',align:'center'},
+ // {field: 'changeVal', title: '累计变化值',align:'center'},
+ // {field: 'updateTime', title: '检测时间',align:'center'},
+ // {field: 'isWarn', title: '状态',align:'center'}
+ ],
+ ],
+ initComplete: function () {
+ // 在表格渲染完成后,重新渲染序号列
+ var that = this.elem.next();
+ var tool = that
+ .children(".layui-table-box")
+ .children(".layui-table-fixed")
+ .children(".layui-table-body")
+ .children(".layui-table");
+ tool.find("tr").each(function (index, item) {
+ $(this)
+ .find('td[data-field="LAY_TABLE_INDEX"]')
+ .text(index + 1);
+ });
+ },
+ done: function (res, curr, count, origin) {
+ console.log(res);
+ },
+ });
}
/* 变化趋势 */
-function initEchartsOne(xLabel,dataValue) {
- let fontSize = '14', fontFamily = 'Alibaba PuHuiTi R', fontColor = '#fff';
- // let xLabel = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
- // let dataValue = [20, 30, 40, 35, 34, 15, 56, 15, 12, 25, 34, 42];
+function initEchartsOne(xLabel, dataValue) {
+ let fontSize = "14",
+ fontFamily = "Alibaba PuHuiTi R",
+ fontColor = "#fff";
+ // let xLabel = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
+ // let dataValue = [20, 30, 40, 35, 34, 15, 56, 15, 12, 25, 34, 42];
const tooltip = {
show: true,
- trigger: 'axis',
+ trigger: "axis",
axisPointer: {
- type: 'shadow'
+ type: "shadow",
},
- backgroundColor: 'rgba(75, 79, 82, 0.80)', //设置背景颜色
+ backgroundColor: "rgba(75, 79, 82, 0.80)", //设置背景颜色
textStyle: {
color: fontColor,
- fontFamily: fontFamily
+ fontFamily: fontFamily,
},
borderColor: "rgba(255,255,255, .5)",
};
let option = {
- backgroundColor: 'transparent',
+ backgroundColor: "transparent",
tooltip,
legend: {
show: false,
},
grid: {
- top: '25%',
- left: '5%',
- right: '5%',
- bottom: '15%',
+ top: "25%",
+ left: "5%",
+ right: "5%",
+ bottom: "15%",
},
xAxis: [
{
- type: 'category',
+ type: "category",
boundaryGap: true,
axisLine: {
//坐标轴轴线相关设置。数学上的x轴
show: true,
lineStyle: {
- color: '#5A6E71',
+ color: "#5A6E71",
},
},
axisLabel: {
@@ -299,13 +447,13 @@ function initEchartsOne(xLabel,dataValue) {
textStyle: {
color: fontColor,
fontSize: fontSize,
- fontFamily: fontFamily
+ fontFamily: fontFamily,
},
},
splitLine: {
show: false,
lineStyle: {
- color: '#233653',
+ color: "#233653",
},
},
axisTick: {
@@ -321,21 +469,21 @@ function initEchartsOne(xLabel,dataValue) {
color: fontColor,
fontSize: fontSize,
padding: [0, 60, 0, 0],
- fontFamily: fontFamily
+ fontFamily: fontFamily,
},
// minInterval: 1,
- type: 'value',
+ type: "value",
splitLine: {
show: true,
lineStyle: {
- color: '#25393B',
- type: 'dashed'
+ color: "#25393B",
+ type: "dashed",
},
},
axisLine: {
show: false,
lineStyle: {
- color: '#008de7',
+ color: "#008de7",
},
},
axisLabel: {
@@ -343,8 +491,8 @@ function initEchartsOne(xLabel,dataValue) {
textStyle: {
color: fontColor,
fontSize: fontSize,
- fontFamily: fontFamily
- }
+ fontFamily: fontFamily,
+ },
},
axisTick: {
show: false,
@@ -353,59 +501,58 @@ function initEchartsOne(xLabel,dataValue) {
],
series: [
{
- name: '采集值',
- type: 'line',
- symbol: 'circle', // 默认是空心圆(中间是白色的),改成实心圆
+ name: "采集值",
+ type: "line",
+ symbol: "circle", // 默认是空心圆(中间是白色的),改成实心圆
smooth: true,
lineStyle: {
normal: {
width: 3,
// color: '#1ED6FF', // 线条颜色
- color: new echarts.graphic.LinearGradient(
- 0,
- 0,
- 0,
- 1,
- [
- {
- offset: 0,
- color: '#0DF0FD',
- },
- {
- offset: 0.6,
- color: '#00F1D4',
- },
- {
- offset: 1,
- color: '#0EEEFC',
- },
- ],
- false
- ),
+ color: new echarts.graphic.LinearGradient(
+ 0,
+ 0,
+ 0,
+ 1,
+ [
+ {
+ offset: 0,
+ color: "#0DF0FD",
+ },
+ {
+ offset: 0.6,
+ color: "#00F1D4",
+ },
+ {
+ offset: 1,
+ color: "#0EEEFC",
+ },
+ ],
+ false
+ ),
},
},
itemStyle: {
normal: {
- color: '#1ED6FF',//拐点颜色
+ color: "#1ED6FF", //拐点颜色
// borderColor: '#fff600',//拐点边框颜色
// borderWidth: 13//拐点边框大小
label: {
show: true, //开启显示
color: fontColor,
fontFamily: fontFamily,
- position: 'top', //在上方显示
+ position: "top", //在上方显示
formatter: function (res) {
if (res.value) {
- return res.value
+ return res.value;
} else {
- return 0
+ return 0;
}
},
},
},
-
},
- symbolSize: 8, //设定实心点的大小
+ symbolSize: 8, //设定实心点的大小
areaStyle: {
normal: {
//线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
@@ -417,15 +564,15 @@ function initEchartsOne(xLabel,dataValue) {
[
{
offset: 0,
- color: '#01DDE9',
+ color: "#01DDE9",
},
{
offset: 0.6,
- color: '#086A79',
+ color: "#086A79",
},
{
offset: 1,
- color: '#0D3134',
+ color: "#0D3134",
},
],
false
@@ -433,11 +580,11 @@ function initEchartsOne(xLabel,dataValue) {
},
},
data: dataValue,
- }
- ]
- }
+ },
+ ],
+ };
myChart.setOption(option, true);
window.addEventListener("resize", function () {
myChart.resize();
});
-}
\ No newline at end of file
+}
diff --git a/pages/towerAssInspect/dialog.html b/pages/towerAssInspect/dialog.html
new file mode 100644
index 0000000..0d2b39a
--- /dev/null
+++ b/pages/towerAssInspect/dialog.html
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 施工质量
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/towerAssInspect/towerAssInspect.html b/pages/towerAssInspect/towerAssInspect.html
index 6cece4b..c1eee6d 100644
--- a/pages/towerAssInspect/towerAssInspect.html
+++ b/pages/towerAssInspect/towerAssInspect.html
@@ -1,11 +1,12 @@
+
-
+
-
+
@@ -18,22 +19,24 @@
- 组塔检测
+
+ 组塔检测
+
-
+
-
+
-
+
告警
正常
@@ -80,22 +83,22 @@
-->
-
+
-
+
-
+
+
\ No newline at end of file