diff --git a/hb_client/package.json b/hb_client/package.json index 99b40fa..7ff3a3c 100644 --- a/hb_client/package.json +++ b/hb_client/package.json @@ -25,6 +25,7 @@ "nprogress": "0.2.0", "path-to-regexp": "2.4.0", "vue": "2.6.10", + "vue-json-editor": "^1.4.3", "vue-router": "3.0.6", "vuex": "3.1.0", "xlsx": "^0.15.5" diff --git a/hb_client/src/api/moritor.js b/hb_client/src/api/moritor.js index e31aa10..659ca27 100644 --- a/hb_client/src/api/moritor.js +++ b/hb_client/src/api/moritor.js @@ -6,7 +6,8 @@ import request from '@/utils/request' export function getlogList(query) { return request({ url: '/monitor/log/', - method: 'get' + method: 'get', + params: query }) } //查看日志详情 diff --git a/hb_client/src/api/mtm.js b/hb_client/src/api/mtm.js new file mode 100644 index 0000000..b8ce267 --- /dev/null +++ b/hb_client/src/api/mtm.js @@ -0,0 +1,117 @@ +import request from '@/utils/request' +//物料 +export function getMaterialList(query) { + return request({ + url: '/mtm/material/', + method: 'get', + params: query + }) +} +export function createMaterial(data) { + return request({ + url: '/mtm/material/', + method: 'post', + data + }) +} +export function updateMaterial(id, data) { + return request({ + url: `/mtm/material/${id}/`, + method: 'put', + data + }) +} +export function deleteMaterial(id, data) { + return request({ + url: `/mtm/material/${id}/`, + method: 'delete', + data + }) +} +//工序 +export function getProcessList(query) { + return request({ + url: '/mtm/process/', + method: 'get', + params: query + }) +} +export function createProcess(data) { + return request({ + url: '/mtm/process/', + method: 'post', + data + }) +} +export function updateProcess(id, data) { + return request({ + url: `/mtm/process/${id}/`, + method: 'put', + data + }) +} +export function deleteProcess(id, data) { + return request({ + url: `/mtm/process/${id}/`, + method: 'delete', + data + }) +} +//子工序 +export function getStepList(id) { + return request({ + url: `/mtm/process/${id}/steps/`, + method: 'get' + }) +} + +export function createStep(data) { + return request({ + url: '/mtm/step/', + method: 'post', + data + }) +} +export function updateStep(id, data) { + return request({ + url: `/mtm/step/${id}/`, + method: 'put', + data + }) +} +export function deleteStep(id, data) { + return request({ + url: `/mtm/step/${id}/`, + method: 'delete', + data + }) +} +//产品工艺 +export function getProductprocessList(query) { + return request({ + url: '/mtm/productprocess/', + method: 'get', + params: query + }) +} +export function createProductprocess(data) { + return request({ + url: '/mtm/productprocess/', + method: 'post', + data + }) +} +export function updateProductprocess(id, data) { + return request({ + url: `/mtm/productprocess/${id}/`, + method: 'put', + data + }) +} +export function deleteProductprocess(id, data) { + return request({ + url: `/mtm/productprocess/${id}/`, + method: 'delete', + data + }) +} \ No newline at end of file diff --git a/hb_client/src/api/workflow.js b/hb_client/src/api/workflow.js new file mode 100644 index 0000000..0b388a9 --- /dev/null +++ b/hb_client/src/api/workflow.js @@ -0,0 +1,123 @@ +import request from '@/utils/request' + +export function getWorkflowList(query) { + return request({ + url: '/wf/workflow/', + method: 'get', + params: query + }) +} +export function createWorkflow(data) { + return request({ + url: '/wf/workflow/', + method: 'post', + data + }) +} +export function updateWorkflow(id, data) { + return request({ + url: `/wf/workflow/${id}/`, + method: 'put', + data + }) +} +export function deleteWorkflow(id, data) { + return request({ + url: `/wf/workflow/${id}/`, + method: 'delete', + data + }) +} +//流转状态列表 +export function getWfStateList(id) { + return request({ + url: `/wf/workflow/${id}/states`, + method: 'get' + }) +} +//流转状态创建 +export function createWfState(data) { + return request({ + url: '/wf/state/', + method: 'post', + data + }) +} +//流转状态更新 +export function updateWfState(id, data) { + return request({ + url: `/wf/state/${id}/`, + method: 'put', + data + }) +} +//流转状态删除 +export function deleteWfState(id, data) { + return request({ + url: `/wf/state/${id}/`, + method: 'delete', + data + }) +} +//自定义字段列表 +export function getWfCustomfieldList(id) { + return request({ + url: `/wf/workflow/${id}/customfields`, + method: 'get' + }) +} +//自定义字段创建 +export function createWfCustomfield(data) { + return request({ + url: '/wf/customfield/', + method: 'post', + data + }) +} +//自定义字段更新 +export function updateWfCustomfield(id, data) { + return request({ + url: `/wf/customfield/${id}/`, + method: 'put', + data + }) +} +//自定义字段删除 +export function deleteWfCustomfield(id, data) { + return request({ + url: `/wf/customfield/${id}/`, + method: 'delete', + data + }) +} +//流转列表 +export function getWfTransitionList(id) { + return request({ + url: `/wf/workflow/${id}/transitions/`, + method: 'get' + }) +} +//流转创建 +export function createWfTransition(data) { + return request({ + url: '/wf/transition/', + method: 'post', + data + }) +} +//流转更新 +export function updateWfTransition(id, data) { + return request({ + url: `/wf/transition/${id}/`, + method: 'put', + data + }) +} +//流转删除 +export function deleteWfTransition(id, data) { + return request({ + url: `/wf/transition/${id}/`, + method: 'delete', + data + }) +} \ No newline at end of file diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js index 9f7674f..0ed6d97 100644 --- a/hb_client/src/router/index.js +++ b/hb_client/src/router/index.js @@ -96,6 +96,42 @@ export const asyncRoutes = [ ] }, + + { + path: '/mtm', + component: Layout, + redirect: '/mtm/material/', + name: 'mtm', + meta: { title: '制造技术管理', icon: 'example', perms: ['procurement_set'] }, + children: [ + { + path: 'material', + name: 'material', + component: () => import('@/views/mtm/material'), + meta: { title: '物料', icon: 'example', perms: ['vendor_manage'] } + }, + { + path: 'process', + name: 'process', + component: () => import('@/views/mtm/process'), + meta: { title: '工序', icon: 'example', perms: ['vendor_manage'] } + }, + { + path: 'step/:id', + name: 'Step', + component: () => import('@/views/mtm/step.vue'), + meta: { title: '子工序', perms: ['vendor_manage'] }, + hidden: true + }, + { + path: '/mtm/productprocess/', + name: 'productprocess', + component: () => import('@/views/mtm/productprocess'), + meta: { title: '产品工艺', icon: 'example', perms: ['vendor_manage'] } + }, + ] + }, + { path: '/procurement', component: Layout, @@ -111,6 +147,29 @@ export const asyncRoutes = [ } ] }, + { + path: '/workflow', + component: Layout, + redirect: '/workflow/index', + name: 'workflow', + meta: { title: '工作流管理', icon: 'example', perms: ['workflow_set'] }, + children: [ + { + path: 'index', + name: 'index', + component: () => import('@/views/workflow/index'), + meta: { title: '工作流配置', icon: 'example', perms: ['workflow_manage'] } + }, + + { + path: 'configuration', + name: 'configuration', + component: () => import('@/views/workflow/configuration'), + meta: { title: '人员信息详情', icon: 'example', perms: ['configuration_manage'] }, + hidden: true + }, + ] + }, { path: '/system', component: Layout, diff --git a/hb_client/src/views/equipment/index.vue b/hb_client/src/views/equipment/index.vue index 495d2b2..01f2e74 100644 --- a/hb_client/src/views/equipment/index.vue +++ b/hb_client/src/views/equipment/index.vue @@ -218,13 +218,13 @@ export default { count: 0, }, options: [{ - value: '0', + value: 0, label: '运转正常' }, { - value: '1', + value: 1, label: '停用' }, { - value: '2', + value: 2, label: '报废' }], listQuery: { diff --git a/hb_client/src/views/monitor/service.vue b/hb_client/src/views/monitor/service.vue index 3089d85..e81b97a 100644 --- a/hb_client/src/views/monitor/service.vue +++ b/hb_client/src/views/monitor/service.vue @@ -137,6 +137,29 @@