Compare commits

..

No commits in common. "fdf4bc7025ec6d7a712f377c06ef515086198c35" and "73344175a80ef99bf811f34bec663a80a59944ef" have entirely different histories.

21 changed files with 112 additions and 608 deletions

View File

@ -7,7 +7,7 @@
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="/favicon.ico">
<title>智能缝纫管理系统</title>
<title>若依管理系统</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style>
html,

View File

@ -32,9 +32,9 @@ export function getBaseInfoNew() {
})
}
//首页 产量堆叠图
export function halfHourOutputPassInfo() {
export function qualitynewDeviceOutputQuality() {
return request({
url: '/casm/quality/halfHourOutputPassInfo',
url: '/casm/quality/newDeviceOutputQuality',
method: 'get'
})
}
@ -46,12 +46,5 @@ export function getNewestFiveInfo() {
method: 'get'
})
}
//首页 张力值
export function getTensionInfo() {
return request({
url: '/casm/quality/getTensionInfo',
method: 'get'
})
}

View File

@ -21,14 +21,14 @@
</el-upload>
<!-- 上传提示 -->
<div class="el-upload__tip" v-if="showTip">
{{tLang('tip','请上传')}}
请上传
<template v-if="fileSize">
{{tLang('tip','大小不超过')}} <b style="color: #f56c6c">{{ fileSize }}MB </b>
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
</template>
<template v-if="fileType">
{{tLang('tip','格式为')}} <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
</template>
{{tLang('tip','的文件')}}
的文件
</div>
<el-dialog

View File

