modified: package.json
modified: src/api/standardLibrary.js
new file: src/components/experiment/checkTheReport/index.vue
modified: src/layout/components/Navbar.vue
modified: src/main.js
modified: src/router/index.js
modified: src/views/chart/work/index.vue
modified: src/views/experiment/checkTheReport/index.vue
modified: src/views/standardLibrary/index.vue
| | |
| | | "nprogress": "0.2.0", |
| | | "path-to-regexp": "2.4.0", |
| | | "postcss-pxtorem": "^5.1.1", |
| | | "print-js": "^1.6.0", |
| | | "vue": "2.6.10", |
| | | "vue-clipboard2": "^0.3.3", |
| | | "vue-router": "3.0.6", |
| | |
| | | }) |
| | | } |
| | | |
| | | //è·åææçæ¬ |
| | | export function getVersion(params){ |
| | | return request({ |
| | | url: '/product/chooseVersion', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | //æ·»å åä¸ä¸ªåå·çå
¶ä»çæ¬ |
| | | export function addVersion(params){ |
| | | return request({ |
| | | url: '/product/addVersion', |
| | | method: 'post', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | // è·åææé¡¹ç® |
| | | export function getProductList(params) { |
| | | return request({ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="preview-main"> |
| | | <div class="logo"> |
| | | <img :src="logoSrc" /> |
| | | </div> |
| | | <div class="center"> |
| | | <h1>åæææ£æµæ¥å</h1> |
| | | <table> |
| | | <tr> |
| | | <td>ææåç§°</td> |
| | | <td colspan="5"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>è§æ ¼åå·</td> |
| | | <td colspan="2"></td> |
| | | <td>ææåå®¶</td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>æææ¹å·</td> |
| | | <td colspan="2"></td> |
| | | <td>æ£æµç¼å·</td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>æ£æµä¾æ®</td> |
| | | <td colspan="2"></td> |
| | | <td>æ£æµç±»å«</td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr> |
| | | <td>åºå·</td> |
| | | <td>æ£éªé¡¹ç®</td> |
| | | <td>åä½</td> |
| | | <td>æ åè¦æ±</td> |
| | | <td>æ£æµç»æ</td> |
| | | <td>å项夿</td> |
| | | </tr> |
| | | <tr v-for="item in 15" :key="item"> |
| | | <td>{{item}}</td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="6">æ£éªç»è®ºï¼</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="6"> |
| | | 注ï¼âââ表示该项ç®åæ ¼ï¼âÃâ表示该项ç®ä¸åæ ¼âââ表示该项ç®ä¸è¦æ±æ£æµã |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <el-row class="date-group" :gutter="20"> |
| | | <el-col :span="8">æ£æµãæ¥æï¼<span>2023-08-25</span></el-col> |
| | | <el-col :span="8">å®¡æ ¸ãæ¥æï¼<span>2023-08-25</span></el-col> |
| | | <el-col :span="8">æ¹åãæ¥æï¼<span>2023-08-25</span></el-col> |
| | | </el-row> |
| | | <p class="footer"> |
| | | <span>ç¼å·:</span><span>ZTT/ICSRCP18-003</span> |
| | | <span> åè¡æ¥æ:</span><span>2023-08-25</span> |
| | | <span> åè¡é¨é¨:</span><span>è´¨éé¨</span> |
| | | <span> ä¿åæé:</span><span>é¿æ</span> |
| | | </p> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default({ |
| | | data() { |
| | | return { |
| | | logoSrc : require("@/assets/404_images/logo.png"), |
| | | } |
| | | } |
| | | }) |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .preview-main{ |
| | | margin: 0; |
| | | padding: 0; |
| | | width:90%; |
| | | margin-left: 5%; |
| | | .logo{ |
| | | img{ |
| | | width: 150px; |
| | | height: 60px; |
| | | } |
| | | } |
| | | .center{ |
| | | width: 100%; |
| | | h1{ |
| | | width:100%; |
| | | font-family: "微软é
é»" !important; |
| | | text-align: center; |
| | | } |
| | | table{ |
| | | width:100%; |
| | | height:100vh; |
| | | border-collapse: collapse; |
| | | font-size: 18px; |
| | | } |
| | | table,tr,th,td{ |
| | | border: 2px solid black; |
| | | } |
| | | tr,td,th{ |
| | | padding: 15px 20px; |
| | | } |
| | | .date-group .el-col{ |
| | | text-align: center; |
| | | padding: 50px 0px; |
| | | font-size: 18px; |
| | | } |
| | | .footer{ |
| | | margin: 0; |
| | | padding: 0; |
| | | width:90%; |
| | | margin-left: 5%; |
| | | color: gray; |
| | | text-align: center; |
| | | margin-top: 250px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <el-dialog title="ä¿®æ¹å¯ç " :visible.sync="dialogFormVisible" :append-to-body="true"> |
| | | <el-dialog title="ä¿®æ¹å¯ç " :visible.sync="dialogFormVisible" :append-to-body="true" width="40%"> |
| | | <el-form :model="form"> |
| | | <el-form-item label="æ§å¯ç " :label-width="formLabelWidth"> |
| | | <el-input v-model="form.oldPwd" autocomplete="off"></el-input> |
| | |
| | | confirmPwd: '' |
| | | }, |
| | | dialogFormVisible: false, |
| | | formLabelWidth: '120px' |
| | | formLabelWidth: '120px', |
| | | user: { |
| | | id: null, |
| | | name: 'value' |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | 'avatar' |
| | | ]) |
| | | }, |
| | | data() { |
| | | return { |
| | | user: { |
| | | id: null, |
| | | name: 'value' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | this.getUser() |
| | | }, |
| | |
| | | import echarts from 'echarts' |
| | | Vue.prototype.$echarts = echarts |
| | | |
| | | import print from 'print-js' |
| | | |
| | | import '@/icons' // icon |
| | | import '@/permission' // permission control |
| | |
| | | { |
| | | path: 'message', |
| | | name: 'Message', |
| | | // hidden: true, |
| | | component: () => import('@/views/message/message/index'), |
| | | // meta: { title: 'æçæ¶æ¯', icon: 'table' } |
| | | }, |
| | |
| | | }, |
| | | } |
| | | }, |
| | | mounted(){ |
| | | // this.initLeaderStatiChart(""); |
| | | this.initLeaderTimelyChart("leaderTimely"); |
| | | this.initTesterStatiChart("testerStati"); |
| | | this.initTesterTimelyChart("testerTimely"); |
| | | }, |
| | | mounted(){}, |
| | | methods: { |
| | | async queryData(){ |
| | | let date = this.formInline.date; |
| | |
| | | series: [ |
| | | { |
| | | name: '已宿', |
| | | barWidth: '20%', |
| | | barWidth: '30%', |
| | | type: 'bar', |
| | | stack: 'one', |
| | | emphasis: emphasisStyle, |
| | |
| | | option && myChart.setOption(option); |
| | | }, |
| | | initTesterStatiChart(id,executeMater){ |
| | | console.log("qqq----",executeMater); |
| | | var chartDom = document.getElementById(id); |
| | | var myChart = echarts.init(chartDom); |
| | | window.addEventListener('resize', function() { |
| | | myChart.resize(); |
| | | }); |
| | | var option; |
| | | |
| | | let max = 0; |
| | | let xAxisData = []; |
| | | let data1 = []; |
| | | let data2 = []; |
| | | // for(let i=0;i<executeMater.length;i++){ |
| | | // xAxisData.push(executeMater[i].name); |
| | | // data1.push(executeMater[i].finsh); |
| | | // data2.push(executeMater[i].unfinsh); |
| | | // } |
| | | for(let i=0;i<executeMater.length;i++){ |
| | | xAxisData.push(executeMater[i].name); |
| | | data1.push(executeMater[i].finsh); |
| | | data2.push(executeMater[i].unfinsh); |
| | | let sum = executeMater[i].finsh + executeMater[i].unfinsh; |
| | | if(sum > max){ |
| | | max = sum; |
| | | } |
| | | } |
| | | var emphasisStyle = { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | |
| | | }, |
| | | yAxis: { |
| | | min: 0, |
| | | max: 60, |
| | | interval: 10, |
| | | max: max, |
| | | interval: 1, |
| | | }, |
| | | grid: { |
| | | bottom: 100 |
| | |
| | | name: 'æ°æ®1', |
| | | type: 'bar', |
| | | stack: 'one', |
| | | barWidth: '30%', |
| | | emphasis: emphasisStyle, |
| | | data: data1, |
| | | itemStyle:{ |
| | |
| | | name: 'æ°æ®2', |
| | | type: 'bar', |
| | | stack: 'one', |
| | | barWidth: '30%', |
| | | emphasis: emphasisStyle, |
| | | data: data2, |
| | | itemStyle:{ |
| | |
| | | myChart.resize(); |
| | | }); |
| | | var option; |
| | | let xAxisData = []; |
| | | let data1 = []; |
| | | let data2 = []; |
| | | let yAxisData1 = 0; |
| | | for(let i=0;i<dutyTimely.length;i++){ |
| | | xAxisData.push(dutyTimely[i].name); |
| | | data1.push(dutyTimely[i].total); |
| | | data2.push(dutyTimely[i].timely); |
| | | if(dutyTimely[i].total > yAxisData1){ |
| | | yAxisData1 = dutyTimely[i].total; |
| | | } |
| | | } |
| | | option = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | { |
| | | name: 'å§å', |
| | | type: 'category', |
| | | data: ['æ²ç§',], |
| | | data: xAxisData, |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | }, |
| | | itemStyle: { |
| | | top: '20px' |
| | | } |
| | | } |
| | | ], |
| | | yAxis: [ |
| | |
| | | type: 'value', |
| | | name: 'æ°é', |
| | | min: 0, |
| | | max: 10, |
| | | max: yAxisData1, |
| | | interval: 1, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | |
| | | { |
| | | name: 'æ ·åæ°', |
| | | type: 'bar', |
| | | barWidth: '20%', |
| | | barWidth: '30%', |
| | | tooltip: { |
| | | valueFormatter: function (value) { |
| | | return value; |
| | | } |
| | | }, |
| | | data: [4.0], |
| | | data: data1, |
| | | itemStyle: { |
| | | color: '#9fceff' |
| | | } |
| | |
| | | { |
| | | name: '宿忶ç', |
| | | type: 'line', |
| | | yAxisIndex: 1, |
| | | tooltip: { |
| | | valueFormatter: function (value) { |
| | | return value + ' %'; |
| | | } |
| | | }, |
| | | data: [7.5], |
| | | data: [{value:20},{value:40}], |
| | | itemStyle: { |
| | | color: '#d2eec5' |
| | | } |
| | | }, |
| | | ] |
| | | }; |
| | | |
| | | option && myChart.setOption(option); |
| | | }, |
| | | initTesterTimelyChart(id,executeTimely){ |
| | |
| | | myChart.resize(); |
| | | }); |
| | | var option; |
| | | let xAxisData = []; |
| | | let data1 = []; |
| | | let data2 = []; |
| | | let yAxisData1 = 0; |
| | | for(let i=0;i<executeTimely.length;i++){ |
| | | xAxisData.push(executeTimely[i].name); |
| | | data1.push(executeTimely[i].total); |
| | | data2.push(executeTimely[i].timely); |
| | | if(executeTimely[i].total > yAxisData1){ |
| | | yAxisData1 = executeTimely[i].total; |
| | | } |
| | | } |
| | | option = { |
| | | tooltip: { |
| | | trigger: 'axis', |
| | |
| | | xAxis: [ |
| | | { |
| | | type: 'category', |
| | | data: ["","",""], |
| | | data: xAxisData, |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | } |
| | |
| | | type: 'value', |
| | | name: '', |
| | | min: 0, |
| | | max: 50, |
| | | interval: 5, |
| | | max: yAxisData1, |
| | | interval: 1, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | } |
| | |
| | | { |
| | | name: 'é¡¹ç®æ°', |
| | | type: 'bar', |
| | | barWidth: '30%', |
| | | tooltip: { |
| | | valueFormatter: function (value) { |
| | | return value ; |
| | | } |
| | | }, |
| | | data: [2.0, 4.9, 7.0], |
| | | data: data1, |
| | | itemStyle: { |
| | | color: '#5087ec' |
| | | } |
| | |
| | | return value + ' %'; |
| | | } |
| | | }, |
| | | data: [2.0, 2.2, 3.3], |
| | | data: data2, |
| | | itemStyle: { |
| | | color: '#68bbc4' |
| | | } |
| | |
| | | > |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | top="10vh" |
| | | title="æ¥åé¢è§" |
| | | :visible.sync="dialogVisible" |
| | | width="60%"> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" size="small" @click="printFun()">æå°</el-button> |
| | | </span> |
| | | <div class="printStyle"> |
| | | <preview id="printDiv"></preview> |
| | | </div> |
| | | </el-dialog> |
| | | <div class="table-box"> |
| | | <el-table |
| | | ref="reportTable" |
| | |
| | | <el-button |
| | | type="text" |
| | | size="small" |
| | | @click="handleClick(scope.row)" |
| | | @click="previewFun(scope.row)" |
| | | >é¢è§</el-button |
| | | > |
| | | <el-button type="text" size="small">æå°</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | |
| | | <script> |
| | | import { selectAllReport } from "@/api/experiment/checkTheReport"; |
| | | import Preview from "@/components/experiment/checkTheReport/index.vue"; |
| | | import PrintJS from 'print-js' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | total: 0, |
| | | pageSize: 10, |
| | | checked: true, |
| | | dialogVisible: false, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getData(); |
| | | }, |
| | | mounted(){ |
| | | // this.dialogVisible = true; |
| | | }, |
| | | components:{ |
| | | Preview |
| | | }, |
| | | methods: { |
| | | //é¢è§æé® |
| | | previewFun(){ |
| | | this.dialogVisible = true; |
| | | }, |
| | | //æå°æé® |
| | | printFun(){ |
| | | PrintJS({ |
| | | printable: "printDiv", |
| | | type: "html", |
| | | // header: "åæææ£æµæ¥å", |
| | | targetStyles: ["*"], |
| | | ignoreElements: ["no-ignore"], |
| | | }); |
| | | }, |
| | | // ç¶ææé® |
| | | handleRadioChange() { |
| | | this.getData(); |
| | |
| | | }; |
| | | const { data } = await selectAllReport(params); |
| | | this.reportTable = data.row; |
| | | console.log(data.row); |
| | | this.total = data.total; |
| | | }, |
| | | }, |
| | |
| | | margin: 10px 0; |
| | | } |
| | | } |
| | | .printStyle{ |
| | | overflow: scroll; |
| | | height:600px; |
| | | .el-button{ |
| | | position: absolute; |
| | | top: 10vh; |
| | | left: 90%; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <div class="table-header"> |
| | | <div class="serve-btn"> |
| | | <span class="tipMsg">{{ msg !== "" ? msg : "" }}</span> |
| | | <el-select v-model="versionValue" @change="changeSelect" clearable placeholder="è¯·éæ©çæ¬å·"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-button type="primary" @click="addVersionFun">æ°å¢çæ¬å·</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | |
| | | addSpecifications, |
| | | deleteListApi, |
| | | blurUpdateApi, |
| | | getVersion, |
| | | addVersion |
| | | } from "@/api/standardLibrary"; |
| | | |
| | | import { selectproductModelApi } from "@/api/basicData/index"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | options:[], |
| | | versionValue: '', |
| | | deleteList: [], |
| | | msg: "", |
| | | isAllSelect: false, |
| | |
| | | created() { |
| | | this.getStandardTree(); |
| | | }, |
| | | mounted(){ |
| | | |
| | | }, |
| | | methods: { |
| | | async initSelect(){ |
| | | this.options = []; |
| | | this.versionValue = ""; |
| | | const response = await getVersion({"specificationsId":this.selectData.id}); |
| | | if(response.code===200 && response.data.length>0){ |
| | | this.getTableByClick(this.selectData,response.data[0]) |
| | | for(let i=0;i<response.data.length;i++){ |
| | | this.options.push({ |
| | | value: response.data[i], |
| | | label: "V" + response.data[i] |
| | | }) |
| | | this.versionValue = response.data[0]; |
| | | } |
| | | } |
| | | }, |
| | | changeSelect(){ |
| | | this.tableData = []; |
| | | this.getTableByClick(this.selectData,this.versionValue); |
| | | }, |
| | | async insertVersion(){ |
| | | const resp = await addVersion({"specificationsId":this.selectData.id}); |
| | | if(resp.code===200){ |
| | | this.initSelect(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: resp.message |
| | | }); |
| | | } |
| | | }, |
| | | addVersionFun() { |
| | | this.$confirm('ç¡®è®¤æ·»å æ°ççæ¬å·å?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.insertVersion(); |
| | | }).catch(() => {}); |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | |
| | | this.getParentData(node.parent, node.data.name); |
| | | // åä¸éä¸èç¹ |
| | | this.selectData = data; |
| | | this.getTableByClick(data); |
| | | this.getTableByClick(data,this.versionValue); |
| | | this.initSelect(); |
| | | } |
| | | if (!("children" in data)) { |
| | | return; |
| | |
| | | this.getParentData(node.parent, this.msg); |
| | | } |
| | | }, |
| | | async getTableByClick(data) { |
| | | async getTableByClick(data,versionVal) { |
| | | await getProductList({ |
| | | specificationsId: data.id, |
| | | version: versionVal |
| | | }).then((res) => { |
| | | res.data.forEach((i) => { |
| | | if (i.name === undefined) { |
| | |
| | | addTypeArr: [], |
| | | }; |
| | | this.getStandardTree(); |
| | | this.getTableByClick(this.selectData); |
| | | this.getTableByClick(this.selectData,this.versionValue); |
| | | }, |
| | | changeCascader(data) { |
| | | this.addTreeForm.addTypeArr = data; |
| | |
| | | message: res.message, |
| | | type: "success", |
| | | }); |
| | | this.getTableByClick(this.selectData); |
| | | this.getTableByClick(this.selectData,this.versionValue); |
| | | }); |
| | | }, |
| | | async requiredOnfocus(scope) { |
| | |
| | | message: res.message, |
| | | type: "success", |
| | | }); |
| | | this.getTableByClick(this.selectData); |
| | | this.getTableByClick(this.selectData,this.versionValue); |
| | | }); |
| | | }, |
| | | }, |
| | |
| | | width: 100%; |
| | | padding-bottom: 6px; |
| | | text-align: right; |
| | | .el-select{ |
| | | margin-right:20px; |
| | | } |
| | | } |
| | | .tipMsg { |
| | | float: left; |