feat: 完成了物料总表,生产发料,入料,以及部分采购计划。
This commit is contained in:
@@ -1,22 +1,34 @@
|
||||
<script lang="ts" setup>
|
||||
import { $t } from "@/common/languages";
|
||||
|
||||
const props = defineProps({
|
||||
authShowFunc: Function,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{ "operate-button-click": [eventName: string, row: any] }>();
|
||||
|
||||
const buttonList = useRoute().meta.toolButtonAuth ?? [];
|
||||
|
||||
const authShowFunc = (row: any, button: globalThis.ButtonProp) => {
|
||||
if (props.authShowFunc !== undefined) {
|
||||
return props.authShowFunc(row, button);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<el-table-column :label="$t('_prop.common.operate')" v-if="buttonList?.length !== 0">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-for="button of buttonList"
|
||||
:key="button.buttonName"
|
||||
:type="button.colorType || 'primary'"
|
||||
@click="emit('operate-button-click', button.eventName, scope.row)"
|
||||
link
|
||||
>
|
||||
{{ $t("_button." + button.eventName) }}
|
||||
</el-button>
|
||||
<template #default="{ row }">
|
||||
<template v-for="button of buttonList" :key="button.buttonName">
|
||||
<el-button
|
||||
v-if="authShowFunc(row, button)"
|
||||
:type="button.colorType || 'primary'"
|
||||
@click="emit('operate-button-click', button.eventName, row)"
|
||||
link
|
||||
>
|
||||
{{ $t("_button." + button.eventName) }}
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user