From f19edc96af3261347f48cb8f66f1f5b2feb6071e Mon Sep 17 00:00:00 2001 From: Fixiaobai <fixiaobai@163.com> Date: 星期五, 17 十一月 2023 16:43:54 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/zs-mes-before --- src/views/common/ztt-table.vue | 40 ++++++++++++++++++++++++++-------------- 1 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/views/common/ztt-table.vue b/src/views/common/ztt-table.vue index a64ec16..d7d6869 100644 --- a/src/views/common/ztt-table.vue +++ b/src/views/common/ztt-table.vue @@ -143,7 +143,7 @@ height ? fixHeight ? fixHeight - : undefined + : '100px' : $store.getters.tableHeight - otherHeight " v-bind="$attrs" @@ -168,7 +168,6 @@ :span-method="objectSpanMethod" :header-cell-style="tableHeaderStyle" v-adaptive="{ bottomOffset: bottomOffset, fixedHeight: fixedHeight }" - height="100px" :class="[ 'commonTable', isGeneralSearch && !isEdit @@ -226,7 +225,7 @@ :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 && @@ -250,7 +249,7 @@ :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 @@ -327,7 +326,11 @@ <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]) " @@ -478,12 +481,12 @@ <el-button type="primary" @click="startExport()">纭</el-button> </span> </el-dialog> - <el-dialog title="瀵煎叆" :visible.sync="importDialogVisible" width="30%"> + <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" @@ -503,9 +506,11 @@ <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:12px;" + style="font-size:15px;text-decoration: underline;" @click="downDataTemplate" >涓嬭浇妯℃澘</el-button > @@ -1540,14 +1545,14 @@ 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('鏂囦欢鏍煎紡鍙兘涓簒lsx鎴杧ls,璇峰垹闄ゅ悗閲嶆柊涓婁紶') + const isLt10M = file.size / 1024 / 1024 < 30 + if (fileType !== 'xlsx' && fileType !== 'xls'&&fileType!=='csv') { + this.$message.error('鏂囦欢鏍煎紡鍙兘涓簒lsx鎴杧ls銆乧sv,璇峰垹闄ゅ悗閲嶆柊涓婁紶') } if (!isLt10M) { this.$message({ @@ -1568,6 +1573,7 @@ type: 'success' }) this.getDataList() + this.importDialogVisible=false } this.$refs.uploadScan.clearFiles() }, @@ -1873,4 +1879,10 @@ font-size: 14px; visibility: hidden; } +.upload-demo{ + width: 100%; +} +.el-upload-dragger { + width: 300px !important; +} </style> -- Gitblit v1.9.3