Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+12
@@ -167,4 +167,16 @@ public class SarFileCompareItemController extends JeroController<SarFileCompareI
|
|||||||
return super.importExcel(request, response, SarFileCompareItem.class);
|
return super.importExcel(request, response, SarFileCompareItem.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条款对比高亮
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "文档对比信息条款表-条款对比高亮")
|
||||||
|
@ApiOperation(value="文档对比信息条款表-条款对比高亮", notes="文档对比信息条款表-条款对比高亮")
|
||||||
|
@GetMapping(value = "/clauseComparison")
|
||||||
|
public Result<?> clauseComparison(@RequestParam(name="leftId",required=true) String leftId,
|
||||||
|
@RequestParam(name="rightId",required=true) String rightId) {
|
||||||
|
List<String> res = sarFileCompareItemService.clauseComparison(leftId,rightId);
|
||||||
|
return Result.OK(res);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -72,4 +72,6 @@ public interface ISarFileCompareItemService extends IService<SarFileCompareItem>
|
|||||||
List<SarFileCompareItem> queryListByInfoId(String infoId);
|
List<SarFileCompareItem> queryListByInfoId(String infoId);
|
||||||
|
|
||||||
Map<String, SarFileCompareItem> queryMapByInfoId(String infoId);
|
Map<String, SarFileCompareItem> queryMapByInfoId(String infoId);
|
||||||
|
|
||||||
|
List<String> clauseComparison(String lid,String rid);
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -6,6 +6,7 @@ import com.jero.modules.compare.entity.SarFileCompareItem;
|
|||||||
import com.jero.modules.compare.mapper.SarFileCompareItemMapper;
|
import com.jero.modules.compare.mapper.SarFileCompareItemMapper;
|
||||||
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
||||||
import com.jero.modules.compare.utils.CompareConst;
|
import com.jero.modules.compare.utils.CompareConst;
|
||||||
|
import com.jero.modules.compare.utils.DiffUtils;
|
||||||
import com.jero.modules.system.util.StringUtils;
|
import com.jero.modules.system.util.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -122,4 +123,13 @@ public class SarFileCompareItemServiceImpl extends ServiceImpl<SarFileCompareIte
|
|||||||
}
|
}
|
||||||
return resMap;
|
return resMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> clauseComparison(String lid, String rid) {
|
||||||
|
SarFileCompareItem leftItem = this.queryById(lid);
|
||||||
|
SarFileCompareItem rightItem = this.queryById(rid);
|
||||||
|
DiffUtils dmp = new DiffUtils();
|
||||||
|
List<String> htmlDiffStr = dmp.getHtmlDiffStr(leftItem.getItemsText(), rightItem.getItemsText());
|
||||||
|
return htmlDiffStr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2312
File diff suppressed because it is too large
Load Diff
+35
-1
@@ -51,6 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="detail-content-content-right-data-text" v-html="item.itemsText"></div>
|
<div class="detail-content-content-right-data-text" v-html="item.itemsText"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<JLoading :loading="loadingText">{{$t('dataLoading')}}</JLoading>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -143,7 +144,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { postAction, putAction } from '../../../../api/manage'
|
import { postAction, putAction, getAction } from '../../../../api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'documentDataComparison',
|
name: 'documentDataComparison',
|
||||||
@@ -152,6 +153,7 @@
|
|||||||
formInline: {},
|
formInline: {},
|
||||||
formInlineText: {},
|
formInlineText: {},
|
||||||
dataLoadingText: '',
|
dataLoadingText: '',
|
||||||
|
loadingText:false,
|
||||||
rules: {
|
rules: {
|
||||||
comment: [
|
comment: [
|
||||||
{
|
{
|
||||||
@@ -322,6 +324,7 @@
|
|||||||
detailLeft[num].classList.add('detail-content-content-right-data-color')
|
detailLeft[num].classList.add('detail-content-content-right-data-color')
|
||||||
}
|
}
|
||||||
this.dataLeft = item
|
this.dataLeft = item
|
||||||
|
this.dataLeft.numIndex = num
|
||||||
if (this.isMatching) {
|
if (this.isMatching) {
|
||||||
let detailRightColor = document.getElementsByClassName('detail-content-content-right-data-color-right')
|
let detailRightColor = document.getElementsByClassName('detail-content-content-right-data-color-right')
|
||||||
if (detailRightColor && detailRightColor.length > 0) {
|
if (detailRightColor && detailRightColor.length > 0) {
|
||||||
@@ -335,6 +338,8 @@
|
|||||||
detailRight[item.targetStand].classList.add('detail-content-content-right-data-color-right')
|
detailRight[item.targetStand].classList.add('detail-content-content-right-data-color-right')
|
||||||
detailContent[0].scrollTop = detailRight[item.targetStand].offsetTop - 150
|
detailContent[0].scrollTop = detailRight[item.targetStand].offsetTop - 150
|
||||||
}
|
}
|
||||||
|
this.dataRight.numIndex = item.targetStand
|
||||||
|
this.clauseComparison()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -352,6 +357,7 @@
|
|||||||
detailRight[num].classList.add('detail-content-content-right-data-color-right')
|
detailRight[num].classList.add('detail-content-content-right-data-color-right')
|
||||||
}
|
}
|
||||||
this.dataRight = item
|
this.dataRight = item
|
||||||
|
this.dataRight.numIndex = num
|
||||||
if (this.isMatching) {
|
if (this.isMatching) {
|
||||||
let detailLeftColor = document.getElementsByClassName('detail-content-content-right-data-color')
|
let detailLeftColor = document.getElementsByClassName('detail-content-content-right-data-color')
|
||||||
if (detailLeftColor && detailLeftColor.length > 0) {
|
if (detailLeftColor && detailLeftColor.length > 0) {
|
||||||
@@ -359,15 +365,34 @@
|
|||||||
}
|
}
|
||||||
if (item.targetStand > -1) {
|
if (item.targetStand > -1) {
|
||||||
this.dataLeft = this.resultData.textLeft[item.targetStand]
|
this.dataLeft = this.resultData.textLeft[item.targetStand]
|
||||||
|
this.dataLeft.numIndex = item.targetStand
|
||||||
let detailContent = document.getElementsByClassName('detail-content-content-right-top')
|
let detailContent = document.getElementsByClassName('detail-content-content-right-top')
|
||||||
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
|
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
|
||||||
if (detailLeft && detailLeft.length > 0 && item.targetStand >= 0) {
|
if (detailLeft && detailLeft.length > 0 && item.targetStand >= 0) {
|
||||||
detailLeft[item.targetStand].classList.add('detail-content-content-right-data-color')
|
detailLeft[item.targetStand].classList.add('detail-content-content-right-data-color')
|
||||||
detailContent[0].scrollTop = detailLeft[item.targetStand].offsetTop - 150
|
detailContent[0].scrollTop = detailLeft[item.targetStand].offsetTop - 150
|
||||||
}
|
}
|
||||||
|
this.clauseComparison()
|
||||||
|
// this.resultData = { ...this.resultData }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
clauseComparison() {
|
||||||
|
let query = {
|
||||||
|
leftId: this.dataLeft.id,
|
||||||
|
rightId: this.dataRight.id
|
||||||
|
}
|
||||||
|
this.loadingText = true
|
||||||
|
getAction('/compare/sarFileCompareItem/clauseComparison', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.loadingText = false
|
||||||
|
this.resultData.textLeft[this.dataLeft.numIndex].itemsText = res.result[0]
|
||||||
|
this.resultData.textRight[this.dataRight.numIndex].itemsText = res.result[1]
|
||||||
|
}else{
|
||||||
|
this.loadingText = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
onSelectLeft(selectedKeys, exports) {
|
onSelectLeft(selectedKeys, exports) {
|
||||||
let node = exports.node.$vnode.data.props.dataRef
|
let node = exports.node.$vnode.data.props.dataRef
|
||||||
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
|
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
|
||||||
@@ -642,4 +667,13 @@
|
|||||||
border: 1px red solid;
|
border: 1px red solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .delClass {
|
||||||
|
background: #ff7168;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .insertClass {
|
||||||
|
background: rgba(85, 183, 255, .6);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user