| | |
| | | </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> |
| | |
| | | <!-- <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="row.nodeType == 60 && row.parentIds.indexOf('0,2')>-1 && row.isLocked != 1" icon="el-icon-lock" type="primary" @click="locked(row,true)" placeholder="锁定" title="锁定"></el-button> |
| | | <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,2')>-1 && row.isLocked == 1" icon="el-icon-unlock" type="primary" @click="locked(row,false)" 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="locked(row,true)" 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="locked(row,false)" placeholder="解锁" title="解锁"></el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- 新增节点 --> |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['userInfo', 'permission']), |
| | | uploadmodalOption() { |
| | | return { |
| | | submitText: "保存", |
| | |
| | | |
| | | }, |
| | | 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]; |
| | |
| | | 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 ? '解锁' : '锁定'}`, { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | this.$message({type: 'success',message: res.data.msg}); |
| | | } |
| | | }); |
| | | }).catch(action=>{ |
| | | console.log('cancel') |
| | | }); |
| | | }, |
| | | handleSubmit(form, done) { |
| | |
| | | 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; |