From 3bf0e1e45acfb85fb6054dc55d1c1204a6750998 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 24 九月 2024 23:53:53 +0800 Subject: [PATCH] 通用增删改模态窗口更新,工单维护更新 --- src/views/components/GeneralTree.vue | 5 src/api/tigerapi/mes/mesApi.ts | 4 src/api/tigerapi/mes/wo.ts | 17 + src/views/tigerprojects/system/lowcode/composition/Config.vue | 89 ++++-- src/assets/icons/template.svg | 1 src/views/tigerprojects/system/lowcode/high/edit/editdtl.vue | 4 src/views/demo/table/EditRowTable.vue | 3 src/views/tigerprojects/system/lowcode/entityts/ProdRouteBinding.ts | 23 + src/views/components/GeneralModal.vue | 5 src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO.ts | 15 + src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts | 267 +++++++++++++++++--- src/views/tigerprojects/system/lowcode/normal/mainTable.vue | 8 src/api/tigerapi/system.ts | 33 +- src/views/components/GeneralCrudModal.vue | 279 +++++++++++++++++++++ 14 files changed, 641 insertions(+), 112 deletions(-) diff --git a/src/api/tigerapi/mes/mesApi.ts b/src/api/tigerapi/mes/mesApi.ts index bcd4887..f2dd2d2 100644 --- a/src/api/tigerapi/mes/mesApi.ts +++ b/src/api/tigerapi/mes/mesApi.ts @@ -4,7 +4,7 @@ * @version: * @Date: 2024-04-27 15:54:50 * @LastEditors: Ben Lin - * @LastEditTime: 2024-09-11 23:13:42 + * @LastEditTime: 2024-09-22 18:30:58 */ export enum mesApi { GetRoute = '/MES/GetRoute', @@ -35,4 +35,6 @@ UpdateWoBatchStatus = '/MES/UpdateWoBatchStatus', SaveLabelTemplate = '/MES/SaveLabelTemplate', DeleteLabelTemplate = '/MES/DeleteLabelTemplate', + AddOrEditLabelVarByWorkOrder = '/MES/AddOrEditLabelVarByWorkOrder', + GetLabelVarByWorkOrder = '/MES/GetLabelVarByWorkOrder', } diff --git a/src/api/tigerapi/mes/wo.ts b/src/api/tigerapi/mes/wo.ts index ab321b3..7a685fe 100644 --- a/src/api/tigerapi/mes/wo.ts +++ b/src/api/tigerapi/mes/wo.ts @@ -6,6 +6,7 @@ BIZ_MES_WO, SaveWoBatchInput, BizMesWoInput, + BAS_LABEL_VAR_WO, } from '../model/mesModel'; import { genAction, Api, genActionPage } from '../system'; import { defHttp } from '/@/utils/http/axios'; @@ -129,3 +130,19 @@ }, ); }; + +/** + * @description: 淇敼宸ュ崟妯℃澘鍙橀噺 + * @param {BAS_LABEL_VAR_WO} params + * @return {*} + */ +export const AddOrEditLabelVarByWorkOrder = async (params: BAS_LABEL_VAR_WO) => { + const data = await defHttp.post( + { url: mesApi.AddOrEditLabelVarByWorkOrder, params: genAction('', params) }, + { + errorMessageMode: 'none', + isTransformResponse: false, + }, + ); + return data; +}; diff --git a/src/api/tigerapi/system.ts b/src/api/tigerapi/system.ts index 6903b0a..75ce889 100644 --- a/src/api/tigerapi/system.ts +++ b/src/api/tigerapi/system.ts @@ -715,24 +715,26 @@ } const rParams = genAction( params['TABLE_NAME'], - { - QueryAble_T: '', - where: sqlcmd, - order: order, - page: { - pageAble_T: 'string', - draw: 1, - pageIndex: params['page'], - pageSize: params['pageSize'], - }, - }, + !isNullOrEmpty(params['apiUrl']) + ? params + : { + QueryAble_T: '', + where: sqlcmd, + order: order, + page: { + pageAble_T: 'string', + draw: 1, + pageIndex: params['page'], + pageSize: params['pageSize'], + }, + }, params['option'], ); - return getListByPageAsync(rParams); + return getListByPageAsync(rParams, params['apiUrl']); //濡傛灉涓嶆兂鐢ㄩ粯璁ょ殑鍩虹鏂规硶鑾峰彇鍒嗛〉鏁版嵁锛屽彲浠ユ崲鍏朵粬鐨刟pi } -async function getListByPageAsync(params: any) { +async function getListByPageAsync(params: any, apiUrl: string | null | undefined) { const data = await defHttp.post( - { url: Api.QueryUrl, params, timeout: 50000 }, + { url: !isNullOrEmpty(apiUrl) ? apiUrl : Api.QueryUrl, params, timeout: 50000 }, { isTransformResponse: false, }, @@ -763,6 +765,7 @@ Keys[k] != 'field' && Keys[k] != 'option' && Keys[k] != '0' && + Keys[k] != 'apiUrl' && !Keys[k].toString().endsWith('PSelect_0') ) { if (!isNullOrEmpty(params[Keys[k]].length) && isTimeViaRegExp8601(params[Keys[k]][0])) { @@ -770,6 +773,8 @@ sqlcmd += ` And ${Keys[k]} < '${params[Keys[k]][1]}'`; } else if (isNumber(params[Keys[k]])) { sqlcmd += `And ${Keys[k]} = ${params[Keys[k]]}`; + } else if (Keys[k] == 'sqlcmd') { + sqlcmd += ` And ${params[Keys[k]]}`; } else { sqlcmd += `And ${Keys[k]} like '%${params[Keys[k]]}%'`; } diff --git a/src/assets/icons/template.svg b/src/assets/icons/template.svg new file mode 100644 index 0000000..dff9ac8 --- /dev/null +++ b/src/assets/icons/template.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726924381855" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17051" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M0 0v1024h1024V0z m965.485714 965.485714H58.514286V204.8h906.971428z m0-819.2H58.514286V58.514286h906.971428zM468.114286 263.314286H146.285714v292.571428h321.828572z m-58.514286 234.057143H204.8v-175.542858h204.8z m380.342857-175.542858h-263.314286v58.514286h263.314286z m87.771429 117.028572H526.628571v58.514286h351.085715z m-409.6 175.542857H146.285714v292.571429h321.828572z m-58.514286 234.057143H204.8v-175.542857h204.8z m380.342857-175.542857h-263.314286v58.514285h263.314286z m87.771429 117.028571H526.628571v58.514286h351.085715z" p-id="17052" fill="#182991"></path></svg> \ No newline at end of file diff --git a/src/views/components/GeneralCrudModal.vue b/src/views/components/GeneralCrudModal.vue new file mode 100644 index 0000000..9defb6e --- /dev/null +++ b/src/views/components/GeneralCrudModal.vue @@ -0,0 +1,279 @@ +<template> + <BasicModal + :width="width" + :height="650" + v-bind="$attrs" + @register="register" + :title="title" + @ok="handleSubmit" + > + <div> + <BasicTable @register="registerTable" @edit-change="onEditChange"> + <template #toolbar> + <a-button @click="openImg" type="primary"> 棰勮 </a-button> + </template> + <template #bodyCell="{ column, record }"> + <template v-if="column.key === 'action'"> + <TableAction :actions="createActions(record)" /> + </template> + </template> + </BasicTable> + </div> + </BasicModal> +</template> +<script lang="ts" setup> + import { ref, unref } from 'vue'; + import { BasicModal, useModalInner } from '/@/components/Modal'; + import { FormSchema } from '/@/components/Form/index'; + import { + BasicTable, + BasicColumn, + TableAction, + useTable, + EditRecordRow, + ActionItem, + } from '/@/components/Table'; + import { useI18n } from '/@/hooks/web/useI18n'; + import { createImgPreview } from '/@/components/Preview'; + import { getListByPage, SaveEntity } from '/@/api/tigerapi/system'; + import { useMessage } from '/@/hooks/web/useMessage'; + import { cloneDeep, isFunction } from 'lodash-es'; + import { isNullOrUnDef } from '/@/utils/is'; + import { CustModalParams } from '/@/api/tigerapi/model/systemModel'; + import { EntityCustFunctionType } from '/@/api/tigerapi/model/basModel'; + + const { t } = useI18n(); + const title = ref(''); + const tableName = ref(''); + const rowKey = ref(''); + const returnFieldName = ref(''); + const schemas = ref([] as FormSchema[]); + const which = ref(''); + const width = ref(''); + const entityName = ref(''); + const ctype = ref(''); + const others = ref({}); + + //鍒楄〃 + const ItemColumns = ref([] as BasicColumn[]); + const searchInfo = ref({}); + + const emit = defineEmits(['success', 'register']); + const [registerTable, { setProps, getDataSource, reload }] = useTable({ + title: '鍒楄〃淇℃伅', + api: getListByPage, + searchInfo: searchInfo, + columns: ItemColumns, + scroll: { y: 600 }, + formConfig: { + labelWidth: 140, + schemas: schemas.value, + // submitFunc: () => Search('BAS_LABEL_VAR_WO', data, args[0]), //鑷畾涔夋煡璇㈡彁浜ゆ寜閽殑鏂规硶锛岃Е鍙戞煡璇㈡彁浜や簨浠� + }, + useSearchForm: false, + showTableSetting: false, + bordered: true, + canResize: false, + showIndexColumn: false, + actionColumn: { + width: 130, + title: '鎿嶄綔', + dataIndex: 'action', + fixed: 'right', + }, //鑷畾涔夋搷浣滃垪 + }); + const { createMessage: msg } = useMessage(); + const currentEditKeyRef = ref(''); + const custImport = ref<any[]>([]); + const EntityCustFunction = ref([ + { + ActionItem(params, data, ...args) {}, + KeyFieldValues(val, id) {}, + OpenSelectItem(openItemModal: Fn, ...args) {}, + GetSelectSuccess(d, u, ...args) {}, + GetUseForm(...args) {}, + CustFunc(param: CustModalParams) {}, + } as EntityCustFunctionType, + ]); + const [register, { setModalProps, closeModal }] = useModalInner((data) => { + setModalProps({ confirmLoading: false }); + setProps({ + dataSource: [], + }); + data && onDataReceive(data); + }); + + const imgList: any[] = []; //['http://localhost:8800/files/Template/10浣嶆壒娆℃潯鐮�.png']; + function openImg() { + let dataSource: any[] = getDataSource(); + const onImgLoad = ({ index, url, dom }) => { + console.log(`绗�${index + 1}寮犲浘鐗囧凡鍔犺浇锛孶RL涓猴細${url}`, dom); + }; + // 鍙互浣跨敤createImgPreview杩斿洖鐨� PreviewActions 鏉ユ帶鍒堕瑙堥�昏緫锛屽疄鐜扮被浼煎够鐏墖銆佽嚜鍔ㄦ棆杞箣绫荤殑楠氭搷浣� + createImgPreview({ imageList: [dataSource[0].LABEL_VIEW_PATH], defaultWidth: 700, rememberState: true, onImgLoad }); + } + + async function onDataReceive(data) { + currentEditKeyRef.value = ''; + console.log('Data Received', data); + // 鏂瑰紡1; + // setFieldsValue({ + // field2: data.data, + // field1: data.info, + // }); + searchInfo.value = data?.searchInfo; + title.value = data?.title; + schemas.value = data?.schemas; + ItemColumns.value = data?.ItemColumns; + width.value = data?.width; //寮规瀹藉害 + tableName.value = data?.tableName; + rowKey.value = data?.rowKey; + returnFieldName.value = data?.returnFieldName; + which.value = data?.which; + entityName.value = data?.entityName; + ctype.value = data?.ctype; + others.value = data?.others; + // getForm().resetFields(); + /* 鍔ㄦ�乮mport瀹炰綋鍚�.ts鐨勮嚜瀹氫箟鏂规硶 */ + try { + custImport.value = await import( + `../tigerprojects/system/lowcode/entityts/${entityName.value}.ts` + ); + } catch (e) {} + reload(); + } + + /** + * @description: 缂栬緫琛� + * @param {*} record + * @return {*} + */ + function handleEdit(record: EditRecordRow) { + currentEditKeyRef.value = record.key; + record.onEdit?.(true); + } + + /** + * @description: 鍙栨秷缂栬緫 + * @param {*} record + * @return {*} + */ + function handleCancel(record: EditRecordRow) { + currentEditKeyRef.value = ''; + record.onEdit?.(false, false); + } + + /** + * @description: 鐢熸垚鎸夐挳 + * @param {*} record + * @return {*} + */ + function createActions(record: EditRecordRow): ActionItem[] { + if (!record.editable) { + return [ + { + label: '缂栬緫', + disabled: currentEditKeyRef.value ? currentEditKeyRef.value !== record.key : false, + onClick: handleEdit.bind(null, record), + name: '', + }, + ]; + } + return [ + { + label: '淇濆瓨', + onClick: handleSave.bind(null, record), + name: '', + }, + { + label: '鍙栨秷', + popConfirm: { + title: '鏄惁鍙栨秷缂栬緫', + confirm: handleCancel.bind(null, record), + }, + name: '', + }, + ]; + } + + /** + * @description: 淇濆瓨鎿嶄綔 + * @param {*} record + * @return {*} + */ + async function handleSave(record: EditRecordRow) { + // 鏍¢獙 + msg.loading({ content: '姝e湪淇濆瓨...', duration: 0, key: 'saving' }); + const valid = await record.onValid?.(); + if (valid) { + try { + const data = cloneDeep(record.editValueRefs); + console.log(data); + //TODO 姝ゅ灏嗘暟鎹彁浜ょ粰鏈嶅姟鍣ㄤ繚瀛� + const [{ CustFunc }, ActionColumn] = isNullOrUnDef(custImport.value['default']) + ? EntityCustFunction.value + : custImport.value['default'](); + if (CustFunc && isFunction(CustFunc)) { + CustFunc({ + others: others.value, + ctype: ctype.value, + values: record, + }); + } else { + /* 榛樿淇濆瓨鏂规硶 */ + const action = await SaveEntity( + record, + true, + unref(entityName), + // `${isExistSql.value}='${values[isExistSql.value]}'`, + ); + } + // 淇濆瓨涔嬪悗鎻愪氦缂栬緫鐘舵�� + const pass = await record.onEdit?.(false, true); + if (pass) { + currentEditKeyRef.value = ''; + } + msg.success({ content: t('鏁版嵁宸蹭繚瀛�'), key: 'saving' }); + } catch (error) { + msg.error({ content: t('淇濆瓨澶辫触'), key: 'saving' }); + } + } else { + msg.error({ content: t('璇峰~鍐欐纭殑鏁版嵁'), key: 'saving' }); + } + } + + /** + * @description: 缂栬緫鏀瑰彉鏃朵簨浠� + * @param {*} column + * @param {*} value + * @param {*} record + * @return {*} + */ + function onEditChange({ column, value, record }) { + // 鏈緥 + if (column.dataIndex === 'id') { + record.editValueRefs.name4.value = `${value}`; + } + console.log(column, value, record); + } + + /** + * @description: 瀹屾垚鎻愪氦 + * @return {*} + */ + async function handleSubmit() { + try { + var values = ''; + var ids = ''; + closeModal(); + emit('success', { + isUpdate: unref(false), + values: { val: values, id: ids }, + returnFieldName: returnFieldName.value, + which: which.value, + }); + } finally { + setModalProps({ confirmLoading: false }); + } + } +</script> diff --git a/src/views/components/GeneralModal.vue b/src/views/components/GeneralModal.vue index 0daed62..5f1556b 100644 --- a/src/views/components/GeneralModal.vue +++ b/src/views/components/GeneralModal.vue @@ -49,14 +49,13 @@ columns: ItemColumns, formConfig: { labelWidth: 120, - schemas, + schemas: schemas.value, }, useSearchForm: true, showTableSetting: false, rowKey: rowKey, rowSelection: { - selectedRowKeys: checkedKeys, - + selectedRowKeys: checkedKeys.value, type: 'checkbox', // getCheckboxProps(record: Recordable) { // // Demo: 绗竴琛岋紙id涓�0锛夌殑閫夋嫨妗嗙鐢� diff --git a/src/views/components/GeneralTree.vue b/src/views/components/GeneralTree.vue index 5cc2a74..f69163d 100644 --- a/src/views/components/GeneralTree.vue +++ b/src/views/components/GeneralTree.vue @@ -4,7 +4,7 @@ * @version: * @Date: 2024-06-19 11:07:21 * @LastEditors: Ben Lin - * @LastEditTime: 2024-07-23 21:29:52 + * @LastEditTime: 2024-09-22 00:19:36 --> <template> <div class="m-4 mr-0 overflow-hidden bg-white"> @@ -14,7 +14,7 @@ search :add="add" treeWrapperClassName="h-[calc(100%-35px)] overflow-auto" - :clickRowToExpand="false" + :clickRowToExpand="true" :treeData="treeData" :renderIcon="createIcon" :fieldNames="fieldNames" @@ -22,6 +22,7 @@ @handleAdd="handleAdd" @unselect="UnSelect" :beforeRightClick="props.beforeRightClick" + :defaultExpandAll="true" /> </div> </template> diff --git a/src/views/demo/table/EditRowTable.vue b/src/views/demo/table/EditRowTable.vue index c98ea94..fb33ab9 100644 --- a/src/views/demo/table/EditRowTable.vue +++ b/src/views/demo/table/EditRowTable.vue @@ -282,6 +282,7 @@ label: '缂栬緫', disabled: currentEditKeyRef.value ? currentEditKeyRef.value !== record.key : false, onClick: handleEdit.bind(null, record), + name: '' }, ]; } @@ -289,6 +290,7 @@ { label: '淇濆瓨', onClick: handleSave.bind(null, record), + name: '' }, { label: '鍙栨秷', @@ -296,6 +298,7 @@ title: '鏄惁鍙栨秷缂栬緫', confirm: handleCancel.bind(null, record), }, + name: '' }, ]; } diff --git a/src/views/tigerprojects/system/lowcode/composition/Config.vue b/src/views/tigerprojects/system/lowcode/composition/Config.vue index 15bbf82..4860523 100644 --- a/src/views/tigerprojects/system/lowcode/composition/Config.vue +++ b/src/views/tigerprojects/system/lowcode/composition/Config.vue @@ -4,66 +4,71 @@ * @version: * @Date: 2024-06-24 23:44:31 * @LastEditors: Ben Lin - * @LastEditTime: 2024-08-09 16:49:10 + * @LastEditTime: 2024-09-23 01:57:00 --> <template> - <Card :title="GetTitle(props.configType)['configTitle']"> + <Card :title="GetTitle(configType)['configTitle']"> <BasicForm @register="useForms[d]" @submit="customSubmitFunc" v-for="d in Object.keys(useForms)" :key="d" - v-show="d == props.configType" + v-show="d == configType" > - <template #[item]="{ field }" v-for="item in GetCrudColSlots()" :key="item"> + <template #[item.name]="{ field }" v-for="item in GetCrudColSlots()" :key="item.name"> <a-button v-if="field" class="mt-1 ml-1" size="small" - @click="SelectItemInForm(item)" - preIcon="search|svg" + @click="SelectItemInForm(item.name)" + :preIcon="item.icon" /> <GeneralModal - @register="useModalData[item][0]" - @success="(d, u) => SelectInFormSuccess(d, u, item)" + @register="useModalData[item.name][0]" + @success="(d, u) => SelectInFormSuccess(d, u, item.name)" /> + <GeneralCrudModal @register="useModalsCrudInForm[item.name][0]"></GeneralCrudModal> </template> </BasicForm> </Card> <Card - :title="GetTitle(props.configType, item)['tableTitle']" + :title="GetTitle(configType, item)['tableTitle']" :bordered="false" class="!mt-5" v-for="item in OtherTables" :key="item" - v-show="showOtherTable[item]"> - <BasicTable @register="useTables[item][0]" - v-if="showOtherTable[item]"> + v-show="showOtherTable[item]" + > + <BasicTable @register="useTables[item][0]" v-if="showOtherTable[item]"> <template #action="{ record }"> <TableAction :actions="createActions(record, item)" /> </template> </BasicTable> - <normalDrawer @register="useDrawers[item][0]" @success="(d,u) => EditSuccess(d, u, item)" /> + <normalDrawer @register="useDrawers[item][0]" @success="(d, u) => EditSuccess(d, u, item)" /> + <GeneralCrudModal @register="useModalsCrud[item][0]"></GeneralCrudModal> </Card> </template> <script lang="ts" setup> - import { Ref, inject, nextTick, onMounted, ref, unref, watch } from 'vue'; + import { Ref, inject, nextTick, onMounted, ref, toRef, toRefs, unref, watch } from 'vue'; import { BasicForm } from '/@/components/Form/index'; import { BasicTable, TableAction } from '/@/components/Table'; import { Card } from 'ant-design-vue'; import GeneralModal from '/@/views/components/GeneralModal.vue'; + import GeneralCrudModal from '/@/views/components/GeneralCrudModal.vue'; import { useI18n } from '/@/hooks/web/useI18n'; import { isFunction, isNullOrUnDef } from '/@/utils/is'; import { EntityCustFunctionType } from '/@/api/tigerapi/model/basModel'; import { editRecord } from '../data'; import { useDrawer } from '/@/components/Drawer'; import normalDrawer from '../normalDrawer.vue'; + import { useModal } from '/@/components/Modal'; const { t } = useI18n(); const emit = defineEmits(['success', 'register']); const props = defineProps({ configType: { type: String }, }); + const configType = toRef(props, 'configType'); const showOtherTable = ref<any>({}); //鏄剧ず琛ㄦ牸甯冨皵瀵硅薄 const objParams = inject('objParams') as Ref<any>; const custImport = ref<any[]>([]); @@ -102,6 +107,8 @@ GetUseTables, GetUseForm, CustFunc, + GetUseCrudModals, + ActionItem, }, ] = isNullOrUnDef(custImport.value['default']) ? EntityCustFunction.value @@ -112,11 +119,14 @@ const useTables = ref(GetUseTables(data, emit)); const useForms = ref(GetUseForm()); const useDrawers = ref({}); + const useModalsCrud = ref({}); + const useModalsCrudInForm = ref(GetUseCrudModals()); const OtherTables = ref(objParams.value['OtherTableName']); /* 寰幆鑷畾涔夎〃鏍煎悕鍒楄〃锛屽垵濮嬪寲鏄剧ず琛ㄦ牸甯冨皵瀵硅薄 */ objParams.value['OtherTableName'].forEach((x) => { showOtherTable.value[x] = false; useDrawers.value[x] = useDrawer(); + useModalsCrud.value[x] = useModal(); }); /* 娉ㄥ叆閫変腑鑺傜偣鏁版嵁 */ @@ -148,12 +158,12 @@ }, 10); setTimeout(() => { if (!isNullOrUnDef(name)) { - // useTables.value[name][1].setProps({ - // dataSource: [], - // }); - // useTables.value[name][1].setProps({ - // dataSource: data.value[name], - // }); + // useTables.value[name][1].setProps({ + // dataSource: [], + // }); + // useTables.value[name][1].setProps({ + // dataSource: data.value[name], + // }); useTables.value[name][1].reload(); } }, 1000); @@ -170,7 +180,7 @@ const nodes = selectedNodes.value; nodeChange({ useForms, objParams, selectedNodes: nodes }).then((result) => { showOtherTable.value = result.isShow; - data.value['Action'] = result['Action']; + data.value[configType.value as string] = result[configType.value as string]; useTables.value = GetUseTables(data, emit); if (showOtherTable.value[result['name']]) { data.value[result['name']] = result[result['name']]; @@ -194,7 +204,7 @@ */ async function customSubmitFunc(values) { try { - SubmitFunc(values, props.configType, emit); + SubmitFunc(values, configType.value, emit); // values.AUTH_PROD = useUserStore().getUserInfo.prodCode; // values.FACTORY = useUserStore().getUserInfo.prodCode; // const apiAction = SaveEntity(values, true, 'MES_PROD_ACTION'); @@ -233,7 +243,13 @@ name: undefined, }, ]; - return actionItem; + return ActionItem( + params, + actionItem, + useModalsCrud.value[name][1].openModal, + useTables.value[name][1].reload(), + objParams.value['CODE'], + ); } /** @@ -258,8 +274,8 @@ useTables.value = GetUseTables(data, emit); setTimeout(() => { useTables.value[item][1].reload(); - useForms.value['Action'][1].resetFields(); - useForms.value['Action'][1].setFieldsValue(data.value['Action'][0]); + useForms.value[configType.value as string][1].resetFields(); + useForms.value[configType.value as string][1].setFieldsValue(data.value[configType.value as string][0]); }, 10); } }); @@ -273,7 +289,8 @@ * @return {*} */ function SelectItemInForm(item) { - OpenSelectItem(useModalData.value[item][1].openModal, item); + const record = useForms.value[configType.value][1].getFieldsValue(); + OpenSelectItem(useModalData.value[item][1].openModal, item, useModalsCrudInForm.value[item][1].openModal, record, objParams.value['CODE']); } /** @@ -285,21 +302,21 @@ */ function SelectInFormSuccess(d, u, item) { GetSelectSuccess(d, u, item).then((result) => { - useForms.value[props.configType][1].setFieldsValue(result['value']); - data.value[props.configType as string].map((x) => { - Object.getOwnPropertyNames(result['value']).forEach(key => { - x[key] = result['value'][key]; - }); + useForms.value[configType.value][1].setFieldsValue(result['value']); + data.value[configType.value as string].map((x) => { + Object.getOwnPropertyNames(result['value']).forEach((key) => { + x[key] = result['value'][key]; + }); }); showOtherTable.value = result['isShow']; - data.value[result.name] = result['data'] + data.value[result.name] = result['data']; /* 閲嶆柊useTable锛屽惁鍒欐暟鎹笉鍒锋柊 */ useTables.value = GetUseTables(data, emit); if (showOtherTable.value[result.name]) { - showOtherTable.value[result.name] = false; - setTimeout(() => { - showOtherTable.value[result.name] = true; - }, 10); + showOtherTable.value[result.name] = false; + setTimeout(() => { + showOtherTable.value[result.name] = true; + }, 10); useTables.value[result.name][1].reload(); } }); diff --git a/src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO.ts b/src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO.ts index a3c71f8..7d116a4 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO.ts @@ -4,7 +4,7 @@ * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-09-11 22:41:44 + * @LastEditTime: 2024-09-21 23:19:58 */ import { Ref, h, ref, render, unref } from 'vue'; @@ -66,6 +66,10 @@ x.onClick = handleRelease.bind(null, args, params); x.tooltip = '涓嬪彂'; } + // if (x.name == 'handleTemplate') { + // x.onClick = handleTemplate.bind(null, args, params); + // x.tooltip = '妯℃澘缁存姢'; + // } }); return data; }, @@ -88,6 +92,14 @@ showActionButtonGroup: false, }), prodinfo: useForm({ + labelWidth: 120, + schemas: prodCfgformSchema, + actionColOptions: { + span: 24, + }, + showActionButtonGroup: false, + }), + tmpinfo: useForm({ labelWidth: 120, schemas: prodCfgformSchema, actionColOptions: { @@ -426,7 +438,6 @@ }); } - /* 涓嬪彂鐣岄潰涓殑琛ㄥ崟鍒楄〃 */ const woformSchema: FormSchema[] = [ { field: 'PLAN_QTY', diff --git a/src/views/tigerprojects/system/lowcode/entityts/ProdRouteBinding.ts b/src/views/tigerprojects/system/lowcode/entityts/ProdRouteBinding.ts index c78d357..f2aa37f 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/ProdRouteBinding.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/ProdRouteBinding.ts @@ -4,7 +4,7 @@ * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-09-11 10:44:38 + * @LastEditTime: 2024-09-23 01:57:24 */ import { Ref, h, ref, render, unref } from 'vue'; @@ -125,7 +125,15 @@ * @return {*} */ GetCrudColSlots: () => { - return ['scanadd', 'assyadd', 'testadd', 'auditadd', 'printadd', 'pkgadd']; + return [ + { name: 'scanadd', icon: 'search|svg' }, + { name: 'assyadd', icon: 'search|svg' }, + { name: 'testadd', icon: 'search|svg' }, + { name: 'auditadd', icon: 'search|svg' }, + { name: 'printadd', icon: 'search|svg' }, + { name: 'pkgadd', icon: 'search|svg' }, + { name: 'labeladd', icon: 'search|svg' }, + ]; }, /** * @description: 鍒囨崲鑺傜偣鏃朵簨浠舵柟娉� @@ -645,7 +653,12 @@ }); break; case 'editRoute': - args[1](true, { rotId: args[2][0].id, slotName: '', prodCode:args[3],custCode:args[2][0].cust }); + args[1](true, { + rotId: args[2][0].id, + slotName: '', + prodCode: args[3], + custCode: args[2][0].cust, + }); break; } }, @@ -725,9 +738,7 @@ x.RULE_CODE = param.values['RULE_CODE']; } }); - param.data.value['Action'][0]['OPTION_1'] = JSON.stringify( - param.data.value['ItemCode'], - ); + param.data.value['Action'][0]['OPTION_1'] = JSON.stringify(param.data.value['ItemCode']); break; } }, diff --git a/src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts b/src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts index 9aea2d6..fdfb039 100644 --- a/src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts +++ b/src/views/tigerprojects/system/lowcode/entityts/WoRouteBinding.ts @@ -4,7 +4,7 @@ * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-08-21 23:20:38 + * @LastEditTime: 2024-09-24 09:28:56 */ import { Ref, h, ref, render, unref } from 'vue'; @@ -21,13 +21,16 @@ import { NavItem } from '/@/api/tigerapi/model/basModel'; import { useMessage } from '/@/hooks/web/useMessage'; import { useModal } from '/@/components/Modal'; -import { BasicColumn, FormSchema, useTable } from '/@/components/Table'; +import { ActionItem, BasicColumn, FormSchema, useTable } from '/@/components/Table'; import { CustModalParams } from '/@/api/tigerapi/model/systemModel'; import { useUserStore } from '/@/store/modules/user'; import { EventDataNode } from 'ant-design-vue/lib/tree'; import { ContextMenuItem } from '/@/components/TigerTree'; -import { UpdateWoStatus } from '/@/api/tigerapi/mes/wo'; +import { AddOrEditLabelVarByWorkOrder, UpdateWoStatus } from '/@/api/tigerapi/mes/wo'; import { useForm } from '/@/components/Form'; +import { BAS_LABEL_VAR_WO } from '/@/api/tigerapi/model/mesModel'; +import { buildUUID } from '/@/utils/uuid'; +import { mesApi } from '/@/api/tigerapi/mes/mesApi'; const { t } = useI18n(); const { createErrorModal } = useMessage(); @@ -110,6 +113,19 @@ return data; }, /** + * @description: 鎿嶄綔瀛楁鑷畾涔夋寜閽紝蹇呴渶瑕佹湁鐨勬柟娉� + * @return {*} + */ + ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => { + data.push({ + icon: 'template|svg', + tooltip: '妯℃澘缁存姢', + onClick: handleTemplate.bind(null, args, params), + name: '妯℃澘缁存姢', + }); + return data; + }, + /** * @description: 鑾峰彇閰嶇疆椤硅〃鍗曞瓧娈碉紝鏍规嵁鏍戝舰鑺傜偣type涓嶅悓鑰屼笉鍚� * @param {string} type * @return {*} @@ -134,7 +150,15 @@ * @return {*} */ GetCrudColSlots: () => { - return ['scanadd', 'assyadd', 'testadd', 'auditadd', 'printadd', 'pkgadd']; + return [ + { name: 'scanadd', icon: 'search|svg' }, + { name: 'assyadd', icon: 'search|svg' }, + { name: 'testadd', icon: 'search|svg' }, + { name: 'auditadd', icon: 'search|svg' }, + { name: 'printadd', icon: 'search|svg' }, + { name: 'pkgadd', icon: 'search|svg' }, + { name: 'labeladd', icon: 'template|svg' }, + ]; }, /** * @description: 鑾峰彇琛ㄦ牸use鍒楄〃 @@ -366,6 +390,9 @@ */ OpenSelectItem: (openItemModal: Fn, ...args) => { let config = {}; + const openCrudModal = args[1]; + const record = args[2]; + const OrderNo = args[3]; switch (args[0]) { case 'scanadd': config = ruleModalCfg; @@ -383,7 +410,35 @@ config = pkgModalCfg; break; } - openItemModal(true, config); + if (args[0] == 'labeladd') { + openCrudModal(true, { + isUpdate: true, //鏄惁鏇存柊鎿嶄綔 + entityName: 'WoRouteBinding', //鏄摢涓〉闈� + ctype: 'BAS_LABEL_VAR_WO', //瀹炰綋鍚嶇О + title: '妯℃澘缁存姢', //鏍囬 + width: '1024px', //寮瑰嚭妗嗗搴� + ItemColumns: TemplateBasColumn, //寮瑰嚭妗嗕腑琛ㄦ牸瀛楁缁撴瀯 + schemas: [], //鏌ヨ鏉′欢瀛楁缁撴瀯 + others: { WORK_ORDER: OrderNo }, //闇�瑕佸甫鍒板脊鍑虹獥鍙d腑鐨勬暟鎹� + searchInfo: { + TABLE_NAME: 'BAS_LABEL_VAR_WO', //瀹炰綋鍚嶇О + LabelId: record.LABEL_CODE, //妯℃澘ID + WorkOrder: OrderNo, //宸ュ崟鍙� + apiUrl: mesApi.GetLabelVarByWorkOrder, //鑷畾涔夎幏鍙栨暟鎹垎椤电殑api锛屼笉鐢ㄩ粯璁ょ殑鍩虹鏂规硶 + // sqlcmd: ` (WORK_ORDER = '${OrderNo}' OR WORK_ORDER = '' OR WORK_ORDER IS NULL)`, + // option: + // { + // //鏍规嵁鎹偣鏌ヨ锛屽繀闇�甯﹁繖涓弬鏁� + // UserId: useUserStore().getUserInfo.userId, + // ByOrg: true, + // CurOrg: useUserStore().getUserInfo.orgCode, + // }, + }, + values: record, //琛ㄥ崟璁板綍 + }); + } else { + openItemModal(true, config); + } }, /** * @description: 寮瑰嚭閫夋嫨妗嗛�夋嫨鎴愬姛杩斿洖 @@ -432,6 +487,8 @@ isShow: { BAS_PKG_DTL: false, ItemCode: false }, }; break; + case 'labeladd': + break; case 'pkgadd': const ents = await getEntity({ sqlcmd: `RULE_CODE ='${d.values['val']}'`, @@ -461,6 +518,7 @@ WorkOrder: args[1]['CODE'], Status: -1, RouteStatus: 1, + WoBatch: '', }).then((action) => { if (action.IsSuccessed) { SP_MES_PROD2WO({ rotId: d.values.id, wo: args[1]['CODE'] }).then((action) => { @@ -472,6 +530,7 @@ WorkOrder: args[1]['CODE'], Status: -1, RouteStatus: 0, + WoBatch: '', }); createErrorModal({ title: t('sys.api.errorTip'), @@ -516,6 +575,25 @@ testadd: useModal(), auditadd: useModal(), printadd: useModal(), + labeladd: useModal(), + pkgadd: useModal(), + }; + }, + /** + * @description: 鑾峰彇妯℃�佹搴旂敤鍒楄〃 + * @return {*} + */ + GetUseCrudModals: () => { + return { + addRoute: useModal(), + addCustomer: useModal(), + editRoute: useModal(), + scanadd: useModal(), + assyadd: useModal(), + testadd: useModal(), + auditadd: useModal(), + printadd: useModal(), + labeladd: useModal(), pkgadd: useModal(), }; }, @@ -659,7 +737,13 @@ SP_MES_WO2CUST({ wo: args[2][0]['wo'] }); break; case 'editRoute': - args[1](true, { rotId: args[2][0].wo, slotName: '', rotType: 'Wo', prodCode:args[3],custCode:args[2][0].cust }); + args[1](true, { + rotId: args[2][0].wo, + slotName: '', + rotType: 'Wo', + prodCode: args[3], + custCode: args[2][0].cust, + }); break; } }, @@ -715,35 +799,47 @@ * @return {*} */ CustFunc: async (param: CustModalParams) => { - switch (param['ctype']) { - case 'BAS_PKG_DTL': - // const ents = await getEntity({ - // sqlcmd: `PKG_RULE_ID ='${param.values['PKG_RULE_ID']}'`, - // entityName: 'V_BAS_PKG_DTL', - // order: '', - // }); - // param.data.value['Table'] = ents.Data.Items; - param.data.value['BAS_PKG_DTL'].map((x) => { - if (x.PKG_CODE == param.values['PKG_CODE']) { - x.LABEL_CODE = param.values['LABEL_CODE']; - } - }); - param.data.value['Action'][0]['OPTION_1'] = JSON.stringify( - param.data.value['BAS_PKG_DTL'], - ); - break; - case 'ItemCode': - param.data.value['ItemCode'].map((x) => { - if (x.ITEM_CODE == param.values['ITEM_CODE']) { - x.IsBatchItem = param.values['IsBatchItem']; - x.RULE_CODE = param.values['RULE_CODE']; - } - }); - param.data.value['Action'][0]['OPTION_1'] = JSON.stringify( - param.data.value['ItemCode'], - ); - break; - } + return new Promise<any>(async (resolve, reject) => { + try { + switch (param['ctype']) { + case 'BAS_PKG_DTL': + // const ents = await getEntity({ + // sqlcmd: `PKG_RULE_ID ='${param.values['PKG_RULE_ID']}'`, + // entityName: 'V_BAS_PKG_DTL', + // order: '', + // }); + // param.data.value['Table'] = ents.Data.Items; + param.data.value['BAS_PKG_DTL'].map((x) => { + if (x.PKG_CODE == param.values['PKG_CODE']) { + x.LABEL_CODE = param.values['LABEL_CODE']; + x.LABEL_ID = param.values['LABEL_CODE']; + } + }); + param.data.value['Action'][0]['OPTION_1'] = JSON.stringify( + param.data.value['BAS_PKG_DTL'], + ); + break; + case 'ItemCode': + param.data.value['ItemCode'].map((x) => { + if (x.ITEM_CODE == param.values['ITEM_CODE']) { + x.IsBatchItem = param.values['IsBatchItem']; + x.RULE_CODE = param.values['RULE_CODE']; + } + }); + param.data.value['Action'][0]['OPTION_1'] = JSON.stringify( + param.data.value['ItemCode'], + ); + break; + case 'BAS_LABEL_VAR_WO': + param.values['WORK_ORDER'] = param.others['WORK_ORDER']; + param.values['ID'] = buildUUID(); + await AddOrEditLabelVarByWorkOrder(param.values as unknown as BAS_LABEL_VAR_WO); + } + resolve('OK'); + } catch (e) { + reject(e); + } + }); }, /** * @description: 鑾峰彇鍙抽敭鑿滃崟鍒楄〃 @@ -857,6 +953,12 @@ // }; // }, }, + { + dataIndex: 'LABEL_ID', + title: '鏍囩妯℃澘ID', + ifShow: false, + customRender: () => {}, + }, ] as BasicColumn[]; break; case 'ItemCode': @@ -933,6 +1035,7 @@ } return columns; } + /** * @description: 寮瑰嚭閫夋嫨妗�-鐗╂枡閫夋嫨妗嗛厤缃� * @return {*} @@ -1187,7 +1290,7 @@ label: '1', defaultValue: '', component: 'Input', - colProps: { span: 1, pull: 1 }, + colProps: { span: 1, pull: window.screen.width == 1366 ? -1 : 1 }, ifShow: ({ values }) => isScan(values.ACT_TYPE), colSlot: 'scanadd', }, @@ -1203,7 +1306,7 @@ label: '1', defaultValue: '', component: 'Input', - colProps: { span: 1, pull: 1 }, + colProps: { span: 1, pull: window.screen.width == 1366 ? -1 : 1 }, ifShow: ({ values }) => isAssy(values.ACT_TYPE), colSlot: 'assyadd', }, @@ -1219,7 +1322,7 @@ label: '1', defaultValue: '', component: 'Input', - colProps: { span: 1, pull: 1 }, + colProps: { span: 1, pull: window.screen.width == 1366 ? -1 : 1 }, ifShow: ({ values }) => isTest(values.ACT_TYPE), colSlot: 'testadd', }, @@ -1235,14 +1338,14 @@ label: '1', defaultValue: '', component: 'Input', - colProps: { span: 1, pull: 1 }, + colProps: { span: 1, pull: window.screen.width == 1366 ? -1 : 1 }, ifShow: ({ values }) => isAudit(values.ACT_TYPE), colSlot: 'auditadd', }, { field: 'LABEL_CODE', label: '鏍囩鎵撳嵃', - colProps: { span: 11 }, + colProps: { span: 9 }, component: 'Input', ifShow: ({ values }) => isPrint(values.ACT_TYPE), }, @@ -1251,9 +1354,18 @@ label: '1', defaultValue: '', component: 'Input', - colProps: { span: 1, pull: 1 }, + colProps: { span: 2 }, //{ span: 2, pull: window.screen.width == 1366 ? -1 : 1 }, ifShow: ({ values }) => isPrint(values.ACT_TYPE), colSlot: 'printadd', + }, + { + field: 'print1', + label: '1', + defaultValue: '', + component: 'Input', + colProps: { span: 1, pull: window.screen.width == 1366 ? -1 : 1 }, + ifShow: ({ values }) => isPrint(values.ACT_TYPE), + colSlot: 'labeladd', }, { field: 'PKG_CODE', @@ -1267,7 +1379,7 @@ label: '1', defaultValue: '', component: 'Input', - colProps: { span: 1, pull: 1 }, + colProps: { span: 1, pull: window.screen.width == 1366 ? -1 : 1 }, ifShow: ({ values }) => isPackage(values.ACT_TYPE), colSlot: 'pkgadd', }, @@ -1666,6 +1778,77 @@ ] as FormSchema[], }; + /** + * @description: 妯℃澘缁存姢 + * @param {*} args + * @param {Recordable} params + * @return {*} + */ + function handleTemplate(args, params: Recordable) { + const openCrudModal = args[0]; + const OrderNo = args[2]; + openCrudModal(true, { + isUpdate: true, //鏄惁鏇存柊鎿嶄綔 + entityName: 'WoRouteBinding', //鏄摢涓〉闈� + ctype: 'BAS_LABEL_VAR_WO', //瀹炰綋鍚嶇О + title: '妯℃澘缁存姢', //鏍囬 + width: '1024px', //寮瑰嚭妗嗗搴� + ItemColumns: TemplateBasColumn, //寮瑰嚭妗嗕腑琛ㄦ牸瀛楁缁撴瀯 + schemas: [], //鏌ヨ鏉′欢瀛楁缁撴瀯 + others: { WORK_ORDER: OrderNo }, //闇�瑕佸甫鍒板脊鍑虹獥鍙d腑鐨勬暟鎹� + searchInfo: { + TABLE_NAME: 'BAS_LABEL_VAR_WO', //瀹炰綋鍚嶇О + LabelId: params['record'].LABEL_ID, //妯℃澘ID + WorkOrder: OrderNo, //宸ュ崟鍙� + apiUrl: mesApi.GetLabelVarByWorkOrder, //鑷畾涔夎幏鍙栨暟鎹垎椤电殑api锛屼笉鐢ㄩ粯璁ょ殑鍩虹鏂规硶 + // sqlcmd: ` (WORK_ORDER = '${OrderNo}' OR WORK_ORDER = '' OR WORK_ORDER IS NULL)`, + // option: + // { + // //鏍规嵁鎹偣鏌ヨ锛屽繀闇�甯﹁繖涓弬鏁� + // UserId: useUserStore().getUserInfo.userId, + // ByOrg: true, + // CurOrg: useUserStore().getUserInfo.orgCode, + // }, + }, + values: params['record'], //琛ㄥ崟璁板綍 + }); + } + + /* 涓嬪彂鐣岄潰涓殑琛ㄥ崟鍒楄〃 */ + const TemplateBasColumn = [ + { + dataIndex: 'LABEL_ID', + title: '鏍囩妯℃澘ID', + ifShow: false, + sorter: true, + resizable: true, + }, + { + title: '宸ュ崟鍙�', + dataIndex: 'WORK_ORDER', + width: 280, + editRow: true, + // editable: true, + ifShow: false, + }, + { + title: '鍙橀噺鍚�', + dataIndex: 'VAR_NAME', + }, + { + title: '鍙橀噺鍊�', + dataIndex: 'VAR_VALUE', + editRow: true, + editRule: true, + }, + { + title: '榛樿鍊�', + dataIndex: 'DEFAULT_VALUE', + editRow: true, + editRule: true, + }, + ] as BasicColumn[]; + return [methods]; } diff --git a/src/views/tigerprojects/system/lowcode/high/edit/editdtl.vue b/src/views/tigerprojects/system/lowcode/high/edit/editdtl.vue index c31175e..ff9bca1 100644 --- a/src/views/tigerprojects/system/lowcode/high/edit/editdtl.vue +++ b/src/views/tigerprojects/system/lowcode/high/edit/editdtl.vue @@ -212,9 +212,7 @@ } } - const imgList = [ - 'http://localhost:8800/files/Template/10浣嶆壒娆℃潯鐮�.png', - ]; + const imgList = ['http://localhost:8800/files/Template/10浣嶆壒娆℃潯鐮�.png']; function openImg() { const onImgLoad = ({ index, url, dom }) => { console.log(`绗�${index + 1}寮犲浘鐗囧凡鍔犺浇锛孶RL涓猴細${url}`, dom); diff --git a/src/views/tigerprojects/system/lowcode/normal/mainTable.vue b/src/views/tigerprojects/system/lowcode/normal/mainTable.vue index 07c2365..7ccec2c 100644 --- a/src/views/tigerprojects/system/lowcode/normal/mainTable.vue +++ b/src/views/tigerprojects/system/lowcode/normal/mainTable.vue @@ -2,7 +2,7 @@ <div> <BasicTable @register="registerTable"> <template #toolbar> - <!-- 鏍规嵁鑿滃崟璁剧疆鐨勬寜閽紝鑷姩鐢熸垚 --> + <!-- 鏍规嵁鑿滃崟璁剧疆鐨勬寜閽紝鑷姩鐢熸垚 --> <a-button type="primary" v-for="item in buttons.filter((m) => m['BUTTON_TYPE'] == 0)" @@ -112,6 +112,7 @@ const [registerDrawer, { openDrawer }] = useDrawer(); const [registerRv, { openModal: openRvModal, closeModal: RvcloseModal }] = useModal(); const [registerCust, { openModal: openCustModal }] = useModal(); + const [registerCrud, { openModal: openCrudModal }] = useModal(); const cType = ref(''); const formSchemas = ref({}); //寮瑰嚭妗嗗琛ㄥ崟缁撴瀯 const routeData = ref({ @@ -282,6 +283,7 @@ go, setProps, openCustModal, + openCrudModal, ); } @@ -318,7 +320,7 @@ const [{ CreateAction }] = custImport.value['default'](); const result = CreateAction(entityName.value, colSlots.value); switch (result.action) { - case 'go': /* 璺宠浆椤甸潰 */ + case 'go' /* 璺宠浆椤甸潰 */: // 灏嗗璞¤浆鎹负JSON瀛楃涓插苟淇濆瓨鍒皊essionStorage sessionStorage.setItem( `${result.params.Name}_params`, @@ -328,7 +330,7 @@ `/${result.url}/${encodeURI(JSON.stringify({ sName: result.params.Name, Name: result.params.Name }))}`, ); break; - case 'drawer': /* 鎵撳紑渚ц竟妗� */ + case 'drawer' /* 鎵撳紑渚ц竟妗� */: openDrawer(true, { isUpdate: false, //鏄柊澧炶繕鏄紪杈戯紝false-鏂板|true-缂栬緫 entityName: entityName.value, //瀹炰綋绫诲悕 -- Gitblit v1.9.3