From 8f5e0113c55a630e9f5962013a84163cf1a65c2e Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Fri, 27 Aug 2021 10:14:13 +0800 Subject: [PATCH] tijiao --- hb_client/package.json | 1 + hb_client/src/api/moritor.js | 3 +- hb_client/src/api/mtm.js | 117 +++++ hb_client/src/api/workflow.js | 123 +++++ hb_client/src/router/index.js | 59 +++ hb_client/src/views/equipment/index.vue | 6 +- hb_client/src/views/monitor/service.vue | 49 +- hb_client/src/views/mtm/material.vue | 277 +++++++++++ hb_client/src/views/mtm/process.vue | 275 +++++++++++ hb_client/src/views/mtm/productprocess.vue | 222 +++++++++ hb_client/src/views/mtm/step.vue | 243 ++++++++++ .../src/views/workflow/configuration.vue | 41 ++ hb_client/src/views/workflow/customfield.vue | 439 ++++++++++++++++++ hb_client/src/views/workflow/index.vue | 368 +++++++++++++++ hb_client/src/views/workflow/state.vue | 305 ++++++++++++ hb_client/src/views/workflow/transitions.vue | 268 +++++++++++ 16 files changed, 2786 insertions(+), 10 deletions(-) create mode 100644 hb_client/src/api/mtm.js create mode 100644 hb_client/src/api/workflow.js create mode 100644 hb_client/src/views/mtm/material.vue create mode 100644 hb_client/src/views/mtm/process.vue create mode 100644 hb_client/src/views/mtm/productprocess.vue create mode 100644 hb_client/src/views/mtm/step.vue create mode 100644 hb_client/src/views/workflow/configuration.vue create mode 100644 hb_client/src/views/workflow/customfield.vue create mode 100644 hb_client/src/views/workflow/index.vue create mode 100644 hb_client/src/views/workflow/state.vue create mode 100644 hb_client/src/views/workflow/transitions.vue 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 @@
日志列表
+
+ + 搜索 + 重置 +
@@ -163,11 +186,13 @@ :visible.sync="dialogVisible" width="80%" - :before-close="handleClose"> - - {{logdec}} + height:300px + > + + +
-
+ @@ -190,6 +215,8 @@ export default { memoryData:[], dialogVisible: false, logdec:"", + text:"", + listQuery: {}, }; }, computed: {}, @@ -199,14 +226,23 @@ export default { this.getServerList(); }, methods: { + getlogList() { - getlogList().then((response) => { + getlogList(this.listQuery).then((response) => { if(response.data) { + this.tableData=response.data; } }); }, + handleFilter() { + this.getlogList(); + }, + resetFilter() { + + this.getlogList(); + }, getServerList() { getServerList().then((response) => { if (response.data) { @@ -221,7 +257,8 @@ export default { this.dialogVisible = true; getLog(row.name).then((response) => { if (response.data) { - this.logdec=response.data + this.logdec=response.data.replace(/\n/gm,"
") + } }); diff --git a/hb_client/src/views/mtm/material.vue b/hb_client/src/views/mtm/material.vue new file mode 100644 index 0000000..562a81e --- /dev/null +++ b/hb_client/src/views/mtm/material.vue @@ -0,0 +1,277 @@ + + diff --git a/hb_client/src/views/mtm/process.vue b/hb_client/src/views/mtm/process.vue new file mode 100644 index 0000000..61b6464 --- /dev/null +++ b/hb_client/src/views/mtm/process.vue @@ -0,0 +1,275 @@ + + diff --git a/hb_client/src/views/mtm/productprocess.vue b/hb_client/src/views/mtm/productprocess.vue new file mode 100644 index 0000000..8709ab8 --- /dev/null +++ b/hb_client/src/views/mtm/productprocess.vue @@ -0,0 +1,222 @@ + + + \ No newline at end of file diff --git a/hb_client/src/views/mtm/step.vue b/hb_client/src/views/mtm/step.vue new file mode 100644 index 0000000..6240c91 --- /dev/null +++ b/hb_client/src/views/mtm/step.vue @@ -0,0 +1,243 @@ + + diff --git a/hb_client/src/views/workflow/configuration.vue b/hb_client/src/views/workflow/configuration.vue new file mode 100644 index 0000000..1e55695 --- /dev/null +++ b/hb_client/src/views/workflow/configuration.vue @@ -0,0 +1,41 @@ + + \ No newline at end of file diff --git a/hb_client/src/views/workflow/customfield.vue b/hb_client/src/views/workflow/customfield.vue new file mode 100644 index 0000000..78b579a --- /dev/null +++ b/hb_client/src/views/workflow/customfield.vue @@ -0,0 +1,439 @@ + + diff --git a/hb_client/src/views/workflow/index.vue b/hb_client/src/views/workflow/index.vue new file mode 100644 index 0000000..3fcdf9a --- /dev/null +++ b/hb_client/src/views/workflow/index.vue @@ -0,0 +1,368 @@ + + diff --git a/hb_client/src/views/workflow/state.vue b/hb_client/src/views/workflow/state.vue new file mode 100644 index 0000000..e103b8c --- /dev/null +++ b/hb_client/src/views/workflow/state.vue @@ -0,0 +1,305 @@ + + diff --git a/hb_client/src/views/workflow/transitions.vue b/hb_client/src/views/workflow/transitions.vue new file mode 100644 index 0000000..68c7c5b --- /dev/null +++ b/hb_client/src/views/workflow/transitions.vue @@ -0,0 +1,268 @@ + +