|
@@ -49,6 +49,14 @@
|
|
|
<div class="bg"></div>
|
|
|
样本数据录入
|
|
|
</div>
|
|
|
+ <div class="header" v-show="!addStatus && !editStatus">
|
|
|
+ <Search
|
|
|
+ :searchOptions="searchForm"
|
|
|
+ ref="searchRef"
|
|
|
+ @dataList="getTableData"
|
|
|
+ @resetList="reset"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
<div class="btns">
|
|
|
<!-- <el-button
|
|
|
v-if="!editStatus && !addStatus"
|
|
@@ -60,6 +68,7 @@
|
|
|
<el-button
|
|
|
v-if="!addStatus && !editStatus"
|
|
|
type="primary"
|
|
|
+ size="small"
|
|
|
class="btn"
|
|
|
@click="changeaddstatus"
|
|
|
>新增</el-button
|
|
@@ -67,6 +76,7 @@
|
|
|
<el-button
|
|
|
v-if="editStatus || addStatus"
|
|
|
type="success"
|
|
|
+ size="small"
|
|
|
class="btn"
|
|
|
@click="submit"
|
|
|
>确定</el-button
|
|
@@ -74,23 +84,11 @@
|
|
|
<el-button
|
|
|
v-if="editStatus || addStatus"
|
|
|
type="info"
|
|
|
+ size="small"
|
|
|
class="btn"
|
|
|
@click="canceleOp"
|
|
|
>取消</el-button
|
|
|
- ><span v-if="!addStatus && !editStatus" style="margin: 10px"
|
|
|
- >年份:</span
|
|
|
>
|
|
|
- <el-date-picker
|
|
|
- v-if="!addStatus && !editStatus"
|
|
|
- v-model="year"
|
|
|
- class="btn"
|
|
|
- type="year"
|
|
|
- style="width: 160px"
|
|
|
- placeholder="Pick a year"
|
|
|
- value-format="YYYY"
|
|
|
- :clear-icon="''"
|
|
|
- @change="getTableData"
|
|
|
- />
|
|
|
</div>
|
|
|
<!-- 导入代码 -->
|
|
|
<!-- <div class="btns">
|
|
@@ -266,6 +264,7 @@
|
|
|
<template #default="{ row }">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
+ size="small"
|
|
|
class="btn"
|
|
|
@click="updataItem(row)"
|
|
|
style="height: 25px"
|
|
@@ -273,6 +272,7 @@
|
|
|
>
|
|
|
<el-button
|
|
|
type="info"
|
|
|
+ size="small"
|
|
|
class="btn"
|
|
|
style="height: 25px"
|
|
|
@click="deleteSubmit(row.id)"
|
|
@@ -306,7 +306,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy1"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -323,7 +323,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy1"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -340,7 +340,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy1"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -358,7 +358,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy1"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -375,7 +375,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy2"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -391,7 +391,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy3"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -407,7 +407,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy4"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -423,7 +423,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy5"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -434,7 +434,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy1"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -445,7 +445,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy1"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -456,7 +456,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy1"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -471,7 +471,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy1"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -483,7 +483,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy1"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -495,7 +495,7 @@
|
|
|
<template #default="{ row }"
|
|
|
>
|
|
|
<el-input-number
|
|
|
-
|
|
|
+
|
|
|
v-model="row.accuracy1"
|
|
|
:precision="2"
|
|
|
:step="0.01"
|
|
@@ -634,6 +634,7 @@
|
|
|
import * as echarts from "echarts";
|
|
|
import { useDictionaryStore } from "@/store";
|
|
|
import { getData, addDatas, deleteData, updateData } from "@/api/analysis";
|
|
|
+import Search from "@/components/Search/index.vue";
|
|
|
const year = ref("0");
|
|
|
const currentOption = reactive({
|
|
|
total: 0,
|
|
@@ -642,11 +643,13 @@ const currentOption = reactive({
|
|
|
pageSizes: [12],
|
|
|
});
|
|
|
const lableValue = ref("");
|
|
|
+const searchRef = ref(null);
|
|
|
const getTableData = async () => {
|
|
|
const { data, code, msg } = await getData({
|
|
|
+ ...searchRef.value.searchForm,
|
|
|
pageNo: currentOption.page,
|
|
|
pageSize: currentOption.limit,
|
|
|
- yearStr: year.value,
|
|
|
+ // yearStr: year.value,
|
|
|
operation: lableValue.value,
|
|
|
});
|
|
|
if (code == "200") {
|
|
@@ -662,6 +665,23 @@ const getTableData = async () => {
|
|
|
}
|
|
|
disabled.value = false;
|
|
|
};
|
|
|
+const searchForm = [
|
|
|
+ {
|
|
|
+ label: "创建时间",
|
|
|
+ prop: "created",
|
|
|
+ type: "daterange",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "产品型号",
|
|
|
+ prop: "model",
|
|
|
+ type: "input",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "生产批号",
|
|
|
+ prop: "batchNo",
|
|
|
+ type: "input",
|
|
|
+ },
|
|
|
+];
|
|
|
//编辑状态
|
|
|
const editStatus = ref(false);
|
|
|
const addStatus = ref(false);
|
|
@@ -1312,6 +1332,7 @@ const reset = () => {
|
|
|
addStatus.value = false;
|
|
|
editStatus.value = false;
|
|
|
addData.value = { ...resItem };
|
|
|
+ searchRef.value.searchForm = {};
|
|
|
currentOption.value = {
|
|
|
total: 0,
|
|
|
page: 0,
|
|
@@ -1319,6 +1340,7 @@ const reset = () => {
|
|
|
pageSizes: [12],
|
|
|
operation: value.value,
|
|
|
};
|
|
|
+ getTableData();
|
|
|
};
|
|
|
const setView = () => {
|
|
|
setHeight();
|
|
@@ -1386,23 +1408,31 @@ onBeforeUnmount(() => {
|
|
|
margin: 10px 0;
|
|
|
padding-right: 40px;
|
|
|
}
|
|
|
- .title {
|
|
|
- height: 30px;
|
|
|
+ .header {
|
|
|
+ margin-top: 20px;
|
|
|
+ //margin-left: 100px;
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
- margin-bottom: 10px;
|
|
|
- justify-content: space-between;
|
|
|
- .btns {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- .btn {
|
|
|
- height: 24px;
|
|
|
- font-size: 14px;
|
|
|
- margin: 0 5px;
|
|
|
- }
|
|
|
- }
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
}
|
|
|
+ //.title {
|
|
|
+ // height: 50px;
|
|
|
+ // display: flex;
|
|
|
+ // align-items: center;
|
|
|
+ // margin-bottom: 10px;
|
|
|
+ // justify-content: space-between;
|
|
|
+ // .btns {
|
|
|
+ // display: flex;
|
|
|
+ // align-items: center;
|
|
|
+ // .btn {
|
|
|
+ // height: 24px;
|
|
|
+ // font-size: 14px;
|
|
|
+ // margin: 0 5px;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
.info {
|
|
|
+ margin-top: 20px;
|
|
|
flex: 1;
|
|
|
height: 300px;
|
|
|
}
|