Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev
¶Ô±ÈÐÂÎļþ |
| | |
| | | // ç»è®¡å¾è¡¨ |
| | | import request from "@/utils/request"; |
| | | |
| | | //åæ ¼çç»è®¡ |
| | | export function getRawPassRateByBarChart(query) { |
| | | return request({ |
| | | url: "/dataAnalysis/getRawPassRateByBarChart", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //åææç»è®¡ |
| | | export function getRawPassRateByCake(query) { |
| | | return request({ |
| | | url: "/dataAnalysis/getRawPassRateByCake", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //æ¬ææ£éªç±»åæ°é |
| | | export function getOrderTypeCookie() { |
| | | return request({ |
| | | url: "/dataAnalysis/getOrderTypeCookie", |
| | | method: "get", |
| | | }); |
| | | } |
| | | //æ¬ææ£éªç±»åæ°é |
| | | export function getRawUpMonth() { |
| | | return request({ |
| | | url: "/dataAnalysis/getRawUpMonth", |
| | | method: "get", |
| | | }); |
| | | } |
| | | //æ¥è¯¢åææé¡¹æ£åæ |
| | | export function getRawProductAnalysis(query) { |
| | | return request({ |
| | | url: "/dataAnalysis/getRawProductAnalysis", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | //æ¥è¯¢åææé¡¹æ£åæåæ ¼ç |
| | | export function getRawProductAnalysisRawPass(query) { |
| | | return request({ |
| | | url: "/dataAnalysis/getRawProductAnalysisRawPass", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | //æ¥è¯¢åææé¡¹æ£åæå表 |
| | | export function getRawProductAnalysisAllList(query) { |
| | | return request({ |
| | | url: "/dataAnalysis/getRawProductAnalysisAllList", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | //æ¥è¯¢æ£éªé¡¹ |
| | | export function getRawItemNames(query) { |
| | | return request({ |
| | | url: "/dataAnalysis/getRawItemNames", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //æ¥è¯¢åææé¡¹æ£ååå®¶æ°æ®å¯¹æ¯ |
| | | export function getRawSupplierCompare(query) { |
| | | return request({ |
| | | url: "/dataAnalysis/getRawSupplierCompare", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px;text-align: left;">æ°æ®åæ</el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-button size="medium" @click="$emit('goBack')">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="container"> |
| | | <div> |
| | | <div style="padding: 0 0 10px 10px">å¡«ååå®¶æ°æ®</div> |
| | | <el-form ref="supplierForm" :model="supplierForm" :rules="rules" class="demo-ruleForm" label-width="40px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="3"> |
| | | <el-form-item label="1ï¼" prop="one"> |
| | | <el-input v-model="supplierForm.one" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-form-item label="2ï¼" prop="two"> |
| | | <el-input v-model="supplierForm.two" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-form-item label="3ï¼" prop="three"> |
| | | <el-input v-model="supplierForm.three" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-form-item label="4ï¼" prop="four"> |
| | | <el-input v-model="supplierForm.four" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-form-item label="5ï¼" prop="five"> |
| | | <el-input v-model="supplierForm.five" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="submitForm()">æ°æ®åæ</el-button> |
| | | <el-button size="small" @click="resetForm()">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <table :border='true' class="table"> |
| | | <tr> |
| | | <th class="thTitle"> </th> |
| | | <th class="thTitle">1</th> |
| | | <th class="thTitle">2</th> |
| | | <th class="thTitle">3</th> |
| | | <th class="thTitle">4</th> |
| | | <th class="thTitle">5</th> |
| | | <th class="thTitle">å¹³åå¼</th> |
| | | <th class="thTitle">æ ååå·®</th> |
| | | <th class="thTitle">ç¸å¯¹åå·®</th> |
| | | <th class="thTitle">å¹³åæ ååå·®</th> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">åå®¶æ£æµæ°æ®</td> |
| | | <td v-for="(item,index) in supplierData" :key="index" class="tdData">{{item}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">æ£æµä¸å¿æ°æ®</td> |
| | | <td v-for="(item,index) in localData" :key="index" class="tdData">{{item}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">ç»å¯¹åå·®</td> |
| | | <td v-for="(item,index) in absoluteDeviation" :key="index" class="tdData">{{item}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">å¹³åå¼</td> |
| | | <td v-for="(item,index) in average" :key="index" class="tdData">{{item}}</td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack2">åå®¶</td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">UCL</td> |
| | | <td v-for="(item,index) in supplierULC" :key="index" class="tdData">{{item}}</td> |
| | | <td v-for="(item,index) in empty" :key="'a' + index" class="tdData"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">LCL</td> |
| | | <td v-for="(item,index) in supplierLCL" :key="index" class="tdData">{{item}}</td> |
| | | <td v-for="(item,index) in empty" :key="'b' + index" class="tdData"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">å¹³åå¼</td> |
| | | <td v-for="(item,index) in supplierAverage" :key="index" class="tdData">{{item}}</td> |
| | | <td v-for="(item,index) in empty" :key="'c' + index" class="tdData"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">æå·®</td> |
| | | <td v-for="(item,index) in supplierRange" :key="index" class="tdData">{{item}}</td> |
| | | <td v-for="(item,index) in empty" :key="'d' + index" class="tdData"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack2">æ£æµä¸å¿</td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">UCL</td> |
| | | <td v-for="(item,index) in localULC" :key="index" class="tdData">{{item}}</td> |
| | | <td v-for="(item,index) in empty" :key="'e' + index" class="tdData"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">LCL</td> |
| | | <td v-for="(item,index) in localLCL" :key="index" class="tdData">{{item}}</td> |
| | | <td v-for="(item,index) in empty" :key="'f' + index" class="tdData"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">å¹³åå¼</td> |
| | | <td v-for="(item,index) in localAverage" :key="index" class="tdData">{{item}}</td> |
| | | <td v-for="(item,index) in empty" :key="'g' + index" class="tdData"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="thBack">æå·®</td> |
| | | <td v-for="(item,index) in localRange" :key="index" class="tdData">{{item}}</td> |
| | | <td v-for="(item,index) in empty" :key="'h' + index" class="tdData"></td> |
| | | </tr> |
| | | </table> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <div class="inspection-card"> |
| | | <div class="echartsTitle">æ£æµæ°æ®å¯¹æ¯</div> |
| | | <Echarts ref="chart" |
| | | :grid="grid" |
| | | :legend="legend" |
| | | :lineColors="lineColors" |
| | | :series="echartsSeries" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis" |
| | | :yAxis="yAxis" |
| | | style="height: 40vh;"></Echarts> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="inspection-card"> |
| | | <div class="echartsTitle">æµéæ°æ®æ å差对æ¯</div> |
| | | <Echarts ref="chart" |
| | | :barColors="barColors" |
| | | :chartStyle="chartStyle" |
| | | :grid="grid" |
| | | :legend="legend1" |
| | | :series="echartsSeries1" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis1" |
| | | :yAxis="yAxis1" |
| | | style="height: 40vh;"></Echarts> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <div class="inspection-card"> |
| | | <div class="echartsTitle">åå·®åæ</div> |
| | | <Echarts ref="chart" |
| | | :grid="grid" |
| | | :legend="legend2" |
| | | :lineColors="lineColors" |
| | | :series="echartsSeries2" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis" |
| | | :yAxis="yAxis2" |
| | | style="height: 40vh;"></Echarts> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="inspection-card"> |
| | | <div class="echartsTitle">æ£æµä¸å¿æ°æ®</div> |
| | | <Echarts ref="chart" |
| | | :grid="grid" |
| | | :legend="legend" |
| | | :lineColors="lineColors" |
| | | :series="echartsSeries3" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis" |
| | | :yAxis="yAxis" |
| | | style="height: 40vh;"></Echarts> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Echarts from "./echarts.vue"; |
| | | |
| | | export default { |
| | | name: "DataComparison", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {Echarts}, |
| | | props: { |
| | | comparisonData : { |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | selectRow : { |
| | | type: Object, |
| | | default: () => {} |
| | | } |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | supplierForm: { |
| | | one: '', |
| | | two: '', |
| | | three: '', |
| | | four: '', |
| | | five: '', |
| | | }, |
| | | rules: { |
| | | one: [{ required: true, message: 'å¿
å¡«', trigger: 'blur' }], |
| | | two: [{ required: true, message: 'å¿
å¡«', trigger: 'blur' }], |
| | | three: [{ required: true, message: 'å¿
å¡«', trigger: 'blur' }], |
| | | four: [{ required: true, message: 'å¿
å¡«', trigger: 'blur' }], |
| | | five: [{ required: true, message: 'å¿
å¡«', trigger: 'blur' }], |
| | | }, |
| | | comparisonData1: {}, |
| | | supplierData: [], // åå®¶æ°æ® |
| | | localData: [], // æ£æµä¸å¿æ£æµæ°æ® |
| | | absoluteDeviation: [], // ç»å¯¹åå·® |
| | | average: [], // å¹³åå¼ |
| | | supplierULC: [], // åå®¶UCL |
| | | supplierLCL: [], // åå®¶LCL |
| | | supplierAverage: [], // åå®¶å¹³åå¼ |
| | | supplierRange: [], // åå®¶æå·® |
| | | localULC: [], // æ£æµä¸å¿UCL |
| | | localLCL: [], // æ£æµä¸å¿LCL |
| | | localAverage: [], // æ£æµä¸å¿å¹³åå¼ |
| | | localRange: [], // æ£æµä¸å¿æå·® |
| | | manufacturerData: [], |
| | | manufacturer: [ |
| | | {value: '1.1'}, |
| | | {value: '2.2'}, |
| | | {value: '3.3'}, |
| | | {value: '4.4'}, |
| | | {value: '5.5'}, |
| | | ], |
| | | testCenter: [ |
| | | {value: '1.2'}, |
| | | {value: '2.33'}, |
| | | {value: '3.64'}, |
| | | {value: '4.3'}, |
| | | {value: '5.9'}, |
| | | ], |
| | | empty: [ |
| | | {data: '1'}, |
| | | {data: '2'}, |
| | | {data: '3'}, |
| | | {data: '4'}, |
| | | ], |
| | | lineColors: ['#ed7d31', '#409EFF'], |
| | | barColors: ['#ed7d31', '#409EFF', '#a5a5a5'], |
| | | chartStyle: { |
| | | width: '100%', |
| | | height: '96%' // 设置å¾è¡¨å®¹å¨çé«åº¦ |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data: ['åå®¶æ£æµæ°æ®','æ£æµä¸å¿æ£æµæ°æ®'] |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | } |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | data: ['1', '2', '3', '4', '5'] |
| | | }], |
| | | yAxis: [{ |
| | | type: 'value' |
| | | }], |
| | | echartsSeries: [ |
| | | { |
| | | name: 'åå®¶æ£æµæ°æ®', |
| | | type: 'line', |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | }, |
| | | data: [] |
| | | }, |
| | | { |
| | | name: 'æ£æµä¸å¿æ£æµæ°æ®', |
| | | type: 'line', |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | }, |
| | | data: [] |
| | | } |
| | | ], |
| | | xAxis1: [{ |
| | | type: 'category', |
| | | data: ['åå®¶', 'æ£æµä¸å¿'] |
| | | }], |
| | | legend1: { |
| | | data: ['UCL','LCL', 'å¹³åå¼'] |
| | | }, |
| | | yAxis1: [ |
| | | { |
| | | type: 'value', |
| | | }, |
| | | ], |
| | | echartsSeries1: [ |
| | | { |
| | | name: 'UCL', |
| | | type: 'bar', |
| | | label: { |
| | | show: true, |
| | | position: 'top' |
| | | }, |
| | | data: [] |
| | | }, |
| | | { |
| | | name: 'LCL', |
| | | type: 'bar', |
| | | label: { |
| | | show: true, |
| | | position: 'top' |
| | | }, |
| | | data: [] |
| | | }, |
| | | { |
| | | name: 'å¹³åå¼', |
| | | type: 'bar', |
| | | label: { |
| | | show: true, |
| | | position: 'top' |
| | | }, |
| | | data: [] |
| | | }, |
| | | ], |
| | | legend2: { |
| | | data: ['å¹³åå¼','ç»å¯¹åå·®'] |
| | | }, |
| | | yAxis2: [{ |
| | | type: 'value', |
| | | min: 0, |
| | | max: 1, |
| | | }], |
| | | echartsSeries2: [ |
| | | { |
| | | name: 'å¹³åå¼', |
| | | type: 'line', |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | formatter: (params) => Math.round(params.value * 1000) / 10 + '%' |
| | | }, |
| | | data: [], |
| | | }, |
| | | { |
| | | name: 'ç»å¯¹åå·®', |
| | | type: 'line', |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | formatter: (params) => Math.round(params.value * 1000) / 10 + '%' |
| | | }, |
| | | data: [], |
| | | } |
| | | ], |
| | | echartsSeries3: [ |
| | | { |
| | | name: 'æ£æµä¸å¿æ£æµæ°æ®', |
| | | type: 'line', |
| | | data: [] |
| | | } |
| | | ], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getInfo() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | getInfo () { |
| | | this.localData = this.comparisonData.localData === null ? ['', '', '', '', '','','', '', ''] : this.comparisonData.localData |
| | | this.localData = this.localData.map((number, index) => index === 7 ? `${Math.round(number * 100)}%` : number) |
| | | this.echartsSeries3[0].data = this.localData.slice(0, 5) |
| | | this.localULC = this.comparisonData.localULC |
| | | this.localLCL = this.comparisonData.localLCL |
| | | this.localAverage = this.comparisonData.localAverage |
| | | this.localRange = this.comparisonData.localRange |
| | | }, |
| | | getInfo1 () { |
| | | this.echartsSeries1[0].data = [] |
| | | this.supplierData = this.comparisonData1.supplierData === null ? ['', '', '', '', '','','', '', ''] : this.comparisonData1.supplierData |
| | | this.localData = this.comparisonData1.localData === null ? ['', '', '', '', '','','', '', ''] : this.comparisonData1.localData |
| | | this.localData = this.localData.map((number, index) => index === 7 ? `${Math.round(number * 100)}%` : number) |
| | | this.echartsSeries3[0].data = this.localData.slice(0, 5) |
| | | this.echartsSeries[0].data = this.supplierData |
| | | this.echartsSeries[1].data = this.localData |
| | | this.absoluteDeviation = this.comparisonData1.absoluteDeviation === null ? ['', '', '', '', '','','', '', ''] : this.comparisonData1.absoluteDeviation |
| | | this.echartsSeries2[1].data = this.absoluteDeviation |
| | | this.absoluteDeviation = this.absoluteDeviation.map(number => `${Math.round(number * 100)}%`) // ç»å¯¹åå·®ç¾åæ¯è½¬æ¢ |
| | | this.average = this.comparisonData1.average === null ? ['', '', '', '', '','','', '', ''] : this.comparisonData1.average |
| | | this.echartsSeries2[0].data = this.average |
| | | this.average = this.average.map(number => `${Math.round(number * 100)}%`) // å¹³åå¼ç¾åæ¯è½¬æ¢ |
| | | this.supplierULC = this.comparisonData1.supplierULC === null ? ['', '', '', '', ''] : this.comparisonData1.supplierULC |
| | | this.echartsSeries1[0].data.push(this.supplierULC[0]) // æµéæ°æ®æ åå·®å¯¹æ¯æ±ç¶å¾æ°æ® |
| | | this.supplierLCL = this.comparisonData1.supplierLCL === null ? ['', '', '', '', ''] : this.comparisonData1.supplierLCL |
| | | this.echartsSeries1[1].data.push(this.supplierLCL[0]) // æµéæ°æ®æ åå·®å¯¹æ¯æ±ç¶å¾æ°æ® |
| | | this.supplierAverage = this.comparisonData1.supplierAverage === null ? ['', '', '', '', ''] : this.comparisonData1.supplierAverage |
| | | this.echartsSeries1[2].data.push(this.supplierAverage[0]) // æµéæ°æ®æ åå·®å¯¹æ¯æ±ç¶å¾æ°æ® |
| | | this.supplierRange = this.comparisonData1.supplierRange === null ? ['', '', '', '', ''] : this.comparisonData1.supplierRange |
| | | this.localULC = this.comparisonData1.localULC |
| | | this.echartsSeries1[0].data.push(this.localULC[0]) // æµéæ°æ®æ åå·®å¯¹æ¯æ±ç¶å¾æ°æ® |
| | | this.localLCL = this.comparisonData1.localLCL |
| | | this.echartsSeries1[1].data.push(this.localLCL[0]) // æµéæ°æ®æ åå·®å¯¹æ¯æ±ç¶å¾æ°æ® |
| | | this.localAverage = this.comparisonData1.localAverage |
| | | this.echartsSeries1[2].data.push(this.localAverage[0]) // æµéæ°æ®æ åå·®å¯¹æ¯æ±ç¶å¾æ°æ® |
| | | this.localRange = this.comparisonData1.localRange |
| | | }, |
| | | submitForm () { |
| | | this.$refs['supplierForm'].validate((valid) => { |
| | | if (valid) { |
| | | const params = { |
| | | orderIds: this.selectRow.orderIds, |
| | | itemNames: this.selectRow.itemNames, |
| | | supplierDataList: Object.values(this.supplierForm) |
| | | } |
| | | this.$axios.post(this.$api.dataAnalysis.getRawSupplierCompare, params, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.comparisonData1 = res.data |
| | | this.getInfo1() |
| | | }) |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | resetForm () { |
| | | this.$refs['supplierForm'].resetFields(); |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | .container { |
| | | width: calc(100% - 20px); |
| | | height: calc(100vh - 170px); |
| | | background-color: #fff; |
| | | padding: 10px; |
| | | overflow-y: auto; |
| | | } |
| | | .table { |
| | | width: 100%; |
| | | } |
| | | .thTitle { |
| | | background-color: #e0eaf5; |
| | | padding: 6px 2px; |
| | | } |
| | | .thBack { |
| | | text-align: center; |
| | | background-color: #e0eaf5; |
| | | padding: 2px; |
| | | } |
| | | .thBack2 { |
| | | text-align: center; |
| | | background-color: #e4f2da; |
| | | padding: 2px; |
| | | } |
| | | .tdData { |
| | | padding: 4px; |
| | | text-align: center; |
| | | font-size: 13px; |
| | | width: 10%; |
| | | } |
| | | .inspection-card{ |
| | | width: 100%; |
| | | background: #FFFFFF; |
| | | margin-top: 10px; |
| | | } |
| | | .echartsTitle { |
| | | text-align: center; |
| | | padding-bottom: 10px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div id="id" ref="chart" :style="chartStyle"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as echarts from 'echarts' |
| | | import ResizeListener from 'element-resize-detector'; |
| | | |
| | | export default { |
| | | name: 'EChart', |
| | | props: { |
| | | options: { |
| | | type: Object, |
| | | default: () => ({}) |
| | | }, |
| | | chartStyle: { |
| | | type: Object, |
| | | default: () => ({ |
| | | height: '80%', |
| | | width: '100%' |
| | | }) |
| | | }, |
| | | dataset: { |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | xAxis: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | yAxis: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | series: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | grid: { |
| | | type: Object, |
| | | default: () => ({}) |
| | | }, |
| | | legend: { |
| | | type: Object, |
| | | default: () => ({}) |
| | | }, |
| | | tooltip: { |
| | | type: Object, |
| | | default: () => ({}) |
| | | }, |
| | | lineColors: { |
| | | type: Array, |
| | | default: () => ['#00BAFF', '#3DE7C9', '#CCEDF0', '#FFB71C', '#FF5A5A'] |
| | | }, |
| | | barColors: { |
| | | type: Array, |
| | | default: () => ['#ff8800', '#3DE7C9', '#CCEDF0', '#FFB71C', '#FF5A5A'] |
| | | }, |
| | | loadingOption: { |
| | | type: Object, |
| | | default: () => ({ |
| | | text: 'æ°æ®å è½½ä¸...', |
| | | color: '#00BAFF', |
| | | textColor: '#000', |
| | | maskColor: 'rgba(255, 255, 255, 0.8)', |
| | | zlevel: 0 |
| | | }) |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chartInstance: null, |
| | | } |
| | | }, |
| | | watch: { |
| | | options: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.renderChart() |
| | | }) |
| | | }, |
| | | }, |
| | | series: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.renderChart() |
| | | }) |
| | | }, |
| | | }, |
| | | dataset: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.renderChart() |
| | | }) |
| | | }, |
| | | }, |
| | | xAxis: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.renderChart() |
| | | }) |
| | | }, |
| | | }, |
| | | yAxis: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.renderChart() |
| | | }) |
| | | }, |
| | | }, |
| | | grid: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.renderChart() |
| | | }) |
| | | }, |
| | | }, |
| | | legend: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.renderChart() |
| | | }) |
| | | }, |
| | | }, |
| | | tooltip: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.renderChart() |
| | | }) |
| | | }, |
| | | }, |
| | | lineColors: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.renderChart() |
| | | }) |
| | | }, |
| | | }, |
| | | barColors: { |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.renderChart() |
| | | }) |
| | | }, |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.chartInstance = echarts.init(this.$refs.chart) |
| | | this.renderChart() |
| | | window.addEventListener('resize', this.windowResizeListener); |
| | | }, |
| | | beforeDestroy() { |
| | | this.dispose() |
| | | }, |
| | | methods: { |
| | | /* å½çªå£ç¼©æ¾æ¶ï¼echartå¨æè°æ´èªèº«å¤§å° */ |
| | | windowResizeListener() { |
| | | if (!this.chartInstance) return; |
| | | this.dispose() |
| | | this.chartInstance = echarts.init(this.$refs.chart) |
| | | this.renderChart() |
| | | this.chartInstance.resize(); |
| | | }, |
| | | renderChart() { |
| | | const option = { |
| | | backgroundColor: this.options.backgroundColor || '#fff', |
| | | xAxis: this.xAxis, |
| | | yAxis: this.yAxis, |
| | | dataset: this.dataset, |
| | | series: this.series, |
| | | grid: this.grid, |
| | | legend: this.legend, |
| | | tooltip: this.tooltip |
| | | } |
| | | // æ ¹æ®ä¼ å
¥çæ°æ®åé
ç½®åæ°çæå¾è¡¨ |
| | | this.generateChart(option) |
| | | }, |
| | | |
| | | generateChart(option) { |
| | | // é
ç½®æçº¿å¾åæ±ç¶å¾çæ ·å¼ |
| | | if (option.series && option.series.length > 0) { |
| | | option.series.forEach((s, index) => { |
| | | if (s.type === 'line') { |
| | | s.itemStyle = { |
| | | color: this.lineColors[index] || this.lineColors[0] |
| | | } |
| | | s.lineStyle = { |
| | | color: this.lineColors[index] || this.lineColors[0] |
| | | } |
| | | } else if (s.type === 'bar') { |
| | | s.itemStyle = { |
| | | color: this.barColors[index] || this.barColors[0] |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | this.chartInstance.clear() |
| | | |
| | | // 渲æå¾è¡¨ |
| | | this.chartInstance.setOption(option) |
| | | }, |
| | | |
| | | dispose() { |
| | | if (this.chartInstance) { |
| | | window.removeEventListener('resize', this.chartInstance.resize);//鿝å¾è¡¨çå¬äºä»¶ |
| | | this.chartInstance.dispose() |
| | | this.chartInstance = null |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /* å¨è¿éå¯ä»¥åæ ·å¼ï¼æ¯å¦è®¾ç½®å¾è¡¨å®¹å¨ç宽度åé«åº¦ */ |
| | | </style> |
| | |
| | | <div class="avatar-wrapper"> |
| | | <img :src="avatar" class="user-avatar" /> |
| | | <span class="userName">{{ nickName }}</span> |
| | | <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> |
| | | <div class="avatar-wrapper"> |
| | | <i class="el-icon-caret-bottom" /> |
| | | </div> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <router-link to="/user/profile"> |
| | | <el-dropdown-item>个人ä¸å¿</el-dropdown-item> |
| | | </router-link> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <img |
| | | class="logoout" |
| | | src="@/assets/images/logoout.png" |
| | |
| | | } |
| | | } |
| | | |
| | | .avatar-container { |
| | | margin-right: 30px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | path: "customsInspection", |
| | | component: () => |
| | | import("@/views/business/materialOrder/customsInspection"), |
| | | name: "customsInspection", |
| | | name: "CustomsInspection", |
| | | meta: { |
| | | title: "åææä¸å详æ
", |
| | | activeMenu: "/business/materialOrder", |
| | | keepAlive: true |
| | | }, |
| | | }, |
| | | { |
| | | // éææä¸å |
| | | path: "copperOrder", |
| | | component: () => import("@/views/business/materialOrder/copperOrder"), |
| | | name: "copperOrder", |
| | | meta: { title: "éææä¸å", activeMenu: "/business/materialOrder" }, |
| | | name: "CopperOrder", |
| | | meta: { title: "éææä¸å", activeMenu: "/business/materialOrder",keepAlive: true }, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | path: "add", |
| | | component: () => |
| | | import("@/views/business/productOrder/components/add.vue"), |
| | | name: "add", |
| | | meta: { title: "æåä¸å详æ
", activeMenu: "/business/materialOrder" }, |
| | | name: "Add", |
| | | meta: { title: "æåä¸å详æ
", activeMenu: "/business/materialOrder",keepAlive: true }, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | } |
| | | |
| | | export default { |
| | | name: 'CopperOrder', |
| | | components: {}, |
| | | dicts: ['check_type', 'urgency_level'], |
| | | data() { |
| | |
| | | this.noNeedCheckLoad = false |
| | | if (res.code == 201) return |
| | | this.$message.success('å·²æäº¤') |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }).catch(e=>{ |
| | | this.noNeedCheckLoad = false |
| | | }) |
| | |
| | | if (res.code == 201) return |
| | | this.$message.success('å·²æäº¤') |
| | | this.bsm3Dia = false; |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }).catch(e=>{ |
| | | this.saveLoad = false |
| | | }) |
| | |
| | | |
| | | }, |
| | | goBack () { |
| | | if (this.active == 1) { |
| | | this.$router.go(-1) |
| | | } else { |
| | | this.closeOpenPage() |
| | | } |
| | | }, |
| | | closeOpenPage() { |
| | | this.$router.go(-1) |
| | | } |
| | | this.$tab.closeOpenPage() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | width="32%"> |
| | | <span>{{ dialogMessage }}</span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="goBack()">ç¡® å®</el-button> |
| | | <el-button type="primary" @click="dialogVisible= false,closeOpenPage()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | |
| | | this.standardMethodListId = null |
| | | } |
| | | }, |
| | | mounted() { |
| | | created() { |
| | | this.active = this.$route.query.active |
| | | this.orderType = this.$route.query.orderType |
| | | this.currentId = this.$route.query.currentId |
| | |
| | | if (res.code == 201) return |
| | | this.noNeedCheckDia = false |
| | | this.$message.success('å·²æäº¤') |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }).catch(e=>{ |
| | | this.noNeedCheckLoad = false |
| | | }) |
| | |
| | | if (res.code == 201) return |
| | | this.$message.success('å·²æäº¤') |
| | | this.bsm3Dia = false; |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }).catch(e=>{ |
| | | this.saveLoad = false |
| | | }) |
| | |
| | | return row[property] === value; |
| | | }, |
| | | goBack () { |
| | | if (this.active == 1) { |
| | | this.$router.go(-1) |
| | | } else { |
| | | this.closeOpenPage() |
| | | } |
| | | }, |
| | | closeOpenPage() { |
| | | this.$router.go(-1) |
| | | } |
| | | this.$tab.closeOpenPage() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å¶å人:"> |
| | | <el-input v-model="addObj.custom" disabled size="small"></el-input> |
| | | <el-input v-model="addObj.custom" disabled size="small" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å§æåä½:" prop="company"> |
| | | <el-input v-model="addObj.company" disabled placeholder="鿩姿åä½" size="small" style="width: 200px"> |
| | | <el-input v-model="addObj.company" disabled placeholder="鿩姿åä½" size="small" style="width: 208px"> |
| | | <template slot="append"> |
| | | <el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search" |
| | | @click="openCompanyList"></el-button> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·ååç§°:" prop="sample"> |
| | | <el-input v-model="addObj.sample" disabled size="small" style="width: 178px"> |
| | | <el-input v-model="addObj.sample" disabled size="small" style="width: 208px"> |
| | | <template slot="append"><el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search" |
| | | @click="selectStandardTree = true"></el-button></template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·åæ°é:" prop="sampleNum"> |
| | | <el-form-item label="æ ·åæ°é:" prop="sampleNum" style="margin-right: 0"> |
| | | <el-input-number v-model="addObj.sampleNum" :disabled="active>1" :max="100" :min="1" :precision="0" |
| | | size="small" style="width: 65%;" @change="addStandardTree"></el-input-number> |
| | | size="small" @change="addStandardTree"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·åç¶æ:" prop="sampleStatus"> |
| | | <el-select v-model="addObj.sampleStatus" :disabled="active>1&&tabIndex!=4" size="small"> |
| | |
| | | <el-input v-model="addObj.testQuantity" :disabled="active>1&&tabIndex!=4" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥æ ·æ¹å¼:" prop="formType"> |
| | | <el-select v-model="addObj.formType" :disabled="active>1&&tabIndex!=4" size="small"> |
| | | <el-select v-model="addObj.formType" :disabled="active>1&&tabIndex!=4" size="small" clearable> |
| | | <el-option v-for="(a,ai) in dict.type.form_type" :key="ai" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥ååéæ¹å¼:"> |
| | | <el-radio-group v-model="addObj.send" :disabled="active>1&&tabIndex!=4"> |
| | | <el-radio :label="1">èªå</el-radio> |
| | | <el-radio :label="0">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·åå¤çæ¹å¼:"> |
| | | <el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4"> |
| | | <el-radio :label="0">å§æåä½åå</el-radio> |
| | | <el-radio :label="1">å®éªå®¤å¤ç</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="ç产åä½:" prop="production"> |
| | | <el-input v-model="addObj.production" :disabled="active>1&&tabIndex!=4" clearable placeholder="请è¾å
¥" |
| | |
| | | <el-input v-model="addObj.productionEn" :disabled="active>1&&tabIndex!=4" clearable placeholder="请è¾å
¥" |
| | | size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·åå¤çæ¹å¼:"> |
| | | <el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4" size="mini"> |
| | | <el-radio :label="0" border style="margin-right: 0">å§æåä½åå</el-radio> |
| | | <el-radio :label="1" border>å®éªå®¤å¤ç</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦çæ ·:"> |
| | | <el-radio-group v-model="addObj.isLeave" :disabled="active>1&&tabIndex!=4"> |
| | | <el-radio :label="0">ä¸çæ ·</el-radio> |
| | | <el-radio :label="1">çæ ·</el-radio> |
| | | <el-radio-group v-model="addObj.isLeave" border :disabled="active>1&&tabIndex!=4" size="mini"> |
| | | <el-radio :label="0" border style="margin-right: 0">ä¸çæ ·</el-radio> |
| | | <el-radio :label="1" border>çæ ·</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥ååéæ¹å¼:"> |
| | | <el-radio-group v-model="addObj.send" :disabled="active>1&&tabIndex!=4" size="mini"> |
| | | <el-radio :label="1" border style="margin-right: 0">èªå</el-radio> |
| | | <el-radio :label="0" border>å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="å§æäºº:"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨:"> |
| | | <el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请è¾å
¥'" clearable |
| | | size="small" type="textarea"></el-input> |
| | | size="small" style="width: 100%" type="textarea"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨è±æ:"> |
| | | <el-input v-model="addObj.remarkEn" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请è¾å
¥'" clearable |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div style="display: flex;align-items: center"> |
| | | <div style="display: flex;align-items: center;margin-bottom: 10px"> |
| | | <span style="width: 150px;font-size: 14px;text-align: right;">ç¹æ®æ åï¼</span> |
| | | <el-input v-model="specialStandardMethod" :disabled="!isSpecial" clearable |
| | | size="small"></el-input> |
| | | <el-input v-model="specialStandardMethod" :disabled="!isSpecial" clearable size="small"></el-input> |
| | | <el-button v-show="active==1" size="small" style="margin-left: 10px" |
| | | type="primary" @click="editSpecial">ç¼è¾</el-button> |
| | | </div> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="issuedDialogVisible=false;goBack">å æ¶</el-button> |
| | | <el-button @click="issuedDialogVisible=false;closeOpenPage">å æ¶</el-button> |
| | | <el-button :loading="upLoad" type="primary" @click="submitForm2">ç¡® å®</el-button> |
| | | </el-row> |
| | | </span> |
| | |
| | | import {selectCustomPageList} from "@/api/system/customer"; |
| | | |
| | | export default { |
| | | name: 'Add', |
| | | components: { |
| | | limsTable, |
| | | cableConfig, |
| | |
| | | this.saveLoad = false |
| | | this.$message.success('å·²æäº¤') |
| | | this.bsm3Dia = false; |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }).catch(e=>{ |
| | | this.saveLoad = false |
| | | }) |
| | |
| | | this.saveLoad = false |
| | | this.$message.success('å·²æäº¤') |
| | | this.bsm3Dia = false; |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }).catch(e=>{ |
| | | this.saveLoad = false |
| | | }) |
| | |
| | | this.$message.success('æäº¤æå') |
| | | this.upLoad = false |
| | | this.issuedDialogVisible = false |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }).catch(e => { |
| | | this.$message.error('æäº¤å¤±è´¥') |
| | | this.upLoad = false |
| | |
| | | state: 2, |
| | | id: this.currentId, |
| | | tell: this.tell |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.noLoading = false; |
| | | this.tell = ''; |
| | | this.$message.success('æäº¤æå') |
| | | this.issuedDialogVisible = false; |
| | | this.goBack() |
| | | this.closeOpenPage() |
| | | }) |
| | | }, |
| | | filterHandler(value, row, column) { |
| | |
| | | this.productList0.splice(index,1) |
| | | }, |
| | | goBack () { |
| | | if (this.active == 1) { |
| | | this.$router.go(-1) |
| | | } else { |
| | | this.closeOpenPage() |
| | | } |
| | | }, |
| | | closeOpenPage() { |
| | | this.$router.go(-1) |
| | | } |
| | | this.$tab.closeOpenPage() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div v-if="!isShowDataCom"> |
| | | <el-form ref="entity" size="small" :inline="true"> |
| | | <el-form-item style="width: 16%;"> |
| | | <el-date-picker |
| | | v-model="datePicker" |
| | | end-placeholder="ç»ææ¥æ" |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | range-separator="è³" |
| | | size="small" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | style="width: 100%;" |
| | | type="daterange" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·ååç§°" prop="sampleName"> |
| | | <el-input v-model="sampleName" clearable placeholder="请è¾å
¥æ ·ååç§°" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="åå·" prop="modelName"> |
| | | <el-input v-model="modelName" clearable placeholder="请è¾å
¥åå·" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ä¾åºååç§°" prop="supplierName"> |
| | | <el-input v-model="supplierName" clearable placeholder="请è¾å
¥ä¾åºååç§°" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªé¡¹åç§°" prop="supplierName"> |
| | | <el-select v-model="itemNames" :loading="selectLoading" clearable multiple placeholder="è¯·éæ©" |
| | | size="small" style="width: 90%;" @focus="getItemList"> |
| | | <el-option |
| | | v-for="item in itemNamesList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="changeData">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div v-if="!isShowDataCom" style="overflow-y: auto;height: calc(100% - 70px);overflow-x: hidden"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <div class="inspection-card"> |
| | | <div style="display: flex;align-items: center;margin-bottom: 10px;justify-content: space-between;"> |
| | | <div>忿项æ£åæå表</div> |
| | | <el-button size="small" type="primary" @click="openShowData">æ¥çæ°æ®åæ</el-button> |
| | | </div> |
| | | <lims-table :tableData="editTableData" :column="editColumn" |
| | | height="400" key="tableData" :isSelection="true" |
| | | :handleSelectionChange="handleSelectionChange" |
| | | :tableLoading="editLoading"></lims-table> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6" style="padding-top: 14px"> |
| | | <div style="display: flex;margin-left: 10px;align-items: center"> |
| | | <span style="width: 100px">åç»ç±»åï¼</span> |
| | | <el-select v-model="groupType" clearable placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 90%;" @change="getBarInfo"> |
| | | <el-option |
| | | v-for="item in groupTypeList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <div class="inspection-card"> |
| | | <div class="title">æ£éªé¡¹æ°æ®å¯¹æ¯</div> |
| | | <Echarts ref="chart" |
| | | :chartStyle="chartStyle" |
| | | :dataset="dataset" |
| | | :grid="grid" |
| | | :options="echartsOptions" |
| | | :series="echartsSeries" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis" |
| | | :yAxis="yAxis" |
| | | style="height: 40vh;"></Echarts> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <div class="inspection-card"> |
| | | <div class="title">忿项æ£åæ ¼ç</div> |
| | | <Echarts ref="chart" |
| | | :chartStyle="chartStyle" |
| | | :dataset="dataset1" |
| | | :grid="grid" |
| | | :options="echartsOptions1" |
| | | :series="echartsSeries1" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis" |
| | | :yAxis="yAxis1" |
| | | style="height: 40vh;"></Echarts> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-dialog :visible.sync="dataDialogVisible" title="æ°æ®æ¥ç" width="80%"> |
| | | <div v-if="dataDialogVisible" style="height: 70vh;overflow-y: auto;"> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | @pagination="pagination" key="tableData" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | </el-dialog> |
| | | <DataComparison v-if="isShowDataCom" :comparisonData="comparisonData" |
| | | :selectRow="selectRow" @goBack="goBack"></DataComparison> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Echarts from "@/components/echarts/echarts.vue"; |
| | | import DataComparison from '@/components/echarts/DataComparison.vue' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | getRawItemNames, |
| | | getRawProductAnalysis, |
| | | getRawProductAnalysisAllList, |
| | | getRawProductAnalysisRawPass, getRawSupplierCompare |
| | | } from "@/api/statisticalCharts/dataAnalysis"; |
| | | import {selectSampleAndProductByOrderId} from "@/api/business/rawMaterialOrder"; |
| | | |
| | | export default { |
| | | name: "ItemInspectionAnalysis", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {limsTable, Echarts, DataComparison}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | selectChangeRows: [], // éä¸çæ°æ® |
| | | groupTypeList: [ |
| | | {label: 'æ ·å', value: '0'}, |
| | | {label: 'åä¸åå®¶, åä¸åå·, ä¸åæ¹æ¬¡', value: '1'}, |
| | | {label: 'åä¸åå·, ä¸ååå®¶', value: '2'}, |
| | | ], |
| | | itemNames: [], // æ£éªé¡¹åç§° |
| | | itemNamesList: [], |
| | | selectLoading: false, |
| | | datePicker: [], // æ¶é´ |
| | | groupType: '', // åç» |
| | | beginDate: '', |
| | | endDate: '', |
| | | sampleName: '', // æ ·ååç§° |
| | | modelName: '', // åå· |
| | | supplierName: '', // ä¾åºååç§° |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | echartsOptions: {}, |
| | | echartsOptions1: {}, |
| | | dataset: { |
| | | dimensions: [], |
| | | source: [], |
| | | }, |
| | | dataset1: { |
| | | dimensions: [], |
| | | source: [], |
| | | }, |
| | | xAxis: [{ type: 'category' }], |
| | | yAxis: [{}], |
| | | yAxis1: [{ |
| | | axisLabel: { |
| | | formatter: '{value} %' |
| | | } |
| | | }], |
| | | echartsSeries: [], |
| | | echartsSeries1: [], |
| | | tooltip: {}, |
| | | chartStyle: { |
| | | width: '100%', |
| | | height: '96%' // 设置å¾è¡¨å®¹å¨çé«åº¦ |
| | | }, |
| | | editColumn: [ |
| | | { |
| | | label: 'æ¹å·', |
| | | minWidth: '120px', |
| | | prop: 'updateBatchNo' |
| | | }, { |
| | | label: 'å§æç¼å·', |
| | | minWidth: '120px', |
| | | prop: 'entrustCode' |
| | | }, { |
| | | label: 'é¶ä»¶å·', |
| | | minWidth: '120px', |
| | | prop: 'partNo' |
| | | }, { |
| | | label: 'é¶ä»¶æè¿°', |
| | | minWidth: '120px', |
| | | prop: 'partDesc' |
| | | }, { |
| | | label: 'ä¾åºååç§°', |
| | | minWidth: '120px', |
| | | prop: 'supplierName', |
| | | }, { |
| | | dataType: 'tag', |
| | | label: 'æ£éªç¶æ', |
| | | prop: 'inspectStatus', |
| | | minWidth: '120px', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'æ£éªä¸' |
| | | } else if (params == 1) { |
| | | return 'åæ ¼' |
| | | } else if (params == 2) { |
| | | return 'ä¸åæ ¼' |
| | | } else if (params == 3) { |
| | | return 'æªä¸å' |
| | | } else if (params == 4) { |
| | | return 'è®©æ¥æ¾è¡' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1 || params == 4) { |
| | | return 'success' |
| | | } else if (params == 3) { |
| | | return 'warning' |
| | | } else if (params == 0 || params == 2) { |
| | | return 'danger' |
| | | } |
| | | } |
| | | }, { |
| | | label: 'æ ·ååç§°', |
| | | minWidth: '300px', |
| | | prop: 'sampleName' |
| | | }, { |
| | | label: 'æ ·ååå·', |
| | | minWidth: '300px', |
| | | prop: 'sampleModel' |
| | | },{ |
| | | label: 'ä¸åæ¶é´', |
| | | minWidth: '120px', |
| | | prop: 'sendTime' |
| | | },{ |
| | | label: 'æµè¾¾çéè´æ°é', |
| | | minWidth: '130px', |
| | | prop: 'qtyArrived' |
| | | },{ |
| | | label: 'åä½', |
| | | minWidth: '120px', |
| | | prop: 'buyUnitMeas' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | width: '80px', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'æ°æ®æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDataLook(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | editTableData: [], |
| | | editLoading: false, |
| | | dataDialogVisible: false, |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | {label: 'æ ·åç¼å·', prop: 'sampleCode'}, |
| | | {label: 'æ ·ååç§°', prop: 'sample'}, |
| | | {label: 'æ£éªé¡¹åç±»', prop: 'inspectionItemClass'}, |
| | | {label: 'æ£éªé¡¹', prop: 'inspectionItem'}, |
| | | {label: 'æ£éªå项', prop: 'inspectionItemSubclass'}, |
| | | {label: 'åä½', prop: 'unit'}, |
| | | {label: 'æ ·ååå·', prop: 'model'}, |
| | | {label: 'æ¡ä»¶', prop: 'radius'}, |
| | | {label: 'çµç¼æ è¯', prop: 'cableTag'}, |
| | | {label: 'è¯éªè¦æ±', prop: 'tell'}, |
| | | {label: 'æ£éªç»æ', prop: 'lastValue'}, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'ç»æå¤å®', |
| | | prop: 'insResult', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'åæ ¼' |
| | | } else if (params == 0) { |
| | | return 'ä¸åæ ¼' |
| | | } else if (params == 3) { |
| | | return 'ä¸å¤å®' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else if (params == 0) { |
| | | return 'danger' |
| | | } else if (params == 3) { |
| | | return '' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | page: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | }, |
| | | currentRow: {}, |
| | | isShowDataCom: false, |
| | | comparisonData: {}, |
| | | selectRow: {}, |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.getBar() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | getBarInfo (val) { |
| | | if (val === '1') { |
| | | if (!this.modelName || !this.supplierName) { |
| | | this.$message.warning('åå·æä¾åºåä¸è½ä¸ºç©º') |
| | | this.groupType = '' |
| | | return |
| | | } |
| | | } else if (val === '2') { |
| | | if (!this.modelName) { |
| | | this.$message.warning('åå·ä¸è½ä¸ºç©º') |
| | | this.groupType = '' |
| | | return |
| | | } |
| | | if (this.supplierName) { |
| | | this.$message.warning('ä¸å¯éä¾åºååç§°') |
| | | this.groupType = '' |
| | | return |
| | | } |
| | | } |
| | | this.getBar() |
| | | this.getBar1() |
| | | }, |
| | | // è·ååæ ¼çå¾è¡¨æ°æ® |
| | | getBar() { |
| | | this.echartsSeries = [] |
| | | const params = { |
| | | beginDate: this.beginDate, |
| | | endDate: this.endDate, |
| | | sampleName: this.sampleName, |
| | | modelName: this.modelName, |
| | | supplierName: this.supplierName, |
| | | itemNames: this.itemNames, |
| | | groupType: this.groupType, |
| | | } |
| | | getRawProductAnalysis(params).then((res) => { |
| | | if (res.data === null) { |
| | | this.$message.warning('ææ æ°æ®') |
| | | return |
| | | } |
| | | for (let i = 0; i < res.data.itemNames.length; i++) { |
| | | this.echartsSeries.push({type: 'line', label: { |
| | | show: true, |
| | | position: 'top' |
| | | },}) |
| | | } |
| | | this.dataset.dimensions = this.HaveJson(res.data.itemNames) |
| | | this.dataset.dimensions.unshift('product') |
| | | this.dataset.source = this.HaveJson(res.data.productList) |
| | | |
| | | }) |
| | | }, |
| | | getBar1() { |
| | | this.echartsSeries1 = [] |
| | | const params = { |
| | | beginDate: this.beginDate, |
| | | endDate: this.endDate, |
| | | sampleName: this.sampleName, |
| | | modelName: this.modelName, |
| | | supplierName: this.supplierName, |
| | | itemNames: this.itemNames, |
| | | groupType: this.groupType, |
| | | } |
| | | getRawProductAnalysisRawPass(params).then((res) => { |
| | | if (res.data === null) { |
| | | this.$message.warning('ææ æ°æ®') |
| | | return |
| | | } |
| | | for (let i = 0; i < res.data.itemNames.length; i++) { |
| | | this.echartsSeries1.push({type: 'line',tooltip: { |
| | | valueFormatter: function (value) { |
| | | return value + '%'; |
| | | } |
| | | },label: { |
| | | show: true, |
| | | position: 'top', |
| | | formatter: (params) => params.value[params.dimensionNames[params.encode.y[0]]] + '%' |
| | | },}) |
| | | } |
| | | this.dataset1.dimensions = this.HaveJson(res.data.itemNames) |
| | | this.dataset1.dimensions.unshift('product') |
| | | this.dataset1.source = this.HaveJson(res.data.productList) |
| | | |
| | | }) |
| | | }, |
| | | // æ°æ®æ¥ç |
| | | handleDataLook(row) { |
| | | this.dataDialogVisible = true; |
| | | this.currentRow = row |
| | | this.refreshTable(row) |
| | | }, |
| | | // æ¥è¯¢åè° |
| | | refreshTable(row) { |
| | | selectSampleAndProductByOrderId({id: row.id}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | pagination (page) { |
| | | this.page.size = page.limit |
| | | this.refreshTable(this.currentRow) |
| | | }, |
| | | changeData () { |
| | | if (this.datePicker !== null && this.datePicker.length > 0) { |
| | | this.beginDate = this.datePicker[0] + ' 00:00:00' |
| | | this.endDate = this.datePicker[1] + ' 23:59:59' |
| | | } else { |
| | | this.beginDate = '' |
| | | this.endDate = '' |
| | | } |
| | | this.getBar() |
| | | this.getBar1() |
| | | this.getTableData() |
| | | }, |
| | | getTableData () { |
| | | this.editLoading = true |
| | | const params = { |
| | | beginDate: this.beginDate, |
| | | endDate: this.endDate, |
| | | sampleName: this.sampleName, |
| | | modelName: this.modelName, |
| | | supplierName: this.supplierName, |
| | | itemNames: this.itemNames, |
| | | } |
| | | getRawProductAnalysisAllList(params).then(res => { |
| | | this.editLoading = false |
| | | this.editTableData = res.data |
| | | }).catch(() => { |
| | | this.editLoading = false |
| | | }) |
| | | }, |
| | | // è·åæ£éªé¡¹ä¸ææ¡ |
| | | getItemList () { |
| | | this.selectLoading = true |
| | | this.itemNamesList = [] |
| | | const params = { |
| | | beginDate: this.beginDate, |
| | | endDate: this.endDate, |
| | | sampleName: this.sampleName, |
| | | modelName: this.modelName, |
| | | supplierName: this.supplierName, |
| | | } |
| | | getRawItemNames(params).then((res) => { |
| | | this.selectLoading = false |
| | | res.data.map(val => { |
| | | const obj = Object.assign({ |
| | | label: val, |
| | | value: val, |
| | | }) |
| | | this.itemNamesList.push(obj) |
| | | }) |
| | | }).catch(() => { |
| | | this.selectLoading = false |
| | | }) |
| | | }, |
| | | goBack () { |
| | | this.isShowDataCom = false |
| | | }, |
| | | openShowData () { |
| | | if (this.selectChangeRows.length !== 5) { |
| | | this.$message.warning('è¯·éæ©5æ¡æ°æ®') |
| | | return |
| | | } |
| | | if (this.itemNames.length !== 1) { |
| | | this.$message.warning('åªè½éæ©1项æ£éªé¡¹åç§°') |
| | | return |
| | | } |
| | | let ids = [] |
| | | let itemNames = [] |
| | | this.selectChangeRows.forEach(item => { |
| | | ids.push(item.enterOrderId) |
| | | }) |
| | | this.itemNames.forEach(item => { |
| | | itemNames.push(item) |
| | | }) |
| | | const params = { |
| | | orderIds: ids, |
| | | itemNames: itemNames |
| | | } |
| | | getRawSupplierCompare(params).then(res => { |
| | | this.comparisonData = res.data |
| | | this.selectRow = params |
| | | this.isShowDataCom = true |
| | | }) |
| | | }, |
| | | handleSelectionChange (val) { |
| | | this.selectChangeRows = val |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .inspection-card{ |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | | <el-radio-group v-model="dateType" @change="changeDate"> |
| | | <el-radio-button label="1">æ¬å¨</el-radio-button> |
| | | <el-radio-button label="2">æ¬æ</el-radio-button> |
| | | <el-radio-button label="3">ä»å¹´</el-radio-button> |
| | | </el-radio-group> |
| | | </el-col> |
| | | <el-col :span="20"> |
| | | <el-form ref="entity" size="small" :inline="true"> |
| | | <el-form-item style="width: 20%;"> |
| | | <el-date-picker |
| | | v-model="datePicker" |
| | | end-placeholder="ç»ææ¥æ" |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | range-separator="è³" |
| | | size="small" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | type="daterange" |
| | | style="width: 100%;" |
| | | value-format="yyyy-MM-dd" |
| | | @change="changeDatePicker"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·ååç§°" prop="sampleName"> |
| | | <el-input v-model="sampleName" clearable placeholder="请è¾å
¥æ ·ååç§°" size="small" @change="changeDate"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="åå·" prop="modelName"> |
| | | <el-input v-model="modelName" clearable placeholder="请è¾å
¥åå·" size="small" @change="changeDate"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ä¾åºååç§°" prop="supplierName"> |
| | | <el-input v-model="supplierName" clearable placeholder="请è¾å
¥ä¾åºååç§°" size="small" @change="changeDate"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <div class="pie-card"> |
| | | <div class="title">åææåæ ¼ç</div> |
| | | <span class="data">{{passRate}}</span> |
| | | <Echarts ref="chart" |
| | | :legend="pieLegend" |
| | | :series="materialPieSeries" |
| | | :tooltip="pieTooltip" |
| | | style="height: 36vh;"></Echarts> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div class="pie-card"> |
| | | <div class="title"><span style="color: #F56C6C">æ¬æ</span>æ£éªç±»åæ°é</div> |
| | | <Echarts ref="chart" |
| | | :chartStyle="chartStyle2" |
| | | :legend="pieLegend" |
| | | :series="materialPieSeries1" |
| | | :tooltip="pieTooltip" |
| | | style="height: 36vh;"></Echarts> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div class="pie-card"> |
| | | <div class="title">åææ<span style="color: #F56C6C">æ¬æ</span>ä¸<span style="color: #F56C6C">䏿</span>åæ ¼ç对æ¯</div> |
| | | <Echarts ref="chart" |
| | | :barColors="barColors2" |
| | | :chartStyle="chartStyle" |
| | | :grid="grid" |
| | | :legend="barLegend" |
| | | :series="barSeries" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis1" |
| | | :yAxis="yAxis1" |
| | | style="height: 36vh;"></Echarts> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <div class="inspection-card"> |
| | | <div class="title">åæ ¼ç</div> |
| | | <Echarts ref="chart" |
| | | :barColors="barColors" |
| | | :grid="grid" |
| | | :legend="legend" |
| | | :lineColors="lineColors" |
| | | :options="echartsOptions" |
| | | :series="echartsSeries" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis" |
| | | :yAxis="yAxis" |
| | | style="height: 40vh;"></Echarts> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Echarts from "@/components/echarts/echarts.vue"; |
| | | import { |
| | | getOrderTypeCookie, |
| | | getRawPassRateByBarChart, |
| | | getRawPassRateByCake, |
| | | getRawUpMonth |
| | | } from "@/api/statisticalCharts/dataAnalysis"; |
| | | |
| | | export default { |
| | | name: "QualificationRateStatistics", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {Echarts}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | dateType: '1', |
| | | datePicker: [], |
| | | beginDate: '', |
| | | endDate: '', |
| | | sampleName: '', |
| | | modelName: '', |
| | | supplierName: '', |
| | | echartsOptions: { |
| | | title: { |
| | | text: '示ä¾å¾è¡¨', |
| | | left: 'center' |
| | | } |
| | | }, |
| | | xAxis: [ |
| | | { |
| | | type: 'category', |
| | | data: [], |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | } |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | type: 'value', |
| | | name: 'æ»æ°', |
| | | min: 0, |
| | | }, |
| | | { |
| | | type: 'value', |
| | | name: 'åæ ¼ç', |
| | | min: 0, |
| | | max: 100, |
| | | axisLabel: { |
| | | formatter: '{value} %' |
| | | } |
| | | } |
| | | ], |
| | | echartsSeries: [ |
| | | { |
| | | name: 'æ»æ°', |
| | | type: 'bar', |
| | | data: [], |
| | | label: { |
| | | show: true, |
| | | position: 'top' |
| | | }, |
| | | }, |
| | | { |
| | | name: 'åæ ¼ç', |
| | | type: 'line', |
| | | smooth: true, |
| | | tooltip: { |
| | | valueFormatter: function (value) { |
| | | return value + ' %'; |
| | | } |
| | | }, |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | formatter: function (value) { |
| | | return value.value + ' %'; |
| | | }, |
| | | distance: 14 |
| | | }, |
| | | yAxisIndex: 1, |
| | | data: [] |
| | | }, |
| | | ], |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data: ['æ»æ°','åæ ¼ç'] |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | } |
| | | }, |
| | | lineColors: ['#409EFF'], |
| | | barColors: ['#E6A23C'], |
| | | barColors2: ['#adde8b'], |
| | | pieTooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | pieLegend: { |
| | | orient: 'vertical', |
| | | right: 20, |
| | | top: 'middle', |
| | | }, |
| | | materialPieSeries: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: ['40%', '70%'], |
| | | right: '22%', |
| | | avoidLabelOverlap: false, |
| | | itemStyle: { |
| | | borderRadius: 5, |
| | | borderColor: '#fff', |
| | | borderWidth: 2 |
| | | }, |
| | | label: { |
| | | alignTo: 'edge', |
| | | formatter: '{name|{b}}\n{time|{c}}', |
| | | edgeDistance: 10, |
| | | lineHeight: 15, |
| | | rich: { |
| | | time: { |
| | | fontSize: 10, |
| | | color: '#999' |
| | | } |
| | | }, |
| | | }, |
| | | labelLine: { |
| | | length: 20, |
| | | length2: 40, |
| | | }, |
| | | data: [ |
| | | { value: 0, name: 'ä¸åæ ¼æ°é' }, |
| | | { value: 0, name: 'åæ ¼æ°é' }, |
| | | ] |
| | | } |
| | | ], |
| | | materialPieSeries1: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: ['40%', '70%'], |
| | | right: '22%', |
| | | avoidLabelOverlap: false, |
| | | itemStyle: { |
| | | borderRadius: 5, |
| | | borderColor: '#fff', |
| | | borderWidth: 2 |
| | | }, |
| | | label: { |
| | | alignTo: 'edge', |
| | | formatter: '{name|{b}}\n{time|{c}}', |
| | | edgeDistance: 10, |
| | | lineHeight: 15, |
| | | rich: { |
| | | time: { |
| | | fontSize: 10, |
| | | color: '#999' |
| | | } |
| | | }, |
| | | }, |
| | | labelLine: { |
| | | length: 20, |
| | | length2: 50, |
| | | }, |
| | | data: [ |
| | | { value: 0, name: 'å§ææ£éª' }, |
| | | { value: 0, name: 'è¿åæ£éª' }, |
| | | { value: 0, name: 'å£åº¦æ£éª' }, |
| | | { value: 0, name: 'æ½æ ·' }, |
| | | ] |
| | | } |
| | | ], |
| | | barLegend: {}, |
| | | chartStyle: { |
| | | width: '90%', |
| | | height: '100%', |
| | | }, |
| | | chartStyle2: { |
| | | width: '90%', |
| | | height: '80%', |
| | | }, |
| | | xAxis1: [ |
| | | { |
| | | type: 'value', |
| | | min: 0, |
| | | max: 100, |
| | | axisLabel: { |
| | | formatter: '{value} %' |
| | | } |
| | | } |
| | | ], |
| | | yAxis1: [ |
| | | { |
| | | type: 'category', |
| | | data: [] |
| | | } |
| | | ], |
| | | barSeries: [ |
| | | { |
| | | type: 'bar', |
| | | data: [], |
| | | tooltip: { |
| | | valueFormatter: function (value) { |
| | | return value + ' %'; |
| | | } |
| | | }, |
| | | label: { |
| | | show: true, |
| | | formatter: (params) => Math.round(params.value * 100) / 100 + '%' |
| | | } |
| | | }, |
| | | ], |
| | | tableData: [], |
| | | passRate: '', |
| | | sum: '', |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getBar() |
| | | this.getRawPass() |
| | | this.getOrderType() |
| | | this.getPassRateCom() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // è·ååæ ¼çå¾è¡¨æ°æ® |
| | | getBar() { |
| | | const params = { |
| | | dateType: this.dateType, |
| | | beginDate: this.beginDate, |
| | | endDate: this.endDate, |
| | | sampleName: this.sampleName, |
| | | modelName: this.modelName, |
| | | supplierName: this.supplierName, |
| | | } |
| | | getRawPassRateByBarChart(params).then((res) => { |
| | | let lineData = [] |
| | | let barData = [] |
| | | let xAxis = [] |
| | | res.data.forEach(item => { |
| | | barData.push(item.sum) |
| | | lineData.push(item.passRate) |
| | | xAxis.push(item.searchTime) |
| | | }) |
| | | this.echartsSeries[0].data = barData |
| | | this.echartsSeries[1].data = lineData |
| | | this.yAxis[0].max = Math.ceil(Math.max.apply(null, barData) / 50) * 50 |
| | | this.yAxis[0].interval = this.yAxis[0].max / 5 |
| | | this.xAxis[0].data = xAxis |
| | | }) |
| | | }, |
| | | // è·ååææåæ ¼çå¾è¡¨æ°æ® |
| | | getRawPass() { |
| | | const params = { |
| | | dateType: this.dateType, |
| | | beginDate: this.beginDate, |
| | | endDate: this.endDate, |
| | | sampleName: this.sampleName, |
| | | modelName: this.modelName, |
| | | supplierName: this.supplierName, |
| | | } |
| | | getRawPassRateByCake(params).then((res) => { |
| | | this.materialPieSeries[0].data[0].value = res.data.unQualified |
| | | this.materialPieSeries[0].data[1].value = res.data.qualified |
| | | this.passRate = res.data.passRate + '%' |
| | | }) |
| | | }, |
| | | // è·åæ¬ææ£éªç±»åæ°é |
| | | getOrderType() { |
| | | getOrderTypeCookie().then((res) => { |
| | | if (res.code === 201) return |
| | | this.materialPieSeries1[0].data[0].value = res.data.customer // å§æ |
| | | this.materialPieSeries1[0].data[1].value = res.data.enter // è¿å |
| | | this.materialPieSeries1[0].data[2].value = res.data.quarterly // å£åº¦ |
| | | this.materialPieSeries1[0].data[3].value = res.data.spotCheck // æ½æ · |
| | | }) |
| | | }, |
| | | // æ¬æä¸ä¸æåæ ¼çå¯¹æ¯ |
| | | getPassRateCom() { |
| | | getRawUpMonth().then((res) => { |
| | | let month = [] |
| | | let barData = [] |
| | | res.data.forEach(item => { |
| | | month.push(item.month) |
| | | barData.push(item.passRate) |
| | | }) |
| | | this.yAxis1[0].data = month |
| | | this.barSeries[0].data = barData |
| | | }) |
| | | }, |
| | | changeDate () { |
| | | this.getBar() |
| | | this.getRawPass() |
| | | // this.getOrderType() |
| | | // this.getPassRateCom() |
| | | }, |
| | | changeDatePicker (val) { |
| | | if (val) { |
| | | this.beginDate = val[0] + ' 00:00:00' |
| | | this.endDate = val[1] + ' 23:59:59' |
| | | } else { |
| | | this.beginDate = '' |
| | | this.endDate = '' |
| | | } |
| | | this.getBar() |
| | | this.getRawPass() |
| | | // this.getOrderType() |
| | | // this.getPassRateCom() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | padding: 10px 0 0 20px; |
| | | } |
| | | .table { |
| | | padding: 0 10px 10px; |
| | | } |
| | | .pie-card { |
| | | width: 100%; |
| | | background: #FFFFFF; |
| | | margin-top: 10px; |
| | | position: relative; |
| | | } |
| | | .data { |
| | | position: absolute; |
| | | font-size: 20px; |
| | | transform: translate(-50%); |
| | | left: 40%; |
| | | top: 42%; |
| | | z-index: 1; |
| | | } |
| | | .inspection-card{ |
| | | width: 100%; |
| | | background: #FFFFFF; |
| | | margin-top: 10px; |
| | | } |
| | | </style> |
| | |
| | | this.$refs.upload.clearFiles() |
| | | this.uploadDia = false |
| | | this.uploading = false |
| | | if (response.code === 201) { |
| | | this.$message.error(response.message) |
| | | if (response.code !== 200) { |
| | | this.$message.error(response.msg) |
| | | return |
| | | } |
| | | this.$message.success('ä¸ä¼ æå') |