From 74831eb69029d080ab72b151299428ed1f0a612d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=9F=B9=E5=8F=8B?= <17852335869@163.com> Date: Wed, 15 Feb 2023 18:53:29 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=96=B0=E5=A2=9E=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/plugin/workflow/form.js | 57 +++- src/api/plugin/workflow/process.js | 2 +- src/styles/custom/custom.scss | 63 +++-- src/views/plugin/workflow/design/model.vue | 42 +-- src/views/plugin/workflow/mixins/ex-form.js | 4 +- .../workflow/process/components/examForm.vue | 6 +- .../workflow/process/components/form.vue | 190 +++++++++++-- src/views/plugin/workflow/process/start.vue | 259 ++++++------------ 8 files changed, 369 insertions(+), 254 deletions(-) diff --git a/src/api/plugin/workflow/form.js b/src/api/plugin/workflow/form.js index 6235f78..1efd654 100644 --- a/src/api/plugin/workflow/form.js +++ b/src/api/plugin/workflow/form.js @@ -60,4 +60,59 @@ export const changeCategory = (row) => { method: 'post', data: row }) -} \ No newline at end of file +} + +export const downloadFile = (query) => { + return request({ + url: '/api/blade-workflow/database/download', + method: 'get', + params: query, + responseType: 'blob' + }) +} +// 运维公司 +export const getCompany = () => { + return request({ + url: '/api/blade-user/maintenanceCompany', + method: 'get', + }) +} +// 运维部门 +export const getDepts = (query) => { + return request({ + url: '/api/blade-system/dept/getDepts', + method: 'get', + params:query + }) +} +// 任务父类 +export const getTaskParent = () => { + return request({ + url: '/api/blade-system/dict-biz/dictionary?code=task_parent', + method: 'get', + }) +} +// 任务种类 +export const getTaskTypeData = (query) => { + return request({ + url: '/api/blade-workflow/taskInfo/taskTypeData', + method: 'get', + params:query + }) +} +// 系统名称/数据库 +export const getTaskAndDataBase = () => { + return request({ + url: '/api/blade-workflow/projectInfo/projectAndDataBase', + method: 'get', + }) +} +// 系统名称/数据表 +export const getModuleAndDataTable = (query) => { + return request({ + url: '/api/blade-workflow/projectInfo/moduleAndDataTable', + method: 'get', + params:query + }) +} + diff --git a/src/api/plugin/workflow/process.js b/src/api/plugin/workflow/process.js index 75e87a7..d554e1b 100644 --- a/src/api/plugin/workflow/process.js +++ b/src/api/plugin/workflow/process.js @@ -300,4 +300,4 @@ export const userList = (current, size, params) => { size, } }) -} \ No newline at end of file +} diff --git a/src/styles/custom/custom.scss b/src/styles/custom/custom.scss index cbfba17..391351a 100644 --- a/src/styles/custom/custom.scss +++ b/src/styles/custom/custom.scss @@ -1,24 +1,10 @@ -// // input输入框 -// .el-input--small .el-input__inner { - -// border-radius: 3px 3px 3px 3px; -// color: #333; -// position: relative; -// border: 1px solid #CFCFCF -// } -// // input输入框label -// .el-form--label-top .el-form-item__label { -// font-size: 16px; -// color: #273240; -// padding: 0!important; -// } - // 包裹容器 .cus-container { margin: 0 38px; height: 100%; width: calc(100% - 76px); } +// 表格 #avue-id { // .el-table { // height: 776px; @@ -41,7 +27,7 @@ // 分页 .avue-crud__pagination { text-align: left; - background: #F0F2F5; + background: #f0f2f5; } // 自定义弹框样式,只有父类包含 custom类才可使用 .custom { @@ -56,10 +42,10 @@ border-color: #e4e7ec; } .el-input--small { - width: 240px!important; + width: 240px !important; } .avue-form .el-date-editor.el-input { - width: 240px!important; + width: 240px !important; } .avue-form, @@ -93,12 +79,12 @@ margin-bottom: 21px; } .el-col-8 { - width: 240px; + width: 240px; } .el-col-8:nth-child(3n-1) { margin: 0 45px; } - .el-col-8:nth-child(3n+1) { + .el-col-8:nth-child(3n + 1) { margin-left: 35px; } .avue-dynamic { @@ -106,4 +92,39 @@ margin: 0 33px; margin-top: 10px; } -} \ No newline at end of file +} + +// 工作流表单 +.avue-skeleton { + .avue-crud .el-input--small input, + .avue-form .el-input--small input { + height: 50px; + line-height: 50px; + } + .el-col-md-8 { + width: 29%; + } + .el-col-md-8:nth-child(3n + 2) { + margin: 0 100px; + } + // input输入框 + .el-input--small .el-input__inner { + border-radius: 3px 3px 3px 3px; + color: #333; + position: relative; + border: 1px solid #cfcfcf; + } + // input输入框label + .el-form-item__label { + font-size: 16px; + color: #273240; + padding: 0 !important; + margin-bottom: 10px; + } + .el-upload-dragger { + width: 82vw; + } + .el-upload-list__item-name { + display: none; + } +} diff --git a/src/views/plugin/workflow/design/model.vue b/src/views/plugin/workflow/design/model.vue index b58a2e4..e7da00c 100644 --- a/src/views/plugin/workflow/design/model.vue +++ b/src/views/plugin/workflow/design/model.vue @@ -152,12 +152,12 @@ export default { searchMenuSpan: 6, menuWidth: 280, column: [ - { - label: "图标", - prop: "icon", - type: 'upload', - width: 80 - }, + // { + // label: "图标", + // prop: "icon", + // type: 'upload', + // width: 80 + // }, { label: "模型key", prop: "modelKey", @@ -170,21 +170,21 @@ export default { overHidden: true, search: true }, - { - label: '分类', - prop: 'categoryId', - type: 'tree', - props: { - label: 'name', - value: 'id' - }, - dicData: [], - rules: [{ - required: true, - message: "请选择分类", - trigger: "change" - }], - }, + // { + // label: '分类', + // prop: 'categoryId', + // type: 'tree', + // props: { + // label: 'name', + // value: 'id' + // }, + // dicData: [], + // rules: [{ + // required: true, + // message: "请选择分类", + // trigger: "change" + // }], + // }, { label: "描述", prop: "description", diff --git a/src/views/plugin/workflow/mixins/ex-form.js b/src/views/plugin/workflow/mixins/ex-form.js index d68a329..e6782a8 100644 --- a/src/views/plugin/workflow/mixins/ex-form.js +++ b/src/views/plugin/workflow/mixins/ex-form.js @@ -28,7 +28,7 @@ export default { }, methods: { // 动态路由跳转 - dynamicRoute(row, type, async = false) { + dynamicRoute(row, type, async = false,parent) { const { id, taskId, processInstanceId, processId, formKey, formUrl, processDefKey } = row let param = Buffer.from(JSON.stringify({ processId: id, @@ -59,7 +59,7 @@ export default { resolve({ row, type, param }) }) } else { - this.$router.push(`/workflow/process/${type}/${param}`) + this.$router.push(`/workflow/process/${type}/${param}?parent=${parent}`) } } }, diff --git a/src/views/plugin/workflow/process/components/examForm.vue b/src/views/plugin/workflow/process/components/examForm.vue index 1c4e3c1..cd04509 100644 --- a/src/views/plugin/workflow/process/components/examForm.vue +++ b/src/views/plugin/workflow/process/components/examForm.vue @@ -36,6 +36,7 @@ export default { examineForm: {}, examineOption: { menuBtn: false, + labelPosition: "top", column: [{ label: '批复意见', prop: 'comment', @@ -61,9 +62,10 @@ export default { label: 'name', value: 'url' }, - action: '/api/blade-resource/oss/endpoint/put-file', + action: '/api/blade-workflow/database/upload', span: 24, - display: true + display: true, + dragFile: true, }, // { // label: '抄送人', diff --git a/src/views/plugin/workflow/process/components/form.vue b/src/views/plugin/workflow/process/components/form.vue index 2ba68b7..d142069 100644 --- a/src/views/plugin/workflow/process/components/form.vue +++ b/src/views/plugin/workflow/process/components/form.vue @@ -1,11 +1,11 @@