|
@@ -5,7 +5,7 @@
|
|
|
<el-cascader
|
|
|
style="width:100%"
|
|
|
:props="categoryProp()"
|
|
|
- v-model="value.productCategoryId "
|
|
|
+ v-model="selectProductCateValue "
|
|
|
:options="productCateOptions">
|
|
|
</el-cascader>
|
|
|
</el-form-item>
|
|
@@ -96,15 +96,15 @@
|
|
|
if(newValue===undefined||newValue==null||newValue===0)return;
|
|
|
this.handleEditCreated();
|
|
|
},
|
|
|
- selectProductCateValue: function (newValue) {
|
|
|
- if (newValue != null && newValue.length === 2) {
|
|
|
- this.value.productCategoryId = newValue[1];
|
|
|
- this.value.productCategoryName= this.getCateNameById(this.value.productCategoryId);
|
|
|
- } else {
|
|
|
- this.value.productCategoryId = null;
|
|
|
- this.value.productCategoryName=null;
|
|
|
- }
|
|
|
- },
|
|
|
+ // selectProductCateValue: function (newValue) {
|
|
|
+ // if (newValue != null && newValue.length === 2) {
|
|
|
+ // this.value.productCategoryId = newValue[1];
|
|
|
+ // this.value.productCategoryName= this.getCateNameById(this.value.productCategoryId);
|
|
|
+ // } else {
|
|
|
+ // this.value.productCategoryId = null;
|
|
|
+ // this.value.productCategoryName=null;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
value(){
|
|
|
this.files = this.value.systemFileList
|
|
|
}
|
|
@@ -141,7 +141,7 @@
|
|
|
//处理编辑逻辑
|
|
|
handleEditCreated(){
|
|
|
if(this.value.productCategoryId!=null){
|
|
|
- this.selectProductCateValue.push(this.value.cateParentId);
|
|
|
+ // this.selectProductCateValue.push(this.value.cateParentId);
|
|
|
this.selectProductCateValue.push(this.value.productCategoryId);
|
|
|
}
|
|
|
this.hasEditCreated=true;
|
|
@@ -197,6 +197,9 @@
|
|
|
return false
|
|
|
}
|
|
|
this.value.fileGuids = guids
|
|
|
+ if(this.selectProductCateValue && this.selectProductCateValue.length>0){
|
|
|
+ this.productCate.parentId = this.parentId[this.selectProductCateValue.length-1]
|
|
|
+ }
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.$emit('finishCommit');
|