diff --git a/main - 副本 (2).html b/main - 副本 (2).html deleted file mode 100644 index df08678..0000000 --- a/main - 副本 (2).html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - 处理中心 - - - 选项1 - 选项2 - 选项3 - - - 选项1 - 选项2 - 选项3 - - - 消息中心 - 订单管理 - - - - - - - - - - - -
-
- 版权所有 © - 北京六合伟业科技股份有限公司 -
-
- -
- - - - - - - diff --git a/main - 副本.html b/main - 副本.html deleted file mode 100644 index 86f002d..0000000 --- a/main - 副本.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
-
- DEES ON CLOUD -
-
-
- - - - 显示设置 - 帮助 - 退出 - - - {{onlineuser}} -
-
-
- - - - -
- - - - - - -
- -
- -
- - - - - - - diff --git a/main.html b/main.html index 93e6b51..0732d14 100644 --- a/main.html +++ b/main.html @@ -57,6 +57,9 @@ + + + @@ -79,7 +82,7 @@ 显示设置 帮助 - 修改密码 + 修改密码 退出 diff --git a/scripts/srr.js b/scripts/srr.js index db9d0e9..7ccfd30 100644 --- a/scripts/srr.js +++ b/scripts/srr.js @@ -48,7 +48,7 @@ style="margin-left: 10px" v-model="scope.row.pumpExport" @change="(value) => handlePumpExportChange(value, scope.row)"> - 导出泵 + 泵信息 diff --git a/scripts/tool_detail-en.js b/scripts/tool_detail-en.js index 6c307c9..314ffca 100644 --- a/scripts/tool_detail-en.js +++ b/scripts/tool_detail-en.js @@ -11,14 +11,14 @@ // 设置序列号 document.addEventListener('DOMContentLoaded', function() { const seriesNum = getUrlParameter('series'); - if (seriesNum) { - document.getElementById('seriesNum').textContent = seriesNum; - } + const instrumentNum = getUrlParameter('instrument'); + }); // 页面加载完成后执行 document.addEventListener('DOMContentLoaded', async function() { + setInterval(checkUser,5000); const seriesNum = getUrlParameter('series'); const instrumentNum = getUrlParameter('instrument'); const wellName = getUrlParameter('well'); @@ -26,7 +26,6 @@ const content = getUrlParameter('content'); console.log('wellName:', wellName); if (seriesNum) { - document.getElementById('seriesNum').textContent = seriesNum; // 调用查询接口 const toolData = await fetchToolData(wellName ,seriesNum , instrumentNum ,flag ,content); if (toolData) { @@ -38,9 +37,6 @@ // 查询仪器详细信息 async function fetchToolData(wellName, seriesNum, instrumentNum ,flag ,content) { - console.log("wellName----------", wellName); - console.log("seriesNum----------", seriesNum); - console.log("instrumentNum----------", instrumentNum); try { // 添加 await 关键字 @@ -93,9 +89,14 @@ function renderInstrumentData(data) { return; } + const seriesNum = getUrlParameter('series'); + const instrument = getUrlParameter('instrument');; + if (seriesNum) { + document.getElementById('seriesNum').textContent = seriesNum + ' ' + instrument; + } + // 1. 更新仪器名称(Series + Instrument) - const instrumentName = `${data.series || ""} - ${data.instrument || ""}`; - document.getElementById("seriesNum").textContent = instrumentName; + // 2. 格式化出厂日期(去掉 "T00:00:00Z") const formattedTime = data.time ? data.time.split('T')[0] : ""; @@ -109,11 +110,11 @@ function renderInstrumentData(data) { // 4. 更新累计工作时间(workTime) document.querySelector(".basic-info-table tbody tr:nth-child(2) td:nth-child(2)").textContent = - `${data.workTime || "0"} 小时`; + `${data.workTime || "0"} h`; // 5. 更新当次工作时间(workTimes) document.querySelector(".basic-info-table tbody tr:nth-child(2) td:nth-child(4)").textContent = - `${data.workTimes || "0"} 小时`; + `${data.workTimes || "0"} h`; // 6. 更新固件版本号 document.querySelector(".basic-info-table tbody tr:nth-child(3) td:nth-child(2)").textContent = @@ -203,7 +204,7 @@ function populateBasicInfo(data){ fileListContainer.style.marginTop = '10px'; const fileListTitle = document.createElement('div'); - fileListTitle.textContent = 'Uploaded file:'; + fileListTitle.textContent = 'File:'; fileListTitle.style.fontSize = '12px'; fileListTitle.style.color = '#666'; fileListTitle.style.marginBottom = '5px'; @@ -294,7 +295,7 @@ function populateBasicInfo(data){ linkDisplay.style.padding = '6px 12px'; linkDisplay.style.minHeight = '20px'; linkDisplay.style.marginRight = '10px'; - linkDisplay.textContent = item.link || 'No data'; + linkDisplay.textContent = item.link || ''; // 编辑按钮 const editLinkButton = document.createElement('button'); @@ -322,13 +323,14 @@ function populateBasicInfo(data){ linkInput.style.minWidth = '150px'; linkInput.style.display = 'none'; linkInput.value = item.link || ''; - linkInput.placeholder = 'Please enter the link information'; + linkInput.placeholder = 'please enter the link'; // 确认按钮(初始隐藏) const confirmLinkButton = document.createElement('button'); confirmLinkButton.className = 'confirm-link-btn'; confirmLinkButton.textContent = 'Confirm'; confirmLinkButton.style.padding = '6px 12px'; + confirmLinkButton.style.marginTop = '3px'; confirmLinkButton.style.backgroundColor = '#67c23a'; confirmLinkButton.style.border = '1px solid #67c23a'; confirmLinkButton.style.borderRadius = '4px'; @@ -369,7 +371,7 @@ function populateBasicInfo(data){ if (response.status === 200) { // 更新显示 - linkDisplay.textContent = linkInput.value || 'No data'; + linkDisplay.textContent = linkInput.value || ''; // 切换回显示模式 linkDisplay.style.display = 'block'; @@ -550,7 +552,9 @@ function handleMaintenanceFileUpload(event, item) { if (typeof upload_file_success === 'function') { upload_file_success(data, file, [data]); } - + setTimeout(() => { + location.reload(); + }, 500); // 局部刷新文件列表 refreshFileList(item.id, file,data.realFileName); }) @@ -593,7 +597,7 @@ function refreshMaintenanceFileList(itemId,id, uploadedFile , realFileName) { fileListContainer.style.marginTop = '10px'; const fileListTitle = document.createElement('div'); - fileListTitle.textContent = 'Uploaded file:'; + fileListTitle.textContent = 'File:'; fileListTitle.style.fontSize = '12px'; fileListTitle.style.color = '#666'; fileListTitle.style.marginBottom = '5px'; @@ -710,6 +714,9 @@ function handleFileUpload(event, item) { .then(response => response.json()) .then(data => { console.log('文件上传成功:', data); + setTimeout(() => { + location.reload(); + }, 500); refreshFileList(item.id, file, data.data.realFileName.replace('./upload/', '')); }) .catch(error => { @@ -746,7 +753,7 @@ function refreshFileList(itemId, uploadedFile , realFileName) { fileListContainer.style.marginTop = '10px'; const fileListTitle = document.createElement('div'); - fileListTitle.textContent = 'Uploaded file:'; + fileListTitle.textContent = 'File:'; fileListTitle.style.fontSize = '12px'; fileListTitle.style.color = '#666'; fileListTitle.style.marginBottom = '5px'; @@ -903,7 +910,7 @@ function populateMaintenanceInfo(data) { const emptyRow = document.createElement('tr'); const emptyCell = document.createElement('td'); emptyCell.colSpan = 6; // 更新为6列 - emptyCell.textContent = 'No data'; + emptyCell.textContent = ''; emptyCell.style.textAlign = 'center'; emptyRow.appendChild(emptyCell); tbody.appendChild(emptyRow); @@ -969,7 +976,7 @@ function populateMaintenanceInfo(data) { fileListContainer.style.marginTop = '10px'; const fileListTitle = document.createElement('div'); - fileListTitle.textContent = 'Uploaded file:'; + fileListTitle.textContent = 'File:'; fileListTitle.style.fontSize = '12px'; fileListTitle.style.color = '#666'; fileListTitle.style.marginBottom = '5px'; @@ -1058,12 +1065,12 @@ function populateMaintenanceInfo(data) { linkDisplay.style.padding = '6px 12px'; linkDisplay.style.minHeight = '20px'; linkDisplay.style.marginRight = '10px'; - linkDisplay.textContent = item.link || 'No data'; + linkDisplay.textContent = item.link || ''; // 编辑按钮 const editLinkButton = document.createElement('button'); editLinkButton.className = 'edit-link-btn'; - editLinkButton.textContent = 'redact'; + editLinkButton.textContent = 'Redact'; editLinkButton.style.padding = '6px 12px'; editLinkButton.style.backgroundColor = '#409eff'; editLinkButton.style.border = '1px solid #409eff'; @@ -1086,7 +1093,7 @@ function populateMaintenanceInfo(data) { linkInput.style.minWidth = '150px'; linkInput.style.display = 'none'; linkInput.value = item.link || ''; - linkInput.placeholder = 'Please enter the link information'; + linkInput.placeholder = 'please enter the link'; // 确认按钮(初始隐藏) const confirmLinkButton = document.createElement('button'); @@ -1133,7 +1140,7 @@ function populateMaintenanceInfo(data) { if (response.status === 200) { // 更新显示 - linkDisplay.textContent = linkInput.value || 'No data'; + linkDisplay.textContent = linkInput.value || ''; // 切换回显示模式 linkDisplay.style.display = 'block'; @@ -1277,7 +1284,9 @@ function handleMaintenanceFileUpload(event, item) { if (typeof upload_file_success === 'function') { upload_file_success(data, file, [data]); } - + setTimeout(() => { + location.reload(); + }, 500); // 局部刷新文件列表 refreshMaintenanceFileList(item.id,data.data.id, file,data.data.realFileName); }) @@ -1333,18 +1342,18 @@ function upload_file_error(error, file, fileList) { modal.innerHTML = `
-

