{"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\\hiddenRecordsFormDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\saftyDanger\\components\\hiddenRecordsFormDialog.vue","mtime":1694568792046},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 SecurityFileApi from '@/views/Manage/saftyDanger/api/SecurityFileApi'\r\nimport CmgtSaftyDangerCheckrecordApi from '@/views/Manage/saftyDanger/api/CmgtSaftyDangerCheckrecordApi'\r\nimport dictContracts from '@/components/dict/DictSelectUtils.js'\r\nimport CmgtSaftyDangerCheckplanApi from '@/views/Manage/saftyDanger/api/CmgtSaftyDangerCheckplanApi'\r\nimport programApi from '@/views/Manage/saftyDanger/api/programApi'\r\nimport nineLittlePlaceApi from '@/views/Manage/saftyDanger/api/nineLittlePlaceApi'\r\nimport {mapState} from 'vuex'\r\nexport default {\r\n name: 'CmgtSaftyDangerCheckrecordFormDialog',\r\n components: {},\r\n props: {\r\n hiddenRecordsData: String\r\n },\r\n data() {\r\n return {\r\n title: '新增',\r\n showFormDia: false,\r\n dwdisabled: false,\r\n activeCollapseNames: ['1', '2', '3'],\r\n params: {\r\n checkschemeId: null,\r\n checkYear: null,\r\n unitType: null,\r\n unitName: null,\r\n unitId: null,\r\n unitAddress: null,\r\n recordName: null,\r\n unitUserphone: null,\r\n dangerType: null,\r\n greatDanger: null,\r\n checkDate: null,\r\n checkContent: null,\r\n leadUsername: null,\r\n checkUsername: null,\r\n status: null,\r\n reformUsername: null,\r\n reformUnitname: null,\r\n latestTimeLimit: null,\r\n latestReviewDate: null,\r\n completeDate: null,\r\n reformRequire: null,\r\n unitUsername: null,\r\n controlMemo: null,\r\n // reformContent: null,\r\n detail: []\r\n },\r\n types: [],\r\n units: [],\r\n schemeList: [],\r\n isFc: false,\r\n isAdd: true,\r\n disabledFc: false,\r\n dialogImageUrl: '',\r\n dialogVisible: false,\r\n disabled: false,\r\n uploadUrl: window.context.portal + '/file/v1/uploadFileForConfig', // 服务器上传地址\r\n previewUrl:\r\n window.context.portal + '/file/onlinePreviewController/v1/getFileById_',\r\n unitData: [],\r\n schemeList: [],\r\n aqyhlxList: [],\r\n yhztList: []\r\n }\r\n },\r\n created() {\r\n this.aqyhlxList = dictContracts.getDictItemsFromCache('cmgt_aqyhlx')\r\n this.dwlxList = dictContracts.getDictItemsFromCache('zhgl-dwlx')\r\n this.yhztList = dictContracts.getDictItemsFromCache('yhzt')\r\n this.yhztList.splice(4, 1)\r\n this.getScheme()\r\n this.getUnit()\r\n this.Checkrecord()\r\n\r\n // CmgtSaftyDangerCheckplanApi.loadAllUnit(res => {\r\n // \tthis.units = res\r\n // })\r\n },\r\n computed: mapState({\r\n header: state => {\r\n return {\r\n Authorization: `Bearer ${state.login.currentUser.token}`\r\n }\r\n }\r\n }),\r\n methods: {\r\n //隐患记录上半部分的主体信息\r\n Checkrecord() {\r\n SecurityFileApi.cmgtSaftyDangerCheckrecord(\r\n {\r\n groupRelation: 'AND',\r\n groupTree: {},\r\n pageBean: {\r\n page: 1,\r\n pageSize: -1,\r\n showTotal: true\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'unit_id_',\r\n relation: 'AND',\r\n value: this.hiddenRecordsData\r\n }\r\n ]\r\n },\r\n res => {\r\n console.log(res)\r\n res.rows.forEach(res => {\r\n console.log(res)\r\n this.params.id = res.id\r\n this.params.checkschemeId = res.checkschemeId\r\n this.params.checkYear = res.checkYear\r\n this.params.unitType = res.unitType\r\n this.params.unitName = res.unitName\r\n this.params.unitId = res.unitId\r\n this.params.unitAddress = res.unitAddress\r\n this.params.unitUserphone = res.unitUserphone\r\n this.params.dangerType = res.dangerType\r\n this.params.unitUsername = res.unitUsername\r\n\r\n // checkYear: \"2023\"\r\n // checkschemeId: \"1656109700611055616\"\r\n // detail: (2) [{…}, {…}]\r\n // id: \"1656205860709343232\"\r\n // isDele: \"0\"\r\n // latestReviewDate: \"2023-05-17\"\r\n // latestTimeLimit: 5\r\n // pkVal: \"1656205860709343232\"\r\n // recordName: \"test\"\r\n // status: \"2\"\r\n // unitAddress: \" \"\r\n // unitId: \"1654706218725285888\"\r\n // unitName: \"小杨\"\r\n // unitType: \"1\"\r\n // unitUsername: \" \"\r\n // unitUserphone: \" \"\r\n\r\n this.params.greatDanger = res.greatDanger\r\n this.params.checkDate = res.checkDate\r\n this.params.checkContent = res.checkContent\r\n this.params.leadUsername = res.leadUsername\r\n this.params.checkUsername = res.checkUsername\r\n this.params.recordName = res.recordName\r\n this.params.status = res.status\r\n this.params.reformUsername = res.reformUsername\r\n this.params.reformUnitname = res.reformUnitname\r\n this.params.latestTimeLimit = res.latestTimeLimit\r\n this.params.latestReviewDate = res.latestReviewDate\r\n this.params.completeDate = res.completeDate\r\n this.params.reformRequire = res.reformRequire\r\n this.params.controlMemo = res.controlMemo\r\n // this.params.reformContent = res.reformContent\r\n this.params.detail = res.detail\r\n this.params.detail.forEach(n => {\r\n if (n.imgs) {\r\n n.imgs.forEach(i => {\r\n console.log(i)\r\n i.url = this.previewUrl + i.id\r\n })\r\n }\r\n if (n.reformImgs) {\r\n n.reformImgs.forEach(r => {\r\n console.log(r)\r\n r.url = this.previewUrl + r.id\r\n })\r\n }\r\n })\r\n })\r\n }\r\n )\r\n },\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 }).then(res => {\r\n this.total = res.data.total\r\n this.unitData = res.data.rows\r\n }\r\n )\r\n },\r\n getScheme() {\r\n programApi.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.schemeList = res.rows\r\n }\r\n )\r\n },\r\n handleTarget(item) {\r\n let arr = this.unitData.filter(e => e.id == item)\r\n this.params.unitName = arr[0].unitName\r\n },\r\n handleAvatarSuccess(res, file, fileList, row) {\r\n // row.imgUrl=[]\r\n console.log(res, file, fileList, row)\r\n if (res.success) {\r\n let arr = []\r\n arr.push({\r\n id: res.fileId,\r\n type: 'danger',\r\n url: this.previewUrl + res.fileId\r\n })\r\n row.imgs = row.imgs.concat(arr)\r\n } else {\r\n this.$message.error('上传文件失败!')\r\n }\r\n },\r\n handleAvatarSuccess1(res, file, fileList, row) {\r\n // row.imgUrl=[]\r\n console.log(res, file, fileList, row)\r\n if (res.success) {\r\n let arr = []\r\n arr.push({\r\n id: res.fileId,\r\n type: 'reform',\r\n url: this.previewUrl + res.fileId\r\n })\r\n row.reformImgs = row.reformImgs.concat(arr)\r\n } else {\r\n this.$message.error('上传文件失败!')\r\n }\r\n },\r\n beforeAvatarUpload(file) {\r\n console.log(file)\r\n const isJPG =\r\n file.type === 'image/jpeg' ||\r\n file.type === 'image/png' ||\r\n file.type === 'image/jpg'\r\n const isLt1M = file.size / 1024 / 1024 < 10\r\n if (!isJPG) {\r\n this.$message.error('上传图片只能是 JPG 格式!')\r\n }\r\n if (!isLt1M) {\r\n this.$message.error('上传图片大小不能超过 1MB!')\r\n }\r\n return isJPG && isLt1M\r\n },\r\n\r\n beforeAvatarUpload(file) {\r\n const isJPG =\r\n file.type === 'image/jpeg' ||\r\n file.type === 'image/png' ||\r\n file.type === 'image/jpg'\r\n const isLt10M = file.size / 1024 / 1024 < 10\r\n if (!isJPG) {\r\n this.$message.error('上传图片只能是 JPG 格式!')\r\n }\r\n if (!isLt10M) {\r\n this.$message.error('上传图片大小不能超过 10MB!')\r\n }\r\n return isJPG && isLt10M\r\n },\r\n handleRemove(file, fileList, row) {\r\n row.imgs.forEach(e => {\r\n if (e.id == file.fileId) {\r\n row.imgs.splice(e, 1)\r\n }\r\n })\r\n },\r\n handleRemove1(file, fileList, row) {\r\n row.reformImgs.forEach(e => {\r\n if (e.id == file.fileId) {\r\n row.reformImgs.splice(e, 1)\r\n }\r\n })\r\n },\r\n handlePictureCardPreview(file) {\r\n // this.dialogImageUrl = file.url\r\n this.dialogVisible = true\r\n },\r\n handleDownload(file) {\r\n CmgtSaftyDangerCheckrecordApi.downloadFile(file.fileId)\r\n }\r\n }\r\n}\r\n",null]}