12345678910111213141516171819 |
- import AIFormRuleField from "@/pages/ie/components/ai-form/items/templates/AIFormRuleField";
- export default {
- mixins: [AIFormRuleField],
- methods: {
- async initColumns() {
- let opts = this.rule.options
- if (this.rule.dictOptions) {
- const dicts = await this.$store.cache.dispatch(
- 'cachedData/GET_DICT',
- this.rule.dictOptions
- )
- // 转化为标准数据,更契合uView数据结构
- opts = dicts.map(d => ({text: d.dictLabel, value: d.dictValue}))
- }
- this.columns = opts || []
- }
- }
- }
|