From ae2c3f847da927b6124e872d8d74c0457a1eea14 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期三, 17 九月 2025 15:27:00 +0800
Subject: [PATCH] 现场编制功能适配

---
 src/views/flowmgr/programonmachine.vue     |  289 +++++++++++++
 src/views/statreport/confirmTablePrint.vue |  222 ---------
 src/views/dataex/programonmachineimp.vue   |   63 ++
 src/api/flowmgr/programonmachine.js        |   18 
 src/api/flow/todolist.js                   |    9 
 src/views/dataex/mdmprogramimp.vue         |    4 
 src/views/wel/shemi.vue                    |  488 +++++----------------
 src/views/flow/components/TodolistLeft.vue |    6 
 src/views/flow/todolist.vue                |  169 ++++++
 9 files changed, 662 insertions(+), 606 deletions(-)

diff --git a/src/api/flow/todolist.js b/src/api/flow/todolist.js
index ed397f0..43e3138 100644
--- a/src/api/flow/todolist.js
+++ b/src/api/flow/todolist.js
@@ -113,6 +113,15 @@
     data: data,
   })
 }
+
+//缂栫▼鍛樻壒閲忓鐞嗙幇鍦虹紪鍒�
+export const batchApproveOnMachine = data => {
+  return request({
+    url: '/blade-mdm/flow/dispatch/batch-program-on-machine',
+    method: 'post',
+    data: data,
+  })
+}
 // 涓婁竴鐜妭瀹℃壒浜�
 /*
 export const getPrevius = data => {
diff --git a/src/api/flowmgr/programonmachine.js b/src/api/flowmgr/programonmachine.js
new file mode 100644
index 0000000..244aba0
--- /dev/null
+++ b/src/api/flowmgr/programonmachine.js
@@ -0,0 +1,18 @@
+/*
+ * @Date: 2025-08-24 22:38:05
+ * @LastEditors: yangys
+ * @LastEditTime: 2025-08-24 08:32:12
+ * @FilePath: /mdmweb/src/api/flowmgr/exceptiontask.js
+ */
+import request from '@/axios';
+export const getList = (current, size, params) => {
+  return request({
+    url: '/blade-mdm/flowmgr/programonmachine/finished-page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    },
+  })
+};
\ No newline at end of file
diff --git a/src/views/dataex/mdmprogramimp.vue b/src/views/dataex/mdmprogramimp.vue
index 3aabb35..321c8fc 100644
--- a/src/views/dataex/mdmprogramimp.vue
+++ b/src/views/dataex/mdmprogramimp.vue
@@ -15,7 +15,7 @@
         </div>
       </template>
     </avue-crud>
-    <el-dialog title="DNC鏂囦欢瀵煎叆" append-to-body v-model="excelBox" width="555px">
+    <el-dialog title="娑夊瘑缃戞枃浠跺鍏�" append-to-body v-model="excelBox" width="555px">
       <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
         <!-- <template #excelTemplate>
           <el-button type="primary" @click="handleTemplate">
@@ -106,7 +106,7 @@
             prop: 'excelFile',
             type: 'upload',
             drag: true,
-            loadText: 'DNC鏂囦欢瀵煎叆锛岃绋嶇瓑',
+            loadText: '娑夊瘑缃戞枃浠跺鍏ワ紝璇风◢绛�',
             span: 24,
             propsHttp: {
               res: 'data',
diff --git a/src/views/dataex/programonmachineimp.vue b/src/views/dataex/programonmachineimp.vue
new file mode 100644
index 0000000..7ccbec7
--- /dev/null
+++ b/src/views/dataex/programonmachineimp.vue
@@ -0,0 +1,63 @@
+<!--
+ * @Author: 鏉庡枂(寮�鍙戠粍) lzhe@yxqiche.com
+ * @Date: 2025-05-28 12:03:55
+ * @LastEditors: gaoshp
+ * @LastEditTime: 2025-08-10 13:05:56
+ * @FilePath: /mdmweb/src/views/flowmgr/taskassign.vue
+ * @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+-->
+<template>
+  <basic-container>
+    <avue-form ref="form" :option="formOption" v-model="form" :upload-after="uploadAfter">
+      
+    </avue-form>
+  </basic-container>
+</template>
+
+<script>
+
+export default {
+  watch: {
+   
+  },
+  data() {
+    return {
+      form: {},
+      
+      formOption: {
+        labelWidth: 160,
+        submitBtn: false,
+        emptyBtn: false,
+        tip: false,
+        column: [
+          
+          {
+            label: '涓婁紶鐜板満缂栧埗璁板綍',
+            prop: 'file',
+            type: 'upload',
+            span: 12,
+            tip: '',
+            action: '/blade-mdm/program/mdmimport/import-prog-on-machine',
+          },
+          
+        ],
+      }
+    };
+  },
+  methods: {
+   uploadAfter(res, done, loading, column) {
+      if(res.data>0){
+        this.$message.success("鎴愬姛瀵煎叆"+res.data+"鏉¤褰�")
+      }else{
+        this.$message.warning("鏂囦欢鏁版嵁涓虹┖")
+      }
+      done();
+    },
+  },
+  mounted() {
+    
+  },
+};
+</script>
+
+<style lang="scss"></style>
diff --git a/src/views/flow/components/TodolistLeft.vue b/src/views/flow/components/TodolistLeft.vue
index 1e93bce..227abca 100644
--- a/src/views/flow/components/TodolistLeft.vue
+++ b/src/views/flow/components/TodolistLeft.vue
@@ -6,8 +6,8 @@
 -->
 <template>
     <basic-container>
-        <!--'cureProgramTask', 鍥哄寲缂栧埗涓嶈兘娣诲姞鏂囦欢-->
-        <div class="tool" v-show="['programmingTask', 'replaceProgrammingTask','appendProgrammingTask'].includes(row.taskDefinitionKey)">
+        <!--'cureProgramTask', 鍥哄寲缂栧埗鑳芥坊鍔犳枃浠�0916-->
+        <div class="tool" v-show="['programmingTask','cureProgramTask', 'replaceProgrammingTask','appendProgrammingTask'].includes(row.taskDefinitionKey)">
            
             <!--鏃犲浐鍖栫殑鎯呭喌鎵嶆樉绀鸿寮�鍏�-->
             <el-switch v-if="row.variables.hasCuredProgram!=='Y'" v-model="programOnMachine" active-text="鐜板満缂栧埗" inactive-text="宸ヨ壓鍛樼紪鍒�" />
@@ -22,8 +22,6 @@
          <el-text type="danger" v-if="row.variables.hasCuredProgram==='Y' && row.variables.isProcessEditionSame=='N' && row.variables.cureProgramUseable==undefined">宸插浐鍖栫▼搴忓伐搴忕増娆′笉涓�鑷达紝娲惧伐鐗堟:{{row.variables.processEdition}},宸插浐鍖栫増娆★細{{row.variables.curedProcessEdition}}</el-text>
          <el-text type="danger" v-if="row.variables.programOnMachine=='Y'">鐜板満缂栧埗</el-text>
         <el-table :data="tableData" border @row-click="showContent" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" max-height="380" highlight-current-row>
-            <!-- <el-table-column prop="machineCode" label="鍔犲伐鏈哄簥">
-            </el-table-column> -->
            
             <el-table-column type="index" label="#" width="40" align="center" />
             <el-table-column prop="name" label="绋嬪簭鍚嶇О">
diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index 51ceecb..576535d 100644
--- a/src/views/flow/todolist.vue
+++ b/src/views/flow/todolist.vue
@@ -1,6 +1,7 @@
 <template>
     <basic-container>
         <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
+            :search="query"
             @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
             @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
             @selection-change="selectionTransferTask">
@@ -13,15 +14,22 @@
                 <el-button type="primary" :disabled="this.transferTaskSelection.length==0" plain @click="reassign(0)">杞淳</el-button>
                 <el-button type="primary" :disabled="this.transferTaskSelection.length==0" v-if="permission.batch_approve" plain @click="reassign(3)">鎵归噺瀹℃壒
                 </el-button>
+
+                <el-button type="primary" :disabled="this.transferTaskSelection.length==0" v-if="permission.batch_on_machine" plain @click="showBatchOnMachine()">鐜板満缂栧埗
+                </el-button>
             </template>
             <template #menu="scope">
                 <el-button type="primary" text size="default" @click.stop="handleAction(scope.row, scope.index)">
                     {{approveButtonText(scope.row.taskDefinitionKey)}}
                 </el-button>
             </template>
+              
         </avue-crud>
         <el-dialog title=" " append-to-body v-model="reassignBox" width="30%">
             <avue-form ref="reassginform" :option="reassignOption" v-model="reassignForm" @submit="toPerson"></avue-form>
+        </el-dialog>
+        <el-dialog title="鐜板満缂栧埗" append-to-body v-model="onMachineBox" width="30%">
+            <avue-form :option="onMachineOption" v-model="onMachineForm" @submit="batchOnMachine"></avue-form>
         </el-dialog>
         <div  class="box-drawer">
         <el-drawer title="瀹℃壒" append-to-body v-model="approveBox" size="100%" v-if="approveBox" class="remark-drawer">
@@ -53,7 +61,7 @@
     </basic-container>
 </template>
 <script>
-import { getList, approve, getAssignee,getAssigneeTree,reassgin,manualDispatch,autoDispatch,todoChangeNotify,batchApprove } from '@/api/flow/todolist';
+import { getList, approve, getAssignee,getAssigneeTree,reassgin,manualDispatch,autoDispatch,todoChangeNotify,batchApprove, batchApproveOnMachine } from '@/api/flow/todolist';
 import { mapGetters } from 'vuex';
 import dayjs from 'dayjs';
 import TodolistLeft from './components/TodolistLeft.vue';
@@ -145,7 +153,12 @@
                 total: 0,
             },
             form: {},
