From 30207868d5ff811f3119a711658623fdd474e395 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期五, 22 八月 2025 14:36:09 +0800
Subject: [PATCH] 锁定按钮bug
---
src/views/wel/shemi.vue | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/src/views/wel/shemi.vue b/src/views/wel/shemi.vue
index 52b8eb9..db6b10b 100644
--- a/src/views/wel/shemi.vue
+++ b/src/views/wel/shemi.vue
@@ -32,7 +32,7 @@
</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" @change="createTimeChange"/>
+ <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-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>
@@ -644,6 +644,19 @@
},
methods: {
+ 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) {
this.searchTreeData.createTimeBegin = value[0];
this.searchTreeData.createTimeEnd = value[1];
@@ -667,8 +680,10 @@
this.drawingNoList = [];
}
},
- locked(row, isLock) {
- row.isLocked == isLock
+ locked(row, isLockP) {
+ //row.isLocked == isLock
+ var isLock = row.isLocked == 1;
+ console.log('isLock',isLock)
this.$confirm(`鏄惁${isLock ? '瑙i攣' : '閿佸畾'}`, {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -686,6 +701,8 @@
this.$message({type: 'success',message: res.data.msg});
}
});
+ }).catch(action=>{
+ console.log('cancel')
});
},
handleSubmit(form, done) {
@@ -817,8 +834,9 @@
searchTree() {
if(this.searchTreeData.programStatus.length == 0) return;
if(this.searchTreeData.drawingNo == "") return;
+ this.searchTreeData.status = this.searchTreeData.programStatus.join();
axios({
- url: '/blade-mdm/program/node/search-list',
+ url: '/blade-mdm/program/node/search-list2',
method: 'get',
params: this.searchTreeData,
}).then(res => {
@@ -828,6 +846,7 @@
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;
@@ -843,6 +862,7 @@
this.option.defaultExpandAll = false;
this.searchTreeData = {
programStatus: [],
+ status:'',
drawingNo: "",
createTime: [],
createTimeBegin: "",
--
Gitblit v1.9.3