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

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
+24 -5
View File
@@ -29,6 +29,11 @@
</span> </span>
</a> </a>
</span> </span>
<span slot="detailName" slot-scope="text,record">
<span class="textName" :title="text">
{{text}}
</span>
</span>
<!-- <span slot="detailClick" slot-scope="text,record">--> <!-- <span slot="detailClick" slot-scope="text,record">-->
<!-- <a class="text" :title="text" @click="detailClick(record)">{{text}}</a>--> <!-- <a class="text" :title="text" @click="detailClick(record)">{{text}}</a>-->
<!-- </span>--> <!-- </span>-->
@@ -146,7 +151,7 @@
dataIndex: 'index', dataIndex: 'index',
key: 'index', key: 'index',
align: 'center', align: 'center',
customRender: (text,record,index) => `${index+1}`, customRender: (text, record, index) => `${index + 1}`
}) })
jsonHead.forEach((res, index) => { jsonHead.forEach((res, index) => {
this.columns.push({ this.columns.push({
@@ -160,6 +165,11 @@
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'detailClick' 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 { } else {
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'detailText' customRender: 'detailText'
@@ -237,10 +247,6 @@
.table .ant-table-column-title { .table .ant-table-column-title {
font-weight: bold; font-weight: bold;
} }
.ant-table td {
white-space: nowrap;
}
</style> </style>
<style scoped> <style scoped>
.box { .box {
@@ -257,4 +263,17 @@
text-align: right; text-align: right;
margin-top: 20px; 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> </style>
+25 -4
View File
@@ -6,7 +6,7 @@
rowKey="id" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
@@ -32,6 +32,11 @@
<span slot="detailClick" slot-scope="text,record"> <span slot="detailClick" slot-scope="text,record">
<a class="text" :title="text" @click="detailClick(record)">{{text}}</a> <a class="text" :title="text" @click="detailClick(record)">{{text}}</a>
</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 slot="detailText" slot-scope="text,record">-->
<!-- <span class="text" :title="text">--> <!-- <span class="text" :title="text">-->
<!-- {{text.length > 18?text.slice(0,17)+'...':text}}--> <!-- {{text.length > 18?text.slice(0,17)+'...':text}}-->
@@ -141,12 +146,18 @@
dataIndex: res.db_field_name, dataIndex: res.db_field_name,
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
width:170,
sorter: res.sort sorter: res.sort
}) })
if (res.click) { if (res.click) {
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'detailClick' 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 { } else {
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'detailText' customRender: 'detailText'
@@ -228,9 +239,6 @@
font-weight: bold; font-weight: bold;
} }
.ant-table td {
white-space: nowrap;
}
</style> </style>
<style scoped> <style scoped>
.box { .box {
@@ -247,4 +255,17 @@
text-align: right; text-align: right;
margin-top: 20px; 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> </style>
@@ -6,7 +6,7 @@
rowKey="id" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
@@ -31,7 +31,12 @@
</span> </span>
<span slot="detailText" slot-scope="text,record"> <span slot="detailText" slot-scope="text,record">
<span class="text" :title="text"> <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>
</span> </span>
</a-table> </a-table>
@@ -150,12 +155,18 @@
dataIndex: res.db_field_name, dataIndex: res.db_field_name,
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
sorter: res.sort sorter: res.sort,
width: 170
}) })
if (res.click) { if (res.click) {
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'detailClick' 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 { } else {
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'detailText' customRender: 'detailText'
@@ -233,10 +244,6 @@
.table .ant-table-column-title { .table .ant-table-column-title {
font-weight: bold; font-weight: bold;
} }
.ant-table td {
white-space: nowrap;
}
</style> </style>
<style scoped> <style scoped>
.box { .box {
@@ -253,4 +260,17 @@
text-align: right; text-align: right;
margin-top: 20px; 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> </style>
+22 -9
View File
@@ -6,7 +6,7 @@
rowKey="id" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
@@ -18,7 +18,8 @@
<!-- <span class="text">--> <!-- <span class="text">-->
<!-- {{ol.text}}--> <!-- {{ol.text}}-->
<!-- </span>--> <!-- </span>-->
<span v-if="ol.text==$t('backDocument')&&record.flag==0" class="text" v-has="'split:sarFileSplitInfo:bind'"> <span v-if="ol.text==$t('backDocument')&&record.flag==0" class="text"
v-has="'split:sarFileSplitInfo:bind'">
{{ol.text}} {{ol.text}}
</span> </span>
<span v-if="ol.text==$t('view')" class="text" v-has="'split:sarFileSplitItems:page'"> <span v-if="ol.text==$t('view')" class="text" v-has="'split:sarFileSplitItems:page'">
@@ -35,10 +36,11 @@
</span> </span>
</span> </span>
<span slot="detail" slot-scope="text,record"> <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}} {{text}}
</a> </a>
</span> </span>
</a-table> </a-table>
</div> </div>
<div class="page" v-if="dataSource.length > 0"> <div class="page" v-if="dataSource.length > 0">
@@ -158,7 +160,8 @@
dataIndex: res.db_field_name, dataIndex: res.db_field_name,
align: 'center', align: 'center',
ellipsis: true, 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, ' ') : '' // scope.row.itermsConditions ? scope.row.itermsConditions.replace(/<.*?>/ig, ' ') : ''
@@ -167,10 +170,11 @@
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'detailText' 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 = { this.columns[index].scopedSlots = {
customRender: 'detail' customRender: 'detail'
} }
this.columns[index].ellipsis = false
} }
}) })
@@ -254,10 +258,6 @@
.table .ant-table-column-title { .table .ant-table-column-title {
font-weight: bold; font-weight: bold;
} }
.ant-table td {
white-space: nowrap;
}
</style> </style>
<style scoped> <style scoped>
.box { .box {
@@ -274,4 +274,17 @@
text-align: right; text-align: right;
margin-top: 20px; 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> </style>
+21 -11
View File
@@ -6,7 +6,7 @@
rowKey="id" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%'}"
:data-source="dataSource" :data-source="dataSource"
:loading="loading" :loading="loading"
:rowClassName="rowClassName" :rowClassName="rowClassName"
@@ -28,21 +28,20 @@
</a> </a>
</span> </span>
<span slot="detailClick" slot-scope="text,record"> <span slot="detailClick" slot-scope="text,record">
<a class="text" :title="text" @click="detailClick(record)"> <a class="textName" :title="text" @click="detailClick(record)">
{{text && text.length > 18?text.slice(0,17)+'...':text}} {{text}}
</a> </a>
</span> </span>
<span slot="urlClick" slot-scope="text,record"> <span slot="urlClick" slot-scope="text,record">
<a class="text" :title="text" @click="urlClick(text)"> <a class="text" :title="text" @click="urlClick(text)">
{{text && text.length > 18?text.slice(0,17)+'...':text}} {{text}}
</a> </a>
</span> </span>
<span slot="detailText" slot-scope="text,record"> <span slot="detailText" slot-scope="text,record">
<span class="text" :title="text"> <span class="text" :title="text">
{{text && text.length > 18?text.slice(0,17)+'...':text}} {{text}}
</span> </span>
</span> </span>
</a-table> </a-table>
</div> </div>
<div class="page" v-if="dataSource.length > 0"> <div class="page" v-if="dataSource.length > 0">
@@ -150,12 +149,14 @@
dataIndex: res.db_field_name, dataIndex: res.db_field_name,
align: 'center', align: 'center',
ellipsis: true, ellipsis: true,
sorter: res.sort sorter: res.sort,
width: 170
}) })
if (res.click) { if (res.click) {
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'detailClick' customRender: 'detailClick'
} }
this.columns[index].ellipsis = false
} else if (res.urlClick) { } else if (res.urlClick) {
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'urlClick' customRender: 'urlClick'
@@ -245,10 +246,6 @@
font-weight: bold; font-weight: bold;
} }
.ant-table td {
white-space: nowrap;
}
.rowClassNameBack { .rowClassNameBack {
background: #f5f5f5; background: #f5f5f5;
} }
@@ -268,4 +265,17 @@
text-align: right; text-align: right;
margin-top: 20px; 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> </style>
@@ -89,7 +89,7 @@
size="middle" size="middle"
:loading="loading" :loading="loading"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: '100%'}"
rowKey="id" rowKey="id"
:data-source="dataSource" :data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -105,10 +105,13 @@
<a @click="handleCompare(record)" class="text-operation"> {{$t('Push')}}</a> <a @click="handleCompare(record)" class="text-operation"> {{$t('Push')}}</a>
</span> </span>
<span slot="serial_number" slot-scope="text,record"> <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>
<span slot="titleName" slot-scope="text,record"> <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>
<span slot="file_name" slot-scope="text,record"> <span slot="file_name" slot-scope="text,record">
<a style="color:#21c9cc" @click="fileNameClick(record)"> <a style="color:#21c9cc" @click="fileNameClick(record)">
@@ -250,28 +253,36 @@
title: this.$t('standard'), title: this.$t('standard'),
align: 'center', align: 'center',
dataIndex: 'serial_number', dataIndex: 'serial_number',
width: 170,
scopedSlots: { customRender: 'serial_number' } scopedSlots: { customRender: 'serial_number' }
}, },
{ {
title: this.$t('title'), title: this.$t('title'),
align: 'center', align: 'center',
dataIndex: 'title', dataIndex: 'title',
width: 170,
scopedSlots: { customRender: 'titleName' } scopedSlots: { customRender: 'titleName' }
}, },
{ {
title: this.$t('fileName'), title: this.$t('fileName'),
align: 'center', align: 'center',
dataIndex: 'file_name', dataIndex: 'file_name',
ellipsis: true,
width: 170,
scopedSlots: { customRender: 'file_name' } scopedSlots: { customRender: 'file_name' }
}, },
{ {
title: this.$t('status'), title: this.$t('status'),
align: 'center', align: 'center',
width: 140,
ellipsis: true,
dataIndex: 'state' dataIndex: 'state'
}, },
{ {
title: this.$t('zoneOfApplication'), title: this.$t('zoneOfApplication'),
align: 'center', align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'region' dataIndex: 'region'
}, },
// { // {
@@ -282,21 +293,29 @@
{ {
title: this.$t('technicalField'), title: this.$t('technicalField'),
align: 'center', align: 'center',
ellipsis: true,
width: 170,
dataIndex: 'technology_territory' dataIndex: 'technology_territory'
}, },
{ {
title: this.$t('releaseDate'), title: this.$t('releaseDate'),
align: 'center', align: 'center',
ellipsis: true,
width: 170,
dataIndex: 'issue_time' dataIndex: 'issue_time'
}, },
{ {
title: this.$t('vehicleInProductionDate'), title: this.$t('vehicleInProductionDate'),
align: 'center', align: 'center',
ellipsis: true,
width: 210,
dataIndex: 'implement_time' dataIndex: 'implement_time'
}, },
{ {
title: this.$t('ImplementationDate'), title: this.$t('ImplementationDate'),
align: 'center', align: 'center',
ellipsis: true,
width: 210,
dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1' dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1'
}, },
{ {
@@ -674,10 +693,6 @@
font-weight: bold; font-weight: bold;
} }
.ant-table td {
white-space: nowrap;
}
.checkbox-left .ant-checkbox-inner { .checkbox-left .ant-checkbox-inner {
width: 18px !important; width: 18px !important;
height: 18px !important; height: 18px !important;
@@ -873,4 +888,17 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; 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> </style>
@@ -941,10 +941,10 @@
display: -webkit-box; display: -webkit-box;
text-overflow: ellipsis; text-overflow: ellipsis;
/*! autoprefixer: off */ /*! autoprefixer: off */
text-justify: inter-ideograph; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
/*! autoprefixer: on;*/ /*! autoprefixer: on;*/
-webkit-box-orient: vertical; text-justify: inter-ideograph;
word-break: break-all word-break: break-all
} }
</style> </style>
@@ -1568,10 +1568,10 @@
display: -webkit-box; display: -webkit-box;
text-overflow: ellipsis; text-overflow: ellipsis;
/*! autoprefixer: off */ /*! autoprefixer: off */
text-justify: inter-ideograph; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
/*! autoprefixer: on;*/ /*! autoprefixer: on;*/
-webkit-box-orient: vertical; text-justify: inter-ideograph;
word-break: break-all word-break: break-all
} }
</style> </style>
@@ -60,7 +60,9 @@
:columns="columns" :columns="columns"
> >
<span slot="standard" slot-scope="text,result"> <span slot="standard" slot-scope="text,result">
<a @click="standardClick(result)">{{text}}</a> <a @click="standardClick(result)" class="textName" :title="text">
{{text}}
</a>
</span> </span>
</a-table> </a-table>
</div> </div>
@@ -326,4 +328,16 @@
text-align: right; text-align: right;
margin-top: 20px; 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> </style>
@@ -466,5 +466,7 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
/*! autoprefixer: on;*/ /*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
} }
</style> </style>