-            query: {},
+            query: {
+                machineSpec: ['1','2']
+            },
+            defaultQuery: {
+                machineSpec: ['1','2']
+            },
             loading: true,
             option: {
                 rowKey: "taskId",
@@ -156,7 +169,7 @@
                 tip: false,
                 searchEnter:true,
                 searchShow: true,
-                searchMenuSpan: 6,
+                searchMenuSpan: 4,
                 dialogWidth: '60%',
                 border: true,
                 index: true,
@@ -168,7 +181,7 @@
                     {
                         label: '鍏抽敭瀛�',
                         prop: 'keyword',
-                        width: 300,
+                        width: 200,
                         search: true,
                         searchType: 'input',
                         hide: true,
@@ -180,6 +193,27 @@
                             {
                                 label: '宸ユ帶缃戣溅搴婄▼搴�',
                                 value: 2,
+                            },
+                        ],
+                    },
+                    {
+                        label: '鏈哄簥绫诲瀷',
+                        prop: 'machineSpec',
+                        width: 200,
+                        search: true,
+                        searchType: 'select',
+                        multiple:true,
+                        clearable:false,
+                        hide: true,
+                        emptyValues :["1",'2'],
+                        dicData: [
+                            {
+                                label: '杞﹀簥',
+                                value: '1',
+                            },
+                            {
+                                label: '鍔犲伐涓績',
+                                value: '2',
                             },
                         ],
                     },
@@ -349,7 +383,52 @@
                     },
                 ],
             },
-            reassignForm: {}
+            reassignForm: {},
+
+            onMachineBox: false,//鐜板満缂栧埗妗�
+            onMachineForm: {},
+            onMachineOption: {
+                submitBtn: true,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: '瀹℃壒缁撴灉',
+                        prop: 'approve',
+                        type: 'radio',
+                        span: 24,
+                        display: false,
+                        dicData: [
+                            { label: '閫氳繃', value: 'Y' },
+                            { label: '椹冲洖', value: 'N' },
+                        ],
+                        rules: [{ required: true, message: '璇烽�夋嫨瀹℃壒缁撴灉', trigger: 'blur' }],
+                    },
+                    {
+                        label: '鍙戦�佺粰',
+                        prop: 'assignee',
+                        component: 'elTreeSelect',
+                        params: {
+                            props:{
+                                label: 'name',
+                                value:'id',
+                                disabled: (data) => data.nodeType==='dept',
+                                isLeaf: (data) => data.children==null || data.children.length==0,
+                            },
+                        },
+                        display: true,
+                        filterable: true,
+                        span: 24,
+                        disabled: false,
+                        rules: [{ required: true, message: '璇疯緭鍏ラ�夋嫨', trigger: 'blur' }],
+                    },
+                    {
+                        label: '澶囨敞',
+                        span: 24,
+                        prop: 'comment',
+                        type: 'textarea',
+                    },
+                ],
+            },
         };
     },
     watch: {
@@ -409,6 +488,7 @@
                 
                 this.optionApprove.column[1].data = this.assigneeData;
                 this.reassignOption.column[1].data = this.assigneeData;
+                this.onMachineOption.column[1].data = this.assigneeData;
              });
     },
     methods: {
@@ -631,8 +711,41 @@
                 }
             }
             
-            
         },
