feat(renderer): 更新图标字体并添加生产统计功能,升级1.0.10版本
- 更新图标字体文件版本 - 添加展开/收起图标 - 在校准页面添加生产总数/合格数/不合格次数统计 - 优化校准设备列表渲染逻辑 - 调整输入框样式
This commit is contained in:
parent
7c8b2477d5
commit
a929a7b47d
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "gy-calibration",
|
"name": "gy-calibration",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"description": "谷云开发部开发的断路器标定软件",
|
"description": "谷云开发部开发的断路器标定软件",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "example.com",
|
"author": "example.com",
|
||||||
|
|
Binary file not shown.
|
@ -1,8 +1,8 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 4622943 */
|
font-family: "iconfont"; /* Project id 4622943 */
|
||||||
src: url('iconfont.woff2?t=1752478848997') format('woff2'),
|
src: url('iconfont.woff2?t=1753694081375') format('woff2'),
|
||||||
url('iconfont.woff?t=1752478848997') format('woff'),
|
url('iconfont.woff?t=1753694081375') format('woff'),
|
||||||
url('iconfont.ttf?t=1752478848997') format('truetype');
|
url('iconfont.ttf?t=1753694081375') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
|
@ -13,6 +13,14 @@
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-zhakai:before {
|
||||||
|
content: "\e797";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-zhahe:before {
|
||||||
|
content: "\e798";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-kuaijiejian:before {
|
.icon-kuaijiejian:before {
|
||||||
content: "\e603";
|
content: "\e603";
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -8,7 +8,10 @@
|
||||||
<el-button icon="CaretRight" type="primary" :disabled="playState" @click="startExecution">开始执行</el-button>
|
<el-button icon="CaretRight" type="primary" :disabled="playState" @click="startExecution">开始执行</el-button>
|
||||||
<el-button icon="RemoveFilled" type="danger" @click="stopExecution">停止</el-button>
|
<el-button icon="RemoveFilled" type="danger" @click="stopExecution">停止</el-button>
|
||||||
<span style="margin-left: 10px">操作员编号:</span>
|
<span style="margin-left: 10px">操作员编号:</span>
|
||||||
<el-input v-model="operatorCode" placeholder="请输入操作员编号" style="width: 150px; margin-left: 10px" />
|
<el-input v-model="operatorCode" placeholder="输入操作员编号" style="width: 120px; margin-left: 10px" />
|
||||||
|
<div class="statistics-box">
|
||||||
|
生产总数/合格数/不合格次数: <span class="statistics-number">{{ equipmentStatistics.totalDevice }}/{{ equipmentStatistics.successDevice }}/{{ equipmentStatistics.failCount }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<el-button icon="RefreshRight" type="primary" :disabled="playState" @click="generateDeviceList">刷新列表</el-button>
|
<el-button icon="RefreshRight" type="primary" :disabled="playState" @click="generateDeviceList">刷新列表</el-button>
|
||||||
|
@ -65,15 +68,14 @@
|
||||||
v-if="device.connectStatus === 1"
|
v-if="device.connectStatus === 1"
|
||||||
:class="[
|
:class="[
|
||||||
'iconfont',
|
'iconfont',
|
||||||
'icon-icon_duanluqi2',
|
|
||||||
'circuit-breaker',
|
'circuit-breaker',
|
||||||
device.switch === 0 ? 'upsideDown' : '',
|
device.switch === 0 ? 'icon-zhahe' : 'icon-zhakai',
|
||||||
device.result === 1 ? 'color-green' : device.result === -1 ? 'color-red' : device.result === 2 ? 'color-orange' : ''
|
device.result === 1 ? 'color-green' : device.result === -1 ? 'color-red' : device.result === 2 ? 'color-orange' : ''
|
||||||
]"
|
]"
|
||||||
></div>
|
></div>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
:class="['iconfont', 'icon-icon_duanluqi2', 'circuit-breaker', device.switch === 0 ? 'upsideDown' : '', device.result === 1 ? 'color-green' : device.result === -1 ? 'color-red' : '']"
|
:class="['iconfont', 'icon-zhakai', 'circuit-breaker', device.switch === 0 ? 'icon-zhahe' : 'icon-zhakai', device.result === 1 ? 'color-green' : device.result === -1 ? 'color-red' : '']"
|
||||||
></div>
|
></div>
|
||||||
<p>
|
<p>
|
||||||
芯片ID:
|
芯片ID:
|
||||||
|
@ -552,6 +554,12 @@ const schemeDetailVisible = ref(false);
|
||||||
const schemeList = ref([]);
|
const schemeList = ref([]);
|
||||||
const activeScheme = ref();
|
const activeScheme = ref();
|
||||||
|
|
||||||
|
const equipmentStatistics = ref({
|
||||||
|
totalDevice: 0,
|
||||||
|
successDevice: 0,
|
||||||
|
failCount: 0
|
||||||
|
});
|
||||||
|
|
||||||
const accuracyType = ref({
|
const accuracyType = ref({
|
||||||
voltage: '电压',
|
voltage: '电压',
|
||||||
current: '电流',
|
current: '电流',
|
||||||
|
@ -837,6 +845,7 @@ const getSocketMeassage = message => {
|
||||||
if (msg.msgType === 'calibrate_finish') {
|
if (msg.msgType === 'calibrate_finish') {
|
||||||
playState.value = false;
|
playState.value = false;
|
||||||
ElMessage.success('标定完成');
|
ElMessage.success('标定完成');
|
||||||
|
getQquipmentStatistics();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 批量更新日志数组
|
// 批量更新日志数组
|
||||||
|
@ -886,24 +895,6 @@ const socketStatus = computed(() => {
|
||||||
return webSocketStore.socket_open;
|
return webSocketStore.socket_open;
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
logBoxRef.value = document.querySelector('#log-box-main');
|
|
||||||
initSocket();
|
|
||||||
if (window.electron && typeof window.electron.getAppVersion === 'function') {
|
|
||||||
window.electron.getAppVersion().then(v => {
|
|
||||||
version.value = v;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// generateMockDevices();
|
|
||||||
getSchemeDefaultConf();
|
|
||||||
getSchemeDefaultProp();
|
|
||||||
generateDeviceList();
|
|
||||||
loadSchemes();
|
|
||||||
|
|
||||||
// 添加键盘快捷键监听
|
|
||||||
document.addEventListener('keydown', handleKeydown);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 键盘快捷键处理
|
// 键盘快捷键处理
|
||||||
const handleKeydown = event => {
|
const handleKeydown = event => {
|
||||||
|
@ -935,13 +926,6 @@ const handleKeydown = event => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
if (webSocketStore) {
|
|
||||||
webSocketStore.close();
|
|
||||||
}
|
|
||||||
// 移除键盘快捷键监听
|
|
||||||
document.removeEventListener('keydown', handleKeydown);
|
|
||||||
});
|
|
||||||
|
|
||||||
const toggleIsScroll = () => {
|
const toggleIsScroll = () => {
|
||||||
isScroll.value = !isScroll.value;
|
isScroll.value = !isScroll.value;
|
||||||
|
@ -949,11 +933,11 @@ const toggleIsScroll = () => {
|
||||||
|
|
||||||
const startExecution = () => {
|
const startExecution = () => {
|
||||||
if (selectedScheme.value === '') {
|
if (selectedScheme.value === '') {
|
||||||
ElMessage.error('请先选择方案');
|
ElMessage.error({message:'请先选择方案'});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (operatorCode.value.trim() === '') {
|
if (operatorCode.value.trim() === '') {
|
||||||
ElMessage.error('请先输入操作员编号');
|
ElMessage.error({message:'请先输入操作员编号',duration:1000,showClose: true});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 开始标定之前重新连接socket
|
// 开始标定之前重新连接socket
|
||||||
|
@ -963,6 +947,7 @@ const startExecution = () => {
|
||||||
ElMessage.success('开始执行方案: ' + scheme[0].schemeName);
|
ElMessage.success('开始执行方案: ' + scheme[0].schemeName);
|
||||||
playState.value = true;
|
playState.value = true;
|
||||||
playCalibration();
|
playCalibration();
|
||||||
|
getQquipmentStatistics();
|
||||||
// Add actual start logic here
|
// Add actual start logic here
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1067,7 +1052,7 @@ const loadSchemes = async () => {
|
||||||
selectedScheme.value = '';
|
selectedScheme.value = '';
|
||||||
activeScheme.value = {};
|
activeScheme.value = {};
|
||||||
}
|
}
|
||||||
ElMessage.success('获取方案列表成功');
|
ElMessage.success({message: '获取方案列表成功', duration: 1000});
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(response.data.message || '获取方案列表失败');
|
ElMessage.error(response.data.message || '获取方案列表失败');
|
||||||
}
|
}
|
||||||
|
@ -1545,6 +1530,19 @@ const handleExportProd = async () => {
|
||||||
showExportProdDialog.value = false;
|
showExportProdDialog.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getQquipmentStatistics = () => {
|
||||||
|
axios.get(config.url + '/master/calibrate/stat').then(response => {
|
||||||
|
if(response.data.code === 0 && response.data.data.state){
|
||||||
|
equipmentStatistics.value = response.data.data.state;
|
||||||
|
}else{
|
||||||
|
ElMessage.error(response.data.message);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
ElMessage.error(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
// 监听日志变化滚到到底部
|
// 监听日志变化滚到到底部
|
||||||
watch(
|
watch(
|
||||||
logs,
|
logs,
|
||||||
|
@ -1559,6 +1557,35 @@ watch(
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
logBoxRef.value = document.querySelector('#log-box-main');
|
||||||
|
initSocket();
|
||||||
|
if (window.electron && typeof window.electron.getAppVersion === 'function') {
|
||||||
|
window.electron.getAppVersion().then(v => {
|
||||||
|
version.value = v;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// generateMockDevices();
|
||||||
|
getSchemeDefaultConf();
|
||||||
|
getSchemeDefaultProp();
|
||||||
|
generateDeviceList();
|
||||||
|
loadSchemes();
|
||||||
|
getQquipmentStatistics();
|
||||||
|
|
||||||
|
// 添加键盘快捷键监听
|
||||||
|
document.addEventListener('keydown', handleKeydown);
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (webSocketStore) {
|
||||||
|
webSocketStore.close();
|
||||||
|
}
|
||||||
|
// 移除键盘快捷键监听
|
||||||
|
document.removeEventListener('keydown', handleKeydown);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
@ -1576,7 +1603,7 @@ watch(
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 20px;
|
padding: 0 10px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
background-color: #404040; /* Dark grey similar to image */
|
background-color: #404040; /* Dark grey similar to image */
|
||||||
color: white;
|
color: white;
|
||||||
|
@ -1620,6 +1647,14 @@ watch(
|
||||||
.header-center .el-button {
|
.header-center .el-button {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
.statistics-box{
|
||||||
|
margin-left: 10px;
|
||||||
|
font-size: 13px;
|
||||||
|
.statistics-number{
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.calibration-main {
|
.calibration-main {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
Loading…
Reference in New Issue