From 36acf8daf78fdc005a42ea682efec7174f4e283b Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 20 六月 2024 11:58:42 +0800 Subject: [PATCH] 产品工艺路线 --- src/views/tigerprojects/system/lowcode/composition/prodRoute.ts | 4 src/assets/icons/binding.svg | 1 src/views/components/GeneralTree.vue | 0 src/views/tigerprojects/bas/MaterialInfo/index.vue | 145 +++++++++-------- src/assets/icons/prodLine.svg | 1 src/views/tigerprojects/system/lowcode/data.ts | 8 src/views/tigerprojects/mes/eng/route/components/PostProps.vue | 4 src/views/tigerprojects/system/lowcode/high/index.vue | 6 src/views/tigerprojects/mes/prod/biz_mes_wo/WoDrawer.vue | 4 src/views/tigerprojects/system/lowcode/detail/index.vue | 8 src/views/tigerprojects/system/lowcode/normalDrawer.vue | 4 src/assets/icons/product.svg | 2 /dev/null | 110 ------------- src/views/tigerprojects/mes/prod/biz_mes_wo/index.vue | 6 src/views/components/GeneralModal.vue | 1 src/views/tigerprojects/system/lowcode/composition/index.vue | 107 ++++++------ src/api/tigerapi/system.ts | 8 + src/assets/icons/similar-product.svg | 1 src/views/tigerprojects/system/lowcode/normal/index.vue | 10 src/views/tigerprojects/mes/eng/route/components/ActionItemProps.vue | 4 20 files changed, 171 insertions(+), 263 deletions(-) diff --git a/src/api/tigerapi/system.ts b/src/api/tigerapi/system.ts index 01ccd9d..986e464 100644 --- a/src/api/tigerapi/system.ts +++ b/src/api/tigerapi/system.ts @@ -280,6 +280,14 @@ return result; } +/** + * @description: 鏍戝舰琛ㄧ粨鏋勮浆鏍戝舰Json + * @param {T} data + * @param {string} parentId + * @param {string} id + * @param {string} pid + * @return {*} + */ export function convertToTree<T>(data: T[], parentId: string, id: string, pid?: string) { const result: T[] = []; let temp: T[] = []; diff --git a/src/assets/icons/binding.svg b/src/assets/icons/binding.svg new file mode 100644 index 0000000..96e1ad7 --- /dev/null +++ b/src/assets/icons/binding.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="1718847374989" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="57967" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M875.32 149.699c-27.217-27.18-63.372-42.142-101.831-42.142h-0.105c-31.462 0.027-61.359 10.016-86.457 28.887l-1.16 0.87-161.647 161.88-0.14 0.14c-27.672 28.254-42.905 64.094-42.89 100.94 0.027 20.042 4.086 39.436 12.063 57.64a0.262 0.262 0 0 0 0.012 0.025l0.009 0.022a141.288 141.288 0 0 0 2.372 5.152l36.82-17.882a98.08 98.08 0 0 1-1.686-3.664l-18.8 8.19 18.78-8.237c-5.712-13.022-8.617-26.917-8.636-41.283-0.01-26.017 11.047-51.654 31.136-72.196l159.48-159.706c17.729-12.97 38.715-19.827 60.78-19.846h0.075c27.53 0 53.419 10.714 72.904 30.173 19.503 19.477 30.253 45.38 30.272 72.944 0.02 22.075-6.81 43.067-19.761 60.8L708.683 460.838l-0.867 1.155c-19.7 26.249-49.78 41.321-82.528 41.35h-0.073c-14.315 0-28.162-2.872-41.161-8.536l-16.352 37.524c18.187 7.926 37.535 11.944 57.515 11.944h0.102c22.722-0.02 45.358-5.47 65.464-15.76 18.984-9.718 35.85-23.79 48.865-40.757l148.308-148.516 0.867-1.153c18.855-25.117 28.806-55.035 28.778-86.513-0.026-38.494-15.042-74.674-42.28-101.877zM254.521 915.475c-38.46 0.001-74.616-14.961-101.833-42.141-27.241-27.204-42.256-63.383-42.28-101.876-0.027-36.83 15.202-72.67 42.883-100.917l0.135-0.137 161.659-161.888 1.157-0.871c25.088-18.871 54.982-28.86 86.45-28.888h0.102c20 0 39.357 4.029 57.544 11.975L443.95 528.24c-12.987-5.674-26.832-8.55-41.153-8.55h-0.073c-22.067 0.019-43.048 6.876-60.766 19.842L182.463 699.254c-20.09 20.53-31.142 46.16-31.124 72.177 0.018 27.56 10.768 53.462 30.272 72.939 19.486 19.459 45.376 30.172 72.906 30.172h0.075c32.762-0.03 62.842-15.1 82.525-41.345l0.87-1.159L486.22 683.609c12.947-17.75 19.778-38.745 19.769-60.814-0.02-14.372-2.919-28.247-8.612-41.216l37.481-16.453c7.976 18.17 12.034 37.56 12.063 57.633 0.012 31.482-9.937 61.39-28.773 86.518l-0.871 1.16-148.323 148.518c-13.008 16.967-29.873 31.041-48.862 40.76-20.105 10.29-42.745 15.74-65.468 15.76h-0.104zM610.72 385.692l28.963 28.922-222.397 222.712-28.963-28.922L610.72 385.692z" p-id="57968"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/prodLine.svg b/src/assets/icons/prodLine.svg new file mode 100644 index 0000000..539ebf4 --- /dev/null +++ b/src/assets/icons/prodLine.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="1718810813446" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21858" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M341.333333 405.333333h341.333334v42.666667H341.333333z" p-id="21859"></path><path d="M682.666667 554.666667H341.333333c-12.8 0-21.333333-8.533333-21.333333-21.333334V64c0-12.8 8.533333-21.333333 21.333333-21.333333h341.333334c12.8 0 21.333333 8.533333 21.333333 21.333333v469.333333c0 12.8-8.533333 21.333333-21.333333 21.333334z m-320-42.666667h298.666666V85.333333H362.666667v426.666667z" p-id="21860"></path><path d="M917.333333 981.333333H106.666667c-59.733333 0-106.666667-46.933333-106.666667-106.666666V64c0-12.8 8.533333-21.333333 21.333333-21.333333h981.333334c12.8 0 21.333333 8.533333 21.333333 21.333333v810.666667c0 59.733333-46.933333 106.666667-106.666667 106.666666zM42.666667 85.333333v789.333334c0 36.266667 27.733333 64 64 64h810.666666c36.266667 0 64-27.733333 64-64V85.333333H42.666667z" p-id="21861"></path><path d="M277.333333 853.333333H149.333333c-12.8 0-21.333333-8.533333-21.333333-21.333333v-128c0-12.8 8.533333-21.333333 21.333333-21.333333h128c12.8 0 21.333333 8.533333 21.333334 21.333333v128c0 12.8-8.533333 21.333333-21.333334 21.333333z m-106.666666-42.666666h85.333333v-85.333334H170.666667v85.333334zM341.333333 704h298.666667v42.666667H341.333333zM341.333333 789.333333h42.666667v42.666667h-42.666667zM426.666667 789.333333h42.666666v42.666667h-42.666666zM21.333333 149.333333h256v42.666667H21.333333zM746.666667 149.333333h256v42.666667H746.666667z" p-id="21862"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/product.svg b/src/assets/icons/product.svg index 539ebf4..7461dd5 100644 --- a/src/assets/icons/product.svg +++ b/src/assets/icons/product.svg @@ -1 +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="1718810813446" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21858" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M341.333333 405.333333h341.333334v42.666667H341.333333z" p-id="21859"></path><path d="M682.666667 554.666667H341.333333c-12.8 0-21.333333-8.533333-21.333333-21.333334V64c0-12.8 8.533333-21.333333 21.333333-21.333333h341.333334c12.8 0 21.333333 8.533333 21.333333 21.333333v469.333333c0 12.8-8.533333 21.333333-21.333333 21.333334z m-320-42.666667h298.666666V85.333333H362.666667v426.666667z" p-id="21860"></path><path d="M917.333333 981.333333H106.666667c-59.733333 0-106.666667-46.933333-106.666667-106.666666V64c0-12.8 8.533333-21.333333 21.333333-21.333333h981.333334c12.8 0 21.333333 8.533333 21.333333 21.333333v810.666667c0 59.733333-46.933333 106.666667-106.666667 106.666666zM42.666667 85.333333v789.333334c0 36.266667 27.733333 64 64 64h810.666666c36.266667 0 64-27.733333 64-64V85.333333H42.666667z" p-id="21861"></path><path d="M277.333333 853.333333H149.333333c-12.8 0-21.333333-8.533333-21.333333-21.333333v-128c0-12.8 8.533333-21.333333 21.333333-21.333333h128c12.8 0 21.333333 8.533333 21.333334 21.333333v128c0 12.8-8.533333 21.333333-21.333334 21.333333z m-106.666666-42.666666h85.333333v-85.333334H170.666667v85.333334zM341.333333 704h298.666667v42.666667H341.333333zM341.333333 789.333333h42.666667v42.666667h-42.666667zM426.666667 789.333333h42.666666v42.666667h-42.666666zM21.333333 149.333333h256v42.666667H21.333333zM746.666667 149.333333h256v42.666667H746.666667z" p-id="21862"></path></svg> \ No newline at end of file +<?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="1718844636891" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11268" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M433.65 894.897H241.807c-48.61 0-88.157-39.547-88.157-88.157V231.055c0-48.61 39.547-88.157 88.157-88.157h480.685c48.61 0 88.157 39.547 88.157 88.157v227.843c0 13.255-10.745 24-24 24s-24-10.745-24-24V231.055c0-22.143-18.015-40.157-40.157-40.157H241.807c-22.143 0-40.157 18.015-40.157 40.157V806.74c0 22.143 18.015 40.157 40.157 40.157H433.65c13.255 0 24 10.745 24 24s-10.745 24-24 24z" p-id="11269"></path><path d="M305.65 302.897h368.709v48H305.65zM305.65 494.897h246.768v48H305.65z" p-id="11270"></path><path d="M705.024 903.796c-35.724 0-69.628-5.736-95.467-16.153-43.018-17.341-49.44-41.774-49.44-54.796h42c0.244 1.46 5.564 9.211 25.512 16.768 20.735 7.855 48.223 12.182 77.396 12.182s56.66-4.326 77.396-12.182c19.947-7.557 25.268-15.308 25.516-16.821l41.996 0.054c0 13.021-6.423 37.455-49.44 54.796-25.841 10.416-59.745 16.152-95.469 16.152zM705.024 805.696c-35.724 0-69.628-5.736-95.467-16.153-43.018-17.341-49.44-41.775-49.44-54.797h42c0.244 1.46 5.562 9.211 25.509 16.768 20.736 7.856 48.224 12.183 77.398 12.183s56.662-4.326 77.398-12.183c19.946-7.557 25.265-15.308 25.513-16.821l41.996 0.054c0 13.021-6.423 37.456-49.44 54.797-25.839 10.416-59.743 16.152-95.467 16.152zM705.024 707.597c-35.724 0-69.628-5.736-95.467-16.153-43.018-17.342-49.44-41.775-49.44-54.797s6.423-37.456 49.44-54.797c25.839-10.417 59.743-16.153 95.467-16.153s69.628 5.736 95.467 16.153c43.018 17.341 49.44 41.775 49.44 54.797s-6.423 37.455-49.44 54.797c-25.839 10.416-59.743 16.153-95.467 16.153z m-102.9-70.951c0.36 1.636 5.784 9.297 25.504 16.769 20.736 7.855 48.224 12.182 77.396 12.182s56.66-4.326 77.396-12.182c19.72-7.472 25.144-15.133 25.504-16.769-0.36-1.636-5.782-9.297-25.502-16.768-20.736-7.856-48.224-12.183-77.398-12.183s-56.662 4.326-77.398 12.183c-19.72 7.472-25.142 15.133-25.502 16.768z" p-id="11271"></path><path d="M560.567 636.646h42v196.2h-42zM808.067 637.097h42v196.199h-42z" p-id="11272"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/similar-product.svg b/src/assets/icons/similar-product.svg new file mode 100644 index 0000000..9adabf5 --- /dev/null +++ b/src/assets/icons/similar-product.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="1718844995294" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20906" xmlns:xlink="http://www.w3.org/1999/xlink" width="200.1953125" height="200"><path d="M302.327525 504.7808l-146.944-88.064c-11.776-7.168-27.136-3.328-34.048 8.448-7.168 11.776-3.328 27.136 8.448 34.304l146.944 88.064c11.776 7.168 27.136 3.328 34.048-8.704C317.943525 527.0272 314.103525 511.6672 302.327525 504.7808zM458.999525 1020.8768c5.888 1.792 12.544 1.28 18.688-2.304C472.055525 1021.6448 465.399525 1022.6688 458.999525 1020.8768zM302.327525 504.7808l-146.944-88.064c-11.776-7.168-27.136-3.328-34.048 8.448-7.168 11.776-3.328 27.136 8.448 34.304l146.944 88.064c11.776 7.168 27.136 3.328 34.048-8.704C317.943525 527.0272 314.103525 511.6672 302.327525 504.7808zM302.327525 504.7808l-146.944-88.064c-11.776-7.168-27.136-3.328-34.048 8.448-7.168 11.776-3.328 27.136 8.448 34.304l146.944 88.064c11.776 7.168 27.136 3.328 34.048-8.704C317.943525 527.0272 314.103525 511.6672 302.327525 504.7808zM302.327525 504.7808l-146.944-88.064c-11.776-7.168-27.136-3.328-34.048 8.448-7.168 11.776-3.328 27.136 8.448 34.304l146.944 88.064c11.776 7.168 27.136 3.328 34.048-8.704C317.943525 527.0272 314.103525 511.6672 302.327525 504.7808zM302.327525 504.7808l-146.944-88.064c-11.776-7.168-27.136-3.328-34.048 8.448-7.168 11.776-3.328 27.136 8.448 34.304l146.944 88.064c11.776 7.168 27.136 3.328 34.048-8.704C317.943525 527.0272 314.103525 511.6672 302.327525 504.7808zM302.327525 504.7808l-146.944-88.064c-11.776-7.168-27.136-3.328-34.048 8.448-7.168 11.776-3.328 27.136 8.448 34.304l146.944 88.064c11.776 7.168 27.136 3.328 34.048-8.704C317.943525 527.0272 314.103525 511.6672 302.327525 504.7808z" fill="#272636" p-id="20907"></path><path d="M477.687525 1018.5472c-6.144 3.584-12.8 4.096-18.688 2.304C465.399525 1022.6688 472.055525 1021.6448 477.687525 1018.5472z" fill="#272636" p-id="20908"></path><path d="M490.641125 954.112 490.641125 511.744l389.632-221.184 39.8848-24.1664c7.9872-5.1968 9.4976-11.8016 10.5472-16.5376 1.024-9.728-3.584-19.968-13.568-25.088l-440.32-220.16c-7.168-3.584-15.36-3.584-22.528 0l-440.32 220.16C-2.414875 235.52 0.145125 259.328 0.145125 261.888l0 469.76c0 8.704 4.608 16.896 12.032 21.504 0 0 430.848 260.352 438.272 263.68 15.104 7.424 24.576 5.376 31.744 1.792l143.36-82.944c12.288-7.168 16.384-22.784 9.216-35.072-6.912-12.288-22.784-16.384-34.816-9.472l-99.072 57.6 0-0.256L490.641125 954.112M440.465125 511.744l0 441.088L50.065125 717.568l0-427.52L440.465125 511.744zM465.553125 468.224 78.225125 248.576l387.328-193.536 387.328 193.536L465.553125 468.224z" fill="#272636" p-id="20909"></path><path d="M812.945125 917.376l201.984-121.344c5.632-3.584 9.216-9.728 9.216-16.64l0-222.464c0-7.8336-5.888-13.312-12.288-16.384l-5.12-2.56c-0.512-0.256-1.28-0.256-1.792-0.256l1.536 0-196.352-98.048c-5.376-2.56-11.776-2.56-17.152 0l-196.096 98.048c-14.336 5.504-17.92 17.792-17.92 24.704l0 216.96c0 6.912 3.584 13.056 9.472 16.64 0 0 200.1664 120.0896 201.1904 120.3456C789.623525 916.4032 801.553125 925.2352 812.945125 917.376zM782.481125 868.224l-165.12-99.584 0-178.944 165.12 93.44L782.481125 868.224zM801.681125 650.112l-161.024-91.392 161.024-80.384 160.768 80.384L801.681125 650.112zM985.745125 768.64l-164.864 99.328 0-184.832 164.864-93.44L985.745125 768.64z" fill="#272636" p-id="20910"></path></svg> \ No newline at end of file diff --git a/src/views/components/NormalModal.vue b/src/views/components/GeneralModal.vue similarity index 98% rename from src/views/components/NormalModal.vue rename to src/views/components/GeneralModal.vue index 83a8732..1c76295 100644 --- a/src/views/components/NormalModal.vue +++ b/src/views/components/GeneralModal.vue @@ -26,7 +26,6 @@ import { BasicTable, BasicColumn, TableAction, useTable } from '/@/components/Table'; import { useI18n } from '/@/hooks/web/useI18n'; import { getListByPage } from '/@/api/tigerapi/system'; -import { isNullOrEmpty } from '/@/utils/is'; const { t } = useI18n(); const title = ref(''); diff --git a/src/views/tigerprojects/system/lowcode/composition/CustTree.vue b/src/views/components/GeneralTree.vue similarity index 100% rename from src/views/tigerprojects/system/lowcode/composition/CustTree.vue rename to src/views/components/GeneralTree.vue diff --git a/src/views/tigerprojects/bas/MaterialInfo/index.vue b/src/views/tigerprojects/bas/MaterialInfo/index.vue index 18ce463..c71f91d 100644 --- a/src/views/tigerprojects/bas/MaterialInfo/index.vue +++ b/src/views/tigerprojects/bas/MaterialInfo/index.vue @@ -2,7 +2,7 @@ <div> <BasicTable @register="registerTable"> <template #toolbar> - <a-button type="primary" @click="handleRenew"> 鎵归噺鏇存柊 </a-button> + <!-- <a-button type="primary" @click="handleRenew"> 鎵归噺鏇存柊 </a-button> --> <a-button type="primary" @click="handleCreate"> 鏂板鐗╂枡 </a-button> </template> <template #action="{ record }"> @@ -22,6 +22,11 @@ confirm: handleDelete.bind(null, record), }, }, + { + icon: 'binding|svg', + tooltip: '缁戝畾宸ヨ壓', + onClick: handleBinding.bind(null, record), + }, ]" /> </template> @@ -30,8 +35,7 @@ <MaterialModal @register="registerModal" /> </div> </template> -<script lang="ts"> - import { defineComponent } from 'vue'; +<script lang="ts" setup> import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { useDrawer } from '/@/components/Drawer'; import MaterialDrawer from './MaterialDrawer.vue'; @@ -39,73 +43,76 @@ import { columns, searchFormSchema } from './Material.data'; import { DeleteMaterial, getMaterialListByPage } from '../../../../api/tigerapi/bas/MaterialInfo'; import { useModal } from '/@/components/Modal'; + import { useGo } from '/@/hooks/web/usePage'; - export default defineComponent({ - name: 'MaterialManagement', - components: { BasicTable, MaterialDrawer, TableAction, MaterialModal }, - setup() { - const [registerDrawer, { openDrawer }] = useDrawer(); - const [registerModal, { openModal: openMaterialModal }] = useModal(); - const [registerTable, { reload }] = useTable({ - title: '鐗╂枡鍒楄〃', - api: getMaterialListByPage, - columns, - formConfig: { - labelWidth: 120, - schemas: searchFormSchema, - }, - useSearchForm: true, - showTableSetting: true, - bordered: true, - showIndexColumn: false, - actionColumn: { - width: 100, - title: '鎿嶄綔', - dataIndex: 'action', - slots: { customRender: 'action' }, - }, - }); - function handleCreate() { - openDrawer(true, { - isUpdate: false, - }); - } - function handleRenew() { - openMaterialModal(true, { - data: 'content', - info: 'Info', - }); - } - function handleSuccess() { - reload(); - } - - function handleEdit(record: Recordable) { - openDrawer(true, { - record, - isUpdate: true, - }); - } - function handleDelete(record: Recordable) { - console.log(record); - //鍒犻櫎鐗╂枡 - const apiAction = DeleteMaterial(record); - apiAction.then((action) => { - if (action.IsSuccessed) { - reload(); - } - }); - } - return { - registerTable, - registerDrawer, - registerModal, - handleCreate, - handleEdit, - handleDelete, - handleRenew, - handleSuccess, - }; + const go = useGo(); + const [registerDrawer, { openDrawer }] = useDrawer(); + const [registerModal, { openModal: openMaterialModal }] = useModal(); + const [registerTable, { reload }] = useTable({ + title: '鐗╂枡鍒楄〃', + api: getMaterialListByPage, + columns, + formConfig: { + labelWidth: 120, + schemas: searchFormSchema, + }, + useSearchForm: true, + showTableSetting: true, + bordered: true, + showIndexColumn: false, + actionColumn: { + width: 100, + title: '鎿嶄綔', + dataIndex: 'action', + slots: { customRender: 'action' }, }, }); + function handleCreate() { + openDrawer(true, { + isUpdate: false, + }); + } + function handleRenew() { + openMaterialModal(true, { + data: 'content', + info: 'Info', + }); + } + function handleSuccess() { + reload(); + } + + function handleEdit(record: Recordable) { + openDrawer(true, { + record, + isUpdate: true, + }); + } + function handleDelete(record: Recordable) { + console.log(record); + //鍒犻櫎鐗╂枡 + const apiAction = DeleteMaterial(record); + apiAction.then((action) => { + if (action.IsSuccessed) { + reload(); + } + }); + } + + /** + * @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: [], + }; + go(`/ProdRouteBinding/CP/${encodeURI(JSON.stringify(id))}`); + } </script> diff --git a/src/views/tigerprojects/mes/eng/route/components/ActionItemProps.vue b/src/views/tigerprojects/mes/eng/route/components/ActionItemProps.vue index 375da2f..371c07a 100644 --- a/src/views/tigerprojects/mes/eng/route/components/ActionItemProps.vue +++ b/src/views/tigerprojects/mes/eng/route/components/ActionItemProps.vue @@ -30,7 +30,7 @@ <FormItem label="鑷畾涔夋柟娉�(璋冪敤鏂规硶鐨勫叏鍚�)" name="鑷畾涔夋柟娉�"> <Input :style="{ width: '85%' }" v-model:value="routeConfig.currentAct.ACT_CODE" :min="0" :step="1" /> <a-button class="mt-1 ml-1" size="small" @click="handleSelectItem(item)" preIcon="search|svg" /> - <NormalModal @register="registerItemAdd" @success="handleItemSuccess" /> + <GeneralModal @register="registerItemAdd" @success="handleItemSuccess" /> </FormItem> <FormItem label="鏄惁璁剧疆鎵嶈兘涓嬪彂鐢熶骇(Y/N)" name="鏄惁璁剧疆鎵嶈兘涓嬪彂鐢熶骇(Y/N)"> <Select ref="select" v-model:value="routeConfig.currentAct.NEED_SETUP" style="width: 150px" @@ -46,7 +46,7 @@ <script lang="ts" setup> import { Select, Input, Form, FormItem, Tag } from 'ant-design-vue'; import { useRouteDesignState } from '../hooks/useRouteDesignState'; -import NormalModal from '/@/views/components/NormalModal.vue'; +import GeneralModal from '/@/views/components/GeneralModal.vue'; import { SelectTypes } from 'ant-design-vue/es/select'; import { ApiSelect } from '/@/components/Form/index'; import { h, ref, unref, watch } from 'vue'; diff --git a/src/views/tigerprojects/mes/eng/route/components/PostProps.vue b/src/views/tigerprojects/mes/eng/route/components/PostProps.vue index e35a37e..1c101d6 100644 --- a/src/views/tigerprojects/mes/eng/route/components/PostProps.vue +++ b/src/views/tigerprojects/mes/eng/route/components/PostProps.vue @@ -31,7 +31,7 @@ </BasicTable> </div> - <NormalModal @register="register" @success="handleSuccess"></NormalModal> + <GeneralModal @register="register" @success="handleSuccess"></GeneralModal> </template> <script lang="ts" setup> import { notification } from 'ant-design-vue'; @@ -39,7 +39,7 @@ import { SizeType } from 'ant-design-vue/es/config-provider'; import { nextTick, onMounted, ref, unref, watch } from 'vue'; import { useModal } from '/@/components/Modal'; -import NormalModal from '/@/views/components/NormalModal.vue'; +import GeneralModal from '/@/views/components/GeneralModal.vue'; import { useI18n } from '/@/hooks/web/useI18n'; import { DeleteEntity, DeleteWhere, SaveEntity, getEntity, getListByPage } from '/@/api/tigerapi/system'; import { useRouteDesignState } from '../hooks/useRouteDesignState'; diff --git a/src/views/tigerprojects/mes/prod/biz_mes_wo/WoDrawer.vue b/src/views/tigerprojects/mes/prod/biz_mes_wo/WoDrawer.vue index ccd186f..7ad50a9 100644 --- a/src/views/tigerprojects/mes/prod/biz_mes_wo/WoDrawer.vue +++ b/src/views/tigerprojects/mes/prod/biz_mes_wo/WoDrawer.vue @@ -16,7 +16,7 @@ @click="handleSelectItem" preIcon="search|svg" /> - <NormalModal @register="registerItemAdd" @success="handleItemSuccess" /> + <GeneralModal @register="registerItemAdd" @success="handleItemSuccess" /> </template> </BasicForm> </BasicDrawer> @@ -29,7 +29,7 @@ import { SaveEntity } from '/@/api/tigerapi/system'; import { useUserStore } from '/@/store/modules/user'; import { useI18n } from '/@/hooks/web/useI18n'; - import NormalModal from '/@/views/components/NormalModal.vue'; + import GeneralModal from '/@/views/components/GeneralModal.vue'; import { useModal } from '/@/components/Modal'; const { t } = useI18n(); diff --git a/src/views/tigerprojects/mes/prod/biz_mes_wo/index.vue b/src/views/tigerprojects/mes/prod/biz_mes_wo/index.vue index f312b1d..fcab497 100644 --- a/src/views/tigerprojects/mes/prod/biz_mes_wo/index.vue +++ b/src/views/tigerprojects/mes/prod/biz_mes_wo/index.vue @@ -23,7 +23,7 @@ @click="handleSelectItem" preIcon="search|svg" /> - <NormalModal @register="registerItemAdd" @success="handleItemSuccess" /> + <GeneralModal @register="registerItemAdd" @success="handleItemSuccess" /> </template> <template #action="{ record }"> <TableAction @@ -88,7 +88,7 @@ @click="handleCustClick(field)" :preIcon="item.preIcons[name]" /> - <NormalModal + <GeneralModal @register="useModalData[name][0]" @success="(d, u) => handleEntSuccess(d, u, item.name)" /> @@ -108,7 +108,7 @@ import { BasicForm, FormSchema, FormActionType, useForm } from '/@/components/Form/index'; import WoDrawer from './WoDrawer.vue'; import WoModal from './WoModal.vue'; - import NormalModal from '/@/views/components/NormalModal.vue'; + import GeneralModal from '/@/views/components/GeneralModal.vue'; import RouteViewModal from '/@/views/components/RouteViewModal.vue'; import CustModal from '/@/views/components/CustModal.vue'; import { useDrawer } from '/@/components/Drawer'; diff --git a/src/views/tigerprojects/system/lowcode/composition/DeptModal.vue b/src/views/tigerprojects/system/lowcode/composition/DeptModal.vue deleted file mode 100644 index 71b2d85..0000000 --- a/src/views/tigerprojects/system/lowcode/composition/DeptModal.vue +++ /dev/null @@ -1,58 +0,0 @@ -<template> - <BasicModal v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit"> - <BasicForm @register="registerForm" /> - </BasicModal> -</template> -<script lang="ts" setup> - import { ref, computed, unref } from 'vue'; - import { BasicModal, useModalInner } from '@/components/Modal'; - import { BasicForm, useForm } from '@/components/Form'; - import { formSchema } from './dept.data'; - - import { getTreeList } from '@/api/tigerapi/dept'; - - defineOptions({ name: 'DeptModal' }); - - const emit = defineEmits(['success', 'register']); - - const isUpdate = ref(true); - - const [registerForm, { resetFields, setFieldsValue, updateSchema, validate }] = useForm({ - labelWidth: 100, - baseColProps: { span: 24 }, - schemas: formSchema, - showActionButtonGroup: false, - }); - - const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { - resetFields(); - setModalProps({ confirmLoading: false }); - isUpdate.value = !!data?.isUpdate; - - if (unref(isUpdate)) { - setFieldsValue({ - ...data.record, - }); - } - const treeData = await getTreeList(); - updateSchema({ - field: 'parentDept', - componentProps: { treeData }, - }); - }); - - const getTitle = computed(() => (!unref(isUpdate) ? '鏂板閮ㄩ棬' : '缂栬緫閮ㄩ棬')); - - async function handleSubmit() { - try { - const values = await validate(); - setModalProps({ confirmLoading: true }); - // TODO custom api - console.log(values); - closeModal(); - emit('success'); - } finally { - setModalProps({ confirmLoading: false }); - } - } -</script> diff --git a/src/views/tigerprojects/system/lowcode/composition/account.data.ts b/src/views/tigerprojects/system/lowcode/composition/account.data.ts deleted file mode 100644 index 9a24fad..0000000 --- a/src/views/tigerprojects/system/lowcode/composition/account.data.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { getAllRoleList, isAccountExist } from '@/api/demo/system'; -import { BasicColumn, FormSchema } from '@/components/Table'; - -/** - * transform mock data - * { - * 0: '鍗庝笢鍒嗛儴', - * '0-0': '鍗庝笢鍒嗛儴-鐮斿彂閮�' - * '0-1': '鍗庝笢鍒嗛儴-甯傚満閮�', - * ... - * } - */ -export const deptMap = (() => { - const pDept = ['鍗庝笢鍒嗛儴', '鍗庡崡鍒嗛儴', '瑗垮寳鍒嗛儴']; - const cDept = ['鐮斿彂閮�', '甯傚満閮�', '鍟嗗姟閮�', '璐㈠姟閮�']; - - return pDept.reduce((map, p, pIdx) => { - map[pIdx] = p; - - cDept.forEach((c, cIndex) => (map[`${pIdx}-${cIndex}`] = `${p}-${c}`)); - - return map; - }, {}); -})(); - -export const columns: BasicColumn[] = [ - { - title: '鐢ㄦ埛鍚�', - dataIndex: 'account', - width: 120, - }, - { - title: '鏄电О', - dataIndex: 'nickname', - width: 120, - }, - { - title: '閭', - dataIndex: 'email', - width: 120, - }, - { - title: '鍒涘缓鏃堕棿', - dataIndex: 'createTime', - width: 180, - }, - { - title: '瑙掕壊', - dataIndex: 'role', - width: 200, - }, - { - title: '鎵�灞為儴闂�', - dataIndex: 'dept', - customRender: ({ value }) => { - return deptMap[value]; - }, - }, - { - title: '澶囨敞', - dataIndex: 'remark', - }, -]; - -export const searchFormSchema: FormSchema[] = [ - { - field: 'account', - label: '鐢ㄦ埛鍚�', - component: 'Input', - colProps: { span: 8 }, - }, - { - field: 'nickname', - label: '鏄电О', - component: 'Input', - colProps: { span: 8 }, - }, -]; - -export const accountFormSchema: FormSchema[] = [ - { - field: 'account', - label: '鐢ㄦ埛鍚�', - component: 'Input', - helpMessage: ['鏈瓧娈垫紨绀哄紓姝ラ獙璇�', '涓嶈兘杈撳叆甯︽湁admin鐨勭敤鎴峰悕'], - rules: [ - { - required: true, - message: '璇疯緭鍏ョ敤鎴峰悕', - }, - { - trigger: 'blur', - validator(_, value) { - return new Promise((resolve, reject) => { - if (!value) return resolve(); - isAccountExist(value) - .then(resolve) - .catch((err) => { - reject(err.message || '楠岃瘉澶辫触'); - }); - }); - }, - }, - ], - }, - { - field: 'pwd', - label: '瀵嗙爜', - component: 'InputPassword', - required: true, - ifShow: false, - }, - { - label: '瑙掕壊', - field: 'role', - component: 'ApiSelect', - componentProps: { - api: getAllRoleList, - labelField: 'roleName', - valueField: 'roleValue', - }, - required: true, - }, - { - field: 'dept', - label: '鎵�灞為儴闂�', - component: 'TreeSelect', - componentProps: { - fieldNames: { - label: 'deptName', - value: 'id', - }, - getPopupContainer: () => document.body, - }, - required: true, - }, - { - field: 'nickname', - label: '鏄电О', - component: 'Input', - required: true, - }, - - { - label: '閭', - field: 'email', - component: 'Input', - required: true, - }, - - { - label: '澶囨敞', - field: 'remark', - component: 'InputTextArea', - }, -]; diff --git a/src/views/tigerprojects/system/lowcode/composition/dept.data.ts b/src/views/tigerprojects/system/lowcode/composition/dept.data.ts deleted file mode 100644 index 1491215..0000000 --- a/src/views/tigerprojects/system/lowcode/composition/dept.data.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { BasicColumn, FormSchema } from '@/components/Table'; -import { h } from 'vue'; -import { Tag } from 'ant-design-vue'; - -export const columns: BasicColumn[] = [ - { - title: '閮ㄩ棬鍚嶇О', - dataIndex: 'deptName', - width: 160, - align: 'left', - }, - { - title: '鎺掑簭', - dataIndex: 'orderNo', - width: 50, - }, - { - title: '鐘舵��', - dataIndex: 'status', - width: 80, - customRender: ({ record }) => { - const status = record.status; - const enable = ~~status === 0; - const color = enable ? 'green' : 'red'; - const text = enable ? '鍚敤' : '鍋滅敤'; - return h(Tag, { color: color }, () => text); - }, - }, - { - title: '鍒涘缓鏃堕棿', - dataIndex: 'createTime', - width: 180, - }, - { - title: '澶囨敞', - dataIndex: 'remark', - }, -]; - -export const searchFormSchema: FormSchema[] = [ - { - field: 'deptName', - label: '閮ㄩ棬鍚嶇О', - component: 'Input', - colProps: { span: 8 }, - }, - { - field: 'status', - label: '鐘舵��', - component: 'Select', - componentProps: { - options: [ - { label: '鍚敤', value: '0' }, - { label: '鍋滅敤', value: '1' }, - ], - }, - colProps: { span: 8 }, - }, -]; - -export const formSchema: FormSchema[] = [ - { - field: 'deptName', - label: '閮ㄩ棬鍚嶇О', - component: 'Input', - required: true, - }, - { - field: 'parentDept', - label: '涓婄骇閮ㄩ棬', - component: 'TreeSelect', - ifShow({ values }) { - const { deptName, parentDept } = values; - // Hide without a parentDept when editing - return parentDept || (!deptName && !parentDept); - }, - componentProps: { - fieldNames: { - label: 'deptName', - value: 'id', - }, - getPopupContainer: () => document.body, - }, - required: true, - }, - { - field: 'orderNo', - label: '鎺掑簭', - component: 'InputNumber', - required: true, - }, - { - field: 'status', - label: '鐘舵��', - component: 'RadioButtonGroup', - defaultValue: '0', - componentProps: { - options: [ - { label: '鍚敤', value: '0' }, - { label: '鍋滅敤', value: '1' }, - ], - }, - required: true, - }, - { - label: '澶囨敞', - field: 'remark', - component: 'InputTextArea', - }, -]; diff --git a/src/views/tigerprojects/system/lowcode/composition/index.vue b/src/views/tigerprojects/system/lowcode/composition/index.vue index 079bbf6..6657b6b 100644 --- a/src/views/tigerprojects/system/lowcode/composition/index.vue +++ b/src/views/tigerprojects/system/lowcode/composition/index.vue @@ -1,6 +1,6 @@ <template> <PageWrapper dense contentFullHeight fixedHeight contentClass="flex"> - <CustTree + <GeneralTree class="w-1/4 xl:w-1/5" @select="handleSelect" :title="title" @@ -10,7 +10,8 @@ /><!-- add @handle-add="handleAdd" --> - <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable"> + <div class="w-3/4 xl:w-4/5"></div> + <!-- <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable"> <template #toolbar> <a-button type="primary" @click="handleCreate" preIcon="add_02|svg"> 鏂板 </a-button> </template> @@ -19,7 +20,7 @@ <TableAction :actions="createActions(record)" /> </template> </template> - </BasicTable> + </BasicTable> --> <normalDrawer @register="registerDrawer" @success="handleSuccess" /> <CustModal @register="registerCust" @@ -38,7 +39,7 @@ @click="handleCustClick(field)" :preIcon="item.preIcons[name]" /> - <NormalModal + <GeneralModal @register="useModalData[name][0]" @success="(d, u) => handleEntSuccess(d, u, item.name)" /> @@ -50,15 +51,12 @@ </PageWrapper> </template> <script lang="ts" setup> - import { BasicTable, useTable, TableAction } from '@/components/Table'; - import { getEntity, getRoleListByPage, convertToTree } from '@/api/tigerapi/system'; import { PageWrapper } from '@/components/Page'; - import CustTree from './CustTree.vue'; + import GeneralTree from '/@/views/components/GeneralTree.vue'; import { useModal } from '@/components/Modal'; import normalDrawer from '../normalDrawer.vue'; - import NormalModal from '/@/views/components/NormalModal.vue'; + import GeneralModal from '/@/views/components/GeneralModal.vue'; import CustModal from '/@/views/components/CustModal.vue'; - import { columns, searchFormSchema } from './dept.data'; import { GetActionsData, GetSelectSuccess, @@ -73,11 +71,13 @@ import { BasicForm, useForm } from '/@/components/Form/index'; import { TreeItem } from '/@/components/TigerTree'; import { createIconByType } from '../data'; -import { RouteToProd } from '/@/api/tigerapi/mes/router'; + import { RouteToProd } from '/@/api/tigerapi/mes/router'; +import { useTabs } from '/@/hooks/web/useTabs'; defineOptions({ name: 'DeptManagement' }); const route = useRoute(); + const { setTitle } = useTabs(); const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); const entityName = ref(objParams.value.Name); const formSchemas = ref({}); //寮瑰嚭妗嗘垨楂樼骇椤甸潰澶氳〃鍗曠粨鏋� @@ -98,29 +98,30 @@ const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); const [registerItemAdd, { openModal: openItemModal }] = useModal(); const [registerDrawer, { openDrawer }] = useDrawer(); - 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, - }, - }); + 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: 鑾峰彇鏍戝舰鏁版嵁 @@ -129,7 +130,7 @@ */ async function fetch(type: string) { //鏍规嵁type鑾峰彇鏍戝舰鏁版嵁 - const data = await fetchTreeData(type); + const data = await fetchTreeData(type, objParams.value.CODE); title.value = data.title; treeData.value = data.treeData; fieldNames.value = data.fieldNames; @@ -159,25 +160,25 @@ * @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, - ); + // 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, + // ); } /** diff --git a/src/views/tigerprojects/system/lowcode/composition/prodRoute.ts b/src/views/tigerprojects/system/lowcode/composition/prodRoute.ts index a4fb749..e9d039a 100644 --- a/src/views/tigerprojects/system/lowcode/composition/prodRoute.ts +++ b/src/views/tigerprojects/system/lowcode/composition/prodRoute.ts @@ -4,7 +4,7 @@ * @version: * @Date: 2024-06-19 20:34:27 * @LastEditors: Ben Lin - * @LastEditTime: 2024-06-20 00:24:28 + * @LastEditTime: 2024-06-20 08:57:57 */ /** @@ -16,7 +16,7 @@ let icon = ''; switch (params['type']) { case 'Product': - icon = 'product|svg'; + icon = 'similar-product|svg'; break; case 'Route': icon = 'route|svg'; diff --git a/src/views/tigerprojects/system/lowcode/data.ts b/src/views/tigerprojects/system/lowcode/data.ts index a398732..da78127 100644 --- a/src/views/tigerprojects/system/lowcode/data.ts +++ b/src/views/tigerprojects/system/lowcode/data.ts @@ -696,11 +696,11 @@ * @param {string} type * @return {*} */ -export async function fetchTreeData(type: string) { +export async function fetchTreeData(type: string, itemCode: string) { let data = { title: '', treeData: [] as any[], fieldNames: {} }; switch (type) { - case 'Customer': - let prodTreeData = await GetRoutePTree('K5019AA013517'); + case 'ProdRouteBinding': + let prodTreeData = await GetRoutePTree(itemCode); data.treeData = convertToTree(prodTreeData, 'pid', 'id', 'root'); data.title = '宸ヨ壓璺嚎'; data.fieldNames = { key: 'id', title: 'name' } @@ -722,7 +722,7 @@ export function createIconByType(params: Recordable<any>, type: string) { let icon = ''; switch (type) { - case 'Customer': + case 'ProdRouteBinding': icon = prodRouteCreateIcon(params); break; } diff --git a/src/views/tigerprojects/system/lowcode/detail/index.vue b/src/views/tigerprojects/system/lowcode/detail/index.vue index 3b75000..d0f77e8 100644 --- a/src/views/tigerprojects/system/lowcode/detail/index.vue +++ b/src/views/tigerprojects/system/lowcode/detail/index.vue @@ -48,7 +48,7 @@ <template #[item]="{ field }" v-for="item in colSlots" :key="item"> <a-button v-if="field" class="mt-1 ml-1" size="small" @click="handleSelectItem(item)" preIcon="search|svg" /> - <NormalModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> + <GeneralModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> </template> </BasicTable> </div> @@ -60,7 +60,7 @@ <template #[item]="{ field }" v-for="item in secondColSlots" :key="item"> <a-button v-if="field" class="mt-1 ml-1" size="small" @click="handleSelectItem(item)" preIcon="search|svg" /> - <NormalModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> + <GeneralModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> </template> </BasicTable> </div> @@ -73,7 +73,7 @@ <!-- 鐢ㄦ彃妲借嚜瀹氫箟寮瑰嚭閫夋嫨妗� --> <template #[name]="{ field }" v-for="name in item.slots" :key="name"> <a-button class="mt-1 ml-1" size="small" @click="handleCustClick(field)" :preIcon="item.preIcons[name]" /> - <NormalModal @register="useModalData[name][0]" @success="(d, u) => handleEntSuccess(d, u, item.name)" /> + <GeneralModal @register="useModalData[name][0]" @success="(d, u) => handleEntSuccess(d, u, item.name)" /> </template> </BasicForm> <!-- 鑷畾涔夊唴瀹� --> @@ -97,7 +97,7 @@ import { DeleteEntity, getListByPage } from '/@/api/tigerapi/system'; import { useDrawer } from '/@/components/Drawer'; import normalDrawer from '../normalDrawer.vue'; -import NormalModal from '/@/views/components/NormalModal.vue'; +import GeneralModal from '/@/views/components/GeneralModal.vue'; import CustModal from '/@/views/components/CustModal.vue'; import { BasicForm } from '/@/components/Form/index'; import { useGlobSetting } from '/@/hooks/setting'; diff --git a/src/views/tigerprojects/system/lowcode/high/index.vue b/src/views/tigerprojects/system/lowcode/high/index.vue index 97e8611..c51a259 100644 --- a/src/views/tigerprojects/system/lowcode/high/index.vue +++ b/src/views/tigerprojects/system/lowcode/high/index.vue @@ -59,7 +59,7 @@ <!-- <template #form-BAS_REASON3aadd="{ field }"> --> <a-button v-if="field" class="mt-1 ml-1" size="small" @click="handleSelectItem(item)" preIcon="search|svg" /> - <NormalModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> + <GeneralModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> </template> </BasicTable> </div> @@ -80,7 +80,7 @@ <!-- 鐢ㄦ彃妲借嚜瀹氫箟寮瑰嚭閫夋嫨妗� --> <template #[name]="{ field }" v-for="name in item.slots" :key="name"> <a-button class="mt-1 ml-1" size="small" @click="handleCustClick(field)" :preIcon="item.preIcons[name]" /> - <NormalModal @register="useModalData[name][0]" @success="(d, u) => handleEntSuccess(d, u, item.name)" /> + <GeneralModal @register="useModalData[name][0]" @success="(d, u) => handleEntSuccess(d, u, item.name)" /> </template> </BasicForm> <!-- 鑷畾涔夊唴瀹� --> @@ -95,7 +95,7 @@ import { useDrawer } from '/@/components/Drawer'; import { PageWrapper } from '/@/components/Page'; import normalDrawer from '../normalDrawer.vue'; -import NormalModal from '/@/views/components/NormalModal.vue'; +import GeneralModal from '/@/views/components/GeneralModal.vue'; import { AddListEntity, DeleteEntity, DeleteWhere, GetEnum, SaveEntity, getEntity, getListByPage } from '/@/api/tigerapi/system'; import { useGlobSetting } from '/@/hooks/setting'; import { useRoute, useRouter } from 'vue-router'; diff --git a/src/views/tigerprojects/system/lowcode/normal/index.vue b/src/views/tigerprojects/system/lowcode/normal/index.vue index 557e50b..752c6cf 100644 --- a/src/views/tigerprojects/system/lowcode/normal/index.vue +++ b/src/views/tigerprojects/system/lowcode/normal/index.vue @@ -3,8 +3,8 @@ * @Author: Ben Lin * @version: * @Date: 2024-05-30 13:28:20 - * @LastEditors: your name - * @LastEditTime: 2024-06-16 00:41:25 + * @LastEditors: Ben Lin + * @LastEditTime: 2024-06-20 09:21:32 --> <template> <div> @@ -18,7 +18,7 @@ <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" /> - <NormalModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> + <GeneralModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> </template> </BasicTable> <normalDrawer @register="registerDrawer" @success="handleSuccess" /> @@ -29,7 +29,7 @@ <!-- 鐢ㄦ彃妲借嚜瀹氫箟寮瑰嚭閫夋嫨妗� --> <template #[name]="{ field }" v-for="name in item.slots" :key="name"> <a-button class="mt-1 ml-1" size="small" @click="handleCustClick(field)" :preIcon="item.preIcons[name]" /> - <NormalModal @register="useModalData[name][0]" @success="(d, u) => handleEntSuccess(d, u, item.name)" /> + <GeneralModal @register="useModalData[name][0]" @success="(d, u) => handleEntSuccess(d, u, item.name)" /> </template> </BasicForm> <!-- 鑷畾涔夊唴瀹� --> @@ -42,7 +42,7 @@ import { BasicTable, useTable, TableAction, BasicColumn, FormSchema } from '/@/components/Table'; import { useDrawer } from '/@/components/Drawer'; import normalDrawer from '../normalDrawer.vue'; -import NormalModal from '/@/views/components/NormalModal.vue'; +import GeneralModal from '/@/views/components/GeneralModal.vue'; import { GetEnum, getEntity, getListByPage } from '/@/api/tigerapi/system'; import { useGlobSetting } from '/@/hooks/setting'; import { useRoute } from 'vue-router'; diff --git a/src/views/tigerprojects/system/lowcode/normalDrawer.vue b/src/views/tigerprojects/system/lowcode/normalDrawer.vue index 3963be5..b8cdb53 100644 --- a/src/views/tigerprojects/system/lowcode/normalDrawer.vue +++ b/src/views/tigerprojects/system/lowcode/normalDrawer.vue @@ -35,7 +35,7 @@ <BasicForm @register="registerForm"> <template #[item]="{ field }" v-for="item in crudColSlots" :key="item"> <a-button v-if="field" class="mt-1 ml-1" size="small" @click="handleSelectItem(item)" preIcon="search|svg" /> - <NormalModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> + <GeneralModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> </template> </BasicForm> </BasicDrawer> @@ -45,7 +45,7 @@ import { BasicForm, FormSchema, useForm } from '/@/components/Form/index'; import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; import { useGlobSetting } from '/@/hooks/setting'; -import NormalModal from '/@/views/components/NormalModal.vue'; +import GeneralModal from '/@/views/components/GeneralModal.vue'; import { SaveEntity, fetchJson, formatValues } from '/@/api/tigerapi/system'; import { useModal } from '/@/components/Modal'; import { GetSelectSuccess, OpenSelectItem } from './data'; -- Gitblit v1.9.3