b30375b8 by lxs

分级分类任务更新

1 parent f39ba7a0
......@@ -645,7 +645,7 @@ const templateInfo = ref({
],
})
const tabsInfo = ref({
activeName: 'sheet',
activeName: 'field',
tabs: [
{ label: '库表', name: 'sheet' },
{ label: '字段', name: 'field' },
......@@ -854,7 +854,28 @@ const fieldTableInfo = ref({
...page.value,
},
actionInfo: {
show: false
label: "操作",
type: "btn",
width: 80,
btns: (scope) => {
let row = scope.row, btnArr: any = [
{ label: "编辑", value: "edit" },
];
// if (row.approveState == 'Y') {
// if (row.listingStatus == 'Y') {
// btnArr.splice(0, 0, { label: "详情", value: "detail" });
// } else {
// btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
// }
// } else {
// if (row.approveState == 'A') {
// btnArr.splice(0, 0, { label: "详情", value: "detail" });
// } else {
// btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
// }
// }
return btnArr;
},
},
})
......@@ -1105,6 +1126,20 @@ onBeforeMount(() => {
</span>
</template>
</el-table-column>
<el-table-column label="操作" :width="fieldTableInfo.actionInfo.width"
:class-name="fieldTableInfo.actionInfo.columClass" fixed="right">
<template #default="scope">
<template v-for="(btn, b) in Array.isArray(fieldTableInfo.actionInfo.btns)
? fieldTableInfo.actionInfo.btns
: fieldTableInfo.actionInfo.btns(scope)">
<span class="operate_btn" :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true">
<span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }"
@click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : tableBtnClick(scope, btn)"
v-preReClick>{{ btn.label }}</span>
</span>
</template>
</template>
</el-table-column>
</el-table>
<PageNav :class="[fieldTableInfo.page.type, fieldTableInfo.page.col]" :pageInfo="fieldTableInfo.page"
@pageChange="tablePageChange" />
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!