Browse Source

'路由修改'

zhangyu 5 years ago
parent
commit
b615d31f48

+ 1 - 1
src/components/product/productTool.vue

@@ -59,7 +59,7 @@ export default {
     },
     handProduct() {
       //跳转添加产品的路由
-      this.$router.push({path: 'supplement'})
+      this.$router.push({path: '/supplement'})
     },
     // 取值
     getValue(item, node) {

+ 3 - 3
src/components/supplement/sagaSupplement.vue

@@ -310,12 +310,12 @@
         if (valid) {
           console.log(this.ruleForm);
           if (this.$route.params.ProdID) {//修改
-            prodTypeUpdate({ProdID:this.$route.params.ProdID, ...this.ruleForm}, res => {
+            prodTypeUpdate([{ProdID:this.$route.params.ProdID, ...this.ruleForm}], res => {
               this.$message.success('修改成功!')
               this.$router.go(-1)
             })
           } else {//添加
-            prodTypeCreate(this.ruleForm, res => {
+            prodTypeCreate([this.ruleForm], res => {
               this.$message.success('创建成功!')
               this.$router.push('/product')
             })
@@ -369,7 +369,7 @@
         border-bottom: 1px solid #eff0f1;
       }
 
-      .el-select, > > > .el-form-item__content, .el-cascader {
+      .el-select,/deep/ .el-form-item__content, .el-cascader {
         width: 320px;
       }
     }