whj vor 11 Monaten
Ursprung
Commit
85296ade3a
3 geänderte Dateien mit 35 neuen und 34 gelöschten Zeilen
  1. 13 0
      src/api/workflow/publish.js
  2. 2 1
      src/utils/dict.js
  3. 20 33
      src/views/workplace/publish/WaitPublish.vue

+ 13 - 0
src/api/workflow/publish.js

@@ -15,4 +15,17 @@ export function getWorplacePublishPage (parameter) {
             'Content-Type': 'application/json;charset=UTF-8'
         }
     })
+}
+
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function sendWorkflow (parameter) {
+  return axios({
+      url: '/workflow/bom/publish/task/' + parameter.id,
+      method: 'put',
+  })
 }

+ 2 - 1
src/utils/dict.js

@@ -355,7 +355,8 @@ DictCache.TYPE = {
   CUSTOM_FORM_TYPE: 'CUSTOM_FORM_TYPE',
   CATEGORY_TYPE: 'CATEGORY_TYPE',
   CLASS_NAME_CODE: 'CLASS_NAME_CODE',
-  TREATMENT_CONDITION:'TREATMENT_CONDITION'
+  TREATMENT_CONDITION:'TREATMENT_CONDITION',
+  FLOW_TASK_STATUS:'FLOW_TASK_STATUS'
 
 }
 DictCache.CODE = {

+ 20 - 33
src/views/workplace/publish/WaitPublish.vue

@@ -22,7 +22,7 @@
       <div class="table-operator" style="margin-bottom: 8px;">
         <a-row>
           <a-col :md="16">
-            <a-button type="primary" icon="plus" @click="handleAdd()">新增</a-button>
+            <!-- <a-button type="primary" icon="plus" @click="handleAdd()">新增</a-button> -->
             <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0">
               <a-menu slot="overlay">
                 <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
@@ -42,7 +42,7 @@
           <template>
             <a @click="handleView(record)">查看</a>
             <operation-button @click="handleEdit(record)">修改</operation-button>
-            <operation-button :type="2" title="是否要删除该条数据?" @confirm="batchDelete(record.id)">删除</operation-button>
+            <operation-button :type="2" title="确认发送" @confirm="handleSend(record.id)">发送</operation-button>
           </template>
         </span>
       </s-table>
@@ -52,7 +52,7 @@
 
 <script>
 import { STable, Ellipsis } from '@/components'
-import { getWorplacePublishPage } from '@/api/workflow/publish'
+import { getWorplacePublishPage, sendWorkflow } from '@/api/workflow/publish'
 
 export default {
   name: 'WorkflowTaskList',
@@ -102,6 +102,9 @@ export default {
         {
           title: '状态',
           dataIndex: 'taskStatus',
+          customRender: (text, record, index) => {
+            return this.statusMap[text]
+          },
         },
         {
           title: '操作',
@@ -145,11 +148,13 @@ export default {
         },
       },
       optionAlertShow: false,
+      statusMap: {},
     }
   },
   created() {
     // 下拉框map
     this.tableOption()
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FLOW_TASK_STATUS)
   },
   methods: {
     tableOption() {
@@ -193,29 +198,19 @@ export default {
       } else {
         ids = [id]
       }
-      deleteWorkflowTasks(ids).then((res) => {
-        this.$message.info('删除成功')
-        this.handleOk()
-        this.$refs.table.clearSelected()
-      })
+      // deleteWorkflowTasks(ids).then((res) => {
+      //   this.$message.info('删除成功')
+      //   this.handleOk()
+      //   this.$refs.table.clearSelected()
+      // })
     },
-    handleAdd() {
-      this.visible = false
-      const modal = this.$refs.baseModal
-      modal.base()
-    },
-    handleEdit(record) {
-      this.visible = false
-      fetchWorkflowTask({ id: record.id }).then((res) => {
-        const modal = this.$refs.baseModal
-        modal.base(res.data)
-      })
-    },
-    handleView(record) {
-      this.visible = false
-      fetchWorkflowTask({ id: record.id }).then((res) => {
-        const modal = this.$refs.detailModal
-        modal.base(res.data)
+    handleAdd() {},
+    handleEdit(record) {},
+    handleView(record) {},
+    handleSend(id) {
+      sendWorkflow({ id }).then((res) => {
+        this.$message.info('发送成功')
+        this.$refs.table.refresh()
       })
     },
     handleOk(values) {
@@ -230,14 +225,6 @@ export default {
       this.queryParam = {}
       this.$refs.table.refresh(true)
     },
-    doExport() {
-      const parameter = {
-        ...this.queryParam,
-      }
-      exportWorkflowTask(parameter).then((file) => {
-        this.BaseTool.Util.downLoadExportExcel(file)
-      })
-    },
     handleEnter() {
       this.$refs.table.refresh(true)
     },