Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
zyx.net
2022-08-05 14:23:31 +08:00
6 changed files with 260 additions and 208 deletions
+1
View File
@@ -1238,5 +1238,6 @@ module.exports = {
share: 'share', share: 'share',
simplifiedChinese:'Simplified Chinese', simplifiedChinese:'Simplified Chinese',
uploadOnly:'Upload only', uploadOnly:'Upload only',
turnOnAutoMatch:'Turn on auto match',
Adjustareasofresponsibility:'Adjust areas of responsibility', Adjustareasofresponsibility:'Adjust areas of responsibility',
} }
+1
View File
@@ -1341,5 +1341,6 @@ module.exports = {
share:'分享', share:'分享',
simplifiedChinese:'简体中文', simplifiedChinese:'简体中文',
uploadOnly:'只能上传', uploadOnly:'只能上传',
turnOnAutoMatch:'打开自动匹配',
Adjustareasofresponsibility:'调整责任领域', Adjustareasofresponsibility:'调整责任领域',
} }
@@ -27,24 +27,27 @@
<a-checkbox @change="onChange" :indeterminate="indeterminate" :checked="checkAll" <a-checkbox @change="onChange" :indeterminate="indeterminate" :checked="checkAll"
style="margin-left: 20px;float: left"></a-checkbox> style="margin-left: 20px;float: left"></a-checkbox>
<div class="detail-content-header-content"> <div class="detail-content-header-content">
<div class="detail-content-header-content-left"> <div class="detail-content-header-content-left"
:class="{'detail-content-header-content-left-active':$route.query.isDisplay}">
所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word 所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word
</div> </div>
<div class="detail-content-header-content-content"> <div class="detail-content-header-content-content"
:class="{'detail-content-header-content-left-active':$route.query.isDisplay}">
所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word 所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word
</div> </div>
<div class="detail-content-header-content-right"> <div class="detail-content-header-content-right" v-if="!$route.query.isDisplay">
操作 操作
</div> </div>
</div> </div>
</div> </div>
<a-checkbox-group @change="checkboxChange" v-model="checkboxList" <a-checkbox-group @change="checkboxChange" v-model="checkboxList"
style="width: 100%;overflow: overlay;height: calc(100vh - 300px)"> style="width: 100%;overflow: overlay;height: calc(100vh - 300px)">
<div class="detail-content-content"> <div class="detail-content-content" v-for="item in 4">
<a-checkbox value="A" class="detail-checkbox"> <a-checkbox value="A" class="detail-checkbox">
</a-checkbox> </a-checkbox>
<div class="detail-content-content-text"> <div class="detail-content-content-text">
<div class="detail-content-content-text-left"> <div class="detail-content-content-text-left"
:class="{'detail-content-content-text-dis':$route.query.isDisplay}">
<div class="detail-content-left"> <div class="detail-content-left">
<div class="detail-content-left-top"> <div class="detail-content-left-top">
<span>第10条</span> <span>第10条</span>
@@ -74,7 +77,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="detail-content-content-text-right"> <div class="detail-content-content-text-right" v-if="!$route.query.isDisplay">
<span class="text-button-one"> <span class="text-button-one">
<a class="text-button" @click="comparaEdit">{{$t('edit')}}</a> <a class="text-button" @click="comparaEdit">{{$t('edit')}}</a>
<a class="text-button" @click="comparaDelete">{{$t('delete')}}</a> <a class="text-button" @click="comparaDelete">{{$t('delete')}}</a>
@@ -82,96 +85,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="detail-content-content">
<a-checkbox value="B" class="detail-checkbox">
</a-checkbox>
<div class="detail-content-content-text">
<div class="detail-content-content-text-left">
<div class="detail-content-left">
<div class="detail-content-left-top">
<span>第10条</span>
<span style="margin-left: 10px">光反射器</span>
</div>
<div class="detail-content-left-button">
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板
sdf kdsf kljsfkldsfdsfdsf
</div>
</div>
<div class="detail-content-right">
<div class="detail-content-left-top">
<span>第10条</span>
<span style="margin-left: 10px">光反射器</span>
</div>
<div class="detail-content-left-button">
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板收到反是馈就但是罚款决定书发的科技示范
</div>
</div>
<div class="detail-content-bottom">
<div class="detail-content-bottom-left" :title="$t('comparisonDifferenceComment')">
<a-icon type="message"/>
{{$t('comparisonDifferenceComment')}}:
</div>
<div class="detail-content-bottom-right">
差异是各单位在结构上的差别程度成员在时间横轴上的位置的差别程经理与其他的差别程度 横轴上的位置的差别程经理与其他的差别程度差异
</div>
</div>
</div>
<div class="detail-content-content-text-right">
<span class="text-button-one">
<a class="text-button">{{$t('edit')}}</a>
<a class="text-button">{{$t('delete')}}</a>
</span>
</div>
</div>
</div>
<div class="detail-content-content">
<a-checkbox value="C" class="detail-checkbox">
</a-checkbox>
<div class="detail-content-content-text">
<div class="detail-content-content-text-left">
<div class="detail-content-left">
<div class="detail-content-left-top">
<span>第10条</span>
<span style="margin-left: 10px">光反射器</span>
</div>
<div class="detail-content-left-button">
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板
sdf kdsf kljsfkldsfdsfdsf
</div>
</div>
<div class="detail-content-right">
<div class="detail-content-left-top">
<span>第10条</span>
<span style="margin-left: 10px">光反射器</span>
</div>
<div class="detail-content-left-button">
12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板收到反是馈就但是罚款决定书发的科技示范
</div>
</div>
<div class="detail-content-bottom">
<div class="detail-content-bottom-left" :title="$t('comparisonDifferenceComment')">
<a-icon type="message"/>
{{$t('comparisonDifferenceComment')}}:
</div>
<div class="detail-content-bottom-right">
差异是各单位在结构上的差别程度成员在时间横轴上的位置的差别程经理与其他的差别程度 横轴上的位置的差别程经理与其他的差别程度差异
</div>
</div>
</div>
<div class="detail-content-content-text-right">
<span class="text-button-one">
<a class="text-button">{{$t('edit')}}</a>
<a class="text-button">{{$t('delete')}}</a>
</span>
</div>
</div>
</div>
</a-checkbox-group> </a-checkbox-group>
<div class="detail-content-content"> <div class="detail-content-content">
<a-checkbox value="D" class="detail-checkbox"> <a-checkbox value="D" class="detail-checkbox">
</a-checkbox> </a-checkbox>
<div class="detail-content-content-text"> <div class="detail-content-content-text">
<div class="detail-content-content-text-left"> <div class="detail-content-content-text-left"
:class="{'detail-content-content-text-dis':this.$route.query.isDisplay}">
<div class="detail-content-content-text-left-text"> <div class="detail-content-content-text-left-text">
{{$t('fullTextComments')}}: 文字占位符评论文字内容文字占位符评论文 {{$t('fullTextComments')}}: 文字占位符评论文字内容文字占位符评论文
字内容文字占位符评论文字内容文字 字内容文字占位符评论文字内容文字
@@ -190,7 +110,7 @@
占位符评论文字内容文字占位符评论文字内容文字占 占位符评论文字内容文字占位符评论文字内容文字占
</div> </div>
</div> </div>
<div class="detail-content-content-text-right"> <div class="detail-content-content-text-right" v-if="!this.$route.query.isDisplay">
<span class="text-button-one"> <span class="text-button-one">
<a class="text-button" @click="fullTextEdit">{{$t('edit')}}</a> <a class="text-button" @click="fullTextEdit">{{$t('edit')}}</a>
<!-- <a class="text-button">{{$t('delete')}}</a>--> <!-- <a class="text-button">{{$t('delete')}}</a>-->
@@ -593,4 +513,12 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.detail-content-content-text-dis {
width: 100% !important;
}
.detail-content-header-content-left-active {
width: 50% !important;
}
</style> </style>
@@ -20,9 +20,9 @@
{{$t('addFullTextComment')}} {{$t('addFullTextComment')}}
</div> </div>
<div @click="turnOffAutomaticMatchingClick" class="operator-text-text" <div @click="turnOffAutomaticMatchingClick" class="operator-text-text"
:title="$t('turnOffAutomaticMatching')"> :title="isMatching ? $t('turnOffAutomaticMatching'):$t('turnOnAutoMatch')">
<a-icon type="close-circle"/> <a-icon :type="isMatching?'close-circle':'check-circle'"/>
{{$t('turnOffAutomaticMatching')}} {{isMatching ? $t('turnOffAutomaticMatching'):$t('turnOnAutoMatch')}}
</div> </div>
</div> </div>
</div> </div>
@@ -31,33 +31,25 @@
<div style="width: 100%;height: auto;overflow: hidden"> <div style="width: 100%;height: auto;overflow: hidden">
<div class="detail-content-left"> <div class="detail-content-left">
<div class="detail-content-left-header"> <div class="detail-content-left-header">
GB 23145-2020 机动车标准 FMVSS 114 中文.word {{this.resultData.serialNumberLeft}}&nbsp;
{{this.resultData.fileNameLeft}}
</div> </div>
<div class="detail-content-content-left"> <div class="detail-content-content-left">
<a-tree <a-tree
class="draggable-tree" class="draggable-tree"
:tree-data="gData" @select="onSelectLeft"
:tree-data="resultData.menuLeft"
/> />
</div> </div>
<div class="detail-content-content-right"> <div class="detail-content-content-right-top">
<div class="detail-content-content-right-data" @click="detailLeft(0)" <div class="detail-content-content-right">
:class="{'detail-content-content-right-data-blue':false}"> <div class="detail-content-content-right-data" @click="detailLeft(index,item)"
<div class="detail-content-content-right-data-text"> v-for="(item,index) in resultData.textLeft"
1、范围 :class="{'detail-content-content-right-data-blue':false}">
</div> <div class="detail-content-content-right-data-text" style="margin-bottom: 10px;color: #040B29">
<div class="detail-content-content-right-data-text"> {{item.itemsNum + ' ' + item.itemsName}}
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等, </div>
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。 <div class="detail-content-content-right-data-text" v-html="item.itemsText"></div>
</div>
</div>
<div class="detail-content-content-right-data" @click="detailLeft(1)"
:class="{'detail-content-content-right-data-blue':true}">
<div class="detail-content-content-right-data-text">
1、范围
</div>
<div class="detail-content-content-right-data-text">
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等,
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。
</div> </div>
</div> </div>
</div> </div>
@@ -65,55 +57,31 @@
<div class="detail-content-right"> <div class="detail-content-right">
<div class="detail-content-left-header"> <div class="detail-content-left-header">
<span class="detail-content-left-header-text"> <span class="detail-content-left-header-text">
GB 23145-2020 机动车标准 FMVSS 114 中文.word {{this.resultData.serialNumberRight}}&nbsp;
{{this.resultData.fileNameRight}}
</span> </span>
<span class="detail-content-left-header-text-right"> <span class="detail-content-left-header-text-right">
<span style="color: #9B9DA9">相似度:</span> <!-- <span style="color: #9B9DA9">相似度:</span>-->
<span style="color: #E83030">98%</span> <!-- <span style="color: #E83030">98%</span>-->
</span> </span>
</div> </div>
<div class="detail-content-content-left"> <div class="detail-content-content-left">
<a-tree <a-tree
class="draggable-tree" class="draggable-tree"
:tree-data="gData" @select="onSelectRight"
:tree-data="resultData.menuRight"
/> />
</div> </div>
<div class="detail-content-content-right"> <div class="detail-content-content-right-right-top">
<div class="detail-content-content-right-data-right" @click="detailRight(0)" <div class="detail-content-content-right-right">
:class="{'detail-content-content-right-data-blue-right':true}"> <div class="detail-content-content-right-data-right" @click="detailRight(index,item)"
<div class="detail-content-content-right-data-text"> v-for="(item,index) in resultData.textRight"
1、范围 :class="{'detail-content-content-right-data-blue-right':true}">
</div> <div class="detail-content-content-right-data-text" style="margin-bottom: 10px;color: #040B29">
<div class="detail-content-content-right-data-text"> {{item.itemsNum + ' ' + item.itemsName}}
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等, </div>
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。 <div class="detail-content-content-right-data-text" v-html="item.itemsText">
</div> </div>
</div>
<div class="detail-content-content-right-data-right" @click="detailRight(1)">
<div class="detail-content-content-right-data-text">
1、范围
</div>
<div class="detail-content-content-right-data-text">
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等,
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。
</div>
</div>
<div class="detail-content-content-right-data-right" @click="detailRight(2)">
<div class="detail-content-content-right-data-text">
1、范围
</div>
<div class="detail-content-content-right-data-text">
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等,
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。
</div>
</div>
<div class="detail-content-content-right-data-right" @click="detailRight(3)">
<div class="detail-content-content-right-data-text">
1、范围
</div>
<div class="detail-content-content-right-data-text">
本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色温度循环等试验方法和检验规则等,
本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。
</div> </div>
</div> </div>
</div> </div>
@@ -160,7 +128,7 @@
<div class="title-text-Remarks" :title="$t('fullTextComments')"> <div class="title-text-Remarks" :title="$t('fullTextComments')">
<span>{{$t('fullTextComments')}}</span> <span>{{$t('fullTextComments')}}</span>
</div> </div>
<a-form-model-item class="itemModel" style="width: calc(100% - 113px)" prop="dreUserIdName"> <a-form-model-item class="itemModel" style="width: calc(100% - 113px)" prop="fullTextComments">
<a-textarea :placeholder="$t('pleaseEnter')+$t('fullTextComments')" <a-textarea :placeholder="$t('pleaseEnter')+$t('fullTextComments')"
v-model="formInlineText.fullTextComments" v-model="formInlineText.fullTextComments"
:disabled="fullTextDisabled" :disabled="fullTextDisabled"
@@ -174,36 +142,37 @@
</template> </template>
<script> <script>
import { postAction } from '../../../../api/manage'
export default { export default {
name: 'documentDataComparison', name: 'documentDataComparison',
data() { data() {
return { return {
formInline: {}, formInline: {},
formInlineText: {}, formInlineText: {},
rules: {}, rules: {
fullTextComments: [
{
max: 300,
message: this.$t('fullTextComments') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
]
},
rulesText: {}, rulesText: {},
loading: false, loading: false,
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
fullTextDisabled: false, fullTextDisabled: false,
gData: [ resultData: {},
{ isMatching: true,
title: '0-0sdf dsfdsfdsfdsfds', dataLeft: {},
key: '0-0', dataRight: {}
children: [
{
title: '0-0-0sdfdsfdsfdsfdsfdsfdsf',
key: '0-0-0'
},
{
title: '0-0-1',
key: '0-0-1'
}
]
}
]
} }
}, },
mounted() {
this.getData()
},
methods: { methods: {
Fallback() { Fallback() {
this.$router.push({ this.$router.push({
@@ -211,7 +180,15 @@
}) })
}, },
submit() { submit() {
if (!this.dataLeft.id && !this.dataRight.id) {
this.$message.warning(this.$t('pleaseSelectTheDataCompared'))
return
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
}
})
}, },
viewTheComparisonResultsClick() { viewTheComparisonResultsClick() {
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
@@ -224,7 +201,8 @@
this.fullTextDisabled = true this.fullTextDisabled = true
}, },
turnOffAutomaticMatchingClick() { turnOffAutomaticMatchingClick() {
this.isMatching = !this.isMatching
this.$message.success(this.$t('OperationSuccessful'))
}, },
fullTextCommentsEdit() { fullTextCommentsEdit() {
this.fullTextDisabled = false this.fullTextDisabled = false
@@ -232,7 +210,23 @@
fullTextCommentsSubmit() { fullTextCommentsSubmit() {
}, },
detailLeft(num) { getData() {
let query = {
id: this.$route.query.id
}
this.loading = true
postAction('/compare/sarFileCompareInfo/getComparisonDetail', query).then((res) => {
if (res.success) {
this.resultData = res.result || {}
this.loading = false
} else {
this.resultData = {}
this.loading = false
}
})
},
detailLeft(num, item) {
let detailLeftColor = document.getElementsByClassName('detail-content-content-right-data-color') let detailLeftColor = document.getElementsByClassName('detail-content-content-right-data-color')
if (detailLeftColor && detailLeftColor.length > 0) { if (detailLeftColor && detailLeftColor.length > 0) {
detailLeftColor[0].classList.remove('detail-content-content-right-data-color') detailLeftColor[0].classList.remove('detail-content-content-right-data-color')
@@ -241,8 +235,22 @@
if (detailLeft && detailLeft.length > 0) { if (detailLeft && detailLeft.length > 0) {
detailLeft[num].classList.add('detail-content-content-right-data-color') detailLeft[num].classList.add('detail-content-content-right-data-color')
} }
this.dataLeft = item
if (this.isMatching) {
let detailRightColor = document.getElementsByClassName('detail-content-content-right-data-color-right')
if (detailRightColor && detailRightColor.length > 0) {
detailRightColor[0].classList.remove('detail-content-content-right-data-color-right')
}
let detailContent = document.getElementsByClassName('detail-content-content-right-right-top')
let detailRight = document.getElementsByClassName('detail-content-content-right-data-right')
this.dataRight = this.resultData.textRight[item.itemsDisplayNum - 1]
if (detailRight && detailRight.length > 0) {
detailRight[item.itemsDisplayNum - 1].classList.add('detail-content-content-right-data-color-right')
detailContent[0].scrollTop = detailRight[item.itemsDisplayNum - 1].offsetTop - 150
}
}
}, },
detailRight(num) { detailRight(num, item) {
let detailRightColor = document.getElementsByClassName('detail-content-content-right-data-color-right') let detailRightColor = document.getElementsByClassName('detail-content-content-right-data-color-right')
if (detailRightColor && detailRightColor.length > 0) { if (detailRightColor && detailRightColor.length > 0) {
detailRightColor[0].classList.remove('detail-content-content-right-data-color-right') detailRightColor[0].classList.remove('detail-content-content-right-data-color-right')
@@ -251,6 +259,50 @@
if (detailRight && detailRight.length > 0) { if (detailRight && detailRight.length > 0) {
detailRight[num].classList.add('detail-content-content-right-data-color-right') detailRight[num].classList.add('detail-content-content-right-data-color-right')
} }
this.dataRight = item
if (this.isMatching) {
let detailLeftColor = document.getElementsByClassName('detail-content-content-right-data-color')
if (detailLeftColor && detailLeftColor.length > 0) {
detailLeftColor[0].classList.remove('detail-content-content-right-data-color')
}
this.dataLeft = this.resultData.textLeft[item.itemsDisplayNum - 1]
let detailContent = document.getElementsByClassName('detail-content-content-right-top')
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
if (detailLeft && detailLeft.length > 0) {
detailLeft[item.itemsDisplayNum - 1].classList.add('detail-content-content-right-data-color')
detailContent[0].scrollTop = detailLeft[item.itemsDisplayNum - 1].offsetTop - 150
}
}
},
onSelectLeft(selectedKeys, exports) {
let node = exports.node.$vnode.data.props.dataRef
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
let detailContent = document.getElementsByClassName('detail-content-content-right-top')
if (!node.parentId) {
detailContent[0].scrollTop = 0
return
}
for (let i = 0; i < this.resultData.textLeft.length; i++) {
if (node.parentId && node.itemName == this.resultData.textLeft[i].itemsName) {
detailContent[0].scrollTop = detailLeft[i].offsetTop - 150
return
}
}
},
onSelectRight(selectedKeys, exports) {
let node = exports.node.$vnode.data.props.dataRef
let detailRight = document.getElementsByClassName('detail-content-content-right-data-right')
let detailContent = document.getElementsByClassName('detail-content-content-right-right-top')
if (!node.parentId) {
detailContent[0].scrollTop = 0
return
}
for (let i = 0; i < this.resultData.textRight.length; i++) {
if (node.parentId && node.itemName == this.resultData.textRight[i].itemsName) {
detailContent[0].scrollTop = detailRight[i].offsetTop - 150
return
}
}
} }
} }
} }
@@ -259,7 +311,7 @@
.detail-content-content-left .ant-tree-node-content-wrapper { .detail-content-content-left .ant-tree-node-content-wrapper {
display: inline-block !important; display: inline-block !important;
color: #040B29 !important; color: #040B29 !important;
width: 100px; width: 130px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@@ -303,7 +355,6 @@
width: 50%; width: 50%;
float: left; float: left;
height: 620px; height: 620px;
overflow-y: auto;
border-right: 2px #EFF1F3 solid; border-right: 2px #EFF1F3 solid;
padding: 24px 32px; padding: 24px 32px;
box-sizing: border-box; box-sizing: border-box;
@@ -313,7 +364,6 @@
.detail-content-right { .detail-content-right {
width: 50%; width: 50%;
height: 620px; height: 620px;
overflow-y: auto;
float: left; float: left;
padding: 24px 32px; padding: 24px 32px;
box-sizing: border-box; box-sizing: border-box;
@@ -379,16 +429,33 @@
} }
.detail-content-content-left { .detail-content-content-left {
width: 140px; width: 180px;
height: auto; height: auto;
float: left; float: left;
} }
.detail-content-content-right-top {
height: 520px;
overflow-y: auto;
transition: all 1s;
scroll-behavior: smooth;
}
.detail-content-content-right-right-top {
height: 520px;
overflow-y: auto;
transition: all 1s;
scroll-behavior: smooth;
}
.detail-content-content-right { .detail-content-content-right {
width: calc(100% - 150px); width: 100%;
display: inline-block;
}
.detail-content-content-right-right {
width: 100%;
display: inline-block; display: inline-block;
margin-left: 10px;
float: left;
} }
.detail-content-content-right-data { .detail-content-content-right-data {
@@ -324,7 +324,12 @@
if (res.success) { if (res.success) {
this.loading = false this.loading = false
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.$router.push({
path: '/documentDataComparison',
query: {
id: res.result
}
})
} else { } else {
this.loading = false this.loading = false
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
@@ -426,7 +431,7 @@
padding: 24px 32px; padding: 24px 32px;
box-sizing: border-box; box-sizing: border-box;
border-bottom: 2px #EFF1F3 solid; border-bottom: 2px #EFF1F3 solid;
height:610px; height: 610px;
} }
.detail-content-right { .detail-content-right {
@@ -26,7 +26,7 @@
<div class="title-text" :title="$t('releaseSituation')"> <div class="title-text" :title="$t('releaseSituation')">
<span>{{$t('releaseSituation')}}</span> <span>{{$t('releaseSituation')}}</span>
</div> </div>
<j-dict-select-tag class="box-input" v-model="queryParam.releaseCondition" <j-dict-select-tag class="box-input" v-model="queryParam.releaseState"
:placeholder="$t('PleaseSelect')+$t('releaseSituation')" :placeholder="$t('PleaseSelect')+$t('releaseSituation')"
:type="'select'" :type="'select'"
:triggerChange="false" dictCode="release_condition"/> :triggerChange="false" dictCode="release_condition"/>
@@ -46,6 +46,10 @@
<a-icon type="apartment"/> <a-icon type="apartment"/>
{{$t('initiateComparison')}} {{$t('initiateComparison')}}
</div> </div>
<div @click="BatchDelete" class="operator-text">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
</div> </div>
<div> <div>
<a-table <a-table
@@ -63,11 +67,16 @@
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('comparisonResults')}}</a> <a class="text-operation" @click="comparisonResultsClick(record)">{{$t('comparisonResults')}}</a>
<a class="text-operation" <a class="text-operation"
v-if="record.createBy == userInfoQuery.username"
@click="subscribe(record)"> @click="subscribe(record)">
{{!record.state || record.state == 0 ? $t('release') :$t('withdraw')}} {{!record.releaseState || record.releaseState == 'draft' ? $t('release') :$t('withdraw')}}
</a> </a>
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a> <a class="text-operation"
<a class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a> v-if="record.createBy == userInfoQuery.username && record.releaseState == 'draft'"
@click="edit(record)">{{$t('edit')}}</a>
<a class="text-operation"
v-if="record.createBy == userInfoQuery.username && record.releaseState == 'draft'"
@click="deleteData(record)">{{$t('delete')}}</a>
</span> </span>
</a-table> </a-table>
<div class="page" v-if="dataSource && dataSource.length > 0"> <div class="page" v-if="dataSource && dataSource.length > 0">
@@ -88,6 +97,7 @@
<script> <script>
import { getAction, postAction, deleteAction } from '@/api/manage' import { getAction, postAction, deleteAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default { export default {
name: 'index', name: 'index',
@@ -100,22 +110,14 @@
deleteBatch: '/compare/sarFileCompareInfo/deleteBatch' deleteBatch: '/compare/sarFileCompareInfo/deleteBatch'
}, },
loading: false, loading: false,
dataSource: [{}], dataSource: [],
selectedRowKeys: [], selectedRowKeys: [],
total: 0, total: 0,
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
queryParam: {}, queryParam: {},
gatherResultList: [ userInfoQuery: {},
{ selectedRowKeysRecord: [],
value: '1',
name: this.$t('draft')
},
{
value: '2',
name: this.$t('Published')
}
],
columns: [ columns: [
{ {
title: this.$t('standard') + 1, title: this.$t('standard') + 1,
@@ -194,9 +196,11 @@
} }
}, },
mounted() { mounted() {
this.userInfoQuery = this.userInfo()
this.getList() this.getList()
}, },
methods: { methods: {
...mapGetters(['userInfo']),
searchQuery() { searchQuery() {
this.pageNo = 1 this.pageNo = 1
this.getList() this.getList()
@@ -210,7 +214,7 @@
this.pageNo = page this.pageNo = page
this.getList() this.getList()
}, },
SizeChange(page,pageSize) { SizeChange(page, pageSize) {
this.pageNo = 1 this.pageNo = 1
this.pageSize = pageSize this.pageSize = pageSize
this.getList() this.getList()
@@ -238,21 +242,67 @@
} }
}) })
}, },
onSelectChange(value) { BatchDelete() {
this.selectedRowKeys = value if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = []
let selectedRowKeysRecord = JSON.parse(JSON.stringify(_this.selectedRowKeysRecord))
for (let i = 0; i < selectedRowKeysRecord.length; i++) {
if (selectedRowKeysRecord[i].createBy == _this.userInfo().username &&
selectedRowKeysRecord[i].releaseState == 'draft') {
idList.push(selectedRowKeysRecord[i].id)
}
}
if (idList.length > 0) {
deleteAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
} else {
_this.$message.warning(_this.$t('doNotHavePermissionDeleteData'))
}
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
}, },
comparisonResultsClick() { onSelectChange(value, record) {
this.selectedRowKeys = value
this.selectedRowKeysRecord = record
},
comparisonResultsClick(item) {
if (item.createBy == this.userInfo().username && item.releaseState == 'draft') {
item.isDisplay = 2
} else {
item.isDisplay = 1
}
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
path: '/comparisonResults' path: '/comparisonResults',
query: {
id: item.id,
isDisplay: item.isDisplay
}
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
}, },
subscribe() { subscribe() {
}, },
edit() { edit(row) {
let newUrl = this.$router.resolve({ let newUrl = this.$router.resolve({
path: '/documentDataComparison' path: '/documentDataComparison',
query: {
id: row.id
}
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
}, },