v1.9 发布,详情查看发行版说明
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<eHeader :query="query" :dicts="dicts"/>
|
||||
<!--表格渲染-->
|
||||
<tree-table v-loading="loading" :expand-all="true" :data="data" :columns="columns" size="small">
|
||||
<tree-table v-loading="loading" :expand-all="expand" :data="data" :columns="columns" size="small">
|
||||
<el-table-column label="状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div v-for="item in dicts" :key="item.id">
|
||||
@@ -15,11 +15,11 @@
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px" align="center">
|
||||
<el-table-column v-if="checkPermission(['ADMIN','DEPT_ALL','DEPT_EDIT','DEPT_DELETE'])" label="操作" width="130px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<edit v-if="checkPermission(['ADMIN','DEPT_ALL','DEPT_EDIT'])" :dicts="dicts" :data="scope.row" :sup_this="sup_this"/>
|
||||
<edit v-permission="['ADMIN','DEPT_ALL','DEPT_EDIT']" :dicts="dicts" :data="scope.row" :sup_this="sup_this"/>
|
||||
<el-popover
|
||||
v-if="checkPermission(['ADMIN','DEPT_ALL','DEPT_DELETE'])"
|
||||
v-permission="['ADMIN','DEPT_ALL','DEPT_DELETE']"
|
||||
:ref="scope.row.id"
|
||||
placement="top"
|
||||
width="180">
|
||||
@@ -28,7 +28,7 @@
|
||||
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
|
||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" :disabled="scope.row.id === 1" type="danger" size="mini">删除</el-button>
|
||||
<el-button slot="reference" :disabled="scope.row.id === 1" type="danger" icon="el-icon-delete" size="mini"/>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
value: 'name'
|
||||
}
|
||||
],
|
||||
delLoading: false, sup_this: this
|
||||
delLoading: false, sup_this: this, expand: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button size="mini" type="success" @click="to">编辑</el-button>
|
||||
<el-button size="mini" type="primary" icon="el-icon-edit" @click="to"/>
|
||||
<eForm ref="form" :sup_this="sup_this" :is-add="false" :dicts="dicts"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<el-select v-model="query.enabled" clearable placeholder="状态" class="filter-item" style="width: 90px" @change="toQuery">
|
||||
<el-option v-for="item in enabledTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
|
||||
</el-select>
|
||||
<el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||
<!-- 新增 -->
|
||||
<div style="display: inline-block;margin: 0px 2px;">
|
||||
<el-button
|
||||
v-if="checkPermission(['ADMIN','DEPT_ALL','DEPT_CREATE'])"
|
||||
v-permission="['ADMIN','DEPT_ALL','DEPT_CREATE']"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@@ -17,11 +17,19 @@
|
||||
@click="add">新增</el-button>
|
||||
<eForm ref="form" :is-add="true" :dicts="dicts"/>
|
||||
</div>
|
||||
<div style="display: inline-block;margin: 0px 2px;">
|
||||
<el-button
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-more"
|
||||
@click="expand">展开/折叠</el-button>
|
||||
<eForm ref="form" :is-add="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import checkPermission from '@/utils/permission' // 权限判断函数
|
||||
import eForm from './form'
|
||||
export default {
|
||||
components: { eForm },
|
||||
@@ -44,7 +52,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
toQuery() {
|
||||
this.$parent.page = 0
|
||||
this.$parent.init()
|
||||
@@ -52,6 +59,10 @@ export default {
|
||||
add() {
|
||||
this.$refs.form.getDepts()
|
||||
this.$refs.form.dialog = true
|
||||
},
|
||||
expand() {
|
||||
this.$parent.expand = !this.$parent.expand
|
||||
this.$parent.init()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user