{"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\\mainForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\reservoirManagement\\components\\mainForm-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/es6.regexp.to-string\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 dictUtils from '@/components/dict/DictSelectUtils.js';\nimport { mapState } from 'vuex';\nexport default {\n props: {\n rscd: {\n type: String,\n default: ''\n },\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 return {\n name: \"维修养护\",\n UploadData: {\n bizCode: \"ReservoirPdf\",\n bizId: this.rscd,\n bizType: \"\"\n },\n uploadUrl: window.context.portal + '/file/v1/uploadFileForConfig',\n // 服务器上传地址\n accept: '.pdf',\n previewUrl: window.context.portal + '/file/onlinePreviewController/v1/getFileById_',\n params: {\n rscd: null,\n rsnm: null,\n yhContent: null,\n yhDuty: null,\n yhEDate: null,\n yhLevel: '1',\n yhMoney: null,\n yhName: null,\n yhSDate: null,\n yhType: '1',\n yhUser: null,\n filePaths: null //文件路径\n\n },\n yhLevels: [{\n name: '高',\n value: '1'\n }, {\n name: '中',\n value: '2'\n }, {\n name: '低',\n value: '3'\n }],\n yhTypes: [{\n name: '日常养护',\n value: '1'\n }, {\n name: '专项养护',\n value: '2'\n }],\n fileList: [],\n waterList: [],\n rules: {\n yhName: [{\n required: true,\n message: '请输入护养名称',\n trigger: 'blur'\n }],\n yhType: [{\n required: true,\n message: '请输入护养类型',\n trigger: 'blur'\n }]\n }\n };\n },\n created: function created() {\n var _this = this;\n\n this.getWaters();\n this.getDetailInfo();\n this.getSysDict(); // 添加上传文件参数\n\n this.resPDF = dictUtils.getDictItemsFromCache('skPDFlx');\n console.log(this.resPDF);\n this.resPDF.forEach(function (res) {\n if (res.name == _this.name) {\n _this.UploadData.bizType = res.value;\n }\n });\n },\n computed: mapState({\n header: function header(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n methods: {\n handleClose: function handleClose() {\n this.params = {};\n this.$emit('closeFormDiao');\n },\n //获取水库\n getWaters: function getWaters() {\n var _this2 = this;\n\n reinforcement.getWater({}, function (res) {\n _this2.waterList = res.value;\n\n _this2.waterList.forEach(function (ee) {\n if (_this2.wId == ee.id) {\n _this2.params.rscd = ee.rscd;\n _this2.params.rsnm = ee.rsnm;\n }\n });\n });\n },\n beforeUpload: function beforeUpload(file) {\n return true;\n },\n uploadSuccess: function uploadSuccess(res) {\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 _this3 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this3.title === '新增') {\n var arr = JSON.parse(JSON.stringify(_this3.params));\n reinforcement.addSaveMain(_this3.params, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: '新增成功',\n duration: 2000\n });\n\n _this3.$emit('closeFormDiao');\n\n _this3.$emit('refList');\n } else {}\n });\n }\n\n if (_this3.title === '修改') {\n reinforcement.upDataMain(_this3.params, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000\n });\n\n _this3.$emit('closeFormDiao');\n\n _this3.$emit('refList');\n } else {}\n });\n }\n } else {\n return false;\n }\n });\n },\n //修改查询\n getDetailInfo: function getDetailInfo() {\n var _this4 = this;\n\n if (this.title === '修改') {\n reinforcement.detailIdMain(this.plId, function (res) {\n if (res.state) {\n _this4.params.rscd = res.value.rscd;\n _this4.params.rsnm = res.value.rsnm;\n _this4.params.yhContent = res.value.yhContent;\n _this4.params.yhDuty = res.value.yhDuty;\n _this4.params.yhEDate = res.value.yhEDate;\n _this4.params.yhLevel = res.value.yhLevel.toString();\n _this4.params.yhMoney = res.value.yhMoney;\n _this4.params.yhName = res.value.yhName;\n _this4.params.yhSDate = res.value.yhSDate;\n _this4.params.yhType = res.value.yhType;\n _this4.params.yhUser = res.value.yhUser;\n _this4.params.id = res.value.id;\n _this4.params.pkVal = res.value.pkVal;\n _this4.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 _this4.fileList.push({\n name: e.fileName,\n url: _this4.previewUrl + e.fileId\n });\n });\n }\n }\n });\n } else {}\n },\n //获取字典数据\n 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 }\n }\n};",null]}