+        showBatchOnMachine(){//鏄剧ず鐜板満缂栧埗瀵硅瘽妗�
+            this.onMachineBox = true;
+            this.onMachineForm.assignee = this.transferTaskSelection[0].variables.checker;
+
+        },
+        batchOnMachine() {//缂栧埗鎵归噺澶勭悊锛堢幇鍦虹紪鍒讹級
+           
+            this.$confirm('璇风‘璁ゆ槸鍚﹀皢閫夊畾浠诲姟璁剧疆涓虹幇鍦虹紪鍒讹紵', '', {
+                confirmButtonText: this.$t('submitText'),
+                cancelButtonText: this.$t('cancelText'),
+                type: 'warning',
+            }).then(() => {
+                batchApproveOnMachine({
+                    taskIds: this.transferTaskSelection.map(v => v.taskId),
+                    processInstanceIds: this.transferTaskSelection.map(v => v.processInstanceId),
+                    assignee: this.onMachineForm.assignee,
+                }).then(res => {
+                    if(res.data.code !== 200) {
+                        this.$message.error(res.data.msg);
+                        return;
+                    }
+                    this.$message.success('鎿嶄綔鎴愬姛');
+                    this.onMachineBox = false;
+                    this.onLoad(this.page, this.query);
+                    todoChangeNotify();
+                }).catch(err => {
+                    this.$message.success('鎿嶄綔澶辫触');
+                })
+            }).catch(() => {
+                // this.$message.info('宸插彇娑堟搷浣�');
+            });
+           
+        },
+
         toPerson(form, done) {
             let tip = ''
             this.reassignType === 1 ? tip = '璇风‘璁ゆ槸鍚︽墜鍔ㄦ淳宸�' : this.reassignType === 2 ? tip = '璇风‘璁ゆ槸鍚﹁嚜鍔ㄦ淳宸�' : tip = '璇风‘璁ゆ槸鍚﹂噸鏂版寚娲�';
@@ -770,16 +883,35 @@
             this.setApproveBtn(row);
             //console.log('handleAction', row, index);
         },
-        handleSubmit(form, done) {
-            
-            
-            //this.$alert(this.$refs.todolistLeft.programOnMachine)
-            //done();
-            //return;
+        async handleSubmit(form, done) {
+
             let programOnMachine = 'N'
-            if(this.row.taskDefinitionKey==='programmingTask'){
+            let goApprove = true;
+            if(this.row.taskDefinitionKey==='programmingTask' || this.row.taskDefinitionKey==='cureProgramTask'){
                 programOnMachine = this.$refs.todolistLeft.programOnMachine?'Y':'N';
+
+                let atts = this.$refs.todolistLeft.tableData;
+                let otherFileCOunt = atts.filter(att => att.program === false).length;
+                if(otherFileCOunt == 0){
+                    let confirResult = await this.$confirm('鏂囦欢鍒楄〃涓棤鍏朵粬鏂囦欢锛岀‘璁よ鎻愪氦鍚楋紵', '', {
+                        confirmButtonText: this.$t('submitText'),
+                        cancelButtonText: this.$t('cancelText'),
+                        type: 'warning',
+                    }).then(()=>{
+                        goApprove = true;
+                    }).catch(action => {
+                        //鍙栨秷鎿嶄綔
+                        goApprove = false;
+                    });
+
+                }
+                
             }
+            if(goApprove == false){
+                done();
+                return;
+            }
+
             approve({
                 ...this.formApprove,
                 taskId: this.row.taskId,
@@ -806,6 +938,7 @@
             let data = {}
             this.query = params;
             this.page.currentPage = 1;
+            /*
             console.log('searchChange', params);
             params.createTimeBegin = params?.processCreateTime?.[0] || '';
             params.createTimeEnd = params?.processCreateTime?.[1] || '';
@@ -815,11 +948,12 @@
                 keyword: params.keyword || ''
             }
             this.query = data
-            this.onLoad(this.page, data);
+            */
+            this.onLoad(this.page, {});
             done();
         },
         searchReset() {
-            this.query = {};
+            this.query = this.defaultQuery;
             this.onLoad(this.page);
         },
         currentChange(currentPage) {
@@ -835,7 +969,6 @@
         onLoad(page, params = {}) {
             const query = {
                 ...this.query,
-                // category: params.category ? flowCategory(params.category) : null,
                 mode: this.mode,
             };
             try {
@@ -843,7 +976,9 @@
             } catch (error) {
                 console.error('鏃ユ湡鏍煎紡鍖栭敊璇�', error);
             }
-
+             console.log('params',params);
+            console.log('q',query);
+            console.log('thisq',this.query);
             this.loading = true;
             getList(page.currentPage, page.pageSize, Object.assign(query, params)).then(res => {
                 const data = res.data.data;
diff --git a/src/views/flowmgr/programonmachine.vue b/src/views/flowmgr/programonmachine.vue
new file mode 100644
index 0000000..7ee1686
--- /dev/null
+++ b/src/views/flowmgr/programonmachine.vue
@@ -0,0 +1,289 @@
+<!--
+ * @Date: 2025-06-18 09:17:09
+ * @LastEditors: gaoshp
+ * @LastEditTime: 2025-08-17 08:46:49
+ * @FilePath: /mdmweb/src/views/flowmgr/processQuery2.vue
+
+-->
+<template>
+    <basic-container>
+        <avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page"
+        :search="query"
+            @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
+            @size-change="sizeChange" @refresh-change="refreshChange"  @on-load="onLoad"
+            >
+            
+            <template #menu-left>
+            
+              <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleExport">瀵煎嚭</el-button>
+             
+          </template>
+        </avue-crud>
+
+    </basic-container>
+</template>
+
+<script>
+import { getList } from '@/api/flowmgr/programonmachine.js';
+import { exportBlobPost } from '@/api/common';
+import NProgress from 'nprogress';
+import { downloadFile } from '@/utils/util';
+import 'nprogress/nprogress.css';
+
+export default {
+    data() {
+        return {
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0,
+            },
+            query: {
+               endTime: [this.getBeginDate(), this.getToday()]
+            },
+            form:{},
+            loading: true,
+            data: [],
+            
+            option: {
+                addBtn: false,
+                editBtn: false,
+                delBtn: false,
+                viewBtn: false,
+                columnBtn: false,
+                tip: false,
+                searchShow: true,
+                searchMenuSpan: 7,
+                searchEnter:true,
+                dialogWidth: '70%',
+                // tree: true,
+                border: true,
+                index: true,
+                selection: false,
+                menuWidth: 100,
+                menu: false,
+                labelWidth: 90,
+                menuSpan: 6,
+                dialogClickModal: false,
+                column: [
+                    {
+                        label: '瀹℃壒鏃堕棿',
+                        prop: 'endTime',
+                        type: 'date',
+                        format: 'YYYY-MM-DD',
+                        valueFormat: 'YYYY-MM-DD',
+                        search: true,
+                        searchRange: true,
+                        hide: true,
+                    },
+                    
+                     {
+                        label: '闆剁粍浠跺彿',
+                        prop: 'drawingNo',
+                        search: true,
+                        searchType: 'input',
+                        width: 180,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.drawingNo || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鍙�',
+                        prop: 'processNo',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.processNo || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鍚嶇О',
+                        prop: 'processName',
+                        width: 100,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.processName || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鐗堟',
+                        prop: 'processEdition',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.processEdition || '');
+                        }
+                    },
+                   {
+                        label: '鎵规鍙�',
+                        prop: 'variables.craftEdition',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.craftEdition || '');
+                        }
+                    },
+                    {
+                        label: '浠诲姟杞﹂棿',
+                        prop: 'workshop',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.workshop || '');
+                        }
+                    },
+                    {
+                        label: '杩囩▼鍗″彿',
+                        prop: '',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.processCard || '');
+                        },
+                    },
+					
+					{
+                        label: '浜у搧鍨嬪彿',
+                        prop: '',
+                        width: 100,
+						render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.productModel)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.productModel || '');
+                        }
+                    },
+					
+                    {
+                        label: '鏈哄簥',
+                        prop: '',
+                        render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.machineCode)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.machineCode || '');
+                        }
+                    },
+                    {
+                        label: '鍒涘缓鏃堕棿',
+                        prop: 'processCreateTime',
+                    },
+                ],
+            },
+            
+        }
+    },
+    mounted() {
+        const startDate = this.$dayjs().subtract(7, 'day').format('YYYY-MM-DD');
+        const endDate = this.$dayjs().format('YYYY-MM-DD')
+   
+    },
+    methods: {
+        
+         getToday() {
+            let today = new Date();
+            return `${today.getFullYear()}-${(today.getMonth() + 1).toString().padStart(2, '0')}-${today.getDate().toString().padStart(2, '0')}`;
+
+        },
+        getBeginDate() {
+            var beginDate = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
+            return `${beginDate.getFullYear()}-${(beginDate.getMonth() + 1).toString().padStart(2, '0')}-${beginDate.getDate().toString().padStart(2, '0')}`;
+            },
+        handleExport(row, index,) {
+           //纭琛ㄤ笅杞�
+            this.$confirm('鏄惁瀵煎嚭鐜板満缂栫▼璁板綍?', '鎻愮ず', {
+                confirmButtonText: '纭畾',
+                cancelButtonText: '鍙栨秷',
+                type: 'warning',
+            }).then(() => {
+                
+                NProgress.start();
+                const data = {
+                    ...this.query,
+                    endTimeBegin: this.query.endTimeBegin,
+                    endTimeEnd: this.query.endTimeEnd,
+                    //drawingNo: query.drawingNo || '',
+                };
+                exportBlobPost(
+                    `/blade-mdm/flowmgr/programonmachine/export`,
+                    data
+                ).then(res => {
+                    let name = res.headers['content-disposition'].split('filename=')[1]
+                    name = decodeURI(name)
+                    downloadFile(res.data, `${name}`);
+                    NProgress.done();
+                });
+            });
+            
+
+        },
+        searchChange(params, done) {
+            let data = {}
+            this.query = params;
+            this.page.currentPage = 1;
+           
+            this.onLoad(this.page, data);
+            done();
+        },
+        searchReset() {
+            this.onLoad(this.page, {});
+            done();
+        },
+        currentChange(currentPage) {
+            this.page.currentPage = currentPage;
+            // this.onLoad();
+        },
+        sizeChange(pageSize) {
+            this.page.pageSize = pageSize;
+        },
+        refreshChange() {
+            this.onLoad(this.page, this.query);
+        },
+        /** * 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
+         */
+        onLoad(page, params = {}) {
+            const data = {
+                ...this.query,
+                endTimeBegin: this.query?.endTime?.[0] || undefined,
+                endTimeEnd: this.query?.endTime?.[1] || undefined,
+                drawingNo: params.drawingNo || '',
+            };
+            this.loading = true;
+            getList(page.currentPage, page.pageSize, Object.assign(data, params)).then(res => {
+                const data = res.data.data
+                this.page.total = data.total;
+                this.data = data.records.map(v=> {
+                    return {
+                        ...v,
+                    }
+                });
+                this.loading = false;
+            }, () => {
+                this.data = [];
+                this.loading = false;
+            }).catch(err => {
+                this.data = [];
+                this.loading = false;
+            });
+        }
+    }
+};
+</script>
+
+<style lang="scss">
+.margin0 {
+    margin: 0
+}
+</style>
\ No newline at end of file
diff --git a/src/views/statreport/confirmTablePrint.vue b/src/views/statreport/confirmTablePrint.vue
index 974078f..b71f77e 100644
--- a/src/views/statreport/confirmTablePrint.vue
+++ b/src/views/statreport/confirmTablePrint.vue
@@ -145,26 +145,7 @@
                             return h('p',{'class': 'margin0'}, row?.variables?.processCard || '');
                         },
                     },
