From c2ba0d418a2d33043e396d385dc73664737686e0 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期三, 22 十一月 2023 19:07:59 +0800
Subject: [PATCH] 系统签审

---
 src/views/eam/ABC/StreamList.vue |   90 +++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 83 insertions(+), 7 deletions(-)

diff --git a/src/views/eam/ABC/StreamList.vue b/src/views/eam/ABC/StreamList.vue
index d626a2f..974f945 100644
--- a/src/views/eam/ABC/StreamList.vue
+++ b/src/views/eam/ABC/StreamList.vue
@@ -4,6 +4,20 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
+          <a-col
+          :span="6"
+          >
+            <a-form-item 
+            :labelCol="labelCol"
+            :wrapperCol="wrapperCol"
+            label="鍗曟嵁鍙�"
+            >
+              <a-input
+                placeholder="璇疯緭鍏ュ崟鎹彿鏌ヨ"
+                v-model="queryParam.num"
+              ></a-input>
+            </a-form-item>
+          </a-col>
         </a-row>
       </a-form>
     </div>
@@ -11,7 +25,16 @@
 
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+      <a-button
+        type="primary"
+        @click="searchQuery"
+        icon="search"
+      >鏌ヨ</a-button>
+      <a-button
+        @click="searchReset"
+        icon="reload"
+      >閲嶇疆</a-button>
+      <a-button @click="handleAdd" type="primary" icon="plus" v-if="nodeSort===1">鏂板</a-button>
       <!-- <a-button type="primary" icon="download" @click="handleExportXls('璁惧ABC璇勪环')">瀵煎嚭</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">瀵煎叆</a-button>
@@ -61,10 +84,13 @@
             涓嬭浇
           </a-button>
         </template>
-
         <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">缂栬緫</a>
-
+          <div v-if="nodeValue===record.status">
+            <a @click="handleStreamNext(record)" :disabled="nodeSort===1&&nodeValue!==record.status" >{{button1.name}}</a>
+          <a-divider type="vertical" />
+            <a @click="handleStreamLast(record)" :disabled="nodeSort===1" >{{button2.name}}</a>
+         </div>
+         <div v-if="nodeSort===1&&nodeValue===record.status">
           <a-divider type="vertical" />
           <a-dropdown>
             <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
@@ -74,8 +100,12 @@
                   <a>鍒犻櫎</a>
                 </a-popconfirm>
               </a-menu-item>
+              <a-menu-item>
+                <a @click="handleEdit(record)">缂栬緫</a>
+              </a-menu-item>
             </a-menu>
           </a-dropdown>
+         </div>
         </span>
 
       </a-table>
@@ -91,6 +121,7 @@
     </a-tabs>
 
     <stream-modal ref="modalForm" @ok="modalFormOk"></stream-modal>
+    <node-model ref="nodeModel" @ok="modalFormOk"></node-model>
   </a-card>
 </template>
 
@@ -102,6 +133,8 @@
   import StreamOperationList from './StreamOperationList'
   import ABCAssessmentList from './ABCAssessmentList'
   import '@/assets/less/TableExpand.less'
+  import NodeModel from './modules/NodeModel.vue'
+
 
   export default {
     name: "StreamList",
@@ -109,7 +142,8 @@
     components: {
       StreamOperationList,
       ABCAssessmentList,
-      StreamModal
+      StreamModal,
+        NodeModel
     },
     data () {
       return {
@@ -135,13 +169,13 @@
           {
             title:'褰撳墠鑺傜偣',
             align:"center",
-            dataIndex: 'status',
+            dataIndex: 'status_dictText',
             width:300
           },
           {
             title:'鍗曟嵁绫诲瀷',
             align:"center",
-            dataIndex: 'type',
+            dataIndex: 'type_dictText',
             width:300
           },
           {
@@ -170,6 +204,7 @@
           deleteBatch: "/eam/stream/deleteBatch",
           exportXlsUrl: "/eam/stream/exportXls",
           importExcelUrl: "eam/stream/importExcel",
+          getPreInfo:"eam/stream/getPreInfo"
         },
         dictOptions:{
         },
@@ -189,10 +224,17 @@
         superFieldList:[],
         streamOperationMainId: '',
         aBCAssessmentMainId: '',
+        button1:{},
+        button2:{},
+        nodeSort:0,
+        nodeValue:''
       }
     },
     created() {
       this.getSuperFieldList();
+    },
+    mounted(){
+      this.getPreInfo();
     },
     computed: {
       importExcelUrl: function(){
@@ -210,6 +252,30 @@
             }
           }
         }
+      },
+      handleStreamNext(record){
+        var step = {
+          name:this.button1.name,
+          value:this.button1.value,
+          opType:'next',
+          nodeSort:this.nodeSort,
+          node:this.nodeValue,
+          streamId:record.id
+        }
+        this.$refs.nodeModel.title = this.button1.name+"鎿嶄綔";
+        this.$refs.nodeModel.edit(step);
+      },
+      handleStreamLast(record){
+        var step = {
+          name:this.button2.name,
+          value:this.button2.value,
+          opType:'last',
+          nodeSort:this.nodeSort,
+          node:this.nodeValue,
+          streamId:record.id
+        }
+        this.$refs.nodeModel.title = this.button2.name+"鎿嶄綔";
+        this.$refs.nodeModel.edit(step);
       },
       onClearSelected() {
         this.selectedRowKeys = [];
@@ -260,6 +326,16 @@
         fieldList.push({type:'string',value:'status',text:'status',dictCode:''})
         fieldList.push({type:'string',value:'type',text:'鍗曟嵁绫诲瀷',dictCode:''})
         this.superFieldList = fieldList
+      },
+      getPreInfo(){
+        getAction(this.url.getPreInfo).then(res=>{
+            if(res.result.msg==='ok'){
+              this.button1 = res.result.buttons[0];
+              this.button2 = res.result.buttons[1];
+              this.nodeSort = res.result.nodeSort;
+              this.nodeValue = res.result.nodeValue;
+            }
+        })
       }
     }
   }

--
Gitblit v1.9.3