对接文档对比
This commit is contained in:
@@ -1220,4 +1220,5 @@ module.exports = {
|
||||
sdt:'sdt',
|
||||
dre:'dre',
|
||||
applicableInstructionsMarketList:'Applicable instructions of market list',
|
||||
pleaseSelectTheDataCompared:'Please select the data to be compared',
|
||||
}
|
||||
@@ -1323,4 +1323,5 @@ module.exports = {
|
||||
sdt:'工程接口人',
|
||||
dre:'填写人',
|
||||
applicableInstructionsMarketList:'市场清单适用说明',
|
||||
pleaseSelectTheDataCompared:'请选择需要对比的数据',
|
||||
}
|
||||
+148
-34
@@ -50,7 +50,7 @@
|
||||
:scroll="{x: '100%',y:400}"
|
||||
rowKey="id"
|
||||
:data-source="dataSourceLeft"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeysLeft, onChange: onSelectChangeLeft }"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeysLeft, onChange: onSelectChangeLeft,columnTitle:' ' }"
|
||||
:columns="columns"
|
||||
>
|
||||
</a-table>
|
||||
@@ -70,9 +70,10 @@
|
||||
<span class="box-button-standard-left">
|
||||
{{$t('selectedStandard')}}
|
||||
</span>
|
||||
<span class="box-button-standard-right">
|
||||
{{$t('noComparisonDocumentSelected')}}
|
||||
</span>
|
||||
<span class="box-button-standard-right"
|
||||
:class="{'box-button-standard-right-color':selectedRowKeysLeftRecord[0]}">
|
||||
{{selectedRowKeysLeftRecord[0]?selectedRowKeysLeftRecord[0].serialNumber+' '+selectedRowKeysLeftRecord[0].fileName:$t('noComparisonDocumentSelected')}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
@@ -113,7 +114,7 @@
|
||||
:scroll="{x: '100%',y:400}"
|
||||
rowKey="id"
|
||||
:data-source="dataSourceRight"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeysRight, onChange: onSelectChangeRight }"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeysRight, onChange: onSelectChangeRight,columnTitle:' ' }"
|
||||
:columns="columns"
|
||||
>
|
||||
</a-table>
|
||||
@@ -133,8 +134,9 @@
|
||||
<span class="box-button-standard-left">
|
||||
{{$t('selectedStandard')}}
|
||||
</span>
|
||||
<span class="box-button-standard-right">
|
||||
{{$t('noComparisonDocumentSelected')}}
|
||||
<span class="box-button-standard-right"
|
||||
:class="{'box-button-standard-right-color':selectedRowKeysRightRecord[0]}">
|
||||
{{selectedRowKeysRightRecord[0]?selectedRowKeysRightRecord[0].serialNumber+' '+selectedRowKeysRightRecord[0].fileName:$t('noComparisonDocumentSelected')}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -142,12 +144,12 @@
|
||||
<div class="Remarks">
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<div class="box-title-text-Remarks">
|
||||
<div class="title-text-Remarks" :title="$t('standard')">
|
||||
<div class="title-text-Remarks" :title="$t('RemarkInfo')">
|
||||
<span>{{$t('RemarkInfo')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dreUserIdName">
|
||||
<a-form-model-item class="itemModel" prop="remark">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('RemarkInfo')"
|
||||
v-model="formInline.RemarkInfo"
|
||||
v-model="formInline.remark"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -159,11 +161,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
|
||||
<JLoading :loading="loading">{{$t('pleaseWaitWhileRunning')}}</JLoading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'initiateDocumentComparison',
|
||||
data() {
|
||||
@@ -179,10 +183,20 @@
|
||||
pageSizeRight: 10,
|
||||
selectedRowKeysRight: [],
|
||||
dataSourceRight: [],
|
||||
selectedRowKeysLeftRecord: [],
|
||||
selectedRowKeysRightRecord: [],
|
||||
totalRight: 0,
|
||||
pageNoRight: 1,
|
||||
formInline: {},
|
||||
rules: {},
|
||||
rules: {
|
||||
remark: [
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('RemarkInfo') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('number'),
|
||||
@@ -196,7 +210,7 @@
|
||||
title: this.$t('standard'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'standard'
|
||||
dataIndex: 'serialNumber'
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
@@ -208,26 +222,26 @@
|
||||
title: this.$t('TextStatus'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'TextStatus'
|
||||
dataIndex: 'fileType'
|
||||
},
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileName'
|
||||
},
|
||||
{
|
||||
title: this.$t('textInformation'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'textInformation'
|
||||
}
|
||||
],
|
||||
dataSourceLeft: [],
|
||||
selectedRowKeysLeft: []
|
||||
selectedRowKeysLeft: [],
|
||||
url: {
|
||||
list: '/split/sarFileSplitInfo/page',
|
||||
add: '/compare/sarFileCompareInfo/fullTextComparison'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getListLeft()
|
||||
this.getListRight()
|
||||
},
|
||||
methods: {
|
||||
Fallback() {
|
||||
@@ -236,43 +250,133 @@
|
||||
})
|
||||
},
|
||||
searchQueryLeft() {
|
||||
|
||||
this.pageNoLeft = 1
|
||||
this.getListLeft()
|
||||
},
|
||||
searchResetLeft() {
|
||||
|
||||
this.queryParamLeft = {}
|
||||
this.pageNoLeft = 1
|
||||
this.getListLeft()
|
||||
},
|
||||
onSelectChangeLeft(value) {
|
||||
onSelectChangeLeft(value, record) {
|
||||
this.selectedRowKeysLeft = value
|
||||
this.selectedRowKeysLeftRecord = []
|
||||
if (this.selectedRowKeysLeft.length > 1) {
|
||||
this.selectedRowKeysLeft.shift()
|
||||
}
|
||||
let content = record.filter(res => {
|
||||
return res.id == this.selectedRowKeysLeft[0]
|
||||
})
|
||||
this.selectedRowKeysLeftRecord = content
|
||||
},
|
||||
pageOnChangeLeft(page) {
|
||||
this.pageNoLeft = page
|
||||
this.getList()
|
||||
this.getListLeft()
|
||||
},
|
||||
SizeChangeLeft(pageSize) {
|
||||
SizeChangeLeft(page, pageSize) {
|
||||
this.pageNoLeft = 1
|
||||
this.pageSizeLeft = pageSize
|
||||
this.getList()
|
||||
this.getListLeft()
|
||||
},
|
||||
searchQueryRight() {
|
||||
|
||||
this.pageNoRight = 1
|
||||
this.getListRight()
|
||||
},
|
||||
searchResetRight() {
|
||||
|
||||
this.queryParamRight = {}
|
||||
this.pageNoRight = 1
|
||||
this.getListRight()
|
||||
},
|
||||
onSelectChangeRight(value) {
|
||||
onSelectChangeRight(value, record) {
|
||||
this.selectedRowKeysRight = value
|
||||
this.selectedRowKeysRightRecord = []
|
||||
if (this.selectedRowKeysRight.length > 1) {
|
||||
this.selectedRowKeysRight.shift()
|
||||
}
|
||||
let content = record.filter(res => {
|
||||
return res.id == this.selectedRowKeysRight[0]
|
||||
})
|
||||
this.selectedRowKeysRightRecord = content
|
||||
},
|
||||
pageOnChangeRight(page) {
|
||||
this.pageNoRight = page
|
||||
this.getList()
|
||||
this.getListRight()
|
||||
},
|
||||
SizeChangeRight(pageSize) {
|
||||
SizeChangeRight(page, pageSize) {
|
||||
this.pageNoRight = 1
|
||||
this.pageSizeRight = pageSize
|
||||
this.getList()
|
||||
this.getListRight()
|
||||
},
|
||||
submit() {
|
||||
|
||||
if (!this.selectedRowKeysRightRecord[0] || !this.selectedRowKeysLeftRecord[0]) {
|
||||
this.$message.warning(this.$t('pleaseSelectTheDataCompared'))
|
||||
return
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
let query = {
|
||||
leftStandard: this.selectedRowKeysLeftRecord[0].id,
|
||||
rightStandard: this.selectedRowKeysRightRecord[0].id,
|
||||
remark: this.formInline.remark
|
||||
}
|
||||
postAction(this.url.add, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.loading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getListLeft() {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParamLeft))
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
if (queryParam[val] instanceof Array) {
|
||||
queryParam[val] = queryParam[val].join(',')
|
||||
}
|
||||
})
|
||||
let query = {
|
||||
pageNo: this.pageNoLeft,
|
||||
pageSize: this.pageSizeLeft,
|
||||
...queryParam
|
||||
}
|
||||
this.loadingLeft = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSourceLeft = res.result.records || []
|
||||
this.totalLeft = res.result.total
|
||||
this.loadingLeft = false
|
||||
} else {
|
||||
this.loadingLeft = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getListRight() {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParamRight))
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
if (queryParam[val] instanceof Array) {
|
||||
queryParam[val] = queryParam[val].join(',')
|
||||
}
|
||||
})
|
||||
let query = {
|
||||
pageNo: this.pageNoRight,
|
||||
pageSize: this.pageSizeRight,
|
||||
...queryParam
|
||||
}
|
||||
this.loadingRight = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSourceRight = res.result.records || []
|
||||
this.totalRight = res.result.total
|
||||
this.loadingRight = false
|
||||
} else {
|
||||
this.loadingRight = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -286,6 +390,8 @@
|
||||
height: 100%;
|
||||
|
||||
.doc-detail-wrap {
|
||||
padding-bottom: 20px;
|
||||
|
||||
.doc-detail-header {
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
@@ -319,6 +425,8 @@
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2px #EFF1F3 solid;
|
||||
min-height: 400px;
|
||||
max-height: 672px;
|
||||
}
|
||||
|
||||
.detail-content-right {
|
||||
@@ -327,6 +435,8 @@
|
||||
padding: 24px 32px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2px #EFF1F3 solid;
|
||||
min-height: 400px;
|
||||
max-height: 672px;
|
||||
}
|
||||
|
||||
.page {
|
||||
@@ -442,4 +552,8 @@
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.box-button-standard-right-color {
|
||||
color: #040B29;
|
||||
}
|
||||
</style>
|
||||
@@ -96,7 +96,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
@@ -105,8 +105,8 @@
|
||||
return {
|
||||
//url传参严格按照当前命名
|
||||
url: {
|
||||
list: '',
|
||||
deleteBatch: ''
|
||||
list: '/compare/sarFileCompareInfo/page',
|
||||
deleteBatch: '/compare/sarFileCompareInfo/deleteBatch'
|
||||
},
|
||||
loading: false,
|
||||
dataSource: [{}],
|
||||
@@ -129,67 +129,67 @@
|
||||
{
|
||||
title: this.$t('standard') + 1,
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumber',
|
||||
dataIndex: 'serialNumberLeft',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('title') + 1,
|
||||
align: 'center',
|
||||
dataIndex: 'title',
|
||||
dataIndex: 'titleLeft',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('TextStatus'),
|
||||
align: 'center',
|
||||
width: 170,
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
dataIndex: 'TextStatus'
|
||||
dataIndex: 'fileTypeLeft'
|
||||
},
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
align: 'center',
|
||||
width: 170,
|
||||
width: 270,
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileName'
|
||||
dataIndex: 'fileNameLeft'
|
||||
},
|
||||
{
|
||||
title: this.$t('standard') + 2,
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumberTwo',
|
||||
dataIndex: 'serialNumberRight',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('title') + 2,
|
||||
align: 'center',
|
||||
dataIndex: 'titleTwo',
|
||||
dataIndex: 'titleRight',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
title: this.$t('TextStatus'),
|
||||
align: 'center',
|
||||
width: 170,
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
dataIndex: 'TextStatusTwo'
|
||||
dataIndex: 'fileTypeRight'
|
||||
},
|
||||
{
|
||||
title: this.$t('fileName'),
|
||||
align: 'center',
|
||||
width: 170,
|
||||
width: 270,
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileNameTwo'
|
||||
dataIndex: 'fileNameRight'
|
||||
},
|
||||
{
|
||||
title: this.$t('releaseSituation'),
|
||||
align: 'center',
|
||||
width: 170,
|
||||
ellipsis: true,
|
||||
dataIndex: 'releaseSituation'
|
||||
dataIndex: 'releaseState'
|
||||
},
|
||||
{
|
||||
title: this.$t('remarks'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
width: 170,
|
||||
width: 270,
|
||||
dataIndex: 'remark'
|
||||
},
|
||||
{
|
||||
@@ -203,7 +203,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.getList()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
searchQuery() {
|
||||
@@ -276,7 +276,7 @@
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
|
||||
Reference in New Issue
Block a user