-					{
-                        label: '鍥惧彿',
-                        prop: '',
-                        width: 100,
-						render: ({ row }) => {
-                            return h('p',
-                                {
-                                    attrs: {},
-                                    class: {},
-                                    style: {},
-                                }, row?.variables?.drawingNo)
-                        },
-                        renderForm: ({ row }) => {
-                            return h('span', {
-                                attrs: {},
-                                class: {},
-                                style: {},
-                            }, row?.variables?.drawingNo || '');
-                        }
-                    },
+					
 					{
                         label: '浜у搧鍨嬪彿',
                         prop: '',
@@ -211,204 +192,13 @@
                     },
                 ],
             },
-            viewFormOption: {
-                emptyBtn: false,
-                submitBtn: false,
-                menuBtn: false,
-                labelWidth: 100,
-                span: 8,
-                column: [
-                    {
-                        label: '娴佺▼鍚嶇О',
-                        prop: '',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables.myProcessName)
-                        }
-                    },
-                    {
-                        label: '鍒涘缓鏃堕棿',
-                        prop: 'createTime',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.createTime)
-                        },
-                    },
-                    {
-                        label: '鏍囬',
-                        prop: 'variables.title',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.title)
-                        }
-                    },
-                    
-                    {
-                        label: '鎵规鍙�',
-                        prop: 'variables.craftEdition',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.craftEdition || '');
-                        }
-                    },
-                    {
-                        label: '宸ュ簭鍙�',
-                        prop: 'processNo',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.processNo || '');
-                        }
-                    },
-                    {
-                        label: '宸ュ簭鍚嶇О',
-                        prop: 'processName',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.processName || '');
-                        }
-                    },
-                    {
-                        label: '宸ュ簭鐗堟',
-                        prop: 'processEdition',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.processEdition || '');
-                        }
-                    },
-                    {
-                        label: '闆剁粍浠跺彿',
-                        prop: 'drawingNo',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.drawingNo || '');
-                        }
-                    },
-                    {
-                        label: '浠诲姟杞﹂棿',
-                        prop: 'workshop',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.workshop || '');
-                        }
-                    },
-                    {
-                        label: '杩囩▼鍗″彿',
-                        prop: '',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.processCard || '');
-                        }
-                    },
-                    {
-                        label: '鍥惧彿',
-                        prop: 'drawingNo',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.drawingNo)
-                        }
-                    },
-                    {
-                        label: '浜у搧鍨嬪彿',
-                        prop: 'productModel',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.productModel)
-                        }
-                    },                    
-                    {
-                        label: '鏈哄簥',
-                        prop: 'machineCode',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.machineCode)
-                        }
-                    },
-                    {
-                        label: '鍒涘缓浜�',
-                        prop: 'startUserName',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.startUserName)
-                        }
-                    },
-                    {
-                        label: '鍒涘缓鏃堕棿',
-                        prop: 'processCreateTime',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.processCreateTime)
-                        }
-                    },
-                    {
-                        label: '褰撳墠鑺傜偣',
-                        prop: 'taskName',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.taskName)
-                        }
-                    },
-                    {
-                        label: '璁″垝鍔犲伐鏃堕棿',
-                        prop: 'planStartTime',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.planStartTime || '');
-                        }
-                    },
-                    {
-                        label: '绋嬪簭鍖呭悕',
-                        prop: 'programPackageName',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.programPackageName || '');
-                        }
-                    },
-                    {
-                        label: '鍋忕鍗曞彿',
-                        prop: '',
-                        render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.deviation || '');
-                        }
-                    },
-                ],
-            },
-            selectedList: [],
-            dialogVisible: false,
-            reassignBox: false,
-            reassignForm: {},
-            reassignOption: {
-                submitBtn: true,
-                emptyBtn: false,
-                column: [
-                    {
-                        label: '鍙戦�佺粰',
-                        prop: 'newAssigneeId',
-                        type: 'select',
-                        // dicUrl: `/blade-mdm/flow/flow-user-list?deptId=0`,
-                        // dicFlag: true,
-                        props: {
-                            label: 'name',
-                            value: 'id',
-                        },
-                        span: 24,
-                        disabled: false,
-                        dicData: [
-
-                        ],
-                        rules: [{ required: true, message: '璇疯緭鍏ラ�夋嫨', trigger: 'blur' }],
-                    },
-                    {
-                        label: '澶囨敞',
-                        span: 24,
-                        prop: 'comment',
-                        type: 'textarea',
-                        rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
-                    },
-                ],
-            },
+            
         }
     },
     mounted() {
-        getAssignee().then(res => {
-            this.reassignOption.column[0].dicData = res.data.data;
-        })
     },
     methods: {
-        customView(row) {
-            this.viewRow = {...row};
-            axios({
-                url: '/blade-mdm/flow/mgr/process-trace',
-                method: 'get',
-                params: {processInstanceId: row.processInstanceId}
-            }).then(
-              res => {
-                this.tableData = res.data.data;
-            });
-            this.dialogVisible = true;
-        },
-        
+       
         handleConfirmTable(row, index,) {
            //纭琛ㄤ笅杞�
             this.$confirm('鏄惁瀵煎嚭纭琛�1?', '鎻愮ず', {
@@ -445,12 +235,6 @@
             console.log('searchChange', params);
             params.createTimeBegin = params?.createTime?.[0] || '';
             params.createTimeEnd = params?.createTime?.[1] || '';
-            console.log(params);
-            // data = {
-            //     createTimeBegin: dayjs(params.createTimeBegin).isValid() ? dayjs(params.createTimeBegin).format('YYYY-MM-DD') : '',
-            //     createTimeEnd: dayjs(params.createTimeEnd).isValid() ? dayjs(params.createTimeEnd).format('YYYY-MM-DD') : '',
-            //     keyword: params.keyword || ''
-            // }
             data = {
                 createTimeBegin: params.createTimeBegin || undefined,
                 createTimeEnd: params.createTimeEnd || undefined,
diff --git a/src/views/wel/shemi.vue b/src/views/wel/shemi.vue
index 6210a4d..c9192de 100644
--- a/src/views/wel/shemi.vue
+++ b/src/views/wel/shemi.vue
@@ -1,7 +1,7 @@
 <template>
   <basic-container>
     <div class="norightmenu" v-if="!isSearch">
-      <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud0"
+      <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud"
         v-model:search="search" v-model:page="mypage" @current-change="currentChange" @size-change="sizeChange"
         @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @row-click="rowClick">
         <template #search>
@@ -22,7 +22,7 @@
                   :value="item.value" /></el-select>
             </el-col>
             <el-col :span="6" class="search-data-flex">
-              <span class="search-data-title">鏃堕棿鑼冨洿:</span>
+              <span class="search-data-title">鏃堕棿:</span>
               <el-date-picker v-model="searchTreeData.createTime" type="daterange" start-placeholder="寮�濮嬫椂闂�"
                 end-placeholder="缁撴潫鏃堕棿" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                 @change="createTimeChange" /><!--:disabled-date="disabledDate" 涓嶉渶瑕佺鐢ㄦ棩鏈�-->
@@ -36,7 +36,7 @@
                   style="margin-right: 6px;">
                   <Delete />
                 </el-icon>娓呯┖</el-button>
-              <el-button type="danger" @click="refresh('crud0')">閲嶇疆琛ㄦ牸</el-button>
+              <el-button type="danger" @click="refresh()">閲嶇疆琛ㄦ牸</el-button>
             </el-col>
           </el-row>
         </template>
@@ -58,7 +58,7 @@
       </avue-crud>
     </div>
     <div class="norightmenu" v-else>
-      <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud1"
+      <avue-crud :addBtn="false" :option="option" :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" :table-loading="loading" :data="treeData" ref="crud"
         v-model:search="search" v-model:page="mypage" @current-change="currentChange" @size-change="sizeChange"
         @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @row-click="rowClick">
         <template #search>
@@ -71,7 +71,7 @@
                 <el-checkbox value="3" label="鍋忕" />
               </el-checkbox-group>
             </el-col>
-            <el-col :span="4" class="search-data-flex">
+            <el-col :span="6" class="search-data-flex">
               <span class="search-data-title">闆剁粍浠跺彿:</span>
               <el-select v-model="searchTreeData.drawingNo" clearable filterable remote reserve-keyword placeholder="杈撳叆鑷冲皯3涓瓧绗﹁繃婊ゆ暟鎹�"
                 :remote-method="remoteMethod" :loading="searchLoading">
@@ -79,12 +79,12 @@
                   :value="item.value" /></el-select>
             </el-col>
             <el-col :span="6" class="search-data-flex">
-              <span class="search-data-title">鏃堕棿鑼冨洿:</span>
+              <span class="search-data-title">鏃堕棿:</span>
               <el-date-picker v-model="searchTreeData.createTime" type="daterange" start-placeholder="寮�濮嬫椂闂�"
                 end-placeholder="缁撴潫鏃堕棿" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                 @change="createTimeChange" /><!--:disabled-date="disabledDate" 涓嶉渶瑕佺鐢ㄦ棩鏈�-->
             </el-col>
-            <el-col :span="8" class="search-data-flex">
+            <el-col :span="6" class="search-data-flex">
               <el-button type="primary" @click="searchTree" :loading="treeSearchLoad"><el-icon class="el-icon--right"
                   style="margin-right: 6px;">
                   <Search />
@@ -93,7 +93,7 @@
                   style="margin-right: 6px;">
                   <Delete />
                 </el-icon>娓呯┖</el-button>
-                <el-button type="danger" @click="refresh('crud1')">閲嶇疆琛ㄦ牸</el-button>
+                <el-button type="danger" @click="refresh()">閲嶇疆琛ㄦ牸</el-button>
             </el-col>
           </el-row>
         </template>
@@ -111,26 +111,11 @@
             v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked != 1"
             icon="el-icon-unlock" type="primary" @click="showLockDlg(row)" placeholder="閿佸畾" title="閿佸畾"></el-button>
           <el-button class="treebtn" :size="size" text
-            v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1"
+            v-if="permission.lock_button && row.nodeType == 60 && (row.parentIds.indexOf('0,2') > -1 || row.parentIds.indexOf('0,3') > -1)&& row.isLocked == 1"
             icon="el-icon-lock" type="primary" @click="showUnLockDlg(row)" placeholder="瑙i攣" title="瑙i攣"></el-button>
         </template>
       </avue-crud>
     </div>
-    <!-- 鏂板鑺傜偣 -->
-    <el-dialog :title="modalTitle" append-to-body v-model="modalBox">
-      <avue-form :option="modalOption" v-model="modalForm" @submit="modalSubmit" @reset-change="modalCancel" />
-    </el-dialog>
-    <el-dialog title="涓婁紶鏂囦欢" append-to-body v-model="uploadmodalBox">
-      <avue-form :option="uploadmodalOption" v-model="uploadmodalForm" @submit="uploadmodalSubmit"
-        @reset-change="uploadmodalCancel" :upload-before="uploadBefore" :upload-after="uploadAfter">
-        <template #fileList="{ }" slot-scope="{ value }">
-          <div v-for="(file, index) in fileList" :key="index" v-if="fileList.length != 0">
-            {{ file.name }}
-          </div>
-          <div v-else>娌℃湁涓婁紶鏂囦欢</div>
-        </template>
-      </avue-form>
-    </el-dialog>
 
     <!-- 閿佸畾瀵硅瘽妗� -->
     <el-dialog title="绋嬪簭閿佸畾" append-to-body v-model="lockBox">
@@ -146,13 +131,36 @@
       <div v-html="convertToHtml(fileContent)" class="convertToHtml"></div>
     </template>
     <template v-else-if="tabsType == 'tab4'">
+      <!--
       <avue-crud :addBtn="false" :option="tabsFormOption4" :data="tabsForm4" ref="crud4"
         @selection-change="selectionChange">
+        
         <template #menu-left>
           <el-button :size="size" type="primary" @click="comparison"
             :disabled="selectionList.length != 2">瀵规瘮</el-button>
         </template>
+    
       </avue-crud>
+          -->
+      <el-table :data="tabsForm4" border :row-style="{height:'20px'}" :cell-style="{padding:'0px'}" max-height="220" highlight-current-row>
+           
+            <el-table-column type="index" label="#" width="40" align="center" />
+            <el-table-column prop="name" label="绋嬪簭鍖呭悕">
+            </el-table-column>
+            <el-table-column prop="versionNumber" label="绋嬪簭鐗堟湰">
+            </el-table-column>
+            <el-table-column prop="createTime" label="鍒涘缓鏃堕棿">
+            </el-table-column>
+            <el-table-column prop="createUserName" label="鍒涘缓浜�">
+            </el-table-column>
+            <el-table-column fixed="right" label="鎿嶄綔" width="150" align="center">
+                <template #default="scope">
+                    <a style="color: blue;cursor: pointer;font-size: 12px;margin-right: 4px;" type="text" size="small"
+                        @click.stop="showHisFileDlg(scope.$index, scope.row)">绋嬪簭鏂囦欢</a>
+                    
+                </template>
+            </el-table-column>
+        </el-table>
     </template>
 
   </basic-container>
@@ -163,6 +171,17 @@
         :filename="codeDiffFileName1" :newFilename="codeDiffFileName2" />
     </div>
   </el-drawer>
+
+  <el-dialog title="鏌ョ湅鍘嗗彶鏂囦欢" append-to-body v-model="hisFileViewModel">
+      <el-table :data="hisFileTableData" ref="hisFilesTable" border @row-click="showHisContent" max-height="200" highlight-current-row>
+        <el-table-column type="index" label="#" width="40" align="center"/>
+        <el-table-column prop="name" label="鏂囦欢鍚嶇О"></el-table-column>
+        <el-table-column prop="createTime" label="鍒涘缓鏃堕棿"></el-table-column>
+      </el-table>
+      <h4>绋嬪簭鍐呭</h4>
+      <div v-html="hisFileContent" class="app-content"></div>
+  </el-dialog>
+
   <!-- 鏇挎崲 -->
   <el-drawer title="鏇挎崲" append-to-body v-model="replaceModel" size="100%" class="code-box">
     <div class="approve-box">
@@ -176,6 +195,7 @@
       </div>
     </div>
   </el-drawer>
+
 </template>
 
 <script>
@@ -286,7 +306,7 @@
       fileContent: "",
       isShowTabs: true,
       nodeTypeList: [],
-      fileList: [],
+      
       tabsType: "tab1",
       tabsOption: {},
       tabsOption1: {
@@ -307,12 +327,25 @@
           icon: 'el-icon-warning',
           label: '鏂囦欢鍐呭',
           prop: 'tab3'
-        }, {
+        }
+        ]
+      },
+      tabsOptionPackage: {
+        column: [{
+          icon: 'el-icon-info',
+          label: '鑺傜偣淇℃伅',
+          prop: 'tab1',
+        },
+        {
           icon: 'el-icon-warning',
           label: '鍘嗗彶璁板綍',
           prop: 'tab4'
         }]
       },
+      hisFileViewModel: false,//鍘嗗彶鏂囦欢鍒楄〃瀵硅瘽妗�
+      hisFileTableData:[], //鍘嗗彶鏂囦欢鍒楄〃鏁版嵁
+      hisFileContent:'',//鍘嗗彶鏂囦欢鍐呭
+
       tabsFormOption: {
         submitBtn: false,
         emptyBtn: false,
@@ -340,86 +373,20 @@
             prop: 'createTime',
             disabled: true,
             placeholder: " "
-          },/*
-          {
-            label: '鑺傜偣鎻忚堪',
-            prop: 'description',
-            disabled: true,
-            placeholder: " "
-          },*/
+          },
           {
             label: '淇敼鏃堕棿',
             prop: 'updateTime',
             disabled: true,
             placeholder: " "
-          }/*,
-          {
-            label: '澶囨敞',
-            prop: 'remark',
-            disabled: true,
-            placeholder: " "
-          }*/
-        ]
-      },
-      tabsForm: {},
-      uploadmodalBox: false,
-      uploadmodalForm: {},
-      selectedColumn: {},
-      modalForm: {},
-      modalOption: {
-        submitText: "淇濆瓨",
-        emptyText: "鍙栨秷",
-        menuPosition: "right",
-        column: [
-          {
-            label: '鑺傜偣绫诲瀷1',
-            prop: 'nodeType',
-            labelWidth: "120",
-            type: 'select',
-            dicUrl: '/blade-system/dict-biz/dictionary?code=nc_node_type',
-            props: {
-              label: 'dictValue',
-              value: 'dictKey',
-            },
-            disabled: true
-          },
-          {
-            label: '璁惧锛堟満搴婏級',
-            prop: 'machineCode',
-            labelWidth: "120",
-            type: 'select',
-            dicUrl: '/blade-mdm/machine/page',
-            props: {
-              label: 'name',
-              value: 'code',
-            },
-            dicFormatter(res) {
-              return res.data.records;
-            }
-          },
-          {
-            label: '鑺傜偣鍚嶇О',
-            prop: 'name',
-            labelWidth: "120",
-          },
-          {
-            label: '鑺傜偣鎻忚堪',
-            prop: 'description',
-            labelWidth: "120",
-            hide: true
-          },
-          {
-            label: '澶囨敞',
-            prop: 'remark',
-            type: "textarea",
-            labelWidth: "120",
-            span: 24
           }
         ]
       },
