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

This commit is contained in:
gaojiabao
2023-04-23 18:24:17 +08:00
10 changed files with 274 additions and 83 deletions
+7
View File
@@ -0,0 +1,7 @@
import axios from '@/common/axios'
// 根据企标编号查找文件
export function selectByIdAtt(id){
return axios._getData('/lawss/sarBussionessStand/selectByIdAtt', { id })
}
+35 -2
View File
@@ -538,7 +538,7 @@ export default {
}) })
}, },
_getData (url, params, config = {}) { _getData (url, params = {}, config = {}) {
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
// 参数包含this // 参数包含this
let _this = config._this || false let _this = config._this || false
@@ -558,7 +558,7 @@ export default {
}) })
}, },
_postData (url, param, config = {}) { _postData (url, param = {}, config = {}) {
return new Promise((resolve,reject) => { return new Promise((resolve,reject) => {
var _formData = formData(param) var _formData = formData(param)
// 参数包含this // 参数包含this
@@ -585,4 +585,37 @@ export default {
}) })
}, },
_downloadFile (url, params = {}, method = 'get', fileName = '导出文件') {
_axios({
method,
url,
data: method !== 'get' ? params : {},
params: method === 'get' ? params : {},
responseType: 'blob'
}).then(
res => {
const data = res.data
// 兼容ie
if (window.navigator.msSaveOrOpenBlob) {
try {
const blobObject = new Blob([data])
window.navigator.msSaveOrOpenBlob(blobObject, fileName)
} catch (e) {
console.log(e)
}
return
}
// a标签实现下载
// type为导出文件格式 例application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 导出为xlsx格式
let url = window.URL.createObjectURL(new Blob([data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }))
let a = document.createElement('a')
a.style.display = 'none'
a.href = url
a.setAttribute('download', fileName)
document.body.appendChild(a)
a.click()
document.body.removeChild(a);
URL.revokeObjectURL(url); // 释放对象URL
})
},
} }
@@ -218,7 +218,7 @@
></el-input> ></el-input>
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
<div style="width: 80%;margin-top: 13px"> <div style="width: 80%;margin-top: 13px">
<div v-for="(item,index) in LSBBBUSSFileList" :key="index" @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer" class="fileClass">{{ item.name }}</div> <div v-for="(item,index) in LSBBBUSSFileList" :key="index" @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer" class="fileClass">{{ item.name }}</div>
</div> </div>
<div style="width: 20%;"> <div style="width: 20%;">
<el-button :disabled="disabledXX" <el-button :disabled="disabledXX"
@@ -1084,6 +1084,7 @@
import TreeSelect from '@/components/treeSelect/treeSelect.vue'; import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue'; import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
import treeSelectModule from "@/components/treeSelect/treeSelectModule.vue"; import treeSelectModule from "@/components/treeSelect/treeSelectModule.vue";
import { selectByIdAtt } from "@/api/flow/index.js"
let Base64 = require('js-base64').Base64; let Base64 = require('js-base64').Base64;
@@ -1523,30 +1524,30 @@
'form.standStatus': { 'form.standStatus': {
handler (val) { handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') { if (val !== '' && val !== null && typeof (val) !== 'undefined') {
this.FSRQchange()
} }
} }
}, },
'form.issueTime': { 'form.issueTime': {
handler: function() { handler: function() {
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){ this.FSRQchange()
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD')) // if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
// const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate() // let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS // // const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// // this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
let year = date.getFullYear()+5; // let year = date.getFullYear()+5;
let month =(date.getMonth() + 1).toString(); // let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString(); // let day = (date.getDate()).toString();
if (month.length == 1) { // if (month.length == 1) {
month = "0" + month; // month = "0" + month;
} // }
if (day.length == 1) { // if (day.length == 1) {
day = "0" + day; // day = "0" + day;
} // }
const FSRQBUSS = year + "-" + month + "-" + day; // const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS // this.form["FSRQBUSS"] = FSRQBUSS
//
} // }
}, },
}, },
'form.country': { 'form.country': {
@@ -1567,6 +1568,26 @@
}, },
}, },
methods: { methods: {
FSRQchange(){
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
let year = date.getFullYear()+5;
if(this.form.standSort === 'Q/QCBFC' || this.form.standSort === 'Q/FT X'){
year = date.getFullYear()+3;
}
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length === 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
},
regDate(data){ regDate(data){
if(this.form.standCode !== undefined && this.form.standCode !== null && this.form.standCode.indexOf(data) !== -1){ if(this.form.standCode !== undefined && this.form.standCode !== null && this.form.standCode.indexOf(data) !== -1){
data = data + ' X' data = data + ' X'
@@ -2568,6 +2589,48 @@
this.form.byybj = this.form.byybj ? this.form.byybj + ',' +textArr.join(',') : textArr.join(',') this.form.byybj = this.form.byybj ? this.form.byybj + ',' +textArr.join(',') : textArr.join(',')
} }
// this.$emit('input', textArr.join(',')) // this.$emit('input', textArr.join(','))
// 修订 时 手动查找代替企标编号 发布稿放到历史版本
if(this.replaceLawType === 'DTQBBHBUSS' && this.form.standStatus === '2' && 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
},'')
try{
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 = ''
}
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
})
}catch(e){
console.log(e)
}
}
this.$refs.selections.clearSelection() this.$refs.selections.clearSelection()
}, },
filterSetData(data){ filterSetData(data){
@@ -1101,29 +1101,32 @@
handler (val) { handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') { if (val !== '' && val !== null && typeof (val) !== 'undefined') {
this.getStandInfoByReviseStatus() this.getStandInfoByReviseStatus()
this.FSRQchange()
} }
} }
}, },
'form.issueTime': { 'form.issueTime': {
handler: function() { handler: function() {
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){ this.FSRQchange();
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD')) // if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
// const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate() // let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS // // const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// // this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
let year = date.getFullYear()+5; //
let month =(date.getMonth() + 1).toString(); // let year = date.getFullYear()+5;
let day = (date.getDate()).toString(); // let month =(date.getMonth() + 1).toString();
if (month.length == 1) { // let day = (date.getDate()).toString();
month = "0" + month; // if (month.length == 1) {
} // month = "0" + month;
if (day.length === 1) { // }
day = "0" + day; // if (day.length === 1) {
} // day = "0" + day;
const FSRQBUSS = year + "-" + month + "-" + day; // }
this.form["FSRQBUSS"] = FSRQBUSS // const FSRQBUSS = year + "-" + month + "-" + day;
// this.form["FSRQBUSS"] = FSRQBUSS
} // console.log(FSRQBUSS)
//
// }
}, },
}, },
'form.country': { 'form.country': {
@@ -1149,6 +1152,26 @@
}, },
}, },
methods: { methods: {
FSRQchange(){
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
let year = date.getFullYear()+5;
if(this.form.standSort === 'Q/QCBFC' || this.form.standSort === 'Q/FT X'){
year = date.getFullYear()+3;
}
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length === 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
},
checkedRoleTransfer (data) { checkedRoleTransfer (data) {
this.isSubmit = true this.isSubmit = true
this.saveLoading = true this.saveLoading = true
@@ -1078,29 +1078,31 @@
handler (val) { handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') { if (val !== '' && val !== null && typeof (val) !== 'undefined') {
this.getStandInfoByReviseStatus("") this.getStandInfoByReviseStatus("")
this.FSRQchange()
} }
} }
}, },
'form.issueTime': { 'form.issueTime': {
handler: function() { handler: function() {
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){ this.FSRQchange()
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD')) // if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
// const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate() // let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS // // const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// // this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
let year = date.getFullYear()+5; //
let month =(date.getMonth() + 1).toString(); // let year = date.getFullYear()+5;
let day = (date.getDate()).toString(); // let month =(date.getMonth() + 1).toString();
if (month.length == 1) { // let day = (date.getDate()).toString();
month = "0" + month; // if (month.length == 1) {
} // month = "0" + month;
if (day.length == 1) { // }
day = "0" + day; // if (day.length == 1) {
} // day = "0" + day;
const FSRQBUSS = year + "-" + month + "-" + day; // }
this.form["FSRQBUSS"] = FSRQBUSS // const FSRQBUSS = year + "-" + month + "-" + day;
// this.form["FSRQBUSS"] = FSRQBUSS
} //
// }
}, },
}, },
'form.country': { 'form.country': {
@@ -1126,6 +1128,26 @@
}, },
}, },
methods: { methods: {
FSRQchange(){
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
let year = date.getFullYear()+5;
if(this.form.standSort === 'Q/QCBFC' || this.form.standSort === 'Q/FT X'){
year = date.getFullYear()+3;
}
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length === 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
},
regDate(data){ regDate(data){
if(this.form.DTQBBHBUSS !== undefined && this.form.DTQBBHBUSS !== null && this.form.DTQBBHBUSS.indexOf(data) !== -1){ if(this.form.DTQBBHBUSS !== undefined && this.form.DTQBBHBUSS !== null && this.form.DTQBBHBUSS.indexOf(data) !== -1){
data = data + ' X' data = data + ' X'
@@ -1156,29 +1156,31 @@
handler (val) { handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') { if (val !== '' && val !== null && typeof (val) !== 'undefined') {
this.getStandInfoByReviseStatus() this.getStandInfoByReviseStatus()
this.FSRQchange()
} }
} }
}, },
'form.issueTime': { 'form.issueTime': {
handler: function() { handler: function() {
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){ this.FSRQchange()
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD')) // if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
// const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate() // let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS // // const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// // this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
let year = date.getFullYear()+5; //
let month =(date.getMonth() + 1).toString(); // let year = date.getFullYear()+5;
let day = (date.getDate()).toString(); // let month =(date.getMonth() + 1).toString();
if (month.length === 1) { // let day = (date.getDate()).toString();
month = "0" + month; // if (month.length === 1) {
} // month = "0" + month;
if (day.length == 1) { // }
day = "0" + day; // if (day.length == 1) {
} // day = "0" + day;
const FSRQBUSS = year + "-" + month + "-" + day; // }
this.form["FSRQBUSS"] = FSRQBUSS // const FSRQBUSS = year + "-" + month + "-" + day;
// this.form["FSRQBUSS"] = FSRQBUSS
} //
// }
}, },
}, },
'form.country': { 'form.country': {
@@ -1204,6 +1206,26 @@
}, },
}, },
methods: { methods: {
FSRQchange(){
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
let year = date.getFullYear()+5;
if(this.form.standSort === 'Q/QCBFC' || this.form.standSort === 'Q/FT X'){
year = date.getFullYear()+3;
}
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length === 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
},
regDate(data){ regDate(data){
if(this.form.DTQBBHBUSS !== undefined && this.form.DTQBBHBUSS !== null && this.form.DTQBBHBUSS.indexOf(data) !== -1){ if(this.form.DTQBBHBUSS !== undefined && this.form.DTQBBHBUSS !== null && this.form.DTQBBHBUSS.indexOf(data) !== -1){
data = data + ' X' data = data + ' X'
@@ -2729,6 +2729,9 @@
textArr2 = [...new Set(textArr2)] textArr2 = [...new Set(textArr2)]
this.replaceLawsNumModel = false this.replaceLawsNumModel = false
}) })
this.form.rqbJson = this.selectedListRep[0].id
// this.SarLawsInfoEO.replaceLawsNum = textArr.join(',') // this.SarLawsInfoEO.replaceLawsNum = textArr.join(',')
// 解决 标准入库流程--圈住的字段,先手动输入,然后再手动查找,点提交就会把手动输入的标准号覆盖 // 解决 标准入库流程--圈住的字段,先手动输入,然后再手动查找,点提交就会把手动输入的标准号覆盖
if (this.replaceLawType === 'DTQBBHBUSS') { if (this.replaceLawType === 'DTQBBHBUSS') {
@@ -2762,7 +2765,7 @@
},'') },'')
// const id = this.selectedListRep[0].id // const id = this.selectedListRep[0].id
this.selectByIdAtt(ids).then(res =>{ this.selectByIdAtt(ids).then(res =>{
if (res && res.data && res.data[0].fbgbuss !== '') { if (res && res.data && res.data.length && res.data[0].fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{ this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{
if(index === 0){ if(index === 0){
init = item.fbgbussNmae init = item.fbgbussNmae
@@ -2781,8 +2784,11 @@
},'') },'')
// this.form.LSBBBUSSName = res.data[0].fbgbussNmae // this.form.LSBBBUSSName = res.data[0].fbgbussNmae
// this.form.LSBBBUSS = res.data[0].fbgbuss // this.form.LSBBBUSS = res.data[0].fbgbuss
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName); }else if(res && res.data && res.data.length === 0){
this.form.LSBBBUSS = ''
this.form.LSBBBUSSName = ''
} }
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
}) })
} }
@@ -3523,7 +3529,7 @@
// this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName); // this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
// } // }
if (res && res.data && res.data[0].fbgbuss !== '') { if (res && res.data && res.data[0].fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{ const names = res.data.reduce((init,item,index,arr)=>{
if(index === 0){ if(index === 0){
init = item.fbgbussNmae init = item.fbgbussNmae
}else{ }else{
@@ -3531,7 +3537,7 @@
} }
return init return init
},'') },'')
this.form.LSBBBUSS = res.data.reduce((init,item,index,arr)=>{ const ids = res.data.reduce((init,item,index,arr)=>{
if(index === 0){ if(index === 0){
init = item.fbgbuss init = item.fbgbuss
}else{ }else{
@@ -3539,6 +3545,15 @@
} }
return init 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.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName); this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
} }
}) })
@@ -20,7 +20,7 @@
<div style="flex: auto;" v-show="active === '1'"> <div style="flex: auto;" v-show="active === '1'">
<formList <formList
:form = "form" :form = "form"
:isTrue="true" :isTrue="false"
:FBGBUSSFileList = "FBGBUSSFileList" :FBGBUSSFileList = "FBGBUSSFileList"
:LSBBBUSSFileList = "LSBBBUSSFileList" :LSBBBUSSFileList = "LSBBBUSSFileList"
:BZSMBUSSFileList = "BZSMBUSSFileList" :BZSMBUSSFileList = "BZSMBUSSFileList"
@@ -1726,6 +1726,9 @@
zrDeptIdName:this.$store.getters.userInfo.institutionName, zrDeptIdName:this.$store.getters.userInfo.institutionName,
children:[], children:[],
}; };
if(!this.form.modelData){
this.form.modelData = []
}
this.form.modelData.push(list); this.form.modelData.push(list);
this.$message.success("新增成功") this.$message.success("新增成功")
this.showForm.modelNum = "" this.showForm.modelNum = ""
@@ -2915,7 +2918,7 @@
if (valid) { if (valid) {
this.$refs['formTongGuo'].validate((valid) => { this.$refs['formTongGuo'].validate((valid) => {
if (valid) { if (valid) {
if(this.form.modelData.length === 0){ if(this.form.modelData === undefined || this.form.modelData.length === 0){
this.opinionDialogVisible = true this.opinionDialogVisible = true
}else{ }else{
this.commentTextHandle(); this.commentTextHandle();
@@ -254,6 +254,7 @@
</el-form> </el-form>
</div> </div>
<el-table <el-table
v-loading = "loading"
:data="standinfoList" :data="standinfoList"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
@@ -359,6 +360,7 @@ export default {
props: ['message'], props: ['message'],
data(){ data(){
return{ return{
loading:false,
disabledXX:!!this.$route.query.disabledXX, disabledXX:!!this.$route.query.disabledXX,
formLoading:false, formLoading:false,
formRules: { formRules: {
@@ -459,6 +461,7 @@ export default {
pageSize: this.pageSize, pageSize: this.pageSize,
}, { }, {
_this: this, _this: this,
loading: "loading"
}, res => { }, res => {
this.standinfoList = res.data.list this.standinfoList = res.data.list
//展示的数据只能是未开始的 //展示的数据只能是未开始的
@@ -467,7 +470,7 @@ export default {
// this.standinfoList.push(item) // this.standinfoList.push(item)
// } // }
// }) // })
this.total = this.standinfoList.length this.total = res.data.count
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.selection.doLayout() this.$refs.selection.doLayout()
}) })