春风项目四线(合箱线、总装线)
wujian
2024-01-31 c74dcb8dca7b9e3eded0d20299f19a26a6b70974
提交 | 用户 | 时间
2fd52d 1 <template>
H 2   <div class="app-container">
3     <el-card class="box-card" >
4       <el-form :model="queryParams" ref="queryForm" :inline="true"  v-show="showSearch" label-width="68px" >
5         <el-form-item label-width="120" label="箱体编码:" prop="sfcCode">
6           <el-input clearable
7                     v-model="queryParams.sfcCode"
8                     placeholder="请输入箱体编码"
9                     @keyup.enter.native="handleQuery"/>
10         </el-form-item>
11         <el-form-item label-width="120" label="工位号:" prop="locationCode">
12           <el-input clearable
13                     v-model="queryParams.locationCode"
14                     placeholder="请输入工位号"
15                     @keyup.enter.native="handleQuery"/>
16         </el-form-item>
17         <el-form-item label-width="130" label="保存日期" prop="dateConditions">
18           <el-date-picker
19             v-model="queryParams.dateConditions"
20             type="datetimerange"
21             :picker-options="pickerOptions"
22             value-format="yyyy-MM-dd HH:mm:ss"
23             range-separator="至"
24             start-placeholder="开始日期"
25             end-placeholder="结束日期"
26             align="right">
27           </el-date-picker>
28         </el-form-item>
29         <el-form-item style="float: right">
30           <el-button type="primary" icon="el-icon-refresh" @click="handleQuery">查询</el-button>
31           <el-button type=""    icon="el-icon-refresh"  @click="resetQuery">重置</el-button>
32         </el-form-item>
33       </el-form>
34     </el-card> <el-card style="margin-top: 10px" class="box-card">
35     <el-table v-loading="loading" border :data="refuelDataReportList" @selection-change="handleSelectionChange" v-if="refuelDataReportList.length > 0">
36       <el-table-column type="selection" width="55" align="center" />
37       <el-table-column label="箱体编码" align="center" width="200" prop="sfcCode"></el-table-column>
38       <el-table-column label="工位" align="center" prop="locationCode"></el-table-column>
39       <el-table-column label="参数名称" align="center" prop="paramName"></el-table-column>
573023 40       <el-table-column label="参数编码" align="center" prop="paramCode"></el-table-column>
2fd52d 41       <el-table-column label="参数值" align="center" prop="paramValue"></el-table-column>
573023 42       <el-table-column label="单位" align="center" prop="unit"></el-table-column>
H 43       <el-table-column label="结果" align="center" prop="state"></el-table-column>
2fd52d 44       <el-table-column label="采集时间" align="center" prop="collectionTime" width="180">
H 45         <template slot-scope="scope">
46           <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
47         </template>
48       </el-table-column>
49     </el-table>
50     <el-empty v-else>
51       <span slot="description">暂无数据</span>
52     </el-empty>
53   </el-card>
54
55     <pagination
56       v-show="total>0"
57       :total="total"
58       :page.sync="queryParams.pageNum"
59       :limit.sync="queryParams.pageSize"
60       @pagination="getList"
61     />
62
63   </div>
64 </template>
65 <script>
66
67 import { listParamCollection, getParamCollection, delParamCollection, addParamCollection, updateParamCollection } from "@/api/main/da/paramCollection/paramCollection";
68
69 export default {
70   name: "refuelData",
71   computed: {
72   },
73   dicts: ['sys_normal_disable','order_scheduling_produce_status','print_status'],
74   components: {
75   },
76   data(){
77     return{
78       dateRange: '',
79       // 用于存储选择的日期范围
80       total: 0,
81       ids: [],
82       refuelDataReportList: [],
83       loading: true,
84       single: true,
85       // 非多个禁用
86       multiple: true,
87       // 显示搜索条件
88       showSearch: true,
89       // 查询参数
90       queryParams: {
91         pageNum: 1,
92         pageSize: 10,
93         workOrderNo: null,
94         sfcCode: null,
95         productCode: null,
96         productionLine: null,
97         locationCode: null,
98         equipmentNo: null,
99         paramCode: null,
100         paramValue: null,
101         paramUpper: null,
102         paramLower: null,
103         paramStandard: null,
104         collectionTime: null,
105         spareField1: null,
106         spareField2: null,
107         createUser: null,
108         createTime: null,
109         updateUser: null,
110         updateTime: null,
111         state: null,
112         paramName: null,
113         unit: null,
114         type: '机油加注数据',
115         startDate: null,
116         endDate: null,
117         dateConditions: [],
118       },
119       pickerOptions: {
120         shortcuts: [{
121           text: '最近一周',
122           onClick(picker) {
123             const end = new Date();
124             const start = new Date();
125             start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
126             picker.$emit('pick', [start, end]);
127           }
128         }, {
129           text: '最近一个月',
130           onClick(picker) {
131             const end = new Date();
132             const start = new Date();
133             start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
134             picker.$emit('pick', [start, end]);
135           }
136         }, {
137           text: '最近三个月',
138           onClick(picker) {
139             const end = new Date();
140             const start = new Date();
141             start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
142             picker.$emit('pick', [start, end]);
143           }
144         }]
145       },
146     }
147   },
148   created() {
149     this.getList();
150   },
151   methods: {
152
153     reset() {
154       this.form = {
155         id: null,
156         workOrderNo: null,
157         sfcCode: null,
158         productCode: null,
159         productionLine: null,
160         locationCode: null,
161         equipmentNo: null,
162         paramCode: null,
163         paramValue: null,
164         paramUpper: null,
165         paramLower: null,
166         paramStandard: null,
167         collectionTime: null,
168         spareField1: null,
169         spareField2: null,
170         createUser: null,
171         createTime: null,
172         updateUser: null,
173         updateTime: null,
174         state: null,
175         paramName: null,
176         unit: null,
177         type: '机油加注数据',
178       };
179       this.resetForm("form");
180     },
181     /** 搜索按钮操作 */
182     handleQuery() {
183       this.queryParams.pageNum = 1;
184       this.getList();
185     },
186     /** 重置按钮操作 */
187     resetQuery() {
188       this.resetForm("queryForm");
189       this.handleQuery();
190     },
191     // 多选框选中数据
192     handleSelectionChange(selection) {
193       this.ids = selection.map(item => item.id)
194       this.single = selection.length !== 1
195       this.multiple = !selection.length
196     },
197
198     getList() {
199       this.loading = true;
200       listParamCollection(this.queryParams).then(response => {
201         this.refuelDataReportList = response.rows;
202         this.total = response.total;
203         this.loading = false;
204       });
205     },
206
207   },
208 }
209
210 </script>
211
212 <style scoped>
213 ::v-deep .el-form-item__label{
214   font-size: large;
215 }
216 ::v-deep .el-card__body{
217   padding: 15px 20px 0px 20px;
218 }
219 </style>