| | |
| | | </template> |
| | | |
| | | <template #icon="{ row }"> |
| | | <span class="avue-icon avue-icon--small"> |
| | | <svg v-if="row.icon && row.icon.indexOf('#')==-1" aria-hidden="true"> |
| | | <use :xlink:href="row.icon"></use> |
| | | <span class="avue-icon avue-icon--small" style="display: block"> |
| | | <svg v-if="row.imagePath && row.imagePath.indexOf('#')==0" aria-hidden="true"> |
| | | <use :xlink:href="row.imagePath"></use> |
| | | </svg> |
| | | <i v-else :class="row.icon"></i> |
| | | <i v-else :class="row.imagePath"></i> |
| | | </span> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="图标:" prop="icon"> |
| | | <avue-input-icon v-model="form.icon" :icon-list="iconList" placeholder="请选择图标"> |
| | | <el-form-item label="图标:" prop="imagePath"> |
| | | <avue-input-icon v-model="form.imagePath" :icon-list="iconList" placeholder="请选择图标"> |
| | | </avue-input-icon> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | <!-- 导入 --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导入" |
| | | @updata="getTreeList"></upload-file> |
| | | @updata="getList"></upload-file> |
| | | |
| | | <!-- 查看使用范围 --> |
| | | <el-dialog |
| | |
| | | </avue-crud> |
| | | </el-dialog> |
| | | </basic-container> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeList(); |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | // 左侧树请求 |
| | | getTreeList() { |
| | | getList() { |
| | | gridStatus(this.page.currentPage, this.page.pageSize).then(res => { |
| | | const data = res.data.data; |
| | | this.data = data; |
| | | this.page.total = res.data.total; |
| | | this.loading = false; |
| | | }).catch(err => { |
| | | this.$message.error(err); |
| | | }); |
| | | }, |
| | | |
| | | // 表格刷新 |
| | | handleRefresh() { |
| | | this.getTreeList(); |
| | | this.getList(); |
| | | }, |
| | | |
| | | // 表格多选 |
| | |
| | | // 条数 |
| | | sizeChange(val) { |
| | | this.page.pageSize = val; |
| | | this.getTreeList(); |
| | | this.getList(); |
| | | }, |
| | | |
| | | // 页码 |
| | | currentChange(val) { |
| | | this.page.currentPage = val; |
| | | this.getTreeList(); |
| | | this.getList(); |
| | | }, |
| | | |
| | | // 行单选 |
| | |
| | | deleteStatus(this.selectList).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTreeList(); |
| | | this.getList(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | |
| | | deleteStatus(list).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTreeList(); |
| | | this.getList(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.loading = true; |
| | | this.getTreeList(); |
| | | this.getList(); |
| | | this.visible = false; |
| | | } else { |
| | | this.$message.error(res.data.obj); |