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. 39
      src/views/print/3000/print_list.vue

3
.env.production

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

3
.env.test

@ -1,5 +1,8 @@
# 测试环境相关配置 # 测试环境相关配置
# 项目名称
VUE_APP_PROJECT_NAME = 'SJJY'
# 微服务IP # 微服务IP
VUE_APP_SERVER_ADDRESS = 'test.sdma.mingansei.com' 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 type="warning" icon="el-icon-refresh" @click="generatePdf('JYBG')">
生成报告 生成报告
</el-button> </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>
<el-button type="success" icon="el-icon-refresh" @click="createQrcode"> <el-button type="success" icon="el-icon-refresh" @click="createQrcode">
@ -916,6 +916,31 @@ export default {
} }
this.common.viewYsjlNoOpen(ids, viewType) 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() { createQrcode() {
let ids = '' let ids = ''
for (let i = 0; i < this.multipleSelection.length; i++) { 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 this.dialogFormVisible = true
}).catch(() => { }).catch(() => {
this.dialogSignVisible = false this.dialogSignVisible = false
this.$confirm('列表可能长时间未刷新,是否刷新列表?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleFilter()
}).catch(() => {
this.dialogSignVisible = false
this.$message({
type: 'info',
message: '已取消刷新'
})
})
}) })
}, },
confirmSend() { confirmSend() {
@ -1054,10 +1041,11 @@ export default {
message: '签名成功!' message: '签名成功!'
}) })
this.isQm = false this.isQm = false
if (!this.isBatchSign) { if (this.isBatchSign) {
this.handleFilter()
} else {
this.batchSend() this.batchSend()
} }
this.handleFilter()
this.dialogSignVisible = false this.dialogSignVisible = false
this.isBatchSign = false this.isBatchSign = false
}).catch(() => { }).catch(() => {

6
src/views/certificate/index.vue

@ -156,9 +156,9 @@ export default {
{ slot: 'operation' } { slot: 'operation' }
], ],
permission: { permission: {
add: ['certificate-list:add'], add: ['certificate:list:add'],
edit: ['certificate-list:update'], edit: ['certificate:list:update'],
del: ['certificate-list:delete'] del: ['certificate:list:delete']
}, },
rules: { rules: {
username: [{ required: true, message: '请输入姓名', trigger: 'blur' }], 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: 'totalPrice', label: '总价', align: 'center' },
{ prop: 'departmentId', label: '使用部门', align: 'center', formatter: this.formatter.formatterDepartmentName }, { prop: 'departmentId', label: '使用部门', align: 'center', formatter: this.formatter.formatterDepartmentName },
{ prop: 'principal', label: '使用人', align: 'center', formatter: this.formatter.formatterNickName }, { 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' } { slot: 'operation' }
], ],
permission: { permission: {
add: ['device-list:add'], add: ['instrument:add'],
edit: ['device-list:update'], edit: ['instrument:update'],
del: ['device-list:delete'] del: ['instrument:delete']
}, },
dicAssetTree: [], dicAssetTree: [],
parentId: [], parentId: [],
@ -546,6 +546,16 @@ export default {
CrudInstrument.exportExcel(this.crud.query).then(data => { CrudInstrument.exportExcel(this.crud.query).then(data => {
downloadFile(data, parseTime(new Date()) + '-' + this.crud.title + '数据', 'xlsx') 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 CrudDocumentArchives from '@/api/document_archives'
import { uploadFileFn, updateInspectionSystemFile } from '@/api/common' import { uploadFileFn, updateInspectionSystemFile } from '@/api/common'
import { downloadFileUrl } from '@/utils' import { downloadFileUrl } from '@/utils'
import download from 'downloadjs'
import preview from '@/utils/preview' import preview from '@/utils/preview'
// crudpresenter // crudpresenter
@ -195,13 +194,13 @@ export default {
return false return false
}, },
downLoad(item) { downLoad(item) {
downloadFileUrl(this.url + '/' + item.id + item.suffix, item.filename, item.suffix) window.open(this.url + '/' + item.id + item.suffix)
}, },
viewHistoryFile(item) { viewHistoryFile(item) {
downloadFileUrl(this.url + '/' + item.inspectionSystemFileId + '_' + item.id + item.suffix, item.filename, item.suffix) downloadFileUrl(this.url + '/' + item.inspectionSystemFileId + '_' + item.id + item.suffix, item.filename, item.suffix)
}, },
downLoadFn(item) { downLoadFn(item) {
download(this.url + '/' + item.id + item.suffix) downloadFileUrl(this.url + '/' + item.id + item.suffix, item.filename, item.suffix)
}, },
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`) return this.$confirm(`确定移除 ${file.name}`)

39
src/views/print/3000/print_list.vue

@ -237,16 +237,12 @@ export default {
this.$message('请选择单条进行打印。') this.$message('请选择单条进行打印。')
return false return false
} }
// if (!this.multipleSelection.jfState) { if (type === 'HGZ') {
// this.$message.error('') this.generatePdfHgz()
// return false return
// } }
const id = this.multipleSelection[0].id 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, '/')
window.open(data)
} else {
this.preview({ this.preview({
url: '/print/generatePdf', url: '/print/generatePdf',
method: 'post', method: 'post',
@ -267,7 +263,32 @@ export default {
} }
}) })
}) })
},
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) { batchToPrint(type) {
if (this.multipleSelection.length === 0) { if (this.multipleSelection.length === 0) {

Loading…
Cancel
Save