-      modalBox: false,
-      modalTitle: "",
-
+      tabsForm: {},
+      
+      selectedColumn: {},
+      modalForm: {},
+      
       lockOption: {
         submitText: "閿佸畾",
         emptyText: "鍙栨秷",
@@ -460,6 +427,7 @@
             label: '閿佸畾鍘熷洜',
             prop: 'remark',
             type: "textarea",
+            placeholder:'<鍐呭涓虹┖>',
             disabled:true,
             labelWidth: "120",
             span: 24,
@@ -484,6 +452,7 @@
         current: 1,
         total: 0,
       },
+      /*
       tabsFormOption4: {
         rowKey: "id",
         selection: true,
@@ -498,7 +467,7 @@
           { label: '鍒涘缓鏃堕棿', prop: 'createTime' },
           { label: '鍒涘缓浜�', prop: 'createUserName' },
         ]
-      },
+      },*/
       tabsForm4: {},
       defaultExpandedKeys: [],
       option: {
@@ -550,12 +519,7 @@
           {
             label: '绫诲瀷',
             prop: 'nodeTypeName'
-          },/*
-          {
-            label: '璁惧',
-            prop: 'machineCode'
           },
-          */
           {
             label: '閿佸畾鐘舵��',
             prop: 'isLocked',
@@ -603,143 +567,11 @@
         ],
       },
       treeData: [],
