{"remainingRequest":"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\\programDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\saftyDanger\\components\\programDialog.vue","mtime":1687342878005},{"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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport programApi from '@/views/Manage/saftyDanger/api/programApi'\r\nimport dictContracts from '@/components/dict/DictSelectUtils.js'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport CmgtSaftyDangerCheckplanApi from '@/views/Manage/saftyDanger/api/CmgtSaftyDangerCheckplanApi'\r\nimport nineLittlePlaceApi from '@/views/Manage/saftyDanger/api/nineLittlePlaceApi'\r\nimport CmgtSaftyDangerCheckplanFormDialogTroubleshooting from './CmgtSaftyDangerCheckplanFormDialogTroubleshooting.vue'\r\nexport default {\r\n name: 'CmgtSaftyDangerUnitFormDialog',\r\n components: {CmgtSaftyDangerCheckplanFormDialogTroubleshooting},\r\n props: {},\r\n data() {\r\n return {\r\n title: '新增',\r\n showFormDia: false,\r\n activeCollapseNames: ['1'],\r\n emphasisType: [],\r\n params: {\r\n checkplanId: null,\r\n checkYearMonth: null,\r\n checkType: null,\r\n schemeName: null,\r\n\r\n startDate: null,\r\n endDate: null,\r\n status: '1',\r\n workTargetContent: null,\r\n members: null,\r\n participant: null,\r\n sponsor: null,\r\n participantCompany: null,\r\n notes: null,\r\n pubState: 1,\r\n deleteDetailsId: [],\r\n detail: []\r\n },\r\n rules: {\r\n schemeName: [\r\n {\r\n required: true,\r\n message: '排查方案名称不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n checkplanId: [\r\n {\r\n required: true,\r\n message: '排查计划不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n status: [\r\n {\r\n required: true,\r\n message: '方案执行状态不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n checkYearMonth: [\r\n {\r\n required: true,\r\n message: '排查月度不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n checkType: [\r\n {\r\n required: true,\r\n message: '排查方式不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n startDate: [\r\n {\r\n required: true,\r\n message: '开始时间不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n endDate: [\r\n {\r\n required: true,\r\n message: '结束时间不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n workTargetContent: [\r\n {\r\n required: true,\r\n message: '工作目标描述不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n members: [\r\n {\r\n required: true,\r\n message: '检查组织机构及成员描述不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n participant: [\r\n {\r\n required: true,\r\n message: '检查区域和对象描述不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n sponsor: [\r\n {\r\n required: true,\r\n message: '检查方式与内容不能为空',\r\n trigger: 'blur'\r\n }\r\n ],\r\n participantCompany: [\r\n {\r\n required: true,\r\n message: '检查要求不能为空',\r\n trigger: 'blur'\r\n }\r\n ]\r\n // notes: [\r\n // {\r\n // required: true,\r\n // message: '注意事项描述不能为空',\r\n // trigger: 'blur'\r\n // }\r\n // ]\r\n },\r\n // levels: [],\r\n types: [],\r\n unitData: [],\r\n planList: []\r\n }\r\n },\r\n created() {\r\n // this.types = dictContracts.getDictItemsFromCache('cmgt_aqyhpcdwlb')\r\n // this.fxjbList = dictUtils.getDictItemsFromCache('fxjb') //风险级别\r\n // this.zddwflList = dictUtils.getDictItemsFromCache('zddwfl') //重点单位分类\r\n // this.jxcslxList = dictUtils.getDictItemsFromCache('jxcslx') //九小场所类型\r\n // this.jxcspqList = dictUtils.getDictItemsFromCache('jxcspq') //九小场所片区\r\n // this.rlzlList = dictUtils.getDictItemsFromCache('rlzl') //燃料种类\r\n // this.tysfList = dictUtils.getDictItemsFromCache('ty-sf') //是否三合一\r\n // this.aqyhlxList = dictUtils.getDictItemsFromCache('cmgt_aqyhlx') //安全隐患\r\n this.dwlxList = dictContracts.getDictItemsFromCache('zhgl-dwlx')\r\n this.pclbList = dictContracts.getDictItemsFromCache('pclb')\r\n this.pcztList = dictContracts.getDictItemsFromCache('pczt')\r\n this.fazxztList = dictContracts.getDictItemsFromCache('fazxzt')\r\n this.faztList = dictContracts.getDictItemsFromCache('fazt')\r\n },\r\n methods: {\r\n DangerCheckplan(item) {\r\n // console.log(item)\r\n // programApi.cmgtSaftyDangerCheckplanUnit(\r\n // {\r\n // groupTree: {},\r\n // pageBean: {\r\n // page: -1,\r\n // pageSize: 10\r\n // },\r\n // params: {},\r\n // querys: [],\r\n // sorter: [\r\n // {\r\n // direction: 'ASC',\r\n // property: ''\r\n // }\r\n // ]\r\n // },\r\n // res => {\r\n // console.log(res)\r\n // }\r\n // )\r\n programApi.cmgtSaftyDangerCheckschemeID(item, res => {\r\n console.log(res)\r\n this.params.checkYearMonth = res.checkYearMonth\r\n this.params.startDate = res.checkStartDate\r\n this.params.endDate = res.checkEndDate\r\n this.params.sponsor = res.checkContent\r\n this.params.checkType = res.checkType\r\n this.params.detail = res.detail\r\n this.params.detail.forEach(it => {\r\n it.id = null\r\n })\r\n })\r\n },\r\n checkplanIdChange(item) {\r\n this.DangerCheckplan(item)\r\n },\r\n add() {\r\n this.showFormDia = true\r\n this.getUnit()\r\n this.getPlan()\r\n },\r\n getUnit() {\r\n nineLittlePlaceApi.loadCmgtSaftyDangerUnit(\r\n {\r\n pageBean: {\r\n pageSize: -1,\r\n page: 1\r\n }\r\n },\r\n res => {\r\n this.total = res.total\r\n this.unitData = res.rows\r\n }\r\n )\r\n },\r\n getPlan() {\r\n CmgtSaftyDangerCheckplanApi.loadCmgtSaftyDangerCheckplan(\r\n {\r\n pageBean: {\r\n pageSize: -1,\r\n page: 1\r\n }\r\n },\r\n res => {\r\n this.total = res.total\r\n this.planList = res.rows\r\n }\r\n )\r\n },\r\n // 字典转义\r\n dictTranslation(dictList, value, dictValue, dictLabel) {\r\n for (var i = 0; i < dictList.length; i++) {\r\n if (dictList[i][dictValue] === value) {\r\n return dictList[i][dictLabel]\r\n }\r\n }\r\n },\r\n handleClose() {\r\n this.params = {\r\n checkplanId: null,\r\n checkYearMonth: null,\r\n checkType: null,\r\n startDate: null,\r\n endDate: null,\r\n status: null,\r\n workTargetContent: null,\r\n members: null,\r\n schemeName: null,\r\n participant: null,\r\n sponsor: null,\r\n participantCompany: null,\r\n notes: null,\r\n pubState: 1,\r\n deleteDetailsId: [],\r\n detail: []\r\n }\r\n this.$refs.formInfo.clearValidate()\r\n this.title = '新增'\r\n this.showFormDia = false\r\n },\r\n handleSave() {\r\n this.$refs.formInfo.validate(valid => {\r\n if (valid) {\r\n let method\r\n if (!this.params.id) {\r\n // 新增\r\n method = programApi.addCmgtSaftyDangerUnit\r\n }\r\n if (this.params.id) {\r\n // 修改\r\n method = programApi.editCmgtSaftyDangerUnit\r\n }\r\n method(this.params, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: this.title + '成功',\r\n duration: 2000\r\n })\r\n // this.$emit('loadData')\r\n this.$parent.loadData()\r\n this.handleClose()\r\n } else {\r\n this.$message.warning(res.message)\r\n }\r\n })\r\n }\r\n })\r\n },\r\n addTable() {\r\n this.$refs.troubleshooting.add()\r\n },\r\n addDetail(list) {\r\n let arrList = []\r\n list.forEach(item => {\r\n // 前端去重\r\n let boolenVal = this.params.detail.every(it => {\r\n return item.checkCompany !== it.checkCompany\r\n })\r\n if (boolenVal) {\r\n item.checkContent = this.params.sponsor\r\n arrList.push(item)\r\n }\r\n })\r\n this.params.detail = [...this.params.detail, ...arrList]\r\n },\r\n delTable(index, row) {\r\n this.params.detail.splice(index, 1)\r\n if (row.id) {\r\n this.params.deleteDetailsId.push(row.id)\r\n }\r\n },\r\n Update(row) {\r\n this.title = '修改'\r\n this.getUnit()\r\n this.getPlan()\r\n this.showFormDia = true\r\n programApi.getItemById(row.id, res => {\r\n this.params.id = res.id\r\n this.params.checkplanId = res.checkplanId\r\n this.params.checkYearMonth = res.checkYearMonth\r\n this.params.checkType = res.checkType\r\n this.params.startDate = res.startDate\r\n this.params.endDate = res.endDate\r\n this.params.status = res.status\r\n this.params.workTargetContent = res.workTargetContent\r\n this.params.members = res.members\r\n this.params.participant = res.participant\r\n this.params.sponsor = res.sponsor\r\n this.params.participantCompany = res.participantCompany\r\n this.params.notes = res.notes\r\n this.params.detail = res.detail\r\n this.params.pubState = res.pubState\r\n this.params.schemeName = res.schemeName\r\n this.$set(this.params)\r\n })\r\n }\r\n }\r\n}\r\n",null]}