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/api/common.js b/src/api/common.js index 77e27d7..6000160 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -164,7 +164,6 @@ export function rebutFn(params) { method: 'post', data: params, paramsSerializer: function(data) { - console.log(require('qs').stringify(data, { indices: false }), 8888888888888) return require('qs').stringify(data, { indices: false }) } }) diff --git a/src/api/sedirectory.js b/src/api/sedirectory.js new file mode 100644 index 0000000..a3efee0 --- /dev/null +++ b/src/api/sedirectory.js @@ -0,0 +1,11 @@ +import api from '@/utils/api' + +export function getList(params) { + return api({ + url: '/sedirectory/getList', + method: 'get', + params + }) +} + +export default { getList } diff --git a/src/api/template.js b/src/api/template.js index 3a54495..a2c2003 100644 --- a/src/api/template.js +++ b/src/api/template.js @@ -4,7 +4,7 @@ import qs from 'qs' export default { getList: (params) => { return api({ - url: '/template/getTemplateList', + url: '/template/all', method: 'get', params: params }) diff --git a/src/api/user.js b/src/api/user.js new file mode 100644 index 0000000..37230b8 --- /dev/null +++ b/src/api/user.js @@ -0,0 +1,39 @@ +import api from '@/utils/api' +import qs from 'qs' + +export function add(data) { + return api({ + url: '/user', + method: 'post', + data + }) +} + +export function edit(data) { + return api({ + url: '/user', + method: 'put', + data + }) +} + +export function del(params) { + return api({ + url: '/user', + method: 'delete', + params, + paramsSerializer: function(params) { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getList(params) { + return api({ + url: '/user/list', + method: 'get', + params + }) +} + +export default { add, edit, del, getList } diff --git a/src/components/drawerDialog/index.vue b/src/components/drawerDialog/index.vue index bbaff9b..f42079d 100644 --- a/src/components/drawerDialog/index.vue +++ b/src/components/drawerDialog/index.vue @@ -198,9 +198,10 @@ > @@ -214,9 +215,10 @@ > @@ -262,12 +264,12 @@
- 模板详情 + 模板配置 新增 @@ -373,7 +375,7 @@ icon="el-icon-edit" circle title="编辑" - @click="editFnTem(scope.row)" + @click="editTemplateSettingFn(scope.row)" /> @@ -398,12 +400,12 @@
- 模板详情 + 检验项目列配置{{ templateSettingLabel }} 新增 @@ -441,7 +443,7 @@ icon="el-icon-edit" circle title="编辑" - @click="editFn(scope.row)" + @click="editTemplateJyxmFn(scope.row)" /> @@ -483,7 +485,6 @@ @@ -495,7 +496,6 @@ @@ -843,15 +843,15 @@ export default { }, { value: 'JYBG', label: '检验报告' - }, { - value: 'OTHER', - label: '其他' }, { value: 'HZD', label: '回执单' }, { value: 'RWD', label: '任务单' + }, { + value: 'HGZ', + label: '合格证' } ], jylbList: [], @@ -883,11 +883,39 @@ export default { total1: 0, jyxmModes: ['检验项目', '附表', '不合格整改检验项目', '大型起重机械检验项目', '报告检验项目'], writeModes: ['CN模式', 'DN模式', 'KV模式', 'CFI模式', 'SA模式'], - affiliatedAddModes: ['固定表格', '附页文件', 'word自动切换'] + affiliatedAddModes: ['固定表格', '附页文件', 'word自动切换'], + templateSettingLabel: '' } }, mounted() {}, methods: { + showHgzTemplate(item) { + if (item.tempCategory !== 'HGZ') { + return false + } + if (this.formTemplate.shebeizhongleidaima && this.formTemplate.shebeizhongleidaima !== item.shebeizhongleidaima) { + return false + } + if (this.formTemplate.jianyanleibie && this.formTemplate.jianyanleibie !== item.jianyanleibie) { + return false + } + return true + }, + showJybgTemplate(item) { + if (item.tempCategory !== 'JYBG') { + return false + } + if (item.bglx !== 1) { + return false + } + if (this.formTemplate.shebeizhongleidaima && this.formTemplate.shebeizhongleidaima !== item.shebeizhongleidaima) { + return false + } + if (this.formTemplate.jianyanleibie && this.formTemplate.jianyanleibie !== item.jianyanleibie) { + return false + } + return true + }, changeTableMode() { switch (this.form.tableMode) { case 0: @@ -957,15 +985,24 @@ export default { affiliatedAddMode: 0 } }, - addTemFn() { + addTemplateSettingFn() { this.initTemplateSettingForm() this.dialogVisible1 = true }, - editFnTem(row) { + editTemplateSettingFn(row) { this.form = this.common.deepCopy(row) this.dialogVisible1 = true }, - addtemFn() { + addTemplateJyxmFn() { + this.$set(this, 'formLabelAlign', { + field: '', + fieldMode: 0, + indexFromRight: '', + templateId: '', // 模板id + templateSettingId: '', // 配置id + alias: '', + underlineStitching: false + }) this.dialogVisible = true }, getList() { @@ -988,14 +1025,14 @@ export default { } }) }, - deleteModelFn(row) { + deleteTemplateSettingFn(row) { TemplateApi.deleteModuleFn({ ids: [row.id] }).then((data) => { this.getList() }) }, - deleteFn(row, index) { + deleteTemplateJyxmFn(row, index) { const arr = [] arr.push(row.id) TemplateApi.deleteTemplateJyxm({ @@ -1037,7 +1074,7 @@ export default { toggleFn(val) { this.multipleSelection = val }, - editFn(row) { + editTemplateJyxmFn(row) { this.dialogVisible = true this.formLabelAlign = this.common.deepCopy(row) }, @@ -1260,6 +1297,7 @@ export default { return false } this.templateSettingId = row.id + this.templateSettingLabel = this.jyxmModes[row.jyxmMode] + '-' + row.sort this.$refs.settingList.toggleRowSelection(row) this.getDemoList() }, @@ -1286,6 +1324,7 @@ export default { beforeClose(done) { this.list.length = 0 this.gridData.length = 0 + this.templateSettingLabel = '' this.clearForm() this.$emit('closeTemplateDrawer') } diff --git a/src/permission.js b/src/permission.js index 3ec0733..4d26080 100644 --- a/src/permission.js +++ b/src/permission.js @@ -3,7 +3,7 @@ import store from './store' import NProgress from 'nprogress' // Progress 进度条 import 'nprogress/nprogress.css'// Progress 进度条样式 import { getToken } from '@/utils/auth' // 验权 -const whiteList = ['/login', '/remote', '/404', '/viewhzd', '/upload', '/xingshi', '/wenjian', '/fangwei', '/qiye'] // 不重定向白名单 +const whiteList = ['/login', '/remote', '/404', '/fangwei'] // 不重定向白名单 router.beforeEach((to, from, next) => { NProgress.start() if (getToken()) { diff --git a/src/router/index.js b/src/router/index.js index 38167c3..0e2c34e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -31,43 +31,6 @@ export const constantRouterMap = [{ import ('@/views/404'), hidden: true }, -{ - path: '/viewhzd/:id', - component: () => - import ('@/views/bjd/view_hzd'), - hidden: true -}, -{ - path: '/wenjian/:zlzl/:sbzl/:bjid', - component: () => - import ('@/views/bjd/sjse/upload_list_20200721'), - hidden: true -}, -{ - path: '/wenjian/:zlzl/:sbzl/:bjid/:bjparamid', - component: () => - import ('@/views/bjd/sjse/upload_list_20200721'), - hidden: true -}, -{ - path: '/upload/:sbzl/:bjid', - component: () => - import ('@/views/bjd/sjse/upload_list'), - hidden: true -}, -{ - path: '/upload/:sbzl/:bjid/:bjparamid', - component: () => - import ('@/views/bjd/sjse/upload_list_param'), - hidden: true -}, -{ - path: '/xingshi/:sbzl/:bjid', - component: () => - - import ('@/views/bjd/sjse/upload_list_xingshi'), - hidden: true -}, { path: '/showGrantInfo', component: () => @@ -80,12 +43,6 @@ export const constantRouterMap = [{ import ('@/views/security/index'), hidden: true }, -{ - path: '/qiye/:qyid', - component: () => - import ('@/views/task/qiye_list'), - hidden: true -}, { path: '/flow/detail', component: () => diff --git a/src/service/bjdService.js b/src/service/bjdService.js index 139d792..3621007 100644 --- a/src/service/bjdService.js +++ b/src/service/bjdService.js @@ -2,6 +2,9 @@ import XLSX from 'xlsx' import common from '@/utils/common' import qs from 'qs' import preview from '@/utils/preview' +import router from '@/router' +import store from '@/store' +import { Notification } from 'element-ui' export default { /** @@ -137,5 +140,31 @@ export default { }) }) }) + }, + viewHzd(bjdId) { + preview({ + url: '/print/generatePdfHzd', + method: 'get', + params: { + bjdId: bjdId + } + }).then((data) => { + data = data.replace(/\\/g, '/') + if (data) { + router.push({ + path: + '/preview/hzd?src=' + + store.getters.prodName + + '/static/web/viewer.html?file=' + + encodeURIComponent(data) + }) + } else { + Notification({ + message: 'PDF预览错误!', + type: 'error', + duration: 3 * 1000 + }) + } + }) } } diff --git a/src/service/sedirectoryService.js b/src/service/sedirectoryService.js new file mode 100644 index 0000000..6da4059 --- /dev/null +++ b/src/service/sedirectoryService.js @@ -0,0 +1,11 @@ +import sedirectory from '@/api/sedirectory' + +export default { + /** + * 获取设备目录 + * @param params + */ + getList(params) { + return sedirectory.getList(params) + } +} diff --git a/src/views/allot/list.vue b/src/views/allot/list.vue index 8168f8b..d8a59bd 100644 --- a/src/views/allot/list.vue +++ b/src/views/allot/list.vue @@ -869,7 +869,8 @@ export default { renwuList: this.selection, renlingren: this.renlingren, renwudan: this.renwudan, - bjdIds: this.bjdIds + bjdIds: this.bjdIds, + departmentId: this.departmentId }, paramsSerializer: function(data) { return require('qs').stringify(data, { indices: false }) diff --git a/src/views/audit/list.vue b/src/views/audit/list.vue index e8f34bd..184db5e 100644 --- a/src/views/audit/list.vue +++ b/src/views/audit/list.vue @@ -64,7 +64,7 @@ @@ -711,14 +711,14 @@ export default { }, /** * 根据报告ID查看驳回原因 - * @param ysjlId + * @param renwuId */ - viewAllRejection(ysjlId) { + viewAllRejection(renwuId) { this.api({ - url: '/taskinfo/viewAllRejection', + url: '/taskinfo/viewRejection', method: 'get', params: { - ysjlId: ysjlId + renwuId: renwuId } }).then(data => { this.infoNotes = data diff --git a/src/views/bggl/8000/jj/azjj.vue b/src/views/bggl/8000/jj/azjj.vue index ecf6738..41d57c9 100644 --- a/src/views/bggl/8000/jj/azjj.vue +++ b/src/views/bggl/8000/jj/azjj.vue @@ -753,7 +753,7 @@ export default { } let url = '' this.ysjl.bglx = 1 - this.ysjl.cjState = 'bggl' + this.ysjl.cjState = 'jybg' this.ysjl.zfState = '0' this.ysjl.jianyanxiangmu = 'azjj' this.ysjl.jlprintState = 0 diff --git a/src/views/bggl/banjie_list.vue b/src/views/bggl/banjie_list.vue index 0532e0d..374800f 100644 --- a/src/views/bggl/banjie_list.vue +++ b/src/views/bggl/banjie_list.vue @@ -1,19 +1,19 @@ - - +
@@ -841,6 +841,10 @@ export default { this.getSblb() // 查询报检参数信息 this.getParamById() + if (this.formState === 'finish') { + this.bjd.shouliren = this.formatter.getChineseName(null, null, this.bjd.shouliren) + this.bjd.updateBy = this.formatter.getChineseName(null, null, this.bjd.updateBy) + } }) }, getParamById() { diff --git a/src/views/bjd/jj_list.vue b/src/views/bjd/jj_list.vue index af6a7c0..fa32db9 100644 --- a/src/views/bjd/jj_list.vue +++ b/src/views/bjd/jj_list.vue @@ -166,7 +166,7 @@ @@ -438,29 +438,6 @@ export default { viewInfo(reason) { this.$message({ message: reason, type: 'info' }) }, - viewHzd(bjdid) { - this.apibjd({ - url: '/bjd/printHzd', - method: 'get', - params: { - bjdIds: bjdid - } - }).then(data => { - this.preview({ - url: '/print/generatePdfListing', - method: 'post', - data: { - info: data.bjd, - paramList: data.renwu, - viewType: 'HZD' - } - }).then(data => { - data = data.replace(/\\/g, '/') - // router.push({ path: '/preview/1/1/urlPath?src=' + store.getters.prodName + '/static/web/viewer.html?file=' + encodeURIComponent(data) + '&v=' + Math.random() }) - window.open(data) - }) - }) - }, errorBjd() { // 异常收回 this.$confirm('报检项目将进行异常收回,是否继续?', '提示', { diff --git a/src/views/bjd/qy_list.vue b/src/views/bjd/qy_list.vue index 6ff799b..0ee8503 100644 --- a/src/views/bjd/qy_list.vue +++ b/src/views/bjd/qy_list.vue @@ -119,7 +119,7 @@ @@ -342,29 +342,6 @@ export default { viewInfo(reason) { this.$message({ message: reason, type: 'info' }) }, - viewHzd(bjdid) { - this.apibjd({ - url: '/bjd/printHzd', - method: 'get', - params: { - bjdIds: bjdid - } - }).then(data => { - this.preview({ - url: '/print/generatePdfListing', - method: 'post', - data: { - info: data.bjd, - paramList: data.renwu, - viewType: 'HZD' - } - }).then(data => { - data = data.replace(/\\/g, '/') - // router.push({ path: '/preview/1/1/urlPath?src=' + store.getters.prodName + '/static/web/viewer.html?file=' + encodeURIComponent(data) + '&v=' + Math.random() }) - window.open(data) - }) - }) - }, errorBjd() { // 异常收回 this.$confirm('报检项目将进行异常收回,是否继续?', '提示', { diff --git a/src/views/bjd/sjse/upload_list.vue b/src/views/bjd/sjse/upload_list.vue deleted file mode 100644 index 429d021..0000000 --- a/src/views/bjd/sjse/upload_list.vue +++ /dev/null @@ -1,132 +0,0 @@ - - - - - diff --git a/src/views/bjd/sjse/upload_list_20200721.vue b/src/views/bjd/sjse/upload_list_20200721.vue deleted file mode 100644 index 9d27fa9..0000000 --- a/src/views/bjd/sjse/upload_list_20200721.vue +++ /dev/null @@ -1,188 +0,0 @@ - - - - - diff --git a/src/views/bjd/sjse/upload_list_param.vue b/src/views/bjd/sjse/upload_list_param.vue deleted file mode 100644 index 7df3072..0000000 --- a/src/views/bjd/sjse/upload_list_param.vue +++ /dev/null @@ -1,134 +0,0 @@ - - - - - diff --git a/src/views/bjd/sjse/upload_list_xingshi.vue b/src/views/bjd/sjse/upload_list_xingshi.vue deleted file mode 100644 index 28b6b98..0000000 --- a/src/views/bjd/sjse/upload_list_xingshi.vue +++ /dev/null @@ -1,173 +0,0 @@ - - - - - diff --git a/src/views/bjd/zj_input.vue b/src/views/bjd/zj_input.vue index f92d81e..5f0c9fe 100644 --- a/src/views/bjd/zj_input.vue +++ b/src/views/bjd/zj_input.vue @@ -86,7 +86,7 @@ 删除 - @@ -213,20 +213,6 @@ - - -