|
@@ -29,10 +29,12 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
|
}
|
|
}
|
|
const params = {
|
|
const params = {
|
|
...query,
|
|
...query,
|
|
- question_category: query.category,
|
|
|
|
|
|
+ question_category: query.category||query.question_category,
|
|
question_tag: query.tag,
|
|
question_tag: query.tag,
|
|
tenant_id: 1
|
|
tenant_id: 1
|
|
}
|
|
}
|
|
|
|
+ console.log('params', params);
|
|
|
|
+
|
|
return await api.GetList(params);
|
|
return await api.GetList(params);
|
|
};
|
|
};
|
|
const editRequest = async ({ form, row }: EditReq) => {
|
|
const editRequest = async ({ form, row }: EditReq) => {
|
|
@@ -962,11 +964,50 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
|
helper: '选择所属的分类'
|
|
helper: '选择所属的分类'
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- tags:{
|
|
|
|
|
|
+ question_tags:{
|
|
title: '标签',
|
|
title: '标签',
|
|
search: {
|
|
search: {
|
|
show: true,
|
|
show: true,
|
|
size: 'small',
|
|
size: 'small',
|
|
|
|
+ col:{ span:3 },
|
|
|
|
+ component: {
|
|
|
|
+ props: {
|
|
|
|
+ multiple: false, // 在搜索表单中使用单选模式
|
|
|
|
+ filterable: true,
|
|
|
|
+ placeholder: '请选择标签搜索'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ type: 'dict-select',
|
|
|
|
+ column: {
|
|
|
|
+ show: false,
|
|
|
|
+ minWidth: 220,
|
|
|
|
+ },
|
|
|
|
+ dict: dict({
|
|
|
|
+ // 使用API方式获取数据
|
|
|
|
+ getData: async () => {
|
|
|
|
+ const res = await api.GetTagList({page:1, limit:1000, tenant_id:1});
|
|
|
|
+ return res.data.items;
|
|
|
|
+ },
|
|
|
|
+ label: 'name',
|
|
|
|
+ value: 'id'
|
|
|
|
+ }),
|
|
|
|
+ form: {
|
|
|
|
+ component: {
|
|
|
|
+ props: {
|
|
|
|
+ multiple: true, // 在编辑表单中保持多选
|
|
|
|
+ filterable: true,
|
|
|
|
+ placeholder: '请选择标签'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ helper: '选择题目关联的标签,可多选'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ tags:{
|
|
|
|
+ title: '标签',
|
|
|
|
+ search: {
|
|
|
|
+ show: false,
|
|
|
|
+ size: 'small',
|
|
col:{ span:3},
|
|
col:{ span:3},
|
|
component: {
|
|
component: {
|
|
props: {
|
|
props: {
|