| | |
| | | <el-table-column v-if="ck" type="selection" :fixed="fixed" :selectable="selectable" width="55"></el-table-column> |
| | | |
| | | <!-- 2020.10.10ç§»é¤table第ä¸è¡å¼ºå¶æåº --> |
| | | <el-table-column v-for="(column, cindex) in filterColumns " :prop="column.field" :label="column.title" |
| | | <el-table-column v-for="(column, cindex) in filterColumns" :prop="column.field" :label="column.title" |
| | | :min-width="column.width" :formatter="formatter" :fixed="column.fixed" :key="column.field + cindex" |
| | | :align="column.align" :sortable="column.sort ? 'custom' : false" :show-overflow-tooltip="true"> |
| | | <template #header> |
| | |
| | | <!-- 2020.07.24å¢å æ¥æonChangeäºä»¶ --> |
| | | <el-date-picker clearable size="default" style="width: 100%" |
| | | v-if="['date', 'datetime'].indexOf(column.edit.type) != -1" v-model="scope.row[column.field]" @change="(val) => { |
| | | column.onChange && column.onChange(scope.row, column, val) |
| | | } |
| | | column.onChange && column.onChange(scope.row, column, val) |
| | | } |
| | | " :type="column.edit.type" :placeholder="column.placeholder || column.title" |
| | | :disabledDate="(val) => getDateOptions(val, column)" :value-format="getDateFormat(column)" |
| | | :disabled="initColumnDisabled(scope.row, column)"> |
| | | </el-date-picker> |
| | | <el-time-picker clearable size="default" style="width: 100%" v-else-if="column.edit.type == 'time'" |
| | | v-model="scope.row[column.field]" @change="(val) => { |
| | | column.onChange && column.onChange(scope.row, column, val) |
| | | } |
| | | column.onChange && column.onChange(scope.row, column, val) |
| | | } |
| | | " :placeholder="column.placeholder || column.title" :value-format="column.format || 'HH:mm:ss'" |
| | | :disabled="initColumnDisabled(scope.row, column)"> |
| | | </el-time-picker> |
| | | <el-switch v-else-if="column.edit.type == 'switch'" v-model="scope.row[column.field]" |
| | | active-color="#0f84ff" inactive-color="rgb(194 194 194)" active-text="æ¯" inactive-text="å¦" inline-prompt |
| | | @change="(val) => { |
| | | switchChange(val, scope.row, column) |
| | | } |
| | | switchChange(val, scope.row, column) |
| | | } |
| | | " :active-value="typeof scope.row[column.field] == 'boolean' |
| | | ? true |
| | | : typeof scope.row[column.field] == 'string' |
| | | ? '1' |
| | | : 1 |
| | | ? true |
| | | : typeof scope.row[column.field] == 'string' |
| | | ? '1' |
| | | : 1 |
| | | " :inactive-value="typeof scope.row[column.field] == 'boolean' |
| | | ? false |
| | | : typeof scope.row[column.field] == 'string' |
| | | ? '0' |
| | | : 0 |
| | | ? false |
| | | : typeof scope.row[column.field] == 'string' |
| | | ? '0' |
| | | : 0 |
| | | " :disabled="initColumnDisabled(scope.row, column)"> |
| | | </el-switch> |
| | | <template v-else-if="['select', 'selectList'].indexOf(column.edit.type) != -1"> |
| | |
| | | @click="dowloadFile(file)">{{ file.name }}</a> |
| | | <span v-else-if="column.type == 'date'">{{ formatterDate(scope.row, column) }}</span> |
| | | <div v-else-if="column.type == 'jsx'" @click="formatterClick(scope.row, column, $event)"> |
| | | <el-button v-for="item in column.formatter(scope.row, column) " :key="item" :type="item.type">{{ |
| | | item.name |
| | | <el-button v-for="item in column.formatter(scope.row, column)" :key="item" :type="item.type">{{ item.name |
| | | }}</el-button> |
| | | </div> |
| | | <div v-else-if="column.formatter" @click="formatterClick(scope.row, column, $event)" |
| | |
| | | {{ scope.row[column.field] }} |
| | | </div> |
| | | <div @click="() => { |
| | | column.click && formatterClick(scope.row, column) |
| | | } |
| | | column.click && formatterClick(scope.row, column) |
| | | } |
| | | " v-else-if="column.bind"> |
| | | <el-tag v-if="useTag" class="cell-tag" :class="[isEmptyTag(scope.row, column)]" |
| | | :type="getColor(scope.row, column)" :effect="column.effect">{{ formatter(scope.row, column, true) |