@ -24,9 +24,9 @@ const route = useRoute();
const router = useRouter();
const { proxy } = getCurrentInstance();
const sizeOptions = ref([
{ label: proxy.tLang('common','较大'), value: "large" },
{ label: proxy.tLang('common','默认'), value: "default" },
{ label: proxy.tLang('common','较小'), value: "small" },
{ label: "较大", value: "large" },
{ label: "默认", value: "default" },
{ label: "稍小", value: "small" },
]);
function handleSetSize(size) {

View File

@ -1,255 +0,0 @@
<!--
* @Author: wei
* @description: 大屏自适应容器组件
* @LastEditTime: 2023-04-20 11:20:03
-->
<template>
<!-- <section class="screen-box" :style="boxStyle"> -->
<div class="screen-wrapper" ref="screenWrapper" :style="wrapperStyle">
<slot></slot>
</div>
<!-- </section> -->
</template>
<script>
/**
* 防抖函数
* @param {T} fn
* @param {number} delay
* @return
*/
function debounce(fn, delay) {
let timer = null;
return function (...args) {
timer = setTimeout(
() => {
typeof fn === "function" && fn.apply(null, args);
clearTimeout(timer);
},
delay > 0 ? delay : 100
);
};
}
export default {
name: "VScaleScreen",
props: {
width: {
type: [String, Number],
default: 1920,
},
height: {
type: [String, Number],
default: 1080,
},
fullScreen: {
type: Boolean,
default: false,
},
autoScale: {
type: [Object, Boolean],
default: true,
},
selfAdaption: {
type: Boolean,
default: true,
},
delay: {
type: Number,
default: 500,
},
boxStyle: {
type: Object,
default: () => ({}),
},
wrapperStyle: {
type: Object,
default: () => ({}),
},
},
data() {
return {
currentWidth: 0,
currentHeight: 0,
originalWidth: 0,
originalHeight: 0,
onResize: null,
observer: null,
};
},
watch: {
selfAdaption(val) {
if (val) {
this.resize();
this.addListener();
} else {
this.clearListener();
this.clearStyle();
}
},
},
computed: {
screenWrapper() {
return this.$refs["screenWrapper"];
},
},
methods: {
initSize() {
return new Promise((resolve, reject) => {
// console.log("");
// overflow:hidden
if (this.screenWrapper.parentNode) {
this.screenWrapper.parentNode.style.overflow = "hidden";
this.screenWrapper.parentNode.scrollLeft = 0;
this.screenWrapper.parentNode.scrollTop = 0;
}
this.$nextTick(() => {
// region
if (this.width && this.height) {
this.currentWidth = this.width;
this.currentHeight = this.height;
} else {
this.currentWidth = this.screenWrapper.clientWidth;
this.currentHeight = this.screenWrapper.clientHeight;
}
// endregion
// region
if (!this.originalHeight || !this.originalWidth) {
this.originalWidth = window.screen.width;
this.originalHeight = window.screen.height;
}
// endregion
resolve();
});
});
},
updateSize() {
if (this.currentWidth && this.currentHeight) {
this.screenWrapper.style.width = `${this.currentWidth}px`;
this.screenWrapper.style.height = `${this.currentHeight}px`;
} else {
this.screenWrapper.style.width = `${this.originalWidth}px`;
this.screenWrapper.style.height = `${this.originalHeight}px`;
}
},
handleAutoScale(scale) {
if (!this.autoScale) return;
const screenWrapper = this.screenWrapper;
const domWidth = screenWrapper.clientWidth;
const domHeight = screenWrapper.clientHeight;
const currentWidth = document.body.clientWidth;
const currentHeight = document.body.clientHeight;
screenWrapper.style.transform = `scale(${scale},${scale}) `;
let mx = Math.max((currentWidth - domWidth * scale) / 2, 0);
let my = Math.max((currentHeight - domHeight * scale) / 2, 0);
if (typeof this.autoScale === "object") {
// @ts-ignore
!this.autoScale.x && (mx = 0);
// @ts-ignore
!this.autoScale.y && (my = 0);
}
// console.log({
// mx,
// my,
// currentWidth,
// currentHeight,
// domWidth,
// domHeight,
// scale,
// });
this.screenWrapper.style.margin = `${my}px ${mx}px`;
},
updateScale() {
const screenWrapper = this.screenWrapper;
//
const currentWidth = document.body.clientWidth;
const currentHeight = document.body.clientHeight;
// onResize
const realWidth = this.currentWidth || this.originalWidth;
const realHeight = this.currentHeight || this.originalHeight;
//
const widthScale = currentWidth / realWidth;
const heightScale = currentHeight / realHeight;
// console.log({currentWidth, currentHeight,realWidth,realHeight});
//
if (this.fullScreen) {
screenWrapper.style.transform = `scale(${widthScale},${heightScale})`;
return false;
}
//
const scale = Math.min(widthScale, heightScale);
this.handleAutoScale(scale);
},
initMutationObserver() {
const screenWrapper = this.screenWrapper;
const observer = (this.observer = new MutationObserver(() => {
this.onResize();
}));
observer.observe(screenWrapper, {
attributes: true,
attributeFilter: ["style"],
attributeOldValue: true,
});
},
clearListener() {
window.removeEventListener("resize", this.onResize);
},
addListener() {
window.addEventListener("resize", this.onResize);
},
clearStyle() {
// console.log("");
const screenWrapper = this.screenWrapper;
screenWrapper.parentNode.style.overflow = "auto";
screenWrapper.style = "";
},
async resize() {
if (!this.selfAdaption) {
return;
}
await this.initSize();
this.updateSize();
this.updateScale();
},
},
mounted() {
this.onResize = debounce(() => {
this.resize();
}, this.delay);
this.$nextTick(() => {
if (this.selfAdaption) {
this.resize();
this.addListener();
}
});
},
beforeDestroy() {
this.clearListener();
// this.observer.disconnect()
},
};
//
</script>
<style scoped>
.screen-box {
overflow: hidden;
background-size: 100% 100%;
background: #000;
width: 100vw;
height: 100vh;
}
.screen-wrapper {
transition-property: all;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 500ms;
position: relative;
overflow: hidden;
z-index: 100;
transform-origin: left top;
}
</style>

View File

@ -56,7 +56,6 @@ export default {
"更新时间": "Update Time",
"请输入": "Please input ",
"请选择": "Please select",
"请确认": "Please confirm",
"确 定": "OK",
"取 消": "Cancel",
"添加成功": "Add Success",
@ -67,15 +66,6 @@ export default {
"未完成": "Unfinished",
"下载": "Download",
"分钟": "Minute",
"选择语言":"Select Language",
"布局大小":"Layout Size",
"较大":"Large",
"默认":"Default",
"较小":"Small",
"个人中心":"Profile",
"退出登录":"Logout",
"保存":"Save",
"关闭":"Close",
},
"validate": {
"不能为空": "Can not be empty ",
@ -89,10 +79,6 @@ export default {
},
"tip": {
"确定删除选中记录?": "Are you sure to delete the selected record?",
"请上传": "Please upload",
"大小不超过": "Size is not more than",
"格式为": "Format is",
"的文件": "file",
},
"login": {
"标题": "CASM Sewing Management System",
@ -143,31 +129,12 @@ export default {
"张力值": "Tension Value",
"张力": "Tension",
'针数': 'Needle',
"针1": "Needle1",
"针2": "Needle2",
},
"user":{
'人员信息': 'User Info',
'操作员': 'Operator',
'人员ID': 'Staff ID',
'员工姓名': 'Staff Name',
'员工编号': 'Staff Code',
'用户名称': 'Username',
"手机号码": "Mobile",
"用户邮箱": "Email",
"所属部门": "Dept",
"所属角色": "Role",
"创建日期": "Create Date",
"基本资料": "Basic Info",
"修改密码": "Change Password",
"用户昵称": "Nickname",
"男": "male",
"女": "famale",
"旧密码": "Old Password",
"新密码": "New Password",
"确认密码": "Confirm Password",
},
"device": {
"设备信息": "Device Info",
@ -213,7 +180,6 @@ export default {
"第几次": "Needle No.",
"步骤": "Step",
"二维码": "QRCode",
"编码": "Code",
},
"produce": {
"产品编码": "ProductCode",

View File

@ -35,7 +35,6 @@ export default {
"面线管理": "面线管理",
"底线管理": "底线管理",
"梭芯信息": "梭芯管理",
},
"common": {
"新增": "新增",
@ -58,7 +57,6 @@ export default {
"更新时间": "更新时间",
"请输入": "请输入",
"请选择": "请选择",
"请确认": "请确认",
"确 定": "确 定",
"取 消": "取 消",
"添加成功": "添加成功",
@ -69,15 +67,6 @@ export default {
"未完成": "未完成",
"下载": "下载",
"分钟": " 分钟",
"选择语言":"选择语言",
"布局大小":"布局大小",
"较大":"较大",
"默认":"默认",
"较小":"较小",
"个人中心":"个人中心",
"退出登录":"退出登录",
"保存":"保存",
"关闭":"关闭",
},
"validate": {
"不能为空": "不能为空",
@ -91,13 +80,9 @@ export default {
},
"tip": {
"确定删除选中记录?": "确定删除选中记录?",
"请上传": "请上传",
"大小不超过": "大小不超过",
"格式为": "格式为",
"的文件": "的文件",
},
"login": {
"标题": "CASM缝纫管理系统",
"标题": "智能缝纫管理系统",
"用户登录": "用户登录",
"登录": "登录",
"账号": "账号",
@ -145,31 +130,12 @@ export default {
"张力值": "张力值",
"张力": "张力",
'针数': '针数',
"针1": "针1",
"针2": "针2",
},
"user":{
'人员信息': '人员信息',
'操作员': '操作员',
'人员ID': '人员ID',
'员工姓名': '员工姓名',
'员工编号': '员工编号',
"个人信息": "个人信息",
"用户名称": "用户名称",
"手机号码": "手机号码",
"用户邮箱": "用户邮箱",
"所属部门": "所属部门",
"所属角色": "所属角色",
"创建日期": "创建日期",
"基本资料": "基本资料",
"修改密码": "修改密码",
"用户昵称": "用户昵称",
"男": "男",
"女": "女",
"旧密码": "旧密码",
"新密码": "新密码",
"确认密码": "确认密码",
},
"device": {
"设备信息": "设备信息",
@ -215,7 +181,7 @@ export default {
"第几针": "第几针",
"步骤": "步骤",
"二维码": "二维码",
"编码": "编码",
},
"produce": {
"产品编码": "产品编码",

View File

@ -17,10 +17,10 @@
</el-tooltip> -->
<screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip :content="tLang('common','选择语言')" effect="dark" placement="bottom">
<el-tooltip content="选择语言" effect="dark" placement="bottom">
<lang-select id="lang-select" class="right-menu-item hover-effect" />
</el-tooltip>
<el-tooltip :content="tLang('common','布局大小')" effect="dark" placement="bottom">
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
</template>
@ -33,13 +33,13 @@
<template #dropdown>
<el-dropdown-menu>
<router-link to="/user/profile">
<el-dropdown-item>{{tLang('common','个人中心')}}</el-dropdown-item>
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link>
<!-- <el-dropdown-item command="setLayout" v-if="settingsStore.showSettings">
<span>{{tLang('common','布局设置')}}</span>
</el-dropdown-item> -->
<el-dropdown-item command="setLayout" v-if="settingsStore.showSettings">
<span>布局设置</span>
</el-dropdown-item>
<el-dropdown-item divided command="logout">
<span>{{tLang('common','退出登录')}}</span>
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
</template>

View File

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<!-- <el-row :gutter="10" class="mb8">
<el-row :gutter="10" class="mb8">
<el-col :span="3">
<div class="card-box">
{{ tLang('home', '员工总数') }}200{{ tLang('home', '人') }}
@ -11,13 +11,13 @@
{{ tLang('home', '产出进度') }}60%
</div>
</el-col>
</el-row> -->
</el-row>
<div class="chart-content">
<div class="chart-content-card">
<v-chart ref="lineChartRef" class="line-chart" :option="line_option" />
<v-chart class="line-chart" :option="line_option" />
</div>
<div class="chart-content-card">
<v-chart ref="pieChartRef" class="line-chart" :option="pie_option" />
<v-chart class="line-chart" :option="pie_option" />
</div>
<div class="right-content-card">
<div>{{ deviceState.on + tLang('home', '台') }}/{{ deviceState.total + tLang('home', '台') }}</div>
@ -87,12 +87,6 @@ let item_color = {
4: '#CCCCCC',
}
let lineChartRef = ref(null);
let pieChartRef = ref(null);
window.onresize = () => {
lineChartRef.value.resize();
pieChartRef.value.resize();
}
const line_option = ref({
title: {

View File

@ -30,6 +30,7 @@
style="width: 100px; height: 100px; margin-right: 10px; margin-bottom: 10px"
@click="dialogImageUrl = item; dialogVisible = true"></el-image>
</div>
</el-descriptions-item>
</el-descriptions>
</el-dialog>

View File

@ -9,16 +9,16 @@
</div>
<div class="info-content">
<el-row justify="space-evenly">
<el-col :span="12">{{ tLang('device', '设备编码') }}:</el-col>
<el-col :span="12">{{ tLang('device', '设备编码') }}</el-col>
<el-col :span="12">{{ info.code }}</el-col>
</el-row>
<el-row>
<el-col :span="12">{{ tLang('device', '设备名称') }}:</el-col>
<el-col :span="12">{{ tLang('device', '设备名称') }}</el-col>
<el-col :span="12">{{ info.name }}</el-col>
</el-row>
<el-row>
<el-col :span="12">{{ tLang('device', '运行时长') }}:</el-col>
<el-col :span="12">{{ info.runTime || 0 + tLang('common', '分钟') }}</el-col>
<el-col :span="12">{{ tLang('device', '运行时长') }}</el-col>
<el-col :span="12">{{ info.runTime||0 + tLang('common','分钟') }}</el-col>
</el-row>
</div>
</div>
@ -29,11 +29,11 @@
</div>
<div class="info-content">
<el-row justify="space-evenly">
<el-col :span="12">{{ tLang('user', '操作员') }}:</el-col>
<el-col :span="12">{{ tLang('user', '操作员') }}</el-col>
<el-col :span="12">{{ info.userName }}</el-col>
</el-row>
<el-row>
<el-col :span="12">{{ tLang('user', '人员ID') }}:</el-col>
<el-col :span="12">{{ tLang('user', '人员ID') }}</el-col>
<el-col :span="12">{{ info.userCode }}</el-col>
</el-row>
</div>
@ -46,42 +46,36 @@
</div>
<div class="info-content">
<el-row justify="space-evenly">
<el-col :span="6">{{ tLang('product', '产品名称') }}:</el-col>
<el-col :span="6">{{ info.productionName }}</el-col>
<el-col :span="6">{{ tLang('product', '产品编码') }}:</el-col>
<el-col :span="6">{{ info.productionCode }}</el-col>
<el-col :span="12">操作员</el-col>
<el-col :span="12">张一一</el-col>
</el-row>
<el-row v-for="item in info.info">
<el-col :span="4">{{ tLang('product', '面线信息') }}:</el-col>
<el-col :span="4">{{ item.surfacelineCode }}</el-col>
<el-col :span="4">{{ tLang('product', '底线信息') }}:</el-col>
<el-col :span="4">{{ item.bottomlineCode }}</el-col>
<el-col :span="4">{{ tLang('product', '梭芯信息') }}:</el-col>
<el-col :span="4">{{ item.shuttlecoreCode }}</el-col>
<el-row>
<el-col :span="12">人员ID</el-col>
<el-col :span="12">11</el-col>
</el-row>
</div>
</div>
<div class="barchart">
<v-chart ref="barChart" class="chart-class" :option="bar_option" />
<v-chart class="chart-class" :option="bar_option" />
</div>
</div>
<div class="right-content">
<div class="zhangli">
<v-chart ref="lineChart" class="chart-class" :option="line_option" />
<v-chart class="chart-class" :option="line_option" />
</div>
<div class="table">
<el-table :data="qualityList" stripe style="width: 100%">
<el-table-column type="index" :label="tLang('common', '序号')" align="center" width="60" />
<el-table-column :label="tLang('quality', '产品序列号')" align="center" prop="serialNumber" />
<el-table-column :label="tLang('quality', '开始时间')" align="center" prop="starttime">
<!-- <template #default="scope">
<template #default="scope">
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
</template> -->
</template>
</el-table-column>
<el-table-column :label="tLang('quality', '完成时间')" align="center" prop="endtime">
<!-- <template #default="scope">
<template #default="scope">
<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
</template> -->
</template>
</el-table-column>
<el-table-column :label="tLang('product', '底线编码')" align="center" prop="bottomlineCode" />
<el-table-column :label="tLang('product', '面线编码')" align="center" prop="surfacelineCode" />
@ -92,7 +86,7 @@
<el-tag type="success" size="mini" v-if="scope.row.state === '0'">{{ tLang('common', '合格') }}</el-tag>
<el-tag type="danger" size="mini" v-else-if="scope.row.state === '1'">{{ tLang('common', '不合格')
}}</el-tag>
<el-tag type="warning" size="mini" v-else>{{ tLang('common', '未完成') }}</el-tag>
<el-tag type="error" size="mini" v-else>{{ tLang('common', '未完成') }}</el-tag>
</div>
</template>
</el-table-column>
@ -103,8 +97,7 @@
</template>
<script setup>
import { getBaseInfoNew, halfHourOutputPassInfo, getNewestFiveInfo,getTensionInfo } from "@/api/home";
import { getBaseInfoNew, qualitynewDeviceOutputQuality, getNewestFiveInfo } from "@/api/home";
import { getCurrentInstance } from "vue";
@ -113,7 +106,7 @@ let pass = ref([0]);
let noPass = ref([0]);
let bar_option = ref({
title: {
text: proxy.tLang('home', '产量'),
text: proxy.tLang('home','产量'),
textStyle: {
color: '#797979'
},
@ -125,7 +118,7 @@ let bar_option = ref({
}
},
legend: {
data: [proxy.tLang('common', '合格'), proxy.tLang('common', '不合格')],
data: [proxy.tLang('common','合格'), proxy.tLang('common','不合格')],
textStyle: {
color: '#797979'
},
@ -163,7 +156,7 @@ let bar_option = ref({
],
series: [
{
name: proxy.tLang('common', '合格'),
name: proxy.tLang('common','合格'),
type: 'bar',
stack: 'Ad',
shape: 'circle',
@ -173,11 +166,10 @@ let bar_option = ref({
itemStyle: {
color: '#91cc75'
},
barWidth:'30%',
data: [0]
},
{
name: proxy.tLang('common', '不合格'),
name: proxy.tLang('common','不合格'),
type: 'bar',
stack: 'Ad',
shape: 'circle',
@ -185,16 +177,15 @@ let bar_option = ref({
focus: 'series'
},
itemStyle: {
color: '#c81623'
color: '#5470c6'
},
barWidth:'30%',
data: [0],
label: {
show: true,
position: 'top',
color: "#797979",
formatter: function (p) {
let sum = +pass.value[p.dataIndex] + (+noPass.value[p.dataIndex]);
let sum = pass.value[p.dataIndex] + noPass.value[p.dataIndex];
return sum;
}
}
@ -204,49 +195,32 @@ let bar_option = ref({
let line_option = ref({
title: {
text: proxy.tLang('home', '张力值'),
text: proxy.tLang('home','张力值'),
left: '0',
textStyle: {
color: '#000'
}
},
xAxis: {
name: proxy.tLang('home', '针数'),
name: proxy.tLang('home','针数'),
type: 'category',
data: [1],
boundaryGap: false,
axisLine: {
onZero: false //-----------
}
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
name: proxy.tLang('home', '张力'),
type: 'value',
min: -10,
max: 10
name: proxy.tLang('home','张力'),
type: 'value'
},
series: [
{
name: proxy.tLang('home', '针1'),
data: [0],
type: 'line',
smooth: true
},
{
name: proxy.tLang('home', '针2'),
data: [0],
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
smooth: true
}
]
})
let timer = null;
let info = ref({});
let qualityList = ref([]);
let barChart = ref(null);
let lineChart = ref(null);
function getData() {
getNewestFiveInfo().then(res => {
qualityList.value = res.data;
@ -254,25 +228,12 @@ function getData() {
getBaseInfoNew().then(res => {
info.value = res.data;
});
getTensionInfo().then(res => {
let round = [];
let one = [];
let two = [];
res.data.forEach(item => {
round.push(item.round);
one.push(...item.one);
two.push(...item.two);
});
line_option.value.xAxis.data = one.map((item, index) => index + 1);
line_option.value.series[0].data = one;
line_option.value.series[1].data = two;
})
halfHourOutputPassInfo().then(res => {
qualitynewDeviceOutputQuality().then(res => {
pass.value = res.data.pass;
noPass.value = res.data.noPass;
bar_option.value.series[0].data = res.data.pass;
bar_option.value.series[1].data = res.data.noPass;
bar_option.value.xAxis[0].data = res.data.timePass;
bar_option.value.xAxis[0].data = res.data.time;
});
}
@ -298,7 +259,7 @@ onUnmounted(() => {
overflow: auto;
.left-content {
width: 50%;
width: 700px;
height: 100%;
margin-right: 15px;

View File

@ -36,7 +36,7 @@
value-format="YYYY-MM-DD hh:mm:ss" :placeholder="tLang('common', '请选择') + tLang('produce', '结束时间')">
</el-date-picker>
</el-form-item>
<el-form-item :label="tLang('produce','批次')" prop="batch">
<el-form-item label="tLang('produce','批次')" prop="batch">
<el-input v-model="queryParams.batch" :placeholder="tLang('common', '请输入') + tLang('produce', '批次')"
clearable @keyup.enter="handleQuery" />
</el-form-item>

View File

@ -1,26 +1,26 @@
<template>
<el-dialog v-model="props.modelValue" title="设备详情" @close="close" width="800">
<el-descriptions title="" column="2">
<el-descriptions-item :label="tLang('product','产品名称')">{{ props.info.productionName }}</el-descriptions-item>
<el-descriptions-item :label="tLang('product','产品编码')">{{ props.info.productionCode }}</el-descriptions-item>
<el-descriptions-item :label="tLang('product','产品类型')">{{ props.info.type }}</el-descriptions-item>
<el-descriptions-item label="产品名称">{{ props.info.productionName }}</el-descriptions-item>
<el-descriptions-item label="产品编码">{{ props.info.productionCode }}</el-descriptions-item>
<el-descriptions-item label="产品类型">{{ props.info.type }}</el-descriptions-item>
<el-descriptions-item :label="tLang('device','设备名称')">{{ props.info.deviceName }}</el-descriptions-item>
<el-descriptions-item :label="tLang('device','设备编码')">{{ props.info.deviceCode }}</el-descriptions-item>
<el-descriptions-item label="设备名称">{{ props.info.deviceName }}</el-descriptions-item>
<el-descriptions-item label="设备编码">{{ props.info.deviceCode }}</el-descriptions-item>
<el-descriptions-item :label="tLang('user','员工姓名')">{{ props.info.userName }}</el-descriptions-item>
<el-descriptions-item :label="tLang('produce','员工编号')">{{ props.info.userCode }}</el-descriptions-item>
<el-descriptions-item :label="tLang('produce','目标产量')">{{ props.info.planOutput }}</el-descriptions-item>
<el-descriptions-item :label="tLang('produce','当前产量')">{{ props.info.output }}</el-descriptions-item>
<el-descriptions-item label="员工姓名">{{ props.info.userName }}</el-descriptions-item>
<el-descriptions-item label="员工编码">{{ props.info.userCode }}</el-descriptions-item>
<el-descriptions-item label="目标产量">{{ props.info.planOutput }}</el-descriptions-item>
<el-descriptions-item label="实时产量">{{ props.info.output }}</el-descriptions-item>
<el-descriptions-item :label="tLang('produce','开始时间')">{{ props.info.starttime }}</el-descriptions-item>
<el-descriptions-item :label="tLang('produce','结束时间')">{{ props.info.endtime }}</el-descriptions-item>
<el-descriptions-item label="开始时间">{{ props.info.starttime }}</el-descriptions-item>
<el-descriptions-item label="结束时间">{{ props.info.endtime }}</el-descriptions-item>
</el-descriptions>
<el-descriptions title="" column="1">
<el-descriptions-item :label="tLang('produce','备注')">{{ props.info.remark }}</el-descriptions-item>
<el-descriptions-item label="备注信息">{{ props.info.remark }}</el-descriptions-item>
</el-descriptions>
<el-descriptions title="" column="">
<el-descriptions-item :label="tLang('product','图片')">
<el-descriptions-item label="设备图片">
<div v-if="props.info.file && props.info.file.length > 0" style="width: 100%;display: flex;flex-direction: row;justify-content: center;">
<el-image v-for="(item, index) in props.info?.file.split(',')" :key="index" :src="baseUrl + item"
style="width: 100px; height: 100px; margin-right: 10px; margin-bottom: 10px"

View File

@ -3,8 +3,7 @@
<el-form ref="formRef" :inline="true" :model="props.form" :rules="rules" class="demo-form-inline"
label-width="100px">
<el-form-item :label="tLang('product', '产品编码')" prop="code">
<el-input v-model="props.form.code" :disabled="Boolean(props.form.disabled)"
:placeholder="tLang('common', '请输入') + tLang('product', '产品编码')" />
<el-input v-model="props.form.code" :disabled="Boolean(props.form.disabled)" :placeholder="tLang('common', '请输入') + tLang('product', '产品编码')" />
</el-form-item>
<el-form-item :label="tLang('product', '产品名称')" prop="name">
<el-input v-model="props.form.name" :placeholder="tLang('common', '请输入') + tLang('product', '产品名称')" />
@ -12,68 +11,6 @@
<el-form-item :label="tLang('product', '产品类型')" prop="type">
<el-input v-model="props.form.type" :placeholder="tLang('common', '请输入') + tLang('product', '产品类型')" />
</el-form-item>
<el-form-item :label="tLang('product', '针管理')">
<el-button type="primary" icon="Plus" circle @click="handleAddNeedle" />
</el-form-item>
<el-table :data="props.form.zhen" style="margin-bottom: 15px;">
<el-table-column type="index" :label="tLang('product', '针号')" width="60" align="center" />
<el-table-column :label="tLang('product', '面线信息')" align="center" prop="name">
<template #default="scope">
<el-input v-model="scope.row.surfacelineCode" :placeholder="tLang('common', '请输入')" />
</template>
</el-table-column>
<el-table-column :label="tLang('product', '底线信息')" align="center" prop="type">
<template #default="scope">
<el-input v-model="scope.row.bottomlineCode" :placeholder="tLang('common', '请输入')" />
</template>
</el-table-column>
<el-table-column :label="tLang('product', '最小张力')" align="center" prop="code">
<template #default="scope">
<el-input v-model="scope.row.min" :placeholder="tLang('common', '请输入')" />
</template>
</el-table-column>
<el-table-column :label="tLang('product', '最大张力')" align="center" prop="code">
<template #default="scope">
<el-input v-model="scope.row.max" :placeholder="tLang('common', '请输入')" />
</template>
</el-table-column>
<el-table-column :label="tLang('common', '操作')" align="center" class-name="small-padding fixed-width">
<template #default="{row,$index}">
<el-tooltip :content="tLang('common', '删除')" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDeleteNeedle($index)"></el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-form-item :label="tLang('product', '加工次数')">
<el-button type="primary" icon="Plus" circle @click="handleAddWorking" />
</el-form-item>
<el-table :data="props.form.working" style="margin-bottom: 15px;">
<el-table-column type="index" :label="tLang('product', '第几次')" width="70" align="center" />
<el-table-column :label="tLang('product', '步骤')" align="center" prop="name">
<template #default="scope">
<el-input v-model="scope.row.step" :placeholder="tLang('common', '请输入')" />
</template>
</el-table-column>
<el-table-column :label="tLang('product', '最小针数 ')" align="center" prop="type">
<template #default="scope">
<el-input v-model="scope.row.min" :placeholder="tLang('common', '请输入')" />
</template>
</el-table-column>
<el-table-column :label="tLang('product', '最大针数')" align="center" prop="code">
<template #default="scope">
<el-input v-model="scope.row.max" :placeholder="tLang('common', '请输入')" />
</template>
</el-table-column>
<el-table-column :label="tLang('common', '操作')" align="center" class-name="small-padding fixed-width">
<template #default="{row,$index}">
<el-tooltip :content="tLang('common', '删除')" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDeleteWorking($index)"></el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-form-item :label="tLang('product', '备注')" prop="remark">
<el-input v-model="props.form.remark" style="width: 600px" :rows="4" type="textarea"
:placeholder="tLang('common', '请输入')" />
@ -111,60 +48,6 @@ const props = defineProps({
});
const baseUrl = import.meta.env.VITE_APP_BASE_API;
//
function handleAddNeedle() {
let zhen = props.form.zhen || [];
zhen.push({
needleNum: zhen.length + 1,
surfacelineCode: "",
bottomlineCode: "",
min: "",
max: "",
});
emit("update:form", { ...props.form, zhen });
}
//
function handleDeleteNeedle(i) {
let zhen = props.form.zhen || [];
let length = zhen.length;
zhen.splice(i, 1);
if (zhen.length>0 && i != length - 1) {
zhen = zhen.map((item, index) => {
item.needleNum = index + 1;
return item;
});
}
emit("update:form", { ...props.form, zhen });
}
//
function handleAddWorking() {
const working = props.form.working || [];
working.push({
num: working.length + 1,
step: "",
min: "",
max: "",
});
emit("update:form", { ...props.form, working });
}
//
function handleDeleteWorking(i) {
let working = props.form.working || [];
let length = working.length;
working.splice(i, 1);
if (working.length>0 &&i != length - 1) {
working = working.map((item, index) => {
item.num = index + 1;
return item;
});
}
emit("update:form", { ...props.form, working });
}
//
function validateWorking(rule, value, callback) {
if (value[0].min === "" || value[0].max === "" || value[1].min === "" || value[1].max === "") {

View File

@ -73,7 +73,7 @@
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="getList"
@current-change="getList" />
</div>
<AddEdit :title="title" v-model="open" v-model:form="form" @submitForm="submitForm"></AddEdit>
<AddEdit :title="title" v-model="open" :form="form" @submitForm="submitForm"></AddEdit>
<InfoVue v-model="infoDialog" :info="productinfo" />
<el-image-viewer v-if="showImagePreview" :url-list="showsrcListref" hide-on-click-modal teleported
@ -156,7 +156,7 @@ function getProductQRCode(code) {
ctx.font = "bold 20px Arial";
ctx.fillStyle = "black";
ctx.textAlign="center";
ctx.fillText(proxy.tLang('product',"编码") + ':' + code, 125, 310); //
ctx.fillText("产品编码" + ':' + code, 125, 310); //
// Object.keys(list).forEach((key,index) => {
// ctx.fillText(key +':'+ list[key], 240, 30 + index * 20); //
// });
@ -273,7 +273,7 @@ function reset() {
function handleUpdate(row) {
reset();
const id = row.code || ids.value
selectProduction(id).then(response => {
getProduction(id).then(response => {
form.value = response.data;
form.value.disabled = true;
open.value = true;

View File

@ -51,12 +51,12 @@
<el-col :span="2">
<el-statistic :title="tLang('quality', '产品合格率')" :value="qualifiedRate" :precision="1"
:value-style="{ color: 'green' }"
:formatter="(val) => { return (totalQuality == 0 ? '0' : (((val / totalQuality) * 100).toFixed(1) || 0)) + '%' }" />
:formatter="(val) => { return (totalQuality == 0 ? '0' :(((val / totalQuality) * 100).toFixed(1)||0)) + '%' }" />
</el-col>
<el-col :span="2">
<el-statistic :title="tLang('quality', '产品不合格率')" :value="unqualifiedRate" :precision="1"
:value-style="{ color: 'red' }"
:formatter="(val) => { return (totalQuality == 0 ? '0' : (((val / totalQuality) * 100).toFixed(1) || 0)) + '%' }" />
:formatter="(val) => { return (totalQuality == 0 ? '0' :(((val / totalQuality) * 100).toFixed(1)||0)) + '%' }" />
</el-col>
<el-col :span="2">
<el-statistic :title="tLang('quality', '产品完成量')" :value="totalQuality" />
@ -94,15 +94,11 @@
</el-table-column>
<el-table-column :label="tLang('quality', '状态')" v-if="columns[7].visible" align="center" prop="state">
<template #default="scope">
<el-tooltip :content="scope.row.errorMsg" :disabled="scope.row.state !== '1'" placement="top-start" v-if="scope.row.userId !== 1">
<div style="cursor: pointer;">
<el-tag type="success" size="mini"
v-if="scope.row.state === '0'">{{ tLang('common', '合格') }}</el-tag>
<el-tag type="danger" size="mini"
v-else-if="scope.row.state === '1'">{{ tLang('common', '不合格') }}</el-tag>
<el-tag type="warning" size="mini" v-else>{{ tLang('common', '未完成') }}</el-tag>
</div>
</el-tooltip>
<div>
<el-tag type="success" size="mini" v-if="scope.row.state === '0'">{{tLang('common','合格')}}</el-tag>
<el-tag type="danger" size="mini" v-else-if="scope.row.state === '1'">{{tLang('common','不合格')}}</el-tag>
<el-tag type="error" size="mini" v-else>{{tLang('common','未完成')}}</el-tag>
</div>
</template>
</el-table-column>
<!-- <el-table-column :label="tLang('quality','')操作" align="center" class-name="small-padding fixed-width">

View File

@ -1,7 +1,7 @@
<template>
<div class="register">
<el-form ref="registerRef" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">{{ $t("login.标题") }}</h3>
<h3 class="title">若依后台管理系统</h3>
<el-form-item prop="username">
<el-input
v-model="registerForm.username"

View File

@ -14,27 +14,27 @@
</div>
<ul class="list-group list-group-striped">
<li class="list-group-item">
<svg-icon icon-class="user" />{{tLang('user','用户名称')}}
<svg-icon icon-class="user" />用户名称
<div class="pull-right">{{ state.user.userName }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="phone" />{{tLang('user','手机号码')}}
<svg-icon icon-class="phone" />手机号码
<div class="pull-right">{{ state.user.phonenumber }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="email" />{{tLang('user','用户邮箱')}}
<svg-icon icon-class="email" />用户邮箱
<div class="pull-right">{{ state.user.email }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="tree" />{{tLang('user','所属部门')}}
<svg-icon icon-class="tree" />所属部门
<div class="pull-right" v-if="state.user.dept">{{ state.user.dept.deptName }} / {{ state.postGroup }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="peoples" />{{tLang('user','所属角色')}}
<svg-icon icon-class="peoples" />所属角色
<div class="pull-right">{{ state.roleGroup }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="date" />{{tLang('user','创建日期')}}
<svg-icon icon-class="date" />创建日期
<div class="pull-right">{{ state.user.createTime }}</div>
</li>
</ul>
@ -45,14 +45,14 @@
<el-card>
<template v-slot:header>
<div class="clearfix">
<span>{{tLang('user','基本资料')}}</span>
<span>基本资料</span>
</div>
</template>
<el-tabs v-model="activeTab">
<el-tab-pane :label="tLang('user','基本资料')" name="userinfo">
<el-tab-pane label="基本资料" name="userinfo">
<userInfo :user="state.user" />
</el-tab-pane>
<el-tab-pane :label="tLang('user','修改密码')" name="resetPwd">
<el-tab-pane label="修改密码" name="resetPwd">
<resetPwd />
</el-tab-pane>
</el-tabs>

View File

@ -1,17 +1,17 @@
<template>
<el-form ref="pwdRef" :model="user" :rules="rules" label-width="180px">
<el-form-item :label="tLang('user','旧密码')" prop="oldPassword">
<el-input v-model="user.oldPassword" :placeholder="tLang('common','请输入') + tLang('user','旧密码')" type="password" show-password />
<el-form ref="pwdRef" :model="user" :rules="rules" label-width="80px">
<el-form-item label="旧密码" prop="oldPassword">
<el-input v-model="user.oldPassword" placeholder="请输入旧密码" type="password" show-password />
</el-form-item>
<el-form-item :label="tLang('user','新密码')" prop="newPassword">
<el-input v-model="user.newPassword" :placeholder="tLang('common','请输入') + tLang('user','新密码')" type="password" show-password />
<el-form-item label="新密码" prop="newPassword">
<el-input v-model="user.newPassword" placeholder="请输入新密码" type="password" show-password />
</el-form-item>
<el-form-item :label="tLang('user','确认密码')" prop="confirmPassword">
<el-input v-model="user.confirmPassword" :placeholder="tLang('common','请确认') + tLang('user','新密码')" type="password" show-password/>
<el-form-item label="确认密码" prop="confirmPassword">
<el-input v-model="user.confirmPassword" placeholder="请确认新密码" type="password" show-password/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submit">{{tLang('common','保存')}}</el-button>
<el-button type="danger" @click="close">{{tLang('common','关闭')}}</el-button>
<el-button type="primary" @click="submit">保存</el-button>
<el-button type="danger" @click="close">关闭</el-button>
</el-form-item>
</el-form>
</template>

View File

@ -1,23 +1,23 @@
<template>
<el-form ref="userRef" :model="form" :rules="rules" label-width="80px">
<el-form-item :label="tLang('user','用户昵称')" prop="nickName">
<el-form-item label="用户昵称" prop="nickName">
<el-input v-model="form.nickName" maxlength="30" />
</el-form-item>
<el-form-item :label="tLang('user','手机号码')" prop="phonenumber">
<el-form-item label="手机号码" prop="phonenumber">
<el-input v-model="form.phonenumber" maxlength="11" />
</el-form-item>
<el-form-item :label="tLang('user','用户邮箱')" prop="email">
<el-form-item label="邮箱" prop="email">
<el-input v-model="form.email" maxlength="50" />
</el-form-item>
<el-form-item :label="性别">
<el-form-item label="性别">
<el-radio-group v-model="form.sex">
<el-radio label="0">{{tLang('user','')}}</el-radio>
<el-radio label="1">{{tLang('user','')}}</el-radio>
<el-radio label="0"></el-radio>
<el-radio label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submit">{{tLang('common','保存')}}</el-button>
<el-button type="danger" @click="close">{{tLang('common','关闭')}}</el-button>
<el-button type="primary" @click="submit">保存</el-button>
<el-button type="danger" @click="close">关闭</el-button>
</el-form-item>
</el-form>
</template>

View File

@ -31,8 +31,7 @@ export default defineConfig(({ mode, command }) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
// target: 'http://192.168.110.197:9015/',
target: 'http://8.141.87.86:9015',
target: 'http://8.130.165.100:9015/',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}