Commit 684dd5c3 by 张珈源

Merge remote-tracking branch 'origin/weiqiao-vue3' into weiqiao-vue3

parents e037d690 12be930b
...@@ -16,7 +16,6 @@ VITE_DROP_CONSOLE = false ...@@ -16,7 +16,6 @@ VITE_DROP_CONSOLE = false
# 接口地址 # 接口地址
# 如果没有跨域问题,直接在这里配置即可 # 如果没有跨域问题,直接在这里配置即可
# VITE_GLOB_API_URL=http://192.168.8.37:8080
VITE_GLOB_API_URL=http://localhost:8080 VITE_GLOB_API_URL=http://localhost:8080
# 文件上传接口 可选 # 文件上传接口 可选
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<a-button <a-button
v-else v-else
:type="item.style" :type="item.style"
@click="customClick(item)" @click="() => { console.log('Button clicked directly:', item); customClick(item); }"
:disabled="disabled" :disabled="disabled"
class="mr-2" class="mr-2"
> >
...@@ -487,6 +487,7 @@ ...@@ -487,6 +487,7 @@
rowResize: Boolean, rowResize: Boolean,
height: Number, height: Number,
}); });
console.log('SubForm props:', { topButtonList: props.topButtonList });
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const userStore = useUserStore(); const userStore = useUserStore();
const data = ref<Recordable[]>([]); const data = ref<Recordable[]>([]);
...@@ -1667,7 +1668,6 @@ ...@@ -1667,7 +1668,6 @@
curRecord.value = index; curRecord.value = index;
curButtonModalConfig.value = executeButton.modal; curButtonModalConfig.value = executeButton.modal;
let obj = { let obj = {
selectedRows: selectedRowsData.value, selectedRows: selectedRowsData.value,
tableDatas: data.value, tableDatas: data.value,
...@@ -1675,7 +1675,7 @@ ...@@ -1675,7 +1675,7 @@
curIndex: index, curIndex: index,
formApi, formApi,
}; };
executeCurFormEvent(executeButton.event, formModel, isCamelCase, obj); executeCurFormEvent(executeButton.event, {}, isCamelCase, obj);
} }
function showModal(column, record, index) { function showModal(column, record, index) {
curRecord.value = index; curRecord.value = index;
......
...@@ -339,8 +339,10 @@ export const executeCustomEvent = (setting, api, releaseId, selectedKeys?, selec ...@@ -339,8 +339,10 @@ export const executeCustomEvent = (setting, api, releaseId, selectedKeys?, selec
}; };
//表单弹窗自定义按钮,表格组件和次级表格组件行内按钮,系统表单和自定义表单公用; //表单弹窗自定义按钮,表格组件和次级表格组件行内按钮,系统表单和自定义表单公用;
export const executeCurFormEvent = (setting, formModel, isCamelCase = false, tableData?) => { export const executeCurFormEvent = (setting, formModel, isCamelCase = false, tableData?) => {
console.log('executeCurFormEvent called:', { setting, formModel, isCamelCase, tableData });
if (setting?.length) { if (setting?.length) {
setting.forEach(async (item) => { setting.forEach(async (item) => {
console.log('Processing event item:', item);
if ( if (
item.operateType == ExecuteType.API && item.operateType == ExecuteType.API &&
item.operateConfig && item.operateConfig &&
......
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
function handleChange(val) { function handleChange(val) {
emits('update:value', val); emits('update:value', val);
} }
async function sendMessageForAllIframe() { async function sendMessageForAllIframe() {
try { try {
if (systemFormRef.value && systemFormRef.value.sendMessageForAllIframe) { if (systemFormRef.value && systemFormRef.value.sendMessageForAllIframe) {
systemFormRef.value.sendMessageForAllIframe(); systemFormRef.value.sendMessageForAllIframe();
......
...@@ -1052,9 +1052,18 @@ export const formProps: FormProps = { ...@@ -1052,9 +1052,18 @@ export const formProps: FormProps = {
label: '批量报检', label: '批量报检',
icon: 'ant-design:alert-outlined', icon: 'ant-design:alert-outlined',
style: 'primary', style: 'primary',
event: [], event: [
{
key: '1',
type: 2,
operateType: 2,
operateConfig: {
js: "if (formActionType.selectedRowsData && formActionType.selectedRowsData.length === 0) { formActionType.showMessage('请先勾选物料明细数据'); } else { const ids = formActionType.selectedRowsData.map(item => item.id); console.log('Extracted ids:', ids); formActionType.httpRequest({ requestUrl: '/ckgl/cgdh/quailty', requestType: 'put', params: ids, errorMessageMode: 'message' }).then(response => { console.log('Quality check response:', response); if (formActionType.showSuccessMessage) { formActionType.showSuccessMessage('报检处理成功!'); } else if (formActionType.message) { formActionType.message.success('报检处理成功!'); } else { formActionType.showMessage('报检处理成功!'); } if (formActionType.clearSelection) { formActionType.clearSelection(); } }).catch(error => { console.error('Quality check error:', error); formActionType.showMessage('批量报检失败,请重试!'); }); }"
}
}
],
type: 1, type: 1,
}, }
], ],
isExport: false, isExport: false,
isImport: false, isImport: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment