修改全局的标题和编号两行展示

This commit is contained in:
qq787203167
2022-06-01 15:17:22 +08:00
parent 10dc66663c
commit 288380a38f
10 changed files with 209 additions and 82 deletions
+36 -17
View File
@@ -29,6 +29,11 @@
</span>
</a>
</span>
<span slot="detailName" slot-scope="text,record">
<span class="textName" :title="text">
{{text}}
</span>
</span>
<!-- <span slot="detailClick" slot-scope="text,record">-->
<!-- <a class="text" :title="text" @click="detailClick(record)">{{text}}</a>-->
<!-- </span>-->
@@ -80,9 +85,9 @@
type: Boolean,
default: false
},
type:{
type:String,
default:''
type: {
type: String,
default: ''
}
},
data() {
@@ -116,7 +121,7 @@
})
eventBUs.$on('searchReset', target => {
this.searchParmes = {}
this.selectedRowKeys=[]
this.selectedRowKeys = []
this.getData()
this.getTableList()
})
@@ -141,13 +146,13 @@
var jsonHead = res.result
this.columns = []
this.columns.push(
{
title: this.$t('serialNumber'),
dataIndex: 'index',
key: 'index',
align: 'center',
customRender: (text,record,index) => `${index+1}`,
})
{
title: this.$t('serialNumber'),
dataIndex: 'index',
key: 'index',
align: 'center',
customRender: (text, record, index) => `${index + 1}`
})
jsonHead.forEach((res, index) => {
this.columns.push({
title: res.db_field_txt,
@@ -160,6 +165,11 @@
this.columns[index].scopedSlots = {
customRender: 'detailClick'
}
} else if (res.db_field_txt == 'number' || res.db_field_txt == 'Title' || res.db_field_txt == '编号' || res.db_field_txt == '标题') {
this.columns[index].scopedSlots = {
customRender: 'detailName'
}
this.columns[index].ellipsis = false
} else {
this.columns[index].scopedSlots = {
customRender: 'detailText'
@@ -194,7 +204,7 @@
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
let params = {
...this.searchParmes,
type:this.type,
type: this.type,
orderBy: this.orderBy,
orderByField: this.orderByField,
pageNo: pageNo + '',
@@ -220,7 +230,7 @@
this.pageSize = pageSize
this.getTableList()
},
onSelectChange(value,rows) {
onSelectChange(value, rows) {
this.selectedRowKeys = value
this.$emit('onSelectChange', value, rows)
},
@@ -237,10 +247,6 @@
.table .ant-table-column-title {
font-weight: bold;
}
.ant-table td {
white-space: nowrap;
}
</style>
<style scoped>
.box {
@@ -257,4 +263,17 @@
text-align: right;
margin-top: 20px;
}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>
+31 -10
View File
@@ -6,7 +6,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
@@ -32,11 +32,16 @@
<span slot="detailClick" slot-scope="text,record">
<a class="text" :title="text" @click="detailClick(record)">{{text}}</a>
</span>
<!-- <span slot="detailText" slot-scope="text,record">-->
<!-- <span class="text" :title="text">-->
<!-- {{text.length > 18?text.slice(0,17)+'...':text}}-->
<!-- </span>-->
<!-- </span>-->
<span slot="detailName" slot-scope="text,record">
<span class="textName" :title="text">
{{text}}
</span>
</span>
<!-- <span slot="detailText" slot-scope="text,record">-->
<!-- <span class="text" :title="text">-->
<!-- {{text.length > 18?text.slice(0,17)+'...':text}}-->
<!-- </span>-->
<!-- </span>-->
</a-table>
</div>
@@ -141,12 +146,18 @@
dataIndex: res.db_field_name,
align: 'center',
ellipsis: true,
width:170,
sorter: res.sort
})
if (res.click) {
this.columns[index].scopedSlots = {
customRender: 'detailClick'
}
} else if (res.db_field_txt == 'number' || res.db_field_txt == 'Title' || res.db_field_txt == '编号' || res.db_field_txt == '标题') {
this.columns[index].scopedSlots = {
customRender: 'detailName'
}
this.columns[index].ellipsis = false
} else {
this.columns[index].scopedSlots = {
customRender: 'detailText'
@@ -210,7 +221,7 @@
this.pageSize = pageSize
this.getTableList()
},
onSelectChange(value,rows) {
onSelectChange(value, rows) {
this.selectedRowKeys = value
this.$emit('onSelectChange', value, rows)
},
@@ -228,9 +239,6 @@
font-weight: bold;
}
.ant-table td {
white-space: nowrap;
}
</style>
<style scoped>
.box {
@@ -247,4 +255,17 @@
text-align: right;
margin-top: 20px;
}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>
+33 -13
View File
@@ -6,7 +6,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
@@ -31,9 +31,14 @@
</span>
<span slot="detailText" slot-scope="text,record">
<span class="text" :title="text">
{{text && text.length > 18?text.slice(0,17)+'...':text}}
{{text}}
</span>
</span>
<span slot="detail" slot-scope="text,record">
<span class="textName" :title="text">
{{text}}
</span>
</span>
</a-table>
</div>
<div class="page" v-if="dataSource.length > 0">
@@ -76,9 +81,9 @@
type: Boolean,
default: false
},
type:{
type:String,
default:''
type: {
type: String,
default: ''
}
},
data() {
@@ -112,7 +117,7 @@
})
eventBUs.$on('searchReset', target => {
this.searchParmes = {}
this.selectedRowKeys=[]
this.selectedRowKeys = []
this.getData()
this.getTableList()
})
@@ -150,12 +155,18 @@
dataIndex: res.db_field_name,
align: 'center',
ellipsis: true,
sorter: res.sort
sorter: res.sort,
width: 170
})
if (res.click) {
this.columns[index].scopedSlots = {
customRender: 'detailClick'
}
} else if (res.db_field_txt == 'number' || res.db_field_txt == 'Title' || res.db_field_txt == '编号' || res.db_field_txt == '标题') {
this.columns[index].scopedSlots = {
customRender: 'detail'
}
this.columns[index].ellipsis = false
} else {
this.columns[index].scopedSlots = {
customRender: 'detailText'
@@ -190,7 +201,7 @@
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
let params = {
...this.searchParmes,
type:this.type,
type: this.type,
orderBy: this.orderBy,
orderByField: this.orderByField,
pageNo: pageNo + '',
@@ -216,7 +227,7 @@
this.pageSize = pageSize
this.getTableList()
},
onSelectChange(value,rows) {
onSelectChange(value, rows) {
this.selectedRowKeys = value
this.$emit('onSelectChange', value, rows)
},
@@ -233,10 +244,6 @@
.table .ant-table-column-title {
font-weight: bold;
}
.ant-table td {
white-space: nowrap;
}
</style>
<style scoped>
.box {
@@ -253,4 +260,17 @@
text-align: right;
margin-top: 20px;
}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>
+31 -18
View File
@@ -6,7 +6,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
@@ -16,9 +16,10 @@
<a v-for="(ol,index) in OperationList"
@click="OperationClick(ol,record)">
<!-- <span class="text">-->
<!-- {{ol.text}}-->
<!-- </span>-->
<span v-if="ol.text==$t('backDocument')&&record.flag==0" class="text" v-has="'split:sarFileSplitInfo:bind'">
<!-- {{ol.text}}-->
<!-- </span>-->
<span v-if="ol.text==$t('backDocument')&&record.flag==0" class="text"
v-has="'split:sarFileSplitInfo:bind'">
{{ol.text}}
</span>
<span v-if="ol.text==$t('view')" class="text" v-has="'split:sarFileSplitItems:page'">
@@ -35,10 +36,11 @@
</span>
</span>
<span slot="detail" slot-scope="text,record">
<a class="text" :title="text" @click="urlClick(text,record)">
<a class="textName" :title="text" @click="urlClick(text,record)">
{{text}}
</a>
</span>
</a-table>
</div>
<div class="page" v-if="dataSource.length > 0">
@@ -82,8 +84,8 @@
default: false
},
infoId: {
type:String,
default:''
type: String,
default: ''
}
},
data() {
@@ -125,9 +127,9 @@
this.getTableList()
},
methods: {
urlClick(text,record) {
if(record.documentId === null) {
this.$message.warning(this.$t('Correspondingstandarddeleted'))
urlClick(text, record) {
if (record.documentId === null) {
this.$message.warning(this.$t('Correspondingstandarddeleted'))
} else {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
@@ -158,19 +160,21 @@
dataIndex: res.db_field_name,
align: 'center',
ellipsis: true,
sorter: res.sort
sorter: res.sort,
width: 170
})
if(res.db_field_name==''){
if (res.db_field_name == '') {
// scope.row.itermsConditions ? scope.row.itermsConditions.replace(/<.*?>/ig, ' ') : ''
}
this.columns[index].scopedSlots = {
customRender: 'detailText'
}
if(res.db_field_txt === "编号" || res.db_field_txt === "标题" ){
if (res.db_field_txt == 'number' || res.db_field_txt == 'Title' || res.db_field_txt == '编号' || res.db_field_txt == '标题') {
this.columns[index].scopedSlots = {
customRender: 'detail'
}
this.columns[index].ellipsis = false
}
})
@@ -204,7 +208,7 @@
...this.searchParmes,
orderBy: this.orderBy,
orderByField: this.orderByField,
infoId:this.infoId,
infoId: this.infoId,
pageNo: pageNo + '',
pageSize: pageSize + ''
}
@@ -254,10 +258,6 @@
.table .ant-table-column-title {
font-weight: bold;
}
.ant-table td {
white-space: nowrap;
}
</style>
<style scoped>
.box {
@@ -274,4 +274,17 @@
text-align: right;
margin-top: 20px;
}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>
+21 -11
View File
@@ -6,7 +6,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
:data-source="dataSource"
:loading="loading"
:rowClassName="rowClassName"
@@ -28,21 +28,20 @@
</a>
</span>
<span slot="detailClick" slot-scope="text,record">
<a class="text" :title="text" @click="detailClick(record)">
{{text && text.length > 18?text.slice(0,17)+'...':text}}
<a class="textName" :title="text" @click="detailClick(record)">
{{text}}
</a>
</span>
<span slot="urlClick" slot-scope="text,record">
<a class="text" :title="text" @click="urlClick(text)">
{{text && text.length > 18?text.slice(0,17)+'...':text}}
{{text}}
</a>
</span>
<span slot="detailText" slot-scope="text,record">
<span class="text" :title="text">
{{text && text.length > 18?text.slice(0,17)+'...':text}}
{{text}}
</span>
</span>
</a-table>
</div>
<div class="page" v-if="dataSource.length > 0">
@@ -150,12 +149,14 @@
dataIndex: res.db_field_name,
align: 'center',
ellipsis: true,
sorter: res.sort
sorter: res.sort,
width: 170
})
if (res.click) {
this.columns[index].scopedSlots = {
customRender: 'detailClick'
}
this.columns[index].ellipsis = false
} else if (res.urlClick) {
this.columns[index].scopedSlots = {
customRender: 'urlClick'
@@ -245,10 +246,6 @@
font-weight: bold;
}
.ant-table td {
white-space: nowrap;
}
.rowClassNameBack {
background: #f5f5f5;
}
@@ -268,4 +265,17 @@
text-align: right;
margin-top: 20px;
}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>
@@ -89,7 +89,7 @@
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -105,10 +105,13 @@
<a @click="handleCompare(record)" class="text-operation"> {{$t('Push')}}</a>
</span>
<span slot="serial_number" slot-scope="text,record">
<span style="cursor: pointer" v-html="record.serial_number" @click="titleClick(record)"></span>
<span style="cursor: pointer" :title="record.serial_number" class="textName" v-html="record.serial_number"
@click="titleClick(record)"></span>
</span>
<span slot="titleName" slot-scope="text,record">
<span style="cursor: pointer" v-html="record.title" @click="titleClick(record)"></span>
<span style="cursor: pointer" class="textName" v-html="record.title"
:title="record.title"
@click="titleClick(record)"></span>
</span>
<span slot="file_name" slot-scope="text,record">
<a style="color:#21c9cc" @click="fileNameClick(record)">
@@ -250,28 +253,36 @@
title: this.$t('standard'),
align: 'center',
dataIndex: 'serial_number',
width: 170,
scopedSlots: { customRender: 'serial_number' }
},
{
title: this.$t('title'),
align: 'center',
dataIndex: 'title',
width: 170,
scopedSlots: { customRender: 'titleName' }
},
{
title: this.$t('fileName'),
align: 'center',
dataIndex: 'file_name',
ellipsis: true,
width: 170,
scopedSlots: { customRender: 'file_name' }
},
{
title: this.$t('status'),
align: 'center',
width: 140,
ellipsis: true,
dataIndex: 'state'
},
{
title: this.$t('zoneOfApplication'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'region'
},
// {
@@ -282,21 +293,29 @@
{
title: this.$t('technicalField'),
align: 'center',
ellipsis: true,
width: 170,
dataIndex: 'technology_territory'
},
{
title: this.$t('releaseDate'),
align: 'center',
ellipsis: true,
width: 170,
dataIndex: 'issue_time'
},
{
title: this.$t('vehicleInProductionDate'),
align: 'center',
ellipsis: true,
width: 210,
dataIndex: 'implement_time'
},
{
title: this.$t('ImplementationDate'),
align: 'center',
ellipsis: true,
width: 210,
dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1'
},
{
@@ -674,10 +693,6 @@
font-weight: bold;
}
.ant-table td {
white-space: nowrap;
}
.checkbox-left .ant-checkbox-inner {
width: 18px !important;
height: 18px !important;
@@ -873,4 +888,17 @@
overflow: hidden;
text-overflow: ellipsis;
}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>
@@ -941,10 +941,10 @@
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
text-justify: inter-ideograph;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
-webkit-box-orient: vertical;
text-justify: inter-ideograph;
word-break: break-all
}
</style>
@@ -1568,10 +1568,10 @@
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
text-justify: inter-ideograph;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
-webkit-box-orient: vertical;
text-justify: inter-ideograph;
word-break: break-all
}
</style>
@@ -59,8 +59,10 @@
:data-source="dataSource"
:columns="columns"
>
<span slot="standard" slot-scope="text,result">
<a @click="standardClick(result)">{{text}}</a>
<span slot="standard" slot-scope="text,result">
<a @click="standardClick(result)" class="textName" :title="text">
{{text}}
</a>
</span>
</a-table>
</div>
@@ -326,4 +328,16 @@
text-align: right;
margin-top: 20px;
}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>
@@ -466,5 +466,7 @@
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>