new file: src/api/experiment/passRateStatistics.js
modified: src/api/laboratory/measure.js
modified: src/layout/components/Sidebar/Logo.vue
modified: src/views/experiment/passRateStatistics/index.vue
modified: src/views/laboratory/measure/index.vue
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | export function getSupplierList(params) { |
| | | return request({ |
| | | url: '/qualificationRate/getSupplierList', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ ·ååæ ¼ç |
| | | * @param {} params |
| | | * @returns |
| | | */ |
| | | export function getTestSampleStatistics(params) { |
| | | return request({ |
| | | url: '/qualificationRate/getTestSampleStatistics', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | /** |
| | | * ä¾åºååæ ¼ç |
| | | * @param {} params |
| | | * @returns |
| | | */ |
| | | export function getSupplierNoPassStatistics(params) { |
| | | return request({ |
| | | url: '/qualificationRate/getSupplierNoPassStatistics', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 项ç®åæ ¼ç |
| | | * @param {} params |
| | | * @returns |
| | | */ |
| | | export function getNoPassProjectStatistics(params) { |
| | | return request({ |
| | | url: '/qualificationRate/getNoPassProjectStatistics', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | |
| | | data |
| | | }) |
| | | } |
| | | //ä¿®æ¹è®¡é |
| | | export function updateMetricalInformationInfo(data) { |
| | | return request({ |
| | | url: '/metrical-information/updateMetricalInformationInfo', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | width: 100%; |
| | | height: 50px; |
| | | line-height: 50px; |
| | | background: #fff; |
| | | background: #f8f8f8; |
| | | text-align: center; |
| | | overflow: hidden; |
| | | |
| | |
| | | <div class="top-bar"> |
| | | <el-form ref="form" :inline="true" :rules="rules" :model="searchData" label-position="top"> |
| | | <el-form-item label="æ£æµæ¥æ:" class="sermargin" prop="date"> |
| | | <el-date-picker |
| | | v-model="searchData.date" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | <el-date-picker v-model="searchData.date" type="daterange" range-separator="è³" start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªç±»å:" class="sermargin" prop="type"> |
| | | <el-select v-model="searchData.type" placeholder="å
¨é¨"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æåç»:"> |
| | | <el-button type="primary" icon="el-icon-plus" class="chooseMaterialBtn" >éæ©ç©æåç»</el-button> |
| | | <el-form-item label="ä¾åºå:"> |
| | | <el-select v-model="searchData.supplier" placeholder="å
¨é¨"> |
| | | <el-option v-for="item in supplier" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div class="rightBtn"> |
| | | <el-form-item> |
| | |
| | | <div class="top-bar-copy"></div> |
| | | <div class="chart-content"> |
| | | <div class="qualified-wrapper"> |
| | | <div style="margin-left: 20px;padding:20px 0px;font-size:18px">æ£æµæ¹æ¬¡åæ ¼çç»è®¡</div> |
| | | <div style="margin-left: 20px;padding:20px 0px;font-size:18px">æ£æµæ ·ååæ ¼çç»è®¡</div> |
| | | <div class="qualified" ref="qualified"></div> |
| | | </div> |
| | | <div class="unqualified"> |
| | |
| | | <div class="secondBox_header"> |
| | | <div style="font-size:18px">ä¸åæ ¼é¡¹ç®ç»è®¡</div> |
| | | <el-radio-group v-model="type"> |
| | | <el-radio-button v-for="item in radiooptions" :key="item.value" :label="item.value" >{{ item.label }}</el-radio-button> |
| | | <el-radio-button v-for="item in radiooptions" :key="item.value" :label="item.value">{{ item.label |
| | | }}</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="secondBox" ref="unqualified_project"></div> |
| | |
| | | }) |
| | | |
| | | import * as echarts from 'echarts' |
| | | import { getSupplierList,getTestSampleStatistics,getSupplierNoPassStatistics,getNoPassProjectStatistics } from '@/api/experiment/passRateStatistics'; |
| | | import { dateFormat } from '../../../utils/dateUtil' |
| | | export default { |
| | | data(){ |
| | | return { |
| | | supplier: [], |
| | | searchData:{ |
| | | date: [], |
| | | type: 0, |
| | | group: '' |
| | | type: null, |
| | | supplier: null |
| | | }, |
| | | options:[ |
| | | { |
| | | label: 'éè´å
¥åº', |
| | | label: 'åææ', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: 'xxxx', |
| | | label: 'æå', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: 'å§æå', |
| | | value: 2 |
| | | } |
| | | ], |
| | | radiooptions:[ |
| | |
| | | ], |
| | | type: 0, |
| | | rules: { |
| | | date: [{required: true, message: '请è¾å
¥è´¦å·', trigger: 'blur'}], |
| | | type: [{required: true, message: '请è¾å
¥åå', trigger: 'blur'}] |
| | | // date: [{ required: true, message: '请è¾å
¥è´¦å·', trigger: 'blur' }], |
| | | // type: [{ required: true, message: '请è¾å
¥åå', trigger: 'blur' }] |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getSupplierList() |
| | | this.getTestSampleStatistics() |
| | | this.getSupplierNoPassStatistics() |
| | | const chartDom_qualified = this.$refs.qualified; |
| | | const chartDom_unqualified_provider = this.$refs.unqualified_provider; |
| | | const chartDom_unqualified_project = this.$refs.unqualified_project; |
| | |
| | | const myChart2 = echarts.init(chartDom_unqualified_provider); |
| | | const myChart3 = echarts.init(chartDom_unqualified_project); |
| | | |
| | | /** |
| | | * æ£æµåæ ¼çç»è®¡ |
| | | */ |
| | | const option_qualified = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | } |
| | | ] |
| | | }; |
| | | /** |
| | | * ä¾åºå |
| | | */ |
| | | const option_unqualified1 ={ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | } |
| | | ] |
| | | }; |
| | | /** |
| | | * ä¸åæ ¼é¡¹ç® |
| | | */ |
| | | const option_unqualified2 = { |
| | | legend: { |
| | | orient: 'vertical', |
| | |
| | | if(this.type === 1){ |
| | | myChart3.setOption(option_unqualified2); |
| | | } |
| | | }, |
| | | methods: { |
| | | search() { |
| | | this.getTestSampleStatistics() |
| | | }, |
| | | dateHandle(){ |
| | | let data=JSON.parse(JSON.stringify(this.searchData)) |
| | | if(this.searchData.date.length!=0&&this.searchData.date !=[]){ |
| | | data.beginDate=dateFormat(this.searchData.date[0]) |
| | | data.endDate=dateFormat(this.searchData.date[1]) |
| | | } |
| | | data.date=null |
| | | return data |
| | | }, |
| | | async getSupplierList() { |
| | | let res = await getSupplierList() |
| | | res.data.forEach(item => { |
| | | this.supplier.push({ label: item.supplier, value: item.supplier }) |
| | | }) |
| | | }, |
| | | getTestSampleStatistics(){ |
| | | let param= this.dateHandle() |
| | | let res =getTestSampleStatistics(param) |
| | | }, |
| | | getSupplierNoPassStatistics(){ |
| | | let param= this.dateHandle() |
| | | getSupplierNoPassStatistics(param) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | .content-main{ |
| | | height:100%; |
| | | width: 100%; |
| | | |
| | | .top-bar{ |
| | | position: absolute; |
| | | width: 99%; |
| | |
| | | justify-content: space-between; |
| | | padding: 5px 24px 0px 24px; |
| | | transition: position 0.3s ease; |
| | | |
| | | .el-form{ |
| | | width: 100%; |
| | | |
| | | .chooseMaterialBtn{ |
| | | background-color: #fff; |
| | | border-color: rgba(192,196,204,0.5); |
| | |
| | | width: 220px; |
| | | } |
| | | } |
| | | |
| | | .sermargin{ |
| | | margin-right: 60px; |
| | | } |
| | | |
| | | .rightBtn{ |
| | | display:flex; |
| | | justify-content:end; |
| | |
| | | margin-bottom: -10px; |
| | | } |
| | | } |
| | | |
| | | .top-bar.fixed { |
| | | position: fixed; |
| | | top: 0.45rem; |
| | | left: 0.52rem; |
| | | width:93.8%; |
| | | } |
| | | |
| | | .top-bar-copy{ |
| | | width: 100%; |
| | | height: 12vh; |
| | | } |
| | | |
| | | .chart-content{ |
| | | margin: 0px -15px; |
| | | margin-bottom: 60px; |
| | | |
| | | .qualified-wrapper{ |
| | | // margin-top: 14vh; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | height:50vh; |
| | | } |
| | | |
| | | .qualified{ |
| | | width: 100%; |
| | | height: 400px; |
| | | } |
| | | |
| | | .unqualified{ |
| | | margin-top: 10px; |
| | | height: 50vh; |
| | | display:flex; |
| | | justify-content: space-between; |
| | | |
| | | .firstBox-wrapper{ |
| | | background-color: #fff; |
| | | width:49%; |
| | | |
| | | .firstBox{ |
| | | width: 100%; |
| | | height: 40vh; |
| | | } |
| | | } |
| | | |
| | | .secondBox-wrapper{ |
| | | background-color:#fff; |
| | | width:49%; |
| | | |
| | | .secondBox_header{ |
| | | display:flex; |
| | | justify-content: space-between; |
| | | margin: 20px 20px; |
| | | } |
| | | |
| | | .secondBox{ |
| | | width: 100%; |
| | | height: 40vh; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .bottom{ |
| | | position: fixed; |
| | | width: 95%; |
| | |
| | | <el-form label-position="top" ref="upmeasureForm" :model="measureUpInfo"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="æ£å®æææ" prop="date" :rules="[{ required: true, message: 'è¯·éæ©æ£å®æææ', trigger: 'change' }]"> |
| | | <el-date-picker v-model="measureUpInfo.date" type="daterange" range-separator="è³" start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" /> |
| | | <el-form-item label="æ£å®æææ" prop="date" |
| | | :rules="[{ required: true, message: 'è¯·éæ©æ£å®æææ', trigger: 'change' }]"> |
| | | <el-date-picker v-model="measureUpInfo.date" type="date" placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label=""> |
| | | <el-upload class="upload-demo" action="#" :on-change="handleUpload" :auto-upload="false"> |
| | | <el-upload class="upload-demo" action="#" :on-change="handleUploadupdated" :auto-upload="false"> |
| | | <el-button size="small" type="primary">ç¹å»ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addMeasure">ç¡® å®</el-button> |
| | | <el-button type="primary" @click="upMeasure">ç¡® å®</el-button> |
| | | |
| | | <el-button @click="dialogVisible=false">å æ¶</el-button> |
| | | </span> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPlanPageList, getStandingPageList, getPlanMeasureInstrument, limitGetPlanMeasureRequest } from '@/api/laboratory/measure' |
| | | import { getPlanPageList, getStandingPageList, getPlanMeasureInstrument, limitGetPlanMeasureRequest, updateMetricalInformationInfo } from '@/api/laboratory/measure' |
| | | import { default as Add } from "./Add.vue"; |
| | | export default { |
| | | components: { |
| | |
| | | dialogVisible: false, |
| | | tableIndex: null, |
| | | measureUpInfo:{ |
| | | id: null, |
| | | code: null, |
| | | result: null, |
| | | date: null, |
| | | uncertainty: null, |
| | | performanceIndex: null, |
| | | remarks: null, |
| | | file: null |
| | | file: null, |
| | | termValidity: null |
| | | }, |
| | | result: [{ |
| | | label: 'åæ ¼', |
| | |
| | | this.measureData[this.tableIndex].result=this.resultUp |
| | | |
| | | }, |
| | | async upMeasure() { |
| | | let res = await updateMetricalInformationInfo(this.measureUpInfo) |
| | | if (res) { |
| | | this.$message({ |
| | | message: 'æä½æåï¼', |
| | | type: 'success' |
| | | }); |
| | | this.limitGetPlanMeasureInstrument() |
| | | this.dialogVisible = false |
| | | } |
| | | }, |
| | | handleUploadupdated() { |
| | | |
| | | }, |
| | | measureUp(scope) { |
| | | console.log(scope); |
| | | this.dialogVisible = true |
| | | this.tableIndex=scope.$index |
| | | this.measureUpInfo.result=scope.row.result |
| | | this.measureUpInfo.code = scope.row.code |
| | | this.measureUpInfo.date = scope.row.endDate |
| | | this.measureUpInfo.id = scope.row.imId |
| | | this.measureUpInfo.uncertainty = scope.row.uncertainty |
| | | this.measureUpInfo.performanceIndex = scope.row.performanceIndex |
| | | this.measureUpInfo.remarks = scope.row.remarks |
| | | this.measureUpInfo.termValidity = scope.row.termValidity |
| | | }, |
| | | measureAdd() { |
| | | let add = this.$refs.add.add() |
| | |
| | | } |
| | | }, |
| | | async handleSizeChangePlan(num) { |
| | | console.log(num); |
| | | this.pageSizePlan = num |
| | | await this.limitGetPlanMeasureInstrument() |
| | | }, |
| | |
| | | currentPage: this.currentPagePlan, |
| | | pageSize: this.pageSizePlan |
| | | } |
| | | console.log(param); |
| | | let res = await limitGetPlanMeasureRequest(param) |
| | | this.totalPlan = res.data.taotal |
| | | this.measureData = res.data.list |
| | |
| | | }, |
| | | async getPlanAndInfoAndIns(id) { |
| | | let res = await getPlanMeasureInstrument({ "id": id, "currentPage": this.currentPagePlan, "pageSize": this.pageSize }); |
| | | console.log(res); |
| | | for (const key in res.data.list) { |
| | | this.planInfo[key] = res.data.list[key] |
| | | } |
| | |
| | | }, |
| | | blurSearch() { |
| | | if (this.radioValue === 1) { |
| | | console.log("计å"); |
| | | } |
| | | }, |
| | | handleClose() { |
| | |
| | | currentPage: this.currentPage, pageSize: this.pageSize, |
| | | code: this.searchData.code, name: this.searchData.name, unit: this.searchData.measureunit |
| | | } |
| | | console.log(param); |
| | | const res = await getStandingPageList(param) |
| | | this.measureLedgerTable = res.data.records |
| | | this.total = res.data.total |
| | |
| | | currentPage: this.currentPage, pageSize: this.pageSize, |
| | | code: this.searchData.code, name: this.searchData.name, unit: this.searchData.measureunit |
| | | } |
| | | console.log(param); |
| | | const res = await getPlanPageList(param) |
| | | res.data.list.forEach(item => { |
| | | item.palanDate = item.beginTime + " ~ " + item.endTime |
| | |
| | | this.total = res.data.total |
| | | }, |
| | | async lookMeasurement(code) { |
| | | console.log(code); |
| | | }, |
| | | } |
| | | } |