12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- export default function useColumns() {
- const SearchColumns = [
- {
- item: { key: "year", title: "年度" },
- attr: {
- is: "el-date-picker",
- type: "year",
- valueFormat: "yyyy-MM-dd",
- clearable: true,
- }
- },
- {
- item: { key: "name", title: "模板名称" },
- attr: {
- is: "el-input",
- clearable: true,
- }
- },
- {
- item: { key: "dateRange", title: "开始日期" },
- attr: {
- is: "el-date-picker",
- type: "daterange",
- rangeSeparator: "-",
- endPlaceholder: "结束",
- startPlaceholder: "开始",
- valueFormat: "yyyy-MM-dd",
- }
- },
- ];
- const TableColumns = [
- {
- item: { key: "year", title: "年度", width: 100, },
- attr: {}
- },
- {
- item: { key: "name", title: "模板名称" },
- attr: {}
- },
- {
- item: { key: "startTime", title: "开始日期", },
- attr: {}
- },
- {
- item: { key: "deadlineTime", title: "结束日期", },
- attr: {}
- },
- {
- item: { key: "cycle", title: "周期", width: 100, },
- attr: {
- is: "el-dict-tag",
- dictName: "mk_periodic_unit",
- }
- },
- {
- item: { key: "unfold", title: "按列展开" },
- attr: {
- is: "el-dict-tag",
- dictName: "mk_expansion_mode",
- }
- },
- {
- item: { key: "createByName", title: "创建人", width: 120, },
- attr: {}
- },
- {
- item: { key: "createTime", title: "创建时间" },
- attr: {}
- },
- {
- item: { key: "updateByName", title: "修改人", width: 120, },
- attr: {}
- },
- {
- item: { key: "updateTime", title: "修改时间" },
- attr: {}
- },
- ].map(({ item, attr }) => ({
- attr,
- item: {
- ...item,
- sortabled: true,
- fixedabled: true,
- filterabled: true,
- hiddenabled: true,
- },
- }));
- return { SearchColumns, TableColumns }
- }
|