{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\views\\patrolTask\\AlreadyPatrol.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\patrolTask\\AlreadyPatrol.vue","mtime":1667326395154},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _typeof from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/typeof\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\nimport \"core-js/modules/es6.string.starts-with\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 utils from '@/utils';\nimport basicData from '@/api/basicData.js';\nimport startFlow from '@/components/flow/taskFlowComponents/startFlow.vue';\nimport companyInfoSelector from '@/components/selector/companyInfoSelector.vue';\nimport sctionInfoSelector from '@/components/selector/sctionInfoSelector.vue';\nimport CascaderCompany from '@/components/selector/CascaderCompany.vue';\nexport default {\n name: 'TaskManagement',\n components: {\n // RoadInfoDialog1,\n // EipUserSelector,\n // DictSelect,\n // startFlow,\n // companyInfoSelector,\n // sctionInfoSelector,\n CascaderCompany: CascaderCompany\n },\n data: function data() {\n return {\n tableData: [],\n dialogVisible: false,\n searchForm: {},\n companyOptions: [],\n company: [],\n roadData: [],\n taskTypesele: [{\n label: '按月',\n value: 1\n }, {\n label: '按天',\n value: 2\n }],\n typeOp: [{\n label: '日巡检',\n value: 1\n }, {\n label: '夜巡检',\n value: 2\n }],\n // searchForm: {},\n dialogTableVisible: false,\n defId: '1427807759855915008',\n handStatusOptions: [{\n text: '创建巡检任务',\n value: '1',\n type: ''\n }, {\n text: '接受巡检任务',\n value: '2',\n type: 'success'\n }, {\n text: '完成巡检任务',\n value: '3',\n type: 'info'\n }, {\n text: '确认无病害',\n value: '4',\n type: 'warning'\n }, {\n text: '填写病害',\n value: '5',\n type: 'info'\n }, {\n text: '拒绝巡检单',\n value: '6',\n type: 'danger'\n }],\n data: [{\n id: 0\n }, {\n id: 1\n }, {\n id: 2\n }, {\n id: 3\n }],\n typeOptions: [],\n pageResult: {\n page: 1,\n pageSize: 50,\n total: 0\n },\n form: {\n roadSegmentName: '',\n rummagerId: '',\n rummagerName: '',\n patrolDate: '',\n type: '1',\n content: ''\n },\n // dialogVisible: false,\n dialogVisibleInfo: false,\n processRecordDialogVisible: false,\n // tableData: [],\n rules: {\n type: [{\n required: true,\n message: '请选择巡检类型',\n trigger: 'blur'\n }],\n roadSegmentName: [{\n required: true,\n message: '请选择巡检路段',\n trigger: 'blur'\n }],\n rummagerName: [{\n required: true,\n message: '请选择巡检人',\n trigger: 'blur'\n }],\n patrolDate: [{\n required: true,\n message: '请选择巡检日期',\n trigger: 'blur'\n }],\n content: [{\n required: true,\n message: '请填写巡检内容',\n trigger: 'blur'\n }]\n },\n procInstId: '',\n taskId: '',\n referOpinion: '',\n nodeType: '',\n nodeId: ''\n };\n },\n created: function created() {\n var _this = this;\n\n this.company = this.getCompany();\n this.roadData = this.getroad();\n this.typeOptions = utils.getDictItemsFromCache('xjlx');\n this.typeOptions.forEach(function (item) {\n item.text = item.name;\n }); //监听主页面postmessage\n\n window.addEventListener('message', function (event) {\n var data = event.data;\n _this[data.handlerType] && _this[data.handlerType](data.params);\n }, false);\n },\n methods: {\n //判断是否超时\n isOverTime: function isOverTime(startTime, planTime) {\n if (startTime && planTime) {\n var end = new Date().getTime();\n var start = new Date(startTime).getTime();\n var plan = new Date(planTime).getTime();\n var overTime = end - start;\n\n if (plan > overTime) {\n return '0'; // 0代表否\n } else {\n return '1'; // 1代表是\n }\n } else {\n return '0';\n }\n },\n beforeCloseDialog: function beforeCloseDialog() {\n this.form = {};\n this.dialogVisible = false;\n },\n handleLC: function handleLC(row) {\n var _this2 = this;\n\n this.processRecordDialogVisible = true;\n var query = {\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'bizId',\n relation: 'AND',\n value: row.id\n }]\n };\n this.$http.post('${yhxt}/bizTaskAlreadyHandleHistory/v1/getListLog', query).then(function (res) {\n _this2.tableData = res.data.rows;\n });\n },\n handleSubmit: function handleSubmit() {\n var _this3 = this;\n\n //验证表单是否填写完\n this.$refs.taskManageForm.validate(function (pass) {\n if (pass) {\n //请求保存提交\n _this3.$http.post('${yhxt}/siteInspection/v1/saveSiteInspectionSpecial', _this3.form).then(function (res) {\n if (res.status == 200) {\n _this3.$message({\n message: res.data.message,\n type: 'success'\n });\n }\n\n _this3.handleClose();\n\n _this3.loadData(); //重新获取数据\n\n });\n }\n });\n },\n handleSelectRoad: function handleSelectRoad(data) {\n this.form.roadSegmentName = data.name;\n this.form.roadSegmentId = data.id;\n this.form.routeId = data.routeId;\n this.form.routeName = data.routeName;\n this.$refs.roadSegmentName.focus();\n this.$refs.roadSegmentName.blur();\n },\n //所属路线打开弹框\n openRoad: function openRoad() {\n this.$refs.road.open();\n },\n handleOpenUrl: function handleOpenUrl(url, newWin) {\n if (!newWin) {\n this.$router.push(url);\n return;\n }\n\n if (!url) {\n return;\n }\n\n var token = this.$store.state.login.currentUser.token;\n\n if (!url.toLowerCase().startsWith('http')) {\n url = window.context.front + url;\n }\n\n if (url.indexOf('?') == -1) {\n url = url + '?token=' + token;\n } else {\n url = url + '&token=' + token;\n }\n\n window.open(url, '_blank');\n },\n createdOrder: function createdOrder() {\n this.dialogVisible = true;\n },\n handleClose: function handleClose() {\n this.form = {\n roadSegmentName: '',\n rummagerId: '',\n patrolDate: '',\n type: '1',\n content: ''\n };\n this.dialogVisible = false;\n this.dialogVisibleInfo = false;\n this.processRecordDialogVisible = false;\n },\n uniqueFunc: function uniqueFunc(arr, uniId) {\n var res = new Map();\n return arr.filter(function (item) {\n return !res.has(item[uniId]) && res.set(item[uniId], 1);\n });\n },\n findinfo: function findinfo() {\n var _this4 = this;\n\n typeof this.$refs.filterTable !== 'undefined' && this.$refs.filterTable.clearFilter();\n var query = [];\n var search = {\n company_id_: this.searchForm.companyIds,\n road_segment_name_: this.searchForm.roadSegmentName,\n TYPE_: this.searchForm.type\n };\n\n for (var i in search) {\n if (search[i]) {\n if (i == 'company_id_') {\n query.push({\n group: 'companyIds',\n operation: 'IN',\n parentGroup: '',\n property: 'COMPANY_ID_',\n relation: 'AND',\n value: search[i]\n });\n } else {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\n }\n }\n }\n\n query = this.uniqueFunc(query, 'property');\n var data = {\n pageBean: {\n page: 1,\n pageSize: 20,\n showTotal: true\n },\n querys: query\n };\n this.topQuery = query;\n this.$http.post('${form}/siteInspection/v1/getJsonTaskHistory', data).then(function (res) {\n console.log(res, '11');\n _this4.data = res.data.rows;\n _this4.pageResult = {\n page: res.data.page,\n pageSize: res.data.pageSize,\n total: res.data.total\n };\n });\n },\n getroad: function getroad() {\n var arr = [];\n basicData.getRoadManagement().then(function (res) {\n res.rows.forEach(function (item) {\n arr.push({\n value: item.name,\n key: item.name\n });\n });\n console.log(arr, '12');\n });\n return arr;\n },\n getCompany: function getCompany() {\n var _this5 = this;\n\n this.$http.post('${yhxt}/Company/v1/getCompany').then(function (res) {\n res.data.forEach(function (item) {\n _this5.companyOptions.push({\n id: item.id,\n name: item.name\n });\n });\n });\n },\n //深层拷贝回去公司名称\n deepClone: function deepClone(obj) {\n var objClone = Array.isArray(obj) ? [] : {};\n\n if (obj && _typeof(obj) === 'object') {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n //判断ojb子元素是否为对象,如果是,递归复制\n if (obj[key] && _typeof(obj[key]) === 'object') {\n objClone[key] = this.deepClone(obj[key]);\n } else {\n if (obj[key] == obj.name) {\n this.companyOptions.push({\n id: obj.id,\n name: obj.name\n });\n } //如果不是,简单复制\n\n\n objClone[key] = obj[key];\n }\n }\n }\n }\n },\n loadData: function loadData(param, cb) {\n var _this6 = this;\n\n // let r = JSON.stringify(param.pageBean)\n // let l = JSON.stringify(this.pageResult)\n // console.log(r, l)\n // if (r == l) {\n // console.log('一样')\n // param\n // } else {\n // console.log('不一样')\n // let query = []\n // let search = {\n // company_id_: this.searchForm.companyId,\n // road_segment_name_: this.searchForm.roadSegmentName,\n // TYPE_: this.searchForm.type\n // }\n // for (let i in search) {\n // if (search[i]) {\n // query.push({\n // group: 'advance',\n // operation: 'LIKE',\n // property: i,\n // relation: 'AND',\n // value: search[i]\n // })\n // }\n // }\n // param.querys = query\n // }\n if (typeof this.topQuery !== 'undefined' && this.topQuery.length !== 0) {\n param.querys = typeof param.querys !== 'undefined' ? param.querys : [];\n this.topQuery.forEach(function (item) {\n param.querys.push(item);\n });\n param.querys = this.uniqueFunc(param.querys, 'property');\n }\n\n this.$http.post('${form}/siteInspection/v1/getJsonTaskHistory', param).then(function (res) {\n console.log(res, '111'); // this.data = res.data.rows.map((item) => {\n // item.siteInspection.bizId = item.taskAlreadyHandleHistory.bizId\n // return item.siteInspection\n // })\n\n _this6.data = res.data.rows;\n _this6.pageResult = {\n page: res.data.page,\n pageSize: res.data.pageSize,\n total: res.data.total\n };\n }, function (error) {\n reject(error);\n }).finally(function () {\n if (cb) {\n cb();\n }\n });\n },\n //计算时间差\n formatTimeLag: function formatTimeLag(row) {\n var endTimes = 0;\n\n if (!row.transDate) {\n endTimes = new Date().getTime();\n } else {\n endTimes = new Date(row.transDate).getTime();\n }\n\n var difference = endTimes - new Date(row.sendDate).getTime();\n var r = ''; ////计算出相差天数\n\n var days = Math.floor(difference / (24 * 3600 * 1000)); //计算出小时数\n\n var leave1 = difference % (24 * 3600 * 1000); //计算天数后剩余的毫秒数\n\n var hours = Math.floor(leave1 / (3600 * 1000)); //计算相差分钟数\n\n var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数\n\n var minutes = Math.floor(leave2 / (60 * 1000)); //计算相差秒数\n\n var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数\n\n var seconds = Math.round(leave3 / 1000);\n if (days > 0) r += days + '天';\n if (hours > 0) r += hours + '小时';\n\n if (days > 0) {\n return r;\n }\n\n if (minutes > 0) r += minutes + '分钟';\n\n if (hours > 0) {\n return r;\n }\n\n if (seconds > 0) r += seconds + '秒';\n\n if (minutes == 0 && seconds >= 0) {\n return '小于1分钟';\n } //r.slice(0, r.indexOf('时'));\n\n\n return r;\n }\n }\n};",null]}