-      upData: []
     };
   },
   computed: {
     ...mapGetters(['userInfo', 'permission']),
-    uploadmodalOption() {
-      return {
-        submitText: "淇濆瓨",
-        emptyText: "鍙栨秷",
-        menuPosition: "right",
-        column: [
-          {
-            label: '鑺傜偣绫诲瀷',
-            prop: 'nodeType',
-            labelWidth: "120",
-            type: 'select',
-            dicUrl: '/blade-system/dict-biz/dictionary?code=nc_node_type',
-            props: {
-              label: 'dictValue',
-              value: 'dictKey',
-            },
-            disabled: true
-          },
-          {
-            label: '璁惧缂栧彿',
-            prop: 'machineCode',
-            labelWidth: "120",
-            type: 'select',
-            dicUrl: '/blade-mdm/machine/page',
-            props: {
-              label: 'name',
-              value: 'code',
-            },
-            dicFormatter(res) {
-              return res.data.records;
-            },
-            rules: [
-              {
-                required: true,
-                message: '璇疯緭鍏ヨ澶囩紪鍙�',
-                trigger: 'blur'
-              }
-            ]
-          },
-          {
-            label: '闆剁粍浠跺彿/鍥惧彿',
-            prop: 'drawingNo',
-            labelWidth: "120",
-            rules: [
-              {
-                required: true,
-                message: '璇疯緭鍏ラ浂缁勪欢鍙�/鍥惧彿',
-                trigger: 'blur'
-              }
-            ]
-          },
-          {
-            label: '宸ュ簭',
-            prop: 'processName',
-            labelWidth: "120",
-            rules: [
-              {
-                required: true,
-                message: '璇疯緭鍏ュ伐搴�',
-                trigger: 'blur'
-              }
-            ]
-          },
-          {
-            label: '宸ュ簭鐗堟湰',
-            prop: 'processEdition',
-            labelWidth: "120",
-            rules: [
-              {
-                required: true,
-                message: '璇疯緭鍏ュ伐搴忕増鏈�',
-                trigger: 'blur'
-              }
-            ]
-          },
-          {
-            label: '鏂囦欢鍒嗙被',
-            prop: 'category',
-            labelWidth: "120",
-            type: 'select',
-            dicUrl: '/blade-system/dict-biz/dictionary?code=node_file_type',
-            props: {
-              label: 'dictValue',
-              value: 'dictKey',
-            },
-            rules: [
-              {
-                required: true,
-                message: '璇烽�夋嫨鏂囦欢鍒嗙被',
-                trigger: 'change'
-              }
-            ]
-          },
-          {
-            label: '閫夋嫨鏂囦欢',
-            prop: 'uploadFile',
-            labelWidth: "120",
-            type: 'upload',
-            data: { nodeId: this.id },
-            action: "",
-            showFileList: false,
-            span: 24,
-            tip: "璇蜂笂浼犳枃浠讹紝灏嗗湪鎻愪氦鏃剁粺涓�澶勭悊",
-            action: "/blade-mdm/program/ncfile/upload",
-            rules: [
-              {
-                validator: (rule, value, callback) => {
-                  if (this.fileList.length === 0) {
-                    callback(new Error('璇蜂笂浼犳枃浠�'));
-                  } else {
-                    callback();
-                  }
-                },
-                trigger: 'blur'
-              }
-            ]
-          },
-          {
-            label: '宸蹭笂浼犳枃浠�',
-            prop: 'fileList',
-            labelWidth: "120"
-          },
-          {
-            label: '澶囨敞',
-            prop: 'remark',
-            type: "textarea",
-            labelWidth: "120",
-            span: 24
-          }
-        ]
-      }
-    }
+    
   },
   watch: {
 
@@ -790,14 +622,15 @@
           this.drawingNoList = drawingNoList;
         });
     },
