From c054516a38a2613a4e7399ba62694fbd99a606fe Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 06 一月 2023 09:10:09 +0800
Subject: [PATCH] 1.组织架构表格拖动实现demo
---
src/views/zzmx/jpgj.vue | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index dde4a2e..42bc740 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -13,10 +13,10 @@
:model="form"
label-width="100px"
inline
- style="display: flex;justify-content: space-between"
+ style="display: flex;"
>
<div class="elForm">
- <el-form-item label-width="70px" label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
<el-select
v-model="form.partcode"
filterable
@@ -88,7 +88,7 @@
</el-select>
</el-form-item>
</div>
- <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
+ <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
<el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
<el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
</div>
@@ -223,10 +223,10 @@
<template slot-scope="{row}">
<div class="operationClass">
<el-tooltip class="item" effect="dark" content="缂栬緫" placement="top">
- <i class="el-icon-edit-outline" @click="edit('edit',row)" />
+ <i :style="{color:$store.state.settings.theme}" class="el-icon-edit-outline" @click="edit('edit',row)" />
</el-tooltip>
<el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i class="el-icon-delete" @click="del(row)" />
+ <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row)" />
</el-tooltip>
</div>
</template>
@@ -256,7 +256,7 @@
>
<el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
<div style="display: flex;align-items: center">
- <i class="el-icon-s-comment" style="color:#42b983;margin-top: -20px" />
+ <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" style="margin-top: -20px" />
<el-form-item prop="partcode" label="浜у搧鍚嶇О">
<el-select
v-show="operation==='add'"
@@ -311,7 +311,7 @@
</el-form>
<div style="display: flex;flex-direction: column;margin-bottom: 20px">
<div>
- <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />宸ュ簭闆嗗悎
+ <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin: -20px 10px 20px 0" />宸ュ簭闆嗗悎
</div>
<div style="display: flex;background-color: #F2F6FC;padding:20px 0 20px 20px; min-height: 100px">
<el-radio-group v-model="dialogForm.stepcode" @change="radioChange">
@@ -328,11 +328,12 @@
<div style="display: flex;flex-direction: column;min-height: 300px">
<div>
- <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />璁惧鍒楄〃
+ <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin: -20px 10px 20px 0" />璁惧鍒楄〃
</div>
<el-table
ref="eqpDialogArrRef"
+ :key="tableTimeStampKey"
class="tableFixed"
:data="eqpDialogArr"
:height="tableHeight"
@@ -444,10 +445,10 @@
>
<template slot-scope="{row}">
<div class="operationClass">
- <el-button v-show="row.isVisible===1" type="text" @click="saveRow(row)">淇濆瓨</el-button>
- <el-button v-show="row.isVisible===1" type="text" @click="cancelRow(row)">鍙栨秷</el-button>
- <el-button v-show="row.isVisible===0" type="text" @click="editRow(row)">缂栬緫</el-button>
- <el-button v-show="row.isVisible===0" type="text" @click="copyRow(row)">澶嶅埗</el-button>
+ <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">淇濆瓨</el-button>
+ <el-button v-if="row.isVisible===1" type="text" @click="cancelRow(row)">鍙栨秷</el-button>
+ <el-button v-if="row.isVisible===0" type="text" @click="editRow(row)">缂栬緫</el-button>
+ <el-button v-if="row.isVisible===0" type="text" @click="copyRow(row)">澶嶅埗</el-button>
</div>
</template>
</el-table-column>
@@ -559,6 +560,8 @@
operation: '',
dialogFormRules: {},
radioChangeTempValue: '',
+
+ tableTimeStampKey: new Date().getTime(),
title_value: '鏁版嵁瀵煎叆 / 鑺傛媿宸ヤ环',
code: '24',
@@ -727,6 +730,10 @@
// 鍙栨秷琛�
cancelRow(row) {
this.getEqpTable()
+
+ this.radioChange(this.radioChangeTempValue)
+ this.dialogForm.stepcode = this.radioChangeTempValue
+
this.isEqpTableEdit = true
},
// 缂栬緫琛�
@@ -742,6 +749,7 @@
}
})
this.isEqpTableEdit = false
+ this.tableTimeStampKey = new Date().getTime()
} else {
return this.$message.info('鍙兘涓�琛屼竴琛屼慨鏀癸紒')
}
--
Gitblit v1.9.3