From dd4e133fbe3402cb62d657491c44628280bb4f56 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期二, 26 八月 2025 11:13:18 +0800
Subject: [PATCH] 注释toptodo

---
 src/views/wel/shemi.vue |   67 ++++++++++++++++++++++++++-------
 1 files changed, 52 insertions(+), 15 deletions(-)

diff --git a/src/views/wel/shemi.vue b/src/views/wel/shemi.vue
index d2b44e9..c7aa7f2 100644
--- a/src/views/wel/shemi.vue
+++ b/src/views/wel/shemi.vue
@@ -1,5 +1,6 @@
-<template>
+<template >
   <basic-container>
+    <div class="norightmenu">
     <avue-crud
       :addBtn="false"
       :option="option"
@@ -17,25 +18,25 @@
     >
       <template #search>
         <el-row :gutter="24">
-          <el-col :span="8" class="search-data-flex">
-            <span class="search-data-title">绋嬪簭鐘舵��:</span>
-            <el-checkbox-group v-model="searchTreeData.programStatus">
+          <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="8" class="search-data-flex">
+          <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="闆剁粍浠跺彿" :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" range-separator="To" start-placeholder="寮�濮嬫椂闂�" end-placeholder="缁撴潫鏃堕棿" :size="size" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :disabled-date="disabledDate" @change="createTimeChange"/>
+            <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">
-            <el-button type="primary" @click="searchTree"><el-icon class="el-icon--right" style="margin-right: 6px;"><Search /></el-icon>鎼滅储</el-button>
+          <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>
@@ -60,6 +61,7 @@
         <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="locked(row,false)" 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"/>
@@ -124,6 +126,7 @@
   data() {
     let rejectText = '椹冲洖';//+this.row.categoryName;
     return {
+      treeSearchLoad: false,
       drawingNoList: [],
       searchLoading: false,
       searchTreeData: {
@@ -647,6 +650,7 @@
   },
   methods: {
     disabledDate(time) {
+      //涓嶉渶瑕佺鐢ㄦ棩鏈�
       // 鑾峰彇褰撳墠鏃ユ湡
       const today = new Date();
       today.setHours(0, 0, 0, 0); // 璁剧疆涓哄綋澶╁紑濮嬫椂闂�
@@ -656,10 +660,11 @@
       threeMonthsAgo.setMonth(threeMonthsAgo.getMonth() - 3);
       threeMonthsAgo.setHours(0, 0, 0, 0);
       
-      // 绂佺敤浠婂ぉ涔嬪悗鐨勬棩鏈熷拰涓変釜鏈堝墠鐨勬棩鏈熶箣鍓嶇殑鏃ユ湡
-      return time.getTime() > today.getTime() || time.getTime() < threeMonthsAgo.getTime();
+      // 绂佺敤浠婂ぉ涔嬪悗鐨勬棩鏈� 鍗冲彲
+      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];
     },
@@ -827,7 +832,7 @@
       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); // 楂樹寒鐩爣琛�
@@ -836,14 +841,16 @@
     searchTree() {
       if(this.searchTreeData.programStatus.length == 0) return;
       if(this.searchTreeData.drawingNo == "") return;
+      this.treeSearchLoad = true;
       this.searchTreeData.status = this.searchTreeData.programStatus.join();
       axios({
         url: '/blade-mdm/program/node/search-list2',
         method: 'get',
-        params: this.searchTreeData,
+        params: this.searchTreeData
       }).then(res => {
+        this.treeSearchLoad = false;
         if(res.data.data.length == 0) return;
-        this.option.defaultExpandAll = true;
+        this.option.defaultExpandAll = true;聽
         this.treeData = this.removeHasChildren(res.data.data);
         this.$nextTick(() => {
           this.highlightTargetRow();  // 璁剧疆褰撳墠琛岄珮浜�
@@ -1229,9 +1236,30 @@
     },
     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 => {
@@ -1243,6 +1271,9 @@
 </script>
 
 <style lang="scss">
+.norightmenu .avue-crud .avue-crud__header {
+            display: none !important;
+      }
 .delFile {
   color: red;
   margin-left: 12px;
@@ -1293,10 +1324,16 @@
     font-size: 12px;
     margin-right: 8px;
     display: inline-block;
-    width: 68px;
+    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