| | |
| | | * @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', |
| | |
| | | UpdateWoBatchStatus = '/MES/UpdateWoBatchStatus', |
| | | SaveLabelTemplate = '/MES/SaveLabelTemplate', |
| | | DeleteLabelTemplate = '/MES/DeleteLabelTemplate', |
| | | AddOrEditLabelVarByWorkOrder = '/MES/AddOrEditLabelVarByWorkOrder', |
| | | GetLabelVarByWorkOrder = '/MES/GetLabelVarByWorkOrder', |
| | | } |
| | |
| | | BIZ_MES_WO, |
| | | SaveWoBatchInput, |
| | | BizMesWoInput, |
| | | BAS_LABEL_VAR_WO, |
| | | } from '../model/mesModel'; |
| | | import { genAction, Api, genActionPage } from '../system'; |
| | | import { defHttp } from '/@/utils/http/axios'; |
| | |
| | | }, |
| | | ); |
| | | }; |
| | | |
| | | /** |
| | | * @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; |
| | | }; |
| | |
| | | } |
| | | 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']); //妿䏿³ç¨é»è®¤çåºç¡æ¹æ³è·ååé¡µæ°æ®ï¼å¯ä»¥æ¢å
¶ä»çapi |
| | | } |
| | | 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, |
| | | }, |
| | |
| | | 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])) { |
| | |
| | | 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]]}%'`; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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}å¼ å¾çå·²å è½½ï¼URL为ï¼${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(); |
| | | /* 卿importå®ä½å.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: 'æ£å¨ä¿å...', 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> |
| | |
| | | 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ï¼çéæ©æ¡ç¦ç¨ |
| | |
| | | * @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"> |
| | |
| | | search |
| | | :add="add" |
| | | treeWrapperClassName="h-[calc(100%-35px)] overflow-auto" |
| | | :clickRowToExpand="false" |
| | | :clickRowToExpand="true" |
| | | :treeData="treeData" |
| | | :renderIcon="createIcon" |
| | | :fieldNames="fieldNames" |
| | |
| | | @handleAdd="handleAdd" |
| | | @unselect="UnSelect" |
| | | :beforeRightClick="props.beforeRightClick" |
| | | :defaultExpandAll="true" |
| | | /> |
| | | </div> |
| | | </template> |
| | |
| | | label: 'ç¼è¾', |
| | | disabled: currentEditKeyRef.value ? currentEditKeyRef.value !== record.key : false, |
| | | onClick: handleEdit.bind(null, record), |
| | | name: '' |
| | | }, |
| | | ]; |
| | | } |
| | |
| | | { |
| | | label: 'ä¿å', |
| | | onClick: handleSave.bind(null, record), |
| | | name: '' |
| | | }, |
| | | { |
| | | label: 'åæ¶', |
| | |
| | | title: 'æ¯å¦åæ¶ç¼è¾', |
| | | confirm: handleCancel.bind(null, record), |
| | | }, |
| | | name: '' |
| | | }, |
| | | ]; |
| | | } |
| | |
| | | * @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[]>([]); |
| | |
| | | GetUseTables, |
| | | GetUseForm, |
| | | CustFunc, |
| | | GetUseCrudModals, |
| | | ActionItem, |
| | | }, |
| | | ] = isNullOrUnDef(custImport.value['default']) |
| | | ? EntityCustFunction.value |
| | |
| | | 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(); |
| | | }); |
| | | |
| | | /* 注å
¥éä¸èç¹æ°æ® */ |
| | |
| | | }, 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); |
| | |
| | | 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']]; |
| | |
| | | */ |
| | | 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'); |
| | |
| | | name: undefined, |
| | | }, |
| | | ]; |
| | | return actionItem; |
| | | return ActionItem( |
| | | params, |
| | | actionItem, |
| | | useModalsCrud.value[name][1].openModal, |
| | | useTables.value[name][1].reload(), |
| | | objParams.value['CODE'], |
| | | ); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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); |
| | | } |
| | | }); |
| | |
| | | * @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']); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | 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(); |
| | | } |
| | | }); |
| | |
| | | * @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'; |
| | |
| | | x.onClick = handleRelease.bind(null, args, params); |
| | | x.tooltip = 'ä¸å'; |
| | | } |
| | | // if (x.name == 'handleTemplate') { |
| | | // x.onClick = handleTemplate.bind(null, args, params); |
| | | // x.tooltip = '模æ¿ç»´æ¤'; |
| | | // } |
| | | }); |
| | | return data; |
| | | }, |
| | |
| | | showActionButtonGroup: false, |
| | | }), |
| | | prodinfo: useForm({ |
| | | labelWidth: 120, |
| | | schemas: prodCfgformSchema, |
| | | actionColOptions: { |
| | | span: 24, |
| | | }, |
| | | showActionButtonGroup: false, |
| | | }), |
| | | tmpinfo: useForm({ |
| | | labelWidth: 120, |
| | | schemas: prodCfgformSchema, |
| | | actionColOptions: { |
| | |
| | | }); |
| | | } |
| | | |
| | | /* ä¸åçé¢ä¸ç表åå表 */ |
| | | const woformSchema: FormSchema[] = [ |
| | | { |
| | | field: 'PLAN_QTY', |
| | |
| | | * @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'; |
| | |
| | | * @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: 忢èç¹æ¶äºä»¶æ¹æ³ |
| | |
| | | }); |
| | | 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; |
| | | } |
| | | }, |
| | |
| | | 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; |
| | | } |
| | | }, |
| | |
| | | * @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'; |
| | |
| | | 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(); |
| | |
| | | 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 {*} |
| | |
| | | * @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å表 |
| | |
| | | */ |
| | | 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; |
| | |
| | | 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 }, //éè¦å¸¦å°å¼¹åºçªå£ä¸çæ°æ® |
| | | 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: å¼¹åºéæ©æ¡éæ©æåè¿å |
| | |
| | | isShow: { BAS_PKG_DTL: false, ItemCode: false }, |
| | | }; |
| | | break; |
| | | case 'labeladd': |
| | | break; |
| | | case 'pkgadd': |
| | | const ents = await getEntity({ |
| | | sqlcmd: `RULE_CODE ='${d.values['val']}'`, |
| | |
| | | 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) => { |
| | |
| | | WorkOrder: args[1]['CODE'], |
| | | Status: -1, |
| | | RouteStatus: 0, |
| | | WoBatch: '', |
| | | }); |
| | | createErrorModal({ |
| | | title: t('sys.api.errorTip'), |
| | |
| | | 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(), |
| | | }; |
| | | }, |
| | |
| | | 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; |
| | | } |
| | | }, |
| | |
| | | * @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: è·åå³é®èåå表 |
| | |
| | | // }; |
| | | // }, |
| | | }, |
| | | { |
| | | dataIndex: 'LABEL_ID', |
| | | title: 'æ ç¾æ¨¡æ¿ID', |
| | | ifShow: false, |
| | | customRender: () => {}, |
| | | }, |
| | | ] as BasicColumn[]; |
| | | break; |
| | | case 'ItemCode': |
| | |
| | | } |
| | | return columns; |
| | | } |
| | | |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡-ç©æéæ©æ¡é
ç½® |
| | | * @return {*} |
| | |
| | | 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', |
| | | }, |
| | |
| | | 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', |
| | | }, |
| | |
| | | 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', |
| | | }, |
| | |
| | | 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), |
| | | }, |
| | |
| | | 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', |
| | |
| | | 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', |
| | | }, |
| | |
| | | ] 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 }, //éè¦å¸¦å°å¼¹åºçªå£ä¸çæ°æ® |
| | | 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]; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | 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}å¼ å¾çå·²å è½½ï¼URL为ï¼${url}`, dom); |
| | |
| | | <div> |
| | | <BasicTable @register="registerTable"> |
| | | <template #toolbar> |
| | | <!-- æ ¹æ®èå设置çæé®ï¼èªå¨çæ --> |
| | | <!-- æ ¹æ®èå设置çæé®ï¼èªå¨çæ --> |
| | | <a-button |
| | | type="primary" |
| | | v-for="item in buttons.filter((m) => m['BUTTON_TYPE'] == 0)" |
| | |
| | | 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({ |
| | |
| | | go, |
| | | setProps, |
| | | openCustModal, |
| | | openCrudModal, |
| | | ); |
| | | } |
| | | |
| | |
| | | const [{ CreateAction }] = custImport.value['default'](); |
| | | const result = CreateAction(entityName.value, colSlots.value); |
| | | switch (result.action) { |
| | | case 'go': /* è·³è½¬é¡µé¢ */ |
| | | case 'go' /* è·³è½¬é¡µé¢ */: |
| | | // å°å¯¹è±¡è½¬æ¢ä¸ºJSONå符串并ä¿åå°sessionStorage |
| | | sessionStorage.setItem( |
| | | `${result.params.Name}_params`, |
| | |
| | | `/${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, //å®ä½ç±»å |