{"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\\maintenanceInspection\\overdueRecords.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\maintenanceInspection\\overdueRecords.vue","mtime":1717179230345},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"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":456789000000},{"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 \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.number.constructor\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\nimport \"core-js/modules/es6.string.starts-with\";\nimport _typeof from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/typeof.js\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 util from '@/hotent-ui-util.js';\nimport basicData from '@/api/basicData.js';\nimport { antiShake } from '@/antiShake';\nimport bizFlow from '@/api/bizFlow';\nimport RoadInfoDialog from '@/components/dialog/RoadInfoDialog.vue';\nimport EipUserSelector from '@/components/eipControl/selector/EipUserSelector.vue';\nimport DictSelect from '@/components/dict/DictSelect.vue';\nimport startFlow from '@/components/flow/taskFlowComponents/startFlow.vue';\nimport ProcessRecordDialog from '@/components/flow/processRecordDialog.vue';\nimport CheckVirus from '@/views/patrolTask/CheckVirus.vue';\nimport sctionInfoSelector from '@/components/selector/sctionInfoSelector.vue';\nimport CascaderCompany from '@/components/selector/CascaderCompany.vue';\nexport default {\n name: 'TaskManagement',\n components: {\n // RoadInfoDialog,\n EipUserSelector: EipUserSelector,\n // DictSelect,\n CheckVirus: CheckVirus,\n // startFlow,\n // ProcessRecordDialog,\n sctionInfoSelector: sctionInfoSelector,\n CascaderCompany: CascaderCompany\n },\n data: function data() {\n return {\n roadData: [],\n companyOptions: [],\n taskTypesele: [{\n label: '按月',\n value: 1\n }, {\n label: '按天',\n value: 2\n }],\n isTimeouData: [{\n name: '是',\n value: '1'\n }, {\n name: '否',\n value: '0'\n }],\n typeOp: [{\n label: '日巡检',\n value: 1\n }, {\n label: '夜巡检',\n value: 2\n }],\n searchForm: {},\n dialogTableVisible: false,\n defId: '1427807759855915008',\n data: [{\n id: 0\n }, {\n id: 1\n }, {\n id: 2\n }, {\n id: 3\n }],\n typeOptions: [],\n handStatusOptions: [{\n text: '创建巡检任务',\n value: 1,\n type: ''\n }, {\n text: '接受巡检任务',\n value: 2,\n type: 'primary'\n }, {\n text: '完成巡检任务',\n value: 3,\n type: 'success'\n }, {\n text: '确认无病害',\n value: 4,\n type: 'warning'\n }, {\n text: '填写病害',\n value: 5,\n type: 'danger'\n }],\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 type: '',\n disabledEdit: false,\n permission: 'b',\n groupCodeArr: '',\n //当前登录角色编码\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 processRecordDialogVisible: false,\n tableData: []\n };\n },\n created: function created() {\n var _this = this;\n this.company = this.getCompany();\n this.roadData = this.getroad();\n var orgAccount = JSON.parse(window.sessionStorage.getItem('currentUser')).account;\n this.getOrgInfo(orgAccount);\n this.typeOptions = utils.getDictItemsFromCache('xjlx');\n this.typeOptions.forEach(function (item) {\n item.text = item.name;\n });\n //监听主页面postmessage\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 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.id\n });\n });\n console.log(arr, '12');\n });\n return arr;\n },\n getCompany: function getCompany() {\n var _this2 = this;\n this.$http.post('${yhxt}/Company/v1/getCompany').then(function (res) {\n res.data.forEach(function (item) {\n _this2.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 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 objClone[key] = obj[key];\n }\n }\n }\n }\n },\n //获取级角色信息\n getOrgInfo: function getOrgInfo(orgAccount) {\n var _this3 = this;\n this.$http.get('${yhxt}/api/role/v1/role/getRolesByUser?account=' + orgAccount).then(function (res) {\n if (res.data.length != 0) {\n res.data.forEach(function (item) {\n _this3.groupCodeArr.push(item.groupCode);\n });\n console.log(_this3.groupCodeArr, 'd');\n }\n });\n },\n //判断是否超时\n isOverTime: function isOverTime(patrolDate, handStatus) {\n if (patrolDate && handStatus) {\n var presentTime = this.getDate();\n var end = new Date(presentTime).getTime();\n var start = new Date(patrolDate).getTime();\n var overTime = end - start;\n console.log(overTime, handStatus, patrolDate);\n if (overTime >= 0 && handStatus >= 3) {\n return '0'; // 0代表否\n } else {\n return '1'; // 1代表是\n }\n } else {\n return '0';\n }\n },\n handleCommand: function handleCommand(params) {\n var _this4 = this;\n if (params.command == 'processRecord') {\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: params.row.id\n }]\n };\n this.$http.post('${yhxt}/bizTaskAlreadyHandleHistory/v1/getListLog', query).then(function (res) {\n _this4.tableData = res.data.rows;\n });\n } else if (params.command == 'checkVirus') {\n this.$refs.CheckVirus.open(params.row);\n } else if (params.command == 'processdelete') {\n this.$http.post('${yhxt}/siteInspection/v1/updateSiteInspection&ids=' + params.row.id).then(function (res) {\n if (res.state) {\n _this4.$message({\n message: res.message,\n type: 'success'\n });\n } else {\n _this4.$message.error(res.message);\n }\n });\n }\n },\n //处理记录信息\n processRecordDialog: function processRecordDialog() {\n this.$refs.processRecordDialog.handleClose(); //父组件调用子组件方法\n },\n\n handleSubmit: antiShake(function () {\n var _this5 = this;\n this.$refs.form.validate(function (pass) {\n if (pass) {\n //请求保存提交/siteInspection/v1/saveVo\n _this5.$http.post('${yhxt}/siteInspection/v1/startSiteInspectionSpecial', _this5.form).then(function (res) {\n if (res.status == 200) {\n _this5.form = {\n roadSegmentName: '',\n rummagerId: '',\n rummagerName: '',\n patrolDate: '',\n type: 1,\n content: ''\n };\n if (res.data.state) {\n _this5.$message({\n message: res.data.message,\n type: 'success'\n });\n }\n }\n _this5.handleClose();\n _this5.$refs.htTable.load(); //重新获取数据\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.roadSegmentName = data.roadSegmentName;\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 if (!url) {\n return;\n }\n var token = this.$store.state.login.currentUser.token;\n if (!url.toLowerCase().startsWith('http')) {\n url = window.context.front + url;\n }\n if (url.indexOf('?') == -1) {\n url = url + '?token=' + token;\n } else {\n url = url + '&token=' + token;\n }\n window.open(url, '_blank');\n },\n createdOrder: function createdOrder() {\n this.permission = 'b'; //只读\n this.form = {\n type: 1\n };\n this.disabledEdit = false;\n this.type = 'add';\n this.dialogVisible = true;\n },\n handleEdit: function handleEdit(row) {\n this.form = row;\n this.disabledEdit = true;\n this.permission = 'r'; //只读\n this.type = 'edit';\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 handleReset: function handleReset() {\n this.searchForm = _objectSpread(_objectSpread({}, this.searchForm), {}, {\n companyId: ['1419863231459102720'],\n companyIds: '',\n type: '',\n patrolDate: '',\n isTimeou: '',\n roadSegmentId: '',\n startTime: '',\n endTime: ''\n });\n this.findinfo();\n },\n findinfo: function findinfo() {\n var _this6 = this;\n typeof this.$refs.filterTable !== 'undefined' && this.$refs.filterTable.clearFilter();\n var query = [{\n property: 'IS_LOG_',\n value: '1',\n operation: 'EQUAL'\n }];\n var search = {\n company_id_: this.searchForm.companyIds,\n type_: this.searchForm.type,\n // patrol_date_: this.searchForm.patrolDate,\n isTimeout: this.searchForm.isTimeou,\n // company_id_: this.searchForm.companyId,\n road_segment_id_: this.searchForm.roadSegmentId,\n startTime: this.searchForm.startTime,\n endTime: this.searchForm.endTime\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 if (i == 'isTimeout') {\n query.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'isTimeout',\n relation: 'AND',\n value: Number(search[i])\n });\n } else if (i == 'road_segment_id_') {\n query.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'road_segment_id_',\n relation: 'AND',\n value: search[i]\n });\n } else if (i == 'type_') {\n query.push({\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'type_',\n relation: 'AND',\n value: search[i]\n });\n } else if (i == 'startTime') {\n query.push({\n group: 'main',\n operation: 'GREAT_EQUAL',\n parentGroup: '',\n property: 'patrol_date_',\n relation: 'AND',\n value: search[i]\n });\n } else if (i == 'endTime') {\n query.push({\n group: 'main',\n operation: 'LESS_EQUAL',\n parentGroup: '',\n property: 'patrol_date_',\n relation: 'AND',\n value: search[i]\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 var datequery = {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: \"date_format(PATROL_DATE_,'%Y')\",\n relation: 'AND',\n value: new Date().getFullYear()\n };\n if (!this.searchForm.patrolDate) {\n if (data.querys) {\n data.querys.push(datequery);\n } else {\n data.querys = [datequery];\n }\n }\n this.topQuery = query;\n console.log(this.form, data, this.topQuery, 'query');\n bizFlow.getTaskManage(data).then(function (res) {\n console.log(res, '11');\n _this6.data = res.rows;\n _this6.pageResult = {\n page: res.page,\n pageSize: res.pageSize,\n total: res.total\n };\n });\n },\n //计算时间差\n formatTimeLag: function formatTimeLag(row) {\n // console.log(row, 'ddd')\n var endTimes = 0;\n if (!row.transDate) {\n endTimes = new Date().getTime();\n } else {\n endTimes = new Date(row.transDate).getTime();\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 var hours = Math.floor(leave1 / (3600 * 1000));\n //计算相差分钟数\n var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数\n var minutes = Math.floor(leave2 / (60 * 1000));\n //计算相差秒数\n var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数\n var seconds = Math.round(leave3 / 1000);\n if (days > 0) r += days + '天';\n if (hours > 0) r += hours + '小时';\n if (days > 0) {\n return r;\n }\n if (minutes > 0) r += minutes + '分钟';\n if (hours > 0) {\n return r;\n }\n if (seconds > 0) r += seconds + '秒';\n if (minutes == 0 && seconds >= 0) {\n return '小于1分钟';\n }\n //r.slice(0, r.indexOf('时'));\n return r;\n },\n loadData: function loadData(querys, cb) {\n var _this7 = this;\n var param = util.deepClone(querys);\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 var datequery = {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: \"date_format(PATROL_DATE_,'%Y')\",\n relation: 'AND',\n value: new Date().getFullYear()\n };\n if (!this.searchForm.patrolDate) {\n if (param.querys) {\n param.querys.push(datequery);\n } else {\n param.querys = [datequery];\n }\n }\n bizFlow.getTaskManage(param).then(function (resp) {\n console.log(resp, 'ddddd');\n _this7.pageResult = {\n page: resp.page,\n pageSize: resp.pageSize,\n total: resp.total\n };\n _this7.data = resp.rows;\n }, function (error) {\n reject(error);\n }).finally(function () {\n if (cb) {\n cb();\n }\n });\n },\n //对话框关闭\n handleCancel: function handleCancel() {\n this.dialogVisible = false;\n },\n //路段信息赋值\n changed: function changed(obj) {\n this.form.roadSegmentName = obj.name;\n this.form.roadSegmentId = obj.id;\n this.form.routeName = obj.routeName;\n this.form.routeId = obj.routeId;\n this.form.companyName = obj.companyName;\n this.form.companyId = obj.companyId;\n },\n //默认赋值为第一条数据的值\n value: function value(obj) {\n console.log(obj);\n if (this.type == 'add') {\n this.form.roadSegmentName = obj.name;\n this.form.roadSegmentId = obj.id;\n this.form.routeName = obj.routeName;\n this.form.routeId = obj.routeId;\n this.form.companyName = obj.companyName;\n this.form.companyId = obj.companyId;\n }\n },\n throttle: function throttle(fn, wait) {\n var timer = null;\n return function () {\n var context = this;\n var args = arguments;\n if (!timer) {\n timer = setTimeout(function () {\n fn.apply(context, args);\n timer = null;\n }, wait);\n }\n };\n }\n }\n};",null]}