tijiao
This commit is contained in:
@@ -238,7 +238,7 @@
|
||||
</el-button>
|
||||
</p>
|
||||
</el-drawer>
|
||||
<el-dialog
|
||||
<el-dialog
|
||||
destroy-on-close
|
||||
v-if="commentVisible"
|
||||
title="Comment"
|
||||
@@ -518,7 +518,7 @@ export default {
|
||||
openLatexEditor(data) {
|
||||
console.log('data at line 563:', data);
|
||||
this.showLateX = true;
|
||||
this.LateXInfo=data
|
||||
this.LateXInfo = data;
|
||||
},
|
||||
isShowEditComment() {
|
||||
if (localStorage.getItem('U_role')) {
|
||||
@@ -680,7 +680,7 @@ export default {
|
||||
}
|
||||
},
|
||||
saveLateX(data) {
|
||||
console.log('data at line 735:', data)
|
||||
console.log('data at line 735:', data);
|
||||
const { editorId, wmathId, latex } = data;
|
||||
const newLatex = latex ? latex.trim() : '';
|
||||
if (!editorId || !wmathId) return;
|
||||
@@ -1573,7 +1573,34 @@ export default {
|
||||
});
|
||||
},
|
||||
async saveTable(content) {
|
||||
const cleanTableData = (tableList) => {
|
||||
if (tableList.length == 0) {
|
||||
return [];
|
||||
} else {
|
||||
// 假设第一行是表头,保存表头
|
||||
const header = tableList[0];
|
||||
|
||||
// 从第二行开始,移除与表头相同的行
|
||||
const cleanedTable = tableList.filter((row, index) => {
|
||||
// 如果是第一行,则保留
|
||||
if (index === 0) return true;
|
||||
|
||||
// 比较当前行的每个单元格与表头是否相同
|
||||
const isHeaderRow = row.every((cell, cellIndex) => {
|
||||
return cell.text === header[cellIndex].text;
|
||||
});
|
||||
|
||||
return !isHeaderRow; // 只保留与表头不同的行
|
||||
});
|
||||
|
||||
return cleanedTable;
|
||||
}
|
||||
};
|
||||
var cleanedTableList = content.table ? content.table : [];
|
||||
console.log('content at line 998:', content);
|
||||
|
||||
|
||||
cleanedTableList = cleanTableData(content.table);
|
||||
var strTitle = this.lineStyle.title;
|
||||
strTitle = await this.$commonJS.decodeHtml(strTitle);
|
||||
|
||||
@@ -1582,18 +1609,18 @@ export default {
|
||||
strNote = await this.$commonJS.decodeHtml(strNote);
|
||||
}
|
||||
|
||||
if (content && content.table && content.table.length > 0) {
|
||||
if (content && cleanedTableList && cleanedTableList.length > 0) {
|
||||
if (this.lineStyle.visiTitle == 'Edit Table') {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
lock: true,
|
||||
text: 'Loading...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.$api
|
||||
.post(this.urlList.editTable, {
|
||||
amt_id: this.lineStyle.amt_id,
|
||||
table_data: JSON.stringify(content.table),
|
||||
table_data: JSON.stringify(cleanedTableList),
|
||||
html_data: content.html_data,
|
||||
note: strNote,
|
||||
title: strTitle
|
||||
@@ -1609,16 +1636,18 @@ export default {
|
||||
});
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
loading.close();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$message.error(err);
|
||||
loading.close();
|
||||
});
|
||||
} else {
|
||||
this.$api
|
||||
.post(this.urlList.addTable, {
|
||||
article_id: this.articleId,
|
||||
table_data: JSON.stringify(content.table),
|
||||
table_data: JSON.stringify(cleanedTableList),
|
||||
html_data: content.html_data,
|
||||
note: this.lineStyle.note,
|
||||
title: this.lineStyle.title
|
||||
@@ -1631,14 +1660,17 @@ export default {
|
||||
this.$refs.commonWordHtmlTypeSetting.refresh('table');
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
loading.close();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$message.error(err);
|
||||
loading.close();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$message.error('Please fill in the table content!');
|
||||
loading.close();
|
||||
}
|
||||
},
|
||||
async removeEvent(row) {
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
<template>
|
||||
<div><span style="font-size: 14px; color: #606266; margin: 0 10px 0 0">Research direction :</span>
|
||||
<div>
|
||||
<span style="font-size: 14px; color: #606266; margin: 0 10px 0 0">Research direction :</span>
|
||||
<el-input
|
||||
v-model="messform.email"
|
||||
clearable
|
||||
placeholder="Please enter email"
|
||||
style="width: 190px; display: inline-block; margin: 0 10px 20px 0"
|
||||
></el-input>
|
||||
<el-input
|
||||
v-model="messform.field"
|
||||
clearable
|
||||
placeholder="Please enter field"
|
||||
style="width: 190px; display: inline-block; margin: 0 10px 20px 0"
|
||||
></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button>
|
||||
v-model="messform.email"
|
||||
clearable
|
||||
placeholder="Please enter email"
|
||||
style="width: 190px; display: inline-block; margin: 0 10px 20px 0"
|
||||
></el-input>
|
||||
<el-input
|
||||
v-model="messform.field"
|
||||
clearable
|
||||
placeholder="Please enter field"
|
||||
style="width: 190px; display: inline-block; margin: 0 10px 20px 0"
|
||||
></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">Search</el-button>
|
||||
<el-table
|
||||
:data="revTable"
|
||||
border
|
||||
@@ -38,16 +39,27 @@
|
||||
<!-- <p class="tab_tie_col" v-if="scope.row.majorstr != ''"><span>Major: </span>{{ scope.row.majorstr }}</p> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rs_num" label="Review Record" width="180">
|
||||
<template slot-scope="scope">
|
||||
Major review: {{ scope.row.major_times }} ({{ scope.row.major_rate }}%)
|
||||
<br />
|
||||
Cancel review : {{ scope.row.rd_num }}
|
||||
|
||||
<!-- <font style="margin-left: 5px">(Reviewing:{{ scope.row.now }})</font> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rs_num" label="Reviewed Times" width="140">
|
||||
<template slot-scope="scope">
|
||||
Total: {{ scope.row.rs_num }}
|
||||
<br />
|
||||
<div>
|
||||
<i class="el-icon-check" style="font-weight: bold; color: green;margin-right: 4px;"> </i> <span style="margin-right: 4px;color: green;">{{ scope.row.right_times }}</span>
|
||||
<i class="el-icon-check" style="font-weight: bold; color: green; margin-right: 4px"> </i>
|
||||
<span style="margin-right: 4px; color: green">{{ scope.row.right_times }}</span>
|
||||
<span>({{ scope.row.right_rate }}%)</span>
|
||||
</div>
|
||||
<div>
|
||||
<i class="el-icon-close" style="font-weight: bold; color: red;margin-right: 4px;"> </i> <span style="margin-right: 4px;color: red;">{{ scope.row.error_times }}</span>
|
||||
<i class="el-icon-close" style="font-weight: bold; color: red; margin-right: 4px"> </i>
|
||||
<span style="margin-right: 4px; color: red">{{ scope.row.error_times }}</span>
|
||||
<span>({{ scope.row.error_rate }}%)</span>
|
||||
</div>
|
||||
<!-- <font style="margin-left: 5px">(Reviewing:{{ scope.row.now }})</font> -->
|
||||
@@ -109,23 +121,24 @@ export default {
|
||||
methods: {
|
||||
// 获取编辑列表数据
|
||||
getDate() {
|
||||
this.$emit('loading',true)
|
||||
this.$emit('loading', true);
|
||||
this.$api
|
||||
.post('/api/Recommend/lists', this.messform)
|
||||
.then((res) => {
|
||||
this.$emit('loading', false);
|
||||
this.revTable = res.data.lists;
|
||||
this.Total = res.data.total;
|
||||
this.$emit('loading',false)
|
||||
|
||||
// this.loading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
this.$emit('loading', false);
|
||||
});
|
||||
},
|
||||
|
||||
// 关键字搜索
|
||||
handleSearch() {
|
||||
|
||||
// this.loading = true;
|
||||
// console.log(this.messform)
|
||||
this.getDate();
|
||||
|
||||
Reference in New Issue
Block a user