{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\saftyDanger\\components\\CmgtSaftyDangerCheckplanFormDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\saftyDanger\\components\\CmgtSaftyDangerCheckplanFormDialog.vue","mtime":1686910374768},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _toConsumableArray from \"D:/jenkins/workspace/bzzgj-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 CmgtSaftyDangerCheckplanApi from '@/views/Manage/saftyDanger/api/CmgtSaftyDangerCheckplanApi';\nimport dictContracts from '@/components/dict/DictSelectUtils.js';\nimport moment from 'moment';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport nineLittlePlaceApi from '@/views/Manage/saftyDanger/api/nineLittlePlaceApi';\nimport CmgtSaftyDangerCheckplanFormDialogTroubleshooting from \"./CmgtSaftyDangerCheckplanFormDialogTroubleshooting.vue\";\nexport default {\n name: 'CmgtSaftyDangerCheckplanFormDialog',\n components: {\n CmgtSaftyDangerCheckplanFormDialogTroubleshooting: CmgtSaftyDangerCheckplanFormDialogTroubleshooting\n },\n props: {},\n data: function data() {\n return {\n title: '新增',\n showFormDia: false,\n activeCollapseNames: ['1'],\n params: {\n checkYearMonth: null,\n checkType: null,\n checkStartDate: null,\n checkEndDate: null,\n checkContent: null,\n checkName: null,\n deleteDetailsId: [],\n detail: []\n },\n rules: {\n checkName: [{\n required: true,\n message: '排查名称不能为空',\n trigger: 'blur'\n }],\n checkYearMonth: [{\n required: true,\n message: '排查月度不能为空',\n trigger: 'blur'\n }],\n checkType: [{\n required: true,\n message: '排查方式不能为空',\n trigger: 'blur'\n }],\n checkStartDate: [{\n required: true,\n message: '开始时间不能为空',\n trigger: 'blur'\n }],\n checkEndDate: [{\n required: true,\n message: '结束时间不能为空',\n trigger: 'blur'\n }],\n checkContent: [{\n required: true,\n message: '排查内容不能为空',\n trigger: 'blur'\n }]\n },\n units: [],\n unitData: [],\n dwlxList: []\n };\n },\n created: function created() {\n this.pcfsList = dictContracts.getDictItemsFromCache('pclb');\n this.dwlxList = dictContracts.getDictItemsFromCache('zhgl-dwlx'); // CmgtSaftyDangerCheckplanApi.loadAllUnit(res => {\n // \tthis.units = res\n // })\n },\n methods: {\n checkCompanyInput: function checkCompanyInput(index, val) {\n var _this = this;\n\n this.unitData.forEach(function (item) {\n if (val == item.id) {\n // console.log(item)\n _this.params.detail[index].type = item.type;\n }\n });\n },\n // 字典转义\n dictTranslation: function dictTranslation(dictList, value, dictValue, dictLabel) {\n for (var i = 0; i < dictList.length; i++) {\n if (dictList[i][dictValue] === value) {\n return dictList[i][dictLabel];\n }\n }\n },\n add: function add() {\n this.showFormDia = true;\n this.getUnit();\n },\n handleClose: function handleClose() {\n this.params = {\n checkYearMonth: null,\n checkType: null,\n checkStartDate: null,\n checkName: null,\n checkEndDate: null,\n checkContent: null,\n deleteDetailsId: [],\n detail: []\n };\n this.title = '新增';\n this.showFormDia = false;\n },\n //获取单位\n getUnit: function getUnit() {\n var _this2 = this;\n\n nineLittlePlaceApi.loadCmgtSaftyDangerUnit({\n pageBean: {\n pageSize: -1,\n page: 1\n }\n }, function (res) {\n _this2.total = res.total;\n _this2.unitData = res.rows;\n });\n },\n handleSave: function handleSave() {\n var _this3 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var method;\n\n if (!_this3.params.id) {\n // 新增\n method = CmgtSaftyDangerCheckplanApi.addCmgtSaftyDangerCheckplan;\n }\n\n if (_this3.params.id) {\n // 修改\n method = CmgtSaftyDangerCheckplanApi.editCmgtSaftyDangerCheckplan;\n }\n\n method(_this3.params, function (res) {\n if (res.state) {\n _this3.$notify({\n type: 'success',\n message: _this3.title + '成功',\n duration: 2000\n }); // this.$emit('loadData')\n\n\n _this3.$parent.loadData();\n\n _this3.handleClose();\n } else {\n _this3.$message.warning(response.message);\n }\n });\n }\n });\n },\n addTable: function addTable() {\n this.$refs.troubleshooting.add(); // this.$refs.singleTable.setCurrentRow(this.tableData[this.tableData.length - 1])\n },\n addDetail: function addDetail(list) {\n var _this4 = this;\n\n var arrList = [];\n list.forEach(function (item) {\n // 前端去重\n var boolenVal = _this4.params.detail.every(function (it) {\n return item.checkCompany !== it.checkCompany;\n });\n\n if (boolenVal) {\n arrList.push(item);\n }\n });\n this.params.detail = [].concat(_toConsumableArray(this.params.detail), arrList);\n },\n delTable: function delTable(index, row) {\n this.params.detail.splice(index, 1);\n\n if (row.id) {\n this.params.deleteDetailsId.push(row.id);\n }\n },\n Update: function Update(row) {\n var _this5 = this;\n\n this.getUnit();\n this.title = '修改';\n this.showFormDia = true;\n CmgtSaftyDangerCheckplanApi.getItemById(row.id, function (res) {\n _this5.params = res;\n _this5.params.deleteDetailsId = [];\n });\n }\n }\n};",null]}