| | |
| | | :tree-props="{ children: 'child', hasChildren: 'hasChildren' }" |
| | | > |
| | | <el-table-column align="center" v-if="tableList.selectBox" type="selection" width="40"> </el-table-column> |
| | | <el-table-column align="center" v-if="tableList.selectIndex" type="index" label="序号" width="50"> </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | v-if="tableList.selectIndex" |
| | | type="index" |
| | | label="序号" |
| | | width="50" |
| | | :fixed="tableList.fixed" |
| | | > |
| | | </el-table-column> |
| | | <template v-for="(item, i) in tableList.tableColumn"> |
| | | <el-table-column |
| | | align="center" |
| | |
| | | show-overflow-tooltip |
| | | :sortable="item.sortable" |
| | | v-if="item.isShowColumn" |
| | | :fixed="item.fixed" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span v-if="item.price">{{ "¥" + number_format(scope.row[item.prop], 2, ".", ",") }}</span> |
| | |
| | | ? "--" |
| | | : dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop]) |
| | | }}</span> |
| | | <span v-else-if="item.isClick && scope.row[item.prop]" class="sel-name" @click="selCommonClick(scope.row)">{{ |
| | | scope.row[item.prop] |
| | | }}</span> |
| | | <span |
| | | v-else-if="item.isClick && scope.row[item.prop]" |
| | | class="sel-name" |
| | | @click="selCommonClick(scope.row)" |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <span v-else-if="item.isFirst">{{ scope.row[item.prop] ? "是" : "否" }}</span> |
| | | <span |
| | | v-else-if="item.isCommonClick && scope.row[item.prop]" |
| | |
| | | <div class="overSpread1" v-show="iscolopen" @click="onMaskClick"></div> |
| | | <div class="styleBtn"> |
| | | <i @click="checkCol()" v-if="colOpenShow" class="label">...</i> |
| | | <el-checkbox-group |
| | | v-model="showcol" |
| | | v-show="iscolopen" |
| | | class="checkbox-group" |
| | | @change="selectCheckBoxList" |
| | | > |
| | | <el-checkbox v-for="item in tableList.allcol" :label="item" :key="item" |
| | | >{{ item }} |
| | | </el-checkbox> |
| | | <el-checkbox-group v-model="showcol" v-show="iscolopen" class="checkbox-group" @change="selectCheckBoxList"> |
| | | <el-checkbox v-for="item in tableList.allcol" :label="item" :key="item">{{ item }} </el-checkbox> |
| | | </el-checkbox-group> |
| | | </div> |
| | | </div> |
| | |
| | | return { |
| | | selectBox: false, |
| | | selectIndex: false, |
| | | fixed: false, |
| | | tableInfomation: [], // 接口返回数据 |
| | | showcol: [], |
| | | allcol: [], |
| | |
| | | // 是否可以配置列表 表头 |
| | | colOpenShow: { |
| | | type: Boolean, |
| | | default: true, |
| | | default: true |
| | | }, |
| | | showSummary: { |
| | | type: Object, |
| | |
| | | } |
| | | }, |
| | | watch: { |
| | | 'tableList.showcol':{ |
| | | "tableList.showcol": { |
| | | handler(newVal){ |
| | | this.showcol=newVal |
| | | }, |
| | |
| | | computed: {}, |
| | | methods: { |
| | | onMaskClick() { |
| | | this.iscolopen = false; |
| | | this.iscolopen = false |
| | | }, |
| | | checkCol() { |
| | | this.iscolopen = !this.iscolopen; |
| | | this.iscolopen = !this.iscolopen |
| | | }, |
| | | selectCheckBoxList(val) { |
| | | this.$emit("selTableCol", val); |
| | | this.$emit("selTableCol", val) |
| | | }, |
| | | handleReserve(row) { |
| | | return row._id ? row._id : row.id |