| | |
| | | * @version: |
| | | * @Date: 2024-06-18 15:09:47 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-21 16:50:45 |
| | | * @LastEditTime: 2024-06-24 14:53:25 |
| | | */ |
| | | import { defHttp } from '/@/utils/http/axios'; |
| | | import { getMenuListResultModel } from './model/menuModel'; |
| | | import { genAction, Api } from '../tigerapi/system'; |
| | | import { useUserStore } from '/@/store/modules/user'; |
| | | |
| | | enum _Api { |
| | | GetMenuList = '/SYS/getMenuList', |
| | |
| | | export const getMenuButtons = async (params: string) =>{ |
| | | const usParams = genAction('SYS_MENU', { |
| | | QueryAble_T: '', |
| | | where: "PFUNC_CODE = '" + params + "'", |
| | | where: "PFUNC_CODE = '" + params + "' And BUTTON_TYPE < 3", |
| | | order: '', |
| | | }); |
| | | return await defHttp.post( |
| | |
| | | }, |
| | | ); |
| | | }; |
| | | |
| | | /** |
| | | * @description: æ ¹æ®å½åèå代ç è·åç¨æ·ææéçæé®å表 |
| | | * @param {string} menuCode |
| | | * @return {*} |
| | | */ |
| | | export async function getRoleButtons(menuCode: string) { |
| | | const buttons = (await getMenuButtons(menuCode)).Data.Items; |
| | | const roles = useUserStore().getUserInfo.roles; |
| | | return buttons.filter((btn) => roles.some((item) => item.MENU_CODE === btn.FUNC_CODE)); |
| | | } |
| | |
| | | SaveRouteNodePost = '/MES/SaveRouteNodePost', |
| | | GetRoutePTree = '/MES/GetRoutePTree', |
| | | RouteToProd = '/MES/RouteToProd', |
| | | RouteToCust = '/MES/RouteToCust', |
| | | |
| | | } |
| | |
| | | ); |
| | | return data; |
| | | }; |
| | | |
| | | /** |
| | | * @description: æ·»å å·¥èºçº¿å°å®¢æ· |
| | | * @param {*} params |
| | | * @return {*} |
| | | */ |
| | | export const RouteToCust = async (params: {}) => { |
| | | const data = await defHttp.get( |
| | | { url: mesApi.RouteToCust, params: params }, |
| | | { |
| | | errorMessageMode: 'none', |
| | | isTransformResponse: false, |
| | | }, |
| | | ); |
| | | return data; |
| | | }; |
| | |
| | | import { Ref } from 'vue'; |
| | | import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; |
| | | import { ActionItem } from '/@/components/Table'; |
| | | //ç©æä¿¡æ¯å®ä½ |
| | | export type MaterialInfoParams = { |
| | | ITEM_CODE?: string; |
| | |
| | | export type MaterialInfoPageListGetResultModel = BasicFetchResult<MaterialInfoListItem>; |
| | | export type SupplierInfoPageListGetResultModel = BasicFetchResult<SupplierInfoListItem>; |
| | | export type PackageRulePageListGetResultModel = BasicFetchResult<PackageRuleListItem>; |
| | | |
| | | export interface EntityCustFunctionType { |
| | | CreateAction: (fnName: string) => {}; |
| | | ActionItem: (params: Recordable<any>, data, ...args) => ActionItem[]; |
| | | EditeOperation: (data: Ref<any[]>, d, u) => void; |
| | | GetHomeUrl: () => string; |
| | | GetBaseColumns: () => []; |
| | | GetSearchForm: () => []; |
| | | GetCrudForm: () => []; |
| | | GetBaseForm: () => []; |
| | | GetBaseCards: () => []; |
| | | OthersValues: (val: string, id: string) => {} |
| | | } |
| | |
| | | } |
| | | async function getListByPageAsync(params: any) { |
| | | const data = await defHttp.post( |
| | | { url: Api.QueryUrl, params,timeout:30000 }, |
| | | { url: Api.QueryUrl, params,timeout:50000 }, |
| | | { |
| | | isTransformResponse: false, |
| | | }, |
| | |
| | | const rowKey = ref(''); |
| | | const returnFieldName = ref(''); |
| | | const schemas = ref([] as FormSchema[]); |
| | | const which = ref(''); |
| | | |
| | | //å表 |
| | | const ItemColumns = ref([] as BasicColumn[]); |
| | |
| | | rowKey.value = data?.rowKey; |
| | | returnFieldName.value = data?.returnFieldName; |
| | | checkedKeys.value = []; |
| | | which.value = data?.which; |
| | | getForm().resetFields(); |
| | | reload(); |
| | | } |
| | |
| | | isUpdate: unref(false), |
| | | values: { val: record[rowKey.value], id: record['ID'] }, |
| | | returnFieldName: returnFieldName.value, |
| | | which: which.value, |
| | | }); |
| | | } finally { |
| | | setModalProps({ confirmLoading: false }); |
| | |
| | | isUpdate: unref(false), |
| | | values: { val: values, id: ids }, |
| | | returnFieldName: returnFieldName.value, |
| | | which: which.value, |
| | | }); |
| | | } finally { |
| | | setModalProps({ confirmLoading: false }); |
| | |
| | | onMounted(async () => { |
| | | buttons.value = (await getMenuButtons(currentRoute.value.meta.menuCode as string)).Data.Items; |
| | | const roles = useUserStore().getUserInfo.roles; |
| | | HasRole.value = roles.some((item) => item.MENU_CODE === buttons.value[0]['FUNC_CODE']); |
| | | const btnsByrole = buttons.value.filter((btn) => roles.some((item) => item.MENU_CODE === btn['FUNC_CODE'])); |
| | | }); |
| | | |
| | | /** |
| | | * @description: 跳转产åå·¥èºç»å®é¡µé¢ |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | function handleBinding(record: Recordable) { |
| | | const id = { |
| | | ID: record.ID, |
| | | Name: 'ProdRouteBinding', |
| | | CODE: record.ITEM_CODE, |
| | | Title: `产å[${record.ITEM_CODE}]å·¥èºç»å®`, |
| | | colSlots: [], |
| | | crudColSlots: [], |
| | | dense: true, |
| | | pageTitle: `产åå·¥èºç»å®`, |
| | | pageContent: `è¿éæ¯ç®¡ç产åçå·¥èºç»å®ï¼ä¸ä¸ªäº§åå¯ä»¥ç»å®å¤ä¸ªå·¥èºè·¯çº¿`, |
| | | }; |
| | | go(`/ProdRouteBinding/CP/${encodeURI(JSON.stringify(id))}`); |
| | | // let obj = JSON.stringify(id); |
| | | // push({ |
| | | // path: '/ProdRouteBinding', |
| | | // state: {obj}, //HTML5 History API çä¼ åï¼åæ°éèä¸å¨å°åæ æ¾ç¤ºï¼historyï¼ |
| | | // }) |
| | | } |
| | | </script> |
| | |
| | | * @version: |
| | | * @Date: 2024-06-20 12:13:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-21 15:37:05 |
| | | * @LastEditTime: 2024-06-24 10:56:19 |
| | | --> |
| | | <template> |
| | | <Card title="æä½"> |
| | |
| | | <script lang="ts" setup> |
| | | import { Card, CardGrid } from 'ant-design-vue'; |
| | | import Icon from '@/components/Icon/Icon.vue'; |
| | | import { RouteToProd } from '/@/api/tigerapi/mes/router'; |
| | | import { RouteToCust, RouteToProd } from '/@/api/tigerapi/mes/router'; |
| | | import GeneralModal from '/@/views/components/GeneralModal.vue'; |
| | | import { useModal } from '/@/components/Modal'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | |
| | | // }, |
| | | ]; |
| | | function changeItem(action) { |
| | | if (action == 'addRoute') { |
| | | openModal(true, { |
| | | title: 'å·¥èºè·¯çº¿å表', |
| | | schemas: [ |
| | |
| | | rowKey: 'ROT_CODE', |
| | | returnFieldName: 'ROUTE_CODE', //è¿åå¼è¦èµå¼çåæ®µåç§° |
| | | searchInfo: { TABLE_NAME: 'MES_ROUTE' }, |
| | | which: action, |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | async function handleSuccess(d, u) { |
| | | if(isNullOrEmpty(Prod_Code.value)){ |
| | | createErrorModal({ title: t('sys.api.errorTip'), content: '产å为空ï¼ä¸è½æ·»å å·¥èºè·¯çº¿ï¼è¯·ç¹å»å·¦ä¾§éæ©äº§å' }); |
| | | createErrorModal({ |
| | | title: t('sys.api.errorTip'), |
| | | content: '产å为空ï¼ä¸è½æ·»å å·¥èºè·¯çº¿ï¼è¯·ç¹å»å·¦ä¾§éæ©äº§å', |
| | | }); |
| | | return; |
| | | } |
| | | let codes = d.values.id.split(','); |
| | | var i; |
| | | for (i = 0; i < codes.length; i++) { |
| | | if (d.which == 'addRoute') { |
| | | await RouteToProd({ rotId: codes[i], prodCode: Prod_Code.value }); |
| | | } else { |
| | | await RouteToCust({ rotId: codes[i], prodCode: Prod_Code.value, custCode: '' }); |
| | | } |
| | | } |
| | | |
| | | await refreshPage(); |
| | |
| | | import GeneralModal from '/@/views/components/GeneralModal.vue'; |
| | | import RouteAction from './RouteAction.vue'; |
| | | import CustModal from '/@/views/components/CustModal.vue'; |
| | | import { OpenCustModal, getOthersValues } from '../data'; |
| | | import { OpenCustModal } from '../data'; |
| | | import { Ref, onMounted, provide, reactive, ref } from 'vue'; |
| | | import { useRoute } from 'vue-router'; |
| | | import { useDrawer } from '/@/components/Drawer'; |
| | |
| | | const dense = isNullOrUnDef(objParams.value.dense) ? ref(false) : ref(objParams.value.dense); |
| | | const pageTitle = ref(objParams.value.pageTitle); |
| | | const pageContent = ref(objParams.value.pageContent); |
| | | const others = ref(getOthersValues(entityName.value, objParams.value.CODE, objParams.value.ID)); |
| | | const prodCode = ref(''); |
| | | const rotType = ref(''); |
| | | const isMounted = ref(false); |
| | | const custImport = ref(null); |
| | | const custImport = ref<any>(null); |
| | | const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const [registerDrawer, { openDrawer }] = useDrawer(); |
| | | provide<Ref<string>>('prodCode', prodCode); |
| | | setTitle(objParams.value.Title); //设置æ ç¾é¡µæ é¢ |
| | | // const [registerTable, { reload }] = useTable({ |
| | | // title: 'å表信æ¯', |
| | | // api: getRoleListByPage, |
| | | // columns, |
| | | // formConfig: { |
| | | // labelWidth: 120, |
| | | // schemas: searchFormSchema, |
| | | // }, |
| | | // pagination: false, |
| | | // striped: false, |
| | | // useSearchForm: true, |
| | | // showTableSetting: true, |
| | | // bordered: true, |
| | | // showIndexColumn: false, |
| | | // canResize: false, |
| | | // actionColumn: { |
| | | // width: 80, |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // // slots: { customRender: 'action' }, |
| | | // fixed: undefined, |
| | | // }, |
| | | // }); |
| | | |
| | | /** |
| | | * @description: è·åæ å½¢æ°æ® |
| | |
| | | */ |
| | | async function fetch(type: string) { |
| | | if (!isNullOrUnDef(custImport.value)) { |
| | | const [{ fetchTreeData }] = custImport.value.default(); |
| | | const [{ fetchTreeData }] = custImport.value['default'](); |
| | | //æ ¹æ®typeè·åæ å½¢æ°æ® |
| | | const data = await fetchTreeData(type, objParams.value.CODE); |
| | | title.value = data.title; |
| | |
| | | */ |
| | | function goBack() { |
| | | if (!isNullOrUnDef(custImport.value)) { |
| | | const [{ GetHomeUrl }] = custImport.value.default(); |
| | | const [{ GetHomeUrl }] = custImport.value['default'](); |
| | | // æ¬ä¾çæææ¶ç¹å»è¿åå§ç»è·³è½¬å°è´¦å·å表页ï¼å®é
åºç¨æ¶å¯è¿åä¸ä¸é¡µ |
| | | go(GetHomeUrl(entityName.value)); |
| | | } |
| | |
| | | if (isNullOrUnDef(custImport.value)) { |
| | | return ''; |
| | | } else { |
| | | const [{CreateIcon}] = custImport.value.default(); |
| | | const [{CreateIcon}] = custImport.value['default'](); |
| | | return CreateIcon(params); |
| | | } |
| | | } |
| | |
| | | isMounted.value = true; |
| | | } catch (e) {} |
| | | }); |
| | | |
| | | /** |
| | | * @description: çæåè¡¨ä¸æä½é¡¹çæé® |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | function createActions(record) { |
| | | // return GetActionsData( |
| | | // { |
| | | // record, |
| | | // isUpdate: true, |
| | | // ifSave: true, |
| | | // entityName: entityName.value, |
| | | // formJson: getFormSchema(`${entityName.value}_Crud`), |
| | | // cType, |
| | | // dtlSlots, |
| | | // useModalData, |
| | | // useFormData, |
| | | // crudColSlots, |
| | | // }, |
| | | // openDrawer, |
| | | // reload, |
| | | // openCustomModal, |
| | | // useForm, |
| | | // useModal, |
| | | // ); |
| | | } |
| | | |
| | | /** |
| | | * @description: éªè¯è¡¨å |
| | | * @return {*} |
| | | */ |
| | | async function validate() { |
| | | let validates = {}; |
| | | const Keys = Object.getOwnPropertyNames(useFormData.value); |
| | | let i; |
| | | for (i = 0; i < Keys.length; i++) { |
| | | validates[Keys[i]] = await useFormData.value[Keys[i]][1].validate(); |
| | | } |
| | | return validates; |
| | | } |
| | | |
| | | // function handleEdit(record: Recordable) { |
| | | // openModal(true, { |
| | | // record, |
| | | // isUpdate: true, |
| | | // }); |
| | | // } |
| | | |
| | | // function handleDelete(record: Recordable) { |
| | | // console.log(record); |
| | | // } |
| | | |
| | | function handleSelect(deptId = '', info) { |
| | | searchInfo.deptId = deptId; |
| | |
| | | rotType.value = ''; |
| | | // reload(); |
| | | } |
| | | |
| | | // function handleSuccess() { |
| | | // reload(); |
| | | // } |
| | | |
| | | /** |
| | | * @description: å¼¹åºæ¡ç¡®å®è¿å |
| | |
| | | |
| | | onMounted(() => {}); |
| | | |
| | | /** |
| | | * @description: çæåè¡¨ä¸æä½é¡¹çæé® |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | function createActions(record) { |
| | | const params = { |
| | | record, |
| | |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'drawer', //drawer(æå¼å·¦ä¾§æ½å±æ¡) | go(è·³è½¬å°æ°ç页é¢) |
| | | }; |
| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-22 23:30:54 |
| | | * @LastEditTime: 2024-06-24 15:52:18 |
| | | */ |
| | | |
| | | import { ActionItem, BasicColumn } from '/@/components/Table'; |
| | |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'go', //drawer(æå¼å·¦ä¾§æ½å±æ¡) | go(è·³è½¬å°æ°ç页é¢) |
| | | url: 'BAS_DEFECT/High', |
| | |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'drawer', //drawer(æå¼å·¦ä¾§æ½å±æ¡) | go(è·³è½¬å°æ°ç页é¢) |
| | | }; |
| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-23 23:53:41 |
| | | * @LastEditTime: 2024-06-24 15:52:02 |
| | | */ |
| | | |
| | | import { ActionItem, BasicColumn } from '/@/components/Table'; |
| | |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'drawer', //drawer(æå¼å·¦ä¾§æ½å±æ¡) | go(è·³è½¬å°æ°ç页é¢) |
| | | }; |
| | |
| | | * @description: è·åæ°å¢æé®çè¡ä¸ºï¼å¿
éè¦æçæ¹æ³ |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'drawer', //drawer(æå¼å·¦ä¾§æ½å±æ¡) | go(è·³è½¬å°æ°ç页é¢) |
| | | }; |
| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-23 18:28:00 |
| | | * @LastEditTime: 2024-06-24 15:51:12 |
| | | */ |
| | | |
| | | import { Ref } from 'vue'; |
| | |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'drawer', //drawer(æå¼å·¦ä¾§æ½å±æ¡) | go(è·³è½¬å°æ°ç页é¢) |
| | | }; |
| | |
| | | * @return {*} |
| | | */ |
| | | ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => { |
| | | /* éåå 餿¹æ³ */ |
| | | data[1].popConfirm.confirm = custDel.bind(null, args, params); |
| | | return data; |
| | | }, |
| | |
| | | }, |
| | | ]; |
| | | }, |
| | | /** |
| | | * @description: é«çº§è¡¨å主信æ¯å¡ççæï¼å¯ä»¥å¤ä¸ª |
| | | * @return {*} |
| | | */ |
| | | GetBaseCards: () => { |
| | | return [ |
| | | { |
| | | name: 'BaseForm', |
| | | slots: [], |
| | | preIcons: {}, |
| | | slots: [], //å®ä¹ææ§½ |
| | | preIcons: {}, //å®ä¹ææ§½ä¸æé®å¾æ |
| | | title: 'å
è£
ä¿¡æ¯', |
| | | entityName: 'BAS_PKG_RULE', |
| | | entityName: 'BAS_PKG_RULE', //å®ä½åç§° |
| | | }, |
| | | ]; |
| | | }, |
| | |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'go', //drawer(æå¼å·¦ä¾§æ½å±æ¡) | go(è·³è½¬å°æ°ç页é¢) |
| | | url: 'BAS_PKG_DTL/High', |
| | |
| | | * @version: |
| | | * @Date: 2024-06-22 00:58:43 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-23 18:28:55 |
| | | * @LastEditTime: 2024-06-24 15:50:42 |
| | | */ |
| | | /* |
| | | * @Description: ä¸è¯åå ç¸å
³ |
| | |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'drawer', //drawer(æå¼å·¦ä¾§æ½å±æ¡) | go(è·³è½¬å°æ°ç页é¢) |
| | | }; |
| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-22 23:33:08 |
| | | * @LastEditTime: 2024-06-24 15:50:49 |
| | | */ |
| | | |
| | | import { ActionItem, BasicColumn } from '/@/components/Table'; |
| | |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'go', //drawer(æå¼å·¦ä¾§æ½å±æ¡) | go(è·³è½¬å°æ°ç页é¢) |
| | | url: 'BAS_REASON/High', |
| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-22 22:20:05 |
| | | * @LastEditTime: 2024-06-24 15:50:03 |
| | | */ |
| | | |
| | | import { ActionItem, BasicColumn } from '/@/components/Table'; |
| | |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'drawer', //drawer(æå¼å·¦ä¾§æ½å±æ¡) | go(è·³è½¬å°æ°ç页é¢) |
| | | }; |
| | |
| | | }, |
| | | ]; |
| | | }, |
| | | OthersValues: (val: string, id: string) => { |
| | | return { RSNG_CODE: val }; |
| | | }, |
| | | }; |
| | | |
| | | return [methods, ActionColumn]; |
| | |
| | | }); |
| | | }); |
| | | |
| | | /** |
| | | * @description: çæåè¡¨ä¸æä½é¡¹çæé® |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | function createActions(record) { |
| | | const params = { |
| | | record, |
| | |
| | | * @version: |
| | | * @Date: 2024-05-30 13:28:20 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-23 00:03:51 |
| | | * @LastEditTime: 2024-06-24 18:10:10 |
| | | --> |
| | | <template> |
| | | <div> |
| | | <BasicTable @register="registerTable" v-if="isMounted"> |
| | | <!-- <BasicTable @register="registerTable" v-if="isMounted"> |
| | | <template #toolbar> |
| | | <a-button type="primary" @click="handleCreate" preIcon="add_02|svg"> æ°å¢ </a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="handleCreate(item['DO_METHOD'])" |
| | | :preIcon="item['ICON_URL']" |
| | | v-for="item in buttons.filter((m) => m['BUTTON_TYPE'] == 0)" |
| | | :key="item" |
| | | > |
| | | {{ item['FUNC_NAME'] }} |
| | | </a-button> |
| | | </template> |
| | | <template #action="{ record }"> |
| | | <TableAction :actions="createActions(record)" /> |
| | | </template> |
| | | <template #[item]="{ field }" v-for="item in colSlots" :key="item"> |
| | | <!-- <template #form-BAS_REASON3aadd="{ field }"> --> |
| | | <a-button |
| | | v-if="field" |
| | | class="mt-1 ml-1" |
| | |
| | | /> |
| | | </template> |
| | | </BasicTable> |
| | | <normalDrawer @register="registerDrawer" @success="handleSuccess" /> |
| | | <normalDrawer @register="registerDrawer" @success="handleSuccess" /> --> |
| | | <Suspense> |
| | | <mainTable /> |
| | | </Suspense> |
| | | <CustModal |
| | | @register="registerCust" |
| | | @success="custSuccess" |
| | |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { h, onMounted, ref, unref } from 'vue'; |
| | | import { BasicTable, useTable, TableAction, BasicColumn, FormSchema } from '/@/components/Table'; |
| | | import { useDrawer } from '/@/components/Drawer'; |
| | | import normalDrawer from '../normalDrawer.vue'; |
| | | import { Ref, h, onMounted, provide, ref, unref } from 'vue'; |
| | | import mainTable from './mainTable.vue'; |
| | | import GeneralModal from '/@/views/components/GeneralModal.vue'; |
| | | import { DeleteEntity, GetEnum, getEntity, getListByPage } from '/@/api/tigerapi/system'; |
| | | import { useGlobSetting } from '/@/hooks/setting'; |
| | | import { useRoute } from 'vue-router'; |
| | | import { useRoute, useRouter } from 'vue-router'; |
| | | import { Tag, Tooltip } from 'ant-design-vue'; |
| | | import CustModal from '/@/views/components/CustModal.vue'; |
| | | import { BasicForm, useForm } from '/@/components/Form/index'; |
| | |
| | | import { uploadApi } from '/@/api/sys/upload'; |
| | | import { useGo } from '/@/hooks/web/usePage'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { getRoleButtons } from '/@/api/sys/menu'; |
| | | |
| | | const { getLocale } = useLocale(); |
| | | const { t } = useI18n(); |
| | | const route = useRoute(); |
| | | const { currentRoute } = useRouter(); |
| | | const go = useGo(); |
| | | const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); |
| | | const entityName = ref(objParams.value.ID); |
| | | const globSetting = useGlobSetting(); |
| | | const _columns = ref([]); |
| | | const _searchFormSchema = ref([]); |
| | | const _crudFormSchema = ref([]); |
| | | const formSchemas = ref({}); //å¼¹åºæ¡å¤è¡¨åç»æ |
| | | const useModalData = ref({}); //表åä¸ææ§½æ¸²ææé®æå¼æ¨¡ææ¡useModalæ¹æ³ |
| | | const useFormData = ref({}); |
| | | const colSlots = ref<any>(objParams.value.colSlots); //æé®ææ§½ |
| | | const crudColSlots = ref<any>(objParams.value.crudColSlots); |
| | | const cType = ref(''); |
| | | const dtlSlots = ref([] as any[]); |
| | | const selectVals = ref({}); |
| | | const isExistSql = ref(''); |
| | | const custImport = ref(null); |
| | | const custImport = ref<any>(null); |
| | | const isMounted = ref(false); |
| | | const buttons = ref([]); |
| | | const others = ref<any>(null); |
| | | provide<Ref<any>>('objParams', objParams.value); |
| | | provide<Ref<any[]>>('_columns', _columns); |
| | | provide<Ref<any[]>>('_searchFormSchema', _searchFormSchema); |
| | | provide<Ref<any[]>>('_crudFormSchema', _crudFormSchema); |
| | | provide<Ref<string>>('isExistSql', isExistSql); |
| | | provide<Ref<any>>('others', others); |
| | | |
| | | const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const [registerDrawer, { openDrawer }] = useDrawer(); |
| | | const [registerTable, { getForm, reload, setProps }] = useTable({ |
| | | title: 'å表信æ¯', |
| | | api: getListByPage, |
| | | searchInfo: { TABLE_NAME: objParams.value.ID }, |
| | | columns: _columns as unknown as BasicColumn[], |
| | | formConfig: { |
| | | labelWidth: 140, |
| | | schemas: _searchFormSchema as unknown as FormSchema[], |
| | | }, |
| | | useSearchForm: true, |
| | | showTableSetting: true, |
| | | bordered: true, |
| | | canResize: true, |
| | | showIndexColumn: false, |
| | | actionColumn: { |
| | | width: 130, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | slots: { customRender: 'action' }, |
| | | fixed: undefined, |
| | | }, //èªå®ä¹æä½å |
| | | }); |
| | | |
| | | /** |
| | | * @description: çæåè¡¨ä¸æä½é¡¹çæé® |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | function createActions(record) { |
| | | const params = { |
| | | record, |
| | | isUpdate: true, |
| | | entityName: objParams.value.ID, |
| | | formJson: _crudFormSchema.value, |
| | | cType, |
| | | dtlSlots, |
| | | formSchemas, |
| | | useModalData, |
| | | useFormData, |
| | | crudColSlots, |
| | | }; |
| | | const actionItem = [ |
| | | { |
| | | icon: 'clarity:note-edit-line', |
| | | onClick: editRecord.bind(null, openDrawer, params), |
| | | }, |
| | | { |
| | | icon: 'ant-design:delete-outlined', |
| | | color: 'error', |
| | | popConfirm: { |
| | | title: 'æ¯å¦ç¡®è®¤å é¤?', |
| | | placement: 'left', |
| | | confirm: deleteRecord.bind(null, reload, params), |
| | | }, |
| | | }, |
| | | ]; |
| | | if (isNullOrUnDef(custImport.value)) { |
| | | return actionItem; |
| | | } |
| | | const [{ ActionItem }] = custImport.value.default(); |
| | | return ActionItem( |
| | | params, |
| | | actionItem, |
| | | openDrawer, |
| | | reload, |
| | | openCustomModal, |
| | | useForm, |
| | | useModal, |
| | | go, |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * @description: å
¬ç¨ç¼è¾æ¹æ³ |
| | | * @param {Fn} fn |
| | | * @param {*} params |
| | | * @return {*} |
| | | */ |
| | | function editRecord(fn: Fn, params: {}) { |
| | | fn(true, params); |
| | | } |
| | | |
| | | /** |
| | | * @description: å
¬ç¨å 餿¹æ³ |
| | | * @param {Fn} fn |
| | | * @param {*} params |
| | | * @return {*} |
| | | */ |
| | | function deleteRecord(fn: Fn, params: {}) { |
| | | console.log(params['record']); |
| | | //å é¤ |
| | | DeleteEntity(params['record'], params['entityName']).then((action) => { |
| | | if (action.IsSuccessed) { |
| | | fn(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | function handleCreate() { |
| | | if (isNullOrUnDef(custImport.value)) { |
| | | openDrawer(true, { |
| | | isUpdate: false, |
| | | entityName: objParams.value.ID, |
| | | formJson: _crudFormSchema.value, |
| | | crudColSlots, |
| | | isExistSql: isExistSql.value, |
| | | }); |
| | | } else { |
| | | const [{ CreateAction }] = custImport.value.default(); |
| | | const result = CreateAction(objParams.value.ID); |
| | | switch (result.action) { |
| | | case 'go': |
| | | go(`/${result.url}/${encodeURI(JSON.stringify(result.params))}`); |
| | | break; |
| | | case 'drawer': |
| | | openDrawer(true, { |
| | | isUpdate: false, |
| | | entityName: objParams.value.ID, |
| | | formJson: _crudFormSchema.value, |
| | | crudColSlots, |
| | | isExistSql: isExistSql.value, |
| | | }); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | function handleSuccess() { |
| | | reload(); |
| | | } |
| | | |
| | | onMounted(async () => { |
| | | /* ç¨jsonè·åå */ |
| | |
| | | } |
| | | } |
| | | _columns.value = objs; |
| | | buttons.value = await getRoleButtons(currentRoute.value.meta.menuCode as string); |
| | | }); |
| | | |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡éæ©æååäºä»¶ |
| | | * @param {*} d |
| | | * @param {*} u |
| | | * @param {*} item |
| | | * @return {*} |
| | | */ |
| | | function handleItemSuccess(d, u, item) { |
| | | /* 卿importå®ä½å.tsçèªå®ä¹æ¹æ³ */ |
| | | try { |
| | | import( |
| | | /* @vite-ignore */ `../entityts/${getForm().getFieldsValue()[`${item.replace(/form-/, '').replace(/add/, '')}PSelect_0`]}` |
| | | ) |
| | | .then((m) => { |
| | | const [{ GetSelectSuccess }] = m.default(); |
| | | getForm().setFieldsValue(GetSelectSuccess(d, u)); |
| | | }) |
| | | .catch(() => { |
| | | getForm().setFieldsValue({ |
| | | ITEM_CODE: d.values['val'], |
| | | }); |
| | | }); |
| | | } catch (e) {} |
| | | } |
| | | |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡ |
| | | * @param {*} item |
| | | * @return {*} |
| | | */ |
| | | function handleSelectItem(item) { |
| | | /* 卿importå®ä½å.tsçèªå®ä¹æ¹æ³ */ |
| | | try { |
| | | import( |
| | | /* @vite-ignore */ `../entityts/${getForm().getFieldsValue()[`${item.replace(/form-/, '').replace(/add/, '')}PSelect_0`]}` |
| | | ) |
| | | .then((m) => { |
| | | const [{ OpenSelectItem }] = m.default(); |
| | | OpenSelectItem(openItemModal); |
| | | }) |
| | | .catch(() => { |
| | | openItemModal(true, { |
| | | title: 'ç©æå表', |
| | | schemas: [ |
| | | { |
| | | field: 'ITEM_CODE', |
| | | component: 'Input', |
| | | label: 'ç©æç¼ç ', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('ç©æç¼ç '), |
| | | dataIndex: 'ITEM_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('ç©æåç§°'), |
| | | dataIndex: 'ITEM_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_ITEM', |
| | | rowKey: 'ITEM_CODE', |
| | | searchInfo: { TABLE_NAME: 'BAS_ITEM' }, |
| | | }); |
| | | }); |
| | | } catch (e) {} |
| | | } |
| | | |
| | | /** |
| | | * @description: Select èªå®ä¹onChangeæ¹æ³ |
| | |
| | | |
| | | //å¼¹åºæ¡ç¡®å®è¿å |
| | | function custSuccess(d) { |
| | | reload(); |
| | | // reload(); |
| | | } |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <BasicTable @register="registerTable"> |
| | | <template #toolbar> |
| | | <a-button |
| | | type="primary" |
| | | @click="handleCreate(item['DO_METHOD'])" |
| | | :preIcon="item['ICON_URL']" |
| | | v-for="item in buttons.filter((m) => m['BUTTON_TYPE'] == 0)" |
| | | :key="item" |
| | | > |
| | | {{ item['FUNC_NAME'] }} |
| | | </a-button> |
| | | </template> |
| | | <template #action="{ record }"> |
| | | <TableAction :actions="createActions(record)" /> |
| | | </template> |
| | | <template #[item]="{ field }" v-for="item in colSlots" :key="item"> |
| | | <!-- <template #form-BAS_REASON3aadd="{ field }"> --> |
| | | <a-button |
| | | v-if="field" |
| | | class="mt-1 ml-1" |
| | | size="small" |
| | | @click="handleSelectItem(item)" |
| | | preIcon="search|svg" |
| | | /> |
| | | <GeneralModal |
| | | @register="registerItemAdd" |
| | | @success="(d, u) => handleItemSuccess(d, u, item)" |
| | | /> |
| | | </template> |
| | | </BasicTable> |
| | | <normalDrawer @register="registerDrawer" @success="handleSuccess" /> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { Ref, inject, nextTick, onMounted, ref, watch } from 'vue'; |
| | | import { |
| | | BasicTable, |
| | | useTable, |
| | | TableAction, |
| | | BasicColumn, |
| | | FormSchema, |
| | | ActionItem, |
| | | PopConfirm, |
| | | } from '/@/components/Table'; |
| | | import { BasicForm, useForm } from '/@/components/Form/index'; |
| | | import { useDrawer } from '/@/components/Drawer'; |
| | | import GeneralModal from '/@/views/components/GeneralModal.vue'; |
| | | import normalDrawer from '../normalDrawer.vue'; |
| | | import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is'; |
| | | import { useModal } from '/@/components/Modal'; |
| | | import { useGo } from '/@/hooks/web/usePage'; |
| | | import { DeleteEntity, getEntity, getListByPage } from '/@/api/tigerapi/system'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { EntityCustFunctionType } from '/@/api/tigerapi/model/basModel'; |
| | | import { getRoleButtons } from '/@/api/sys/menu'; |
| | | import { useRouter } from 'vue-router'; |
| | | |
| | | const { t } = useI18n(); |
| | | const { currentRoute } = useRouter(); |
| | | const props = defineProps({ |
| | | colSlots: { type: Array as PropType<any[]> }, |
| | | useTableData: { type: Object as PropType<{}>, default: { table: [] } }, |
| | | crudColSlots: { type: Object as PropType<any> }, |
| | | }); |
| | | const objParams = inject('objParams') as Ref<any>; |
| | | const _columns = inject('_columns') as Ref<any[]>; |
| | | const _searchFormSchema = inject('_searchFormSchema') as Ref<any[]>; |
| | | const _crudFormSchema = inject('_crudFormSchema') as Ref<any[]>; |
| | | const buttons = ref<[]>(await getRoleButtons(currentRoute.value.meta.menuCode as string)); |
| | | const isExistSql = inject('isExistSql') as Ref<string>; |
| | | const others = inject('others') as Ref<Recordable[]>; |
| | | const entityName = ref(objParams['ID']); |
| | | const go = useGo(); |
| | | const [registerDrawer, { openDrawer }] = useDrawer(); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const cType = ref(''); |
| | | const dtlSlots = ref([] as any[]); |
| | | const formSchemas = ref({}); //å¼¹åºæ¡å¤è¡¨åç»æ |
| | | const useModalData = ref({}); //表åä¸ææ§½æ¸²ææé®æå¼æ¨¡ææ¡useModalæ¹æ³ |
| | | const useFormData = ref({}); |
| | | const custImport = ref<any[]>([]); |
| | | const EntityCustFunction = ref([ |
| | | { |
| | | ActionItem(params, data, ...args) {}, |
| | | EditeOperation(data, d, u) {}, |
| | | GetBaseColumns() {}, |
| | | GetSearchForm() {}, |
| | | GetCrudForm() {}, |
| | | OthersValues(val, id) {}, |
| | | } as EntityCustFunctionType, |
| | | ]); |
| | | /* 卿importå®ä½å.tsçèªå®ä¹æ¹æ³ */ |
| | | try { |
| | | custImport.value = await import(/* @vite-ignore */ `../entityts/${objParams['ID']}`); |
| | | } catch (e) {} |
| | | const [ |
| | | { |
| | | ActionItem: nActionItem, |
| | | EditeOperation, |
| | | GetBaseColumns, |
| | | GetSearchForm, |
| | | GetCrudForm, |
| | | OthersValues, |
| | | }, |
| | | ] = isNullOrUnDef(custImport.value['default']) |
| | | ? EntityCustFunction.value |
| | | : custImport.value['default'](); |
| | | others.value = OthersValues(objParams['CODE'], objParams['ID']); |
| | | const [registerTable, { getForm, reload, setProps }] = useTable({ |
| | | title: 'å表信æ¯', |
| | | api: getListByPage, |
| | | searchInfo: { TABLE_NAME: objParams['ID'] }, |
| | | columns: _columns as unknown as BasicColumn[], |
| | | formConfig: { |
| | | labelWidth: 140, |
| | | schemas: _searchFormSchema as unknown as FormSchema[], |
| | | }, |
| | | useSearchForm: true, |
| | | showTableSetting: true, |
| | | bordered: true, |
| | | canResize: true, |
| | | showIndexColumn: false, |
| | | actionColumn: { |
| | | width: 130, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | slots: { customRender: 'action' }, |
| | | fixed: undefined, |
| | | }, //èªå®ä¹æä½å |
| | | }); |
| | | |
| | | onMounted(() => {}); |
| | | |
| | | /** |
| | | * @description: çæåè¡¨ä¸æä½é¡¹çæé® |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | function createActions(record) { |
| | | const params = { |
| | | record, |
| | | isUpdate: true, |
| | | entityName: objParams['ID'], |
| | | formJson: _crudFormSchema.value, |
| | | cType, |
| | | dtlSlots, |
| | | formSchemas, |
| | | useModalData, |
| | | useFormData, |
| | | crudColSlots: objParams['crudColSlots'], |
| | | }; |
| | | |
| | | const actionItem = GenerateActionButton(params); |
| | | if (isNullOrUnDef(custImport.value['default'])) { |
| | | return actionItem; |
| | | } |
| | | return nActionItem( |
| | | params, |
| | | actionItem, |
| | | openDrawer, |
| | | reload, |
| | | null, |
| | | useForm, |
| | | useModal, |
| | | go, |
| | | setProps, |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * @description: è·åæéæé®å表 |
| | | * @param {*} params |
| | | * @return {*} |
| | | */ |
| | | function GenerateActionButton(params: any) { |
| | | let actionItem = [] as ActionItem[]; |
| | | buttons.value.map((x) => { |
| | | if (x['BUTTON_TYPE'] == 1) { |
| | | let url = ''; |
| | | let color = undefined as 'success' | 'error' | 'warning' | undefined; |
| | | let _click = null as any; |
| | | let _popConfirm = undefined as PopConfirm | undefined; |
| | | if (x['DO_METHOD'] == 'Edit') { |
| | | url = 'clarity:note-edit-line'; |
| | | _click = editRecord.bind(null, openDrawer, params); |
| | | } else { |
| | | _click = x['ICON_URL']; |
| | | if (x['DO_METHOD'] == 'Delete') { |
| | | url = 'ant-design:delete-outlined'; |
| | | color = 'error'; |
| | | _popConfirm = { |
| | | title: 'æ¯å¦ç¡®è®¤å é¤?', |
| | | placement: 'left', |
| | | confirm: deleteRecord.bind(null, reload, params), |
| | | }; |
| | | } |
| | | } |
| | | actionItem.push({ |
| | | icon: isNullOrEmpty(x['ICON_URL']) ? url : x['ICON_URL'], |
| | | onClick: _click, |
| | | color: color, |
| | | popConfirm: _popConfirm, |
| | | }); |
| | | } |
| | | }); |
| | | return actionItem; |
| | | } |
| | | |
| | | /** |
| | | * @description: å
¬ç¨ç¼è¾æ¹æ³ |
| | | * @param {Fn} fn |
| | | * @param {*} params |
| | | * @return {*} |
| | | */ |
| | | function editRecord(fn: Fn, params: {}) { |
| | | fn(true, params); |
| | | } |
| | | |
| | | /** |
| | | * @description: å
¬ç¨å 餿¹æ³ |
| | | * @param {Fn} fn |
| | | * @param {*} params |
| | | * @return {*} |
| | | */ |
| | | function deleteRecord(fn: Fn, params: {}) { |
| | | console.log(params['record']); |
| | | //å é¤ |
| | | DeleteEntity(params['record'], params['entityName']).then((action) => { |
| | | if (action.IsSuccessed) { |
| | | fn(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @description: è·åæ°å¢æé®çè¡ä¸º |
| | | * @return {*} |
| | | */ |
| | | function handleCreate(fnName: string) { |
| | | if (isNullOrUnDef(custImport.value['default'])) { |
| | | openDrawer(true, { |
| | | isUpdate: false, |
| | | entityName: entityName.value, |
| | | formJson: _crudFormSchema.value, |
| | | crudColSlots: objParams['crudColSlots'], |
| | | isExistSql: isExistSql.value, |
| | | }); |
| | | } else { |
| | | const [{ CreateAction }] = custImport.value['default'](); |
| | | const result = CreateAction(fnName); |
| | | switch (result.action) { |
| | | case 'go': |
| | | go(`/${result.url}/${encodeURI(JSON.stringify(result.params))}`); |
| | | break; |
| | | case 'drawer': |
| | | openDrawer(true, { |
| | | isUpdate: false, |
| | | entityName: objParams.value.ID, |
| | | formJson: _crudFormSchema.value, |
| | | crudColSlots: objParams['crudColSlots'], |
| | | isExistSql: isExistSql.value, |
| | | }); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: æ°å¢ç¼è¾è¿åæåæ¹æ³ |
| | | * @param {*} d |
| | | * @param {*} u |
| | | * @return {*} |
| | | */ |
| | | function handleSuccess(d, u) { |
| | | reload(); |
| | | } |
| | | |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡éæ©æååäºä»¶ |
| | | * @param {*} d |
| | | * @param {*} u |
| | | * @param {*} item |
| | | * @return {*} |
| | | */ |
| | | function handleItemSuccess(d, u, item) { |
| | | /* 卿importå®ä½å.tsçèªå®ä¹æ¹æ³ */ |
| | | try { |
| | | import( |
| | | /* @vite-ignore */ `../entityts/${getForm().getFieldsValue()[`${item.replace(/form-/, '').replace(/add/, '')}PSelect_0`]}` |
| | | ) |
| | | .then((m) => { |
| | | const [{ GetSelectSuccess }] = m.default(); |
| | | getForm().setFieldsValue(GetSelectSuccess(d, u)); |
| | | }) |
| | | .catch(() => { |
| | | getForm().setFieldsValue({ |
| | | ITEM_CODE: d.values['val'], |
| | | }); |
| | | }); |
| | | } catch (e) {} |
| | | } |
| | | |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡ |
| | | * @param {*} item |
| | | * @return {*} |
| | | */ |
| | | function handleSelectItem(item) { |
| | | /* 卿importå®ä½å.tsçèªå®ä¹æ¹æ³ */ |
| | | try { |
| | | import( |
| | | /* @vite-ignore */ `../entityts/${getForm().getFieldsValue()[`${item.replace(/form-/, '').replace(/add/, '')}PSelect_0`]}` |
| | | ) |
| | | .then((m) => { |
| | | const [{ OpenSelectItem }] = m.default(); |
| | | OpenSelectItem(openItemModal); |
| | | }) |
| | | .catch(() => { |
| | | openItemModal(true, { |
| | | title: 'ç©æå表', |
| | | schemas: [ |
| | | { |
| | | field: 'ITEM_CODE', |
| | | component: 'Input', |
| | | label: 'ç©æç¼ç ', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('ç©æç¼ç '), |
| | | dataIndex: 'ITEM_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('ç©æåç§°'), |
| | | dataIndex: 'ITEM_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_ITEM', |
| | | rowKey: 'ITEM_CODE', |
| | | searchInfo: { TABLE_NAME: 'BAS_ITEM' }, |
| | | }); |
| | | }); |
| | | } catch (e) {} |
| | | } |
| | | </script> |
| | |
| | | dataIndex: 'btnType', |
| | | ifShow: false, |
| | | }, |
| | | { |
| | | title: 'æ§è¡æ¹æ³', |
| | | dataIndex: 'doMethod', |
| | | ifShow: false, |
| | | }, |
| | | ]; |
| | | |
| | | const isDir = (type: string) => type === '0'; |
| | |
| | | label: '徿 ', |
| | | component: 'IconPicker', |
| | | required: ({ values }) => isDir(values.func_type), |
| | | ifShow: ({ values }) => !isButton(values.func_type), |
| | | ifShow: ({ values }) => true, //!isButton(values.func_type), |
| | | }, |
| | | |
| | | { |
| | |
| | | ifShow: ({ values }) => isButton(values.func_type), |
| | | }, |
| | | { |
| | | field: 'doMethod', |
| | | label: 'æ§è¡æ¹æ³å', |
| | | component: 'Input', |
| | | ifShow: ({ values }) => isButton(values.func_type), |
| | | }, |
| | | { |
| | | field: 'func_code', |
| | | label: 'æéæ è¯', |
| | | component: 'Input', |