From 2e9370979f871bf47f6dc145c49d7bf32ffa4b51 Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期一, 03 六月 2024 09:08:02 +0800 Subject: [PATCH] 完成光纤配置进行检验 --- src/components/tool/value-table.vue | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue index 0387ae4..127e63e 100644 --- a/src/components/tool/value-table.vue +++ b/src/components/tool/value-table.vue @@ -49,6 +49,9 @@ .handleBtn.is-disabled { color: #C0C4CC; } + .red{ + color: red !important; + } </style> <style> /* .value-table .highlight-warning-row-border td { @@ -136,7 +139,7 @@ @click="handleLinkEvent(scope.row,data.linkEvent[a.label])">{{scope.row[a.label]}}</span> <img style="width: 40px;height: 40px;margin-top: 10px;" :src="javaApi+'/img/'+scope.row[a.label]" v-else-if="showUpload(a.label)&&scope.row[a.label]" alt=""> - <span v-else>{{scope.row[a.label]}}</span> + <span v-else :class="{red:getRedColor(a.label,scope.row)}" >{{scope.row[a.label]}}</span> </template> </el-table-column> <el-table-column fixed="right" align="center" label="鎿嶄綔" :width="getWidth()" v-if="data.do.length > 0"> @@ -309,7 +312,7 @@ <el-dialog title="鏁版嵁瀵煎叆" :visible.sync="uploadDia" width="500px"> <div style="margin: 0 auto;"> <el-upload ref="upload" drag :action="javaApi + inputUrl" :headers="token" :file-list="fileList" name="file" - :auto-upload="false" accept=".csv" :limit="1" :on-change="beforeUpload" :on-success="onSuccess" + :auto-upload="false" :accept="data.accept===undefined?'.csv':data.accept" :limit="1" :on-change="beforeUpload" :on-success="onSuccess" :on-error="onError" :data="{param: data.uploadStr}"> <i class="el-icon-upload"></i> <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> @@ -764,6 +767,7 @@ } this.$message.success('鍒犻櫎鎴愬姛') this.selectList() + this.$emit('delete') }).catch(e => { this.$message.error('鍒犻櫎澶辫触') }) @@ -964,7 +968,8 @@ this.uploadDia = true }, beforeUpload(file, fileList) { - if (file.raw.type != 'text/csv') { + console.log(file.raw.type); + if (file.raw.type != (this.data.inputType===undefined?'text/csv':this.data.inputType)) { this.$message.error('涓婁紶鏂囦欢鏍煎紡涓嶆纭�'); this.$refs.upload.clearFiles() return false; @@ -1092,6 +1097,13 @@ this.$message.error('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁') } }, + getRedColor(label,row){ + if(this.data.cellSpecialStyle&&this.data.cellSpecialStyle.redColorByKey&&label.includes(this.data.cellSpecialStyle.redColorByKey)&&row[(label.replace(this.data.cellSpecialStyle.redColorByKey, ""))]){ + return true + }else{ + return false + } + } } } </script> -- Gitblit v1.9.3