From fb7eddb137e5eff9a10b24d046746dcce854c4ca Mon Sep 17 00:00:00 2001 From: tanzhisong Date: Fri, 28 Feb 2025 18:10:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=BD=A6=E8=BE=86=E5=93=81=E7=89=8C?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/miniapp/car/AppCarTree.data.ts | 79 ++++---- src/views/miniapp/car/AppCarTreeList.vue | 312 ++++++++++++++++--------------- 2 files changed, 203 insertions(+), 188 deletions(-) diff --git a/src/views/miniapp/car/AppCarTree.data.ts b/src/views/miniapp/car/AppCarTree.data.ts index e11114f..5df5717 100644 --- a/src/views/miniapp/car/AppCarTree.data.ts +++ b/src/views/miniapp/car/AppCarTree.data.ts @@ -1,31 +1,36 @@ -import {BasicColumn} from '/@/components/Table'; -import {FormSchema} from '/@/components/Table'; -import { rules} from '/@/utils/helper/validator'; +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { rules } from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ - { + { + title: '英文首字母', + align: 'left', + dataIndex: 'bfirstletter', + }, + { title: '名称', align: 'left', - dataIndex: 'name' - }, - { + dataIndex: 'name', + }, + { title: '描述', align: 'center', - dataIndex: 'description' - }, + dataIndex: 'description', + }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ { - label: "名称", - field: "name", + label: '名称', + field: 'name', component: 'JInput', }, { - label: "描述", - field: "description", + label: '英文首字母', + field: 'bfirstletter', component: 'JInput', }, ]; @@ -36,48 +41,50 @@ export const formSchema: FormSchema[] = [ field: 'pid', component: 'JTreeSelect', componentProps: { - dict: "app_car_tree,name,id", - pidField: "pid", - pidValue: "0", - hasChildField: "has_child", + dict: 'app_car_tree,name,id', + pidField: 'pid', + pidValue: '0', + hasChildField: 'has_child', }, }, + { + label: '英文首字母', + field: 'bfirstletter', + component: 'Input', + }, { label: '名称', field: 'name', component: 'Input', - dynamicRules: ({model,schema}) => { - return [ - { required: true, message: '请输入名称!'}, - ]; - }, + dynamicRules: ({ model, schema }) => { + return [{ required: true, message: '请输入名称!' }]; + }, }, { label: '描述', field: 'description', component: 'Input', }, - // TODO 主键隐藏字段,目前写死为ID - { - label: '', - field: 'id', - component: 'Input', - show: false - }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, ]; // 高级查询数据 export const superQuerySchema = { - name: {title: '名称',order: 1,view: 'text', type: 'string',}, - description: {title: '描述',order: 2,view: 'text', type: 'string',}, + name: { title: '名称', order: 1, view: 'text', type: 'string' }, + description: { title: '描述', order: 2, view: 'text', type: 'string' }, }; - /** -* 流程表单调用这个方法获取formSchema -* @param param -*/ -export function getBpmFormSchema(_formData): FormSchema[]{ + * 流程表单调用这个方法获取formSchema + * @param param + */ +export function getBpmFormSchema(_formData): FormSchema[] { // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema return formSchema; } diff --git a/src/views/miniapp/car/AppCarTreeList.vue b/src/views/miniapp/car/AppCarTreeList.vue index 4704805..869bab1 100644 --- a/src/views/miniapp/car/AppCarTreeList.vue +++ b/src/views/miniapp/car/AppCarTreeList.vue @@ -1,24 +1,33 @@