Forráskód Böngészése

添加公共问题检索条件

yangg 1 napja
szülő
commit
f3dc33c9e7

+ 1 - 1
.env.development

@@ -6,7 +6,7 @@ ENV = 'development'
 # 本地环境接口地址 121.36.251.245
 
 
-VITE_API_URL = 'https://backend.qicai321.com'
+VITE_API_URL = 'http://192.168.100.187:8083'
 # VITE_API_URL = 'https://backend.qicai321.com'
 VITE_API_WX_URL='https://api.weixin.qq.com/'
 VITE_API_URL_MINLONG='http://117.185.80.170:7861'

+ 1 - 1
src/views/questionBank/list/api.ts

@@ -11,7 +11,7 @@ export function GetPermission() {
 	});
 }
 
-export function GetList(query: PageQuery) {
+export function GetList(query: any) {
 	return request({
 		url: '/api/system/interview_question/list',
 		method: 'get',

+ 43 - 2
src/views/questionBank/list/crud.tsx

@@ -29,10 +29,12 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
 		}
 		const params = {
 			...query,
-			question_category: query.category,
+			question_category: query.category||query.question_category,
 			question_tag: query.tag,
 			tenant_id: 1
 		}
+		console.log('params', params);
+
 		return await api.GetList(params);
 	};
 	const editRequest = async ({ form, row }: EditReq) => {
@@ -962,11 +964,50 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
 						helper: '选择所属的分类'
 					},
 				},
-				tags:{	
+				question_tags:{	
 					title: '标签',
 					search: { 
 						show: true,
 						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},
 						component: {
 							props: {

+ 2 - 2
src/views/questionBank/list/index.vue

@@ -142,8 +142,8 @@ const handleTreeClick = (node: any) => {
       limit: 20,
      position_types: selectedCategoryId.value,
       question_form: question_form,
-      ...(nodeType === 'category' ? { category: originalId } : {}),
-      ...(nodeType === 'tag' ? { tag: originalId } : {})
+      ...(nodeType === 'category' ? { question_category: originalId } : {}),
+      ...(nodeType === 'tag' ? { question_tags: originalId } : {})
     }
   };