From 2781142ab67deba83925da706ca26b7f8ea1a759 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期四, 04 九月 2025 15:42:24 +0800
Subject: [PATCH] 审批用户列表改为树形

---
 src/views/wel/shemi.vue |  900 +++++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 599 insertions(+), 301 deletions(-)

diff --git a/src/views/wel/shemi.vue b/src/views/wel/shemi.vue
index d0c6c2b..3a48b74 100644
--- a/src/views/wel/shemi.vue
+++ b/src/views/wel/shemi.vue
@@ -1,62 +1,135 @@
 <template>
   <basic-container>
-    <avue-crud
-      :addBtn="false"
-      :option="option"
-      :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>
-        <el-row :gutter="24">
-          <el-col :span="6">
-            <el-input v-model="search.name" placeholder="璇疯緭鍏ヨ妭鐐瑰悕绉�" clearable/>
-          </el-col>
-          <el-col :span="6">
-            <el-select v-model="search.nodeType" placeholder="璇疯緭鍏ヨ妭鐐圭被鍨�" clearable>
-              <el-option v-for="item in nodeTypeList" :key="item.dictValue" :label="item.dictValue" :value="item.dictKey"/>formApprove.
-            </el-select>
-          </el-col>
-          <el-col :span="6">
-            <el-button type="primary" @click="searchTree"><el-icon class="el-icon--right" style="margin-right: 6px;"><Search /></el-icon>鎼滅储</el-button>
-            <el-button :icon="Delete" @click="setClearTree"><el-icon class="el-icon--right" style="margin-right: 6px;"><Delete /></el-icon>娓呯┖</el-button>
-          </el-col>
-        </el-row>
-      </template>
-      <!-- <template #menu-left>
+    <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="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>
+          <el-row :gutter="24">
+            <el-col :span="6" class="search-data-flex">
+              <span class="search-data-title w68">绋嬪簭鐘舵��:</span>
+              <el-checkbox-group v-model="searchTreeData.programStatus" class="marginR12">
+                <el-checkbox value="1" label="璇曞垏" />
+                <el-checkbox value="2" label="鍥哄寲" />
+                <el-checkbox value="3" label="鍋忕" />
+              </el-checkbox-group>
+            </el-col>
+            <el-col :span="6" class="search-data-flex">
+              <span class="search-data-title">闆剁粍浠跺彿:</span>
+              <el-select v-model="searchTreeData.drawingNo" filterable remote reserve-keyword placeholder="杈撳叆鑷冲皯3涓瓧绗﹁繃婊ゆ暟鎹�"
+                :remote-method="remoteMethod" :loading="searchLoading">
+                <el-option v-for="item in drawingNoList" :key="item.value" :label="item.label"
+                  :value="item.value" /></el-select>
+            </el-col>
+            <el-col :span="8" class="search-data-flex">
+              <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="4" class="search-data-flex">
+              <el-button type="primary" @click="searchTree" :loading="treeSearchLoad"><el-icon class="el-icon--right"
+                  style="margin-right: 6px;">
+                  <Search />
+                </el-icon>鎼滅储</el-button>
+              <el-button :icon="Delete" @click="setClearTree"><el-icon class="el-icon--right"
+                  style="margin-right: 6px;">
+                  <Delete />
+                </el-icon>娓呯┖</el-button>
+            </el-col>
+          </el-row>
+        </template>
+        <!-- <template #menu-left>
         <el-button :size="size" type="primary" @click="showAdd()">鏂板鏍硅妭鐐�</el-button>
       </template> -->
-      <template #name="{ row }">
-        <span>{{row.name}}</span>
-        <!-- <el-button :size="size" text v-if="row.nodeType != 70" icon="el-icon-setting" type="primary" placeholder="淇敼" @click="showEdit(row)" title="淇敼"></el-button>
+        <template #name="{ row }">
+          <span>{{ row.name }}</span>
+          <!-- <el-button :size="size" text v-if="row.nodeType != 70" icon="el-icon-setting" type="primary" placeholder="淇敼" @click="showEdit(row)" title="淇敼"></el-button>
         <el-button :size="size" text v-if="row.nodeType != 10" icon="el-icon-delete" type="primary" @click="showDel(row)" placeholder="鍒犻櫎" title="鍒犻櫎"></el-button>
         <el-button :size="size" text v-if="row.nodeType != 60 && row.nodeType != 70" icon="el-icon-document-add" type="primary" @click="showAdd(row)" placeholder="鏂板瀛愮骇" title="鏂板瀛愮骇"></el-button>
         <el-button :size="size" text v-if="row.nodeType == 60 || row.nodeType == 50" icon="el-icon-upload" type="primary" @click="showUpload(row)" placeholder="鏂囦欢涓婁紶" title="鏂囦欢涓婁紶"></el-button> -->
