春风项目四线(合箱线、总装线)
jiang
2024-01-25 901b68695fcdab7e3ff1d5df3df88bd5001b0181
提交 | 用户 | 时间
b51361 1 <template>
W 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>
8ae9df 17         <el-form-item label-width="130" label="保存日期" prop="dateConditions">
H 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>
b51361 28         </el-form-item>
W 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>
35
36     <el-card style="margin-top: 10px" class="box-card">
37       <el-table v-loading="loading" border :data="tightenReportList" @selection-change="handleSelectionChange" v-if="tightenReportList.length > 0">
38         <el-table-column type="selection" width="55" align="center" />
39         <el-table-column label="箱体编码" align="center" width="200" prop="sfcCode"></el-table-column>
40         <el-table-column label="工位" align="center" prop="locationCode"></el-table-column>
41         <el-table-column label="参数编码" align="center" prop="paramCode"></el-table-column>
42         <el-table-column label="参数名称" align="center" prop="paramName"></el-table-column>
43         <el-table-column label="参数值" align="center" prop="paramValue"></el-table-column>
44         <el-table-column label="采集时间" align="center" prop="collectionTime" width="180">
45           <template slot-scope="scope">
a0aea8 46             <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
b51361 47           </template>
W 48         </el-table-column>
49         <el-table-column label="状态" align="center" prop="state"></el-table-column>
50         <el-table-column label="单位" align="center" prop="unit"></el-table-column>
51       </el-table>
52       <el-empty v-else>
53         <span slot="description">暂无数据</span>
54       </el-empty>
55     </el-card>
56
57     <pagination
58       v-show="total>0"
59       :total="total"
60       :page.sync="queryParams.pageNum"
61       :limit.sync="queryParams.pageSize"
62       @pagination="getList"
63     />
64
65   </div>
66 </template>
67 <script>
68 import { listParamCollection, getParamCollection, delParamCollection, addParamCollection, updateParamCollection } from "@/api/main/da/paramCollection/paramCollection";
69 export default {
70   name: "index",
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       tightenReportList: [],
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,
8ae9df 116         endDate: null,
H 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         }]
b51361 145       },
W 146     }
147   },
148   created() {
149     this.getList();
150   },
db8f36 151   methods: {
b51361 152
db8f36 153     reset() {
b51361 154       this.form = {
W 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)
db8f36 194       this.single = selection.length !== 1
b51361 195       this.multiple = !selection.length
W 196     },
197
198     getList() {
199       this.loading = true;
200       listParamCollection(this.queryParams).then(response => {
201         this.tightenReportList = response.rows;
202         this.total = response.total;
203         this.loading = false;
204       });
205     },
206
db8f36 207   },
b51361 208 }
db8f36 209
b51361 210 </script>
W 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>