|
|
@@ -77,12 +77,14 @@
|
|
|
<el-table-column prop="EntrustNo" sortable min-width="100" label="委托单号" align="center"></el-table-column>
|
|
|
<el-table-column prop="CustomerName" sortable min-width="90" label="委托方名称" align="center"></el-table-column>
|
|
|
<el-table-column prop="TestDetail" sortable min-width="100" label="检测项目" align="center"></el-table-column>
|
|
|
- <el-table-column prop="CheckStatus" sortable min-width="90" label="代办工作" align="center">
|
|
|
+ <el-table-column prop="CheckStatus" sortable min-width="90" label="待办工作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag size="small" v-show="scope.row.CheckStatus=='0'" type="danger">数据录入</el-tag>
|
|
|
<el-tag size="small" v-show="scope.row.CheckStatus=='1'" type="success">数据校核</el-tag>
|
|
|
<el-tag size="small" v-show="scope.row.CheckStatus=='2'" type="info">数据审批</el-tag>
|
|
|
- <el-tag size="small" v-show="scope.row.ReportStatus=='4'" type="warning">报告签发</el-tag>
|
|
|
+ <el-tag size="small" v-show="scope.row.CheckStatus=='4'" type="info">数据审批</el-tag>
|
|
|
+ <el-tag size="small" v-show="scope.row.CheckStatus=='20'" type="warning">报告审核</el-tag>
|
|
|
+ <el-tag size="small" v-show="scope.row.CheckStatus=='30'" type="warning">报告签发</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -197,6 +199,7 @@
|
|
|
import Trend from '../components/chart/Trend'
|
|
|
import docTemplateApi from '@/api/lims/docTemplate'
|
|
|
import SalesData from '../components/chart/SalesData'
|
|
|
+ import api from '@/api/lims/dataEntry'
|
|
|
|
|
|
export default {
|
|
|
computed: {
|
|
|
@@ -402,16 +405,16 @@
|
|
|
_this.WaitData = _this.WaitData.concat(_this.usertotal.SignList)
|
|
|
}
|
|
|
},
|
|
|
- pushDoneData() {
|
|
|
+ pushDoneData () {
|
|
|
this.$axios.get('/limsdataentry/list', {}).then(res => {
|
|
|
if (res.data.items) {
|
|
|
this.DoneData = this.DoneData.concat(res.data.items)
|
|
|
}
|
|
|
this.$axios.get('/createreport/list', {}).then(res => {
|
|
|
- if (res.data.items) {
|
|
|
- this.DoneData = this.DoneData.concat(res.data.items)
|
|
|
- }
|
|
|
- })
|
|
|
+ if (res.data.items) {
|
|
|
+ this.DoneData = this.DoneData.concat(res.data.items)
|
|
|
+ }
|
|
|
+ })
|
|
|
.catch(err => {
|
|
|
// handle error
|
|
|
console.error(err)
|
|
|
@@ -433,22 +436,22 @@
|
|
|
|
|
|
},
|
|
|
|
|
|
- getNewData() {
|
|
|
- this.WaitData = [] //待办事项列表
|
|
|
- //this.DoneData = [] //已办事项列表
|
|
|
- this.EntrustX = [] //检测任务月份
|
|
|
- this.EntrustY = [] //检测任务数目
|
|
|
- this.DataEntryX = [] //数据录入月份
|
|
|
- this.DataEntryY = [] //数据录入数目
|
|
|
+ getNewData () {
|
|
|
+ this.WaitData = [] // 待办事项列表
|
|
|
+ // this.DoneData = [] // 已办事项列表
|
|
|
+ this.EntrustX = [] // 检测任务月份
|
|
|
+ this.EntrustY = [] // 检测任务数目
|
|
|
+ this.DataEntryX = [] // 数据录入月份
|
|
|
+ this.DataEntryY = [] // 数据录入数目
|
|
|
this.ProjectList = []
|
|
|
this.InstrumentX = []
|
|
|
this.InstrumentY = []
|
|
|
- this.CustomerTitle = [] //委托方
|
|
|
- this.CustomerData = [] //委托方数据
|
|
|
+ this.CustomerTitle = [] // 委托方
|
|
|
+ this.CustomerData = [] // 委托方数据
|
|
|
this.initData()
|
|
|
},
|
|
|
- //检测任务柱状图数据获取
|
|
|
- getEntrust() {
|
|
|
+ // 检测任务柱状图数据获取
|
|
|
+ getEntrust () {
|
|
|
let _this = this
|
|
|
let getime = []
|
|
|
if (!_this.Getime) {
|
|
|
@@ -466,8 +469,8 @@
|
|
|
department: this.Department,
|
|
|
}
|
|
|
_this.$axios.get('/limsindex/getentrust?getime=' + getime.join(','), {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
|
_this.EntrustX.push(res.data[i].YearName + '年' + res.data[i].MonthName + '月')
|
|
|
@@ -480,7 +483,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- drawEntrust() {
|
|
|
+ drawEntrust () {
|
|
|
let _this = this
|
|
|
var chartBar = echarts.init(document.getElementById('Entrustid'))
|
|
|
chartBar.setOption({
|
|
|
@@ -492,7 +495,7 @@
|
|
|
formatter: '({b}) {c}'
|
|
|
},
|
|
|
xAxis: {
|
|
|
- data: _this.EntrustX,
|
|
|
+ data: _this.EntrustX
|
|
|
},
|
|
|
yAxis: {},
|
|
|
series: [{
|
|
|
@@ -515,8 +518,8 @@
|
|
|
}]
|
|
|
})
|
|
|
},
|
|
|
- //数据录入柱状图数据获取
|
|
|
- getDataEntry() {
|
|
|
+ // 数据录入柱状图数据获取
|
|
|
+ getDataEntry () {
|
|
|
let _this = this
|
|
|
let getime = []
|
|
|
if (!_this.Getime) {
|
|
|
@@ -534,8 +537,8 @@
|
|
|
department: this.Department,
|
|
|
}
|
|
|
_this.$axios.get('/limsindex/getdata?getime=' + getime.join(','), {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
|
_this.DataEntryX.push(res.data[i].YearName + '年' + res.data[i].MonthName + '月')
|
|
|
@@ -548,7 +551,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- drawDataEntry() {
|
|
|
+ drawDataEntry () {
|
|
|
let _this = this
|
|
|
var chartBar = echarts.init(document.getElementById('Dataentryid'))
|
|
|
chartBar.setOption({
|
|
|
@@ -560,7 +563,7 @@
|
|
|
formatter: '({b}) {c}'
|
|
|
},
|
|
|
xAxis: {
|
|
|
- data: _this.DataEntryX,
|
|
|
+ data: _this.DataEntryX
|
|
|
},
|
|
|
yAxis: {},
|
|
|
series: [{
|
|
|
@@ -583,8 +586,8 @@
|
|
|
}]
|
|
|
})
|
|
|
},
|
|
|
- //检测报告列表获取获取
|
|
|
- getProject() {
|
|
|
+ // 检测报告列表获取获取
|
|
|
+ getProject () {
|
|
|
let _this = this
|
|
|
let getime = []
|
|
|
if (!_this.Getime) {
|
|
|
@@ -602,8 +605,8 @@
|
|
|
department: this.Department,
|
|
|
}
|
|
|
_this.$axios.get('/limsindex/getproject?getime=' + getime.join(','), {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
|
_this.ProjectList.push({
|
|
|
@@ -616,8 +619,8 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- //设备运行记录图
|
|
|
- getInstrument() {
|
|
|
+ // 设备运行记录图
|
|
|
+ getInstrument () {
|
|
|
let _this = this
|
|
|
let getime = []
|
|
|
if (!_this.Getime) {
|
|
|
@@ -635,8 +638,8 @@
|
|
|
department: this.Department,
|
|
|
}
|
|
|
_this.$axios.get('/limsindex/getinstrument?getime=' + getime.join(','), {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
// if (res.data == null) {
|
|
|
// _this.$message({
|
|
|
@@ -655,7 +658,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- drawInstrument() {
|
|
|
+ drawInstrument () {
|
|
|
let _this = this
|
|
|
var chartBar = echarts.init(document.getElementById('Instrumentid'))
|
|
|
chartBar.setOption({
|
|
|
@@ -677,11 +680,11 @@
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: 'value',
|
|
|
- boundaryGap: [0, 0.01],
|
|
|
+ boundaryGap: [0, 0.01]
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: 'category',
|
|
|
- data: _this.InstrumentX,
|
|
|
+ data: _this.InstrumentX
|
|
|
},
|
|
|
series: [{
|
|
|
name: '设备名称',
|
|
|
@@ -704,8 +707,8 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- //委托方统计环形图获取
|
|
|
- getCustomer() {
|
|
|
+ // 委托方统计环形图获取
|
|
|
+ getCustomer () {
|
|
|
let _this = this
|
|
|
let getime = []
|
|
|
if (!_this.Getime) {
|
|
|
@@ -756,7 +759,7 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- drawCustomer() {
|
|
|
+ drawCustomer () {
|
|
|
var chartPie = echarts.init(document.getElementById('Customerid'))
|
|
|
chartPie.setOption({
|
|
|
title: {
|
|
|
@@ -788,21 +791,26 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- //页面跳转
|
|
|
- gopage(val) {
|
|
|
- if (val.CheckStatus == '0' || val.CheckStatus == '1' || val.CheckStatus == '2') {
|
|
|
+ // 页面跳转
|
|
|
+ gopage (val) {
|
|
|
+ console.log(val, 'val===============')
|
|
|
+ if (val.CheckStatus === 0 || val.CheckStatus === 1) {
|
|
|
this.OpenOrignDataInput(val)
|
|
|
- } else if (val.CheckStatus == '4') {
|
|
|
+ } else if (val.CheckStatus === 4 || val.CheckStatus === 2) {
|
|
|
+ this.dataentrytoexcel(val)
|
|
|
+ } else if (val.CheckStatus === 20) {
|
|
|
this.shenHeFunc(val)
|
|
|
+ } else if (val.CheckStatus === 30) {
|
|
|
+ this.QianFaFunc(val)
|
|
|
}
|
|
|
},
|
|
|
- getDictList() {
|
|
|
+ getDictList () {
|
|
|
docTemplateApi.getDictList(this.$axios).then(res => {
|
|
|
- this.docTemplateDictList = res.data;
|
|
|
- });
|
|
|
+ this.docTemplateDictList = res.data
|
|
|
+ })
|
|
|
},
|
|
|
- //打开数据录入
|
|
|
- OpenOrignDataInput(row) {
|
|
|
+ // 打开数据录入
|
|
|
+ OpenOrignDataInput (row) {
|
|
|
let CheckStatus = row.CheckStatus
|
|
|
let eid = row.EId
|
|
|
let tbid = row.TaskId
|
|
|
@@ -819,104 +827,161 @@
|
|
|
tbid: tbid,
|
|
|
deid: DataEntryId,
|
|
|
datastatus: CheckStatus,
|
|
|
- datadocId: datadocId
|
|
|
- };
|
|
|
+ datadocId: datadocId,
|
|
|
+ sign: '1',
|
|
|
+ ischeck: CheckStatus
|
|
|
+ }
|
|
|
switch (this.docTempType) {
|
|
|
- //漏电保护
|
|
|
- case "DAYT.LeakProtect.Detail":
|
|
|
+ // 漏电保护
|
|
|
+ case 'DAYT.LeakProtect.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reportleakprotect/subdata/datalist',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
- //空气泡沫
|
|
|
- case "DAYT.Airfoamgenerator.Detail":
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
+ // 空气泡沫
|
|
|
+ case 'DAYT.Airfoamgenerator.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reportairfoamgenerator/subdata/datalist',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
- //呼吸阀
|
|
|
- case "DAYT.AtmosValve.Detail":
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
+ // 呼吸阀
|
|
|
+ case 'DAYT.AtmosValve.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reportatmosvalve/subdata/datalist',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
- //液压安全阀
|
|
|
- case "DAYT.HydraulicSafe.Detail":
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
+ // 液压安全阀
|
|
|
+ case 'DAYT.HydraulicSafe.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reporthydraulicsafe/subdata/datalist',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
- //电气接地
|
|
|
- case "DAYT.ElecGround.Detail":
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
+ // 电气接地
|
|
|
+ case 'DAYT.ElecGround.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reportelecground/subdata/datalist',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
- //防雷装置等电位
|
|
|
- case "DAYT.Equipotent.Detail":
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
+ // 防雷装置等电位
|
|
|
+ case 'DAYT.Equipotent.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reportequipotent/subdata/datalist',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
- //防雷装置
|
|
|
- case "DAYT.LightProtect.Detail":
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
+ // 防雷装置
|
|
|
+ case 'DAYT.LightProtect.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reportlightprotect/datareview',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
- //电流表
|
|
|
- case "DAYT.Ammeter.Detail":
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
+ // 电流表
|
|
|
+ case 'DAYT.Ammeter.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reportammeter/subdata/dataopera',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
- //阻火器
|
|
|
- case "DAYT.BackFire.Detail":
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
+ // 阻火器
|
|
|
+ case 'DAYT.BackFire.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reportzuhq/subdata/datalist',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
- //游梁式抽油机
|
|
|
- case "DAYT.BeamPumpingUnits.Detail":
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
+ // 游梁式抽油机
|
|
|
+ case 'DAYT.BeamPumpingUnits.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reportbeampumpingUnits/subdata/dataopera',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
- //无游梁式抽油机
|
|
|
- case "DAYT.NoBeamPumpingUnits.Detail":
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
+ // 无游梁式抽油机
|
|
|
+ case 'DAYT.NoBeamPumpingUnits.Detail':
|
|
|
this.$router.push({
|
|
|
path: '/lims/reportnobeampumpingUnits/subdata/dataopera',
|
|
|
- query: queryParams,
|
|
|
- });
|
|
|
- break;
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ break
|
|
|
|
|
|
default:
|
|
|
- this.$message.warning('无模板类型相匹配,请重试');
|
|
|
+ this.$message.warning('无模板类型相匹配,请重试')
|
|
|
}
|
|
|
},
|
|
|
- // 签发
|
|
|
- shenHeFunc(row) {
|
|
|
+ // 生成excel数据
|
|
|
+ dataentrytoexcel (row) {
|
|
|
+ api.docexport(row.Id, this.$axios)
|
|
|
+ .then(res => {
|
|
|
+ // response
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ let docurl = res.data.item
|
|
|
+ let furl = docurl.DocUrl
|
|
|
+ this.changepage(row, furl)
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 审核页面跳转
|
|
|
+ changepage (row, DocAddress) {
|
|
|
let _this = this
|
|
|
+ let queryParams = {
|
|
|
+ key: row.DocKey,
|
|
|
+ docurl: DocAddress,
|
|
|
+ dataentryId: row.Id,
|
|
|
+ docname: row.DocName,
|
|
|
+ checkstaus: row.CheckStatus
|
|
|
+ }
|
|
|
+ console.log(queryParams, 'queryParamsqueryParams==')
|
|
|
+ _this.$router.push({
|
|
|
+ path: '/lims/dataentry/onlyofficesframe',
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ },
|
|
|
+ QianFaFunc (row) {
|
|
|
+ let _this = this
|
|
|
+ if (row.ReportUrl === '') {
|
|
|
+ this.reportaddress = row.UnHGReportUrl
|
|
|
+ } else {
|
|
|
+ this.reportaddress = row.ReportUrl
|
|
|
+ }
|
|
|
let queryParams = {
|
|
|
key: row.Id + '' + row.EId,
|
|
|
- docurl: row.ReportUrl,
|
|
|
- reportId: row.Id
|
|
|
+ docurl: this.reportaddress,
|
|
|
+ reportId: row.Id,
|
|
|
+ docname : row.DocName
|
|
|
}
|
|
|
_this.$router.push({
|
|
|
path: '/lims/createreport/onlyofficesframe',
|
|
|
query: queryParams
|
|
|
})
|
|
|
},
|
|
|
+ // 签发
|
|
|
+ shenHeFunc (row) {
|
|
|
+ let _this = this
|
|
|
+ if (row.ReportUrl === '') {
|
|
|
+ this.reportaddress = row.UnHGReportUrl
|
|
|
+ } else {
|
|
|
+ this.reportaddress = row.ReportUrl
|
|
|
+ }
|
|
|
+ let queryParams = {
|
|
|
+ key: row.Id + '' + row.EId,
|
|
|
+ docurl: this.reportaddress,
|
|
|
+ reportId: row.Id,
|
|
|
+ docname : row.DocName
|
|
|
+ }
|
|
|
+ console.log(queryParams, 'queryParams===')
|
|
|
+ _this.$router.push({
|
|
|
+ path: '/lims/createreport/shenheframe',
|
|
|
+ query: queryParams
|
|
|
+ })
|
|
|
+ },
|
|
|
// searchCommand(command) {
|
|
|
// let _this = this
|
|
|
// if (command == 'entry') {
|
|
|
@@ -930,34 +995,34 @@
|
|
|
// }
|
|
|
// },
|
|
|
|
|
|
- formatDateTime(date) {
|
|
|
- var y = date.getFullYear();
|
|
|
- var m = date.getMonth() + 1;
|
|
|
- m = m < 10 ? ('0' + m) : m;
|
|
|
- var d = date.getDate();
|
|
|
- d = d < 10 ? ('0' + d) : d;
|
|
|
- var h = date.getHours();
|
|
|
- var minute = date.getMinutes();
|
|
|
- minute = minute < 10 ? ('0' + minute) : minute;
|
|
|
- return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
|
|
|
+ formatDateTime (date) {
|
|
|
+ var y = date.getFullYear()
|
|
|
+ var m = date.getMonth() + 1
|
|
|
+ m = m < 10 ? ('0' + m) : m
|
|
|
+ var d = date.getDate()
|
|
|
+ d = d < 10 ? ('0' + d) : d
|
|
|
+ var h = date.getHours()
|
|
|
+ var minute = date.getMinutes()
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute
|
|
|
},
|
|
|
|
|
|
- //获取权限
|
|
|
- getPermissions() {
|
|
|
+ // 获取权限
|
|
|
+ getPermissions () {
|
|
|
let _this = this
|
|
|
// request
|
|
|
let params = {
|
|
|
percodes: `'${this.permissionscode.entry}','${this.permissionscode.check}','${this.permissionscode.audit}','${this.permissionscode.sign}'`
|
|
|
}
|
|
|
this.$axios.get('/permissions/isauths', {
|
|
|
- params
|
|
|
- })
|
|
|
+ params
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
if (res.data instanceof Array && res.data.length > 0) {
|
|
|
console.log(res.data)
|
|
|
res.data.forEach(element => {
|
|
|
_this.permissions[element.Code] = element.Isperm
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|