123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- import CONFIG from "@/config";
- export default function useColumns() {
- const TableColumns = [
- {
- item: { key: "year", title: "年度", require: true },
- attr: {
- is: "el-date-picker",
- type: "year",
- valueFormat: "yyyy-MM-dd",
- },
- },
- {
- item: { key: "name", title: "模板名称", require: true },
- attr: { is: "el-input" },
- },
- {
- item: { key: "startTime", title: "开始日期", require: true },
- attr: {
- is: "el-date-picker",
- valueFormat: "yyyy-MM-dd",
- },
- },
- {
- item: { key: "deadlineTime", title: "结束日期", require: true },
- attr: {
- is: "el-date-picker",
- valueFormat: "yyyy-MM-dd",
- },
- },
- {
- item: { key: "cycle", title: "周期", require: true },
- attr: {
- is: "el-select",
- dictName: "mk_periodic_unit",
- },
- },
- {
- item: { key: "unfold", title: "按列展开"},
- attr: {
- is: "el-select",
- dictName: "mk_expansion_mode",
- clearable: true,
- },
- },
- ].map(({ item, attr }) => ({
- attr,
- item: { ...item, hidden: true, span: item.span || 6 },
- }));
- const TabColumns = [
- {
- item: {
- title: "指标",
- key: "indexs",
- },
- attr: {
- value: [],
- },
- TableColumns: [
- {
- item: { key: "target", title: "指标", width: 'auto' },
- attr: {
- is: "el-select",
- dictName: "mk_index_type",
- },
- },
- ],
- },
- {
- item: {
- title: "维度",
- key: "dimensionalitys"
- },
- attr: {
- value: [],
- },
- TableColumns: [
- {
- item: { key: "dimensionality", title: "维度", width: 'auto' },
- attr: {
- is: "el-select",
- dictName: "mk_dimensionality",
- },
- },
- ],
- },
- {
- item: {
- title: "周期",
- key: "cycles",
- },
- attr: {
- value: [],
- },
- TableColumns: [
- {
- item: { key: "name", title: "周期名称", require: true },
- attr: { is: "el-input" },
- },
- {
- item: {
- key: "startTime",
- title: "周期开始日期",
- require: true,
- },
- attr: {
- is: "el-date-picker",
- // valueFormat: "yyyy-MM-dd",
- // value: new Date(),
- },
- },
- {
- item: {
- key: "deadlineTime",
- title: "周期结束日期",
- require: true,
- width: 'auto'
- },
- attr: {
- is: "el-date-picker",
- // valueFormat: "yyyy-MM-dd",
- // value: new Date(),
- },
- },
- ],
- },
- ];
- return { TableColumns, TabColumns };
- }
|