From d78bfcfe33940427c68033511f9adc35ca2f79d7 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期三, 26 六月 2024 14:42:49 +0800 Subject: [PATCH] qms更新 --- src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts | 250 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 241 insertions(+), 9 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts b/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts index 25471aa..c4a9145 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/BAS_REASON.ts @@ -1,19 +1,28 @@ /* + * @Description: file content + * @Author: Ben Lin + * @version: + * @Date: 2024-06-22 00:58:43 + * @LastEditors: Ben Lin + * @LastEditTime: 2024-06-26 03:13:26 + */ +/* * @Description: 涓嶈壇鍘熷洜鐩稿叧 * @Author: Ben Lin * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-06-22 22:28:08 + * @LastEditTime: 2024-06-23 18:12:40 */ -import { Ref } from 'vue'; -import { DeleteEntity } from '/@/api/tigerapi/system'; +import { Ref, h } from 'vue'; +import { DeleteEntity, getEntity } from '/@/api/tigerapi/system'; import { ActionItem, BasicColumn } from '/@/components/Table'; -import { isNullOrEmpty } from '/@/utils/is'; +import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is'; import { buildUUID } from '/@/utils/uuid'; import { useUserStore } from '/@/store/modules/user'; import { formatToDateTime } from '/@/utils/dateUtil'; +import { Tag } from 'ant-design-vue'; function _default() { /** @@ -55,17 +64,19 @@ * @description: 鑾峰彇鏂板鎸夐挳鐨勮涓� * @return {*} */ - CreateAction: () => { + CreateAction: (fnName: string) => { return { action: 'drawer', //drawer(鎵撳紑宸︿晶鎶藉眽妗�) | go(璺宠浆鍒版柊鐨勯〉闈�) }; }, /** - * @description: 浜у搧缁戝畾宸ヨ壓璺嚎鎿嶄綔瀛楁鑷畾涔夋寜閽� + * @description: 鎿嶄綔瀛楁鑷畾涔夋寜閽� * @return {*} */ ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => { - data[1].popConfirm.confirm = rsnGrpDel.bind(null, args, params); + if (!isNullOrUnDef(data[1])) { + data[1].popConfirm.confirm = rsnGrpDel.bind(null, args, params); + } return data; }, /** @@ -75,7 +86,7 @@ * @param {*} u * @return {*} */ - EditeOperation:( data: Ref<any[]>, d, u) => { + EditOperation: (data: Ref<any[]>, d, u) => { if (u.isUpdate) { //鏇存柊 var _data = data.value.map((item) => { @@ -105,7 +116,228 @@ _data2.push(d); data.value = _data2; } - } + }, + /** + * @description: 楂樼骇琛ㄥ崟鍜岃鎯呴〉闈㈣繑鍥炰富椤甸潰鐨剈rl + * @return {*} + */ + GetHomeUrl: () => { + return `/BAS_REASON_GRP/LC/${encodeURI(JSON.stringify({ ID: 'BAS_REASON_GRP', colSlots: [], crudColSlots: [] }))}`; + }, + GetBaseColumns: () => { + return [ + { + title: '涓嶈壇鍘熷洜缂栫爜', + dataIndex: 'RSN_CODE', + // ifShow: false, + width: 180, + }, + { + title: '涓嶈壇鍘熷洜鍚嶇О', + dataIndex: 'RSN_NAME', + }, + { + title: '鏄惁蹇呴』鏇存崲闆朵欢', + dataIndex: 'NEED_REPLACE', + customRender: ({ record }) => { + const type = record.NEED_REPLACE; + var text = ''; + var color = 'green'; + switch (type) { + case 'Y': + text = '鏇存崲'; + break; + case 'N': + color = 'blue'; + text = '涓嶆洿鎹�'; + break; + } + return h(Tag, { color: color }, () => text); + }, + }, + { + title: '涓嶈壇鍘熷洜缁勭紪鐮�', + dataIndex: 'RSNG_CODE', + }, + { + title: '澶囨敞', + dataIndex: 'REMARK', + }, + { + title: '鏇存柊鏃堕棿', + dataIndex: 'UPDATE_TIME', + }, + { + title: '鏇存柊浜�', + dataIndex: 'UPDATE_USER', + }, + ]; + }, + GetSearchForm: () => { + return [ + { + field: 'RSN_CODE', + label: '涓嶈壇鍘熷洜缂栫爜', + component: 'Input', + colProps: { + span: 8, + }, + }, + { + label: '涓嶈壇鍘熷洜鍚嶇О', + field: 'RSN_NAME', + component: 'Input', + colProps: { + span: 8, + }, + }, + ]; + }, + GetCrudForm: () => { + return [ + { + field: 'RSN_CODE', + label: '涓嶈壇鍘熷洜缂栫爜', + component: 'Input', + required: true, + colProps: { + span: 24, + }, + }, + { + label: '涓嶈壇鍘熷洜鍚嶇О', + field: 'RSN_NAME', + component: 'Input', + required: true, + colProps: { + span: 24, + }, + }, + { + label: '涓嶈壇鍘熷洜缁勭紪鐮�', + field: 'RSNG_CODE', + component: 'ApiSelect', + colProps: { + span: 24, + }, + componentProps: { + api: getEntity, + params: { entityName: 'BAS_REASON_GRP', sqlcmd: ' 1=1 ' }, + resultField: 'Data.Items', + labelField: 'RSNG_NAME', + valueField: 'RSNG_CODE', + }, + dynamicDisabled: ({ values }) => { + return true; + }, + }, + { + label: '鏄惁蹇呴』鏇存崲闆朵欢', + field: 'NEED_REPLACE', + component: 'Select', + required: true, + colProps: { + span: 24, + }, + componentProps: { + options: [ + { + label: '鏇存崲', + value: 'Y', + key: 'Y', + }, + { + label: '涓嶆洿鎹�', + value: 'N', + key: 'N', + }, + ], + }, + }, + { + label: '澶囨敞', + field: 'REMARK', + component: 'Input', + colProps: { + span: 24, + }, + }, + { + label: 'ID', + field: 'ID', + component: 'Input', + colProps: { + span: 24, + }, + show: false, + }, + ]; + }, + GetBaseForm: () => { + return [ + { + field: 'RSNG_CODE', + label: '涓嶈壇鍘熷洜缁勭紪鐮�', + component: 'Input', + required: true, + colProps: { + span: 8, + }, + }, + { + label: '涓嶈壇鍘熷洜缁勫悕绉�', + field: 'RSNG_NAME', + required: true, + component: 'Input', + colProps: { + span: 8, + }, + }, + { + label: '澶囨敞', + field: 'REMARK', + component: 'Input', + colProps: { + span: 8, + }, + }, + { + label: 'ID', + field: 'ID', + component: 'Input', + colProps: { + span: 8, + }, + show: false, + }, + ]; + }, + GetBaseCards: () => { + return [ + { + name: 'BaseForm', + slots: [], + preIcons: {}, + title: '涓嶈壇鍘熷洜缁勪俊鎭�', + entityName: 'BAS_REASON_GRP', + }, + ]; + }, + OthersValues: (val: string, id: string) => { + return { RSNG_CODE: val }; + }, + /** + * @description: 鑾峰彇鏍囬淇℃伅 + * @param {string} type + * @return {*} + */ + GetTitle: () => { + return { + pageTitle: '涓嶈壇鍘熷洜缁勭鐞�', + pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀逛笉鑹師鍥犵粍鍜屼笉鑹唬鐮併��', + baseTableTitle: '涓嶈壇鍘熷洜绠$悊', + }; + }, }; return [methods, ActionColumn]; -- Gitblit v1.9.3