1 |
- {"version":3,"sources":["webpack:///src/views/pms/brand/add.vue","webpack:///./src/views/pms/brand/add.vue?4e0f","webpack:///./src/views/pms/brand/add.vue","webpack:///src/views/pms/brand/components/BrandDetail.vue","webpack:///./src/views/pms/brand/components/BrandDetail.vue?eb00","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":"2GAKAA,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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OAAOmB,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/9.fc887351a57f50cd621c.js","sourcesContent":["<template> \n <brand-detail :is-edit='false'></brand-detail>\n</template>\n<script>\n import BrandDetail from './components/BrandDetail'\n export default {\n name: 'addBrand',\n components: { BrandDetail }\n }\n</script>\n<style>\n</style>\n\n\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-5f58ac54\",\"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,\\\"publicPath\\\":\\\"../../\\\"}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-5f58ac54\\\",\\\"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-5f58ac54\\\",\\\"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> \n <el-card class=\"form-container\" shadow=\"never\">\n <el-form :model=\"brand\" :rules=\"rules\" ref=\"brandFrom\" label-width=\"150px\">\n <el-form-item label=\"品牌名称:\" prop=\"name\">\n <el-input v-model=\"brand.name\"></el-input>\n </el-form-item>\n <el-form-item label=\"品牌首字母:\">\n <el-input v-model=\"brand.firstLetter\"></el-input>\n </el-form-item>\n <el-form-item label=\"品牌LOGO:\" prop=\"logo\">\n <single-upload v-model=\"brand.logo\"></single-upload>\n </el-form-item>\n <!-- <el-form-item label=\"品牌专区大图:\">\n <single-upload v-model=\"brand.bigPic\"></single-upload>\n </el-form-item> -->\n <!-- <el-form-item label=\"品牌故事:\">\n <el-input\n placeholder=\"请输入内容\"\n type=\"textarea\"\n v-model=\"brand.brandStory\"\n :autosize=\"true\"></el-input>\n </el-form-item> -->\n <el-form-item label=\"排序:\" prop=\"sort\">\n <el-input v-model.number=\"brand.sort\"></el-input>\n </el-form-item>\n <el-form-item label=\"是否显示:\">\n <el-radio-group v-model=\"brand.showStatus\">\n <el-radio :label=\"1\">是</el-radio>\n <el-radio :label=\"0\">否</el-radio>\n </el-radio-group>\n </el-form-item>\n <!-- <el-form-item label=\"品牌制造商:\">\n <el-radio-group v-model=\"brand.factoryStatus\">\n <el-radio :label=\"1\">是</el-radio>\n <el-radio :label=\"0\">否</el-radio>\n </el-radio-group>\n </el-form-item> -->\n <el-form-item>\n <el-button type=\"primary\" @click=\"onSubmit('brandFrom')\">提交</el-button>\n <el-button v-if=\"!isEdit\" @click=\"resetForm('brandFrom')\">重置</el-button>\n </el-form-item>\n </el-form>\n </el-card>\n</template>\n<script>\n import {createBrand, getBrand, updateBrand} from '@/api/brand'\n import SingleUpload from '@/components/Upload/singleUpload'\n const defaultBrand={\n bigPic: '',\n brandStory: '',\n factoryStatus: 0,\n firstLetter: '',\n logo: '',\n name: '',\n showStatus: 0,\n sort: 0\n };\n export default {\n name: 'BrandDetail',\n components:{SingleUpload},\n props: {\n isEdit: {\n type: Boolean,\n default: false\n }\n },\n data() {\n return {\n brand:Object.assign({}, defaultBrand),\n rules: {\n name: [\n {required: true, message: '请输入品牌名称', trigger: 'blur'},\n {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'}\n ],\n // logo: [\n // {required: true, message: '请输入品牌logo', trigger: 'blur'}\n // ],\n sort: [\n {type: 'number', message: '排序必须为数字'}\n ],\n }\n }\n },\n created() {\n if (this.isEdit) {\n getBrand(this.$route.query.id).then(response => {\n this.brand = response.data;\n });\n }else{\n this.brand = Object.assign({},defaultBrand);\n }\n },\n methods: {\n onSubmit(formName) {\n this.$refs[formName].validate((valid) => {\n if (valid) {\n this.$confirm('是否提交数据', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(() => {\n if (this.isEdit) {\n updateBrand(this.$route.query.id, this.brand).then(response => {\n this.$refs[formName].resetFields();\n this.$message({\n message: '修改成功',\n type: 'success',\n duration:1000\n });\n this.$router.back();\n });\n } else {\n createBrand(this.brand).then(response => {\n this.$refs[formName].resetFields();\n this.brand = Object.assign({},defaultBrand);\n this.$message({\n message: '提交成功',\n type: 'success',\n duration:1000\n });\n });\n }\n });\n\n } else {\n this.$message({\n message: '验证失败',\n type: 'error',\n duration:1000\n });\n return false;\n }\n });\n },\n resetForm(formName) {\n this.$refs[formName].resetFields();\n this.brand = Object.assign({},defaultBrand);\n }\n }\n }\n</script>\n<style>\n</style>\n\n\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-7183b3bf\",\"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,\\\"publicPath\\\":\\\"../../\\\"}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../../../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-7183b3bf\\\",\\\"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-7183b3bf\\\",\\\"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":""}
|