feat: There is no way the, bug #52933 前端处理数据问题
This commit is contained in:
@@ -1775,19 +1775,6 @@ export default {
|
||||
'form.treeListName'(val) {
|
||||
console.log(this.form.treeListName)
|
||||
},
|
||||
'form.country': {
|
||||
handler(val) {
|
||||
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
|
||||
if (val instanceof Array) {
|
||||
this.countryArr = val.join(",");
|
||||
} else {
|
||||
this.countryArr = val
|
||||
}
|
||||
} else if (val === '') {
|
||||
this.countryArr = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
@@ -1957,14 +1944,14 @@ export default {
|
||||
this.verifySarStandard = false
|
||||
/** val === '1' (国外) val === '0'( 国内 )*/
|
||||
// 国内英文名称不必填 国外必填 ,标准性质国内不体现
|
||||
if (val === '1') {
|
||||
this.rules.standName[0].required = false
|
||||
this.rules.standEnName[0].required = true;
|
||||
this.rules.standNature[0].required = false
|
||||
} else {
|
||||
this.rules.standName[0].required = true
|
||||
this.rules.standNature[0].required = true
|
||||
this.rules.standEnName[0].required = false;
|
||||
if(this.rules){
|
||||
if (val === '1') {
|
||||
this.rules.standName[0].required = false
|
||||
this.rules.standNature[0].required = false
|
||||
} else {
|
||||
this.rules.standName[0].required = true
|
||||
this.rules.standNature[0].required = true
|
||||
}
|
||||
}
|
||||
this.standardSearchForm.standType = val === '0' ? 'INLAND' : 'FOREIGN'
|
||||
//切换清空表单
|
||||
@@ -2270,11 +2257,6 @@ export default {
|
||||
}, res => {
|
||||
if (res && res.data) {
|
||||
const bringData = res.data
|
||||
if (res.data.country) {
|
||||
res.data.country = res.data.country.split(',');
|
||||
} else {
|
||||
res.data.country = []
|
||||
}
|
||||
bringData.txlb = ''
|
||||
bringData.signFlag = this.form.signFlag && this.form.signFlag != '' ? this.form.signFlag : '0'
|
||||
bringData.standInData = this.form.standInData && this.form.standInData != '' ? this.form.standInData : '0'
|
||||
@@ -2282,6 +2264,21 @@ export default {
|
||||
this.form = JSON.parse(JSON.stringify(json))
|
||||
this.getListTree(bringData)
|
||||
this.form.standId = bringData.id
|
||||
if (this.form.country) {
|
||||
let val = this.form.country.replace('//',"").replace('["',"").replace('"]',"").toString()
|
||||
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
|
||||
if (val instanceof Array) {
|
||||
this.form.country = this.form.country.join(",");
|
||||
} else {
|
||||
this.form.country = []
|
||||
this.form.country.push(val)
|
||||
}
|
||||
} else if (val === '') {
|
||||
this.form.country = []
|
||||
}
|
||||
} else {
|
||||
this.form.country = []
|
||||
}
|
||||
this.form.qcdw = JSON.parse(JSON.stringify(json)).qcdw && JSON.parse(JSON.stringify(json)).qcdw !== '[]' ? JSON.parse(JSON.stringify(json)).qcdw.split(',') : ''
|
||||
this.form.wssmr = JSON.parse(JSON.stringify(json)).wssmr && JSON.parse(JSON.stringify(json)).wssmr !== '[]' ? JSON.parse(JSON.stringify(json)).wssmr : ''
|
||||
this.form.zrgcs = JSON.parse(JSON.stringify(json)).zrgcs && JSON.parse(JSON.stringify(json)).zrgcs !== '[]' ? JSON.parse(JSON.stringify(json)).zrgcs : ''
|
||||
|
||||
Reference in New Issue
Block a user