Maintenance information

+

Maintenance Information

- +
- +
@@ -1352,18 +1361,18 @@ function upload_file_error(error, file, fileList) {
- +
- +
- +
@@ -1371,8 +1380,8 @@ function upload_file_error(error, file, fileList) {
- - + +
`; @@ -1433,7 +1442,7 @@ function upload_file_error(error, file, fileList) { // 检查返回结果 if (response.data.r === -1) { - alert('You are offline. Please login in again'); + alert('You are offline. Please login in again.'); } else { closeModal(); @@ -1452,16 +1461,17 @@ function upload_file_error(error, file, fileList) { // 添加渲染部门信息的函数 -function renderDeptInfo(data) { - if (!data || !data.dept) { - console.warn("无部门信息"); - return; + function renderDeptInfo(data) { + if (!data?.dept?.trim()) { + console.warn("无部门信息"); + deptContainer.textContent = "No data"; + return; + } + const deptContainer = document.getElementById("deptContainer"); + if (deptContainer) { + deptContainer.textContent = data.dept; + } } - const deptContainer = document.getElementById("deptContainer"); - if (deptContainer) { - deptContainer.textContent = data.dept; - } -} // 页面加载完成后自动获取并渲染质检数据 @@ -1475,15 +1485,15 @@ document.addEventListener('DOMContentLoaded', async function() { // 初始化编辑按钮事件 document.getElementById('editProcessRecord').addEventListener('click', function() { - toggleEditInput(this, '生产过程记录', 'process_record', inputStates); + toggleEditInput(this, 'Edit Process Record', 'process_record', inputStates); }); document.getElementById('editProcessInspection').addEventListener('click', function() { - toggleEditInput(this, '生产过程检验', 'process_inspection', inputStates); + toggleEditInput(this, 'Edit Process Inspection', 'process_inspection', inputStates); }); document.getElementById('editFinalInspection').addEventListener('click', function() { - toggleEditInput(this, '成品检验记录', 'final_inspection', inputStates); + toggleEditInput(this, 'Edit Final Inspection', 'final_inspection', inputStates); }); // 页面加载后立即获取并渲染质检数据 @@ -1553,19 +1563,19 @@ async function confirmAndSave(buttonElement, fieldKey, inputElement, inputStates state.input.remove(); // 恢复按钮为编辑状态 - buttonElement.textContent = '编辑'; + buttonElement.textContent = 'Redact'; buttonElement.classList.remove('confirm-btn'); // 更新状态 state.visible = false; } catch (error) { - console.error('保存失败:', error); + console.error('error:', error); } } // 渲染质检数据到对应的输入框 function renderQualityData(responseData) { - console.log('正在渲染数据到以下元素:', { + console.log('loading data:', { processRecordDisplay: document.getElementById('processRecordDisplay'), processInspectionDisplay: document.getElementById('processInspectionDisplay'), finalInspectionDisplay: document.getElementById('finalInspectionDisplay') @@ -1625,7 +1635,7 @@ function showEditInput(buttonElement, fieldName, fieldKey, inputStates) { input.type = 'text'; input.className = 'edit-input'; input.value = currentValue; - input.placeholder = `Please enter ${fieldName}`; + // input.placeholder = `please enter ${fieldName}`; // 保存输入框引用 state.input = input; @@ -1678,13 +1688,13 @@ async function saveQualityData(fieldKey, value) { }); if (response.status === 200) { - console.log('质检记录保存成功:', response.data); + console.log('success:', response.data); return response.data; } else { throw new Error(`HTTP error! status: ${response.status}`); } } catch (error) { - console.error('质检记录保存失败:', error); + console.error('error:', error); throw error; } } @@ -1889,8 +1899,8 @@ function showConfirmDialog(message, onConfirm) { // 设置序列号 document.addEventListener('DOMContentLoaded', function() { const seriesNum = getUrlParameter('series'); + const instrument = getUrlParameter('instrument'); if (seriesNum) { - document.getElementById('seriesNum').textContent = seriesNum; } // 获取URL中的well参数并更新h1标题 diff --git a/scripts/tool_detail.js b/scripts/tool_detail.js index 77bc0a9..b3d8484 100644 --- a/scripts/tool_detail.js +++ b/scripts/tool_detail.js @@ -10,15 +10,18 @@ // 设置序列号 document.addEventListener('DOMContentLoaded', function() { - const seriesNum = getUrlParameter('series'); + const seriesNum = getUrlParameter('series'); + const instrument = getUrlParameter('instrument'); if (seriesNum) { - document.getElementById('seriesNum').textContent = seriesNum; + document.getElementById('seriesNum').textContent = seriesNum + ' ' + instrument; } }); // 页面加载完成后执行 document.addEventListener('DOMContentLoaded', async function() { + + setInterval(checkUser,5000); const seriesNum = getUrlParameter('series'); const instrumentNum = getUrlParameter('instrument'); const wellName = getUrlParameter('well'); @@ -26,7 +29,7 @@ const content = getUrlParameter('content'); console.log('wellName:', wellName); if (seriesNum) { - document.getElementById('seriesNum').textContent = seriesNum; + document.getElementById('seriesNum').textContent = seriesNum + ' ' + instrumentNum; // 调用查询接口 const toolData = await fetchToolData(wellName ,seriesNum , instrumentNum ,flag ,content); if (toolData) { @@ -95,7 +98,7 @@ function renderInstrumentData(data) { } // 1. 更新仪器名称(Series + Instrument) - const instrumentName = `${data.series || ""} - ${data.instrument || ""}`; + const instrumentName = `${data.series || ""} ${data.instrument || ""}`; document.getElementById("seriesNum").textContent = instrumentName; // 2. 格式化出厂日期(去掉 "T00:00:00Z") @@ -119,6 +122,11 @@ function renderInstrumentData(data) { // 6. 更新固件版本号 document.querySelector(".basic-info-table tbody tr:nth-child(3) td:nth-child(2)").textContent = data.version || ""; + const seriesNum = getUrlParameter('series') ; + const instrument =getUrlParameter('instrument'); + if (seriesNum) { + document.getElementById('seriesNum').textContent = seriesNum+" "+instrument; + } } //仪器施工汇总 function populateBasicInfo(data){ @@ -553,7 +561,9 @@ function handleMaintenanceFileUpload(event, item) { if (typeof upload_file_success === 'function') { upload_file_success(data, file, [data]); } - + setTimeout(() => { + location.reload(); + }, 500); // 局部刷新文件列表 refreshFileList(item.id, file,data.realFileName); }) @@ -714,6 +724,9 @@ function handleFileUpload(event, item) { .then(response => response.json()) .then(data => { console.log('文件上传成功:', data); + setTimeout(() => { + location.reload(); + }, 500); refreshFileList(item.id, file, data.data.realFileName.replace('./upload/', '')); }) .catch(error => { @@ -1288,7 +1301,9 @@ function handleMaintenanceFileUpload(event, item) { upload_file_success(data, file, [data]); } console.log('上传成功file:', file); - + setTimeout(() => { + location.reload(); + }, 500); // 局部刷新文件列表 refreshMaintenanceFileList(item.id,data.data.id, file,data.data.realFileName); }) @@ -1443,12 +1458,10 @@ function upload_file_error(error, file, fileList) { .then(function (response) { console.log('/deescloud/postLcm:', response.data); // 检查返回结果 - if (response.data.r === -1) { - alert('您处于离线状态,请重新登录'); - } else { - closeModal(); - location.reload(); - } + closeModal(); + // 重新加载维保数据 + location.reload(); + }) .catch(function (error) { console.error('提交失败:', error); @@ -1462,16 +1475,17 @@ function upload_file_error(error, file, fileList) { // 添加渲染部门信息的函数 -function renderDeptInfo(data) { - if (!data || !data.dept) { - console.warn("无部门信息"); - return; + function renderDeptInfo(data) { + if (!data?.dept?.trim()) { + console.warn("无部门信息"); + deptContainer.textContent = "暂无部门信息"; + return; + } + const deptContainer = document.getElementById("deptContainer"); + if (deptContainer) { + deptContainer.textContent = data.dept; + } } - const deptContainer = document.getElementById("deptContainer"); - if (deptContainer) { - deptContainer.textContent = data.dept; - } -} // 页面加载完成后自动获取并渲染质检数据 @@ -1900,8 +1914,9 @@ function showConfirmDialog(message, onConfirm) { // 设置序列号 document.addEventListener('DOMContentLoaded', function() { const seriesNum = getUrlParameter('series'); + const instrument = getUrlParameter('instrument'); if (seriesNum) { - document.getElementById('seriesNum').textContent = seriesNum; + document.getElementById('seriesNum').textContent = seriesNum + ' ' + instrument; } // 获取URL中的well参数并更新h1标题 diff --git a/scripts/tools-en.js b/scripts/tools-en.js index 64085d6..b8f8bf3 100644 --- a/scripts/tools-en.js +++ b/scripts/tools-en.js @@ -95,17 +95,15 @@ > - + @@ -131,37 +129,7 @@
- - - - - - - // - //
- //
- //
Risk warning:
- //
- //
- //
- // {{item.time}} - //  {{item.err_level}}: - //  {{item.context}} - //
- //
- //
- //
- //
- //
No instrument information has been uploaded to this well.
- //
- // - //
- //
+ `, data(){ diff --git a/scripts/tools.js b/scripts/tools.js index 11a99b9..0c52645 100644 --- a/scripts/tools.js +++ b/scripts/tools.js @@ -31,8 +31,8 @@ var toolscomponent = { 报告明细 - 导出 - 导出(测试中) + + 导出 @@ -77,17 +77,13 @@ var toolscomponent = { > - - diff --git a/sts.html b/sts.html index b83478a..ba60e55 100644 --- a/sts.html +++ b/sts.html @@ -84,11 +84,11 @@
.cell { @@ -233,7 +233,7 @@ font-weight: bold;*/ text-align: center; - color: #cbee46; + color: rgb(255, 255, 255); } .homeWrap { diff --git a/tool_detail-en.html b/tool_detail-en.html index 5476155..3dd7e78 100644 --- a/tool_detail-en.html +++ b/tool_detail-en.html @@ -375,6 +375,33 @@ .fixed-width-180 { width: 180px; } + + .link-container { + display: flex; + align-items: center; + flex-wrap: wrap; + } + + .link-display, .link-input { + flex: 1; + min-width: 0; /* 允许输入框收缩 */ + white-space: normal; /* 允许换行 */ + word-wrap: break-word; /* 长单词换行 */ + } + + .edit-link-btn, .confirm-link-btn { + flex-shrink: 0; /* 防止按钮被压缩 */ + margin-left: 5px; + } + + /* 当输入框显示时,使用不同的布局 */ + .link-input { + margin-right: 5px; + } + + .confirm-link-btn { + margin-left: 0; + } @media (max-width: 768px) { .container { padding: 20px; @@ -405,6 +432,7 @@ } + @@ -423,24 +451,24 @@ Instrument Name:
-

Basic information

+

Basic Information

- + - + - + - + - + @@ -479,19 +507,19 @@
-

Summary of Instrument Construction

+

Summary Of Instrument Construction

Date of manufacture:Date Of Manufacture: Date of warehousing:Date Of Warehousing:
Working hours:Total Working Time: This working hours:Current Working Time:
Firmware version:Firmware Version:
- - - - - + + + + + - + - + @@ -503,7 +531,7 @@
-

Maintenance and repair situation

+

Maintenance And Repair Situation

@@ -521,29 +549,29 @@
- - + + - + - +
Well nameWell work situationwell sectionMax tempMax pressureWell NameWell Work SituationWell SectionMax TempMax Pressure StatusPersionPerson FileUrlLink
Time LevelMaintenance infoMaintenance personMaintenance InfoMaintenance Person FileUrlLink
No dataNo Data
-

Internal components

+

Internal Components

No Data
-

The department to which the instrument belongs

+

The Department To Which The Instrument Belongs

No Data
@@ -571,9 +599,10 @@ // 设置序列号 document.addEventListener('DOMContentLoaded', function() { const seriesNum = getUrlParameter('series'); - if (seriesNum) { - document.getElementById('seriesNum').textContent = seriesNum; - } + const instrument = getUrlParameter('instrument'); + if (seriesNum) { + document.getElementById('seriesNum').textContent = seriesNum + '1'+ instrument; + } }); diff --git a/tool_detail.html b/tool_detail.html index 98d3ade..91574f4 100644 --- a/tool_detail.html +++ b/tool_detail.html @@ -4,318 +4,203 @@ 仪器信息汇总 + + + + + + + + - - - - - - -
-
-

-
+
+ + -
-
- 仪器名称: -
-
-

基本信息

-
- - - - - - - - - - - - - - - - - - - -
出厂日期:入库日期:
累计工作时间:当次累计工作时间:
固件版本号:
-
-
-
-

产品质检记录

-
- -
-
-
生产过程记录:
-
- + +
+ 仪器名称:
-
- - -
-
-
生产过程检验:
-
- -
-
- - -
-
-
成品检验记录:
-
- -
-
-
-
-
-

仪器施工汇总

- - - - - - - - - - - - - - - - - -
井名入井工作情况施工井段最高工作温度最高承压仪器工作情况上井人文件链接
-
- -
-
-
-

维保情况

-
- + + + + + +
+
基本信息
+
+
+ + + + + + + + + + + + + + + + + + + +
出厂日期:入库日期:
累计工作时间:当次累计工作时间:
固件版本号:
+
- - - - - - - - - - - - - - - - -
时间等级维保信息维保人文件链接
暂无数据
-
- -
-

内部组件

- -
暂无数据
- -
- -
-

仪器所属部门

- -
-
暂无部门信息
+ +
+
产品质检记录
+
+
+ +
+
+
生产过程记录:
+
+ +
+
+ + +
+
+
生产过程检验:
+
+ +
+
+ + +
+
+
成品检验记录:
+
+ +
+
+
+
-
-
+ + +
+
内部组件
+
+
暂无数据
+
+
+ + +
+
仪器所属部门
+
+
+
暂无部门信息
+
+
+
+ + + + + +
+
+ 仪器施工汇总 +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +
+
+ 维保情况 + 新增维保记录 +
+
+ + + + + + + + + + + + + + + +
+ + +
+
+
+
+ -
-

版权所有 © 北京六合伟业科技股份有限公司

-
+ +
+ 版权所有 © 北京六合伟业科技股份有限公司 +
- - - + + + + \ No newline at end of file