{"remainingRequest":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\damDance-fvue\\src\\views\\PendingDisposal\\components\\SurvivalEventDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\damDance-fvue\\src\\views\\PendingDisposal\\components\\SurvivalEventDialog.vue","mtime":1701739983669},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\damDance-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\r\nimport {\r\n mapState\r\n} from 'vuex'\r\nimport utils from '@/utils.js'\r\nimport { TableMixin } from '@/mixins/tableMixin'\r\nimport TreatedEventListDialog from './TreatedEventListDialog'\r\nimport SurvivalEvent from '@/api/PendingDisposal/SurvivalEvent'\r\nimport PlazaLocation from '@/api/basicConfiguration/PlazaLocation'\r\nimport TodoEvents from '@/api/PendingDisposal/TodoEvents'\r\nimport Team from '@/api/basicConfiguration/Team'\r\nimport Personal from '@/api/basicConfiguration/Personal'\r\n\r\nimport IntelligentDevice from '@/api/basicConfiguration/IntelligentDevice'\r\n\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport bigScreenAPI from '@/api/BigScreen/index.js'\r\n\r\nexport default {\r\n mixins: [TableMixin],\r\n\r\n props: {},\r\n name: 'SurvivalEventDialog',\r\n components: { TreatedEventListDialog },\r\n data() {\r\n return {\r\n uploadUrl: window.context.portal + '/file/v1/fileUpload', // 服务器上传地址\r\n accept: '.xls,.docx,.docm,.doc,.dotx,.pptx,.pptm,.ppt,.pdf,.xps,.potx,.txt,.xls,.xlsx,.xps,.zip,.rar,.7z',\r\n fileList: [],\r\n activeName: 'first',\r\n activeSubTab: 'sub-tab-1',\r\n visible: false,\r\n loading: false,\r\n openType: '详细信息',\r\n rules: {\r\n personList: [\r\n {\r\n required: true,\r\n message: '请选择处置人',\r\n trigger: 'blur',\r\n },\r\n ],\r\n taskStatus: [\r\n {\r\n required: true,\r\n message: '请选择是否办结',\r\n trigger: 'blur',\r\n },\r\n ],\r\n disposedObjects: [\r\n {\r\n required: true,\r\n message: '请选择被处置对象',\r\n trigger: 'blur',\r\n },\r\n ],\r\n result: [\r\n {\r\n required: true,\r\n message: '请输入处理结果',\r\n trigger: 'blur',\r\n },\r\n ],\r\n address: [\r\n {\r\n type: 'date',\r\n required: true,\r\n message: '请选择地址',\r\n trigger: 'blur',\r\n },\r\n ],\r\n },\r\n basicsData: {},\r\n options: [],\r\n noiseOptions: [],\r\n noise: [],\r\n areaCode: [],\r\n taskList: [],\r\n handleType: '1',\r\n orgTreeList: [],\r\n eventArchiving: [],\r\n\r\n historyDataTemp: [\r\n ],\r\n formData: {\r\n // taskStatus: '',//办结状态\r\n id: null,\r\n processType: '1',//\r\n result: '',//处置结果\r\n taskStatus: '',\r\n filePath: [],//文件路径\r\n //处理人信息\r\n personList: [{\r\n processDeptId: '',//处置人单位ID\r\n processDeptName: '',//处置人单位名称\r\n processOrgCode: '',//上级处置单位编码\r\n processOrgId: '',//处置单位ID\r\n processOrgName: '',//处置单位名称\r\n processPersonAccount: '',//处置人员账号\r\n processPersonId: '',//处置人员ID\r\n processPersonName: '',//处置人姓名\r\n // processType: '',//处置方式\r\n }],\r\n disposedObjects: [\r\n {\r\n type: '1',\r\n disposedObjectId: ''\r\n }\r\n ]\r\n },\r\n activities: [\r\n\r\n ],\r\n xboptions: [],\r\n processDepLsit: [],\r\n dxlxList: [],\r\n bjztList: [],\r\n teamList: [],\r\n personageList: [],\r\n squareList: [],\r\n btnLoading:false,\r\n url: '',\r\n srcList: [],\r\n }\r\n },\r\n created() {\r\n this.dxlxList = dictUtils.getDictItemsFromCache('dxlx')\r\n this.bjztList = dictUtils.getDictItemsFromCache('bj_bjzt')\r\n this.formData.taskStatus = this.bjztList[0].value\r\n this.getNoiseTree()\r\n this.getTownTree()\r\n this.getOrgTree()\r\n this.getMember()\r\n this.getFilling()\r\n this.getPlazaLocation()\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 currentUserDetail: state => state.user.currentUserDetail\r\n\r\n }),\r\n methods: {\r\n open(data, type) {\r\n console.log(type);\r\n this.activeName = 'first'\r\n if (data) {\r\n this.getTaskList(data.id)\r\n SurvivalEvent.detailId(data.id, res => {\r\n this.basicsData = res\r\n\r\n\r\n console.log(this.basicsData);\r\n\r\n this.formData.id = data.id\r\n this.areaCode = res.areaFullCode ? res.areaFullCode.split('/').splice(1) : []\r\n if (res.noiseLevelId && res.noiseTypeId) {\r\n this.noise = [res.noiseTypeId, res.noiseLevelId]\r\n } else if (res.noiseTypeId) {\r\n this.noise = [res.noiseTypeId]\r\n } else {\r\n this.noise = []\r\n }\r\n if (type == 'detail') {\r\n this.openType = '详细信息'\r\n } else {\r\n this.openType = '更新事件'\r\n if (this.basicsData && this.basicsData.processDetails) {\r\n console.log(this.basicsData.processDetails);\r\n if (this.basicsData.processDetails && this.basicsData.processDetails.length > 0) {\r\n let arr = [this.basicsData.processDetails[this.basicsData.processDetails.length - 2]]\r\n console.log(arr);\r\n if(arr[0]&&arr[0].disposedObjects&&arr[0].personList){\r\n this.formData.disposedObjects = arr[0].disposedObjects\r\n this.formData.disposedObjects.forEach(e => {\r\n delete e.id\r\n })\r\n this.formData.personList = arr[0].personList\r\n this.formData.personList.forEach(pe => {\r\n delete pe.id\r\n })\r\n }\r\n \r\n } else {\r\n // this.formData.disposedObjects[{\r\n // type: '1',\r\n // disposedObjectId: ''\r\n // }]\r\n }\r\n\r\n\r\n\r\n }\r\n }\r\n })\r\n }\r\n\r\n this.visible = true\r\n },\r\n //获取广场舞地点\r\n getPlazaLocation() {\r\n IntelligentDevice.plazaQuery({\r\n pageBean: {\r\n page: 1, pageSize: -1\r\n }\r\n }, res => {\r\n this.squareList = res.rows\r\n })\r\n },\r\n //噪音标准\r\n getNoiseTree() {\r\n PlazaLocation.getNoise({}, res => {\r\n if (res.state) {\r\n this.noiseOptions = res.value\r\n }\r\n })\r\n },\r\n\r\n //行政区划\r\n getTownTree() {\r\n SurvivalEvent.getbaseAreaTree({}, res => {\r\n if (res.state) {\r\n this.options = res.value\r\n }\r\n })\r\n },\r\n //流程\r\n getTaskList(id) {\r\n SurvivalEvent.taskList(id, res => {\r\n this.taskList = res\r\n }\r\n )\r\n },\r\n findDispose(data, value) {\r\n let arr = []\r\n if (data && data.length > 0) {\r\n for (let obj of data) {\r\n if (value === 'processDeptName') {\r\n if (obj[value] != '') {\r\n arr.push(obj[value])\r\n } else {\r\n arr.push(obj.processOrgName)\r\n }\r\n } else {\r\n arr.push(obj[value])\r\n\r\n }\r\n }\r\n }\r\n\r\n\r\n return arr.join(',');\r\n },\r\n //递归查询\r\n findObjectById(data, id) {\r\n // 遍历数据中的每个对象\r\n for (let obj of data) {\r\n // 如果当前对象的id匹配目标id,则返回该对象\r\n if (obj.id === id) {\r\n return obj;\r\n }\r\n // 如果当前对象有子对象,则递归调用findObjectById进行子树搜索\r\n if (obj.children && obj.children.length > 0) {\r\n const result = this.findObjectById(obj.children, id);\r\n // 如果在子树中找到了匹配的对象,则返回该对象\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n }\r\n // 如果整个树都搜索完毕都没有找到匹配的对象,则返回null\r\n return null;\r\n },\r\n //组织树\r\n getOrgTree() {\r\n TodoEvents.orgTree(res => {\r\n this.processDepLsit = res\r\n })\r\n },\r\n //切换选取还是录入\r\n handleToggle(row) {\r\n row.toggle = row.toggle === '1' ? '2' : '1'\r\n },\r\n //个人 \r\n getMember() {\r\n Personal.dataQuery({ pageBean: { page: 1, pageSize: -1 } }, res => {\r\n if (res.rows) {\r\n this.personageList = res.rows\r\n }\r\n })\r\n },\r\n //团队 \r\n getFilling() {\r\n Team.dataQuery({ pageBean: { page: 1, pageSize: -1 } }, res => {\r\n if (res.rows) {\r\n this.teamList = res.rows\r\n }\r\n })\r\n },\r\n //用户\r\n getOrgUserQuery(val) {\r\n //当前选中数据\r\n let nodesObj = this.$refs['cascader'].getCheckedNodes()[0].data\r\n let ogn\r\n let dept\r\n if (nodesObj.orgKind === 'user') {\r\n //父级数据\r\n dept = this.findObjectById(this.processDepLsit, val[val.length - 2])\r\n if (dept.orgKind == 'ogn') {\r\n this.formData.personList[0].processFullId = JSON.stringify(val)\r\n this.formData.personList[0].processDeptId = ''\r\n this.formData.personList[0].processDeptName = ''\r\n this.formData.personList[0].processOrgCode = dept.code\r\n this.formData.personList[0].processOrgId = dept.id\r\n this.formData.personList[0].processOrgName = dept.name\r\n } else if (dept.orgKind == 'dept') {\r\n ogn = this.findObjectById(this.processDepLsit, val[val.length - 3])\r\n this.formData.personList[0].processFullId = JSON.stringify(val)\r\n this.formData.personList[0].processDeptId = dept.id\r\n this.formData.personList[0].processDeptName = dept.name\r\n this.formData.personList[0].processOrgCode = ogn.code\r\n this.formData.personList[0].processOrgId = ogn.id\r\n this.formData.personList[0].processOrgName = ogn.name\r\n }\r\n this.formData.personList[0].processPersonAccount = nodesObj.code\r\n this.formData.personList[0].processPersonId = nodesObj.id\r\n this.formData.personList[0].processPersonName = nodesObj.name\r\n } else if (nodesObj.orgKind === 'dept') {\r\n ogn = this.findObjectById(this.processDepLsit, val[val.length - 2])\r\n this.formData.personList[0].processFullId = JSON.stringify(val)\r\n this.formData.personList[0].processDeptId = nodesObj.id\r\n this.formData.personList[0].processDeptName = nodesObj.name\r\n this.formData.personList[0].processOrgCode = ogn.code\r\n this.formData.personList[0].processOrgId = ogn.id\r\n this.formData.personList[0].processOrgName = ogn.name\r\n } else if (nodesObj.orgKind === 'ogn') {\r\n this.formData.personList[0].processFullId = JSON.stringify(val)\r\n this.formData.personList[0].processOrgCode = nodesObj.code\r\n this.formData.personList[0].processOrgId = nodesObj.id\r\n this.formData.personList[0].processOrgName = nodesObj.name\r\n }\r\n },\r\n uploadSuccess(res) {\r\n if (res) {\r\n this.formData.filePath.push({\r\n fileId: res.fileId,\r\n fileName: res.fileName\r\n })\r\n } else {\r\n this.$message.error('上传失败!')\r\n }\r\n },\r\n beforeUpload(file) {\r\n return true\r\n },\r\n beforeRemove(file, fileList) {\r\n this.formData.filePath.forEach((e, index) => {\r\n if (e.fileId == file.response.fileId) {\r\n this.formData.filePath.splice(index, 1)\r\n }\r\n })\r\n },\r\n //添加被处置\r\n handleAdd(row, index) {\r\n this.formData.disposedObjects.push({\r\n type: '',\r\n disposedObjectId: ''\r\n })\r\n },\r\n //删除被处置\r\n handleDelete(row, index) {\r\n this.formData.disposedObjects.splice(index, 1)\r\n },\r\n handleTypes(val) {\r\n val.disposedObjectId = ''\r\n },\r\n //个人选中\r\n handlePersonage(val, e) {\r\n val.disposedObjectName = e\r\n val.age = ''\r\n val.areaCode = ''\r\n val.detailAddress = ''\r\n val.idcard = ''\r\n val.phone = ''\r\n val.sex = ''\r\n val.eventId = this.formData.id\r\n this.personageList.forEach(e => {\r\n if (e.id === val.disposedObjectId) {\r\n val.disposedObjectName = e.name\r\n val.age = e.age\r\n val.areaCode = e.areaCode\r\n val.detailAddress = e.detailAddress\r\n val.idcard = e.idcard\r\n val.phone = e.phone\r\n val.sex = e.sex\r\n val.eventId = this.formData.id\r\n\r\n }\r\n })\r\n },\r\n //团队选中\r\n handleTeam(val, e) {\r\n val.disposedObjectName = e\r\n val.disposedObjectCode = ''\r\n val.areaCode = ''\r\n val.detailAddress = ''\r\n val.phone = ''\r\n val.teamSize = ''\r\n val.eventId = this.formData.id\r\n this.teamList.forEach(e => {\r\n if (e.id === val.disposedObjectId) {\r\n val.disposedObjectName = e.name\r\n val.disposedObjectCode = e.filingNumber\r\n val.areaCode = e.areaCode\r\n val.detailAddress = e.address\r\n val.phone = e.phone\r\n val.teamSize = e.number\r\n val.eventId = this.formData.id\r\n }\r\n })\r\n },\r\n handleCancel() {\r\n this.visible = false\r\n this.basicsData = []\r\n this.taskList = []\r\n },\r\n downloadFile(id) {\r\n window.open(window.context.portal + `/file/v1/downloadFile?fileId=${id}`, \"_blank\");\r\n },\r\n handleSubmit() {\r\n console.log(this.formData);\r\n this.$refs.form.validate((valid) => {\r\n if (valid) {\r\n this.btnLoading=true\r\n\r\n if (this.formData.processType === '1') {\r\n this.formData.personList[0].processOrgName = this.currentUserDetail.org[0].orgName\r\n this.formData.personList[0].processOrgId = this.currentUserDetail.org[0].orgId\r\n this.formData.personList[0].processOrgCode = this.currentUserDetail.org[0].orgCode\r\n }\r\n this.formData.filePath = JSON.stringify(this.formData.filePath)\r\n SurvivalEvent.processEvent(this.formData, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '处置成功',\r\n duration: 2000,\r\n })\r\n this.handleCancel()\r\n this.$emit('getData');\r\n } else {\r\n this.$message.warning(res.message)\r\n }\r\n this.btnLoading=false\r\n\r\n })\r\n\r\n }\r\n })\r\n },\r\n handleMore() {\r\n this.$refs.treatedListDialog.open()\r\n },\r\n // 打开预警图片\r\n openImg() {\r\n // console.log(this.$refs.warningImg);\r\n if (this.basicsData.imgUrl) {\r\n bigScreenAPI.getImgByUrl(this.basicsData.imgUrl).then((res) => {\r\n this.srcList = res\r\n this.$refs.warningImg.clickHandler()\r\n })\r\n } else {\r\n this.$message({\r\n message: '暂无图片!',\r\n type: 'warning',\r\n })\r\n }\r\n },\r\n },\r\n}\r\n",null]}