|
|
@@ -4,7 +4,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<a-form ref="dynamicValidateForm" :model="dynamicValidateForm">
|
|
|
- <a-table v-if="!isMobile"
|
|
|
+ <a-table v-if="!isMobile&&(record?.options?.tableCard==undefined||record?.options?.tableCard==false)"
|
|
|
class="batch-table"
|
|
|
:rowKey="(column) => column.key"
|
|
|
:columns="columns"
|
|
|
@@ -82,6 +82,95 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
+ <div v-if="!isMobile&&record?.options?.tableCard==true">
|
|
|
+ <a-card v-for="(item, rowIdx) in firstData" :key="rowIdx" style="margin-bottom: 10px"
|
|
|
+ class="mobile-table">
|
|
|
+ <div v-for="(col, colIdx) in columns" :key="colIdx" class="mobile-table-item">
|
|
|
+ <div class="mobile-table-item-content" v-if="col.dataIndex === 'sequence_index_number'">
|
|
|
+ <div>
|
|
|
+ <span>
|
|
|
+ {{ col.title }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <a-tag>{{ rowIdx + 1 }}</a-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="mobile-table-item-content" v-if="col.dataIndex === 'dynamic-opr-button'">
|
|
|
+ <div class="mob-label">
|
|
|
+ <span>
|
|
|
+ {{ col.title }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <a-button v-if="!disabled" type="dashed" @click="removeDomain(item)" danger>
|
|
|
+ <template #icon>
|
|
|
+ <DeleteOutlined/>
|
|
|
+ </template>
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ <div class="mobile-table-item-content"
|
|
|
+ v-if="['sequence_index_number', 'dynamic-opr-button'].indexOf(col.dataIndex) === -1">
|
|
|
+ <div class="mob-label">
|
|
|
+ <span
|
|
|
+ v-if="
|
|
|
+ record.list.find((item) => item.model == col.dataIndex) &&
|
|
|
+ record.list.find((item) => item.model == col.dataIndex).rules[0].required
|
|
|
+ "
|
|
|
+ style="color: #ff4d4f; margin-right: 4px"
|
|
|
+ >*</span
|
|
|
+ >
|
|
|
+ <span>
|
|
|
+ {{ col.title }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mobile-tanle-form-item">
|
|
|
+ <StFormModelItem v-if="record.disableCell&&record.disableCell.find((item) =>item.y== col.dataIndex&&item.x==(rowIdx+1))
|
|
|
+"
|
|
|
+ :record="record.list.find((item) => item.model == col.dataIndex)"
|
|
|
+ :config="config"
|
|
|
+ :parentDisabled="true"
|
|
|
+ :index="record.list.findIndex((item) => item.model == col.dataIndex)"
|
|
|
+ :domains="dynamicValidateForm.domains"
|
|
|
+ :dynamicData="dynamicData"
|
|
|
+ :formData="formData"
|
|
|
+ :formConfig="formConfig"
|
|
|
+ :childTableFieldRecord="record.list"
|
|
|
+ :rowIndex="rowIdx"
|
|
|
+ v-model:value="item[record.list.find((item) => item.model == col.dataIndex).model]"
|
|
|
+ @input="handleInput"
|
|
|
+ :columns="columns"
|
|
|
+ :pagination="pagination"
|
|
|
+ :currentTableData="currentTableData"
|
|
|
+ :colIndex="colIdx"
|
|
|
+ />
|
|
|
+ <StFormModelItem v-else
|
|
|
+ :record="record.list.find((item) => item.model == col.dataIndex)"
|
|
|
+ :config="config"
|
|
|
+ :parentDisabled="disabled"
|
|
|
+ :index="record.list.findIndex((item) => item.model == col.dataIndex)"
|
|
|
+ :domains="dynamicValidateForm.domains"
|
|
|
+ :dynamicData="dynamicData"
|
|
|
+ :formData="formData"
|
|
|
+ :formConfig="formConfig"
|
|
|
+ :childTableFieldRecord="record.list"
|
|
|
+ :rowIndex="rowIdx"
|
|
|
+ v-model:value="item[record.list.find((item) => item.model == col.dataIndex).model]"
|
|
|
+ @input="handleInput"
|
|
|
+ :columns="columns"
|
|
|
+ :pagination="pagination"
|
|
|
+ :currentTableData="currentTableData"
|
|
|
+ :colIndex="colIdx"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ <a-button type="dashed" style="width: 100%"
|
|
|
+ v-show="this.dynamicValidateForm.domains&&this.dynamicValidateForm.domains.length>1"
|
|
|
+ @click="openChild=true">查看更多 (共有{{ this.dynamicValidateForm.domains.length }}条数据)
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
|
|
|
<div v-if="isMobile">
|
|
|
<a-card v-for="(item, rowIdx) in firstData" :key="rowIdx" style="margin-bottom: 10px"
|