You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
4.4 KiB
1 line
4.4 KiB
1 year ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a0fbc2e4"],{3480:function(e,t,a){"use strict";a("f095")},9809:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"container"},[a("div",{staticClass:"demo-input-suffix acea-row"},[a("el-form",{ref:"formValidate",attrs:{"label-width":"120px",rules:e.ruleValidate,model:e.formValidate}},[a("el-form-item",{attrs:{label:"参数模板名称:",prop:"template_name"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入参数模板名称"},model:{value:e.formValidate.template_name,callback:function(t){e.$set(e.formValidate,"template_name",t)},expression:"formValidate.template_name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"排序:"}},[a("el-input-number",{attrs:{label:"排序"},model:{value:e.formValidate.sort,callback:function(t){e.$set(e.formValidate,"sort",t)},expression:"formValidate.sort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.data,border:"",size:"small"}},[a("el-table-column",{attrs:{align:"center",prop:"name",label:"参数名称","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticClass:"priceBox",attrs:{placeholder:"请输入参数名称"},model:{value:t.row.name,callback:function(a){e.$set(t.row,"name",a)},expression:"scope.row.name"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"参数值","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticClass:"priceBox",attrs:{placeholder:"请输入参数值"},model:{value:t.row.value,callback:function(a){e.$set(t.row,"value",a)},expression:"scope.row.value"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"排序","min-width":"300"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.row.sort,callback:function(a){e.$set(t.row,"sort",a)},expression:"scope.row.sort"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticClass:"submission",attrs:{type:"text"},on:{click:function(a){return e.delSpecs(t.$index)}}},[e._v("删除")])]}}])})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.onAdd}},[e._v("添加参数")])],1)],1)],1)])])]),e._v(" "),a("el-card",[a("el-form",[a("el-form-item",[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.handleSubmit("formValidate")}}},[e._v("保存")])],1)],1)],1)],1)},s=[],l=(a("7f7f"),a("c4c8")),o=a("83d6"),n={name:"specsCreate",data:function(){return{listLoading:!0,ruleValidate:{template_name:[{required:!0,message:"请输入参数模板名称",trigger:"blur"}]},data:[],cateList:[],formValidate:{sort:0}}},created:function(){this.onAdd(),this.$route.params.id&&this.getInfo()},mounted:function(){},methods:{onAdd:function(){var e={name:"",value:"",sort:0,parameter_id:0};this.data.push(e)},onEdit:function(e){var t=this;this.$modalForm(levelUpdateApi(e)).then((function(){return t.getList("")}))},getInfo:function(){var e=this;Object(l["jb"])(this.$route.params.id).then((function(t){e.formValidate=t.data,e.data=t.data.parameter}))},delSpecs:function(e){this.data.splice(e,1)},handleSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(e){t.formValidate.params=t.data;for(var a=0;a<t.formValidate.params.length;a++){var r=t.formValidate.params[a];if(!r.name.trim())return t.$message.error("请输入参数名称");if(!r.value.trim())return t.$message.error("请输入参数值")}t.$route.params.id?Object(l["Ab"])(t.$route.params.id,t.formValidate).then((function(e){t.$message.success(e.message),t.$router.push({path:"".concat(o["roterPre"],"/product/specs")})})).catch((function(e)
|