{"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\\seekmedical\\addSeekMedicalDetail\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\seekmedical\\addSeekMedicalDetail\\index.vue","mtime":1737610069447},{"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 _toConsumableArray from \"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 Paging from \"@/views/Public/paging.vue\";\nimport { getparentdata as _getparentdata, createSeekMedicalInfo, modifySeekMedicalInfo } from \"@/api/getdata\";\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 var titleVa = function titleVa(rule, value, callback) {\n var reg = /[`~!@#$%^&*_\\-+=<>?:\"{}|,./;'\\\\[\\]·~!@#¥%……&*——\\-+={}|《》?:“”【】、;‘’,。、]/g;\n if (!reg.test(value)) {\n callback();\n } else {\n callback(new Error(\"不支持输入@#¥%……...等特殊字符 !\"));\n }\n };\n return {\n loading: false,\n //初始化loading\n loadingMsg: \"\",\n row: {},\n fileList: [],\n validation: false,\n completeTitle: \"删除\",\n nav: \"是否删除?\",\n til: \"添加\",\n days: [],\n ruleForm: {\n project_name: \"\",\n parent_id: \"\",\n project_day: \"\",\n project_tips: ''\n },\n parentdata: [],\n page: {\n limit: 0 /** 当前点击*/,\n sizePage: 10 /** 当前多少页*/,\n total: 0 /**总数 */\n },\n downloadLoading: false,\n rules: {\n project_name: [{\n required: true,\n message: \"请输入分项名称\",\n trigger: \"blur\"\n }, {\n validator: titleVa,\n trigger: \"blur\"\n }],\n parent_id: [{\n required: true,\n message: \"请选择项目\",\n trigger: \"blur\"\n }]\n }\n };\n },\n mounted: function mounted() {\n var data = typeof this.$route.query.rowdata == \"string\" ? JSON.parse(window.localStorage.getItem(\"seekmedicalInfoRowdata\")) : this.$route.query.rowdata;\n this.ruleForm.project_name = data ? data.project_name : \"\";\n this.ruleForm.parent_id = data ? data.parent_id : '';\n this.ruleForm.project_day = data ? data.project_day : '';\n this.days = data ? _toConsumableArray(data.project_day || []).filter(function (x) {\n return x != ',';\n }) : [];\n this.ruleForm.project_tips = data ? data.project_tips : '';\n this.til = data ? data.til : \"添加\";\n this.id = data ? data.id : \"\";\n this.getparentdata();\n },\n methods: {\n getparentdata: function getparentdata() {\n var _this = this;\n _getparentdata().then(function (res) {\n if (res.returnCode == \"1\") {\n _this.parentdata = res.returnData.data.filter(function (x) {\n return x.id.length != 0;\n });\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n });\n },\n /**返回上一级 */comeBack: function comeBack() {\n this.$router.push({\n path: \"seekmedical-index\",\n params: {\n index: this.indexCall\n }\n });\n },\n resetForm: function resetForm(formName) {\n if (!this.view) {\n this.$refs[formName].resetFields();\n }\n this.$router.push({\n path: \"seekmedical-index\",\n params: {\n index: this.indexCall\n }\n });\n this.$message({\n message: \"取消成功\",\n type: \"success\",\n duration: 800\n });\n },\n submitForm: function submitForm(formName, idx) {\n var _this2 = this;\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n if (_this2.til == \"编辑\") {\n _this2.validation = true;\n _this2.completeTitle = \"编辑\";\n _this2.nav = \"是否编辑?\";\n } else {\n _this2.validation = true;\n _this2.completeTitle = \"添加\";\n _this2.nav = \"是否添加?\";\n }\n }\n });\n // this.ruleForm.status = idx\n },\n closeDialogDel: function closeDialogDel(val) {\n var _this3 = this;\n if (val == \"2\") {\n var Content = {\n id: this.id,\n project_name: this.ruleForm.project_name,\n parent_id: this.ruleForm.parent_id,\n project_day: this.days.join(','),\n project_tips: this.ruleForm.project_tips\n };\n modifySeekMedicalInfo(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this3.$router.push({\n path: \"seekmedical-index\",\n params: {\n index: _this3.indexCall\n }\n });\n } else {\n _this3.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n } else if (val == \"3\") {\n var _Content = {\n project_name: this.ruleForm.project_name,\n parent_id: this.ruleForm.parent_id,\n project_day: this.days.join(','),\n project_tips: this.ruleForm.project_tips\n };\n createSeekMedicalInfo(_Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n if (_this3.completeTitle == \"添加\") {\n _this3.$router.push({\n path: \"seekmedical-index\",\n params: {\n index: 1\n }\n });\n }\n } else {\n _this3.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n }\n // this.$refs[\"ruleForm\"].resetFields();\n this.validation = false;\n },\n mouseoverSpan: function mouseoverSpan(e) {\n if (e.target.scrollWidth > e.target.offsetWidth) {\n e.target.setAttribute(\"class\", \"cell-box span-overflow\");\n }\n },\n bs64: function bs64(_bs) {\n var reader = new FileReader();\n reader.readAsDataURL(_bs);\n return new Promise(function (resolve) {\n reader.onload = function (e) {\n resolve(e.target.result);\n };\n });\n },\n formatJson: function formatJson(filterVal, jsonData) {\n return jsonData.map(function (v) {\n return filterVal.map(function (j) {\n if (j === \"timestamp\") {\n return parseTime(v[j]);\n } else {\n return v[j];\n }\n });\n });\n }\n }\n};",null]}