-        <!-- 娑夊瘑缃戞墠鏈� -->
-        <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-pie-chart" type="primary" @click="upgrade(row)" placeholder="鍗囩増" title="鍗囩増"></el-button> -->
-        <!-- 宸ユ帶缃戞墠鏈� -->
-        <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-position" type="primary" @click="downsend(row)" placeholder="涓嬪彂" title="涓嬪彂"></el-button> -->
-        <!-- 鏇挎崲 -->
-        <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,1,')>-1" icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="鏇挎崲" title="鏇挎崲"></el-button>
-        <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,2')>-1" icon="el-icon-lock" type="primary" @click="locked(row)" placeholder="閿佸畾" title="閿佸畾"></el-button>
-        <!-- <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,2')>-1" icon="el-icon-unlock" type="primary" @click="locked(row)" placeholder="瑙i攣" title="瑙i攣"></el-button> -->
-      </template>
-    </avue-crud>
+          <!-- 娑夊瘑缃戞墠鏈� -->
+          <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-pie-chart" type="primary" @click="upgrade(row)" placeholder="鍗囩増" title="鍗囩増"></el-button> -->
+          <!-- 宸ユ帶缃戞墠鏈� -->
+          <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-position" type="primary" @click="downsend(row)" placeholder="涓嬪彂" title="涓嬪彂"></el-button> -->
+
+          <!-- 鏇挎崲  v-if="permission.auto_dispatch"-->
+          <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1"
+            icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="鏇挎崲" title="鏇挎崲"></el-button>
+          <el-button :size="size" text
+            v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked != 1"
+            icon="el-icon-lock" type="primary" @click="showLockDlg(row)" placeholder="閿佸畾" title="閿佸畾"></el-button>
+          <el-button :size="size" text
+            v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1"
+            icon="el-icon-unlock" type="primary" @click="startUnlock(row)" placeholder="瑙i攣" title="瑙i攣"></el-button>
+        </template>
+      </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="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>
+          <el-row :gutter="24">
+            <el-col :span="6" class="search-data-flex">
+              <span class="search-data-title w68">绋嬪簭鐘舵��:</span>
+              <el-checkbox-group v-model="searchTreeData.programStatus" class="marginR12">
+                <el-checkbox value="1" label="璇曞垏" />
+                <el-checkbox value="2" label="鍥哄寲" />
+                <el-checkbox value="3" label="鍋忕" />
+              </el-checkbox-group>
+            </el-col>
+            <el-col :span="4" class="search-data-flex">
+              <span class="search-data-title">闆剁粍浠跺彿:</span>
+              <el-select v-model="searchTreeData.drawingNo" filterable remote reserve-keyword placeholder="杈撳叆鑷冲皯3涓瓧绗﹁繃婊ゆ暟鎹�"
+                :remote-method="remoteMethod" :loading="searchLoading">
+                <el-option v-for="item in drawingNoList" :key="item.value" :label="item.label"
+                  :value="item.value" /></el-select>
+            </el-col>
+            <el-col :span="8" class="search-data-flex">
+              <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="6" class="search-data-flex">
+              <el-button type="primary" @click="searchTree" :loading="treeSearchLoad"><el-icon class="el-icon--right"
+                  style="margin-right: 6px;">
+                  <Search />
+                </el-icon>鎼滅储</el-button>
+              <el-button :icon="Delete" @click="setClearTree"><el-icon class="el-icon--right"
+                  style="margin-right: 6px;">
+                  <Delete />
+                </el-icon>娓呯┖</el-button>
+            </el-col>
+          </el-row>
+        </template>
+        <!-- <template #menu-left>
+        <el-button :size="size" type="primary" @click="showAdd()">鏂板鏍硅妭鐐�</el-button>
+      </template> -->
+        <template #name="{ row }">
+          <span>{{ row.name }}</span>
+          
+          <!-- 鏇挎崲  v-if="permission.auto_dispatch"-->
+          <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1"
+            icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="鏇挎崲" title="鏇挎崲"></el-button>
+          <el-button :size="size" text
+            v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked != 1"
+            icon="el-icon-lock" type="primary" @click="showLockDlg(row)" placeholder="閿佸畾" title="閿佸畾"></el-button>
+          <el-button :size="size" text
+            v-if="permission.lock_button && row.nodeType == 60 && row.parentIds.indexOf('0,2') > -1 && row.isLocked == 1"
+            icon="el-icon-unlock" type="primary" @click="startUnlock(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"/>
+      <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 }">
+      <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>
@@ -64,45 +137,57 @@
         </template>
       </avue-form>
     </el-dialog>
+
+    <!-- 閿佸畾瀵硅瘽妗� -->
+    <el-dialog title="绋嬪簭閿佸畾" append-to-body v-model="lockBox">
+      <avue-form :option="lockOption" v-model="lockForm" @submit="lockSubmit" @reset-change="lockCancel" />
+    </el-dialog>
+    
     <avue-tabs :option="tabsOption" @change="tabsHandleChange" style="margin-top: 30px;" v-if="isShowTabs"></avue-tabs>
     <avue-form v-if="tabsType == 'tab1'" :option="tabsFormOption" v-model="tabsForm"></avue-form>
     <!--<span v-else-if="tabsType == 'tab2'">鐗堟湰淇℃伅</span>-->
     <template v-else-if="tabsType == 'tab3'">
-        <div v-html="convertToHtml(fileContent)" class="convertToHtml"></div>
+      <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>
+      <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>
     </template>
 
     <el-dialog title="鍗囩増" append-to-body v-model="upgradeModal" width="500">
-      <avue-form :option="upgradeModalOption" v-model="upgradeModalForm" @submit="upgradeSubmit" @reset-change="upgradeCancel"></avue-form>
+      <avue-form :option="upgradeModalOption" v-model="upgradeModalForm" @submit="upgradeSubmit"
+        @reset-change="upgradeCancel"></avue-form>
     </el-dialog>
   </basic-container>
   <!-- 鏂囦欢瀵规瘮 -->
   <el-drawer title="鏂囦欢瀵规瘮" append-to-body v-model="diffBox" size="100%" class="code-box">
-      <div>
-          <code-diff :old-string="this.content1" :new-string="this.content2" output-format="side-by-side" :hideStat="true" :filename="codeDiffFileName1" :newFilename="codeDiffFileName2"/>
-      </div>
+    <div>
+      <code-diff :old-string="this.content1" :new-string="this.content2" output-format="side-by-side" :hideStat="true"
+        :filename="codeDiffFileName1" :newFilename="codeDiffFileName2" />
+    </div>
   </el-drawer>
   <!-- 鏇挎崲 -->
   <el-drawer title="鏇挎崲" append-to-body v-model="todolistModel" size="100%" class="code-box">
     <div class="approve-box">
