调整Load Data From File弹窗中,根据返回的数据状态,显示对应文件的名字颜色

处理点击行,fileName值没空的问题
This commit is contained in:
renpy 2023-09-08 14:48:57 +08:00
parent 1efe28500e
commit 0fbdc38690

View File

@ -17,17 +17,17 @@
</phd-select> --> </phd-select> -->
</template> </template>
<template slot="gasBkData" slot-scope="text, record"> <template slot="gasBkData" slot-scope="text, record">
<div class="file-ellipsis" :title="text" @dblclick="handleFileSelect('_G_',record)"> <div :class="['file-ellipsis',!record.gasFileStatus?'file-name-color':'']" :title="text" @dblclick="handleFileSelect('_G_',record)">
{{ text }} {{ text }}
</div> </div>
</template> </template>
<template slot="detBkData" slot-scope="text, record"> <template slot="detBkData" slot-scope="text, record">
<div class="file-ellipsis" :title="text" @dblclick="handleFileSelect('_D_',record)"> <div :class="['file-ellipsis',!record.detFileStatus?'file-name-color':'']" :title="text" @dblclick="handleFileSelect('_D_',record)">
{{ text }} {{ text }}
</div> </div>
</template> </template>
<template slot="qcData" slot-scope="text, record"> <template slot="qcData" slot-scope="text, record">
<div class="file-ellipsis" :title="text" @dblclick="handleFileSelect('_Q_',record)"> <div :class="['file-ellipsis',!record.qcFileStatus?'file-name-color':'']" :title="text" @dblclick="handleFileSelect('_Q_',record)">
{{ text }} {{ text }}
</div> </div>
</template> </template>
@ -232,11 +232,10 @@ export default {
customRow(record, index) { customRow(record, index) {
const that = this; const that = this;
return { return {
// class: that.selectedRowKeys==record.id ? 'ant-table-row-selected' : '',
on: { on: {
click: () => { click: () => {
console.log("选中行",record.id);
that.selectedRowKeys.push(record.id) that.selectedRowKeys.push(record.id)
this.selectedFiles.push(record.name)
} }
} }
} }
@ -381,7 +380,6 @@ export default {
handleLoad() { handleLoad() {
this.visible = false this.visible = false
this.$emit('loadFormFile', this.list) this.$emit('loadFormFile', this.list)
// console.log('%c [ handleLoad ]-123', 'font-size:13px; background:pink; color:#bf2c9f;', this.list)
}, },
handleCancel() { handleCancel() {
@ -476,6 +474,9 @@ export default {
height: 42px; height: 42px;
line-height: 42px; line-height: 42px;
} }
.file-name-color{
color: red;
}
.file-ellipsis{ .file-ellipsis{
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;