1 |
- {"version":3,"sources":["webpack:///src/views/pms/brand/add.vue","webpack:///./src/views/pms/brand/add.vue?8d24","webpack:///./src/views/pms/brand/add.vue","webpack:///src/views/pms/brand/components/BrandDetail.vue","webpack:///./src/views/pms/brand/components/BrandDetail.vue?2d49","webpack:///./src/views/pms/brand/components/BrandDetail.vue"],"names":["add","name","components","BrandDetail","brand_add","render","_h","this","$createElement","_self","_c","attrs","is-edit","staticRenderFns","Component","__webpack_require__","normalizeComponent","ssrContext","__webpack_exports__","defaultBrand","bigPic","brandStory","factoryStatus","firstLetter","logo","showStatus","sort","SingleUpload","props","isEdit","type","Boolean","default","data","brand","assign_default","rules","required","message","trigger","min","max","created","_this","Object","$route","query","id","then","response","methods","onSubmit","formName","_this2","$refs","validate","valid","$message","duration","$confirm","confirmButtonText","cancelButtonText","resetFields","$router","back","resetForm","components_BrandDetail","_vm","staticClass","shadow","ref","model","label-width","label","prop","value","callback","$$v","$set","expression","_v","_n","on","click","$event","_e"],"mappings":"4GAKAA,GACAC,KAAA,WACAC,YAAAC,sBAAA,ICJAC,GADiBC,OAFjB,WAA0B,IAAaC,EAAbC,KAAaC,eAAkD,OAA/DD,KAAuCE,MAAAC,IAAAJ,GAAwB,gBAA0BK,OAAOC,WAAA,MAEzGC,oBCCjB,IAcAC,EAdAC,EAAA,OAcAC,CACAhB,EACAI,GATA,EAVA,SAAAa,GACAF,EAAA,SAaA,KAEA,MAUAG,EAAA,QAAAJ,EAAA,kFCqBAK,GACAC,OAAA,GACAC,WAAA,GACAC,cAAA,EACAC,YAAA,GACAC,KAAA,GACAvB,KAAA,GACAwB,WAAA,EACAC,KAAA,GAEAvB,GACAF,KAAA,cACAC,YAAAyB,uBAAA,GACAC,OACAC,QACAC,KAAAC,QACAC,SAAA,IAGAC,KATA,WAUA,OACAC,MAAAC,OAAAhB,GACAiB,OACAnC,OACAoC,UAAA,EAAAC,QAAA,UAAAC,QAAA,SACAC,IAAA,EAAAC,IAAA,IAAAH,QAAA,kBAAAC,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AAOmB,KAAA,WAAiBoD,IAAKC,MAAA,SAAAC,GAAyBjB,EAAAhB,SAAA,iBAA4BgB,EAAAa,GAAA,QAAAb,EAAAa,GAAA,KAAAb,EAAAtC,OAAqHsC,EAAAkB,KAArH3E,EAAA,aAA2DwE,IAAIC,MAAA,SAAAC,GAAyBjB,EAAAF,UAAA,iBAA6BE,EAAAa,GAAA,qBAExnDnE,oBCCjB,IAcAC,EAdAC,EAAA,OAcAC,CACAb,EACA+D,GATA,EAVA,SAAAjD,GACAF,EAAA,SAaA,KAEA,MAUAG,EAAA,EAAAJ,EAAA","file":"static/js/15.aa6afa84bed9ae5d9114.js","sourcesContent":["<template> \r\n <brand-detail :is-edit='false'></brand-detail>\r\n</template>\r\n<script>\r\n import BrandDetail from './components/BrandDetail'\r\n export default {\r\n name: 'addBrand',\r\n components: { BrandDetail }\r\n }\r\n</script>\r\n<style>\r\n</style>\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/views/pms/brand/add.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('brand-detail',{attrs:{\"is-edit\":false}})}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-062182b6\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/pms/brand/add.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-062182b6\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./add.vue\")\n}\nvar normalizeComponent = require(\"!../../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./add.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./add.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-062182b6\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../../node_modules/vue-loader/lib/selector?type=template&index=0!./add.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/views/pms/brand/add.vue\n// module id = null\n// module chunks = ","<template> \r\n <el-card class=\"form-container\" shadow=\"never\">\r\n <el-form :model=\"brand\" :rules=\"rules\" ref=\"brandFrom\" label-width=\"150px\">\r\n <el-form-item label=\"品牌名称:\" prop=\"name\">\r\n <el-input v-model=\"brand.name\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"品牌首字母:\">\r\n <el-input v-model=\"brand.firstLetter\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"品牌LOGO:\" prop=\"logo\">\r\n <single-upload v-model=\"brand.logo\"></single-upload>\r\n </el-form-item>\r\n <!-- <el-form-item label=\"品牌专区大图:\">\r\n <single-upload v-model=\"brand.bigPic\"></single-upload>\r\n </el-form-item> -->\r\n <!-- <el-form-item label=\"品牌故事:\">\r\n <el-input\r\n placeholder=\"请输入内容\"\r\n type=\"textarea\"\r\n v-model=\"brand.brandStory\"\r\n :autosize=\"true\"></el-input>\r\n </el-form-item> -->\r\n <el-form-item label=\"排序:\" prop=\"sort\">\r\n <el-input v-model.number=\"brand.sort\"></el-input>\r\n </el-form-item>\r\n <el-form-item label=\"是否显示:\">\r\n <el-radio-group v-model=\"brand.showStatus\">\r\n <el-radio :label=\"1\">是</el-radio>\r\n <el-radio :label=\"0\">否</el-radio>\r\n </el-radio-group>\r\n </el-form-item>\r\n <!-- <el-form-item label=\"品牌制造商:\">\r\n <el-radio-group v-model=\"brand.factoryStatus\">\r\n <el-radio :label=\"1\">是</el-radio>\r\n <el-radio :label=\"0\">否</el-radio>\r\n </el-radio-group>\r\n </el-form-item> -->\r\n <el-form-item>\r\n <el-button type=\"primary\" @click=\"onSubmit('brandFrom')\">提交</el-button>\r\n <el-button v-if=\"!isEdit\" @click=\"resetForm('brandFrom')\">重置</el-button>\r\n </el-form-item>\r\n </el-form>\r\n </el-card>\r\n</template>\r\n<script>\r\n import {createBrand, getBrand, updateBrand} from '@/api/brand'\r\n import SingleUpload from '@/components/Upload/singleUpload'\r\n const defaultBrand={\r\n bigPic: '',\r\n brandStory: '',\r\n factoryStatus: 0,\r\n firstLetter: '',\r\n logo: '',\r\n name: '',\r\n showStatus: 0,\r\n sort: 0\r\n };\r\n export default {\r\n name: 'BrandDetail',\r\n components:{SingleUpload},\r\n props: {\r\n isEdit: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n data() {\r\n return {\r\n brand:Object.assign({}, defaultBrand),\r\n rules: {\r\n name: [\r\n {required: true, message: '请输入品牌名称', trigger: 'blur'},\r\n {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'}\r\n ],\r\n // logo: [\r\n // {required: true, message: '请输入品牌logo', trigger: 'blur'}\r\n // ],\r\n sort: [\r\n {type: 'number', message: '排序必须为数字'}\r\n ],\r\n }\r\n }\r\n },\r\n created() {\r\n if (this.isEdit) {\r\n getBrand(this.$route.query.id).then(response => {\r\n this.brand = response.data;\r\n });\r\n }else{\r\n this.brand = Object.assign({},defaultBrand);\r\n }\r\n },\r\n methods: {\r\n onSubmit(formName) {\r\n this.$refs[formName].validate((valid) => {\r\n if (valid) {\r\n this.$confirm('是否提交数据', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n }).then(() => {\r\n if (this.isEdit) {\r\n updateBrand(this.$route.query.id, this.brand).then(response => {\r\n this.$refs[formName].resetFields();\r\n this.$message({\r\n message: '修改成功',\r\n type: 'success',\r\n duration:1000\r\n });\r\n this.$router.back();\r\n });\r\n } else {\r\n createBrand(this.brand).then(response => {\r\n this.$refs[formName].resetFields();\r\n this.brand = Object.assign({},defaultBrand);\r\n this.$message({\r\n message: '提交成功',\r\n type: 'success',\r\n duration:1000\r\n });\r\n });\r\n }\r\n });\r\n\r\n } else {\r\n this.$message({\r\n message: '验证失败',\r\n type: 'error',\r\n duration:1000\r\n });\r\n return false;\r\n }\r\n });\r\n },\r\n resetForm(formName) {\r\n this.$refs[formName].resetFields();\r\n this.brand = Object.assign({},defaultBrand);\r\n }\r\n }\r\n }\r\n</script>\r\n<style>\r\n</style>\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/views/pms/brand/components/BrandDetail.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-card',{staticClass:\"form-container\",attrs:{\"shadow\":\"never\"}},[_c('el-form',{ref:\"brandFrom\",attrs:{\"model\":_vm.brand,\"rules\":_vm.rules,\"label-width\":\"150px\"}},[_c('el-form-item',{attrs:{\"label\":\"品牌名称:\",\"prop\":\"name\"}},[_c('el-input',{model:{value:(_vm.brand.name),callback:function ($$v) {_vm.$set(_vm.brand, \"name\", $$v)},expression:\"brand.name\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"品牌首字母:\"}},[_c('el-input',{model:{value:(_vm.brand.firstLetter),callback:function ($$v) {_vm.$set(_vm.brand, \"firstLetter\", $$v)},expression:\"brand.firstLetter\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"品牌LOGO:\",\"prop\":\"logo\"}},[_c('single-upload',{model:{value:(_vm.brand.logo),callback:function ($$v) {_vm.$set(_vm.brand, \"logo\", $$v)},expression:\"brand.logo\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"排序:\",\"prop\":\"sort\"}},[_c('el-input',{model:{value:(_vm.brand.sort),callback:function ($$v) {_vm.$set(_vm.brand, \"sort\", _vm._n($$v))},expression:\"brand.sort\"}})],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"是否显示:\"}},[_c('el-radio-group',{model:{value:(_vm.brand.showStatus),callback:function ($$v) {_vm.$set(_vm.brand, \"showStatus\", $$v)},expression:\"brand.showStatus\"}},[_c('el-radio',{attrs:{\"label\":1}},[_vm._v(\"是\")]),_vm._v(\" \"),_c('el-radio',{attrs:{\"label\":0}},[_vm._v(\"否\")])],1)],1),_vm._v(\" \"),_c('el-form-item',[_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":function($event){_vm.onSubmit('brandFrom')}}},[_vm._v(\"提交\")]),_vm._v(\" \"),(!_vm.isEdit)?_c('el-button',{on:{\"click\":function($event){_vm.resetForm('brandFrom')}}},[_vm._v(\"重置\")]):_vm._e()],1)],1)],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-f271e256\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/pms/brand/components/BrandDetail.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../../../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-f271e256\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../../../../node_modules/vue-loader/lib/selector?type=styles&index=0!./BrandDetail.vue\")\n}\nvar normalizeComponent = require(\"!../../../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./BrandDetail.vue\"\nimport __vue_script__ from \"!!babel-loader!../../../../../node_modules/vue-loader/lib/selector?type=script&index=0!./BrandDetail.vue\"\n/* template */\nimport __vue_template__ from \"!!../../../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-f271e256\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../../../node_modules/vue-loader/lib/selector?type=template&index=0!./BrandDetail.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/views/pms/brand/components/BrandDetail.vue\n// module id = null\n// module chunks = "],"sourceRoot":""}
|