feat: There is no way the

This commit is contained in:
super_liu
2021-08-17 17:15:12 +08:00
parent 3a303eaa45
commit ea4c4a10c5
@@ -671,37 +671,19 @@
</el-col> </el-col>
<template v-if="index === 0" > <template v-if="index === 0" >
<!-- <el-form-item label="国家/地区" prop="" label-width="150px" class="add-form-item">--> <el-form-item label="国家/地区" prop="" label-width="150px" class="add-form-item">
<!-- <el-select v-model="sarStandardsInfoEO.country" filterable clearable>--> <el-select v-model="sarStandardsInfoEO.country" multiple filterable clearable>
<!-- <el-option-->
<!-- v-for="item in countryOptions"-->
<!-- placeholder="请选择"-->
<!-- :key="item.value"-->
<!-- :value="item.value"-->
<!-- :label="item.label"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
{{sarStandardsInfoEO.country}}
<el-form-item label="国家/地区" prop="countryArea" class="search-item">
<el-select
v-model="sarStandardsInfoEO.country"
multiple
placeholder="请选择"
filterable
:disabled="false"
class="wx-resolve"
>
<el-option <el-option
v-for="item in countryOptions" v-for="item in countryOptions"
:value="item.value" placeholder="请选择"
:key="item.value" :key="item.value"
:value="item.value"
:label="item.label" :label="item.label"
> >
{{ item.label }}
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标准类别" prop="standSort" label-width="150px" class="add-form-item"> <el-form-item label="标准类别" prop="standSort" label-width="150px" class="add-form-item">
<el-select v-model="sarStandardsInfoEO.standSort" filterable> <el-select v-model="sarStandardsInfoEO.standSort" filterable>
<el-option <el-option
@@ -1692,6 +1674,7 @@ export default {
id: '', id: '',
standType: 'FOREIGN', // 标准分类 standType: 'FOREIGN', // 标准分类
country: '', country: '',
countryArr:'',
standSort: '', standSort: '',
applyArctic: '', applyArctic: '',
standNumber: '', standNumber: '',
@@ -2119,6 +2102,19 @@ export default {
props: { props: {
}, },
watch: { watch: {
'sarStandardsInfoEO.country': {
handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
if (val instanceof Array) {
this.sarStandardsInfoEO.countryArr = val.join(",");
} else {
this.sarStandardsInfoEO.countryArr = val
}
} else if (val === '') {
this.sarStandardsInfoEO.countryArr = []
}
}
},
filterText(val) { filterText(val) {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
} }
@@ -2435,10 +2431,9 @@ export default {
console.log(formFieldList, 'AAAAAAAAAAAAAAAAAAAAA') console.log(formFieldList, 'AAAAAAAAAAAAAAAAAAAAA')
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item)) this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem]; this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
console.log(item.country); if(item.country !== undefined && item.country !== null){
console.log("hello") this.sarStandardsInfoEO.country = item.country.split(",");
this.sarStandardsInfoEO.country=item.country; }
console.log(this.sarStandardsInfoEO.country);
this.sarStandardsInfoEO.standSort = item.standSort this.sarStandardsInfoEO.standSort = item.standSort
if (this.sarStandardsInfoEO.putTime != null && this.sarStandardsInfoEO.putTime !== '') { if (this.sarStandardsInfoEO.putTime != null && this.sarStandardsInfoEO.putTime !== '') {
this.sarStandardsInfoEO.putTime = this.sarStandardsInfoEO.putTime.replace(new RegExp(/-/gm), '/') this.sarStandardsInfoEO.putTime = this.sarStandardsInfoEO.putTime.replace(new RegExp(/-/gm), '/')
@@ -3113,8 +3108,7 @@ export default {
this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => { this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
if (flag) { if (flag) {
// 时间格式修改 // 时间格式修改
this.sarStandardsInfoEO.country=JSON.stringify(this.sarStandardsInfoEO.country); this.sarStandardsInfoEO.country = this.sarStandardsInfoEO.countryArr;
console.groupCollapsed(this.sarStandardsInfoEO.country);
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO)) let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
if (nowstandinfo.putTime != null && nowstandinfo.putTime !== '') { if (nowstandinfo.putTime != null && nowstandinfo.putTime !== '') {
nowstandinfo.putTime = this.$dateFormat(this.sarStandardsInfoEO.putTime, 'yyyy-MM-dd hh:mm:ss') nowstandinfo.putTime = this.$dateFormat(this.sarStandardsInfoEO.putTime, 'yyyy-MM-dd hh:mm:ss')