diff --git a/.env.production b/.env.production index 6ea4a3a..1953fee 100644 --- a/.env.production +++ b/.env.production @@ -1,13 +1,13 @@ # 生产环境相关配置 # 微服务IP -VUE_APP_SERVER_ADDRESS = '192.168.1.130' +VUE_APP_SERVER_ADDRESS = 'test.sdma.mingansei.com' # 省局数据后台IP -VUE_APP_SJ_BASE_IP_ADDRESS = '192.168.1.130' +VUE_APP_SJ_BASE_IP_ADDRESS = 'test.sdma.mingansei.com' # 微服务地址 -VUE_APP_SERVER_API = 'http://${VUE_APP_SERVER_ADDRESS}:9100' +VUE_APP_SERVER_API = 'http://${VUE_APP_SERVER_ADDRESS}' # 业务后台访问地址 VUE_APP_BASE_API = '${VUE_APP_SERVER_API}/sdma-manage/' @@ -22,4 +22,4 @@ VUE_APP_SJ_API = 'http://${VUE_APP_SJ_BASE_IP_ADDRESS}:9092/SJSE/' VUE_APP_PREVIEW_API = '${VUE_APP_SERVER_API}/sdma-preview/' # websocket连接地址 -VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}:9100/sdma-websocket/websocket/' +VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}/sdma-websocket/websocket/' diff --git a/.env.test b/.env.test index 82c5c32..135c37a 100644 --- a/.env.test +++ b/.env.test @@ -1,13 +1,13 @@ # 测试环境相关配置 # 微服务IP -VUE_APP_SERVER_ADDRESS = 'test.mingansei.com' +VUE_APP_SERVER_ADDRESS = 'test.sdma.mingansei.com' # 省局数据后台IP -VUE_APP_SJ_BASE_IP_ADDRESS = 'test.mingansei.com' +VUE_APP_SJ_BASE_IP_ADDRESS = 'test.sdma.mingansei.com' # 微服务地址 -VUE_APP_SERVER_API = 'http://${VUE_APP_SERVER_ADDRESS}:9100' +VUE_APP_SERVER_API = 'http://${VUE_APP_SERVER_ADDRESS}' # 业务后台访问地址 VUE_APP_BASE_API = '${VUE_APP_SERVER_API}/sdma-manage/' @@ -22,4 +22,4 @@ VUE_APP_SJ_API = 'http://${VUE_APP_SJ_BASE_IP_ADDRESS}:9092/SJSE/' VUE_APP_PREVIEW_API = '${VUE_APP_SERVER_API}/sdma-preview/' # websocket连接地址 -VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}:9100/sdma-websocket/websocket/' +VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}/sdma-websocket/websocket/' diff --git a/.gitignore b/.gitignore index f3794e0..450ff73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .DS_Store node_modules -/jinan +/sdmaFront # local env files .env.local diff --git a/public/index.html b/public/index.html index 7d61bc0..64e7f55 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ - JNFront + SdmaFront
diff --git a/src/api/data.js b/src/api/data.js index 530b4d5..551db4c 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -1,15 +1,10 @@ import api from '@/utils/api' import qs from 'qs' -import preview from '@/utils/preview' -export function initData(url, params) { - return api({ + +export function initData(apiRequest, url, params) { + const request = apiRequest || api + return request({ url: url + '?' + qs.stringify(params, { indices: false }), method: 'get' }) } -export function initData1(url, params) { - return preview({ - url: url + '?' + qs.stringify(params, { indices: false }), - method: 'get' - }) -} diff --git a/src/components/Crud/crud.js b/src/components/Crud/crud.js index e739560..4b8d2eb 100644 --- a/src/components/Crud/crud.js +++ b/src/components/Crud/crud.js @@ -1,4 +1,4 @@ -import { initData, initData1 } from '@/api/data' +import { initData } from '@/api/data' import Vue from 'vue' /** @@ -10,8 +10,10 @@ function CRUD(options) { const defaultOptions = { // 标题 title: '', - // 接口根路由 - rootApi: 0, + /** + * 请求接口工具 + */ + api: undefined, // 请求数据的url url: '', // 表格数据 @@ -92,8 +94,8 @@ function CRUD(options) { } const methods = { /** - * 通用的提示 - */ + * 通用的提示 + */ submitSuccessNotify() { crud.notify(crud.msg.submit, CRUD.NOTIFICATION_TYPE.SUCCESS) }, @@ -118,42 +120,22 @@ function CRUD(options) { } return new Promise((resolve) => { // 请求数据 - if (crud.rootApi) { - initData1(crud.url, crud.getQueryParams()).then(data => { - crud.page.total = data.total - if (data.list) { - crud.data = data.list - } else { - crud.data = data - } - crud.resetDataStatus() - // time 毫秒后显示表格 - setTimeout(() => { - callVmHook(crud, CRUD.HOOK.afterRefresh) - }, crud.time) - resolve(data) - }) - } else { - initData(crud.url, crud.getQueryParams()).then(data => { - crud.page.total = data.total - if (data.list) { - crud.data = data.list - } else { - crud.data = data - } - crud.resetDataStatus() - // time 毫秒后显示表格 - setTimeout(() => { - callVmHook(crud, CRUD.HOOK.afterRefresh) - }, crud.time) - resolve(data) - }) - } + initData(crud.api, crud.url, crud.getQueryParams()).then(data => { + crud.page.total = data.total + if (data.list) { + crud.data = data.list + } else { + crud.data = data + } + crud.resetDataStatus() + callVmHook(crud, CRUD.HOOK.afterRefresh) + resolve(data) + }) }) }, /** - * 启动添加 - */ + * 启动添加 + */ toAdd() { if (!(callVmHook(crud, CRUD.HOOK.beforeToAdd, crud.form) && callVmHook(crud, CRUD.HOOK.beforeToCU, crud.form))) { return @@ -163,9 +145,9 @@ function CRUD(options) { callVmHook(crud, CRUD.HOOK.afterToCU, crud.form) }, /** - * 启动编辑 - * @param {*} data 数据项 - */ + * 启动编辑 + * @param {*} data 数据项 + */ toEdit(data) { crud.resetForm(JSON.parse(JSON.stringify(data))) if (!(callVmHook(crud, CRUD.HOOK.beforeToEdit, crud.form) && callVmHook(crud, CRUD.HOOK.beforeToCU, crud.form))) { @@ -177,16 +159,16 @@ function CRUD(options) { callVmHook(crud, CRUD.HOOK.afterToCU, crud.form) }, /** - * 启动删除 - * @param {*} data 数据项 - */ + * 启动删除 + * @param {*} data 数据项 + */ toDelete(data) { crud.getDataStatus(data.id).delete = CRUD.STATUS.PREPARED }, /** - * 取消删除 - * @param {*} data 数据项 - */ + * 取消删除 + * @param {*} data 数据项 + */ cancelDelete(data) { if (!callVmHook(crud, CRUD.HOOK.beforeDeleteCancel, data)) { return @@ -195,8 +177,8 @@ function CRUD(options) { callVmHook(crud, CRUD.HOOK.afterDeleteCancel, data) }, /** - * 取消新增/编辑 - */ + * 取消新增/编辑 + */ cancelCU() { const addStatus = crud.status.add const editStatus = crud.status.edit @@ -226,8 +208,8 @@ function CRUD(options) { } }, /** - * 提交新增/编辑 - */ + * 提交新增/编辑 + */ submitCU() { if (!callVmHook(crud, CRUD.HOOK.beforeValidateCU)) { return @@ -247,8 +229,8 @@ function CRUD(options) { }) }, /** - * 执行添加 - */ + * 执行添加 + */ doAdd() { if (!callVmHook(crud, CRUD.HOOK.beforeSubmit)) { return @@ -266,16 +248,13 @@ function CRUD(options) { }) }, /** - * 执行编辑 - */ + * 执行编辑 + */ doEdit() { - console.log(581222) if (!callVmHook(crud, CRUD.HOOK.beforeSubmit)) { return } - console.log(crud.crudMethod, crud.form) crud.status.edit = CRUD.STATUS.PROCESSING - crud.crudMethod.edit(crud.form).then(() => { crud.status.edit = CRUD.STATUS.NORMAL crud.getDataStatus(crud.form.id).edit = CRUD.STATUS.NORMAL @@ -289,9 +268,9 @@ function CRUD(options) { }) }, /** - * 执行删除 - * @param {*} data 数据项 - */ + * 执行删除 + * @param {*} data 数据项 + */ doDelete(data) { let delAll = false let dataStatus @@ -327,8 +306,8 @@ function CRUD(options) { }) }, /** - * 获取查询参数 - */ + * 获取查询参数 + */ getQueryParams: function() { return { pageNum: crud.page.pageNum, @@ -365,9 +344,9 @@ function CRUD(options) { callVmHook(crud, CRUD.HOOK.afterRowClick, row) }, /** - * 重置查询参数 - * @param {Boolean} toQuery 重置后进行查询操作 - */ + * 重置查询参数 + * @param {Boolean} toQuery 重置后进行查询操作 + */ resetQuery(toQuery = true) { const defaultQuery = JSON.parse(JSON.stringify(crud.defaultQuery)) const query = crud.query @@ -380,9 +359,9 @@ function CRUD(options) { callVmHook(crud, CRUD.HOOK.afterResetQuery) }, /** - * 重置表单 - * @param {Array} data 数据 - */ + * 重置表单 + * @param {Array} data 数据 + */ resetForm(data) { const form = data || (typeof crud.defaultForm === 'object' ? JSON.parse(JSON.stringify(crud.defaultForm)) : crud.defaultForm()) const crudFrom = crud.form @@ -397,11 +376,10 @@ function CRUD(options) { } }, /** - * 重置数据状态 - */ + * 重置数据状态 + */ resetDataStatus() { const dataStatus = {} - function resetStatus(datas) { datas.forEach(e => { dataStatus[e.id] = { @@ -417,17 +395,17 @@ function CRUD(options) { crud.dataStatus = dataStatus }, /** - * 获取数据状态 - * @param {Number | String} id 数据项id - */ + * 获取数据状态 + * @param {Number | String} id 数据项id + */ getDataStatus(id) { return crud.dataStatus[id] }, /** - * 切换选中状态 - * @param selection - * @param data - */ + * 切换选中状态 + * @param selection + * @param data + */ toggleRowSelection(selection, data) { if (data.children) { data.children.forEach(val => { @@ -463,11 +441,11 @@ function CRUD(options) { // 预留4位存储:组件 主页、头部、分页、表单,调试查看也方便找 vms: Array(4), /** - * 注册组件实例 - * @param {String} type 类型 - * @param {*} vm 组件实例 - * @param {Number} index 该参数内部使用 - */ + * 注册组件实例 + * @param {String} type 类型 + * @param {*} vm 组件实例 + * @param {Number} index 该参数内部使用 + */ registerVM(type, vm, index = -1) { const vmObj = { type, @@ -481,9 +459,9 @@ function CRUD(options) { this.vms.splice(index, 1, vmObj) }, /** - * 取消注册组件实例 - * @param {*} vm 组件实例 - */ + * 取消注册组件实例 + * @param {*} vm 组件实例 + */ unregisterVM(vm) { this.vms.splice(this.vms.findIndex(e => e && e.vm === vm), 1) } @@ -759,4 +737,4 @@ export { form, pagination, crud -} +} diff --git a/src/components/drawerDialog/index.vue b/src/components/drawerDialog/index.vue index a83b70e..6bc3664 100644 --- a/src/components/drawerDialog/index.vue +++ b/src/components/drawerDialog/index.vue @@ -151,10 +151,10 @@ - + - + - - + + @@ -541,7 +537,7 @@ - + 表格高度限制 @@ -643,7 +639,7 @@ label-width="150px" > - + {{ item }} @@ -765,7 +761,7 @@ export default { templateSettingId: '' // 配置id }, form: { - templateId: '', + templateId: undefined, writeMode: 0, tableIndex: 1, tableMode: 0, @@ -886,11 +882,30 @@ export default { getJylbList() { this.getNeibuList('jylb', null, null) }, + initTemplateSettingForm() { + this.form = { + templateId: this.id, + writeMode: 0, + tableIndex: 1, + tableMode: 0, + tableRowFindMode: 0, + tableStartRow: 0, + tableRowCount: 0, + affiliatedTableStartRow: 0, + affiliatedTableRowCount: 0, + sort: 1, + tableType: 0, + isChild: false, + jyxmMode: 0, + affiliatedAddMode: 0 + } + }, addTemFn() { + this.initTemplateSettingForm() this.dialogVisible1 = true }, editFnTem(row) { - this.form = row + this.form = this.common.deepCopy(row) this.dialogVisible1 = true }, addtemFn() { diff --git a/src/icons/svg/termination.svg b/src/icons/svg/termination.svg new file mode 100644 index 0000000..96362ee --- /dev/null +++ b/src/icons/svg/termination.svg @@ -0,0 +1 @@ + diff --git a/src/store/modules/user.js b/src/store/modules/user.js index da39107..523cae4 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -22,7 +22,7 @@ const user = { allUser: [], allCategory: [], messageCount: [], - prodName: process.env.NODE_ENV === 'test' ? '/jinan' : '' // 开发环境下为空,生产环境下请设置为tomcat项目名称。(例如:/dist) + prodName: process.env.NODE_ENV === 'test' ? '/sdmaFront' : '' // 开发环境下为空,生产环境下请设置为tomcat项目名称。(例如:/dist) }, mutations: { SET_USER: (state, userInfo) => { diff --git a/src/views/bggl/2000/jj/cyqp.vue b/src/views/bggl/2000/jj/cyqp.vue index c9a2250..2fc303b 100644 --- a/src/views/bggl/2000/jj/cyqp.vue +++ b/src/views/bggl/2000/jj/cyqp.vue @@ -379,13 +379,13 @@ export default { }, getYsjl() { this.api({ - url: '/ysjl/getYsjlById', + url: '/ysjl', method: 'get', params: { ysjlId: this.$route.query.id } }).then(data => { - this.ysjl = data.ysjl + this.ysjl = data if (this.ysjl.jianyanrenyuan) { this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan) } diff --git a/src/views/document/index.vue b/src/views/document/index.vue index 2d7cef2..e661f93 100644 --- a/src/views/document/index.vue +++ b/src/views/document/index.vue @@ -87,13 +87,15 @@ 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持有 const defaultCrud = presenter( CRUD({ title: '检验机构体系文件管理', url: '/inspectionSystemFile/list', orderBy: ['id desc'], - rootApi: 1, + api: preview, crudMethod: { ...CrudDocumentArchives } }) ) diff --git a/src/views/flow/template.vue b/src/views/flow/template.vue index 814c923..8d02bb9 100644 --- a/src/views/flow/template.vue +++ b/src/views/flow/template.vue @@ -63,6 +63,19 @@ :value="item.value" /> + + + 查询 @@ -274,14 +287,18 @@ export default { { value: 'YSJL', label: '原始记录' - }, - { + }, { value: 'JYBG', label: '检验报告' - }, - { + }, { value: 'OTHER', label: '其他' + }, { + value: 'HZD', + label: '回执单' + }, { + value: 'RWD', + label: '任务单' } ], formTemplate: {}, diff --git a/src/views/task/list.vue b/src/views/task/list.vue index 577a9ed..b6e0039 100644 --- a/src/views/task/list.vue +++ b/src/views/task/list.vue @@ -21,8 +21,8 @@ 任务完成 - - 终止任务 + + 终止任务 @@ -37,7 +37,6 @@ - 查询 @@ -109,14 +108,6 @@ - - - @@ -218,25 +209,20 @@ - - - -