feat:硬件分组查询
This commit is contained in:
1 parent
3262e2cbd2
commit
6e32c1d4d7
9 files changed
+433
-19
No files matched your search
@@ -22,14 +22,14 @@
|
||||
<el-button circle icon="Refresh" @click="handleRefresh()" />
|
||||
</el-tooltip>
|
||||
|
||||
<!-- 插槽 -->
|
||||
<slot></slot>
|
||||
</el-row>
|
||||
<!-- 插槽 -->
|
||||
<slot></slot>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="right-toolbar">
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
import { auth } from "/@/utils/authFunction"
|
||||
|
||||
/**
|
||||
* 通过 defineProps 函数定义组件 props
|
||||
@@ -63,43 +63,43 @@ const props = defineProps({
|
||||
type: Number,
|
||||
default: 10,
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
const emits = defineEmits(['update:showSearch', 'queryTable', 'exportExcel']);
|
||||
const emits = defineEmits(["update:showSearch", "queryTable", "exportExcel"])
|
||||
|
||||
const style = computed(() => {
|
||||
const ret = {};
|
||||
const ret = {}
|
||||
// 如果props中有传入gutter属性,则计算出marginRight
|
||||
if (props.gutter) {
|
||||
ret.marginRight = `${props.gutter / 2}px`;
|
||||
ret.marginRight = `${props.gutter / 2}px`
|
||||
}
|
||||
return ret; // 返回计算后的样式对象
|
||||
});
|
||||
return ret // 返回计算后的样式对象
|
||||
})
|
||||
|
||||
// 搜索
|
||||
const toggleSearch = () => {
|
||||
emits('update:showSearch', !props.showSearch);
|
||||
};
|
||||
emits("update:showSearch", !props.showSearch)
|
||||
}
|
||||
|
||||
// 刷新
|
||||
const handleRefresh = () => {
|
||||
emits('queryTable');
|
||||
};
|
||||
emits("queryTable")
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const handleExport = () => {
|
||||
emits('exportExcel');
|
||||
};
|
||||
emits("exportExcel")
|
||||
}
|
||||
|
||||
// 是否导出
|
||||
const isExport = () => {
|
||||
if (props.export === true) {
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
|
||||
// 字符串鉴权
|
||||
return props.export && auth(props.export);
|
||||
};
|
||||
return props.export && auth(props.export)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in new issue
Block a user