From 773469386cf5346ac3477407e60737ede858b0ff Mon Sep 17 00:00:00 2001 From: Cloud Zhang <941187371@qq.com> Date: 星期三, 22 五月 2024 18:52:22 +0800 Subject: [PATCH] 料站表优化 --- src/views/tigerprojects/mes/smt/smttable/SmttableDrawer.vue | 2 +- src/views/tigerprojects/mes/smt/smttable/SmttableModal.vue | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/views/tigerprojects/mes/smt/smttable/SmttableDrawer.vue b/src/views/tigerprojects/mes/smt/smttable/SmttableDrawer.vue index f1f9671..dcde489 100644 --- a/src/views/tigerprojects/mes/smt/smttable/SmttableDrawer.vue +++ b/src/views/tigerprojects/mes/smt/smttable/SmttableDrawer.vue @@ -4,7 +4,7 @@ @register="registerDrawer" showFooter :title="getTitle" - width="800px" + width="600px" @ok="handleSubmit" > <BasicForm @register="registerForm" /> diff --git a/src/views/tigerprojects/mes/smt/smttable/SmttableModal.vue b/src/views/tigerprojects/mes/smt/smttable/SmttableModal.vue index 90a7102..4670b1d 100644 --- a/src/views/tigerprojects/mes/smt/smttable/SmttableModal.vue +++ b/src/views/tigerprojects/mes/smt/smttable/SmttableModal.vue @@ -1,5 +1,5 @@ <template> - <BasicModal width="1200px" :height=400 v-bind="$attrs" ok-text="淇濆瓨" @register="register" :title="t('瀵煎叆宸ュ崟鏂欑珯琛�')" + <BasicModal width="1200px" :height=600 v-bind="$attrs" ok-text="淇濆瓨" @register="register" :title="t('瀵煎叆宸ュ崟鏂欑珯琛�')" @ok="handleSubmit"> <a-button style="position:relative;left: 100px;" @click="aoaToExcel" class="m-3"> 妯℃澘 </a-button> <ImpExcel style="width: 100px; position: relative; top:-56px" @success="loadDataSuccess" dateFormat="YYYY-MM-DD"> @@ -10,7 +10,7 @@ <a-card style="position: relative;top:-55px" :title="t('鍒楄〃')" :bordered="false"> <!-- :columns="dtlColumns" :dataSource="data" --> - <PageWrapper :minHeight="300" dense contentFullHeight contentClass="flex"> + <PageWrapper dense contentClass="flex"> <BasicTable :maxHeight="200" v-for="(table, index) in tableListRef" :key="index" :title="table.title" :columns="table.columns" :dataSource="table.dataSource" /> </PageWrapper> @@ -34,7 +34,7 @@ const { getLocale } = useLocale(); const { t } = useI18n(''); -const { createMessage } = useMessage(); +const { createMessage,createConfirm } = useMessage(); export default defineComponent({ components: { BasicModal, BasicForm, PageWrapper, ImpExcel,BasicTable }, props: { @@ -81,13 +81,16 @@ if(status=='鏁版嵁寮傚父'){ color='red' text=status + }else if(status=='淇敼'){ + color='yellow' + text=status } else{ text=status } return h(Tooltip, { title: 'xxxxxx' }, () => h(Tag, { color: color }, () => text)); },}); - columns.push({title:'鍘熷洜',dataIndex:'鍘熷洜'}) + columns.push({title:'鍘熷洜',dataIndex:'鍘熷洜',width:300,resizable:true}) for (const title of header) { columns.push({ title, dataIndex: title }); } @@ -127,7 +130,12 @@ setModalProps({ confirmLoading: true }); // TODO custom api //娣诲姞閿¤啅鑳舵按璁板綍 - const apiAction = SaveExportTable(tableListRef.value); + createConfirm({ + iconType: 'warning', + title: () => h('span', t('瀵煎叆鏂欑珯琛ㄤ俊鎭�')), + content: () => h('span', t('寮傚父鐨勬暟鎹棤娉曞鍏�')), + onOk: async () => { + const apiAction = SaveExportTable(tableListRef.value); apiAction.then((action) => { if (action) { if (action.IsSuccessed) { @@ -142,6 +150,9 @@ createMessage.error(t('瀵煎叆澶辫触,浠g爜宸蹭娇鐢�')); } }); + } + }); + } finally { setModalProps({ confirmLoading: false }); } -- Gitblit v1.9.3