分级分类任务更新
Showing
2 changed files
with
38 additions
and
3 deletions
This diff is collapsed.
Click to expand it.
| ... | @@ -645,7 +645,7 @@ const templateInfo = ref({ | ... | @@ -645,7 +645,7 @@ const templateInfo = ref({ |
| 645 | ], | 645 | ], |
| 646 | }) | 646 | }) |
| 647 | const tabsInfo = ref({ | 647 | const tabsInfo = ref({ |
| 648 | activeName: 'sheet', | 648 | activeName: 'field', |
| 649 | tabs: [ | 649 | tabs: [ |
| 650 | { label: '库表', name: 'sheet' }, | 650 | { label: '库表', name: 'sheet' }, |
| 651 | { label: '字段', name: 'field' }, | 651 | { label: '字段', name: 'field' }, |
| ... | @@ -854,7 +854,28 @@ const fieldTableInfo = ref({ | ... | @@ -854,7 +854,28 @@ const fieldTableInfo = ref({ |
| 854 | ...page.value, | 854 | ...page.value, |
| 855 | }, | 855 | }, |
| 856 | actionInfo: { | 856 | actionInfo: { |
| 857 | show: false | 857 | label: "操作", |
| 858 | type: "btn", | ||
| 859 | width: 80, | ||
| 860 | btns: (scope) => { | ||
| 861 | let row = scope.row, btnArr: any = [ | ||
| 862 | { label: "编辑", value: "edit" }, | ||
| 863 | ]; | ||
| 864 | // if (row.approveState == 'Y') { | ||
| 865 | // if (row.listingStatus == 'Y') { | ||
| 866 | // btnArr.splice(0, 0, { label: "详情", value: "detail" }); | ||
| 867 | // } else { | ||
| 868 | // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" }); | ||
| 869 | // } | ||
| 870 | // } else { | ||
| 871 | // if (row.approveState == 'A') { | ||
| 872 | // btnArr.splice(0, 0, { label: "详情", value: "detail" }); | ||
| 873 | // } else { | ||
| 874 | // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" }); | ||
| 875 | // } | ||
| 876 | // } | ||
| 877 | return btnArr; | ||
| 878 | }, | ||
| 858 | }, | 879 | }, |
| 859 | }) | 880 | }) |
| 860 | 881 | ||
| ... | @@ -1096,7 +1117,7 @@ onBeforeMount(() => { | ... | @@ -1096,7 +1117,7 @@ onBeforeMount(() => { |
| 1096 | <div v-else-if="item.type == 'tag'"> | 1117 | <div v-else-if="item.type == 'tag'"> |
| 1097 | <el-tag :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{ | 1118 | <el-tag :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{ |
| 1098 | item.getName ? item.getName(scope) : tagMethod(scope.row, item.field) | 1119 | item.getName ? item.getName(scope) : tagMethod(scope.row, item.field) |
| 1099 | }}</el-tag> | 1120 | }}</el-tag> |
| 1100 | </div> | 1121 | </div> |
| 1101 | <span v-else> | 1122 | <span v-else> |
| 1102 | {{ item.getName ? item.getName(scope) : scope.row[item.field] !== 0 && !scope.row[item.field] | 1123 | {{ item.getName ? item.getName(scope) : scope.row[item.field] !== 0 && !scope.row[item.field] |
| ... | @@ -1105,6 +1126,20 @@ onBeforeMount(() => { | ... | @@ -1105,6 +1126,20 @@ onBeforeMount(() => { |
| 1105 | </span> | 1126 | </span> |
| 1106 | </template> | 1127 | </template> |
| 1107 | </el-table-column> | 1128 | </el-table-column> |
| 1129 | <el-table-column label="操作" :width="fieldTableInfo.actionInfo.width" | ||
| 1130 | :class-name="fieldTableInfo.actionInfo.columClass" fixed="right"> | ||
| 1131 | <template #default="scope"> | ||
| 1132 | <template v-for="(btn, b) in Array.isArray(fieldTableInfo.actionInfo.btns) | ||
| 1133 | ? fieldTableInfo.actionInfo.btns | ||
| 1134 | : fieldTableInfo.actionInfo.btns(scope)"> | ||
| 1135 | <span class="operate_btn" :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true"> | ||
| 1136 | <span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }" | ||
| 1137 | @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : tableBtnClick(scope, btn)" | ||
| 1138 | v-preReClick>{{ btn.label }}</span> | ||
| 1139 | </span> | ||
| 1140 | </template> | ||
| 1141 | </template> | ||
| 1142 | </el-table-column> | ||
| 1108 | </el-table> | 1143 | </el-table> |
| 1109 | <PageNav :class="[fieldTableInfo.page.type, fieldTableInfo.page.col]" :pageInfo="fieldTableInfo.page" | 1144 | <PageNav :class="[fieldTableInfo.page.type, fieldTableInfo.page.col]" :pageInfo="fieldTableInfo.page" |
| 1110 | @pageChange="tablePageChange" /> | 1145 | @pageChange="tablePageChange" /> | ... | ... |
-
Please register or sign in to post a comment