| | |
| | | <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" |
| | | :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop" |
| | | :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true" |
| | | :sortable="item.sortable ? true : false" :type="item.type" |
| | | :width="item.dataType === 'action' ? getWidth(item.operation) : item.width" align="center"> |
| | | :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true |
| | | " :sortable="item.sortable ? true : false" :type="item.type" :width="item.dataType === 'action' ? getWidth(item.operation) : item.width |
| | | " align="center"> |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | | <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" slot-scope="scope"> |
| | | <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" /> |
| | |
| | | @click="o.clickFun(scope.row)" :key="key"> |
| | | {{ o.name }} |
| | | </el-button> |
| | | <el-upload :action="javaApi + o.url + '?id=' + (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)" |
| | | size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false" :limit="1" |
| | | <el-upload :action="javaApi + |
| | | o.url + |
| | | '?id=' + |
| | | (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id) |
| | | " size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false" :limit="1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination v-if="page" v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current" |
| | | :limit.sync="page.size" @pagination="pagination" /> |
| | | :limit.sync="page.size" @pagination="pagination" style="background-color: #fff" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | name: "ZTTable", |
| | | filters: { |
| | | typeFn(val, row) { |
| | | // console.log(val, row, '11111111'); |
| | | if (typeof val === "function") { |
| | | return val(row); |
| | | } else return val; |
| | |
| | | default: () => { }, |
| | | }, |
| | | rowStyle: { |
| | | type: Object || Function, |
| | | default: () => { }, |
| | | type: Function, |
| | | // default: () => { }, |
| | | }, |
| | | tableData: { |
| | | type: Array, |