| | |
| | | <el-radio v-model="treeRadio" label="1" @input="TreeRadioChange">链接类型树</el-radio> |
| | | </div> |
| | | <avue-tree v-loading="treeLoading" :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span> |
| | | <icon-show :name="data.icon"></icon-show> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | |
| | | <el-main> |
| | | <basic-container> |
| | | <div v-if="!tableStatus" style="display: flex;justify-content: left;margin-top: 15px"> |
| | | <el-button v-if="permissionList.addBtn" icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">增加</el-button> |
| | | <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">删除</el-button> |
| | | <el-button v-if="permissionList.cloneBtn" icon="el-icon-document-add" plain size="small" type="primary" @click="copyClickHandler">克隆 |
| | | <el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="addClickHandler"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | 增加 |
| | | </el-button> |
| | | <el-button v-if="permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">导入</el-button> |
| | | <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导出 |
| | | <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger" |
| | | @click="deleteClickHandler"> |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | <el-button v-if="permissionList.cloneBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="copyClickHandler"> |
| | | <icon-show :name="permissionList.cloneBtn.source"></icon-show> |
| | | 克隆 |
| | | </el-button> |
| | | <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" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="exportClickHandler"> |
| | | <icon-show :name="permissionList.exportBtn.source"></icon-show> |
| | | 导出 |
| | | </el-button> |
| | | </div> |
| | | <avue-crud |
| | |
| | | </div> |
| | | </template> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button v-if="permissionList.editBtn" icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">编辑 |
| | | <el-button v-if="permissionList.editBtn" size="small" type="text" @click="editBtnClick(scope.row)"> |
| | | <icon-show :name="permissionList.editBtn.source"></icon-show> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button v-if="permissionList.delBtn" icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除 |
| | | <el-button v-if="permissionList.delBtn" size="small" type="text" @click="rowDeleteHandler(scope.row)"> |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | </div> |
| | | <avue-tree ref="cloneTree" v-loading="cloneTreeLoading" :data="cloneTreeData" :option="treeOption" |
| | | @node-click="cloneTreeNodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span> |
| | | <icon-show :name="data.icon"></icon-show> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | |
| | | 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), |
| | | cloneBtn: this.vaildData(this.permission[this.$route.query.id].clone, false), |
| | | cloneBtn: this.vaildData(this.permission[this.$route.query.id].CLONE, false), |
| | | }; |
| | | }, |
| | | tableStatus() { |
| | |
| | | const data = res.data.data.map(item => { |
| | | this.processChildren(item); // 处理每个节点 |
| | | item.attributes.id = item.attributes.id; |
| | | item.attributes.icon = item.attributes.imageName; |
| | | return item.attributes; // 返回处理后的 attributes |
| | | }); |
| | | this.treeData = data; |
| | |
| | | const data = res.data.data.map(item => { |
| | | this.processChildren(item); // 处理每个节点 |
| | | item.attributes.id = item.attributes.id; |
| | | item.attributes.icon = item.attributes.imageName; |
| | | return item.attributes; // 返回处理后的 attributes |
| | | }); |
| | | this.treeData = data; |
| | |
| | | if (item.children && item.children.length > 0) { |
| | | item.attributes.children = item.children.map(child => { |
| | | child.attributes.id = child.attributes.id; |
| | | child.attributes.icon = child.attributes.imageName; |
| | | this.processChildren(child); // 递归处理每个子节点 |
| | | return child.attributes; // 只返回子节点的 attributes |
| | | }); |
| | |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | this.selectList = [row]; |
| | | } |
| | | ); |
| | | }, |
| | |
| | | exportExcel(params).then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('导出成功'); |
| | | }).catch(err => { |
| | | this.$message.error(err); |
| | | }); |
| | | }, |
| | | |