update
This commit is contained in:
parent
8c55198470
commit
780e762ed6
@ -37,4 +37,14 @@ export function qualitynewDeviceOutputQuality() {
|
|||||||
url: '/casm/quality/newDeviceOutputQuality',
|
url: '/casm/quality/newDeviceOutputQuality',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//首页 产量堆叠图
|
||||||
|
export function getNewestFiveInfo() {
|
||||||
|
return request({
|
||||||
|
url: '/casm/quality/getNewestFiveInfo',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,6 +64,7 @@ export default {
|
|||||||
"合格": "Pass",
|
"合格": "Pass",
|
||||||
"不合格": "Fail",
|
"不合格": "Fail",
|
||||||
"未完成": "Unfinished",
|
"未完成": "Unfinished",
|
||||||
|
"下载": "Download",
|
||||||
},
|
},
|
||||||
"validate": {
|
"validate": {
|
||||||
"不能为空": "Can not be empty ",
|
"不能为空": "Can not be empty ",
|
||||||
@ -71,7 +72,9 @@ export default {
|
|||||||
"长度不正确": "Length is incorrect",
|
"长度不正确": "Length is incorrect",
|
||||||
"范围不正确": "Range is incorrect",
|
"范围不正确": "Range is incorrect",
|
||||||
"最大值为": "Maximum value is",
|
"最大值为": "Maximum value is",
|
||||||
"最小值为": "Minimum value is"
|
"最小值为": "Minimum value is",
|
||||||
|
"最小针数不能大于最大针数": "Min needle can not be greater than max needle",
|
||||||
|
"开始时间不能大于结束时间": "Start time can not be greater than end time",
|
||||||
},
|
},
|
||||||
"tip": {
|
"tip": {
|
||||||
"确定删除选中记录?": "Are you sure to delete the selected record?",
|
"确定删除选中记录?": "Are you sure to delete the selected record?",
|
||||||
@ -166,6 +169,7 @@ export default {
|
|||||||
"类型": "Type",
|
"类型": "Type",
|
||||||
"第几次": "Needle No.",
|
"第几次": "Needle No.",
|
||||||
"步骤": "Step",
|
"步骤": "Step",
|
||||||
|
"二维码": "QRCode",
|
||||||
},
|
},
|
||||||
"produce": {
|
"produce": {
|
||||||
"产品编码": "ProductCode",
|
"产品编码": "ProductCode",
|
||||||
|
@ -65,6 +65,7 @@ export default {
|
|||||||
'合格': '合格',
|
'合格': '合格',
|
||||||
'不合格': '不合格',
|
'不合格': '不合格',
|
||||||
"未完成": "未完成",
|
"未完成": "未完成",
|
||||||
|
"下载": "下载",
|
||||||
},
|
},
|
||||||
"validate": {
|
"validate": {
|
||||||
"不能为空": "不能为空",
|
"不能为空": "不能为空",
|
||||||
@ -73,6 +74,8 @@ export default {
|
|||||||
"范围不正确": "范围不正确",
|
"范围不正确": "范围不正确",
|
||||||
"最大值为": "最大值为",
|
"最大值为": "最大值为",
|
||||||
"最小值为": "最小值为",
|
"最小值为": "最小值为",
|
||||||
|
"最小针数不能大于最大针数": "最小针数不能大于最大针数",
|
||||||
|
"开始时间不能大于结束时间": "开始时间不能大于结束时间",
|
||||||
},
|
},
|
||||||
"tip": {
|
"tip": {
|
||||||
"确定删除选中记录?": "确定删除选中记录?",
|
"确定删除选中记录?": "确定删除选中记录?",
|
||||||
@ -166,6 +169,7 @@ export default {
|
|||||||
"类型": "类型",
|
"类型": "类型",
|
||||||
"第几针": "第几针",
|
"第几针": "第几针",
|
||||||
"步骤": "步骤",
|
"步骤": "步骤",
|
||||||
|
"二维码": "二维码",
|
||||||
},
|
},
|
||||||
"produce": {
|
"produce": {
|
||||||
"产品编码": "产品编码",
|
"产品编码": "产品编码",
|
||||||
|
@ -153,8 +153,9 @@ function getList() {
|
|||||||
});
|
});
|
||||||
homeDeviceRate().then(response => {
|
homeDeviceRate().then(response => {
|
||||||
pie_option.value.series[0].data = [
|
pie_option.value.series[0].data = [
|
||||||
{ value: response.data.on, name: proxy.tLang('home', '使用中') },
|
{ value: response.data.off, name: proxy.tLang('home', '停机') },
|
||||||
{ value: response.data.off, name: proxy.tLang('home', '停机') }
|
|
||||||
|
{ value: response.data.on, name: proxy.tLang('home', '使用中') }
|
||||||
]
|
]
|
||||||
deviceState.on = response.data.on;
|
deviceState.on = response.data.on;
|
||||||
deviceState.off = response.data.off;
|
deviceState.off = response.data.off;
|
||||||
|
@ -63,19 +63,42 @@
|
|||||||
<v-chart class="chart-class" :option="line_option" />
|
<v-chart class="chart-class" :option="line_option" />
|
||||||
</div>
|
</div>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
|
<el-table :data="qualityList" stripe style="width: 100%">
|
||||||
啊啊 1720*828
|
<el-table-column type="index" :label="tLang('common', '序号')" align="center" width="60" />
|
||||||
1680*788
|
<el-table-column :label="tLang('quality', '产品序列号')" align="center" prop="serialNumber" />
|
||||||
|
<el-table-column :label="tLang('quality', '开始时间')" align="center" prop="starttime">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ parseTime(scope.row.starttime, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="tLang('quality', '完成时间')" align="center" prop="endtime">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d} {hh}:{mm}:{ss}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="tLang('product', '底线编码')" align="center" prop="bottomlineCode" />
|
||||||
|
<el-table-column :label="tLang('product', '面线编码')" align="center" prop="surfacelineCode" />
|
||||||
|
|
||||||
|
<el-table-column :label="tLang('quality', '状态')" align="center" prop="state">
|
||||||
|
<template #default="scope">
|
||||||
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getBaseInfoNew,qualitynewDeviceOutputQuality } from "@/api/home";
|
import { getBaseInfoNew, qualitynewDeviceOutputQuality, getNewestFiveInfo } from "@/api/home";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let table_height = ref(382);
|
||||||
let pass = ref([0]);
|
let pass = ref([0]);
|
||||||
let noPass = ref([0]);
|
let noPass = ref([0]);
|
||||||
let bar_option = ref({
|
let bar_option = ref({
|
||||||
@ -192,8 +215,12 @@ let line_option = ref({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
let timer = null;
|
||||||
|
let qualityList = ref([]);
|
||||||
function getData() {
|
function getData() {
|
||||||
|
getNewestFiveInfo().then(res => {
|
||||||
|
qualityList.value = res.data;
|
||||||
|
});
|
||||||
getBaseInfoNew().then(res => {
|
getBaseInfoNew().then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
});
|
});
|
||||||
@ -208,6 +235,12 @@ function getData() {
|
|||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
|
timer = setInterval(() => {
|
||||||
|
getData();
|
||||||
|
}, 30000);
|
||||||
|
});
|
||||||
|
onUnmounted(() => {
|
||||||
|
clearInterval(timer);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -67,6 +67,27 @@ const rules = {
|
|||||||
persionCode: [
|
persionCode: [
|
||||||
{ required: true, message: `${proxy.tLang('produce','员工编号')} ` + proxy.tLang('validate','不能为空'), trigger: "blur" }
|
{ required: true, message: `${proxy.tLang('produce','员工编号')} ` + proxy.tLang('validate','不能为空'), trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
starttime: [
|
||||||
|
{ required: true, message: `${proxy.tLang('produce','开始时间')} ` + proxy.tLang('validate','不能为空'), trigger: "blur" },
|
||||||
|
//开始时间不能大于结束时间
|
||||||
|
{validator: validateStarttime, trigger: 'blur'}
|
||||||
|
],
|
||||||
|
endtime: [
|
||||||
|
{ required: true, message: `${proxy.tLang('produce','结束时间')} ` + proxy.tLang('validate','不能为空'), trigger: "blur" },
|
||||||
|
//开始时间不能大于结束时间
|
||||||
|
{validator: validateStarttime, trigger: 'blur'}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function validateStarttime(rule, value, callback) {
|
||||||
|
let start = new Date(props.form.starttime).getTime();
|
||||||
|
let end = new Date(props.form.endtime).getTime();
|
||||||
|
if (start > end) {
|
||||||
|
callback(new Error('开始时间不能大于结束时间'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function close() {
|
function close() {
|
||||||
emit("update:modelValue", false);
|
emit("update:modelValue", false);
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
<el-table-column :label="tLang('produce', '设备编码')" v-if="columns[1].visible" align="center"
|
<el-table-column :label="tLang('produce', '设备编码')" v-if="columns[1].visible" align="center"
|
||||||
prop="deviceCode" />
|
prop="deviceCode" />
|
||||||
<el-table-column :label="tLang('produce', '员工编号')" v-if="columns[2].visible" align="center"
|
<el-table-column :label="tLang('produce', '员工编号')" v-if="columns[2].visible" align="center"
|
||||||
prop="persionCode" />
|
prop="userCode" />
|
||||||
<el-table-column :label="tLang('produce', '目标产量')" v-if="columns[3].visible" align="center"
|
<el-table-column :label="tLang('produce', '目标产量')" v-if="columns[3].visible" align="center"
|
||||||
prop="planOutput" />
|
prop="planOutput" />
|
||||||
<el-table-column :label="tLang('produce', '当前产量')" v-if="columns[4].visible" align="center" prop="output" />
|
<el-table-column :label="tLang('produce', '当前产量')" v-if="columns[4].visible" align="center" prop="output" />
|
||||||
@ -172,7 +172,7 @@ const columns = ref([
|
|||||||
{ key: 4, label: proxy.tLang('produce', '当前产量'), visible: true },
|
{ key: 4, label: proxy.tLang('produce', '当前产量'), visible: true },
|
||||||
{ key: 5, label: proxy.tLang('produce', '开始时间'), visible: true },
|
{ key: 5, label: proxy.tLang('produce', '开始时间'), visible: true },
|
||||||
{ key: 6, label: proxy.tLang('produce', '结束时间'), visible: true },
|
{ key: 6, label: proxy.tLang('produce', '结束时间'), visible: true },
|
||||||
{ key: 7, label: proxy.tLang('produce', '批次'), visible: true },
|
{ key: 7, label: proxy.tLang('produce', '批次'), visible: false },
|
||||||
{ key: 8, label: proxy.tLang('produce', '备注'), visible: false },
|
{ key: 8, label: proxy.tLang('produce', '备注'), visible: false },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
<el-table-column :label="tLang('product', '产品编码')" align="center" v-if="columns[2].visible" prop="code" />
|
<el-table-column :label="tLang('product', '产品编码')" align="center" v-if="columns[2].visible" prop="code" />
|
||||||
<el-table-column :label="tLang('product', '二维码')" align="center" v-if="columns[2].visible" prop="code">
|
<el-table-column :label="tLang('product', '二维码')" align="center" v-if="columns[2].visible" prop="code">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" @click="getProductQRCode(scope.row.code)">{{ tLang('product', '下载')
|
<el-button type="primary" @click="getProductQRCode(scope.row.code)">{{ tLang('common', '下载')
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -235,7 +235,7 @@ function handleInfo(row) {
|
|||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm(propform) {
|
function submitForm(propform) {
|
||||||
if (propform.code != null) {
|
if (propform.disabled != false && propform.disabled) {
|
||||||
updateProduction(propform).then(response => {
|
updateProduction(propform).then(response => {
|
||||||
proxy.$modal.msgSuccess(proxy.tLang('common', '修改成功'));
|
proxy.$modal.msgSuccess(proxy.tLang('common', '修改成功'));
|
||||||
open.value = false;
|
open.value = false;
|
||||||
|
@ -41,7 +41,21 @@ const { proxy } = getCurrentInstance();
|
|||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const rules = {
|
const rules = {
|
||||||
code: [{ required: true, message: `${proxy.tLang('common', '请输入') + proxy.tLang('product', '产品编码')}`, trigger: "blur" }],
|
code: [{ required: true, message: `${proxy.tLang('common', '请输入') + proxy.tLang('product', '产品编码')}`, trigger: "blur" }],
|
||||||
|
min:[
|
||||||
|
{validator: validateMin, trigger: 'blur'}
|
||||||
|
],
|
||||||
|
max:[
|
||||||
|
{validator: validateMin, trigger: 'blur'}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function validateMin(rule, value, callback) {
|
||||||
|
if (props.form.min > props.form.max) {
|
||||||
|
callback(new Error('最小针数不能大于最大针数'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: [String, Object, Array],
|
modelValue: [String, Object, Array],
|
||||||
title: String,
|
title: String,
|
||||||
|
@ -51,15 +51,15 @@
|
|||||||
<el-col :span="2">
|
<el-col :span="2">
|
||||||
<el-statistic :title="tLang('quality', '产品合格率')" :value="qualifiedRate" :precision="1"
|
<el-statistic :title="tLang('quality', '产品合格率')" :value="qualifiedRate" :precision="1"
|
||||||
:value-style="{ color: 'green' }"
|
:value-style="{ color: 'green' }"
|
||||||
:formatter="(val) => { return ((val / total) * 100).toFixed(1) + '%' }" />
|
:formatter="(val) => { return totalQuality == 0 ? '0%' :((val / totalQuality) * 100).toFixed(1) + '%' }" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2">
|
<el-col :span="2">
|
||||||
<el-statistic :title="tLang('quality', '产品不合格率')" :value="unqualifiedRate" :precision="1"
|
<el-statistic :title="tLang('quality', '产品不合格率')" :value="unqualifiedRate" :precision="1"
|
||||||
:value-style="{ color: 'red' }"
|
:value-style="{ color: 'red' }"
|
||||||
:formatter="(val) => { return ((val / total) * 100).toFixed(1) + '%' }" />
|
:formatter="(val) => { return totalQuality == 0 ? '0%' :((val / totalQuality) * 100).toFixed(1)||0 + '%' }" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2">
|
<el-col :span="2">
|
||||||
<el-statistic :title="tLang('quality', '产品完成量')" :value="total" />
|
<el-statistic :title="tLang('quality', '产品完成量')" :value="totalQuality" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="download" size="mini" @click="handleExport"
|
<el-button type="warning" plain icon="download" size="mini" @click="handleExport"
|
||||||
@ -178,6 +178,7 @@ const columns = ref([
|
|||||||
|
|
||||||
let qualifiedRate = ref(1)
|
let qualifiedRate = ref(1)
|
||||||
let unqualifiedRate = ref(1)
|
let unqualifiedRate = ref(1)
|
||||||
|
let totalQuality = ref(1)
|
||||||
/** 查询设备信息列表 */
|
/** 查询设备信息列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@ -185,6 +186,7 @@ function getList() {
|
|||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
qualifiedRate.value = response.data.on
|
qualifiedRate.value = response.data.on
|
||||||
unqualifiedRate.value = response.data.off
|
unqualifiedRate.value = response.data.off
|
||||||
|
totalQuality.value = response.data.total
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
listQuality(queryParams).then(response => {
|
listQuality(queryParams).then(response => {
|
||||||
|
Loading…
Reference in New Issue
Block a user