-        <div class="left">
-            <TodolistLeft :row="row" :replaceDataId="replaceDataId" :drawingNo="drawingNo" :processNo="processNo" :processEdition="processEdition" @selection-change="todoSelectionChange" />
-        </div>
-        <div class="right">
-            <TodolistRightTop :row="row" :name="name" />
-            <avue-form ref="form" :option="optionApprove" v-model="formApprove" @submit="handleSubmit" />
-        </div>
+      <div class="left">
+        <TodolistLeft :row="row" :replaceDataId="replaceDataId" :drawingNo="drawingNo" :processNo="processNo"
+          :processEdition="processEdition" @selection-change="todoSelectionChange" />
+      </div>
+      <div class="right">
+        <TodolistRightTop :row="row" :name="name" />
+        <avue-form ref="form" :option="optionApprove" v-model="formApprove" @submit="handleSubmit" />
+      </div>
     </div>
   </el-drawer>
 </template>
 
 <script>
+import debounce from 'lodash/debounce';
 import { ElMessage } from 'element-plus';
 import TodolistLeft from './components/TodolistLeft.vue';
 import TodolistRightTop from './components/TodolistRightTop.vue';
@@ -114,9 +199,20 @@
   data() {
     let rejectText = '椹冲洖';//+this.row.categoryName;
     return {
+      isSearch: null,
+      treeSearchLoad: false,
+      drawingNoList: [],
+      searchLoading: false,
+      searchTreeData: {
+        programStatus: [],
+        drawingNo: "",
+        createTime: [],
+        createTimeBegin: "",
+        createTimeEnd: ""
+      },
       drawingNo: '',
       processNo: '',
-	  processEdition: '',
+      processEdition: '',
       replaceDataId: "",
       formApprove: {
         title: '',
@@ -148,32 +244,32 @@
             rules: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }],
           },
           {
-              label: '宸ュ簭鐗堟',
-              prop: 'processEdition',
-              type: 'input',
-              span: 24,
-              // disabled: true,
-              display: false,// 闅愯棌鏄剧ず
-              // rules: [{ required: true, message: '璇烽�夋嫨涓嬩竴瀹℃壒鐢ㄦ埛', trigger: 'blur' }],
+            label: '宸ュ簭鐗堟',
+            prop: 'processEdition',
+            type: 'input',
+            span: 24,
+            // disabled: true,
+            display: false,// 闅愯棌鏄剧ず
+            // rules: [{ required: true, message: '璇烽�夋嫨涓嬩竴瀹℃壒鐢ㄦ埛', trigger: 'blur' }],
           },
           {
-              label: '澶囨敞',
-              span: 24,
-              prop: 'comment',
-              type: 'textarea',
-              // rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
-              rules: [
-                  {
-                  validator: (rule, value, callback) => {
-                      if (value === '' && this.formApprove.approve !== 'Y') {
-                          callback(new Error('璇疯緭鍏ュ娉�'));
-                      } else {
-                          callback();
-                      }
-                  },
-                  trigger: 'blur'
+            label: '澶囨敞',
+            span: 24,
+            prop: 'comment',
+            type: 'textarea',
+            // rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
+            rules: [
+              {
+                validator: (rule, value, callback) => {
+                  if (value === '' && this.formApprove.approve !== 'Y') {
+                    callback(new Error('璇疯緭鍏ュ娉�'));
+                  } else {
+                    callback();
                   }
-              ]
+                },
+                trigger: 'blur'
+              }
+            ]
           },
         ],
       },
@@ -342,12 +438,34 @@
       },
       modalBox: false,
       modalTitle: "",
