| | |
| | | @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="display: flex"> |
| | | <icon-show :name="data.icon"></icon-show> |
| | | <icon-show v-if="data.icon" :name="data.icon"></icon-show> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | |
| | | @row-update="rowTreeUpdataHandler" |
| | | @refresh-change="handleRefresh"> |
| | | <template slot="menuLeft"> |
| | | <el-button v-if="permissionList.addBtn" icon="el-icon-plus" plain size="small" type="primary" @click="addTreeClickHandler(treeNodeRow)">创建 |
| | | <el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="addTreeClickHandler(treeNodeRow)"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | 创建 |
| | | </el-button> |
| | | <!--<el-button v-if="permissionList.editBtn" icon="el-icon-edit" plain size="small" type="primary" @click="editTreeClickHandler">修改 |
| | | </el-button> |
| | | <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger" @click="delTreeClickHandler">删除 |
| | | </el-button>--> |
| | | <el-button v-if="permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导入 |
| | | <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" @click="uploadClickHandler"> |
| | | <icon-show :name="permissionList.importBtn.source"></icon-show> |
| | | 导入 |
| | | </el-button> |
| | | <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导出 |
| | | <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" @click="exportClickHandler"> |
| | | <icon-show :name="permissionList.exportBtn.source"></icon-show> |
| | | 导出 |
| | | </el-button> |
| | | </template> |
| | | <template #menu="{ row, size }"> |
| | | <el-button v-if="permissionList.addBtn" :size="size" icon="el-icon-plus" |
| | | <template #menu="{ row, index, size }"> |
| | | <el-button v-if="permissionList.editBtn" size="small" type="text" |
| | | @click="$refs.treeCrud.rowEdit(row, index)"> |
| | | <icon-show :name="permissionList.editBtn.source"></icon-show> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button v-if="permissionList.delBtn" size="small" type="text" |
| | | @click.stop="rowTreeDelHandler(row,index)"> |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.addBtn" :size="size" |
| | | text |
| | | type="text" |
| | | @click="addTreeClickHandler(row)">新增子级</el-button> |
| | | @click="addTreeClickHandler(row)"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | 新增子级 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | |
| | | @refresh-change="handleRefresh" |
| | | @selection-change="selectChangeHandler" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="plCSClass" slot-scope="{row}"> |
| | | <template slot="plImage" slot-scope="{row}"> |
| | | <span class="avue-icon"> |
| | | <icon-show :name="row.plCSClass"></icon-show> |
| | | <icon-show :name="row.plImage"></icon-show> |
| | | </span> |
| | | </template> |
| | | <template slot-scope="{type,disabled}" slot="plImageForm"> |
| | |
| | | </el-tag> |
| | | </template> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="treeNodeRow.id !== 'root' && permissionList.actionTopAddBtn" icon="el-icon-plus" plain size="small" type="primary" |
| | | @click="addClickHandler">增加 |
| | | <el-button v-if="treeNodeRow.id !== 'root' && permissionList.actionTopAddBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="addClickHandler"> |
| | | <icon-show :name="permissionList.actionTopAddBtn.source"></icon-show> |
| | | 增加 |
| | | </el-button> |
| | | <el-button v-if="permissionList.actionTopExportBtn" icon="el-icon-download" plain size="small" type="success" @click="downLoadHandler">导出 |
| | | <el-button v-if="permissionList.actionTopExportBtn" class="button-custom-icon" plain size="small" type="success" @click="downLoadHandler"> |
| | | <icon-show :name="permissionList.actionTopExportBtn.source"></icon-show> |
| | | 导出 |
| | | </el-button> |
| | | </template> |
| | | <template #menu="{row,index,size}"> |
| | | <el-button v-if="permissionList.actionTopEditBtn" size="small" type="text" |
| | | @click="$refs.crud.rowEdit(row, index)"> |
| | | <icon-show :name="permissionList.actionTopEditBtn.source"></icon-show> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button v-if="permissionList.actionTopDelBtn" size="small" type="text" |
| | | @click.stop="rowDelHandler(row,index)"> |
| | | <icon-show :name="permissionList.actionTopDelBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | @row-del="BottomRowDelHandler" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="permissionList.actionBottomAddBtn" icon="el-icon-plus" plain size="small" type="primary" @click="bottomAddClickHandler">增加 |
| | | <el-button v-if="permissionList.actionBottomAddBtn" class="button-custom-icon" plain size="small" type="primary" @click="bottomAddClickHandler"> |
| | | <icon-show :name="permissionList.actionBottomAddBtn.source"></icon-show> |
| | | 增加 |
| | | </el-button> |
| | | </template> |
| | | <template #menu="{row,index,size}"> |
| | | <el-button v-if="permissionList.actionBottomEditBtn" size="small" type="text" |
| | | @click="$refs.BottomCrud.rowEdit(row, index)"> |
| | | <icon-show :name="permissionList.actionBottomEditBtn.source"></icon-show> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button v-if="permissionList.actionBottomDelBtn" size="small" type="text" |
| | | @click.stop="BottomRowDelHandler(row,index)"> |
| | | <icon-show :name="permissionList.actionBottomDelBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | <template slot="menuForm" slot-scope="scope"> |
| | |
| | | editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), |
| | | exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false), |
| | | importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false), |
| | | actionTopAddBtn: this.vaildData(this.permission[this.$route.query.id].actionTopAdd, false), |
| | | actionTopDelBtn: this.vaildData(this.permission[this.$route.query.id].actionTopDel, false), |
| | | actionTopEditBtn: this.vaildData(this.permission[this.$route.query.id].actionTopEdit, false), |
| | | actionTopExportBtn: this.vaildData(this.permission[this.$route.query.id].actionTopExport, false), |
| | | actionBottomAddBtn: this.vaildData(this.permission[this.$route.query.id].actionBottomAdd, false), |
| | | actionBottomDelBtn: this.vaildData(this.permission[this.$route.query.id].actionBottomDel, false), |
| | | actionBottomEditBtn: this.vaildData(this.permission[this.$route.query.id].actionBottomEdit, false), |
| | | actionTopAddBtn: this.vaildData(this.permission[this.$route.query.id].ADD2, false), |
| | | actionTopDelBtn: this.vaildData(this.permission[this.$route.query.id].DELETE2, false), |
| | | actionTopEditBtn: this.vaildData(this.permission[this.$route.query.id].EDIT2, false), |
| | | actionTopExportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT2, false), |
| | | actionBottomAddBtn: this.vaildData(this.permission[this.$route.query.id].ADD3, false), |
| | | actionBottomDelBtn: this.vaildData(this.permission[this.$route.query.id].DELETE3, false), |
| | | actionBottomEditBtn: this.vaildData(this.permission[this.$route.query.id].EDIT3, false), |
| | | }; |
| | | }, |
| | | treeCrudOption(){ |
| | | return { |
| | | ...basicOption, |
| | | editBtn: this.permissionList.editBtn, |
| | | delBtn: this.permissionList.delBtn, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | addBtn: false, |
| | | calcHeight: -50, |
| | | highlightCurrentRow: true, |
| | |
| | | option() { |
| | | return { |
| | | ...basicOption, |
| | | editBtn:this.permissionList.actionTopEditBtn, |
| | | delBtn:this.permissionList.actionTopDelBtn, |
| | | editBtn:false, |
| | | delBtn:false, |
| | | addBtn: false, |
| | | height: 350, |
| | | highlightCurrentRow: true, |
| | |
| | | { |
| | | required: true, |
| | | message: '请选择图标', |
| | | trigger: 'blur' |
| | | trigger: 'submit' |
| | | } |
| | | ] |
| | | }, |
| | |
| | | label: '分类', |
| | | prop: 'plActionCls', |
| | | type: 'tree', |
| | | hide: true, |
| | | defaultExpandedKeys:['root'], |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | |
| | | return { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | editBtn:this.permissionList.actionBottomEditBtn, |
| | | delBtn:this.permissionList.actionBottomDelBtn, |
| | | editBtn:false, |
| | | delBtn:false, |
| | | calcHeight: -20, |
| | | selection: false, |
| | | refreshBtn: false, |
| | |
| | | this.treeData = this.treeDataFormAtter([data],'Action分类'); |
| | | const selectTreeData = this.option.column.find(item => item.prop === 'plActionCls'); // 找到action添加分类树 |
| | | const dicData=this.treeData; |
| | | dicData[0].disabled=true;//根节点不能选 |
| | | dicData[0].disabled=true;//分类根节点不能选 |
| | | selectTreeData.dicData = dicData; |
| | | selectTreeData.hide=true;//隐藏分类列。不能直接在option设置,会导出dicData加载不出 |
| | | }) |
| | | }, |
| | | |