project-dialog.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. exports.ids = [35];
  2. exports.modules = {
  3. /***/ 167:
  4. /***/ (function(module, exports) {
  5. // Exports
  6. module.exports = {
  7. };
  8. /***/ }),
  9. /***/ 195:
  10. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11. "use strict";
  12. __webpack_require__.r(__webpack_exports__);
  13. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProjectDialog_vue_vue_type_style_index_0_id_46eebe9e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
  14. /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProjectDialog_vue_vue_type_style_index_0_id_46eebe9e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProjectDialog_vue_vue_type_style_index_0_id_46eebe9e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
  15. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProjectDialog_vue_vue_type_style_index_0_id_46eebe9e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ProjectDialog_vue_vue_type_style_index_0_id_46eebe9e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  16. /***/ }),
  17. /***/ 204:
  18. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19. "use strict";
  20. // ESM COMPAT FLAG
  21. __webpack_require__.r(__webpack_exports__);
  22. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/ProjectDialog.vue?vue&type=template&id=46eebe9e&scoped=true
  23. var render = function render() {
  24. var _vm = this,
  25. _c = _vm._self._c;
  26. return _c('el-dialog', {
  27. attrs: {
  28. "lock-scroll": false,
  29. "visible": _vm.visible,
  30. "width": "500px",
  31. "before-close": _vm.handleClose,
  32. "show-close": false,
  33. "center": "",
  34. "top": "0"
  35. },
  36. on: {
  37. "update:visible": function ($event) {
  38. _vm.visible = $event;
  39. }
  40. }
  41. }, [_c('div', {
  42. staticClass: "content"
  43. }, [_c('el-select', {
  44. staticStyle: {
  45. "width": "100%"
  46. },
  47. attrs: {
  48. "filterable": "",
  49. "allow-create": "",
  50. "clearable": "",
  51. "default-first-option": "",
  52. "filter-method": _vm.filterMethod,
  53. "placeholder": "Please choose your job name"
  54. },
  55. model: {
  56. value: _vm.keyword,
  57. callback: function ($$v) {
  58. _vm.keyword = $$v;
  59. },
  60. expression: "keyword"
  61. }
  62. }, _vm._l(_vm.selList, function (option) {
  63. return _c('el-option', {
  64. key: option.label_type,
  65. attrs: {
  66. "label": option.label_type,
  67. "value": option.label_type
  68. }
  69. });
  70. }), 1)], 1), _vm._v(" "), _c('div', {
  71. staticClass: "dialog-footer",
  72. attrs: {
  73. "slot": "footer"
  74. },
  75. slot: "footer"
  76. }, [_c('el-button', {
  77. attrs: {
  78. "type": "danger"
  79. },
  80. on: {
  81. "click": _vm.handleSend
  82. }
  83. }, [_vm._v("Add To My Project")]), _vm._v(" "), _c('el-button', {
  84. attrs: {
  85. "type": "info",
  86. "plain": ""
  87. },
  88. on: {
  89. "click": _vm.handleClose
  90. }
  91. }, [_vm._v("CANCEL")])], 1)]);
  92. };
  93. var staticRenderFns = [];
  94. // CONCATENATED MODULE: ./components/ProjectDialog.vue?vue&type=template&id=46eebe9e&scoped=true
  95. // CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/ProjectDialog.vue?vue&type=script&lang=js
  96. /* harmony default export */ var ProjectDialogvue_type_script_lang_js = ({
  97. props: {
  98. visible: {
  99. type: Boolean,
  100. default: false
  101. },
  102. id: [Number, String],
  103. projectObj: {
  104. type: Object,
  105. default: () => {}
  106. },
  107. isCopy: {
  108. type: Boolean,
  109. default: true
  110. }
  111. },
  112. data() {
  113. return {
  114. keyword: "",
  115. selList: []
  116. };
  117. },
  118. mounted() {
  119. if (this.$utils.checkLogin()) {
  120. this.getSelect();
  121. }
  122. },
  123. methods: {
  124. getSelect() {
  125. this.$axios.post("/goods_cart/cartLabelLists", {
  126. keyword: this.keyword
  127. }).then(res => {
  128. this.selList = res.result;
  129. });
  130. },
  131. filterMethod(val) {
  132. this.keyword = val;
  133. },
  134. handleSend() {
  135. if (!this.keyword) {
  136. this.$message({
  137. message: 'Please choose your job name',
  138. type: "warning"
  139. });
  140. return;
  141. }
  142. if (this.isCopy) {
  143. this.$axios.post("/goods_cart/cartLabelGoodsCopy", {
  144. id: this.id,
  145. label_type_new: this.keyword
  146. }).then(res => {
  147. this.$message.success("Added successfully");
  148. this.$emit('sendFinish');
  149. });
  150. return;
  151. }
  152. let data = {
  153. ...{
  154. label_type: this.keyword,
  155. goods_id: this.id
  156. },
  157. ...this.projectObj
  158. };
  159. this.$axios.post("/goods_cart/cartAdd", data).then(res => {
  160. this.$message.success("Add success");
  161. this.$emit("update:visible", false);
  162. });
  163. },
  164. handleClose() {
  165. this.$emit("update:visible", false);
  166. }
  167. }
  168. });
  169. // CONCATENATED MODULE: ./components/ProjectDialog.vue?vue&type=script&lang=js
  170. /* harmony default export */ var components_ProjectDialogvue_type_script_lang_js = (ProjectDialogvue_type_script_lang_js);
  171. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  172. var componentNormalizer = __webpack_require__(2);
  173. // CONCATENATED MODULE: ./components/ProjectDialog.vue
  174. function injectStyles (context) {
  175. var style0 = __webpack_require__(195)
  176. if (style0.__inject__) style0.__inject__(context)
  177. }
  178. /* normalize component */
  179. var component = Object(componentNormalizer["a" /* default */])(
  180. components_ProjectDialogvue_type_script_lang_js,
  181. render,
  182. staticRenderFns,
  183. false,
  184. injectStyles,
  185. "46eebe9e",
  186. "2584d023"
  187. )
  188. /* harmony default export */ var ProjectDialog = __webpack_exports__["default"] = (component.exports);
  189. /***/ })
  190. };;
  191. //# sourceMappingURL=project-dialog.js.map