-    refresh(refname){
+    refresh(){
+      //琛ㄦ牸閲嶇疆
       this.treeData=[];
-      //this.$refs[refname].doLayout();
-      this.$refs[refname].refreshTable();
+      //this.$refs.curd.refreshTable();
       let curS = this.isSearch;
       this.isSearch = null;
       this.onLoad();
       this.isSearch = !curS
+      
     },
     handleDownload(row){
       NProgress.start();
@@ -869,7 +702,7 @@
         }).then(res => {
           if (res.data.code == 200) {
             this.$message({ type: 'success', message: '瑙i攣娴佺▼宸插惎鍔�!' });
-            this.addLocalTreeNode(row.parentId);
+            //this.addLocalTreeNode(row.parentId);
             this.unlockBox = false;
           } else {
             this.$message({ type: 'error', message: res.data.msg });
@@ -951,6 +784,41 @@
         done();
       });
       
+    },
+
+    showHisFileDlg(index,row){
+      this.hisFileViewModel = true;
+
+      //鏌ヨ鏂囦欢鍒楄〃
+      axios({
+        url: '/blade-mdm/program/nodehis/files-by-parent-id',
+        method: 'get',
+        params: {id: row.id}
+      }).then(
+      res => {
+        
+        if(res.data.code === 200) {
+          this.hisFileTableData = res.data.data
+        } else {
+          this.$message.error('绋嬪簭鍐呭鍔犺浇澶辫触');
+        }
+      });
+    },
+    showHisContent(row, column, event) {
+     
+      axios({
+        url: '/blade-mdm/program/nodehis/content-by-nodeid',
+        method: 'get',
+        params: {nodeId: row.id}
+      }).then(
+      res => {
+        console.log(res)
+        if(res.data.code === 200) {
+            this.hisFileContent = res.data.data;
+        } else {
+            this.hisFileContent = '绋嬪簭鍐呭鍔犺浇澶辫触'
+        }
+      });
     },
     todoSelectionChange(applist) {
       this.applist = applist;
@@ -1086,64 +954,7 @@
         }
       );
     },
