|
@@ -3,7 +3,7 @@
|
|
|
<div class="CompanyAccount-mai">
|
|
|
<div class="CompanyAccount1">
|
|
|
<div class="CompanyAccount1-R">
|
|
|
- <el-input v-model="page.name" placeholder="请输入账户" @keyup.enter.native="search" clearable></el-input>
|
|
|
+ <el-input v-model="pages.T_name" placeholder="请输入账户" @keyup.enter.native="search" clearable></el-input>
|
|
|
<el-button class="s1 sBtn" type="primary" icon="el-icon-search">搜索</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -11,25 +11,71 @@
|
|
|
<el-table :data="tableData" border size="small">
|
|
|
<el-table-column label="账号">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.date }}</span>
|
|
|
+ <span>{{ scope.row.T_name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button size="mini" @click="handleEdit1(scope.row)">验证方案</el-button>
|
|
|
- <el-button size="mini" @click="handleEdit2(scope.row)">验证报告</el-button>
|
|
|
- <el-button size="mini" @click="handleEdit3(scope.row)">校准证书</el-button>
|
|
|
+ <el-button size="mini" :disabled="scope.row.T_pdf1===''?true:false" @click="handleEdit1(scope.row)">验证方案</el-button>
|
|
|
+ <el-button size="mini" :disabled="scope.row.T_pdf2===''?true:false" @click="handleEdit2(scope.row)">验证报告</el-button>
|
|
|
+ <el-button size="mini" :disabled="scope.row.T_pdf3===''?true:false" @click="handleEdit3(scope.row)">校准证书</el-button>
|
|
|
<el-button size="mini" @click="handleEdit4(scope.row)">验证数据</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div class="CompanyAccount3">
|
|
|
- <el-pagination @current-change="handleCurrentChange" :current-page="page.pagez" :page-size="page.page_size"
|
|
|
+ <el-pagination @current-change="handleCurrentChange" :current-page="pages.page" :page-size="pages.page_z"
|
|
|
layout="total, prev, pager, next, jumper" :total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-drawer title="验证设备数据" :visible.sync="Drawer" direction="rtl" ref="drawer" size="90%">
|
|
|
+ <div class="demo-drawers">
|
|
|
+ <div class="demoDra1">
|
|
|
+ <div class="demoDra1-R">
|
|
|
+ <el-input class="s1" v-model="pages.name" placeholder="请输入SN" clearable></el-input>
|
|
|
+ <el-input class="s1" v-model="pages.name" placeholder="请输入编号" clearable></el-input>
|
|
|
+ <el-date-picker class="s1" v-model="pages.name" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
|
|
|
+ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="searchTimeData">
|
|
|
+ </el-date-picker>
|
|
|
+ <el-button class="s1 sBtn" type="primary" icon="el-icon-search"></el-button>
|
|
|
+ </div>
|
|
|
+ <div class="demoDra1-L s1">
|
|
|
+ <el-button type="primary" icon="el-icon-download" @click="Dowload">下载</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="demoDra2">
|
|
|
+ <el-table :data="tableData" border size="small">
|
|
|
+ <el-table-column label="ID">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.date }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="设备编号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.name }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="SN">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.date }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="温度℃">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.name }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="demoDra3">
|
|
|
+ <el-pagination @current-change="handleCurrentChange" :current-page="pages.page" :page-size="pages.page_z"
|
|
|
+ layout="total, prev, pager, next, jumper" :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
<pdf ref="pdf"></pdf>
|
|
|
<el-empty description="暂无其他内容"></el-empty>
|
|
|
</div>
|
|
@@ -39,7 +85,9 @@
|
|
|
import pdf from "./pdf.vue"
|
|
|
import Axios from 'axios'
|
|
|
import fileDownload from 'js-file-download'
|
|
|
-
|
|
|
+ import {
|
|
|
+ TaskList,ExtData
|
|
|
+ } from '@/api/CompanyAccount'
|
|
|
export default {
|
|
|
name:'CompanyAccount',
|
|
|
components: { //组件
|
|
@@ -47,30 +95,41 @@
|
|
|
},
|
|
|
data() {
|
|
|
return{
|
|
|
+ Drawer:false,
|
|
|
src: '',
|
|
|
dia: null,
|
|
|
total: 30,
|
|
|
- page: {
|
|
|
- pagez: 1,
|
|
|
- page_size: 10,
|
|
|
- name: ''
|
|
|
+ pages: {
|
|
|
+ page: 1,
|
|
|
+ page_z: 10,
|
|
|
+ T_name: ''
|
|
|
+ },
|
|
|
+ pages1:{
|
|
|
+ T_task_id:'',
|
|
|
+ // T_sn:'',
|
|
|
+ // T_id:'',
|
|
|
+ // Time_start:'',
|
|
|
+ // Time_end:'',
|
|
|
+ // page: 1,
|
|
|
+ // page_z: 10,
|
|
|
},
|
|
|
- tableData: [{
|
|
|
- date: '2021-冷库',
|
|
|
- name: '数据采集工程师',
|
|
|
- time: '2022-12-21 12:00:00'
|
|
|
- }, {
|
|
|
- date: '2021-冷库',
|
|
|
- name: '冷链负责人',
|
|
|
- time: '2022-12-21 12:00:00'
|
|
|
- }, {
|
|
|
- date: '2021-冷库',
|
|
|
- name: '冷链负责人',
|
|
|
- time: '2022-12-21 12:00:00'
|
|
|
- }],
|
|
|
+ tableData: [],
|
|
|
+ tableData1: [],
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.GetTkListApi()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ GetTkListApi(){
|
|
|
+ TaskList(this.pages).then(res=>{
|
|
|
+ console.log('劣币送',res)
|
|
|
+ if(res.data.Code===200){
|
|
|
+ this.tableData = res.data.Data.List
|
|
|
+ this.total = res.data.Data.Num
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
handleEdit1(e){
|
|
|
this.$refs.pdf.SetPdf()
|
|
|
},
|
|
@@ -81,6 +140,24 @@
|
|
|
this.$refs.pdf.SetPdf()
|
|
|
},
|
|
|
handleEdit4(e){
|
|
|
+ console.log('搜索',e)
|
|
|
+ this.pages1.T_task_id = 'ixEfo5zk2Oeb'
|
|
|
+ // this.pages1.T_id = e.Id
|
|
|
+ // this.pages1.T_sn = e.T_sn
|
|
|
+ this.GetExtDataApi()
|
|
|
+ },
|
|
|
+ GetExtDataApi(){
|
|
|
+ console.log('搜索',this.pages1)
|
|
|
+ ExtData(this.pages1).then(res=>{
|
|
|
+ console.log('劣币送',res)
|
|
|
+ this.Drawer = true
|
|
|
+ if(res.data.Code===200){
|
|
|
+ this.tableData1 = res.data.Data.List
|
|
|
+ this.total = res.data.Data.Num
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ Dowload(){//下载数据
|
|
|
fileDownload('res.data', '111.docx');
|
|
|
// Axios({
|
|
|
// method: 'get',
|
|
@@ -91,18 +168,25 @@
|
|
|
// fileDownload(res.data, '111.docx');
|
|
|
// });
|
|
|
},
|
|
|
+ searchTimeData(e) {
|
|
|
+ console.log('时间选择', e)
|
|
|
+ },
|
|
|
search() { //回车搜索
|
|
|
- console.log('搜索', this.page.name);
|
|
|
+ console.log('搜索', this.pages.T_name);
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
- this.page.pagez = val
|
|
|
- console.log('当前页', this.page);
|
|
|
+ this.pages.page = val
|
|
|
+ console.log('当前页', this.pages);
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ .el-input {
|
|
|
+ margin-right: 10px;
|
|
|
+ width: 200px;
|
|
|
+ }
|
|
|
.CompanyAccount{
|
|
|
height: 100%;
|
|
|
overflow: hidden;
|
|
@@ -128,5 +212,38 @@
|
|
|
margin-top: 40px;
|
|
|
}
|
|
|
}
|
|
|
+ .demo-drawers{
|
|
|
+ padding:0 20px;
|
|
|
+ .demoDra1 {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ .demoDra1-L {
|
|
|
+ .s1{
|
|
|
+ margin-bottom: 10px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .demoDra1-R {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ align-items: center;
|
|
|
+ .s1{
|
|
|
+ margin-bottom: 10px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .demoDra2 {
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .demoDra3 {
|
|
|
+ margin-top: 40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
</style>
|