Browse Source

优化页面

master
李磊 3 years ago
parent
commit
36bdc654a8
  1. 3
      .env.production
  2. 3
      .env.test
  3. 27
      src/views/bggl/banjie_list.vue
  4. 18
      src/views/bggl/components/original_db_list.vue
  5. 6
      src/views/certificate/index.vue
  6. 18
      src/views/device_management/index.vue
  7. 5
      src/views/document/index.vue
  8. 73
      src/views/print/3000/print_list.vue

3
.env.production

@ -1,5 +1,8 @@
# 生产环境相关配置
# 项目名称
VUE_APP_PROJECT_NAME = 'SJJY'
# 微服务IP
VUE_APP_SERVER_ADDRESS = 'test.sdma.mingansei.com'

3
.env.test

@ -1,5 +1,8 @@
# 测试环境相关配置
# 项目名称
VUE_APP_PROJECT_NAME = 'SJJY'
# 微服务IP
VUE_APP_SERVER_ADDRESS = 'test.sdma.mingansei.com'

27
src/views/bggl/banjie_list.vue

@ -13,7 +13,7 @@
<el-button type="warning" icon="el-icon-refresh" @click="generatePdf('JYBG')">
生成报告
</el-button>
<el-button type="warning" icon="el-icon-refresh" @click="generatePdf('HGZ')">
<el-button type="warning" icon="el-icon-refresh" @click="batchGeneratePdfHgz">
生成合格证
</el-button>
<el-button type="success" icon="el-icon-refresh" @click="createQrcode">
@ -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++) {

18
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(() => {

6
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' }],

18
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
}
}
}

5
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'
// crudpresenter
@ -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}`)

73
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) {

Loading…
Cancel
Save