{"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\\canteen\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\catering\\canteen\\index.vue","mtime":1737610069408},{"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":["import \"core-js/modules/es6.function.name\";\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// import elDragDialog from \"@/directive/el-drag-dialog\"; // base on element-ui\nimport { outline } from '@/utils/index.js';\nimport { Canteen, AddCanteen, UpdataCanteen, DeleteCanteen } from \"@/api/getdata\";\nimport Popup from \"@/views/estate/examine/dialog/popup.vue\";\nexport default {\n // directives: { elDragDialog },\n components: {\n Popup: Popup\n },\n data: function data() {\n /**食堂名称 */\n var valName = function valName(rule, value, callback) {\n var reg = /^[0-9a-zA-Z_\\u4e00-\\u9fa5]+$/;\n if (reg.test(value)) {\n callback();\n } else {\n callback(new Error('请输入数字、字母、下划线、汉字!'));\n }\n };\n /**食堂位置 */\n var valLoc = function valLoc(rule, value, callback) {\n var reg = /^[0-9a-zA-Z_\\u4e00-\\u9fa5]+$/;\n if (reg.test(value)) {\n callback();\n } else {\n callback(new Error('请输入数字、字母、下划线、汉字!'));\n }\n };\n var orderTelRule = function orderTelRule(rule, value, callback) {\n var isPhone = /^1(3|4|5|7|8|9)\\d{9}$/;\n // var isMob = /^(\\(\\d{3,4}\\)|\\d{3,4}-|\\s)?\\d{7,14}$/\n var isMob = /^\\d{8}$/;\n // var isMob = /^\\d{2,5}-\\d{7,8}$/\n if (isMob.test(value) || isPhone.test(value)) {\n callback();\n } else {\n callback(new Error(\"请输入正确格式的手机号码\"));\n }\n };\n return {\n loading: false,\n //初始化loading\n loadingMsg: \"\",\n row: {},\n validation: false,\n completeTitle: \"\",\n nav: \"\",\n ruleForm: {\n locationDec: \"\",\n orderTime: '',\n takeTime: \"\",\n name: \"\",\n orderTel: \"\",\n id: \"\"\n },\n rules: {\n name: [{\n required: true,\n message: \"请输入食堂名称\",\n trigger: \"blur\"\n }, {\n validator: valName,\n trigger: \"blur\"\n }],\n locationDec: [{\n required: true,\n message: \"请输入食堂所在位置\",\n trigger: \"blur\"\n }\n // { validator: valLoc, trigger: \"blur\" }\n ],\n orderTime: [{\n required: true,\n message: \"请输入订餐时间\",\n trigger: \"blur\"\n }],\n takeTime: [{\n required: true,\n message: \"请输入取餐时间\",\n trigger: \"blur\"\n }],\n orderTel: [{\n required: true,\n message: \"请输入预约电话\",\n trigger: \"blur\"\n }, {\n validator: orderTelRule,\n trigger: \"blur\"\n }]\n },\n dialogTableVisible: false,\n til: \"添加\",\n tableData: []\n };\n },\n mounted: function mounted() {\n this.createLoad();\n this.getlist();\n },\n methods: {\n mouseoverSpan: function mouseoverSpan(e) {\n outline(e);\n },\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 changeTime: function changeTime(val) {},\n Add: function Add() {\n this.dialogTableVisible = true;\n this.til = \"添加\";\n },\n getlist: function getlist() {\n var _this = this;\n var Content = {\n currentPage: 1\n };\n Canteen(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this.clearLoad();\n _this.tableData = res.returnData.data;\n _this.tableData.id = res.returnData.data.id;\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 closeDialog: function closeDialog() {\n this.ruleForm = {};\n this.$refs[\"ruleForm\"].resetFields();\n },\n handleUpdate: function handleUpdate(index, row) {\n this.til = \"编辑\";\n this.row = row;\n this.dialogTableVisible = true;\n this.ruleForm = {\n name: row.name,\n locationDec: row.location_dec,\n orderTime: row.order_time ? row.order_time : \"\",\n takeTime: row.take_time,\n orderTel: row.order_tel,\n id: row.id\n };\n },\n handleClick: function handleClick() {},\n closeDialogDel: function closeDialogDel(val) {\n var _this2 = this;\n this.createLoad();\n if (val == 1) {\n var Content = {\n id: this.row.id\n };\n DeleteCanteen(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this2.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this2.getlist();\n } else {\n _this2.clearLoad();\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n });\n } else if (val == 2) {\n var a;\n if (Array.isArray(this.ruleForm.orderTime)) {\n a = this.ruleForm.orderTime[0] + '-' + this.ruleForm.orderTime[1];\n } else if (typeof this.ruleForm.orderTime == 'string') {\n a = this.row.order_time;\n }\n var _Content = {\n locationDec: this.ruleForm.locationDec,\n orderTime: a,\n takeTime: this.ruleForm.takeTime,\n name: this.ruleForm.name,\n orderTel: this.ruleForm.orderTel,\n id: this.ruleForm.id\n };\n UpdataCanteen(_Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this2.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this2.getlist();\n // this.$refs['ruleForm'].resetFields()\n } else {\n _this2.clearLoad();\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n // this.$refs['ruleForm'].resetFields()\n }\n }).catch(function (err) {\n console.log(err);\n });\n setTimeout(function () {\n _this2.dialogTableVisible = false;\n }, 1000);\n } else if (val == 3) {\n var _Content2 = this.ruleForm;\n _Content2.orderTime = this.ruleForm.orderTime[0] + '-' + this.ruleForm.orderTime[1];\n AddCanteen(_Content2).then(function (res) {\n if (res.returnCode == \"1\") {\n _this2.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this2.getlist();\n // this.$refs['ruleForm'].resetFields()\n } else {\n _this2.clearLoad();\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n // this.$refs['ruleForm'].resetFields()\n }\n }).catch(function (err) {\n console.log(err);\n });\n setTimeout(function () {\n _this2.dialogTableVisible = false;\n }, 1000);\n }\n this.validation = false;\n },\n // 删除\n handleModifyStatus: function handleModifyStatus(row) {\n this.validation = true;\n this.completeTitle = \"删除\";\n this.nav = \"是否删除?\";\n this.row = row;\n },\n submitForm: function submitForm(formName) {\n var _this3 = this;\n var Content;\n // 添加食堂\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n _this3.validation = true;\n if (_this3.til == \"编辑\") {\n _this3.completeTitle = \"编辑\";\n _this3.nav = \"是否进行编辑?\";\n } else {\n _this3.completeTitle = \"添加\";\n _this3.nav = \"是否添加?\";\n }\n }\n });\n },\n resetForm: function resetForm(formName) {\n // this.$refs[formName].resetFields();\n this.dialogTableVisible = false;\n },\n handleDrag: function handleDrag() {\n // this.$refs.select.blur();\n }\n }\n};",null]}