-    uploadBefore(file, done, loading, column) {
-      this.file = file;
-      this.fileList.push(file);
-      //done();  鏀惧紑灏变笂浼犱簡
-      return false;
-    },
-    uploadAfter() {
-    },
-    uploadmodalSubmit(row, done) {  //涓婁紶鎻愪氦鎺ュ彛
-      if (this.file == null) {
-        this.$message.error('璇蜂笂浼犳枃浠�');
-        return;
-      }
-      var formData = new FormData();
-      formData.append('file', this.file);
-      formData.append('nodeId', this.id);
-      if (this.isRepeatUpload) {
-        formData.append('cofirm', '1');
-      }
-      Object.keys(this.uploadmodalForm).forEach(key => {
-        formData.append(key, this.uploadmodalForm[key]);
-      });
-      this.loading = true;
-      axios({
-        url: '/blade-mdm/program/ncfile/upload',
-        method: 'post',
-        data: formData,
-      }).then(res => {
-        this.loading = false;
-        if (res.data.code == 2) {
-          this.$confirm('鏂囦欢鍚嶅凡瀛樺湪锛岀‘瀹氫笂浼犲悧?', '鎻愮ず', {
-            distinguishCancelAndClose: true,
-            confirmButtonText: '纭畾',
-            cancelButtonText: '鍙栨秷',
-            type: 'warning'
-          }).then(() => {
-            this.isRepeatUpload = true;
-            this.uploadmodalSubmit(row, done);
-          }).catch(action => {
-            this.isRepeatUpload = false;
-            this.$message({
-              type: 'info',
-              message: '鍙栨秷涓婁紶'
-            })
-          });
-        } else if (res.data.success) {
-          this.isRepeatUpload = false;
-          this.uploadmodalBox = false;
-          this.$message({ type: 'success', message: '鎿嶄綔鎴愬姛!' });
-          this.addLocalTreeNode(row.id);  //閲嶆柊鍔犺浇涓嬩竴绾�
-        } else {
-          this.isRepeatUpload = false;
-          alert(1)
-        }
-        done();
-      }
-      );
-    },
+    
     rowClick(row) {
       this.tabsForm = row;
       this.id = row.id;
@@ -1153,17 +964,22 @@
           this.tabsForm.nodeTypeName = item.dictValue;
         }
       })
-      if (this.tabsForm.nodeType != 70) {
-        this.tabsOption = this.tabsOption1;
-      } else {
+      if (this.tabsForm.nodeType == 60) {
+        //鍖呭悕鑺傜偣
+        this.tabsOption = this.tabsOptionPackage;
+        //鑾峰彇鍘嗗彶璁板綍
+        this.getHistory(row.id);
+      } else if (this.tabsForm.nodeType == 70){
+        //鏂囦欢鑺傜偣
         this.tabsOption = this.tabsOption2;
         //鑾峰彇鏂囦欢鍐呭
         this.getFile(row.id);
-        //鑾峰彇鍘嗗彶璁板綍
-        this.getHistory(row.id);
+        
         //娓呯┖瀵规瘮璁板綍
         this.content1 = "";
         this.content2 = "";
+      }else{
+        this.tabsOption = this.tabsOption1;
       }
       this.$nextTick(() => {
         this.tabsType = 'tab1';
@@ -1173,26 +989,11 @@
     tabsHandleChange(tabs) {
       this.tabsType = tabs.prop;
     },
-    showUpload(row) {//鑾峰彇闄勪欢鍐呭锛堟殏鏃舵病鐢級
-      this.fileList = [];
-      this.uploadmodalForm = row;
-      this.loading = true;
-      var obj = { parentId: row.id }
-      axios({
-        url: '/blade-mdm/program/node/lazy-list',
-        method: 'get',
-        params: obj,
-      }).then(
-        res => {
-          this.loading = false;
-          this.uploadmodalBox = true;
-        }
-      );
-    },
+    
     getFile(id) { //鏌ョ湅鏂囦欢鍐呭
       this.loading = true;
       axios({
-        url: '/blade-mdm/program/node/content-by-nodeid',
+        url: '/blade-mdm/program/nodehis/content-by-nodeid',
         method: 'get',
         params: { nodeId: id },
       }).then(
@@ -1205,7 +1006,7 @@
     getHistory(id) {  //鏌ョ湅鍘嗗彶璁板綍
       this.loading = true;
       axios({
-        url: '/blade-mdm/program/node/history-by-nodeid',
+        url: '/blade-mdm/program/nodehis/history-by-nodeid',
         method: 'get',
         params: { id },
       }).then(
@@ -1235,43 +1036,7 @@
     selectionChange(list) {
       this.selectionList = list;
     },
-    showEdit(row, done) {
-      this.modalTitle = "淇敼";
-      this.modalBox = true;
-      this.modalForm = row;
-    },
     
-    modalSubmit(row, done) {  //鏂板瀛愯妭鐐逛繚瀛�/淇敼
-      if (this.modalTitle == "淇敼") {
-        var url = "/blade-mdm/program/node/update";
-      } else {
-        var url = "/blade-mdm/program/node/save";
-      }
-      //璋冪敤鎺ュ彛
-      this.loading = true;
-      axios({
-        url,
-        method: 'post',
-        data: this.modalForm,
-      }).then(
-        res => {
-          this.$message.success('鎿嶄綔鎴愬姛');
-          this.modalBox = false;
-          // 淇敼锛屾洿鏂版湰鍦版暟鎹�
-          if (this.modalTitle === "淇敼") {
-            this.addLocalTreeNode(row.parentId);
-          } else {
-            // 濡傛灉鏄柊澧炴搷浣滐紝鍙兘闇�瑕侀噸鏂板姞杞芥暟鎹�
-            //this.$refs.crud.refreshTable();
-            //this.onLoad();
-            //鏂板锛屾洿鏂版湰鍦版暟鎹�
-            this.addLocalTreeNode(row.parentId);
-          }
-          this.loading = false;
-          done(row);
-        }
-      );
-    },
     addLocalTreeNode(parentId) {
       if (this.modalTitle == "鏂板鏍硅妭鐐�") {
         this.onLoad();
@@ -1289,17 +1054,12 @@
           if (parentId == 0) {
             this.treeData = [...children];
           } else {
+           
             this.$refs.crud.$refs.table.store.states.lazyTreeNodeMap.value[parentId] = [...children];
           }
           this.loading = false;
         }
       );
-    },
-    modalCancel() {
-      this.modalBox = false;
-    },
-    uploadmodalCancel() {
-      this.uploadmodalBox = false;
     },
     treeLoad(tree, treeNode, resolve) {
       this.loading = true;

--
Gitblit v1.9.3