This commit is contained in:
2025-02-18 11:52:24 +08:00
parent a7c677b444
commit 7e0b342758
10 changed files with 53 additions and 21 deletions

View File

@@ -19,8 +19,8 @@ const service = axios.create({
// baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换 // baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换
// baseURL: 'http://www.tougao.com/', //测试本地 记得切换 // baseURL: 'http://www.tougao.com/', //测试本地 记得切换
// baseURL: 'http://192.168.110.110/tougao/public/index.php/', // baseURL: 'http://192.168.110.110/tougao/public/index.php/',
// baseURL: '/api', //本地 baseURL: '/api', //本地
baseURL: '/', //正式 // baseURL: '/', //正式
}); });

View File

@@ -1199,11 +1199,20 @@ a {
} }
/* 给表格中最后一行表头添加红色下边框 */
/* 给最后一个 table-header-row 添加红色下边框 */
.wordTableHtml table tr:last-of-type td { .wordTableHtml table tr:last-of-type td {
border-bottom: 1px solid #000 !important; border-bottom: 1px solid #000 !important;
} }
/* 给最后一个 table-header-row第二行加样式 */
.wordTableHtml table tr.table-header-row:nth-of-type(2) td {
border-bottom: 1px solid #000 !important;
}
.word-container b span { .word-container b span {
font-weight: bold !important; font-weight: bold !important;
@@ -1283,7 +1292,7 @@ a {
border-left: 1px dashed #dcdfe6 !important; border-left: 1px dashed #dcdfe6 !important;
border-right: 1px dashed #dcdfe6 !important; border-right: 1px dashed #dcdfe6 !important;
word-break: keep-all !important; word-break: keep-all !important;
text-align: justify !important; /* text-align: justify !important; */
} }
.word-container table tr td p { .word-container table tr td p {
@@ -1317,10 +1326,10 @@ a {
} }
.word-container table tr:first-child td { .word-container table tr:first-child td {
border-top: 1pt solid #000 !important; /* border-top: 1pt solid #000 !important;
mso-border-top-alt: 0.5pt solid #000 !important; mso-border-top-alt: 0.5pt solid #000 !important;
border-bottom: 1pt solid #000 !important; border-bottom: 1pt solid #000 !important;
mso-border-bottom-alt: 0.5pt solid #000 !important; mso-border-bottom-alt: 0.5pt solid #000 !important; */
} }
.word-container table tr:last-of-type { .word-container table tr:last-of-type {
@@ -1397,6 +1406,7 @@ a {
/* font-size:16px!important; */ /* font-size:16px!important; */
/* 设置字体颜色 */ /* 设置字体颜色 */
} }
.tinymce-custom-button-addrow { .tinymce-custom-button-addrow {
font-weight: bold !important; font-weight: bold !important;
background-color: #cbccd1 !important; background-color: #cbccd1 !important;

View File

@@ -1676,10 +1676,12 @@ export default {
this.getScoreData(); this.getScoreData();
loading.close(); loading.close();
} else { } else {
loading.close();
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}) })
.catch((err) => { .catch((err) => {
loading.close();
this.$message.error(err); this.$message.error(err);
}); });

View File

@@ -215,6 +215,7 @@
localStorage.setItem('U_role', 'superadmin'); localStorage.setItem('U_role', 'superadmin');
localStorage.setItem('U_name', res.userinfo.account); localStorage.setItem('U_name', res.userinfo.account);
localStorage.setItem('U_id', res.userinfo.user_id); localStorage.setItem('U_id', res.userinfo.user_id);
return false
// localStorage.setItem('U_id', res.userinfo.admin_id); // localStorage.setItem('U_id', res.userinfo.admin_id);
this.$router.push('/'); this.$router.push('/');
} else if (res.data.roles.includes('editor')) { } else if (res.data.roles.includes('editor')) {

View File

@@ -68,9 +68,7 @@ const tableStyle = ` b span{
border-top:none;mso-border-top-alt:none !important; border-top:none;mso-border-top-alt:none !important;
border-bottom:none !important; border-bottom:none !important;
mso-border-bottom-alt:none !important; mso-border-bottom-alt:none !important;
border:1px dashed #dcdfe6 !important;
border-left:1px dashed #dcdfe6 !important;
border-right:1px dashed #dcdfe6 !important;
word-break: keep-all !important; word-break: keep-all !important;
text-align: justify !important; // 设置两端对齐 text-align: justify !important; // 设置两端对齐

View File

@@ -72,7 +72,7 @@ const tableStyle = ` b span{
border-left:1px dashed #dcdfe6 !important; border-left:1px dashed #dcdfe6 !important;
border-right:1px dashed #dcdfe6 !important; border-right:1px dashed #dcdfe6 !important;
word-break: keep-all !important; word-break: keep-all !important;
text-align: justify !important; // 设置两端对齐 // text-align: justify !important; // 设置两端对齐
} }
@@ -115,6 +115,9 @@ const tableStyle = ` b span{
}blue { }blue {
color: rgb(0, 130, 170) !important; color: rgb(0, 130, 170) !important;
} }
.wordTableHtml table tr.table-header-row:nth-of-type(2) td {
border-bottom: 1px solid #000 !important;
}
`; `;
export default { export default {

View File

@@ -123,7 +123,7 @@ b span{
border-left:1px dashed #dcdfe6 !important; border-left:1px dashed #dcdfe6 !important;
border-right:1px dashed #dcdfe6 !important; border-right:1px dashed #dcdfe6 !important;
word-break: keep-all !important; word-break: keep-all !important;
text-align: justify !important; // 设置两端对齐 // text-align: justify !important; // 设置两端对齐
} }

View File

@@ -76,8 +76,8 @@ export default {
text-align: center; text-align: center;
table-layout: auto;" table-layout: auto;"
>`; >`;
this.tableData.forEach((row) => { this.tableData.forEach((row,i) => {
modalContent += `<tr>`; modalContent += `<tr class="${this.isHeaderRow(i,this.tableData)?'table-header-row':''}">`;
row.forEach((cell) => { row.forEach((cell) => {
modalContent += ` modalContent += `
<td <td
@@ -100,6 +100,15 @@ export default {
} }
}, },
methods: { methods: {
isHeaderRow(rowIndex,table) {
console.log('table at line 697:', table)
var head=table[0]
console.log('head at line 699:', head[0].rowspan)
return rowIndex < head[0].rowspan; // 假设前两行是表头
},
getTableContent(type) { getTableContent(type) {
this.$refs.tinymceChild1.getContent(type); this.$refs.tinymceChild1.getContent(type);
}, },

View File

@@ -87,7 +87,7 @@
<!-- 表格部分 --> <!-- 表格部分 -->
<table border="1" style="width: auto; border-collapse: collapse; text-align: center"> <table border="1" style="width: auto; border-collapse: collapse; text-align: center">
<tr v-for="(row, i) in JSON.parse(item.table.table_data)" :key="i"> <tr v-for="(row, i) in JSON.parse(item.table.table_data)" :key="i" :class="{ 'table-header-row': isHeaderRow(i,item.table.table_data) }">
<td <td
v-for="(cell, i1) in row" v-for="(cell, i1) in row"
:key="i1" :key="i1"
@@ -380,7 +380,7 @@ b span{
} }
table td, table th { table td, table th {
padding: 5px; padding: 5px;
text-align:left !important; text-align: !important;
white-space: pre-wrap; /* 保留换行符并换行 */ white-space: pre-wrap; /* 保留换行符并换行 */
word-wrap: break-word; /* 长单词自动换行 */ word-wrap: break-word; /* 长单词自动换行 */
word-break: break-word; word-break: break-word;
@@ -400,11 +400,9 @@ b span{
border-top:none;mso-border-top-alt:none !important; border-top:none;mso-border-top-alt:none !important;
border-bottom:none !important; border-bottom:none !important;
mso-border-bottom-alt:none !important; mso-border-bottom-alt:none !important;
border:1px dashed #dcdfe6 !important;
border-left:1px dashed #dcdfe6 !important;
border-right:1px dashed #dcdfe6 !important;
word-break: keep-all !important; word-break: keep-all !important;
text-align: justify !important; // 设置两端对齐 // text-align: justify !important; // 设置两端对齐
} }
@@ -690,6 +688,16 @@ export default {
if (outerDiv) { if (outerDiv) {
} }
},
// 判断是否是表头行
isHeaderRow(rowIndex,table) {
var table=JSON.parse(table)
console.log('table at line 697:', table)
var head=table[0]
console.log('head at line 699:', head[0].rowspan)
return rowIndex < head[0].rowspan; // 假设前两行是表头
}, },
handleDragLeave(e) { handleDragLeave(e) {
e.preventDefault(); e.preventDefault();

View File

@@ -202,7 +202,8 @@
text-align: center; text-align: center;
" "
> >
<tr v-for="(row, rowIndex) in table.table" :key="rowIndex"> <tr v-for="(row, rowIndex) in table.table" :key="rowIndex" >
<td <td
v-for="(cell, cellIndex) in row" v-for="(cell, cellIndex) in row"
:key="cellIndex" :key="cellIndex"