-      id: "",
-      parentId:1,
-      search: {
-        name: "",
-        nodeType: ""
+
+      lockOption: {
+        submitText: "閿佸畾",
+        emptyText: "鍙栨秷",
+        menuPosition: "right",
+        column: [
+          {
+            label: '绋嬪簭鍖呭悕',
+            prop: 'name',
+            disabled:true,
+            labelWidth: "120",
+          },
+          
+          {
+            label: '閿佸畾鍘熷洜',
+            prop: 'remark',
+            type: "textarea",
+            labelWidth: "120",
+            span: 24,
+            rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
+          }
+        ]
       },
+      lockForm: {},
+      lockBox: false,
+
+      id: "",
+      parentId: 1,
       loading: true,
       mypage: {
         size: 10,
@@ -364,19 +482,22 @@
         emptyBtn: false,
         menu: false,
         column: [
-          {label: '鐗堟湰鍙�',prop: 'versionNumber'},
-          {label: '鍒涘缓鏃堕棿',prop: 'createTime'},
-          {label: '鍒涘缓浜�',prop: 'createUserName'},
+          { label: '鐗堟湰鍙�', prop: 'versionNumber' },
+          { label: '鍒涘缓鏃堕棿', prop: 'createTime' },
+          { label: '鍒涘缓浜�', prop: 'createUserName' },
         ]
       },
       tabsForm4: {},
+      defaultExpandedKeys: [],
       option: {
         highlightCurrentRow: true,
-        rowKey: "id",
         treeProps: {
           children: "children",
           hasChildren: 'hasChildren',
+          value: 'id',
+          label: 'name'
         },
+        defaultExpandedKeys: [],
         defaultExpandAll: false,
         lazy: true,
         rowKey: 'id',
@@ -403,32 +524,17 @@
             label: '鐗堟湰',
             prop: 'versionNumber',
             formatter: (val, value, label) => {
-                if(val.nodeType == '60'){
-                    if(value==-1){
-                        return '';
-                    }else{
-                        return value;
-                    }
-                }else{
-                    return '';
+              if (val.nodeType == '60') {
+                if (value == -1) {
+                  return '';
+                } else {
+                  return value;
                 }
-            }
-          },/*
-          {
-            label: '鐗堟',
-            prop: 'processEdition',
-            formatter: (val, value, label) => {
-                if(val.nodeType == '60'){
-                    return value;
-                }else{
-                    return '';
-                }
+              } else {
+                return '';
+              }
             }
           },
-          {
-            label: '鎻忚堪',
-            prop: 'abc'
-          },*/
           {
             label: '绫诲瀷',
             prop: 'nodeTypeName'
@@ -442,46 +548,42 @@
             label: '閿佸畾鐘舵��',
             prop: 'isLocked',
             formatter: (val, value, label) => {
-                if(val.nodeType == '60' || val.nodeType == '70'){
-                    if(value==1){
-                        return '宸查攣瀹�';
-                    }else{
-                        return '鏈攣瀹�';
-                    }
+              if (val.nodeType == '60') {
+                if (value == 1) {
+                  return '宸查攣瀹�';
+                } else {
+                  return '鏈攣瀹�';
                 }
+              }
             }
-                  
+
           },
           {
             label: '娴佺▼鐘舵��',
             prop: 'flowStatus',
-                  formatter: (val, value, label) => {
-                    if(val.nodeType != '60'){
-                        //闈炵▼搴忚妭鐐�
-                        return '';
-                    }else{
-                        if(value==0||value==-1){
-                            return '鏈惎鍔�';
-                        }else if(value == 1){
-                            return '瀹℃壒涓�';
-                        }else if(value == 2){
-                            return '宸查�氳繃';
-                        }else{
-                            return '';
-                        }
-                      }
-                  },
-          },/*
-          {
-            label: '娴嬭瘯绋嬪簭',
-            prop: 'abc'
-          },*/
+            formatter: (val, value, label) => {
+              if (val.nodeType != '60') {
+                //闈炵▼搴忚妭鐐�
+                return '';
+              } else {
+                if (value == 0 || value == -1) {
+                  return '鏈惎鍔�';
+                } else if (value == 1) {
+                  return '瀹℃壒涓�';
+                } else if (value == 2) {
+                  return '宸查�氳繃';
+                } else {
+                  return '';
+                }
+              }
+            },
+          },
           {
             label: '鍒涘缓浜�',
             prop: 'createUserName',
             width: '180'
           },
-		  {
+          {
             label: '鍒涘缓鏃堕棿',
             prop: 'createTime',
             width: '180'
@@ -493,6 +595,7 @@
     };
   },
   computed: {
+    ...mapGetters(['userInfo', 'permission']),
     uploadmodalOption() {
       return {
         submitText: "淇濆瓨",
@@ -591,7 +694,7 @@
             prop: 'uploadFile',
             labelWidth: "120",
             type: 'upload',
-            data: {nodeId: this.id}, 
+            data: { nodeId: this.id },
             action: "",
             showFileList: false,
             span: 24,
@@ -627,11 +730,69 @@
     }
   },
   watch: {
-    
+
   },
   methods: {
-    locked(row) {
-      this.$confirm('鏄惁閿佸畾鍚�?', {
+    disabledDate(time) {
+      //涓嶉渶瑕佺鐢ㄦ棩鏈�
+      // 鑾峰彇褰撳墠鏃ユ湡
+      const today = new Date();
+      today.setHours(0, 0, 0, 0); // 璁剧疆涓哄綋澶╁紑濮嬫椂闂�
+
+      // 鑾峰彇涓変釜鏈堝墠鐨勬棩鏈�
+      const threeMonthsAgo = new Date();
+      threeMonthsAgo.setMonth(threeMonthsAgo.getMonth() - 3);
+      threeMonthsAgo.setHours(0, 0, 0, 0);
+
+      // 绂佺敤浠婂ぉ涔嬪悗鐨勬棩鏈� 鍗冲彲
+      return time.getTime() > today.getTime() || time.getTime() < threeMonthsAgo.getTime();//
+    },
+    createTimeChange(value) {
+      console.log('createTimeChange', value)
+      this.searchTreeData.createTimeBegin = value[0];
+      this.searchTreeData.createTimeEnd = value[1];
+    },
+    remoteMethod(query) {
+      if (query && query.length>2) {
+        this.searchLoading = true;
+        this.getRemote(query);
+      } else {
+        this.drawingNoList = [];
+      }
+    },
+    getRemote: debounce(function(query){
+            //闃叉姈锛岃繖閲岃缃�600姣璇锋眰涓�娆″悗鍙�
+            this.getList(query)
+    },600),
+    async getList(query){
+      this.searchLoading = false;
+      axios({
+          url: '/blade-mdm/program/node/drawing-no-pick',
+          method: 'get',
+          params: { drawingNo: query }
+        }).then(resp => {
+          this.searchLoading = false;
+          var drawingNoList = [];
+          resp.data.data.forEach(item => {
+            drawingNoList.push({ label: item, value: item })
+          })
+          this.drawingNoList = drawingNoList;
+        });
+    },
+    showLockDlg(row){
+      this.lockForm = row;
+     //this.lockForm.name = row.name;
+     // this.lockForm.id = row.id;
+      this.lockForm.remark = '';
+      this.lockBox = true;
+    },
+    lockCancel() {
+      this.lockBox = false;
+      this.lockForm = {};
+    },
+    lockSubmit() {  
+      //閿佸畾鎻愪氦
+      this.$confirm('鏄惁閿佸畾', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
         type: 'warning',
@@ -639,14 +800,41 @@
         axios({
           url: '/blade-mdm/program/node/lock',
           method: 'post',
-          params: {id: row.id}
+          params: this.lockForm
         }).then(res => {
-          if(res.data.code == 200) {
-            this.$message({type: 'success',message: '鎿嶄綔鎴愬姛!'});
-          }else {
-            this.$message({type: 'success',message: res.data.msg});
+          if (res.data.code == 200) {
+            this.$message({ type: 'success', message: '鎿嶄綔鎴愬姛!' });
+            this.addLocalTreeNode(this.lockForm.parentId);
+            this.lockBox = false;
+          } else {
+            this.$message({ type: 'success', message: res.data.msg });
           }
         });
+      }).catch(action => {
+        console.log('cancel')
+      });
+    },
+    startUnlock(row) {
+      //鍚姩瑙i攣娴佺▼
+      this.$confirm(`鏄惁瑙i攣`, {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning',
+      }).then(() => {
+        axios({
+          url: '/blade-mdm/flow/lock/start-unlock',
+          method: 'post',
+          params: {nodeId: row.id }
+        }).then(res => {
+          if (res.data.code == 200) {
+            this.$message({ type: 'success', message: '瑙i攣娴佺▼宸插惎鍔�!' });
+            this.addLocalTreeNode(row.parentId);
+          } else {
+            this.$message({ type: 'success', message: res.data.msg });
+          }
+        });
+      }).catch(action => {
+        console.log('cancel')
       });
     },
     handleSubmit(form, done) {
@@ -655,21 +843,23 @@
         title: this.formApprove.title,
         nodeId: this.id,
         tempInstanceId: this.replaceDataId,
-		    comment: this.formApprove.comment,
+        comment: this.formApprove.comment,
         assignee: this.formApprove.assignee
       }
       axios({
         url: '/blade-mdm/flow/replace/start',
         method: 'post',
         data: obj
-      }).then(
-      resp => {
+      }).then(resp => {
         this.$message({
           type: 'success',
           message: '鎿嶄綔鎴愬姛!',
         });
         done();
         this.todolistModel = false;
+      }).catch(error => {
+        window.console.log('haha', error);
+        done();
       });
       // if(this.row.taskDefinitionKey === 'programmingTask') {
       //     // if(this.applist.length !== 1) {
@@ -700,24 +890,35 @@
     todoSelectionChange(applist) {
       this.applist = applist;
     },
+    showReplaceDlg(row) {  //鏇挎崲瀵硅瘽妗�
+      
+      if (row.nodeType == 60) { //绋嬪簭鍖�
+        return;
+      }
+      //111
+      this.modalTitle = "鏂板瀛愯妭鐐�";
+      this.selectedColumn.parentId = row.id;
+      this.modalForm = this.selectedColumn;
+      
+      this.modalBox = true;
+    },
     replacement(row) {  //鏇挎崲
       this.id = row.id;
       this.formApprove = {
-          comment: '',
-          approve: 'Y', // 榛樿鍚�
+        comment: '',
+        approve: 'Y', // 榛樿鍚�
       }
       //鍑嗗绋嬪簭鏇挎崲娴佺▼ 
       axios({
         url: '/blade-mdm/flow/replace/pre',
         method: 'post',
-        params: {nodeId: row.id}
-      }).then(
-      resp => {
+        params: { nodeId: row.id }
+      }).then(resp => {
         this.row = row;
         this.replaceDataId = resp.data.data.processInstanceId;
         this.processNo = resp.data.data.processNo;
         this.processEdition = resp.data.data.processEdition;
-		    this.drawingNo = resp.data.data.drawingNo;
+        this.drawingNo = resp.data.data.drawingNo;
         this.formApprove.title = resp.data.data.name + "鏇挎崲";
         this.getHandler(); //鑾峰彇澶勭悊浜�
         this.todolistModel = true;
@@ -727,30 +928,20 @@
       axios({
         url: '/blade-mdm/flow/replace/default-assignees',
         method: 'get',
-        params: {drawingNo: this.drawingNo}
+        params: { drawingNo: this.drawingNo }
       }).then(
-      resp => {
-        if(resp.data.code == 200) {
-          this.formApprove.assignee = resp.data.data.checkerId;
-        }else {
-          this.$message.success(resp.msg);
-        }
-      });
+        resp => {
+          if (resp.data.code == 200) {
+            this.formApprove.assignee = resp.data.data.checkerId;
+          } else {
+            this.$message.success(resp.msg);
+          }
+        });
     },
     convertToHtml(text) {
-        return text.replace(/\n/g, '<br>');
+      return text.replace(/\n/g, '<br>');
     },
-    removeHasChildren(treeData) {  //鏌ヨ鏃跺�欎娇鐢紝鍒犳帀hasChildren 
-      return treeData.map(node => {
-        if (node.children && node.children.length > 0) {
-          node.children = this.removeHasChildren(node.children);
-        }
-        // 鍒犻櫎褰撳墠鑺傜偣鐨� hasChildren 灞炴��
-        const { hasChildren, ...rest } = node;
-        return rest;
-      });
-    },
-     // 閫掑綊鏌ユ壘鐩爣琛岋紙name="鏈哄簥1"锛�
+    // 閫掑綊鏌ユ壘鐩爣琛岋紙name="鏈哄簥1"锛�
     findTargetRow(data, targetName) {
       for (const item of data) {
         if (item.name === targetName) {
@@ -764,52 +955,101 @@
       return null; // 鏈壘鍒�
     },
     highlightTargetRow() {  // 楂樹寒鐩爣琛�
-      const targetName = this.search.name;
+      const targetName = this.searchTreeData.drawingNo;
       this.targetRow = this.findTargetRow(this.treeData, targetName);
       if (this.targetRow && this.$refs.crud) {
         this.$refs.crud.setCurrentRow(this.targetRow); // 楂樹寒鐩爣琛�
       }
     },
-    searchTree() {
-      axios({
-        url: '/blade-mdm/program/node/search-list',
-        method: 'get',
-        params: this.search,
-      }).then(res => {
-        this.option.defaultExpandAll = true;
-        this.treeData = this.removeHasChildren(res.data.data);
-        this.$nextTick(() => {
-          this.highlightTargetRow();  // 璁剧疆褰撳墠琛岄珮浜�
-          this.tabsForm = this.targetRow;  //tabs鑺傜偣淇℃伅
-          this.nodeTypeList.forEach(item=> {
-            if(item.dictKey == this.tabsForm.nodeType) {
-              this.tabsForm.nodeTypeName = item.dictValue;
-            }
-          })
-        })
-        if(this.treeData.length == 0) {
-          return;
+    removeHasChildren(treeData) {  //鏌ヨ鏃跺�欎娇鐢紝鍒犳帀hasChildren 
+      return treeData.map(node => {
+        if (node.children && node.children.length > 0) {
+          this.defaultExpandedKeys.push(node.id);
+          console.log('>>>>>>>>', this.defaultExpandedKeys)
+          node.children = this.removeHasChildren(node.children);
         }
+        if (node.children.length > 0) {
+          const { hasChildren, ...rest } = node;
+          return Object.assign(rest, {});
+        } else {
+          return node;
+        }
+        // 鍒犻櫎褰撳墠鑺傜偣鐨� hasChildren 灞炴��
       });
+    },
+    searchTree() {
+      if (this.searchTreeData.programStatus.length == 0 || this.searchTreeData.drawingNo == ""){
+        this.$message.warning('璇疯緭鍏ョ▼搴忕姸鎬佸拰闆剁粍浠跺彿杩涜鎼滅储');
+        return;
+      } 
+      
+      this.treeSearchLoad = true;
+      this.isSearch = !this.isSearch
+      this.searchTreeData.status = this.searchTreeData.programStatus.join();
+      this.treeData = []
+      this.defaultExpandedKeys = []
+      axios({
+        url: '/blade-mdm/program/node/search-list2',
+        method: 'get',
+        params: this.searchTreeData
+      }).then(res => {
+        
+        if (res.data.data.length == 0) {
+          this.treeData = [];
+          this.treeSearchLoad = false;
+          return
+        };
+        // this.option.defaultExpandAll = true;
+        let treeData = this.removeHasChildren(res.data.data);
+        console.log('treeData', treeData)
+        this.option = Object.assign({},this.option,{defaultExpandedKeys: this.defaultExpandedKeys,lazy: true,defaultExpandAll: true});
+        setTimeout(() => {
+          this.treeSearchLoad = false;
+          this.treeData = treeData;
+          this.$nextTick(() => {
+            this.highlightTargetRow();  // 璁剧疆褰撳墠琛岄珮浜�
+            this.tabsForm = this.targetRow;  //tabs鑺傜偣淇℃伅
+            if (this.tabsForm == null) return;
+            this.nodeTypeList.forEach(item => {
+              if (item.dictKey == this.tabsForm.nodeType) {
+                this.tabsForm.nodeTypeName = item.dictValue;
+              }
+            })
+          })
+          if (this.treeData.length == 0) {
+            return;
+          }
+        }, 100);
+
+      });
+
     },
     setClearTree() {
       this.option.defaultExpandAll = false;
+      this.searchTreeData = {
+        programStatus: [],
+        status: '',
+        drawingNo: "",
+        createTime: [],
+        createTimeBegin: "",
+        createTimeEnd: ""
+      };
       this.treeData = [];
-      this.$nextTick(()=> {
+      this.$nextTick(() => {
         this.onLoad();
       })
     },
-    upgradeSubmit(row,done) {  //鍗囩増
+    upgradeSubmit(row, done) {  //鍗囩増
       axios({
         url: '/blade-mdm/program/ncfile/upgrade-process-edition',
         method: 'post',
-        params: {bindNcNodeId:row.id,newProcessEdition: row.processEdition},
+        params: { bindNcNodeId: row.id, newProcessEdition: row.processEdition },
       }).then(
         res => {
-            done();
-            this.upgradeModal = false;
-            this.$message.success('鎿嶄綔鎴愬姛');
-            this.addLocalTreeNode(row.parentId);
+          done();
+          this.upgradeModal = false;
+          this.$message.success('鎿嶄綔鎴愬姛');
+          this.addLocalTreeNode(row.parentId);
         }
       );
     },
@@ -821,21 +1061,21 @@
       axios({
         url: '/blade-mdm/program/ncfile/send-to-machine-by-nodeid',
         method: 'post',
-        params: {nodeId:row.id},
+        params: { nodeId: row.id },
       }).then(
         res => {
-            this.loading = false;
-            this.$message.success('鎿嶄綔鎴愬姛');
+          this.loading = false;
+          this.$message.success('鎿嶄綔鎴愬姛');
         }
       );
     },
     upgrade(row) {  //鍗囩増
-      this.upgradeModalForm = {...row};
+      this.upgradeModalForm = { ...row };
       this.upgradeModal = true;
     },
     delFile(item) {
       this.loading = true;
-      var obj = {id: item.id}
+      var obj = { id: item.id }
       axios({
         url: '/blade-mdm/program/ncfile/remove',
         method: 'post',
@@ -847,7 +1087,7 @@
         }
       );
     },
-    uploadBefore(file,done,loading,column) {
+    uploadBefore(file, done, loading, column) {
       this.file = file;
       this.fileList.push(file);
       //done();  鏀惧紑灏变笂浼犱簡
@@ -855,16 +1095,16 @@
     },
     uploadAfter() {
     },
-    uploadmodalSubmit(row,done) {  //涓婁紶鎻愪氦鎺ュ彛
-      if(this.file == null) {
+    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');
+      if (this.isRepeatUpload) {
+        formData.append('cofirm', '1');
       }
       Object.keys(this.uploadmodalForm).forEach(key => {
         formData.append(key, this.uploadmodalForm[key]);
@@ -875,48 +1115,48 @@
         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.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.uploadmodalBox = false;
-            this.$message({type: 'success',message: '鎿嶄綔鎴愬姛!'});
-            this.addLocalTreeNode(row.id);  //閲嶆柊鍔犺浇涓嬩竴绾�
-          }else {
-            this.isRepeatUpload = false;
-            alert(1)
-          }
-          done();
+            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;
       this.isShowTabs = false;
-      this.nodeTypeList.forEach(item=> {
-        if(item.dictKey == row.nodeType) {
+      this.nodeTypeList.forEach(item => {
+        if (item.dictKey == row.nodeType) {
           this.tabsForm.nodeTypeName = item.dictValue;
         }
       })
-      if(this.tabsForm.nodeType != 70) {
+      if (this.tabsForm.nodeType != 70) {
         this.tabsOption = this.tabsOption1;
-      }else {
+      } else {
         this.tabsOption = this.tabsOption2;
         //鑾峰彇鏂囦欢list
         this.getFile(row.id);
@@ -926,7 +1166,7 @@
         this.content1 = "";
         this.content2 = "";
       }
-      this.$nextTick(()=> {
+      this.$nextTick(() => {
         this.tabsType = 'tab1';
         this.isShowTabs = true;
       })
@@ -938,7 +1178,7 @@
       this.fileList = [];
       this.uploadmodalForm = row;
       this.loading = true;
-      var obj = {parentId: row.id}
+      var obj = { parentId: row.id }
       axios({
         url: '/blade-mdm/program/node/lazy-list',
         method: 'get',
@@ -955,7 +1195,7 @@
       axios({
         url: '/blade-mdm/program/ncfile/content-by-nodeid',
         method: 'get',
-        params: {nodeId:id},
+        params: { nodeId: id },
       }).then(
         res => {
           this.loading = false;
@@ -968,7 +1208,7 @@
       axios({
         url: '/blade-mdm/program/node/history-by-nodeid',
         method: 'get',
-        params: {id},
+        params: { id },
       }).then(
         res => {
           this.loading = false;
@@ -981,7 +1221,7 @@
       axios({
         url: '/blade-mdm/program/node/compare-content',
         method: 'get',
-        params: {id1:this.selectionList[0].id,id2:this.selectionList[1].id},
+        params: { id1: this.selectionList[0].id, id2: this.selectionList[1].id },
       }).then(
         res => {
           this.loading = false;
@@ -996,7 +1236,7 @@
     selectionChange(list) {
       this.selectionList = list;
     },
-    showEdit(row,done) {
+    showEdit(row, done) {
       this.modalTitle = "淇敼";
       this.modalBox = true;
       this.modalForm = row;
@@ -1012,7 +1252,7 @@
         axios({
           url: '/blade-mdm/program/node/remove',
           method: 'post',
-          params: {id: row.id},
+          params: { id: row.id },
         }).then(
           res => {
             this.loading = false;
@@ -1021,19 +1261,19 @@
         );
       })
     },
-    showAdd (row) {  //鏂板瀛愯妭鐐�
-      if(!row) {
+    showAdd(row) {  //鏂板瀛愯妭鐐�
+      if (!row) {
         this.modalTitle = "鏂板鏍硅妭鐐�";
         this.modalForm.nodeType = this.nodeTypeList[0].dictKey;
         this.modalForm.parentId = 0;
-      }else {
-        if(row.nodeType == 60) { //绋嬪簭鍖�
+      } else {
+        if (row.nodeType == 60) { //绋嬪簭鍖�
           return;
         }
         var defalutNodeType = "";  //涓嬩竴绾ц妭鐐圭被鍨�
-        for(var i=0;i<this.nodeTypeList.length;i++) {
-          if(row.nodeType == this.nodeTypeList[i].dictKey) {
-            defalutNodeType = this.nodeTypeList[i+1].dictKey;
+        for (var i = 0; i < this.nodeTypeList.length; i++) {
+          if (row.nodeType == this.nodeTypeList[i].dictKey) {
+            defalutNodeType = this.nodeTypeList[i + 1].dictKey;
           }
         }
         this.modalTitle = "鏂板瀛愯妭鐐�";
@@ -1045,10 +1285,10 @@
       }
       this.modalBox = true;
     },
-    modalSubmit(row,done) {  //鏂板瀛愯妭鐐逛繚瀛�/淇敼
-      if(this.modalTitle == "淇敼") {
+    modalSubmit(row, done) {  //鏂板瀛愯妭鐐逛繚瀛�/淇敼
+      if (this.modalTitle == "淇敼") {
         var url = "/blade-mdm/program/node/update";
-      }else {
+      } else {
         var url = "/blade-mdm/program/node/save";
       }
       //璋冪敤鎺ュ彛
@@ -1064,7 +1304,7 @@
           // 淇敼锛屾洿鏂版湰鍦版暟鎹�
           if (this.modalTitle === "淇敼") {
             this.addLocalTreeNode(row.parentId);
-          }else {
+          } else {
             // 濡傛灉鏄柊澧炴搷浣滐紝鍙兘闇�瑕侀噸鏂板姞杞芥暟鎹�
             //this.$refs.crud.refreshTable();
             //this.onLoad();
@@ -1077,12 +1317,12 @@
       );
     },
     addLocalTreeNode(parentId) {
-      if(this.modalTitle == "鏂板鏍硅妭鐐�") {
+      if (this.modalTitle == "鏂板鏍硅妭鐐�") {
         this.onLoad();
         return;
       }
       this.loading = true;
-      var obj = {parentId: parentId}
+      var obj = { parentId: parentId }
       axios({
         url: '/blade-mdm/program/node/lazy-list',
         method: 'get',
@@ -1090,9 +1330,9 @@
       }).then(
         res => {
           var children = res.data.data || [];
-          if(parentId == 0) {
+          if (parentId == 0) {
             this.treeData = [...children];
-          }else {
+          } else {
             this.$refs.crud.$refs.table.store.states.lazyTreeNodeMap.value[parentId] = [...children];
           }
           this.loading = false;
@@ -1105,9 +1345,11 @@
     uploadmodalCancel() {
       this.uploadmodalBox = false;
     },
-    treeLoad (tree, treeNode, resolve) {
+    treeLoad(tree, treeNode, resolve) {
+      console.log('tree', tree, treeNode, this.option)
       this.loading = true;
-      var obj = {parentId: tree.id}
+      var obj = { parentId: tree.id }
+      
       axios({
         url: '/blade-mdm/program/node/lazy-list',
         method: 'get',
@@ -1126,11 +1368,15 @@
       this.mypage.size = size;
     },
     refreshChange() {
-      
+
     },
     onLoad() {  //鏌ヨtreeTable
+      if(this.isSearch !== null){
+        return
+      }
       this.loading = true;
-      var obj = {parentId: ""}
+      var obj = { parentId: "" }
+      
       axios({
         url: '/blade-mdm/program/node/lazy-list',
         method: 'get',
@@ -1139,12 +1385,12 @@
         res => {
           this.loading = false;
           this.treeData = res.data.data;
-          if(this.treeData.length == 0) {
+          if (this.treeData.length == 0) {
             return;
           }
           this.tabsForm = res.data.data[0];  //鑺傜偣淇℃伅
-          this.nodeTypeList.forEach(item=> {
-            if(item.dictKey == this.treeData[0].nodeType) {
+          this.nodeTypeList.forEach(item => {
+            if (item.dictKey == this.treeData[0].nodeType) {
               this.tabsForm.nodeTypeName = item.dictValue;
             }
           })
@@ -1153,64 +1399,116 @@
     },
     getPre() {
       alert(1)
-    }
+    },
+    subtractMonths(date, months) {
+      const newDate = new Date(date);
+      const currentMonth = newDate.getMonth();
+      newDate.setMonth(currentMonth - months);
+      return newDate;
+    },
+    getBeginDate() {
+      var beginDate = this.subtractMonths(new Date(), 3);
+      return `${beginDate.getFullYear()}-${(beginDate.getMonth() + 1).toString().padStart(2, '0')}-${beginDate.getDate().toString().padStart(2, '0')}`;
+    },
+    getToday() {
+      let today = new Date();
+      return `${today.getFullYear()}-${(today.getMonth() + 1).toString().padStart(2, '0')}-${today.getDate().toString().padStart(2, '0')}`;
+
+    },
   },
   mounted() {
+    let b = this.getBeginDate()
+    //this.defaultTimeRange = [b,this.getToday()];
+    let defTimeRange = [b, this.getToday()];
+    this.searchTreeData.createTime = defTimeRange
+    this.createTimeChange(defTimeRange)
+
     this.tabsOption = this.tabsOption1;
     //鑾峰彇nodetype
-    axios({url: '/blade-system/dict-biz/dictionary?code=nc_node_type',method: 'get'}).then(res => {
-        this.nodeTypeList = res.data.data;
-      }
+    axios({ url: '/blade-system/dict-biz/dictionary?code=nc_node_type', method: 'get' }).then(res => {
+      this.nodeTypeList = res.data.data;
+    }
     );
   }
 };
 </script>
 
 <style lang="scss">
+.norightmenu .avue-crud .avue-crud__header {
+  display: none !important;
+}
+
 .delFile {
   color: red;
   margin-left: 12px;
   cursor: pointer;
 }
+
 .fileListStyle {
   margin-left: 10px;
   margin-top: 12px;
 }
+
 .highlight-row {
-  background-color: #f0f7ff !important; /* 娴呰摑鑹茶儗鏅� */
-  font-weight: bold; /* 鍔犵矖鏂囧瓧 */
+  background-color: #f0f7ff !important;
+  /* 娴呰摑鑹茶儗鏅� */
+  font-weight: bold;
+  /* 鍔犵矖鏂囧瓧 */
 }
- 
+
 /* 濡傛灉闇�瑕佹偓鍋滄晥鏋� */
 .highlight-row:hover {
   background-color: #e6f0ff !important;
 }
+
 .approve-box {
   display: flex;
 
   &>div {
-      border: 1px solid #ccc;
+    border: 1px solid #ccc;
   }
 
   .left {
-      width: 400px;
+    width: 400px;
   }
 
   .right {
-      flex: 1;
+    flex: 1;
   }
 }
+
 .convertToHtml {
   background-color: #fffee1;
   padding: 6px 12px;
 }
 </style>
 <style>
-  .highlight-row {
-    background-color: #f0f7ff;
-    font-weight: bold;
-  }
-  .code-box .el-drawer__header {
-    margin-bottom: 0;
-  }
+.highlight-row {
+  background-color: #f0f7ff;
+  font-weight: bold;
+}
+
+.code-box .el-drawer__header {
+  margin-bottom: 0;
+}
+
+.search-data-title {
+  font-size: 14px;
+  margin-right: 8px;
+  display: inline-block;
+  width: 95px;
+}
+
+.search-data-flex {
+  display: flex !important;
+  align-items: center;
+}
+
+.w68 {
+  width: 68px;
+}
+
+.marginR12 label {
+  margin-right: 12px;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3