对接条款比对
This commit is contained in:
@@ -130,7 +130,9 @@ export default {
|
||||
leftData: {},
|
||||
rightData: {},
|
||||
textRight: '',
|
||||
textLeft: ''
|
||||
textLeft: '',
|
||||
textLeftId: '',
|
||||
textRightId: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
@@ -144,7 +146,7 @@ export default {
|
||||
// 左侧树选择
|
||||
onSelectLeft (selectedKeys, exports) {
|
||||
const node = exports.node.$vnode.data.props.dataRef
|
||||
if (!node.pid) {
|
||||
if (node.children && node.children.length > 0) {
|
||||
return
|
||||
}
|
||||
this.leftData = node
|
||||
@@ -161,13 +163,16 @@ export default {
|
||||
this.loading = true
|
||||
documentSplitView(query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.records && res.result.records.length > 0){
|
||||
if (res.result.records && res.result.records.length > 0) {
|
||||
this.textLeft = res.result.records[0].item_content
|
||||
this.textLeftId = res.result.records[0].id
|
||||
} else {
|
||||
this.textLeft = ''
|
||||
this.textLeftId = ''
|
||||
}
|
||||
} else {
|
||||
this.textLeft = ''
|
||||
this.textLeftId = ''
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
@@ -175,7 +180,7 @@ export default {
|
||||
// 右侧树选择
|
||||
onSelectRight (selectedKeys, exports) {
|
||||
const node = exports.node.$vnode.data.props.dataRef
|
||||
if (!node.pid) {
|
||||
if (node.children && node.children.length > 0) {
|
||||
return
|
||||
}
|
||||
this.rightData = node
|
||||
@@ -193,13 +198,16 @@ export default {
|
||||
this.loading = true
|
||||
documentSplitView(query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.records && res.result.records.length > 0){
|
||||
if (res.result.records && res.result.records.length > 0) {
|
||||
this.textRight = res.result.records[0].item_content
|
||||
this.textRightId = res.result.records[0].id
|
||||
} else {
|
||||
this.textRight = ''
|
||||
this.textRightId = ''
|
||||
}
|
||||
} else {
|
||||
this.textRight = ''
|
||||
this.textRightId = ''
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
@@ -227,20 +235,22 @@ export default {
|
||||
})
|
||||
},
|
||||
comparisonClick () {
|
||||
if (!this.leftData.id) {
|
||||
if (!this.textLeftId) {
|
||||
this.$message.warning('请选择左侧条款')
|
||||
} else if (!this.rightData.id) {
|
||||
} else if (!this.textRightId) {
|
||||
this.$message.warning('请选择右侧条款')
|
||||
} else {
|
||||
const query = {
|
||||
oldItemId: this.leftData.id,
|
||||
newItemId: this.rightData.id,
|
||||
oldItemId: this.textLeftId,
|
||||
newItemId: this.textRightId,
|
||||
standHisId: this.$route.query.id
|
||||
}
|
||||
this.loading = true
|
||||
clauseComparisonEvent(query).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user