对接定版以及历史版本
This commit is contained in:
@@ -741,4 +741,5 @@ module.exports = {
|
||||
record:'record',
|
||||
replyToComments:'Reply to comments',
|
||||
noComment:'No comment',
|
||||
theReceived:'The final version can be made only when the list confirmation status and task confirmation status of all data are received',
|
||||
}
|
||||
@@ -746,4 +746,5 @@ module.exports = {
|
||||
record:'记录',
|
||||
replyToComments:'回复评论',
|
||||
noComment:'暂无评论',
|
||||
theReceived:'所有数据的清单确认状态和任务确认状态都为接受才可以定版',
|
||||
}
|
||||
@@ -58,8 +58,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<updateLog :url="url" ref="updateLogRef"/>
|
||||
<historicalVersionList :url="url" ref="historicalVersionListRef"/>
|
||||
<commentList :url="url" ref="commentListRef"/>
|
||||
<historicalVersionList ref="historicalVersionListRef"/>
|
||||
<commentList ref="commentListRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
import updateLog from '@/components/UpdateLog/index'
|
||||
import historicalVersionList from '../components/historicalVersionList'
|
||||
import commentList from '../components/commentList'
|
||||
|
||||
export default {
|
||||
name: 'ProjectDetails',
|
||||
components: {
|
||||
@@ -123,9 +124,9 @@
|
||||
historicalVersionClick() {
|
||||
this.$refs.historicalVersionListRef.getList()
|
||||
},
|
||||
commentClick(){
|
||||
commentClick() {
|
||||
this.$refs.commentListRef.getData()
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="$t('fixedPlate')"
|
||||
:width="500"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('versionName')">{{$t('versionName')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="'versionsName'">
|
||||
<a-input class="box-input"
|
||||
v-model="formInline.versionsName"
|
||||
:placeholder="$t('PleaseEnter')+$t('versionName')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'fixedPlateForm',
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
formInline: {},
|
||||
loading: false,
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
add: '/project/projectHistoryVersionsEO/add'
|
||||
},
|
||||
rules: {
|
||||
versionsName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('publishComment') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.visible = true
|
||||
this.formInline = {}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let query = {
|
||||
projectLibraryId: this.$route.query.id,
|
||||
...this.formInline
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction(this.url.add, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 74px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 64px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
</style>
|
||||
@@ -20,17 +20,6 @@
|
||||
<a @click="seeClick(record)">{{$t('See')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="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"
|
||||
@change="onChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
@@ -38,16 +27,15 @@
|
||||
import { getAction, postAction, } from '@/api/manage'
|
||||
export default {
|
||||
name: 'historicalVersionList',
|
||||
props:['url'],
|
||||
data(){
|
||||
return{
|
||||
visible:false,
|
||||
confirmLoading:false,
|
||||
dataSource:[],
|
||||
loading:false,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
url:{
|
||||
list:'project/projectHistoryVersionsEO/list',
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('versionName'),
|
||||
@@ -76,7 +64,6 @@
|
||||
methods:{
|
||||
getList(){
|
||||
this.visible = true
|
||||
this.pageNo = 1
|
||||
this.historicalList()
|
||||
},
|
||||
handleOk() {
|
||||
@@ -85,26 +72,14 @@
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.historicalList()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.historicalList()
|
||||
},
|
||||
historicalList(){
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
documentId: this.$route.query.id
|
||||
projectLibraryId: this.$route.query.id
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.historicalVersionUrl, query).then((res) => {
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records
|
||||
this.total = res.result.total
|
||||
this.dataSource = res.result || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<a-icon type="file-search"/>
|
||||
{{ $t('alteration') }}
|
||||
</div>
|
||||
<div class="operator-text">
|
||||
<div class="operator-text" @click="fixedPlateClick">
|
||||
<a-icon type="bulb"/>
|
||||
{{ $t('fixedPlate') }}
|
||||
</div>
|
||||
@@ -184,6 +184,7 @@
|
||||
<listEditModel :url="url" @editModelList="addModelList" ref="editModelRef"/>
|
||||
<batSetting :url="url" @batSettingList="addModelList" ref="batSettingRef"/>
|
||||
<transferList :url="url" @transferListForm="addModelList" ref="transferListRef"/>
|
||||
<fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/>
|
||||
<a-modal
|
||||
:title="$t('ListConfirmationDeadline')"
|
||||
:width="500"
|
||||
@@ -258,6 +259,7 @@
|
||||
import listEditModel from './listEditModel'
|
||||
import batSetting from './batSetting'
|
||||
import transferList from './transferList'
|
||||
import fixedPlate from './fixedPlateForm'
|
||||
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
@@ -272,7 +274,8 @@
|
||||
listEditModel,
|
||||
batSetting,
|
||||
transferList,
|
||||
globalAdvancedQuery
|
||||
globalAdvancedQuery,
|
||||
fixedPlate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -635,6 +638,23 @@
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
fixedPlateClick() {
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
let isTrue
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
if (this.dataSource[i].taskAffirmStatus == 'rejected' && this.dataSource[i].inventoryAffirmStatus == 'rejected') {
|
||||
isTrue = true
|
||||
} else {
|
||||
isTrue = false
|
||||
this.$message.warning(this.$t('theReceived'))
|
||||
return
|
||||
}
|
||||
}
|
||||
if (isTrue) {
|
||||
this.$refs.fixedPlateRef.getData()
|
||||
}
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.addModelRef.addModel()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user