¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-card class="box-card" > |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" > |
| | | <el-form-item label-width="120" label="ç®±ä½ç¼ç :" prop="sfcCode"> |
| | | <el-input clearable |
| | | v-model="queryParams.sfcCode" |
| | | placeholder="请è¾å
¥ç®±ä½ç¼ç " |
| | | @keyup.enter.native="handleQuery"/> |
| | | </el-form-item> |
| | | <el-form-item label-width="120" label="å·¥ä½å·:" prop="locationCode"> |
| | | <el-input clearable |
| | | v-model="queryParams.locationCode" |
| | | placeholder="请è¾å
¥å·¥ä½å·" |
| | | @keyup.enter.native="handleQuery"/> |
| | | </el-form-item> |
| | | <el-form-item label-width="120" label="ééæ¶é´" prop="startDate"> |
| | | <el-date-picker |
| | | v-model="dateRange" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item style="float: right"> |
| | | <el-button type="primary" icon="el-icon-refresh" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button type="" icon="el-icon-refresh" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <el-card style="margin-top: 10px" class="box-card"> |
| | | <el-table v-loading="loading" border :data="tightenReportList" @selection-change="handleSelectionChange" v-if="tightenReportList.length > 0"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="ç®±ä½ç¼ç " align="center" width="200" prop="sfcCode"></el-table-column> |
| | | <el-table-column label="å·¥ä½" align="center" prop="locationCode"></el-table-column> |
| | | <el-table-column label="åæ°ç¼ç " align="center" prop="paramCode"></el-table-column> |
| | | <el-table-column label="åæ°åç§°" align="center" prop="paramName"></el-table-column> |
| | | <el-table-column label="åæ°å¼" align="center" prop="paramValue"></el-table-column> |
| | | <el-table-column label="ééæ¶é´" align="center" prop="collectionTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ" align="center" prop="state"></el-table-column> |
| | | <el-table-column label="åä½" align="center" prop="unit"></el-table-column> |
| | | </el-table> |
| | | <el-empty v-else> |
| | | <span slot="description">ææ æ°æ®</span> |
| | | </el-empty> |
| | | </el-card> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { listParamCollection, getParamCollection, delParamCollection, addParamCollection, updateParamCollection } from "@/api/main/da/paramCollection/paramCollection"; |
| | | export default { |
| | | name: "index", |
| | | computed: { |
| | | }, |
| | | dicts: ['sys_normal_disable','order_scheduling_produce_status','print_status'], |
| | | components: { |
| | | }, |
| | | data(){ |
| | | return{ |
| | | dateRange: '', |
| | | // ç¨äºåå¨éæ©çæ¥æèå´ |
| | | total: 0, |
| | | ids: [], |
| | | tightenReportList: [], |
| | | loading: true, |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | workOrderNo: null, |
| | | sfcCode: null, |
| | | productCode: null, |
| | | productionLine: null, |
| | | locationCode: null, |
| | | equipmentNo: null, |
| | | paramCode: null, |
| | | paramValue: null, |
| | | paramUpper: null, |
| | | paramLower: null, |
| | | paramStandard: null, |
| | | collectionTime: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | state: null, |
| | | paramName: null, |
| | | unit: null, |
| | | type: 'æ§ç´§æ°æ®', |
| | | startDate: null, |
| | | endDate: null |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | |
| | | // async fetchData() { |
| | | // // æå»ºAPI请æ±çURLï¼ä½¿ç¨éæ©çæ¥æèå´ä½ä¸ºæ¥è¯¢åæ° |
| | | // const url = `@/api/main/da/paramCollection/paramCollection?startDate=${this.dateRange[0]}&endDate=${this.dateRange[1]}`; |
| | | // |
| | | // try { |
| | | // // åéAPI请æ±ï¼è·åæ¥è¯¢ç»æ |
| | | // const response = await fetch(url); |
| | | // const data = await response.json(); |
| | | // console.log(data); // å¤çæ¥è¯¢ç»æï¼æ¯å¦å¨æ§å¶å°è¾åºææ¾ç¤ºå¨é¡µé¢ä¸ |
| | | // } catch (error) { |
| | | // console.error('Error fetching data:', error); |
| | | // } |
| | | // }, |
| | | // }, |
| | | |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | workOrderNo: null, |
| | | sfcCode: null, |
| | | productCode: null, |
| | | productionLine: null, |
| | | locationCode: null, |
| | | equipmentNo: null, |
| | | paramCode: null, |
| | | paramValue: null, |
| | | paramUpper: null, |
| | | paramLower: null, |
| | | paramStandard: null, |
| | | collectionTime: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | state: null, |
| | | paramName: null, |
| | | unit: null, |
| | | type: 'æ§ç´§æ°æ®', |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length !== 1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | |
| | | getList() { |
| | | this.loading = true; |
| | | listParamCollection(this.queryParams).then(response => { |
| | | this.tightenReportList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | ::v-deep .el-form-item__label{ |
| | | font-size: large; |
| | | } |
| | | ::v-deep .el-card__body{ |
| | | padding: 15px 20px 0px 20px; |
| | | } |
| | | </style> |