技术(产品)标准【历史版本】

This commit is contained in:
zyn
2023-05-06 10:36:32 +08:00
parent 8238d49985
commit 417bbb9e35
5 changed files with 248 additions and 36 deletions
@@ -1084,7 +1084,7 @@ import {saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,taskDel,inboundLia
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
import treeSelectModule from "@/components/treeSelect/treeSelectModule.vue";
import { selectByIdAtt } from "@/api/flow/index.js"
let Base64 = require('js-base64').Base64;
export default {
@@ -1977,6 +1977,42 @@ export default {
this.standardDrawer = false
this.verifySarStandard = true
this.formKey++
if(this.form.standStatus === '2' || this.form.standStatus === '3'){
selectByIdAtt(item.standId || item.id).then(res =>{
if (res && res.data && res.data.length > 0 && res.data[0].fbgbuss !== '') {
const names = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbussNmae
}else{
init = init + ',' + item.fbgbussNmae
}
return init
},'')
const ids = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbuss
}else{
init = init + ',' + item.fbgbuss
}
return init
},'')
if(this.form.LSBBBUSSName === undefined || this.form.LSBBBUSSName.indexOf(names) === -1){
if(this.form.LSBBBUSSName === undefined){
this.form.LSBBBUSSName = names
this.form.LSBBBUSS = ids
}else{
this.form.LSBBBUSSName = names + ',' + this.form.LSBBBUSSName
this.form.LSBBBUSS = ids + ',' + this.form.LSBBBUSS
}
}
this.LSBBBUSSName = this.form.LSBBBUSSName
this.LSBBBUSS = this.form.LSBBBUSS
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
}
})
}
this.$forceUpdate()
})
},
@@ -2149,6 +2185,38 @@ export default {
this.form.standStatus = "3"
this.getStandInfoByReviseStatus('dr')
}
try {
let FBGBUSSLast = ''
if(res.data.attrInfoMap.FBGBUSS && res.data.attrInfoMap.FBGBUSS !== ''){
FBGBUSSLast = this.subComma(res.data.attrInfoMap.FBGBUSS)
}
let LSBBBUSS = FBGBUSSLast
if(res.data.attrInfoMap.LSBBBUSS && res.data.attrInfoMap.LSBBBUSS !== ''){
if(FBGBUSSLast === ''){
LSBBBUSS = this.subComma(res.data.attrInfoMap.LSBBBUSS)
}else{
LSBBBUSS = FBGBUSSLast + ',' + this.subComma(res.data.attrInfoMap.LSBBBUSS)
}
}
let LSBBBUSSName = this.subComma(res.data.attrInfoMap.FBGBUSSName) + ',' + this.subComma(res.data.attrInfoMap.LSBBBUSSName)
// 发布稿空 只取历史版本
if(res.data.attrInfoMap.FBGBUSSName === null || res.data.attrInfoMap.FBGBUSSName === ''){
LSBBBUSSName = this.subComma(res.data.attrInfoMap.LSBBBUSSName)
}
// 历史版本空 只取发布稿
if(res.data.attrInfoMap.LSBBBUSSName === null || res.data.attrInfoMap.LSBBBUSSName === ''){
LSBBBUSSName = this.subComma(res.data.attrInfoMap.FBGBUSSName)
}
// 存放带入的历史版本文件名、文件id
this.LSBBBUSS = LSBBBUSS
this.LSBBBUSSName = LSBBBUSSName
this.LSBBBUSSFileList = this.assemble(LSBBBUSS, LSBBBUSSName);
}catch (e) {
console.log(e)
}
this.$forceUpdate()
}
// 遍历对象初始化文件信息
@@ -2174,6 +2242,20 @@ export default {
break
}
},
// 截取字符前后的逗号
subComma(str){
if(str && str!== ''){
if(str.indexOf(',') === 0){
str = str.slice(1)
}
if(str.lastIndexOf(',') === str.length - 1){
str = str.slice(0, -1)
}
return str
}else{
return ''
}
},
initializeFileList(property ,value){
switch (property){
case 'xgd':
@@ -2582,6 +2664,44 @@ export default {
this.form.byybj = this.form.byybj ? this.form.byybj + ',' +textArr.join(',') : textArr.join(',')
}
// this.$emit('input', textArr.join(','))
// 修订、修改 时 手动查找代替企标编号 发布稿放到历史版本
if(this.replaceLawType === 'DTQBBHBUSS' && (this.form.standStatus === '2' || this.form.standStatus === '3') && this.selectedListRep.length){
let ids = this.selectedListRep.reduce((init,item,index,arr)=>{
let result
if(index === arr.length - 1){
result = init + item.id
}else{
result = init + item.id + ','
}
return result
},'')
selectByIdAtt(ids).then(res =>{
if (res && res.data && res.data.fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbussNmae
}else{
init = init + ',' + item.fbgbussNmae
}
return init
},'')
this.form.LSBBBUSS = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbuss
}else{
init = init + ',' + item.fbgbuss
}
return init
},'')
// 带入的历史版本即选择的代替企标编号中的历史版本合并
if(this.LSBBBUSS && this.LSBBBUSS !== ''){
this.form.LSBBBUSS = this.LSBBBUSS + ',' + this.form.LSBBBUSS
this.form.LSBBBUSSName = this.LSBBBUSSName + ',' + this.form.LSBBBUSSName
}
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
}
})
}
this.$refs.selections.clearSelection()
},
filterSetData(data){
@@ -1212,7 +1212,7 @@ import {saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,taskDel,inboundLia
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
import treeSelectModule from "@/components/treeSelect/treeSelectModule.vue";
import { selectByIdAtt } from "@/api/flow/index.js"
let Base64 = require('js-base64').Base64;
export default {
@@ -2003,6 +2003,17 @@ export default {
}
return list;
},
assemble2(ids,names){
let list= new Array();
if(ids && ids !== '' && names && names !== ''){
let idArray=ids.split(',');
let nameArray=names.split(',');
for(let i=0; i<idArray.length; i++){
list.push({id:idArray[i],name:nameArray[i]});
}
}
return list;
},
// 将文本状态的id与name对应
setMap(data){
data.forEach(item => {
@@ -2144,6 +2155,20 @@ export default {
break
}
},
// 截取字符前后的逗号
subComma(str){
if(str && str!== ''){
if(str.indexOf(',') === 0){
str = str.slice(1)
}
if(str.lastIndexOf(',') === str.length - 1){
str = str.slice(0, -1)
}
return str
}else{
return ''
}
},
initializeFileList(property ,value){
switch (property){
case 'xgd':
@@ -2580,8 +2605,9 @@ export default {
// this.SarLawsInfoEO.replaceLawsNum = textArr.join(',')
// 解决 标准入库流程--圈住的字段,先手动输入,然后再手动查找,点提交就会把手动输入的标准号覆盖
if(this.replaceLawType === 'DTQBBHBUSS'){
let arr1 = this.form.DTQBBHBUSS ? this.form.DTQBBHBUSS + ',' + textArr.join(',') : textArr.join(',')
this.form.DTQBBHBUSS = this.filterSetData(arr1)
// let arr1 = this.form.DTQBBHBUSS ? this.form.DTQBBHBUSS + ',' + textArr.join(',') : textArr.join(',')
// this.form.DTQBBHBUSS = this.filterSetData(arr1)
this.form.DTQBBHBUSS = textArr.join(',')
this.form.standNum = this.filterSetData(textArr2.join(','))
}else if(this.replaceLawType === 'CYBZ'){
let arr1 = this.form.CYBZ ? this.form.CYBZ + ',' +textArr.join(',') : textArr.join(',')
@@ -2595,6 +2621,47 @@ export default {
this.form.byybj = this.form.byybj ? this.form.byybj + ',' +textArr.join(',') : textArr.join(',')
}
// this.$emit('input', textArr.join(','))
// 修订 时 手动查找代替企标编号 发布稿放到历史版本
if(this.replaceLawType === 'DTQBBHBUSS' && (this.form.reviseStatus === '2' || this.form.reviseStatus === '3') && this.selectedListRep.length){
let ids = this.selectedListRep.reduce((init,item,index,arr)=>{
let result
if(index === arr.length - 1){
result = init + item.id
}else{
result = init + item.id + ','
}
return result
},'')
selectByIdAtt(ids).then(res =>{
if (res && res.data && res.data.length && res.data[0].fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbussNmae
}else{
init = init + ',' + item.fbgbussNmae
}
return init
},'')
this.form.LSBBBUSS = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbuss
}else{
init = init + ',' + item.fbgbuss
}
return init
},'')
}else if(res && res.data && res.data.length === 0){
this.form.LSBBBUSS = ''
this.form.LSBBBUSSName = ''
}
// 带入的历史版本即选择的代替企标编号中的历史版本合并
if(this.LSBBBUSS && this.LSBBBUSS !== ''){
this.form.LSBBBUSS = this.LSBBBUSS + ',' + this.form.LSBBBUSS
this.form.LSBBBUSSName = this.LSBBBUSSName + ',' + this.form.LSBBBUSSName
}
this.LSBBBUSSFileList = this.assemble2(this.form.LSBBBUSS, this.form.LSBBBUSSName);
})
}
this.$refs.selections.clearSelection()
},
filterSetData(data){
@@ -3247,6 +3314,7 @@ export default {
} else if(processForm.reviseStatus == '修订'){
processForm.reviseStatus = '2'
}
try {
this.form.standSort = processForm.standSort
this.form.planId = val
this.form.reviseStatus = '2'
@@ -3274,17 +3342,54 @@ export default {
this.form.FBGBUSS = processForm.attrInfoCaseMap.fbgbuss
this.form.BZSMBUSSName = processForm.attrInfoCaseMap.bzsmbussName
this.form.BZSMBUSS = processForm.attrInfoCaseMap.bzsmbuss
this.form.LSBBBUSSName = processForm.attrInfoCaseMap.lsbbbussName
this.form.LSBBBUSS = processForm.attrInfoCaseMap.lsbbbuss
// this.form.LSBBBUSSName = processForm.attrInfoCaseMap.lsbbbussName
// this.form.LSBBBUSS = processForm.attrInfoCaseMap.lsbbbuss
this.form.QTWJBUSSName = processForm.attrInfoCaseMap.qtwjbussName
this.form.QTWJBUSS = processForm.attrInfoCaseMap.qtwjbuss
this.form.GLWJBUSSName = processForm.attrInfoCaseMap.glwjbussName
this.form.GLWJBUSS = processForm.attrInfoCaseMap.glwjbuss
this.FBGBUSSFileList=this.assemble(processForm.attrInfoCaseMap.fbgbuss,processForm.attrInfoCaseMap.fbgbussName);
// this.FBGBUSSFileList=this.assemble(processForm.attrInfoCaseMap.fbgbuss,processForm.attrInfoCaseMap.fbgbussName);
this.BZSMBUSSFileList=this.assemble(processForm.attrInfoCaseMap.bzsmbuss,processForm.attrInfoCaseMap.bzsmbussName);
this.LSBBBUSSFileList=this.assemble(processForm.attrInfoCaseMap.lsbbbuss,processForm.attrInfoCaseMap.lsbbbussName);
// this.LSBBBUSSFileList=this.assemble(processForm.attrInfoCaseMap.lsbbbuss,processForm.attrInfoCaseMap.lsbbbussName);
this.QTWJBUSSFileList=this.assemble(processForm.attrInfoCaseMap.qtwjbuss,processForm.attrInfoCaseMap.qtwjbussName);
this.GLWJBUSSFileList=this.assemble(processForm.attrInfoCaseMap.glwjbuss,processForm.attrInfoCaseMap.glwjbussName);
}catch (e) {
}
if(this.form.reviseStatus === '2' || this.form.reviseStatus === '3'){
selectByIdAtt(processForm.standId || processForm.id).then(res =>{
if (res && res.data && res.data.length > 0 && res.data[0].fbgbuss !== '') {
const names = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbussNmae
}else{
init = init + ',' + item.fbgbussNmae
}
return init
},'')
const ids = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbuss
}else{
init = init + ',' + item.fbgbuss
}
return init
},'')
if(this.form.LSBBBUSSName === undefined || this.form.LSBBBUSSName.indexOf(names) === -1){
if(this.form.LSBBBUSSName === undefined){
this.form.LSBBBUSSName = names
this.form.LSBBBUSS = ids
}else{
this.form.LSBBBUSSName = names + ',' + this.form.LSBBBUSSName
this.form.LSBBBUSS = ids + ',' + this.form.LSBBBUSS
}
}
this.LSBBBUSSName = this.form.LSBBBUSSName
this.LSBBBUSS = this.form.LSBBBUSS
this.LSBBBUSSFileList = this.assemble2(this.form.LSBBBUSS, this.form.LSBBBUSSName);
}
})
}
})
}
}).catch(e => {
@@ -2630,7 +2630,7 @@
return result
},'')
selectByIdAtt(ids).then(res =>{
if (res && res.data && res.data.fbgbuss !== '') {
if (res && res.data && res.data.length > 0 && res.data.fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbussNmae
@@ -1341,6 +1341,7 @@
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
import treeSelectModule from "@/components/treeSelect/treeSelectModule.vue";
import { selectByIdAtt } from "@/api/flow/index.js"
let Base64 = require('js-base64').Base64;
@@ -2757,7 +2758,7 @@
// this.$emit('input', textArr.join(','))
// 修订 时 手动查找代替企标编号 发布稿放到历史版本
if(this.replaceLawType === 'DTQBBHBUSS' && this.form.reviseStatus === '2' && this.selectedListRep.length){
if(this.replaceLawType === 'DTQBBHBUSS' && (this.form.reviseStatus === '2' || this.form.reviseStatus === '3') && this.selectedListRep.length){
let ids = this.selectedListRep.reduce((init,item,index,arr)=>{
let result
if(index === arr.length - 1){
@@ -2768,7 +2769,7 @@
return result
},'')
// const id = this.selectedListRep[0].id
this.selectByIdAtt(ids).then(res =>{
selectByIdAtt(ids).then(res =>{
if (res && res.data && res.data.length && res.data[0].fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
@@ -2792,6 +2793,11 @@
this.form.LSBBBUSS = ''
this.form.LSBBBUSSName = ''
}
// 带入的历史版本即选择的代替企标编号中的历史版本合并
if(this.LSBBBUSS && this.LSBBBUSS !== ''){
this.form.LSBBBUSS = this.LSBBBUSS + ',' + this.form.LSBBBUSS
this.form.LSBBBUSSName = this.LSBBBUSSName + ',' + this.form.LSBBBUSSName
}
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
})
}
@@ -3495,17 +3501,6 @@
this.modelOptions = res.data
})
},
selectByIdAtt(id){
return new Promise((resolve,reject)=>{
this.$http.get('/lawss/sarBussionessStand/selectByIdAtt', {
id
}, {
_this: this
}, res => {
resolve(res)
})
})
},
selectChange(){
this.$forceUpdate()
},
@@ -3559,7 +3554,7 @@
this.GLWJBUSSFileList=this.assemble(processForm.GLWJBUSS,processForm.GLWJBUSSName);
// 企标制修订计划管控 进入 技术标准起草 修订类型: 发布稿放到历史版本
if(processForm.reviseStatus === '2'){
this.selectByIdAtt(processForm.rqbJson).then(res =>{
selectByIdAtt(processForm.rqbJson).then(res =>{
// if (res && res.data && res.data.fbgbuss !== '') {
// this.form.LSBBBUSSName = res.data.fbgbussNmae
// this.form.LSBBBUSS = res.data.fbgbuss
@@ -3591,6 +3586,8 @@
this.form.LSBBBUSS = ids + ',' + this.form.LSBBBUSS
}
}
this.LSBBBUSSName = this.form.LSBBBUSSName
this.LSBBBUSS = this.form.LSBBBUSS
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
}
})
@@ -1327,6 +1327,7 @@
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
import treeSelectModule from "@/components/treeSelect/treeSelectModule.vue";
import { selectByIdAtt } from "@/api/flow/index.js"
let Base64 = require('js-base64').Base64;
@@ -2832,8 +2833,8 @@
}
return result
},'')
this.selectByIdAtt(ids).then(res =>{
if (res && res.data && res.data.fbgbuss !== '') {
selectByIdAtt(ids).then(res =>{
if (res && res.data && res.data.length > 0 && res.data.fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbussNmae
@@ -2862,17 +2863,6 @@
this.$refs.selections.clearSelection()
},
selectByIdAtt(id){
return new Promise((resolve,reject)=>{
this.$http.get('/lawss/sarBussionessStand/selectByIdAtt', {
id
}, {
_this: this
}, res => {
resolve(res)
})
})
},
filterSetData(data) {
const arr = new Set()
let permission = data.split(",");