From 36bdc654a80a3eee67cb923645ee8bcf99e9a73c Mon Sep 17 00:00:00 2001
From: zichen1019 <1510748736@qq.com>
Date: Sun, 29 Aug 2021 17:40:19 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.production | 3 +
.env.test | 3 +
src/views/bggl/banjie_list.vue | 27 ++++++-
.../bggl/components/original_db_list.vue | 18 +----
src/views/certificate/index.vue | 6 +-
src/views/device_management/index.vue | 18 ++++-
src/views/document/index.vue | 5 +-
src/views/print/3000/print_list.vue | 73 ++++++++++++-------
8 files changed, 101 insertions(+), 52 deletions(-)
diff --git a/.env.production b/.env.production
index 1d78fc9..f8547fc 100644
--- a/.env.production
+++ b/.env.production
@@ -1,5 +1,8 @@
# 生产环境相关配置
+# 项目名称
+VUE_APP_PROJECT_NAME = 'SJJY'
+
# 微服务IP
VUE_APP_SERVER_ADDRESS = 'test.sdma.mingansei.com'
diff --git a/.env.test b/.env.test
index d12b8f6..0d4ee77 100644
--- a/.env.test
+++ b/.env.test
@@ -1,5 +1,8 @@
# 测试环境相关配置
+# 项目名称
+VUE_APP_PROJECT_NAME = 'SJJY'
+
# 微服务IP
VUE_APP_SERVER_ADDRESS = 'test.sdma.mingansei.com'
diff --git a/src/views/bggl/banjie_list.vue b/src/views/bggl/banjie_list.vue
index 9ed1b69..374800f 100644
--- a/src/views/bggl/banjie_list.vue
+++ b/src/views/bggl/banjie_list.vue
@@ -13,7 +13,7 @@
生成报告
-
+
生成合格证
@@ -916,6 +916,31 @@ export default {
}
this.common.viewYsjlNoOpen(ids, viewType)
},
+ batchGeneratePdfHgz() {
+ const ids = []
+ for (let i = 0; i < this.multipleSelection.length; i++) {
+ ids.push(this.multipleSelection[i].id)
+ if (this.multipleSelection[i].bglx !== 1) {
+ this.$message({
+ type: 'info',
+ message: '请选择主报告进行重新生成!'
+ })
+ return false
+ }
+ }
+ this.preview({
+ url: '/print/batchGeneratePdfHgz',
+ method: '',
+ params: {
+ ysjlIds: ids
+ },
+ paramsSerializer: function(params) {
+ return qs.stringify(params, { indices: false })
+ }
+ }).then(() => {
+ console.log('生成合格证完成')
+ })
+ },
createQrcode() {
let ids = ''
for (let i = 0; i < this.multipleSelection.length; i++) {
diff --git a/src/views/bggl/components/original_db_list.vue b/src/views/bggl/components/original_db_list.vue
index 4ca284d..4e29469 100644
--- a/src/views/bggl/components/original_db_list.vue
+++ b/src/views/bggl/components/original_db_list.vue
@@ -825,19 +825,6 @@ export default {
this.dialogFormVisible = true
}).catch(() => {
this.dialogSignVisible = false
- this.$confirm('列表可能长时间未刷新,是否刷新列表?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.handleFilter()
- }).catch(() => {
- this.dialogSignVisible = false
- this.$message({
- type: 'info',
- message: '已取消刷新'
- })
- })
})
},
confirmSend() {
@@ -1054,10 +1041,11 @@ export default {
message: '签名成功!'
})
this.isQm = false
- if (!this.isBatchSign) {
+ if (this.isBatchSign) {
+ this.handleFilter()
+ } else {
this.batchSend()
}
- this.handleFilter()
this.dialogSignVisible = false
this.isBatchSign = false
}).catch(() => {
diff --git a/src/views/certificate/index.vue b/src/views/certificate/index.vue
index a72c614..82efe3f 100644
--- a/src/views/certificate/index.vue
+++ b/src/views/certificate/index.vue
@@ -156,9 +156,9 @@ export default {
{ slot: 'operation' }
],
permission: {
- add: ['certificate-list:add'],
- edit: ['certificate-list:update'],
- del: ['certificate-list:delete']
+ add: ['certificate:list:add'],
+ edit: ['certificate:list:update'],
+ del: ['certificate:list:delete']
},
rules: {
username: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
diff --git a/src/views/device_management/index.vue b/src/views/device_management/index.vue
index c2eafad..d52c016 100644
--- a/src/views/device_management/index.vue
+++ b/src/views/device_management/index.vue
@@ -327,13 +327,13 @@ export default {
{ prop: 'totalPrice', label: '总价', align: 'center' },
{ prop: 'departmentId', label: '使用部门', align: 'center', formatter: this.formatter.formatterDepartmentName },
{ prop: 'principal', label: '使用人', align: 'center', formatter: this.formatter.formatterNickName },
- { prop: 'useState', label: '使用状况', align: 'center', component: PrefixPlusText, componentFunction: this.formatter.formatterDicData },
+ { prop: 'useState', label: '使用状况', align: 'center', component: PrefixPlusText, componentFunction: this.formatterDicData },
{ slot: 'operation' }
],
permission: {
- add: ['device-list:add'],
- edit: ['device-list:update'],
- del: ['device-list:delete']
+ add: ['instrument:add'],
+ edit: ['instrument:update'],
+ del: ['instrument:delete']
},
dicAssetTree: [],
parentId: [],
@@ -546,6 +546,16 @@ export default {
CrudInstrument.exportExcel(this.crud.query).then(data => {
downloadFile(data, parseTime(new Date()) + '-' + this.crud.title + '数据', 'xlsx')
})
+ },
+ formatterDicData(cellValue) {
+ if (cellValue != null) {
+ let label = ''
+ this.useStateList.filter(dicData => dicData.id === cellValue).forEach(dicData => {
+ label = dicData.label
+ })
+ return label
+ }
+ return null
}
}
}
diff --git a/src/views/document/index.vue b/src/views/document/index.vue
index e661f93..57baa4a 100644
--- a/src/views/document/index.vue
+++ b/src/views/document/index.vue
@@ -86,7 +86,6 @@ import Pagination from '@/components/Crud/Pagination'
import CrudDocumentArchives from '@/api/document_archives'
import { uploadFileFn, updateInspectionSystemFile } from '@/api/common'
import { downloadFileUrl } from '@/utils'
-import download from 'downloadjs'
import preview from '@/utils/preview'
// crud交由presenter持有
@@ -195,13 +194,13 @@ export default {
return false
},
downLoad(item) {
- downloadFileUrl(this.url + '/' + item.id + item.suffix, item.filename, item.suffix)
+ window.open(this.url + '/' + item.id + item.suffix)
},
viewHistoryFile(item) {
downloadFileUrl(this.url + '/' + item.inspectionSystemFileId + '_' + item.id + item.suffix, item.filename, item.suffix)
},
downLoadFn(item) {
- download(this.url + '/' + item.id + item.suffix)
+ downloadFileUrl(this.url + '/' + item.id + item.suffix, item.filename, item.suffix)
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`)
diff --git a/src/views/print/3000/print_list.vue b/src/views/print/3000/print_list.vue
index 4fee6ff..21a2a92 100644
--- a/src/views/print/3000/print_list.vue
+++ b/src/views/print/3000/print_list.vue
@@ -237,37 +237,58 @@ export default {
this.$message('请选择单条进行打印。')
return false
}
- // if (!this.multipleSelection.jfState) {
- // this.$message.error('存在未收费的报告,请联系收费核实后再进行打印。')
- // return false
- // }
+ if (type === 'HGZ') {
+ this.generatePdfHgz()
+ return
+ }
const id = this.multipleSelection[0].id
- const version = this.multipleSelection[0].reportVersion
- if (version === '16') {
- const data = `${process.env.VUE_APP_OLD_API}` + 'report/docKuroPreView/' + id + '/' + type + ''.replace(/\\/g, '/')
+
+ this.preview({
+ url: '/print/generatePdf',
+ method: 'post',
+ data: {
+ ysjlId: id,
+ viewType: type,
+ generateType: false
+ }
+ }).then(data => {
+ data = data.replace(/\\/g, '/')
window.open(data)
- } else {
- this.preview({
- url: '/print/generatePdf',
- method: 'post',
- data: {
- ysjlId: id,
- viewType: type,
- generateType: false
+ this.api({ // 记录打印详细,不做打印状态改变。
+ url: '/ysjl/batchRecordPrintState',
+ method: 'get',
+ params: {
+ id: id,
+ type: type
}
- }).then(data => {
- data = data.replace(/\\/g, '/')
- window.open(data)
- this.api({ // 记录打印详细,不做打印状态改变。
- url: '/ysjl/batchRecordPrintState',
- method: 'get',
- params: {
- id: id,
- type: type
- }
- })
})
+ })
+ },
+ generatePdfHgz() {
+ if (this.multipleSelection.length !== 1) {
+ this.$message('请选择单条进行打印。')
+ return false
}
+ const id = this.$refs.list.selection[0].id
+ this.preview({
+ url: '/print/generatePdfHgz',
+ method: 'get',
+ params: {
+ ysjlId: id,
+ viewType: 'HGZ'
+ }
+ }).then(data => {
+ data = data.replace(/\\/g, '/')
+ window.open(data)
+ this.api({ // 记录打印详细,不做打印状态改变。
+ url: '/ysjl/batchRecordPrintState',
+ method: 'get',
+ params: {
+ id: id,
+ type: 'HGZ'
+ }
+ })
+ })
},
batchToPrint(type) {
if (this.multipleSelection.length === 0) {