| | |
| | | height |
| | | ? fixHeight |
| | | ? fixHeight |
| | | : undefined |
| | | : '100px' |
| | | : $store.getters.tableHeight - otherHeight |
| | | " |
| | | v-bind="$attrs" |
| | |
| | | :span-method="objectSpanMethod" |
| | | :header-cell-style="tableHeaderStyle" |
| | | v-adaptive="{ bottomOffset: bottomOffset, fixedHeight: fixedHeight }" |
| | | height="100px" |
| | | :class="[ |
| | | 'commonTable', |
| | | isGeneralSearch && !isEdit |
| | |
| | | :sortable="!isEdit ? (item.sort ? 'custom' : item.sort) : false" |
| | | v-bind="$attrs" |
| | | v-on="$listeners" |
| | | v-if="item.isTrue" |
| | | v-show="item.isTrue" |
| | | :class-name=" |
| | | (orderBy == null && item.prop == options.defaultOrderBy.column) || |
| | | (orderBy != null && |
| | |
| | | :width="inMemoryColWidth[item.prop] || item.width" |
| | | :prop="item.prop" |
| | | > |
| | | <template slot="header" slot-scope="scope"> |
| | | <template slot="header"> |
| | | <template v-if="item.isSearch"> |
| | | <div class="th" @click.stop> |
| | | <template |
| | |
| | | <template v-else> |
| | | <template v-if="!item.render"> |
| | | <template v-if="item.formatter"> |
| | | <div v-if="item.isTag" style="margin: 2px;text-align: center;"> |
| | | <el-tag :type="scope.row[item.prop]==0?'success':'info'">{{item.formatter(scope.row, item, scope.row[item.prop])}}</el-tag> |
| | | </div> |
| | | <span |
| | | v-else |
| | | v-html=" |
| | | item.formatter(scope.row, item, scope.row[item.prop]) |
| | | " |
| | |
| | | </el-dialog> |
| | | <el-dialog title="导入" :visible.sync="importDialogVisible" width="22%"> |
| | | <span> |
| | | <div> |
| | | <div> |
| | | <div style="width: 100%;"> |
| | | <div style="width: 100%;"> |
| | | <el-upload |
| | | style="margin-left:8px;display: inline;" |
| | | style="margin-left:8px;display: inline;width: 100%;" |
| | | class="upload-demo" |
| | | drag |
| | | :headers="headers" |
| | |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text"><em>点击导入数据</em></div> |
| | | <div class="el-upload__tip" slot="tip"> |
| | | 只能上传xlsx/xls文件,且不超过10M<el-button |
| | | <span v-if="uploadInfo.tipText" v-text="uploadInfo.tipText"></span> |
| | | <span v-else>只能上传xlsx/xls文件,且不超过30M。</span> |
| | | <el-button |
| | | type="text" |
| | | style="font-size:15px;text-decoration: underline;" |
| | | @click="downDataTemplate" |
| | |
| | | this.colSelectDialogVisible = true |
| | | this.handleCheckedCol() |
| | | }, |
| | | // 限制文件上传大小,目前限制为10M(另可以加类型限制) |
| | | // 限制文件上传大小,目前限制为30M(另可以加类型限制) |
| | | |
| | | beforeAvatarUpload(file) { |
| | | const fileName = file.name |
| | | const fileType = fileName.substring(fileName.lastIndexOf('.') + 1) |
| | | const isLt10M = file.size / 1024 / 1024 < 10 |
| | | if (fileType !== 'xlsx' && fileType !== 'xls') { |
| | | this.$message.error('文件格式只能为xlsx或xls,请删除后重新上传') |
| | | const isLt10M = file.size / 1024 / 1024 < 30 |
| | | if (fileType !== 'xlsx' && fileType !== 'xls'&&fileType!=='csv') { |
| | | this.$message.error('文件格式只能为xlsx或xls、csv,请删除后重新上传') |
| | | } |
| | | if (!isLt10M) { |
| | | this.$message({ |
| | |
| | | type: 'success' |
| | | }) |
| | | this.getDataList() |
| | | this.importDialogVisible=false |
| | | } |
| | | this.$refs.uploadScan.clearFiles() |
| | | }, |
| | |
| | | font-size: 14px; |
| | | visibility: hidden; |
| | | } |
| | | .upload-demo{ |
| | | width: 100%; |
| | | } |
| | | .el-upload-dragger { |
| | | width: 300px !important; |
| | | } |
| | | </style> |