{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\reservoirManagement\\components\\conForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\reservoirManagement\\components\\conForm-dialog.vue","mtime":1684458239512},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/bbsl-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nvar _methods;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 req from '@/request.js';\nimport reinforcement from '@/api/reservoirManagement/resFrom.js';\nimport { mapState } from 'vuex';\nexport default {\n props: {\n showFormDia: {\n type: Boolean,\n default: false\n },\n title: {\n type: String,\n default: ''\n },\n wId: {\n type: String,\n default: ''\n },\n plId: {\n type: String,\n default: ''\n }\n },\n data: function data() {\n var _ref;\n\n return _ref = {\n uploadUrl: window.context.portal + '/file/v1/upload',\n // 服务器上传地址\n accept: '.pdf',\n previewUrl: window.context.portal + '/file/onlinePreviewController/v1/getFileById_',\n params: {\n rscd: null,\n rsnm: null,\n planAbstract: null,\n planTitle: null,\n weaveCompany: null,\n weaveDate: null,\n approvalCompany: null,\n approvalDate: null,\n filePaths: null //文件路径\n\n },\n fileList: [],\n waterList: []\n }, _defineProperty(_ref, \"previewUrl\", window.context.portal + '/file/onlinePreviewController/v1/getFileById_'), _defineProperty(_ref, \"rules\", {\n yhName: [{\n required: true,\n message: '请输入护养名称',\n trigger: 'blur'\n }],\n yhType: [{\n required: true,\n message: '请输入护养类型',\n trigger: 'blur'\n }]\n }), _ref;\n },\n created: function created() {\n this.getWaters();\n this.getDetailInfo();\n this.getSysDict();\n },\n computed: mapState({\n header: function header(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n methods: (_methods = {\n handleClose: function handleClose() {\n this.params = {};\n this.$emit('closeFormDiao');\n },\n //获取水库\n getWaters: function getWaters() {\n var _this = this;\n\n reinforcement.getWater({}, function (res) {\n _this.waterList = res.value;\n\n _this.waterList.forEach(function (ee) {\n if (_this.wId == ee.id) {\n _this.params.rscd = ee.rscd;\n _this.params.rsnm = ee.rsnm;\n }\n });\n });\n },\n beforeUpload: function beforeUpload(file) {\n return true;\n },\n uploadSuccess: function uploadSuccess(res) {\n console.log(res);\n\n if (res) {\n var arr = [];\n arr.push({\n fileName: res.fileName,\n fileId: res.fileId\n });\n this.params.filePaths = JSON.stringify(arr);\n } else {\n // 提示信息,需引入Message\n this.$message.error('上传失败!');\n }\n },\n //保存\n goInfo: function goInfo(e) {\n var _this2 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this2.title === '新增') {\n var arr = JSON.parse(JSON.stringify(_this2.params));\n reinforcement.addSaveCon(_this2.params, function (response) {\n if (response.state) {\n _this2.$notify({\n type: 'success',\n message: '新增成功',\n duration: 2000\n });\n\n _this2.$emit('closeFormDiao');\n\n _this2.$emit('refList');\n } else {}\n });\n }\n\n if (_this2.title === '修改') {\n reinforcement.upDataCon(_this2.params, function (response) {\n if (response.state) {\n _this2.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000\n });\n\n _this2.$emit('closeFormDiao');\n\n _this2.$emit('refList');\n } else {}\n });\n }\n } else {\n return false;\n }\n });\n }\n }, _defineProperty(_methods, \"handleClose\", function handleClose() {\n this.params = {};\n this.$emit('closeFormDiao');\n }), _defineProperty(_methods, \"getDetailInfo\", function getDetailInfo() {\n var _this3 = this;\n\n if (this.title === '修改') {\n reinforcement.detailIdCon(this.plId, function (res) {\n if (res.state) {\n _this3.params.rscd = res.value.rscd;\n _this3.params.rsnm = res.value.rsnm;\n _this3.params.planAbstract = res.value.planAbstract;\n _this3.params.planTitle = res.value.planTitle;\n _this3.params.planTitle = res.value.planTitle;\n _this3.params.weaveDate = res.value.weaveDate;\n _this3.params.approvalCompany = res.value.approvalCompany;\n _this3.params.approvalDate = res.value.approvalDate;\n _this3.params.id = res.value.id;\n _this3.params.pkVal = res.value.pkVal;\n _this3.params.filePaths = res.value.filePaths;\n var aaa = JSON.parse(res.value.filePaths);\n\n if (res.value.filePaths) {\n aaa.forEach(function (e) {\n _this3.fileList.push({\n name: e.fileName,\n url: _this3.previewUrl + e.fileId\n });\n });\n }\n }\n });\n } else {}\n }), _defineProperty(_methods, \"getSysDict\", function getSysDict() {\n var portal = window.context.portal;\n return new Promise(function (resolve, reject) {\n req.post(portal + '/sys/sysDictionary/v1/queryAllDictItems').then(function (response) {\n resolve(response.data);\n }, function (error) {\n reject(error);\n });\n });\n }), _methods)\n};",null]}