1 line
12 KiB
JSON
1 line
12 KiB
JSON
{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\hz-zhhq-web\\src\\views\\catering\\evaluateMenu\\addEvaluateMenu\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\catering\\evaluateMenu\\addEvaluateMenu\\index.vue","mtime":1737610069410},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport { AddmenuEv, Updatamenu, Foodlist, Menudetail, Deletemenu } from \"@/api/getdata\";\nimport Paging from \"@/views/Public/paging.vue\";\nimport Popup from \"@/views/estate/examine/dialog/popup.vue\";\nexport default {\n components: {\n Paging: Paging,\n Popup: Popup\n },\n data: function data() {\n return {\n formInline: {\n pc: \"\",\n input: \"\"\n },\n loading: false,\n //初始化loading\n loadingMsg: \"\",\n loading1: false,\n //初始化loading\n loadingMsg1: \"\",\n a: 0,\n msg: \"暂无菜品,请从右侧选择菜品\",\n row: {},\n btn: 3,\n cp: \"\",\n validation: false,\n completeTitle: \"\",\n nav: \"\",\n detail: [],\n canteen: \"\",\n input: \"\",\n kinds: \"\",\n foodName: \"\",\n num: \"\",\n quota: \"\",\n id: \"\",\n greenFoodsVarieties: [],\n til: \"添加\",\n tableData: [],\n ruleForm: {\n uploadDate: \"\",\n locationId: ''\n },\n rules: {\n locationId: [{\n required: true,\n message: \"请选择\",\n trigger: \"blur\"\n }],\n uploadDate: [{\n required: true,\n message: \"请选择日期\",\n trigger: \"blur\"\n }]\n },\n isShow: {},\n page: {\n limit: 0 /** 当前点击*/,\n sizePage: 10 /** 当前多少页*/,\n total: 0 /**总数 */\n },\n data: typeof this.$route.query.rowdata == \"string\" ? JSON.parse(window.localStorage.getItem(\"takewayRowdata\")) : this.$route.query.rowdata,\n indexCall: this.$route.query.index ? this.$route.query.index : window.localStorage.getItem(\"takewayIndex\"),\n greenContent: []\n };\n },\n mounted: function mounted() {\n this.createLoad();\n this.createLoad1();\n this.til = this.data ? this.data.til : \"\";\n this.id = this.data ? this.data.id : \"\";\n this.getdetail();\n this.getlist();\n this.ruleForm.uploadDate = this.data ? this.data.sell_date : \"\";\n if (this.til != \"添加\") {\n this.ruleForm.locationId = this.data ? this.data.locationName : \"\";\n }\n },\n methods: {\n createLoad: function createLoad() {\n this.loading = true;\n this.loadingMsg = \"加载中...\";\n },\n clearLoad: function clearLoad() {\n this.loading = false;\n this.loadingMsg = \"\";\n },\n createLoad1: function createLoad1() {\n this.loading1 = true;\n this.loadingMsg1 = \"加载中...\";\n },\n clearLoad1: function clearLoad1() {\n this.loading1 = false;\n this.loadingMsg1 = \"\";\n },\n comeBack: function comeBack() {\n this.$router.push({\n name: \"evaluateMenu\",\n params: {\n index: this.indexCall\n }\n });\n },\n getlist: function getlist() {\n var _this = this;\n var Content = {\n currentPage: this.page.limit == \"0\" ? 1 : this.page.limit,\n queryObj: {\n foodName: this.formInline.input.trim(),\n kinds: this.formInline.cp\n }\n };\n Foodlist(Content).then(function (res) {\n // console.log(res,299)\n if (res.returnCode == \"1\") {\n _this.clearLoad1();\n _this.tableData = res.returnData.data;\n _this.tableData.map(function (item) {\n // console.log(item,331)\n item.isShow = true;\n _this.greenFoodsVarieties.map(function (items) {\n if (item.id == items.kindsId || item.id == items.id) {\n item.isShow = false;\n }\n });\n console.log(_this.greenFoodsVarieties, 337);\n });\n _this.page.total = res.returnData.total;\n _this.page.limit = res.returnData.currentPage;\n } else {\n _this.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n });\n },\n // 详情\n getdetail: function getdetail() {\n var _this2 = this;\n var Content = {\n id: this.id\n };\n Menudetail(Content).then(function (res) {\n console.log(res, 324);\n if (res.returnCode == \"1\") {\n _this2.clearLoad();\n _this2.greenFoodsVarieties = res.returnData;\n _this2.resetForm.locationId = res.returnData.location_id;\n _this2.resetForm.uploadDate = res.returnData.sell_date ? res.returnData.sell_date : \"\";\n } else {\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this2.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this2.clearLoad();\n }, 300);\n });\n },\n handleClick: function handleClick(row, i) {\n console.log(row, 394);\n row.isShow = false;\n var obj = {};\n obj = row;\n obj.foodName = row.food_name ? row.food_name : \"\";\n this.greenFoodsVarieties.push(row);\n },\n // 查询\n search: function search() {\n this.page.limit = 1;\n this.createLoad1();\n this.getlist();\n },\n submitForm: function submitForm(formName) {\n var _this3 = this;\n this.greenContent = [];\n this.greenFoodsVarieties.map(function (item) {\n _this3.greenContent.push({\n foodName: item.foodName,\n kindsId: item.kindsId ? item.kindsId : item.id\n });\n });\n // 添加菜单\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n if (_this3.til != \"编辑\") {\n var flag = true;\n if (!flag) {\n _this3.btn = 2;\n _this3.completeTitle = \"今日菜单\";\n _this3.validation = true;\n }\n if (flag) {\n _this3.validation = true;\n _this3.btn = 3;\n _this3.completeTitle = \"添加\";\n _this3.nav = \"是否添加?\";\n }\n } else {\n var _flag = true;\n if (!_flag) {\n _this3.btn = 2;\n _this3.completeTitle = \"今日菜单\";\n _this3.validation = true;\n }\n if (_flag) {\n _this3.validation = true;\n _this3.btn = 3;\n _this3.completeTitle = \"编辑\";\n _this3.nav = \"是否编辑?\";\n }\n }\n }\n });\n },\n resetForm: function resetForm(formName) {\n this.$refs[formName].resetFields();\n this.$router.push({\n name: \"TakeawayMenu\",\n params: {\n index: this.indexCall\n }\n });\n this.$message({\n message: \"取消成功\",\n type: \"success\"\n });\n },\n closeDialogDel: function closeDialogDel(val) {\n var _this4 = this;\n var Content;\n var locationIds = this.ruleForm.locationId == \"西单食堂\" ? 1 : this.ruleForm.locationId == \"银座食堂\" ? 2 : this.ruleForm.locationId == \"本部食堂\" ? 3 : \"\";\n var aa = !isNaN(this.ruleForm.locationId) ? this.ruleForm.locationId : locationIds;\n if (val == \"1\") {\n this.tableData.map(function (item) {\n if (item.id == _this4.row.id || item.id == _this4.row.kindsId) {\n _this4.createLoad1();\n _this4.getlist();\n _this4.$set(item, 'isShow', true);\n // item.isShow = true;\n }\n });\n var indexid = this.row.kindsId ? this.row.kindsId : this.row.id;\n var delindex = 0;\n this.greenFoodsVarieties.map(function (item, index) {\n if (item.id === indexid || item.kindsId == indexid) {\n delindex = index;\n }\n });\n this.greenFoodsVarieties.splice(delindex, 1);\n } else if (val == \"2\") {\n //编辑\n Content = {\n menuId: this.id,\n locationId: aa,\n uploadDate: this.ruleForm.uploadDate ? this.ruleForm.uploadDate : \"\",\n greenFoodsVarieties: this.greenContent\n };\n Updatamenu(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this4.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this4.$router.push({\n name: \"evaluateMenu\",\n params: {\n index: _this4.indexCall\n }\n });\n } else {\n _this4.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this4.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this4.clearLoad();\n }, 300);\n });\n this.dialogTableVisible = false;\n } else if (val == \"3\") {\n Content = {\n locationId: aa,\n uploadDate: this.ruleForm.uploadDate ? this.ruleForm.uploadDate : \"\",\n greenFoodsVarieties: this.greenContent\n };\n AddmenuEv(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this4.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this4.$router.push({\n name: \"evaluateMenu\",\n params: {\n index: _this4.indexCall\n }\n });\n _this4.getlist();\n } else {\n _this4.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n this.dialogTableVisible = false;\n }\n // this.$refs['ruleForm'].resetFields()\n\n this.validation = false;\n },\n handleModifyStatus: function handleModifyStatus(row) {\n this.btn = 3;\n this.completeTitle = \"删除\";\n this.nav = \"是否删除?\";\n this.row = row;\n this.validation = true;\n },\n currentChanges: function currentChanges(val) {\n this.page.limit = val;\n this.getlist();\n }\n }\n};",null]} |