code init
This commit is contained in:
@@ -0,0 +1,601 @@
|
||||
<comment>
|
||||
# 标准对比
|
||||
</comment>
|
||||
<template>
|
||||
<div class="standContrast">
|
||||
<!-- 顶部工具栏 -->
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="search-area">
|
||||
<el-form :modal="standCommonlySearch" inline class="label-input-form" @keyup.enter.native="sarStandCompareHis">
|
||||
<el-formItem :label="$t('m.oldTextNumberOrName')" class="search-item">
|
||||
<el-input v-model="oldNumOrName" class="s-c-input" :placeholder="$t('m.searchByOldTextNumberOrname')" clearable :maxlength="100" @keyup.enter.native="sarStandCompareHis()"></el-input>
|
||||
</el-formItem>
|
||||
<el-formItem :label="$t('m.newTextNumberOrname')" class="search-item">
|
||||
<el-input v-model="newNumOrName" class="s-c-input" :placeholder="$t('m.searchByNewTextNumberOrname')" clearable :maxlength="100" @keyup.enter.native="sarStandCompareHis()"></el-input>
|
||||
</el-formItem>
|
||||
<el-formItem class="search-item btn-box">
|
||||
<el-button
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
round
|
||||
class="common-button-primary"
|
||||
@click="sarStandCompareHisInfo"></el-button>
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-refresh-left"
|
||||
round
|
||||
@click="clearSearchStand"></el-button>
|
||||
</el-formItem>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
<div class="content">
|
||||
<div class="action-bar">
|
||||
<el-button round size="mini" v-btn-permission="'HS9BVNTNX2PNRRWL42AW'" @click="contrastStandFile" style="width:77px; height:32px;">比对</el-button>
|
||||
<el-button round size="mini" v-btn-permission="'Z9SMGAUX2JA3X3CTVVCP'" @click="batchDelete"><i class="iconfont"></i>批量删除</el-button>
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<div style="position: absolute;height: calc(100% - 10px);width: 100%;">
|
||||
<el-table
|
||||
ref="selection"
|
||||
:data="standInfoList"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%;padding:0 0 20px 0;"
|
||||
height="100%"
|
||||
border
|
||||
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
|
||||
@selection-change="standSelectChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="oldStandNum"
|
||||
label="旧文档文本号"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="oldStandName"
|
||||
label="旧文档文本名称"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="oldFileTypeShow"
|
||||
label="旧文本状态"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="newStandNum"
|
||||
label="新文档文本号"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="newStandName"
|
||||
label="新文档文本名称"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="newFileTypeShow"
|
||||
label="新文本状态"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="compareType"
|
||||
label="比对类型"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="比对时间"
|
||||
sortable
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="action"
|
||||
label="操作"
|
||||
width="50px"
|
||||
align="center">
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- class="opera-btn"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- @click="handlePreview(scope.row)">查看</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- class="opera-btn"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="danger"-->
|
||||
<!-- @click="delFileEditInfo(scope.row.id)">删除</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- class="opera-btn"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- @click="enjoyInfo(scope.row)">分享</el-button>-->
|
||||
<!-- <el-button size="mini" class="opera-btn" type="primary" v-if="scope.row.collectBtn" @click="collectInfo(scope.row)">收藏</el-button>-->
|
||||
<!-- <el-button size="mini" class="opera-btn" type="primary" v-else @click="cancelCollectInfo(scope.row)">取消收藏</el-button>-->
|
||||
<!-- </template>-->
|
||||
<template slot-scope="scope">
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<i class="iconfont"></i>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-btn-permission="'C6P4Z2E7MJ5RBTYCS554'" :command="[scope.row, '查看']">查看</el-dropdown-item>
|
||||
<el-dropdown-item v-btn-permission="'Z9SMGAUX2JA3X3CTVVCP'" :command="[scope.row, '删除']">删除</el-dropdown-item>
|
||||
<el-dropdown-item v-btn-permission="'WEJNHYG4J5ETSA9VFJWP'" :command="[scope.row, '分享']">分享</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="scope.row.collectBtn"
|
||||
v-btn-permission="'UGBLFYXKA78BHHJSNSER'"
|
||||
:command="[scope.row, '收藏']"
|
||||
>
|
||||
收藏
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-else
|
||||
v-btn-permission="'UGBLFYXKA78BHHJSNSER'"
|
||||
:command="[scope.row, '取消收藏']"
|
||||
>
|
||||
取消收藏
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination :page="splitInfoPage" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
<loading :loading="spinShow">{{$t('m.dataLoading')}}……</loading>
|
||||
<!-- 分享 -->
|
||||
<el-drawer :title="$t('m.sharingStandard')" :visible.sync="drawerModal" width="300" :styles="drawerModalstyles" @on-close="treeCancel">
|
||||
<div class="demo-drawer-content">
|
||||
<dept-tree treeDivId="drawerModalTree"
|
||||
ref="drawerModalTree"
|
||||
@treeClick="selcetTree"
|
||||
allDept
|
||||
showUser
|
||||
:editable="false"
|
||||
style="padding: 0 15px">
|
||||
</dept-tree>
|
||||
</div>
|
||||
<div class="demo-drawer-footer">
|
||||
<el-button round size="mini" type="primary" @click="shareStandardBt" icon="el-icon-check">确定</el-button>
|
||||
<el-button round size="mini" style="margin-right: 8px" @click="treeCancel" icon="el-icon-close">取消</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<!-- 分享 全部选人 -->
|
||||
<org-table
|
||||
:visible.sync="visibleOrgTable"
|
||||
title="分享人员"
|
||||
dialog-model
|
||||
:config="{
|
||||
value: orgTableVal,
|
||||
valueName: orgTableValName
|
||||
}"
|
||||
@confirm="isTreeOk"
|
||||
></org-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'standContrast',
|
||||
components: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
visibleOrgTable: false,
|
||||
orgTableVal: '',
|
||||
orgTableValName: '',
|
||||
spinShow: false,
|
||||
collect: '收藏',
|
||||
cancelCollect: false,
|
||||
standCommonlySearch: {},
|
||||
oldNumOrName: '',
|
||||
newNumOrName: '',
|
||||
standInfoList: [],
|
||||
tableHeight: null,
|
||||
total: 0,
|
||||
splitInfoPage: 1,
|
||||
splitInfoPageSize: this.$store.getters.userInfo.configContent,
|
||||
selectedList: [],
|
||||
drawerModalstyles: {
|
||||
height: 'calc(100% - 55px)',
|
||||
overflow: 'auto',
|
||||
paddingBottom: '53px',
|
||||
position: 'static'
|
||||
},
|
||||
// end 分享相关的
|
||||
shareStandardModal: false,
|
||||
shareStandardSelect: [],
|
||||
// 分享数据
|
||||
resType: '',
|
||||
// 消息推送保存对象
|
||||
personShareEO: {
|
||||
id: '',
|
||||
recipientId: '',
|
||||
shareUserId: '',
|
||||
resType: '',
|
||||
resId: '',
|
||||
resUri: '',
|
||||
resTitle: '',
|
||||
readFlag: '',
|
||||
validFlag: '',
|
||||
modifyTime: '',
|
||||
creationTime: ''
|
||||
},
|
||||
// 收藏标准
|
||||
personCollect: {
|
||||
collectResId: '',
|
||||
collectTitle: '',
|
||||
collectType: ''
|
||||
},
|
||||
drawerModal: false // 分享
|
||||
}
|
||||
},
|
||||
props: {
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
methods: {
|
||||
handleCommand (command) {
|
||||
switch (command[1]) {
|
||||
case '查看':
|
||||
this.handlePreview(command[0])
|
||||
break
|
||||
case '收藏':
|
||||
this.collectInfo(command[0])
|
||||
break
|
||||
case '取消收藏':
|
||||
this.cancelCollectInfo(command[0])
|
||||
break
|
||||
case '分享':
|
||||
this.enjoyInfo(command[0])
|
||||
break
|
||||
case '删除':
|
||||
this.delFileEditInfo(command[0].id)
|
||||
break
|
||||
}
|
||||
},
|
||||
// 树点击
|
||||
isTreeOk (checkedList) {
|
||||
this.shareStandardSelect = []
|
||||
checkedList.map((item, index) => {
|
||||
if (!item.isParent) {
|
||||
this.shareStandardSelect.push(item.userId)
|
||||
}
|
||||
})
|
||||
if (this.shareStandardSelect.length === 0) {
|
||||
this.$message({
|
||||
message: '请选择要分享的人!',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
this.personShareEO.resType = 'COMPARISON'
|
||||
this.personShareEO.resTitle = '【标准比对】 ' + (this.resPk.oldStandNum ? this.resPk.oldStandNum:'') + ' - ' + (this.resPk.newStandNum ? this.resPk.newStandNum:'')
|
||||
/*if (this.resPk.standYear != null && this.resPk.standYear !== '') {
|
||||
this.personShareEO.resTitle = this.resPk.oldStandName + ' ( 编号:' + this.resPk.oldFileType + ' ' + this.resPk.oldStandNum + '-' + this.resPk.standYear + ' )'
|
||||
} else {
|
||||
}*/
|
||||
this.personShareEO.resId = this.resPk.id
|
||||
this.personShareEO.resUri = JSON.stringify(this.resPk)
|
||||
this.personShareEO.recipientId = this.shareStandardSelect
|
||||
this.$http.post('/person/personShare/savePersonShare', this.personShareEO, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.$message({
|
||||
message: '标准分享成功!',
|
||||
type: 'success'
|
||||
})
|
||||
this.shareStandardModal = false
|
||||
this.visibleOrgTable = false
|
||||
// this.drawerModal = false
|
||||
this.shareStandardSelect = []
|
||||
// this.$refs.drawerModalTree.treeReload()
|
||||
}, e => {
|
||||
this.$message.error('标准分享失败!')
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 消息推送
|
||||
shareStandardBt () {
|
||||
if (this.shareStandardSelect.length === 0) {
|
||||
this.$message({
|
||||
message: '请选择要分享的人!',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
this.personShareEO.resType = 'COMPARISON'
|
||||
this.personShareEO.resTitle = '【标准比对】 ' + (this.resPk.oldStandNum ? this.resPk.oldStandNum:'') + ' - ' + (this.resPk.newStandNum ? this.resPk.newStandNum:'')
|
||||
/*if (this.resPk.standYear != null && this.resPk.standYear !== '') {
|
||||
this.personShareEO.resTitle = this.resPk.oldStandName + ' ( 编号:' + this.resPk.oldFileType + ' ' + this.resPk.oldStandNum + '-' + this.resPk.standYear + ' )'
|
||||
} else {
|
||||
}*/
|
||||
this.personShareEO.resId = this.resPk.id
|
||||
this.personShareEO.resUri = JSON.stringify(this.resPk)
|
||||
this.personShareEO.recipientId = this.shareStandardSelect
|
||||
this.$http.post('/person/personShare/savePersonShare', this.personShareEO, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.$message({
|
||||
message: '标准分享成功!',
|
||||
type: 'success'
|
||||
})
|
||||
this.shareStandardModal = false
|
||||
this.drawerModal = false
|
||||
this.shareStandardSelect = []
|
||||
this.$refs.drawerModalTree.treeReload()
|
||||
}, e => {
|
||||
this.$message.error('标准分享失败!')
|
||||
})
|
||||
}
|
||||
},
|
||||
// 树点击
|
||||
selcetTree (treeId, treeNode) {
|
||||
this.shareStandardSelect = treeNode.id
|
||||
},
|
||||
// 取消
|
||||
treeCancel () {
|
||||
this.drawerModal = false
|
||||
this.$refs.drawerModalTree.treeReload()
|
||||
},
|
||||
// 查看
|
||||
handlePreview (params) {
|
||||
if (params.compareType === '条款比对') {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'SeeDatalis',
|
||||
query: {
|
||||
row: JSON.stringify(params)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
let rowDataLeft = {}
|
||||
let rowDataRight = {}
|
||||
rowDataLeft.showNumber = params.oldStandNum
|
||||
rowDataLeft.standName = params.oldStandName
|
||||
rowDataLeft.standNameSplit = null
|
||||
rowDataLeft.standNumSplit = null
|
||||
rowDataRight.showNumber = params.newStandNum
|
||||
rowDataRight.standName = params.newStandName
|
||||
rowDataRight.standNameSplit = null
|
||||
rowDataRight.standNumSplit = null
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'TextComparison',
|
||||
query: {
|
||||
id: params.id,
|
||||
flag: '查看',
|
||||
rowDataLeft: JSON.stringify(rowDataLeft),
|
||||
rowDataRight: JSON.stringify(rowDataRight)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
delFileEditInfo (id) {
|
||||
this.$confirm('是否删除?', '提示', {
|
||||
confirmButtonText: this.$t('m.determine'),
|
||||
cancelButtonText: this.$t('m.cancel'),
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('lawss/sarStandCompareHis/deleteByIds', {
|
||||
deleteByIdList: id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.sarStandCompareHis()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// 取消删除,清空选择
|
||||
// this.$refs.selections.clearSelection()
|
||||
})
|
||||
},
|
||||
enjoyInfo (item) {
|
||||
// this.$message({
|
||||
// message: '此功能正在开发中……',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// this.drawerModal = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.drawerModalTree.clearSearch()
|
||||
// })
|
||||
this.visibleOrgTable = true
|
||||
this.resPk = JSON.parse(JSON.stringify(item))
|
||||
},
|
||||
// scope.$index 获取当前行下标
|
||||
collectInfo (item) {
|
||||
// 点击收藏
|
||||
this.spinShow = true
|
||||
item.isSubmit = true
|
||||
this.personCollect.collectResId = item.id
|
||||
if (item.standYear != null && item.standYear !== '') {
|
||||
this.personCollect.collectTitle = item.newStandName + ' ( 编号:' + item.newStandNum + ' )'
|
||||
} else {
|
||||
this.personCollect.collectTitle = item.newStandName + ' ( 编号:' + item.newStandNum + ' )'
|
||||
}
|
||||
this.personCollect.collectType = 'INLAND_STAND'
|
||||
this.$http.postData('person/personCollect', this.personCollect, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.spinShow = false
|
||||
item.isSubmit = false
|
||||
item.collectBtn = !item.collectBtn
|
||||
console.log(item.collectBtn, '点击收藏后')
|
||||
item.collectId = res.data.id
|
||||
this.cancelCollect = !this.cancelCollect
|
||||
}, e => {
|
||||
item.isSubmit = false
|
||||
})
|
||||
},
|
||||
cancelCollectInfo (item) {
|
||||
this.$http.put('person/personCollect/updateByUserId', {
|
||||
id: item.collectId
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
item.collectBtn = !item.collectBtn
|
||||
this.cancelCollect = !this.cancelCollect
|
||||
item.collectId = ''
|
||||
}
|
||||
})
|
||||
},
|
||||
clearSearchStand () {
|
||||
this.oldNumOrName = ''
|
||||
this.newNumOrName = ''
|
||||
this.splitInfoPage = 1
|
||||
this.sarStandCompareHis()
|
||||
},
|
||||
sarStandCompareHisInfo() {
|
||||
this.splitInfoPage = 1
|
||||
this.sarStandCompareHis()
|
||||
},
|
||||
// 表格
|
||||
sarStandCompareHis () {
|
||||
this.spinShow = true
|
||||
this.$http.get('lawss/sarStandCompareHis/page', {
|
||||
page: this.splitInfoPage,
|
||||
pageSize: this.splitInfoPageSize,
|
||||
oldNumOrName: this.oldNumOrName,
|
||||
newNumOrName: this.newNumOrName
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
res.data.list[i].checked = false
|
||||
if (res.data.list[i].collectId != null && res.data.list[i].collectId !== '') {
|
||||
res.data.list[i].collectBtn = false
|
||||
res.data.list[i].cancelCollectBtn = true
|
||||
} else {
|
||||
res.data.list[i].collectBtn = true
|
||||
res.data.list[i].cancelCollectBtn = false
|
||||
}
|
||||
res.data.list[i].isSubmit = false
|
||||
}
|
||||
this.standInfoList = res.data.list
|
||||
this.total = res.data.count
|
||||
this.spinShow = false
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
pageChange (page) {
|
||||
this.splitInfoPage = page
|
||||
this.sarStandCompareHis()
|
||||
},
|
||||
// 分页每页显示数改变后方法
|
||||
pageSizeChange (pageSize) {
|
||||
this.splitInfoPageSize = pageSize
|
||||
this.sarStandCompareHis()
|
||||
},
|
||||
standSelectChange (data) {
|
||||
this.selectedList = []
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.selectedList.push(data[i].id)
|
||||
}
|
||||
},
|
||||
contrastStandFile () {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'ContrastDetails'
|
||||
})
|
||||
},
|
||||
batchDelete () {
|
||||
if (this.selectedList.length === 0) {
|
||||
this.$message({
|
||||
message: '请选择要删除的数据',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
this.$confirm('确认删除这些数据?', '提示', {
|
||||
confirmButtonText: this.$t('m.determine'),
|
||||
cancelButtonText: this.$t('m.cancel'),
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.$http.post('lawss/sarStandCompareHis/deleteByIds', {
|
||||
deleteByIdList: this.selectedList.join(',')
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.sarStandCompareHis()
|
||||
}, e => {
|
||||
})
|
||||
}).catch(() => {
|
||||
// 取消删除,清空选择
|
||||
// this.$refs.multipleTable.clearSelection()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
mounted () {
|
||||
this.sarStandCompareHis()
|
||||
this.tableHeight = $('.content').height() - 44
|
||||
window.onresize = () => {
|
||||
this.tableHeight = $('.content').height() - 44
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@/assets/styles/mixins';
|
||||
@import '~@/assets/styles/style';
|
||||
.standContrast {
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
.el-divider--horizontal {
|
||||
display: block;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
.flex();
|
||||
flex-direction: column;
|
||||
.action-bar {
|
||||
margin-bottom: 5px;
|
||||
padding: 0;
|
||||
}
|
||||
.content {
|
||||
flex: auto;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.table-wrap {
|
||||
flex: auto;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
& > .pagination {
|
||||
position: static;
|
||||
/deep/.pagination-slot {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.s-c-input {
|
||||
/deep/ .el-input__inner {
|
||||
width: 190px;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-drawer__header{
|
||||
&>span:first-child{
|
||||
outline: none!important;
|
||||
}
|
||||
}
|
||||
::v-deep .el-drawer{
|
||||
outline: none!important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,520 @@
|
||||
<!--条款对比-->
|
||||
<template>
|
||||
<div id="comparisonClauses">
|
||||
<div class="myheader">
|
||||
<div class="back" title="返回" @click="back" >
|
||||
<i class="el-icon-back"></i>
|
||||
</div>
|
||||
<div class="header-title">条款比对</div>
|
||||
</div>
|
||||
<div class="item-contents">
|
||||
<div class="contents-left">
|
||||
<div class="stander-title-item">
|
||||
<div>
|
||||
{{rowDataLeft.standNameSplit === null ? rowDataLeft.standName : rowDataLeft.standNameSplit}} -- {{rowDataLeft.standNumSplit === null ? rowDataLeft.showNumber : rowDataLeft.standNumSplit}}
|
||||
</div>
|
||||
<div>
|
||||
<div><span v-if="selectSarMenu.name">{{selectSarMenu.name}}</span><span v-if="comparisonFlag === '2'">相似度:<span style="color: red">{{text}}</span> <span>({{textcontent}})</span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents-flex">
|
||||
<laws-tree :zNodes="zNodes"
|
||||
ref="domesticTree"
|
||||
treeDivId="domesticTree"
|
||||
:editable="false"
|
||||
expandFirst
|
||||
@treeClick="(treeId, treeNode) => treeClick(treeNode)"
|
||||
|
||||
></laws-tree>
|
||||
<div class="drawer-content-wrapper">
|
||||
<div class="otherStandardDetails-drawer-content">
|
||||
<div style="font-size:15px;padding-left: 15px; height: 30px;line-height: 30px">{{$t('m.termsAndConditions')}}:</div>
|
||||
<div class="item-content-styles" id="itemContentHtml2">
|
||||
<div v-for="(item, index) in itemsContentListShow" :key="index" v-if="comparisonFlag === '1'">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="item.type === 'TEXT'">
|
||||
<p>{{item.itemContent}}</p>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="item.type === 'IMG'">
|
||||
<div style="padding-top: 10px">
|
||||
<div v-html="item.itemContent" @click="previewImage(item.itemContent)"></div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="item.type === 'TABLE'">
|
||||
<div style="padding-top: 10px" class="wordTableStyle">
|
||||
<el-input v-model.trim="item.id" v-if="false"></el-input>
|
||||
<div class="updateContentInput">
|
||||
<table>
|
||||
<tr v-for="(itemRow, indexRow) in item.tableListShow" :key="indexRow">
|
||||
<td v-for="(itemCol, indexCol) in itemRow" :key="indexCol">
|
||||
{{itemCol.content}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-for="(item,index) in leftString" v-html="item" :key="index" v-if="comparisonFlag === '2'"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents-right">
|
||||
<div class="stander-title-item">
|
||||
<div>
|
||||
{{rowDataRight.standNameSplit === null ? rowDataRight.standName : rowDataRight.standNameSplit}} -- {{rowDataRight.standNumSplit === null ? rowDataRight.showNumber : rowDataRight.standNumSplit}}
|
||||
</div>
|
||||
<div>
|
||||
<div><span v-if="selectSarMenuRight.name">{{selectSarMenuRight.name}}</span><span v-if="comparisonFlag === '2'">相似度:<span style="color: red">{{text}}</span> <span>({{textcontent}})</span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents-flex">
|
||||
<laws-tree :zNodes="zNodesRight"
|
||||
ref="domesticTreeRight"
|
||||
treeDivId="domesticTreeRight"
|
||||
:editable="false"
|
||||
expandFirst
|
||||
@treeClick="(treeId, treeNode) => treeClickRight(treeNode)"
|
||||
></laws-tree>
|
||||
<div class="drawer-content-wrapper">
|
||||
<div class="otherStandardDetails-drawer-content">
|
||||
<div style="font-size:15px;padding-left: 15px;height: 30px;line-height: 30px">{{$t('m.termsAndConditions')}}:</div>
|
||||
<div class="item-content-styles" id="itemContentHtml">
|
||||
<div v-for="(item, index) in itemsContentListShowRight" :key="index" v-if="comparisonFlag === '1'">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="item.type === 'TEXT'">
|
||||
<p>{{item.itemContent}}</p>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="item.type === 'IMG'">
|
||||
<div style="padding-top: 10px">
|
||||
<div v-html="item.itemContent" @click="previewImage(item.itemContent)"></div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="item.type === 'TABLE'">
|
||||
<div style="padding-top: 10px" class="wordTableStyle">
|
||||
<el-input v-model.trim="item.id" v-if="false"></el-input>
|
||||
<div class="updateContentInput">
|
||||
<table>
|
||||
<tr v-for="(itemRow, indexRow) in item.tableListShow" :key="indexRow">
|
||||
<td v-for="(itemCol, indexCol) in itemRow" :key="indexCol">
|
||||
{{itemCol.content}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-for="(item,index) in rightString" v-html="item" :key="index" v-if="comparisonFlag === '2'"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-bottom">
|
||||
<el-button type="primary" round class="searchAngNewBtn" size="medium" @click="comparisonClick">比对</el-button>
|
||||
</div>
|
||||
<el-dialog :visible.sync="resultModal" title="比对结果" width="80%" class="standerModal">
|
||||
<div class="standerModal-content">
|
||||
<div class="content-header">
|
||||
相似度:<span style="color: red">{{text}}</span> ({{textcontent}})
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content-left">
|
||||
<div v-for="(item,index) in leftString" v-html="item" :key="index"></div>
|
||||
</div>
|
||||
<div class="content-right">
|
||||
<div v-for="(item,index) in rightString" v-html="item" :key="index"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="展示图片" width="600px;height:800px;" :visible.sync="showImg">
|
||||
<div v-html="preImgContent" class="preImgStyle"></div>
|
||||
</el-dialog>
|
||||
<loading :loading="spinShow">数据加载中……</loading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import 'zTree/js/jquery.ztree.core.js'
|
||||
import 'zTree/js/jquery.ztree.excheck.js'
|
||||
import 'zTree/js/jquery.ztree.exedit.js'
|
||||
import deptTree from '../../../../components/deptTree'
|
||||
export default {
|
||||
name: 'comparisonClauses',
|
||||
data () {
|
||||
return {
|
||||
preImgContent: '',
|
||||
showImg: false,
|
||||
saveItemId: '',
|
||||
saveItemIdRight: '',
|
||||
itemsContentListShow: [],
|
||||
itemsContentListShowRight: [],
|
||||
text: '',
|
||||
textcontent: '',
|
||||
leftString: [],
|
||||
rightString: [],
|
||||
resultModal: false,
|
||||
// Comparison result
|
||||
selectSarMenu: {},
|
||||
selectSarMenuRight: {},
|
||||
zNodes: [],
|
||||
zNodesRight: [],
|
||||
spinShow: false,
|
||||
rowDataLeft: JSON.parse(this.$route.query.rowDataLeft),
|
||||
rowDataRight: JSON.parse(this.$route.query.rowDataRight),
|
||||
comparisonFlag: ''
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
previewImage (content) {
|
||||
this.preImgContent = content
|
||||
this.showImg = true
|
||||
},
|
||||
comparisonClick () {
|
||||
if (this.selectSarMenu.id === undefined) {
|
||||
return this.$message({
|
||||
message: '请先选择左侧条款',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
if (this.selectSarMenuRight.id === undefined) {
|
||||
return this.$message({
|
||||
message: '请先选择右侧条款',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
if (this.saveItemId === '') {
|
||||
return this.$message({
|
||||
message: '左侧选择节点无条款内容,请重新选择',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
if (this.saveItemIdRight === '') {
|
||||
return this.$message({
|
||||
message: '右侧选择节点无条款内容,请重新选择',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
this.spinShow = true
|
||||
let itemsEoPage = {
|
||||
oldItemId: this.saveItemId,
|
||||
newItemId: this.saveItemIdRight,
|
||||
standHisId: this.$route.query.data
|
||||
}
|
||||
this.$http.post('lawss/sarStandCompareHis/clauseComparison', itemsEoPage, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.comparisonFlag = '2'
|
||||
this.leftString = res.data.leftString
|
||||
this.rightString = res.data.rightString
|
||||
this.text = res.data.similarityDegree
|
||||
if (parseFloat(res.data.similarityDegree) < parseFloat('75%')) {
|
||||
this.textcontent = '不相似'
|
||||
} else if (parseFloat(res.data.similarityDegree) >= parseFloat('75%') && parseFloat(res.data.similarityDegree) !== parseFloat('100%')) {
|
||||
this.textcontent = '相似'
|
||||
} else if (parseFloat(res.data.similarityDegree) === parseFloat('100%')) {
|
||||
this.textcontent = '相同'
|
||||
}
|
||||
// this.resultModal = true
|
||||
this.spinShow = false
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
treeClick (treeNode) {
|
||||
this.comparisonFlag = '1'
|
||||
this.selectSarMenu = treeNode
|
||||
this.getSplitItemsByPage()
|
||||
},
|
||||
getSplitItemsByPage () {
|
||||
this.spinShow = true
|
||||
this.saveItemId = ''
|
||||
this.itemsContentListShow = []
|
||||
let itemsEoPage = {}
|
||||
if (this.selectSarMenu.pId == null || this.selectSarMenu.pId === '') {
|
||||
itemsEoPage.menuId = null
|
||||
} else {
|
||||
itemsEoPage.menuId = this.selectSarMenu.id
|
||||
}
|
||||
itemsEoPage.infoId = this.$route.query.infoIdLeft
|
||||
itemsEoPage.page = 1
|
||||
itemsEoPage.pageSize = 9999
|
||||
this.$http.get('lawss/sarFileSplitItems/getSplitItemsByPage', itemsEoPage, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.spinShow = false
|
||||
if (res.ok) {
|
||||
if (res.data.list.length === 0) {
|
||||
this.spinShow = false
|
||||
return this.$Message.warning('该节点没有条款内容')
|
||||
}
|
||||
this.saveItemId = res.data.list[0].id
|
||||
this.showItemRequestDetails(res.data.list[0].id)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
showItemRequestDetails (id) {
|
||||
this.$http.get('lawss/sarFileSplitItemsVal/getItemsValList', {
|
||||
itemId: id,
|
||||
type: 'TEXT'
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.spinShow = false
|
||||
this.itemsContentListShow = res.data
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
treeClickRight (treeNode) {
|
||||
this.comparisonFlag = '1'
|
||||
this.selectSarMenuRight = treeNode
|
||||
this.getSplitItemsByPageRight()
|
||||
},
|
||||
getSplitItemsByPageRight () {
|
||||
this.spinShow = true
|
||||
let itemsEoPage = {}
|
||||
this.saveItemIdRight = ''
|
||||
this.itemsContentListShowRight = []
|
||||
if (this.selectSarMenuRight.pId == null || this.selectSarMenuRight.pId === '') {
|
||||
itemsEoPage.menuId = null
|
||||
} else {
|
||||
itemsEoPage.menuId = this.selectSarMenuRight.id
|
||||
}
|
||||
itemsEoPage.infoId = this.$route.query.infoIdRight
|
||||
itemsEoPage.page = 1
|
||||
itemsEoPage.pageSize = 9999
|
||||
this.$http.get('lawss/sarFileSplitItems/getSplitItemsByPage', itemsEoPage, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.data.list.length === 0) {
|
||||
this.spinShow = false
|
||||
return this.$Message.warning('该节点没有条款内容')
|
||||
}
|
||||
this.saveItemIdRight = res.data.list[0].id
|
||||
this.showItemRequestDetailsRight(res.data.list[0].id)
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
showItemRequestDetailsRight (id) {
|
||||
this.$http.get('lawss/sarFileSplitItemsVal/getItemsValList', {
|
||||
itemId: id,
|
||||
type: 'TEXT'
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.spinShow = false
|
||||
this.itemsContentListShowRight = res.data
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 返回
|
||||
back () {
|
||||
this.$store.commit('setDetailMap', this.$route.path)
|
||||
this.$router.push({
|
||||
name: 'ContrastDetails'
|
||||
})
|
||||
},
|
||||
selectMenu () {
|
||||
this.spinShow = true
|
||||
this.$http.get('lawss/sarFileSplitMenu/getSplitMenusByInfoId', {
|
||||
infoId: this.$route.query.infoIdLeft
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.data.length !== 0) {
|
||||
let cur = res.data
|
||||
let str = []
|
||||
let option = {}
|
||||
for (var i = 0; i < cur.length; i++) {
|
||||
option = { id: cur[i].id,
|
||||
pId: cur[i].pid,
|
||||
name: cur[i].name + ' ' + (cur[i].itemName != null ? cur[i].itemName : ''),
|
||||
number: cur[i].name,
|
||||
itemName: cur[i].itemName != null ? cur[i].itemName : '',
|
||||
displaySeq: cur[i].displaySeq,
|
||||
remarks: cur[i].remarks}
|
||||
str.push(option)
|
||||
this.zNodes = str
|
||||
}
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
selectMenuRight () {
|
||||
this.$http.get('lawss/sarFileSplitMenu/getSplitMenusByInfoId', {
|
||||
infoId: this.$route.query.infoIdRight
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.data.length !== 0) {
|
||||
let cur = res.data
|
||||
let str = []
|
||||
let option = {}
|
||||
for (var i = 0; i < cur.length; i++) {
|
||||
option = { id: cur[i].id,
|
||||
pId: cur[i].pid,
|
||||
name: cur[i].name + ' ' + (cur[i].itemName != null ? cur[i].itemName : ''),
|
||||
number: cur[i].name,
|
||||
itemName: cur[i].itemName != null ? cur[i].itemName : '',
|
||||
displaySeq: cur[i].displaySeq,
|
||||
remarks: cur[i].remarks}
|
||||
str.push(option)
|
||||
this.zNodesRight = str
|
||||
}
|
||||
}
|
||||
|
||||
this.spinShow = false
|
||||
}, e => {
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
deptTree
|
||||
},
|
||||
props: {},
|
||||
watch: {
|
||||
},
|
||||
mounted () {
|
||||
this.selectMenu()
|
||||
this.selectMenuRight()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@/assets/styles/mixins';
|
||||
@import '~@/assets/styles/style';
|
||||
#comparisonClauses{
|
||||
background: #fff;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.myheader {
|
||||
height: 40px;
|
||||
padding: 10px 0 0 10px;
|
||||
.header-title {
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
.item-contents{
|
||||
padding: 0;
|
||||
.flex();
|
||||
height: calc(~'100% - 90px');
|
||||
flex: auto;
|
||||
.stander-title-item{
|
||||
height: 50px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.laws-tree{
|
||||
height: auto;
|
||||
}
|
||||
.contents-left{
|
||||
flex: 0 0 50%;
|
||||
border-right: 1px solid #EDEDED;
|
||||
padding: 15px;
|
||||
//flex: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.contents-flex{
|
||||
//height: calc(~'100% - 50px');
|
||||
.flex();
|
||||
flex: auto;
|
||||
overflow-y: hidden;
|
||||
& > :first-child {
|
||||
flex: 0 0 35%;
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
}
|
||||
.drawer-content-wrapper{
|
||||
flex: 0 0 65%;
|
||||
//height: 100%;
|
||||
overflow: hidden;
|
||||
.flex();
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
.otherStandardDetails-drawer-content{
|
||||
flex: auto;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
.contents-right{
|
||||
padding: 15px;
|
||||
flex: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
.item-bottom{
|
||||
height: 50px;
|
||||
border-top: 1px solid #EDEDED;
|
||||
.flex();
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding-right: 15px;
|
||||
}
|
||||
}
|
||||
.back{
|
||||
float: left;
|
||||
vertical-align: super;
|
||||
display: inline-block;
|
||||
}
|
||||
.standerModal{
|
||||
.ivu-modal-body{
|
||||
min-height: 400px;
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
padding: 0 !important;
|
||||
.standerModal-content{
|
||||
.content-header{
|
||||
height: 50px;
|
||||
font-size: 15px;
|
||||
align-items: center;
|
||||
line-height: 50px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
border-top: 1px solid #EDEDED;
|
||||
min-height: 349px;
|
||||
max-height: 549px;
|
||||
.flex();
|
||||
font-size: 15px;
|
||||
.content-left{
|
||||
border-right: 1px solid #EDEDED;
|
||||
flex: 0 0 50%;
|
||||
height: 100%;
|
||||
line-height: 30px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.content-right{
|
||||
flex: 0 0 50%;
|
||||
height: 100%;
|
||||
line-height: 30px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-content-styles{
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
height: calc(~'100% - 50px');
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,544 @@
|
||||
<comment>
|
||||
# 标准对比 ---- 对比详情
|
||||
</comment>
|
||||
<template>
|
||||
<div class="contrastDetails">
|
||||
<div class="contrast-content">
|
||||
<div class="add-config">
|
||||
<div class="contrast-content-top">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="search-area">
|
||||
<el-form :modal="standCommonlySearch" inline class="label-input-form">
|
||||
<el-formItem :label="$t('m.standardNumberName')" class="search-item">
|
||||
<el-input v-model="numOrName" :placeholder="$t('m.searchByStandardNumberOrName')" clearable :maxlength="100"></el-input>
|
||||
</el-formItem>
|
||||
<el-formItem>
|
||||
<el-button
|
||||
icon="el-icon-search"
|
||||
type="primary"
|
||||
round
|
||||
class="common-button-primary"
|
||||
@click="getSarFileSplitInfoEOPage">
|
||||
</el-button>
|
||||
<el-button round icon="el-icon-refresh-left" class="common-button-default" @click="clearSearchStand"></el-button>
|
||||
</el-formItem>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
</div>
|
||||
<div class="contrast-content-bottom">
|
||||
<div class="table-wrapper">
|
||||
<el-table
|
||||
ref="standSelectTable"
|
||||
:data="addSpiltStandList"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%;"
|
||||
:height="tableHeight"
|
||||
border
|
||||
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
|
||||
<!-- @selection-change="standSelectChange"-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="#"-->
|
||||
<!-- width="55"-->
|
||||
<!-- type="selection"-->
|
||||
<!-- align="center">-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.$index+1" v-model="radio" @change.native="standSelectChange(scope.row)">
|
||||
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="showNumber"
|
||||
label="标准号/政策号"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.standId != null && scope.row.standId !== ''">{{scope.row.showNumber}}</div>
|
||||
<div v-else>{{scope.row.standNumSplit}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standName"
|
||||
label="标准名称/政策名称"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.standId != null && scope.row.standId !== ''">{{scope.row.standName}}</div>
|
||||
<div v-else>{{scope.row.standNameSplit}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileTypeShow"
|
||||
label="文本状态"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileName"
|
||||
label="文件名称"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="creationTime"
|
||||
label="拆分时间"
|
||||
sortable
|
||||
align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<pagination :total="addFileStandtotal" @pageChange="addFileStandPageChange"
|
||||
@pageSizeChange="addFileStandPageSizeChange"></pagination>
|
||||
</div>
|
||||
<div class="add-config">
|
||||
<div class="contrast-content-top">
|
||||
<table-tools-bar>
|
||||
<div slot="left">
|
||||
<div class="search-area">
|
||||
<el-form :modal="standCommonlySearch" inline class="label-input-form">
|
||||
<el-formItem :label="$t('m.standardNumberName')" class="search-item">
|
||||
<el-input v-model="numOrName2" :placeholder="$t('m.searchByStandardNumberOrName')" clearable :maxlength="100"></el-input>
|
||||
</el-formItem>
|
||||
<el-formItem class="search-item">
|
||||
<el-button
|
||||
icon="el-icon-search"
|
||||
round
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
@click="getSarFileSplitInfoEOPage2">
|
||||
</el-button>
|
||||
<el-button round icon="el-icon-refresh-left" class="common-button-default" @click="clearSearchStand2"></el-button>
|
||||
</el-formItem>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</table-tools-bar>
|
||||
</div>
|
||||
<div class="contrast-content-bottom">
|
||||
<div class="table-wrapper">
|
||||
<el-table
|
||||
ref="standSelectTable2"
|
||||
:data="addSpiltStandList2"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:height="tableHeight"
|
||||
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
|
||||
@selection-change="standSelectChange2">
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="#"-->
|
||||
<!-- type="selection"-->
|
||||
<!-- width="55"-->
|
||||
<!-- prop="checkBox"-->
|
||||
<!-- align="center">-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.$index+1" v-model="radio2" @change.native="standSelectChange2(scope.row)">
|
||||
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="showNumber"
|
||||
label="标准号/政策号"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.standId != null && scope.row.standId !== ''">{{scope.row.showNumber}}</div>
|
||||
<div v-else>{{scope.row.standNumSplit}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="standName"
|
||||
label="标准名称/政策名称"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.standId != null && scope.row.standId !== ''">{{scope.row.standName}}</div>
|
||||
<div v-else>{{scope.row.standNameSplit}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileTypeShow"
|
||||
label="文本状态"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileName"
|
||||
label="文件名称"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="creationTime"
|
||||
label="拆分时间"
|
||||
sortable
|
||||
align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<pagination :total="addFileStandtotal2" @pageChange="addFileStandPageChange2"
|
||||
@pageSizeChange="addFileStandPageSizeChange2"></pagination>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contrast-button">
|
||||
<div>
|
||||
<el-button round type="primary" size="mini" @click="comparisonClauses">{{$t('m.termComparison')}}</el-button>
|
||||
<el-button round type="primary" size="mini" @click="textComparison">{{$t('m.fullTextComparison')}}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<loading :loading="spinShow">数据加载中……</loading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'contrastDetails',
|
||||
components: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
spinShow: false,
|
||||
standCommonlySearch: '',
|
||||
numOrName: '',
|
||||
numOrName2: '',
|
||||
selectedSplitStandList: [],
|
||||
selectedSplitStandList2: [],
|
||||
addSpiltStandList: [],
|
||||
addSpiltStandList2: [],
|
||||
selectedList: [],
|
||||
tableHeight: null,
|
||||
radio: null,
|
||||
radio2: null,
|
||||
addFileStandtotal: 0,
|
||||
addFileStandtotal2: 0,
|
||||
addFilePage: 1,
|
||||
addFilePage2: 1,
|
||||
addFilePageSize: this.$store.getters.userInfo.configContent,
|
||||
addFilePageSize2: this.$store.getters.userInfo.configContent
|
||||
}
|
||||
},
|
||||
props: {
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
methods: {
|
||||
// select (selection, row) {
|
||||
// this.$refs.standSelectTable.clearSelection()
|
||||
// if (selection.length === 0) {
|
||||
// return
|
||||
// }
|
||||
// this.$refs.standSelectTable.toggleRowSelection(row, true)
|
||||
// this.selectedSplitStandList = []
|
||||
// },
|
||||
// select2 (selection, row) {
|
||||
// this.$refs.standSelectTable2.clearSelection()
|
||||
// if (selection.length === 0) {
|
||||
// return
|
||||
// }
|
||||
// this.$refs.standSelectTable2.toggleRowSelection(row, true)
|
||||
// },
|
||||
standSelectChange (data) {
|
||||
this.selectedSplitStandList = []
|
||||
if (data.length !== '' || data.length !== null) {
|
||||
for (let i = 0; i < this.addSpiltStandList.length; i++) {
|
||||
if (data.id === this.addSpiltStandList[i].id) {
|
||||
this.addSpiltStandList[i].checkBox = true
|
||||
// 选中的一条数据
|
||||
this.selectedSplitStandList.push(this.addSpiltStandList[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
standSelectChange2 (data) {
|
||||
this.selectedSplitStandList2 = []
|
||||
for (let i = 0; i < this.addSpiltStandList2.length; i++) {
|
||||
if (data.id === this.addSpiltStandList2[i].id) {
|
||||
this.addSpiltStandList2[i].checkBox = true
|
||||
this.selectedSplitStandList2.push(this.addSpiltStandList2[i])
|
||||
}
|
||||
}
|
||||
// this.addSpiltStandList2.forEach((items) => { // 先取消所有对象的勾选,checkBox设置为false
|
||||
// this.$set(items, 'checkBox', false)
|
||||
// })
|
||||
// this.addSpiltStandList2[0].checkBox = true // 再将勾选的对象的checkBox设置为true
|
||||
// this.selectedSplitStandList2 = []
|
||||
// this.selectedSplitStandList2.push(this.addSpiltStandList2[0])
|
||||
},
|
||||
// 条款比对
|
||||
addStandCompareHis () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.postData('lawss/sarStandCompareHis/addStandCompareHis', {
|
||||
oldStandId: this.selectedSplitStandList[0].id,
|
||||
oldStandName: this.selectedSplitStandList[0].standNameSplit === null ? this.selectedSplitStandList[0].standName : this.selectedSplitStandList[0].standNameSplit,
|
||||
oldStandNum: this.selectedSplitStandList[0].standNumSplit === null ? this.selectedSplitStandList[0].showNumber : this.selectedSplitStandList[0].standNumSplit,
|
||||
oldFileType: this.selectedSplitStandList[0].fileType,
|
||||
oldSarType: this.selectedSplitStandList[0].sarType,
|
||||
newStandId: this.selectedSplitStandList2[0].id,
|
||||
newStandName: this.selectedSplitStandList2[0].standNameSplit === null ? this.selectedSplitStandList2[0].standName : this.selectedSplitStandList2[0].standNameSplit,
|
||||
newStandNum: this.selectedSplitStandList2[0].standNumSplit === null ? this.selectedSplitStandList2[0].showNumber : this.selectedSplitStandList2[0].standNumSplit,
|
||||
newFileType: this.selectedSplitStandList2[0].fileType,
|
||||
newSarType: this.selectedSplitStandList2[0].sarType,
|
||||
compareType: '条款比对'
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
resolve(res.data)
|
||||
}, e => {
|
||||
})
|
||||
})
|
||||
},
|
||||
// 条款比对
|
||||
comparisonClauses () {
|
||||
if (this.selectedSplitStandList.length === 0) {
|
||||
return this.$message({
|
||||
message: '请先选择一条左侧标准',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (this.selectedSplitStandList.length > 1) {
|
||||
return this.$message({
|
||||
message: '只能选择一条标准',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
if (this.selectedSplitStandList2.length === 0) {
|
||||
return this.$message({
|
||||
message: '请先选择一条右侧标准',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (this.selectedSplitStandList2.length > 1) {
|
||||
return this.$message({
|
||||
message: '只能选择一条标准',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
this.addStandCompareHis().then((data) => {
|
||||
return this.$router.push({
|
||||
name: 'ComparisonClauses',
|
||||
query: {
|
||||
data: data,
|
||||
infoIdLeft: this.selectedSplitStandList[0].id,
|
||||
infoIdRight: this.selectedSplitStandList2[0].id,
|
||||
rowDataLeft: JSON.stringify(this.selectedSplitStandList[0]),
|
||||
rowDataRight: JSON.stringify(this.selectedSplitStandList2[0])
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 全文比对
|
||||
textComparison () {
|
||||
if (this.selectedSplitStandList.length === 0) {
|
||||
return this.$message({
|
||||
message: '请先选择一条左侧标准',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (this.selectedSplitStandList.length > 1) {
|
||||
return this.$message({
|
||||
message: '只能选择一条标准',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
if (this.selectedSplitStandList2.length === 0) {
|
||||
return this.$message({
|
||||
message: '请先选择一条右侧标准',
|
||||
type: 'warning'
|
||||
})
|
||||
} else if (this.selectedSplitStandList2.length > 1) {
|
||||
return this.$message({
|
||||
message: '只能选择一条标准',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
this.$router.push({
|
||||
name: 'TextComparison',
|
||||
query: {
|
||||
infoIdLeft: this.selectedSplitStandList[0].id,
|
||||
infoIdRight: this.selectedSplitStandList2[0].id,
|
||||
rowDataLeft: JSON.stringify(this.selectedSplitStandList[0]),
|
||||
rowDataRight: JSON.stringify(this.selectedSplitStandList2[0])
|
||||
}
|
||||
})
|
||||
},
|
||||
addFileStandPageChange (page) {
|
||||
this.addFilePage = page
|
||||
this.getSarFileSplitInfoEOPage()
|
||||
},
|
||||
addFileStandPageChange2 (page) {
|
||||
this.addFilePage2 = page
|
||||
this.getSarFileSplitInfoEOPage2()
|
||||
},
|
||||
addFileStandPageSizeChange (pageSize) {
|
||||
this.addFilePageSize = pageSize
|
||||
this.getSarFileSplitInfoEOPage()
|
||||
},
|
||||
addFileStandPageSizeChange2 (pageSize) {
|
||||
this.addFilePageSize2 = pageSize
|
||||
this.getSarFileSplitInfoEOPage2()
|
||||
},
|
||||
getSarFileSplitInfoEOPage () {
|
||||
this.spinShow = true
|
||||
this.$http.get('lawss/sarFileSplitInfo/getSarFileSplitInfoEOPage', {
|
||||
page: this.addFilePage,
|
||||
pageSize: this.addFilePageSize,
|
||||
numOrName: this.numOrName
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.addSpiltStandList = res.data.list
|
||||
this.addFileStandtotal = res.data.count
|
||||
this.spinShow = false
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
getSarFileSplitInfoEOPage2 () {
|
||||
this.spinShow = true
|
||||
this.$http.get('lawss/sarFileSplitInfo/getSarFileSplitInfoEOPage', {
|
||||
page: this.addFilePage2,
|
||||
pageSize: this.addFilePageSize2,
|
||||
numOrName: this.numOrName2
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.addSpiltStandList2 = res.data.list
|
||||
this.addFileStandtotal2 = res.data.count
|
||||
this.spinShow = false
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
clearSearchStand () {
|
||||
this.numOrName = ''
|
||||
this.getSarFileSplitInfoEOPage()
|
||||
},
|
||||
clearSearchStand2 () {
|
||||
this.numOrName2 = ''
|
||||
this.getSarFileSplitInfoEOPage2()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
mounted () {
|
||||
this.getSarFileSplitInfoEOPage()
|
||||
this.getSarFileSplitInfoEOPage2()
|
||||
this.$nextTick(() => {
|
||||
this.tableHeight = $('.contrast-content').height() - 105
|
||||
window.onresize = function () {
|
||||
this.tableHeight = $('.contrast-content').height() - 105
|
||||
}.bind(this)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@/assets/styles/mixins';
|
||||
@import '~@/assets/styles/style';
|
||||
.contrastDetails{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.pagination {
|
||||
width: 100% !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
.contrast-content{
|
||||
width: 100%;
|
||||
height: calc(~'100% - 48px');
|
||||
position: relative;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #dcdee2;
|
||||
& > div{
|
||||
.contrast-content-top{
|
||||
height: 50px;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid ;
|
||||
border-bottom-color: #dcdee2;
|
||||
border-right-width: 1px;
|
||||
border-right-style: solid;
|
||||
border-right-color: #dcdee2;
|
||||
}
|
||||
.contrast-content-bottom{
|
||||
position: relative;
|
||||
background: #fff;
|
||||
height: calc(~'100% - 50px');
|
||||
overflow-y: auto;
|
||||
.ivu-table-wrapper{
|
||||
border: none;
|
||||
}
|
||||
.table-wrapper{
|
||||
margin: 0 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
& >:first-child{
|
||||
border-right-width: 1px;
|
||||
border-right-style: solid;
|
||||
border-right-color: #dcdee2;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
& >:last-child{
|
||||
/*border-right-width: 1px;*/
|
||||
/*border-right-style: solid;*/
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
.contrast-button{
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
.flex();
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.add-config{
|
||||
.ivu-form-item{
|
||||
margin-bottom: 8px;
|
||||
.ivu-form-item-label{
|
||||
width: auto;
|
||||
}
|
||||
.ivu-form-item-content{
|
||||
width: calc(~'100% - 150px');
|
||||
}
|
||||
}
|
||||
.table-wrapper{
|
||||
.ivu-table-wrapper{
|
||||
height: 100%;
|
||||
.ivu-table-body{
|
||||
height: calc(~'100% - 41px');
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
.domestic-standard-database-config-header{
|
||||
.ivu-select-selection{
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
.pagination .ivu-divider-horizontal{
|
||||
display: none;
|
||||
}
|
||||
.standards-tree-modal{
|
||||
.ivu-form-item-content{
|
||||
width: calc(~'100% - 60px');
|
||||
}
|
||||
}
|
||||
}
|
||||
.searchAngNewBtn{
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
.el-table__body-wrapper is-scrolling-none {
|
||||
/* overflow-y: auto !important; */
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.el-table .el-table__body-wrapper {
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,376 @@
|
||||
<!--条款对比-->
|
||||
<template>
|
||||
<div id="seeDatalis">
|
||||
<div class="myheader">
|
||||
<div class="back" title="返回" @click="back" >
|
||||
<i class="el-icon-back"></i>
|
||||
</div>
|
||||
<div class="header-title">条款比对</div>
|
||||
</div>
|
||||
<div class="item-contents">
|
||||
<div style="padding-bottom: 10px;">
|
||||
{{row.oldStandNum}} {{row.oldStandName}} —— {{row.newStandNum}} {{row.newStandName}}
|
||||
<el-button type="primary" round @click="exportItemsCompareHis" size="mini" style="margin-left: 20px" v-btn-permission="'5BXYKLVAQ3AXT2PK7PJC'">{{$t('m.andGetTheResultsOfTheComparison')}}</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="selection"
|
||||
:data="standInfoList"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%;padding:0 0 10px 0;"
|
||||
:height="tableHeight"
|
||||
border
|
||||
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
|
||||
<el-table-column
|
||||
prop="oldItemsNum"
|
||||
:label="$t('m.oldTermNumber')"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="oldItemsName"
|
||||
:label="$t('m.nameOfOldTerm')"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="newItemsNum"
|
||||
:label="$t('m.newTermNumber')"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="newItemsName"
|
||||
:label="$t('m.newTermsAndConditions')"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
:label="$t('m.comparisonTime')"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="action"
|
||||
:label="$t('m.action')"
|
||||
width="280px"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
class="opera-btn"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handlePreview(scope.row)" v-btn-permission="'99CSTACRWA5SKM94W2F2'">{{$t('m.lookAtTheDifferences')}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="resultModal" title="比对结果" width="80%" class="standerModal">
|
||||
<div class="standerModal-content">
|
||||
<div class="content-header">
|
||||
相似度:<span style="color: red">{{text}}</span> ({{textcontent}})
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content-left">
|
||||
<div style="position: relative">
|
||||
<div class="viewLogo" v-show="this.oldRemark !== null"><i class="el-icon-star-on" /></div>
|
||||
<div v-html="leftString"></div>
|
||||
<div @click="leftAddViewRemark" class="addRemarkBtn" v-show="(this.oldRemark === '' || this.oldRemark === null) && this.leftCloseBtn === false"><i class="el-icon-circle-plus-outline" style="font-size: 20px"/></div>
|
||||
<div @click="leftAddViewRemark" class="addRemarkBtn" v-show="(this.oldRemark !== null && this.oldRemark !== '') && this.leftCloseBtn === false"><i class="el-icon-view" style="font-size: 25px"/></div>
|
||||
<div @click="leftCloseView" class="addRemarkBtn" v-show="this.leftCloseBtn === true"><i class="el-icon-circle-close" style="font-size: 20px"/></div>
|
||||
</div>
|
||||
<div v-show="this.leftAddModalState">
|
||||
<el-input type="textarea" v-model.trim="oldRemark" :maxlength="500" show-word-limit :autosize="{minRows: 4,maxRows: 7}" placeholder="书写笔记"></el-input>
|
||||
<div class="btn">
|
||||
<el-button type="primary" size="mini" @click="saveRemark('old')">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-right">
|
||||
<div style="position: relative">
|
||||
<div class="viewLogo" v-show="this.newRemark !== null"><i class="el-icon-star-on" /></div>
|
||||
<div v-html="rightString"></div>
|
||||
<div @click="addViewRemark" class="addRemarkBtn" v-show="(this.newRemark === '' || this.newRemark === null ) && this.closeBtn === false"><i class="el-icon-circle-plus-outline" style="font-size: 20px"/></div>
|
||||
<div @click="addViewRemark" class="addRemarkBtn" v-show="(this.newRemark !== null && this.newRemark !== '') && this.closeBtn === false"><i class type="el-icon-view" style="font-size: 25px"/></div>
|
||||
<div @click="closeView" class="addRemarkBtn" v-show="this.closeBtn === true"><i class="el-icon-circle-close" style="font-size: 20px"/></div>
|
||||
</div>
|
||||
<div v-show="this.addModalState">
|
||||
<el-input type="textarea" v-model.trim="newRemark" :maxlength="500" show-word-limit :autosize="{minRows: 4,maxRows: 7}" placeholder="书写笔记"></el-input>
|
||||
<div class="btn">
|
||||
<el-button type="primary" size="mini" @click="saveRemark('new')">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<loading :loading="spinShow">数据加载中……</loading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'seeDatalis',
|
||||
data () {
|
||||
return {
|
||||
resultModal: false,
|
||||
text: '',
|
||||
textcontent: '',
|
||||
newItemsId: '',
|
||||
oldItemsId: '',
|
||||
compareId: '',
|
||||
leftString: '',
|
||||
newRemark: '',
|
||||
rightString: '',
|
||||
oldRemark: '',
|
||||
addModalState: false,
|
||||
leftAddModalState: false,
|
||||
closeBtn: false,
|
||||
leftCloseBtn: false,
|
||||
spinShow: false,
|
||||
tableHeight: null,
|
||||
splitInfoPage: 1,
|
||||
splitInfoPageSize: 10,
|
||||
total: 0,
|
||||
row: JSON.parse(this.$route.query.row),
|
||||
standInfoList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handlePreview (row) {
|
||||
this.resultModal = true
|
||||
this.closeBtn = false
|
||||
this.leftCloseBtn = false
|
||||
this.addModalState = false
|
||||
this.leftAddModalState = false
|
||||
this.leftString = row.oldItemsText
|
||||
this.newRemark = row.newRemark
|
||||
this.newItemsId = row.newItemsId
|
||||
this.rightString = row.newItemsText
|
||||
this.oldRemark = row.oldRemark
|
||||
this.oldItemsId = row.oldItemsId
|
||||
this.compareId = row.id
|
||||
this.text = row.similarityDegree
|
||||
if (parseFloat(row.similarityDegree) < parseFloat('75%')) {
|
||||
this.textcontent = '不相似'
|
||||
} else if (parseFloat(row.similarityDegree) >= parseFloat('75%') && parseFloat(row.similarityDegree) !== parseFloat('100%')) {
|
||||
this.textcontent = '相似'
|
||||
} else if (parseFloat(row.similarityDegree) === parseFloat('100%')) {
|
||||
this.textcontent = '相同'
|
||||
}
|
||||
},
|
||||
pageChange (page) {
|
||||
this.splitInfoPage = page
|
||||
this.page()
|
||||
},
|
||||
// 分页每页显示数改变后方法
|
||||
pageSizeChange (pageSize) {
|
||||
this.splitInfoPageSize = pageSize
|
||||
this.page()
|
||||
},
|
||||
// 返回
|
||||
back () {
|
||||
if (this.$store.state.detailMap !== '') {
|
||||
this.$router.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setDetailMap', '')
|
||||
} else {
|
||||
let lastPathList = this.$store.getters.getLastDetailMap
|
||||
let lastPath = lastPathList[lastPathList.length - 1]
|
||||
this.$router.push(lastPath)
|
||||
lastPathList.pop(1)
|
||||
this.$store.commit('setLastDetailMap', JSON.stringify(lastPathList))
|
||||
}
|
||||
},
|
||||
page () {
|
||||
this.spinShow = true
|
||||
this.$http.get('lawss/sarItemsCompareHis/page', {
|
||||
page: this.splitInfoPage,
|
||||
pageSize: this.splitInfoPageSize,
|
||||
standHisId: JSON.parse(this.$route.query.row).id
|
||||
// standHisId: ''
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.standInfoList = res.data.list
|
||||
this.total = res.data.count
|
||||
this.spinShow = false
|
||||
}
|
||||
})
|
||||
},
|
||||
exportItemsCompareHis () {
|
||||
if (this.standInfoList != null && this.standInfoList.length > 0) {
|
||||
let exportName = ''
|
||||
let standHisId = JSON.parse(this.$route.query.row).id
|
||||
window.open('/api/lawss/sarItemsCompareHis/exportItemsCompareHis?standHisId=' + standHisId + '&exportName=' + exportName)
|
||||
this.$message({
|
||||
message: '导出成功',
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: '当前没有比对结果数据',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 添加笔记
|
||||
addViewRemark () {
|
||||
this.addModalState = true
|
||||
this.closeBtn = true
|
||||
},
|
||||
closeView () {
|
||||
this.closeBtn = false
|
||||
this.addModalState = false
|
||||
},
|
||||
leftAddViewRemark () {
|
||||
this.leftAddModalState = true
|
||||
this.leftCloseBtn = true
|
||||
},
|
||||
leftCloseView () {
|
||||
this.leftCloseBtn = false
|
||||
this.leftAddModalState = false
|
||||
},
|
||||
saveRemark (type) {
|
||||
if (type === 'old') {
|
||||
this.$http.putData('lawss/sarItemsCompareHis/updateItemsCompareHis', {
|
||||
id: this.compareId,
|
||||
oldRemark: this.oldRemark
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.page()
|
||||
})
|
||||
} else {
|
||||
this.$http.putData('lawss/sarItemsCompareHis/updateItemsCompareHis', {
|
||||
id: this.compareId,
|
||||
newRemark: this.newRemark
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.page()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
},
|
||||
props: {},
|
||||
watch: {
|
||||
},
|
||||
mounted () {
|
||||
this.$nextTick(() => {
|
||||
this.tableHeight = $('.item-contents').height() - 20
|
||||
window.onresize = function () {
|
||||
this.tableHeight = $('.item-contents').height() - 20
|
||||
}.bind(this)
|
||||
})
|
||||
this.page()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import '~@/assets/styles/mixins';
|
||||
@import '~@/assets/styles/style';
|
||||
#seeDatalis{
|
||||
position: relative;
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
.myheader {
|
||||
height: 40px;
|
||||
padding: 10px 0 0 10px;
|
||||
.header-title {
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
.item-contents{
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
//height: calc(~'100% - 100px');
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.back{
|
||||
float: left;
|
||||
vertical-align: super;
|
||||
display: inline-block;
|
||||
}
|
||||
.standerModal{
|
||||
overflow-y: auto;
|
||||
padding: 0 !important;
|
||||
.standerModal-content{
|
||||
.content-header{
|
||||
height: 50px;
|
||||
font-size: 15px;
|
||||
align-items: center;
|
||||
line-height: 50px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
border-top: 1px solid #EDEDED;
|
||||
min-height: 349px;
|
||||
max-height: 549px;
|
||||
.flex();
|
||||
font-size: 15px;
|
||||
.content-left{
|
||||
border-right: 1px solid #EDEDED;
|
||||
flex: 0 0 50%;
|
||||
/*height: 100%;*/
|
||||
overflow-y: auto;
|
||||
line-height: 30px;
|
||||
padding: 0 15px;
|
||||
position: relative;
|
||||
.btn{
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
}
|
||||
.addRemarkBtn{
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: -8px;
|
||||
/*z-index: 10;*/
|
||||
}
|
||||
.viewLogo{
|
||||
position: absolute;
|
||||
font-size: 20px;
|
||||
top: 0;
|
||||
right: -8px;
|
||||
.ivu-icon{
|
||||
color: #3391CE;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-right{
|
||||
flex: 0 0 50%;
|
||||
/*height: 100%;*/
|
||||
overflow-y: auto;
|
||||
line-height: 30px;
|
||||
padding: 0 15px;
|
||||
position: relative;
|
||||
.btn{
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
}
|
||||
.addRemarkBtn{
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: -8px;
|
||||
/*z-index: 10;*/
|
||||
}
|
||||
.viewLogo{
|
||||
position: absolute;
|
||||
font-size: 20px;
|
||||
top: 0;
|
||||
right: -8px;
|
||||
.ivu-icon{
|
||||
color: #3391CE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,759 @@
|
||||
<!--全文对比-->
|
||||
<template>
|
||||
<div id="textComparison">
|
||||
<div class="item-header">
|
||||
<div class="action-bar title-option">
|
||||
<div class="contentTitle">
|
||||
<div class="back" title="返回" @click="back" >
|
||||
<i class="el-icon-back"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stander-title">全文比对
|
||||
<el-button v-if="flag === '查看'" type="primary" size="mini" @click="exportItemsCompareHis" class="searchAngNewBtn importBtn" style="margin-left: 20px;padding-bottom: 10px;" v-btn-permission="'5BXYKLVAQ3AXT2PK7PJC'">导出比对结果</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-contents">
|
||||
<div class="contents-left">
|
||||
<div class="stander-title-item">{{rowDataLeft.standNameSplit === null ? rowDataLeft.standName : rowDataLeft.standNameSplit}} -- {{rowDataLeft.standNumSplit === null ? rowDataLeft.showNumber : rowDataLeft.standNumSplit}}
|
||||
<!-- <el-button v-if="flag === '查看' && !leftShowAllFlag" size="small" type="default" @click="showAllRemark('left')" style="margin-left: 10px">显示全部笔记</el-button>-->
|
||||
<!-- <el-button v-if="flag === '查看' && leftShowAllFlag" size="small" type="default" @click="hideAllRemark('left')" style="margin-left: 10px">隐藏全部笔记</el-button>-->
|
||||
<br><span v-if="leftName !==''">{{leftName}}</span>
|
||||
<span v-if="leftName !== '' || rightName !== ''">相似度:<span style="color: red">{{text}}</span> ({{textcontent}})</span>
|
||||
</div>
|
||||
<div id="contentLeft">
|
||||
<div class="wrap-left">
|
||||
<laws-tree
|
||||
:zNodes="leftZNodes"
|
||||
ref="reloadTree"
|
||||
:editable="false"
|
||||
treeDivId="domesticTree1"
|
||||
deptSelect
|
||||
@treeClick="handleLeftTreeClick"
|
||||
class="ztree">
|
||||
</laws-tree>
|
||||
</div>
|
||||
<div class="wrap-right">
|
||||
<div :id="'left_'+ (item.menuId ? item.menuId : item.id)" v-for="(item, index) in resLeftMapList" :key="index">
|
||||
<div class="children" @click="childrenClick(1, item, index)">
|
||||
<div class="viewLogo" v-show="flag === '查看' && item.remark !== null && item.remark !== ''"><i class="el-icon-star-on" /></div>
|
||||
<div>{{item.itemsNum}} {{item.itemsName}}</div>
|
||||
<div v-html="item.itemsText" :id="'itemsLeftText_' + item.itemsId"></div>
|
||||
<div @click="addViewRemark(item)" class="addRemarkBtn" v-show="flag === '查看' && item.remark === null && item.closeBtn === false"><i class="el-icon-circle-plus-outline" style="font-size: 20px"/></div>
|
||||
<div @click="addViewRemark(item)" class="addRemarkBtn" v-show="flag === '查看' && item.remark !== null && item.closeBtn === false"><i class="el-icon-view" style="font-size: 25px"/></div>
|
||||
<div @click="closeView(item)" class="addRemarkBtn" v-show="flag === '查看' && item.closeBtn === true"><i class="el-icon-circle-close" style="font-size: 20px"/></div>
|
||||
</div>
|
||||
<div v-show="item.addModalState" :id="'remarksLeft_' +item.itemsId">
|
||||
<el-input type="textarea" v-model.trim="item.remark" :maxlength="500" show-word-limit :autosize="{minRows: 4,maxRows: 7}" placeholder="书写笔记"></el-input>
|
||||
<div style="text-align: right;margin: 10px 0">
|
||||
<el-button type="primary" size="mini" @click="modalSave(item)">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contents-right">
|
||||
<div class="stander-title-item">{{rowDataRight.standNameSplit === null ? rowDataRight.standName : rowDataRight.standNameSplit}} -- {{rowDataRight.standNumSplit === null ? rowDataRight.showNumber : rowDataRight.standNumSplit}}
|
||||
<!-- <el-button v-if="flag === '查看' && !rightShowAllFlag" size="small" type="default" @click="showAllRemark('right')" style="margin-left: 10px">显示全部笔记</el-button>-->
|
||||
<!-- <el-button v-if="flag === '查看' && rightShowAllFlag" size="small" type="default" @click="hideAllRemark('right')" style="margin-left: 10px">隐藏全部笔记</el-button>-->
|
||||
<br><span v-if="rightName !== ''">{{rightName}}</span>
|
||||
<span v-if="leftName !== '' || rightName !== ''">相似度:<span style="color: red">{{text}}</span> ({{textcontent}})</span>
|
||||
</div>
|
||||
<div id="contentRight">
|
||||
<div class="wrap-left">
|
||||
<laws-tree
|
||||
:zNodes="rightZNodes"
|
||||
ref="reloadTree"
|
||||
:editable="false"
|
||||
treeDivId="domesticTree2"
|
||||
deptSelect
|
||||
@treeClick="handleRightTreeClick"
|
||||
class="ztree">
|
||||
</laws-tree>
|
||||
</div>
|
||||
<div class="wrap-right">
|
||||
<div :id="'right_'+ (item.menuId ? item.menuId : item.id)" v-for="(item, index) in resRightMapList" :key="index">
|
||||
<div class="children" @click="childrenClick(2, item, index)">
|
||||
<div>{{item.itemsNum}} {{item.itemsName}}</div>
|
||||
<div class="viewLogo" v-show="flag === '查看' && item.remark !== null && item.remark !== ''"><i class="el-icon-star-on" /></div>
|
||||
<div v-html="item.itemsText" :id="'itemsRightText_' + item.itemsId"></div>
|
||||
<div @click="addViewRemark(item)" class="addRemarkBtn" v-show="flag === '查看' && item.remark === null && item.closeBtn === false"><i class="el-icon-circle-plus-outline" style="font-size: 20px"/></div>
|
||||
<div @click="addViewRemark(item)" class="addRemarkBtn" v-show="flag === '查看' && item.remark !== null && item.closeBtn === false"><i class="el-icon-view" style="font-size: 25px"/></div>
|
||||
<div @click="closeView(item)" class="addRemarkBtn" v-show="flag === '查看' && item.closeBtn === true"><i class="el-icon-circle-close" style="font-size: 20px"/></div>
|
||||
</div>
|
||||
<div v-show="item.addModalState" :id="'remarksRight_' +item.itemsId">
|
||||
<el-input type="textarea" v-model.trim="item.remark" :maxlength="500" show-word-limit :autosize="{minRows: 4,maxRows: 7}" placeholder="书写笔记"></el-input>
|
||||
<div style="text-align: right;margin: 10px 0">
|
||||
<el-button type="primary" size="mini" @click="modalSave(item)">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="resultModal" title="比对结果" width="80%" class="standerModal">
|
||||
<div class="standerModal-content">
|
||||
<div class="content-header">
|
||||
相似度:<span style="color: red">{{text}}</span> ({{textcontent}})
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content-left">
|
||||
<div v-for="(item,index) in leftString" v-html="item" :key="index"></div>
|
||||
</div>
|
||||
<div class="content-right">
|
||||
<div v-for="(item,index) in rightString" v-html="item" :key="index"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<loading :loading="spinShow">数据加载中……</loading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'textComparison',
|
||||
data () {
|
||||
return {
|
||||
itemLeftIndex: '',
|
||||
itemRightIndex: '',
|
||||
leftName: '',
|
||||
rightName: '',
|
||||
text: '',
|
||||
textcontent: '',
|
||||
resultModal: false,
|
||||
resLeftMapList: [],
|
||||
spinShow: false,
|
||||
rowDataLeft: JSON.parse(this.$route.query.rowDataLeft),
|
||||
rowDataRight: JSON.parse(this.$route.query.rowDataRight),
|
||||
resRightMapList: [],
|
||||
saveItemId: '',
|
||||
saveItemIdRight: '',
|
||||
leftString: '',
|
||||
rightString: '',
|
||||
oldLeftId: '',
|
||||
oldRightId: '',
|
||||
oldLeftContent: '',
|
||||
oldRightContent: '',
|
||||
leftShowAllFlag: false,
|
||||
rightShowAllFlag: false,
|
||||
flag: '',
|
||||
leftZNodes: [],
|
||||
rightZNodes: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
comparisonClick () {
|
||||
if (this.saveItemId === '' && this.saveItemIdRight === '') {
|
||||
return this.$Message.warning('请选择比对的条款内容')
|
||||
}
|
||||
if (this.saveItemId === '' || this.saveItemIdRight === '') {
|
||||
return this.$Message.warning('暂无找到相似的文本')
|
||||
}
|
||||
this.spinShow = true
|
||||
let itemsEoPage = {
|
||||
oldItemId: this.saveItemId,
|
||||
newItemId: this.saveItemIdRight
|
||||
}
|
||||
this.$http.post('lawss/sarStandCompareHis/clauseComparison', itemsEoPage, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.oldLeftId = '#left_' + this.saveItemId
|
||||
this.oldRightId = '#right_' + this.saveItemIdRight
|
||||
this.oldLeftContent = $('#itemsLeftText_' + this.saveItemId).html()
|
||||
this.oldRightContent = $('#itemsRightText_' + this.saveItemIdRight).html()
|
||||
$('#left_' + this.saveItemId).find('#itemsLeftText_' + this.saveItemId).html(res.data.leftString)
|
||||
$('#right_' + this.saveItemIdRight).find('#itemsRightText_' + this.saveItemIdRight).html(res.data.rightString)
|
||||
this.text = res.data.similarityDegree
|
||||
if (parseFloat(res.data.similarityDegree) >= parseFloat('75%') && parseFloat(res.data.similarityDegree) !== parseFloat('100%')) {
|
||||
this.textcontent = '相似'
|
||||
} else if (parseFloat(res.data.similarityDegree) === parseFloat('100%')) {
|
||||
this.textcontent = '相同'
|
||||
} else if (parseFloat(res.data.similarityDegree) < parseFloat('75%')) {
|
||||
this.textcontent = '不相似'
|
||||
}
|
||||
// this.resultModal = true
|
||||
this.spinShow = false
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
// 添加笔记
|
||||
addViewRemark (item) {
|
||||
item.addModalState = true
|
||||
item.closeBtn = true
|
||||
},
|
||||
closeView (item) {
|
||||
if (item.remark !== item.oldRemark) {
|
||||
this.$Modal.confirm({
|
||||
title: '提示',
|
||||
content: '<p>笔记内容有修改,是否保存?</p>',
|
||||
onOk: () => {
|
||||
this.modalSave(item)
|
||||
item.closeBtn = false
|
||||
item.addModalState = false
|
||||
},
|
||||
onCancel: () => {
|
||||
item.closeBtn = false
|
||||
item.addModalState = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
item.closeBtn = false
|
||||
item.addModalState = false
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 提交笔记 事件
|
||||
* @param item
|
||||
* 根据noteId 判断 有值走update 无值走新增
|
||||
* 走updata时判断是否笔记内容修改为空,修改为空则走删除接口
|
||||
*/
|
||||
modalSave (item) {
|
||||
this.$http.putData('lawss/sarStandItemsCompareHis/updateCompareItems', {
|
||||
remark: item.remark,
|
||||
id: item.id
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
item.oldRemark = item.remark
|
||||
})
|
||||
},
|
||||
childrenClick (flag, item, index) {
|
||||
this.text = ''
|
||||
this.textcontent = ''
|
||||
this.leftName = ''
|
||||
this.rightName = ''
|
||||
if (flag === 1) {
|
||||
if (this.oldLeftId !== '') {
|
||||
$(this.oldLeftId).find('#itemsLeftText_' + this.saveItemId).html(this.oldLeftContent)
|
||||
$(this.oldRightId).find('#itemsRightText_' + this.saveItemIdRight).html(this.oldRightContent)
|
||||
}
|
||||
this.saveItemId = item.itemsId
|
||||
|
||||
this.itemLeftIndex = index
|
||||
|
||||
let mainContainerLeft = $('#contentLeft')
|
||||
$('#contentLeft .children').css('border', '2px solid #EDEDED')
|
||||
|
||||
let scrollToContainerLeft = mainContainerLeft.find(`.children:eq(${index})`)
|
||||
scrollToContainerLeft.css('border', '2px solid #3391CE')
|
||||
|
||||
let mainContainer = $('#contentRight')
|
||||
$('#contentRight .children').css('border', '2px solid #EDEDED')
|
||||
|
||||
if (item.targetStand === null) {
|
||||
return false
|
||||
}
|
||||
this.leftName = item.itemsNum + ' ' + item.itemsName
|
||||
|
||||
this.saveItemIdRight = this.resRightMapList[item.targetStand].itemsId
|
||||
|
||||
let scrollToContainer = mainContainer.find(`.children:eq(${item.targetStand})`)
|
||||
this.rightName = scrollToContainer.children(':first').html()
|
||||
scrollToContainer.css('border', '2px solid red')
|
||||
|
||||
// 非动画效果
|
||||
// mainContainer.scrollTop(
|
||||
// scrollToContainer.offset().top - mainContainer.offset().top + mainContainer.scrollTop()
|
||||
// );
|
||||
// 动画效果
|
||||
mainContainer.animate({
|
||||
scrollTop: scrollToContainer.offset().top - mainContainer.offset().top + mainContainer.scrollTop()
|
||||
})// 2秒滑动到指定位置
|
||||
} else {
|
||||
if (this.oldLeftId !== '') {
|
||||
$(this.oldLeftId).find('#itemsLeftText_' + this.saveItemId).html(this.oldLeftContent)
|
||||
$(this.oldRightId).find('#itemsRightText_' + this.saveItemIdRight).html(this.oldRightContent)
|
||||
}
|
||||
this.saveItemIdRight = item.itemsId
|
||||
|
||||
this.itemRightIndex = index
|
||||
|
||||
let mainContainerLeft = $('#contentRight')
|
||||
$('#contentRight .children').css('border', '2px solid #EDEDED')
|
||||
|
||||
let scrollToContainerRight = mainContainerLeft.find(`.children:eq(${index})`)
|
||||
scrollToContainerRight.css('border', '2px solid #3391CE')
|
||||
|
||||
let mainContainer = $('#contentLeft')
|
||||
$('#contentLeft .children').css('border', '2px solid #EDEDED')
|
||||
|
||||
if (item.targetStand === null) {
|
||||
return false
|
||||
}
|
||||
this.rightName = item.itemsNum + ' ' + item.itemsName
|
||||
|
||||
this.saveItemId = this.resLeftMapList[item.targetStand].itemsId
|
||||
|
||||
let scrollToContainer = mainContainer.find(`.children:eq(${item.targetStand})`)// 滚动到<div id="thisMainPanel">中类名为son-panel的第六个处
|
||||
this.leftName = scrollToContainer.children('div:nth-child(2)').html()
|
||||
scrollToContainer.css('border', '2px solid red')
|
||||
// 非动画效果
|
||||
// mainContainer.scrollTop(
|
||||
// scrollToContainer.offset().top - mainContainer.offset().top + mainContainer.scrollTop()
|
||||
// );
|
||||
// 动画效果
|
||||
mainContainer.animate({
|
||||
scrollTop: scrollToContainer.offset().top - mainContainer.offset().top + mainContainer.scrollTop()
|
||||
})// 2秒滑动到指定位置
|
||||
}
|
||||
this.comparisonClick()
|
||||
},
|
||||
// 返回
|
||||
back () {
|
||||
if (this.$store.state.detailMap !== '') {
|
||||
this.$router.push(this.$store.state.detailMap)
|
||||
this.$store.commit('setDetailMap', '')
|
||||
} else {
|
||||
let lastPathList = this.$store.getters.getLastDetailMap
|
||||
let lastPath = lastPathList[lastPathList.length - 1]
|
||||
this.$router.push(lastPath)
|
||||
lastPathList.pop(1)
|
||||
this.$store.commit('setLastDetailMap', JSON.stringify(lastPathList))
|
||||
}
|
||||
},
|
||||
getStandItemsCompareHisListLeft () {
|
||||
this.spinShow = true
|
||||
this.$http.get('lawss/sarStandItemsCompareHis/getStandItemsCompareHisList', {
|
||||
standHisId: this.$route.query.id,
|
||||
leftOrRight: 'LEFT'
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.resLeftMapList = res.data
|
||||
this.resLeftMapList.map((item) => {
|
||||
this.$set(item, 'addModalState', false)
|
||||
this.$set(item, 'closeBtn', false)
|
||||
this.$set(item, 'oldRemark', item.remark)
|
||||
})
|
||||
if (res.data.length !== 0) {
|
||||
let cur = res.data
|
||||
let str = []
|
||||
let option = {}
|
||||
for (var i = 0; i < cur.length; i++) {
|
||||
option = { id: cur[i].id,
|
||||
pId: cur[i].pid,
|
||||
name: cur[i].itemsNum + ' ' + cur[i].itemsName,
|
||||
number: cur[i].name,
|
||||
itemName: cur[i].itemName != null ? cur[i].itemName : '',
|
||||
displaySeq: cur[i].displaySeq,
|
||||
remarks: cur[i].remarks}
|
||||
str.push(option)
|
||||
this.leftZNodes = str
|
||||
}
|
||||
}
|
||||
this.spinShow = false
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
getStandItemsCompareHisListRight () {
|
||||
this.spinShow = true
|
||||
this.$http.get('lawss/sarStandItemsCompareHis/getStandItemsCompareHisList', {
|
||||
standHisId: this.$route.query.id,
|
||||
leftOrRight: 'RIGHT'
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.resRightMapList = res.data
|
||||
this.resRightMapList.map((item) => {
|
||||
this.$set(item, 'addModalState', false)
|
||||
this.$set(item, 'closeBtn', false)
|
||||
this.$set(item, 'oldRemark', item.remark)
|
||||
})
|
||||
if (res.data.length !== 0) {
|
||||
let cur = res.data
|
||||
let str = []
|
||||
let option = {}
|
||||
for (var i = 0; i < cur.length; i++) {
|
||||
option = { id: cur[i].id,
|
||||
pId: cur[i].pid,
|
||||
name: cur[i].itemsNum + ' ' + cur[i].itemsName,
|
||||
number: cur[i].name,
|
||||
itemName: cur[i].itemName != null ? cur[i].itemName : '',
|
||||
displaySeq: cur[i].displaySeq,
|
||||
remarks: cur[i].remarks}
|
||||
str.push(option)
|
||||
this.rightZNodes = str
|
||||
}
|
||||
}
|
||||
this.spinShow = false
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
fullTextComparison () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.spinShow = true
|
||||
this.$http.post('lawss/sarStandCompareHis/fullTextComparison', {
|
||||
leftStandard: this.$route.query.infoIdLeft,
|
||||
rightStandard: this.$route.query.infoIdRight
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.resLeftMapList = res.data.resLeftMapList
|
||||
this.resRightMapList = res.data.resRightMapList
|
||||
this.spinShow = false
|
||||
resolve(res.data)
|
||||
}, e => {
|
||||
})
|
||||
})
|
||||
},
|
||||
exportItemsCompareHis () {
|
||||
let exportName = ''
|
||||
let standHisId = this.$route.query.id
|
||||
window.open('/api/lawss/sarStandItemsCompareHis/exportItemsCompareHis?standHisId=' + standHisId + '&exportName=' + exportName)
|
||||
this.$Message.info('导出成功')
|
||||
},
|
||||
showAllRemark (type) {
|
||||
let showList = []
|
||||
if (type === 'left') {
|
||||
this.leftShowAllFlag = !this.leftShowAllFlag
|
||||
showList = this.resLeftMapList
|
||||
} else {
|
||||
this.rightShowAllFlag = !this.rightShowAllFlag
|
||||
showList = this.resRightMapList
|
||||
}
|
||||
if (showList != null && showList.length > 0) {
|
||||
for (let i = 0; i < showList.length; i++) {
|
||||
if (showList[i].remark != null && showList[i].remark !== '') {
|
||||
showList[i].closeBtn = true
|
||||
showList[i].addModalState = true
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type === 'left') {
|
||||
this.resLeftMapList = showList
|
||||
} else {
|
||||
this.resRightMapList = showList
|
||||
}
|
||||
},
|
||||
hideAllRemark (type) {
|
||||
let showList = []
|
||||
if (type === 'left') {
|
||||
this.leftShowAllFlag = !this.leftShowAllFlag
|
||||
showList = this.resLeftMapList
|
||||
} else {
|
||||
this.rightShowAllFlag = !this.rightShowAllFlag
|
||||
showList = this.resRightMapList
|
||||
}
|
||||
if (showList != null && showList.length > 0) {
|
||||
for (let i = 0; i < showList.length; i++) {
|
||||
if (showList[i].remark != null && showList[i].remark !== '') {
|
||||
showList[i].closeBtn = false
|
||||
showList[i].addModalState = false
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type === 'left') {
|
||||
this.resLeftMapList = showList
|
||||
} else {
|
||||
this.resRightMapList = showList
|
||||
}
|
||||
},
|
||||
|
||||
getSplitItemsByPage (leftId, rightId) {
|
||||
const p1 = new Promise((resolve, reject) => {
|
||||
this.$http.get('lawss/sarFileSplitMenu/getSplitMenusByInfoId', {
|
||||
infoId: leftId
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.data.length !== 0) {
|
||||
let cur = res.data
|
||||
let str = []
|
||||
let option = {}
|
||||
for (var i = 0; i < cur.length; i++) {
|
||||
option = { id: cur[i].id,
|
||||
pId: cur[i].pid,
|
||||
name: cur[i].name + ' ' + (cur[i].itemName != null ? cur[i].itemName : ''),
|
||||
number: cur[i].name,
|
||||
itemName: cur[i].itemName != null ? cur[i].itemName : '',
|
||||
displaySeq: cur[i].displaySeq,
|
||||
remarks: cur[i].remarks}
|
||||
str.push(option)
|
||||
this.leftZNodes = str
|
||||
}
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
})
|
||||
const p2 = new Promise((resolve, reject) => {
|
||||
this.$http.get('lawss/sarFileSplitMenu/getSplitMenusByInfoId', {
|
||||
infoId: rightId
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.data.length !== 0) {
|
||||
let cur = res.data
|
||||
let str = []
|
||||
let option = {}
|
||||
for (var i = 0; i < cur.length; i++) {
|
||||
option = { id: cur[i].id,
|
||||
pId: cur[i].pid,
|
||||
name: cur[i].name + ' ' + (cur[i].itemName != null ? cur[i].itemName : ''),
|
||||
number: cur[i].name,
|
||||
itemName: cur[i].itemName != null ? cur[i].itemName : '',
|
||||
displaySeq: cur[i].displaySeq,
|
||||
remarks: cur[i].remarks}
|
||||
str.push(option)
|
||||
this.rightZNodes = str
|
||||
}
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
handleLeftTreeClick(treeId, treeNode) {
|
||||
const domId = `left_${treeNode.id}`
|
||||
function getElementTop(element) {
|
||||
var el = (typeof element == "string") ? document.getElementById(element) : element;
|
||||
if (el.parentNode === null || el.style.display == 'none') {
|
||||
return false;
|
||||
}
|
||||
return el.offsetTop - el.parentNode.offsetTop;
|
||||
}
|
||||
const offsetTop = getElementTop(domId)
|
||||
/*$('#contentLeft').children('.wrap-right').animate({scrollTop: offsetTop},500)*/
|
||||
},
|
||||
|
||||
handleRightTreeClick(treeId, treeNode) {
|
||||
const domId = `right_${treeNode.id}`
|
||||
function getElementTop(element) {
|
||||
var el = (typeof element == "string") ? document.getElementById(element) : element;
|
||||
if (el.parentNode === null || el.style.display == 'none') {
|
||||
return false;
|
||||
}
|
||||
return el.offsetTop - el.parentNode.offsetTop;
|
||||
}
|
||||
const offsetTop = getElementTop(domId)
|
||||
/*$('#contentRight').children('.wrap-right').animate({scrollTop: offsetTop},500)*/
|
||||
}
|
||||
},
|
||||
components: {
|
||||
},
|
||||
props: {},
|
||||
watch: {
|
||||
itemRightIndex: {
|
||||
deep: true,
|
||||
handler (newVal, oldVal) {
|
||||
if (oldVal !== '') {
|
||||
this.resRightMapList[oldVal].addModalState = false
|
||||
this.resRightMapList[oldVal].closeBtn = false
|
||||
}
|
||||
}
|
||||
},
|
||||
itemLeftIndex: {
|
||||
deep: true,
|
||||
handler (newVal, oldVal) {
|
||||
if (oldVal !== '') {
|
||||
this.resLeftMapList[oldVal].addModalState = false
|
||||
this.resLeftMapList[oldVal].closeBtn = false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.flag = this.$route.query.flag
|
||||
if (this.flag === '查看') {
|
||||
this.getStandItemsCompareHisListLeft()
|
||||
this.getStandItemsCompareHisListRight()
|
||||
return false
|
||||
}
|
||||
this.fullTextComparison()
|
||||
this.getSplitItemsByPage(this.$route.query.infoIdLeft, this.$route.query.infoIdRight)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@/assets/styles/mixins';
|
||||
@import '~@/assets/styles/style';
|
||||
#textComparison{
|
||||
position: relative;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
.item-header{
|
||||
height: 50px;
|
||||
padding: 10px;
|
||||
//border-bottom: 1px solid #EDEDED;
|
||||
.action-bar{
|
||||
padding: 0;
|
||||
border-top: 0;
|
||||
}
|
||||
.title-option{
|
||||
line-height: 30px;
|
||||
}
|
||||
.importBtn{
|
||||
padding-bottom: 7px !important;
|
||||
}
|
||||
.stander-title-item{
|
||||
padding: 5px 10px;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
button{
|
||||
//padding-top: 5px;
|
||||
}
|
||||
.stander-title{
|
||||
padding: 0px 10px;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.item-contents{
|
||||
padding: 0;
|
||||
.flex();
|
||||
height: calc(~'100% - 50px');
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
.stander-title-item{
|
||||
height: 50px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.contents-left{
|
||||
flex: 0 0 49%;
|
||||
border-right: 1px solid #EDEDED;
|
||||
height: 100%;
|
||||
padding: 15px;
|
||||
#contentLeft {
|
||||
height: calc(~'100% - 50px');
|
||||
overflow-y: auto;
|
||||
line-height: 30px;
|
||||
display: flex;
|
||||
.children {
|
||||
border: 2px solid #EDEDED;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
border-radius: 9px;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
&:hover{
|
||||
box-shadow: 0 1px 13px 0 #DDD;
|
||||
}
|
||||
.addRemarkBtn{
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 5px;
|
||||
/*z-index: 10;*/
|
||||
}
|
||||
.viewLogo{
|
||||
position: absolute;
|
||||
font-size: 20px;
|
||||
top: 0;
|
||||
right: 5px;
|
||||
.ivu-icon{
|
||||
color: #3391CE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.contents-right{
|
||||
flex: 0 0 49%;
|
||||
height: 100%;
|
||||
padding: 15px;
|
||||
#contentRight{
|
||||
height: calc(~'100% - 50px');
|
||||
overflow-y: auto;
|
||||
line-height: 30px;
|
||||
display: flex;
|
||||
.children {
|
||||
border: 2px solid #EDEDED;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
border-radius: 9px;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
&:hover{
|
||||
box-shadow: 0 1px 13px 0 #DDD;
|
||||
}
|
||||
.addRemarkBtn{
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 5px;
|
||||
/*z-index: 10;*/
|
||||
}
|
||||
.viewLogo{
|
||||
position: absolute;
|
||||
font-size: 20px;
|
||||
top: 0;
|
||||
right: 5px;
|
||||
.ivu-icon{
|
||||
color: #3391CE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-bottom{
|
||||
height: 70px;
|
||||
border-top: 1px solid #EDEDED;
|
||||
.flex();
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding-right: 15px;
|
||||
}
|
||||
}
|
||||
.back{
|
||||
float: left;
|
||||
vertical-align: super;
|
||||
display: inline-block;
|
||||
}
|
||||
.standerModal{
|
||||
.ivu-modal-body{
|
||||
min-height: 400px;
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
padding: 0 !important;
|
||||
.standerModal-content{
|
||||
.content-header{
|
||||
height: 50px;
|
||||
font-size: 15px;
|
||||
align-items: center;
|
||||
line-height: 50px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
border-top: 1px solid #EDEDED;
|
||||
min-height: 349px;
|
||||
max-height: 549px;
|
||||
.flex();
|
||||
font-size: 15px;
|
||||
.content-left{
|
||||
border-right: 1px solid #EDEDED;
|
||||
flex: 0 0 50%;
|
||||
height: 100%;
|
||||
line-height: 30px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.content-right{
|
||||
flex: 0 0 50%;
|
||||
height: 100%;
|
||||
line-height: 30px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.wrap-left,
|
||||
.wrap-right {
|
||||
height: 100%;
|
||||
}
|
||||
.wrap-left {
|
||||
width: 200px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.wrap-right {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user