contextSelectConfig.js 3 KB
export default {
  props: {},
  layoutConfigData: [
    {
      title: '高级组件配置',
      data: [
        {
          key: 'filterType',
          title: '过滤方式',
          component: {
            name: 'el-radio',
            defaultValue: 'all',
            options: [{
              label: '所有上下文',
              value: 'all'
            }, {
              label: '类型上下文',
              value: 'type'
            }, {
              label: '所属上下文',
              value: 'userId'
            }, {
              label: '自定义过滤',
              value: 'custom'
            }]
          }
        },
        {
          key: 'contextType',
          title: '上下文类型',
          disabled: true,
          component: {
            obscure: 'this.form.filterType !== "type"',
            name: 'el-select',
            options: [],
            defaultSelectFirst: true,
            optionsdic: ['ContextType'],
            dicType: '0'
          }
        },
        {
          key: 'requestMethod',
          title: '请求方式',
          width: 1,
          component: {
            obscure: 'this.form.filterType !== "custom"',
            name: 'el-select',
            isLabelTop: true,
            options: [
              {
                label: 'get',
                value: 'get'
              },
              {
                label: 'post',
                value: 'post'
              }
            ]
          }
        },
        {
          key: 'requestURL',
          title: '请求url',
          width: 1,
          component: {
            obscure: 'this.form.filterType !== "custom"',
            isLabelTop: true,
            defaultValue: 'requestURL=""',
            name: 'btnCodeEdit',
            remindText: `requestURL为接口地址变量,直接给赋值,该变量必须有值,obtainedParams为可获取的数据,id为默认属性,其他属性可通过js日志打印方法在控制台查看`
          }
        },
        {
          key: 'requestParameters',
          title: '请求参数',
          width: 1,
          component: {
            obscure: 'this.form.filterType !== "custom"',
            isLabelTop: true,
            defaultValue: 'requestParameters = {}',
            name: 'btnCodeEdit',
            remindText: `requestParameters为请求参数变量,直接给赋值,该变量必须有值,obtainedParams为可获取的数据,functionParams为当前节点信息`
          }
        },
        {
          key: 'formateResponse',
          title: '接口返回数据格式化',
          width: 1,
          component: {
            obscure: 'this.form.filterType !== "custom"',
            isLabelTop: true,
            defaultValue: 'responseData = res.items',
            name: 'btnCodeEdit',
            remindText: `responseData为接口返回数据,该参数不配置则默认取值items属性`
          }
        }
      ]
    }
  ],
  data() {
    return {
    }
  },
  created() {
  },
  computed: {

  },
  methods: {

  }
}