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

This commit is contained in:
wangzhijiang
2022-07-14 18:14:36 +08:00
9 changed files with 409 additions and 39 deletions
+3
View File
@@ -1142,4 +1142,7 @@ module.exports = {
comparisonResults:'Comparison results',
Published:'Published',
initiateComparison:'Initiate comparison',
translationLanguage:'Translation language',
translationResults:'Translation results',
conversionTime:'Conversion time',
}
+3
View File
@@ -1146,4 +1146,7 @@ module.exports = {
comparisonResults:'对比结果',
Published:'已发布',
initiateComparison:'发起对比',
translationLanguage:'翻译语言',
translationResults:'翻译结果',
conversionTime:'转换时间',
}
@@ -230,7 +230,15 @@
},
methods: {
CurrentStandard() {
let query = {
firstInitiation: '2',
whetherTobring: '1'
}
let newUrl = this.$router.resolve({
path: '/evaluationInitiationProcess',
query: query
})
window.open(newUrl.href, '_blank')
},
onSelectChange(value) {
this.selectedRowKeys = value
@@ -81,7 +81,7 @@
dataSource: [],
url: {
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/list',
exportData:'lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/exportZip',
exportData: 'lawsTechnologyEvaluation/lawsTechnologyEvaluationComplianceResultEO/exportZip'
},
selectedRowKeys: [],
loading: false,
@@ -114,7 +114,15 @@
},
methods: {
CurrentStandard() {
let query = {
firstInitiation: '2',
whetherTobring: '2'
}
let newUrl = this.$router.resolve({
path: '/evaluationInitiationProcess',
query: query
})
window.open(newUrl.href, '_blank')
},
onSelectChange(value) {
@@ -5,34 +5,37 @@
/>
<div class="detail-box">
<div class="detail-content" style="padding: 20px">
<div class="table-page-search-wrapper">
<div class="table-page-search-wrapper" v-if="whetherDisplay">
<search ref="searchRef"
:flag="'1'"
:url="url"/>
</div>
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange ,columnTitle:' '}"
:columns="columns"
>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
<div v-if="whetherDisplay">
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange ,columnTitle:' '}"
:columns="columns"
>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24" style="margin-bottom: 10px">
<a-col :span="24">
@@ -238,6 +241,7 @@
},
searchParmes: {},
selectedRowKeysRecord: [],
whetherDisplay: false,
columns: [
{
title: this.$t('standard'),
@@ -293,6 +297,11 @@
} else {
this.isTrue = false
}
if (this.$route.query.firstInitiation == '1') {
this.whetherDisplay = true
} else {
this.whetherDisplay = false
}
eventBUs.$on('searchQuery', search => {
Object.keys(search).forEach(res => {
if (search[res] instanceof Array) {
@@ -454,7 +463,9 @@
value.startTime = startTime
value.flowStatus = 'Underway'
value.taskAffirmDueDate = value.endTime
value.lawsTechnologyEvaluationId = this.getUUID()
if (!value.lawsTechnologyEvaluationId){
value.lawsTechnologyEvaluationId = this.getUUID()
}
value.regulationOwnerId = this.userInfo().id
value.regulationOwnerName = this.userInfo().username
Object.keys(value).forEach(res => {
@@ -474,14 +485,14 @@
query = {
type: 6,
...value,
firstInitiation:"1",
firstInitiation: this.$route.query.firstInitiation,
msg: JSON.stringify({ itemList: dataList }).replace(/\"/g, '\'')
}
} else {
query = {
type: 6,
...value,
firstInitiation:"1",
firstInitiation: this.$route.query.firstInitiation,
msg: JSON.stringify({ evaluators: value.evaluators }).replace(/\"/g, '\'')
}
}
@@ -339,6 +339,7 @@
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.visible = false
this.formInline.firstInitiation = '1'
let newUrl = this.$router.resolve({
path: '/evaluationInitiationProcess',
query: this.formInline
@@ -365,9 +366,12 @@
let newUrl = this.$router.resolve({
path: '/evaluationResultsWhole',
query: {
id:row.id,
processBackground:row.processBackground,
serialNumber:row.serialNumber
id: row.id,
processBackground: row.processBackground,
serialNumber: row.serialNumber,
title: row.title,
technologyTerritory: row.technologyTerritory,
standId: row.standId
}
})
window.open(newUrl.href, '_blank')
@@ -375,9 +379,12 @@
let newUrl = this.$router.resolve({
path: '/evaluationResultsClause',
query: {
id:row.id,
processBackground:row.processBackground,
serialNumber:row.serialNumber
id: row.id,
processBackground: row.processBackground,
serialNumber: row.serialNumber,
title: row.title,
technologyTerritory: row.technologyTerritory,
standId: row.standId
}
})
window.open(newUrl.href, '_blank')
@@ -73,7 +73,7 @@
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('comparisonResults')}}</a>
<a class="text-operation"
@click="subscribe(record)">
{{!record.readFlag || record.readFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}}
{{!record.state || record.state == 0 ? $t('release') :$t('withdraw')}}
</a>
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
<a class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
@@ -0,0 +1,330 @@
<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParam.title"></j-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text tree-select">
<div class="title-text" :title="$t('releaseSituation')">
<span>{{$t('releaseSituation')}}</span>
</div>
<a-select :placeholder="$t('PleaseSelect')+$t('releaseSituation')"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="queryParam.flowStatus">
<a-select-option v-for="(item, key) in gatherResultList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<div class="table-operator">
<div @click="initiatingProcessClick" class="operator-text">
<a-icon type="apartment"/>
{{$t('initiateComparison')}}
</div>
</div>
<div>
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<!-- -->
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="viewClick(record)">{{$t('view')}}</a>
<a class="text-operation" @click="checkClick(record)">{{$t('check')}}</a>
<a class="text-operation"
@click="subscribe(record)">
{{!record.state || record.state == 0 ? $t('release') :$t('withdraw')}}
</a>
<a class="text-operation" @click="downloadData(record)">{{$t('download')}}</a>
<a class="text-operation" @click="deleteData(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
</a-card>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
name: 'index',
components: {},
data() {
return {
//url传参严格按照当前命名
url: {
list: '',
deleteBatch:'',
},
loading: false,
dataSource: [],
selectedRowKeys: [],
total: 0,
pageSize: 10,
pageNo: 1,
queryParam: {},
gatherResultList: [
{
value: '1',
name: this.$t('draft')
},
{
value: '2',
name: this.$t('Published')
}
],
columns: [
{
title: this.$t('standard'),
align: 'center',
dataIndex: 'serialNumber',
width: 170
},
{
title: this.$t('title'),
align: 'center',
dataIndex: 'title',
width: 170
},
{
title: this.$t('TextStatus'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'TextStatus'
},
{
title: this.$t('fileName'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'fileName'
},
{
title: this.$t('translationLanguage'),
align: 'center',
dataIndex: 'translationLanguage',
width: 170
},
{
title: this.$t('translationResults'),
align: 'center',
dataIndex: 'translationResults',
width: 170
},
{
title: this.$t('conversionTime'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'conversionTime'
},
{
title: this.$t('releaseSituation'),
align: 'center',
width: 170,
ellipsis: true,
dataIndex: 'releaseSituation'
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 260,
scopedSlots: { customRender: 'operation' }
}
]
}
},
mounted() {
this.getList()
},
methods: {
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getList()
},
pageOnChange(page) {
this.pageNo = page
this.getList()
},
SizeChange(pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
})
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
},
viewClick(row) {
},
checkClick(row){
},
downloadData(){
},
subscribe() {
},
initiatingProcessClick(){
},
deleteData(val){
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.page {
text-align: right;
margin-top: 20px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
.text-operation {
margin-right: 8px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
</style>
@@ -1180,12 +1180,12 @@
selectedRowKeysValue.push(res)
}
})
console.log(selectedRowKeysValue)
for (let i = 0; i < selectedRowKeysValue.length; i++) {
let postDateobj = {}
let itemIn = Object.keys(selectedRowKeysValue[i])
for (let j = 0; j < itemIn.length; j++) {
if (itemIn[j] !== 'sdt') {
console.log(selectedRowKeysValue[i][itemIn[j]])
if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
@@ -1244,7 +1244,7 @@
let postDateobj = {}
let itemIn = Object.keys(selectedRowKeysValue[i])
for (let j = 0; j < itemIn.length; j++) {
if (itemIn[j] !== 'sdt') {
if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) {
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {