{"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\\components\\flowURLForm\\flowInfoDailog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\components\\flowURLForm\\flowInfoDailog.vue","mtime":1680891193834},{"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 \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.regexp.constructor\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/web.dom.iterable\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { helper } from \"../../../public/hotent.helper.js\";\nimport req from '@/request.js';\nimport utils from '@/utils';\nimport basicData from '@/api/basicData.js';\nimport routerInfoSelector from '@/components/selector/routerInfoSelector.vue';\nimport DiseaseDialog from '@/components/dialog/DiseaseDialog.vue';\nimport ResponsDialog from '@/components/dialog/ResponsDialog.vue';\nimport selectContractDialog from '@/components/flowURLForm/selectContractDialog';\nimport sctionInfoSelector from '@/components/selector/sctionInfoSelector.vue';\nimport { mapState } from 'vuex';\nimport companyInfoSelector from '@/components/selector/companyInfoSelector.vue';\nimport eipUserSelector from '@/components/eipControl/selector/EipUserSelector.vue';\n\nvar ImgPreviewUpload = function ImgPreviewUpload() {\n return import('@/components/common/ImgPreviewUploadAccessor.vue');\n};\n\nimport fileUpload from '@/components/upload/fileUpload.vue';\nexport default {\n name: 'flowInfoDailog',\n components: {\n // routerInfoSelector,\n DiseaseDialog: DiseaseDialog,\n selectContractDialog: selectContractDialog,\n ImgPreviewUpload: ImgPreviewUpload,\n // sctionInfoSelector,\n companyInfoSelector: companyInfoSelector,\n eipUserSelector: eipUserSelector,\n ResponsDialog: ResponsDialog,\n fileUpload: fileUpload\n },\n data: function data() {\n return {\n dadToSon: {\n bizPath: 'workorder',\n fileList: []\n },\n accountObj: {},\n activeName: 'first',\n orgUserArr: [],\n orgUserName: {},\n //养护人员变量值\n companyInfoSelect: true,\n isSendHandle: false,\n //是否是菜单待办工单中办理发送信息,默认为false\n businessKeyId: '',\n jobNumber: '',\n // responsIdArr: [], //选取施工班组的id,便于查询下一级用户账号\n responsId: '',\n //养护单位id,用于施工班组查询数据\n permission: 'b',\n isEnlarge: false,\n //用户是否选着放大病害照片列表\n initialIndex: 0,\n //放大照片走马灯激状态索引值\n isFirst: true,\n //判断是否调用两次saveData\n currentNode: 1,\n queryByTypeData: {\n fullname: '',\n account: '',\n id: ''\n },\n //用户选择器返回数据用于初始化值\n form: {\n isCheck: false,\n //判断是否是办理,解决养护单位赋值问题\n //工单信息实体数据\n workOrderInformation: {\n type: 4,\n description: '',\n //不能删掉,防止病害选取回填失效\n responsiblePerson: '',\n constructUnitId: '',\n maintenanceStationAudit: '',\n maintenanceDept: '',\n maintenanceUnitAudit: '',\n demandFinishTime: '',\n //要求修护时间\n issueDate: '',\n //签发日期\n issuer: '',\n //签发人\n contractId: '',\n //合同id\n assignedPersonnel: '',\n //承包方经办人\n receivingPartyReview: '' //承包方负责人\n\n },\n billOfQuantities: [],\n contract: {},\n defaultBpmCheckOpinion: {},\n disease: []\n },\n options: [],\n cbkm: [],\n soncbkm: [],\n //子细目数据\n activeNames: ['1', '2', '3', '4', '5'],\n tableData: [],\n tableDataOutside: [],\n contractInfoList: [],\n //合同信息列表\n disabledCreated: false,\n //控制创建工单信息表单的选填\n dialogImageUrl: '',\n dialogVisible: false,\n isshow: false,\n //控制关联病害是否显示\n readDetaial: false,\n roadOptions: [],\n //选取路段\n rules: {\n 'workOrderInformation.contractId': {\n required: true,\n message: '请选择合同',\n trigger: 'change'\n },\n 'workOrderInformation.type': {\n required: true,\n message: '请输入工单类型',\n trigger: 'blur'\n },\n 'workOrderInformation.roadSegmentName': {\n required: true,\n message: '请选择路段名称',\n trigger: 'change'\n },\n 'workOrderInformation.companyName': {\n required: true,\n message: '请选择施工单位',\n trigger: 'change'\n },\n 'workOrderInformation.position': {\n required: true,\n message: '请输入位置',\n trigger: 'blur'\n },\n 'workOrderInformation.categoryId': {\n required: true,\n message: '请选择类别',\n trigger: 'blur'\n },\n 'workOrderInformation.detailsId': {\n required: true,\n message: '请输入细目',\n trigger: 'blur'\n },\n 'workOrderInformation.demandFinishTime': {\n required: true,\n message: '请输入要求修复时间',\n trigger: 'blur'\n },\n 'workOrderInformation.issuer': {\n required: true,\n message: '请输入签发人',\n trigger: 'blur'\n },\n 'workOrderInformation.issueDate': {\n required: true,\n message: '请输入签发日期',\n trigger: 'blur'\n },\n 'workOrderInformation.taskContent': {\n required: true,\n message: '请输入派工原因',\n trigger: 'blur'\n },\n 'workOrderInformation.remarks': {\n required: true,\n message: '请输入公作概况',\n trigger: 'blur'\n },\n // constructionPicIds: {\n // required: true,\n // message: '请上传照片',\n // trigger: 'blur'\n // }\n // description: {\n // required: true,\n // message: '请选择关联病害',\n // trigger: 'blur'\n // },\n 'workOrderInformation.maintenanceUnitAudit': {\n required: true,\n message: '请选择养护单位',\n trigger: 'change'\n },\n 'workOrderInformation.responsiblePerson': {\n required: true,\n message: '请选择施工班组',\n trigger: 'change'\n },\n 'workOrderInformation.assignedPersonnel': {\n required: true,\n message: '请选择承包方经办人',\n trigger: 'change'\n },\n 'workOrderInformation.receivingPartyReview': {\n required: true,\n message: '请选择承包方负责人',\n trigger: 'change'\n },\n 'workOrderInformation.maintenanceStationAudit': {\n required: true,\n message: '必填',\n trigger: 'blur'\n },\n 'workOrderInformation.maintenanceDept': {\n required: true,\n message: '必填',\n trigger: 'blur'\n }\n },\n dadToSonPre: {\n sourceId: '',\n fileList: []\n },\n dadToSonUnd: {\n sourceId: '',\n fileList: []\n },\n dadToSonSuf: {\n sourceId: '',\n fileList: []\n },\n source: false,\n selectorUser: {},\n //默认赋值\n reviewUserArr: []\n };\n },\n mounted: function mounted() {\n var _this2 = this;\n\n console.log(this.$route, '节点信息');\n this.currentNode = this.$route.query.node;\n console.log(this.currentNode, '节点');\n console.log(this.$route, '参数');\n\n if (this.$route.query.type) {\n this.readDetaial = true;\n } // this.currentNode = 4\n\n\n console.log(this.currentNode, '节点');\n\n if (this.currentNode == 2 || this.currentNode == 3 || this.currentNode == 4 || this.currentNode == 5 || this.currentNode == 6 || this.currentNode == 7) {\n this.disabledCreated = true;\n }\n\n var _this = this;\n\n window.saveData = this.saveData;\n this.id = utils.getUrlKey('id');\n var isEdit = utils.getUrlKey('isEdit');\n this.disabled = isEdit == 'r' ? true : false;\n\n if (this.id) {\n this.companyInfoSelect = false;\n req.get(window.context.yhxt + '/workOrderInformation/v1/getVo/' + this.id).then(function (res) {\n console.log(res, '流程数据');\n _this2.companyInfoSelect = true;\n\n if (res.data) {\n res.data.type ? res.data.type = res.data.type + '' : null;\n _this2.form = res.data;\n _this2.form.workOrderInformation.constructUnitId = res.data.workOrderInformation.constructUnitId; //根据类别id获取细目数组\n\n if (_this2.form.workOrderInformation.categoryId) {\n var id = _this2.form.workOrderInformation.categoryId;\n\n _this2.getDetailsidName(id);\n }\n\n var obj = {\n workOrderInformation: {},\n billOfQuantities: [],\n contract: {},\n defaultBpmCheckOpinion: {}\n };\n\n if (_this2.form.diseases) {\n _this2.isshow = true;\n var str = '';\n\n _this2.form.diseases.forEach(function (item) {\n str += item.description + ';';\n });\n\n _this2.form.workOrderInformation.description = str;\n }\n\n _this2.form = _objectSpread(_objectSpread({}, obj), _this2.form);\n _this2.tableData = _this2.form.billOfQuantities; //合同内工程量清单\n\n _this2.tableDataOutside = _this2.form.billOutOfQuantities; //合同外\n //获取每一列细科目数据\n\n _this2.tableDataOutside.forEach(function (item) {\n // console.log(item)\n _this2.changesele(item.subjectNumber, item.key);\n }); // //路段名称赋值\n\n\n _this2.form.workOrderInformation.roadSegmentName = res.data.workOrderInformation.road.name;\n\n _this2.getContractId(); //根据路段id查询相应合同数据\n // this.getByRoadSegmentId_Pcode() //根据路段查询科目数据\n\n\n _this2.getContractOutsideInfo(_this2.form.workOrderInformation.roadSegmentId); // console.log(this.form, 'this.form')\n\n\n _this2.dadToSonPre.sourceId = _this2.form.workOrderInformation.id;\n _this2.dadToSonUnd.sourceId = _this2.form.workOrderInformation.id;\n _this2.dadToSonSuf.sourceId = _this2.form.workOrderInformation.id;\n _this2.source = true; //施工前照片\n\n _this2.dadToSonPre.fileList = _this2.form.accessoriesPre; //施工中照片\n\n _this2.dadToSonUnd.fileList = _this2.form.accessoriesUnd; //施工后照片\n\n _this2.dadToSonSuf.fileList = _this2.form.accessoriesSuf; // 附件管理\n\n _this2.dadToSon.fileList = _this2.form.accessoriesWorkOrder;\n console.log(_this2.dadToSon.fileList);\n }\n });\n } else {\n this.queryByType(); //获取数据赋值默认值\n }\n\n var that = this;\n window.addEventListener('message', function (e) {\n if (e.data.params) {\n console.log(e.data.params, 'message-relationData');\n var data = e.data.params;\n _this2.form.workOrderInformation.roadSegmentId = data.roadId; //路段id\n\n _this2.form.workOrderInformation.roadSegmentName = data.roadName; //路段名称\n\n _this2.getContractId(); //根据路段id查询相应合同数据\n // this.getByRoadSegmentId_Pcode()\n\n\n _this2.getContractOutsideInfo(_this2.form.workOrderInformation.roadSegmentId);\n\n var str = data.startPeg || '' + '~' + data.endPeg || '';\n\n _this2.$set(_this2.form.workOrderInformation, 'position', str); //起止桩号\n // this.form.workOrderInformation.position = str //位置\n\n\n _this2.form.workOrderInformation.categoryId = data.categoryId; //类别\n\n _this2.form.workOrderInformation.subjectName = data.subjectName; //类别\n\n basicData.getCostAccountManagement(data.categoryId).then(function (res) {\n var arr = [];\n\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == data.categoryId) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n\n _this2.cbkm = arr;\n }); //console.log(this.cbkm, '123')\n\n _this2.form.workOrderInformation.detailsId = data.detailsId; //细目\n\n _this2.form.workOrderInformation.dsubjectName = data.dsubjectName; //细目\n // this.getTypeOptions()\n }\n });\n _this2.form.workOrderInformation.description = e.data.params.description; //存入病害id\n\n _this2.form.workOrderInformation.diseaseId = e.data.params.id;\n console.log(_this2.form.workOrderInformation);\n }\n });\n\n Date.prototype.format = function (fmt) {\n var o = {\n 'M+': this.getMonth() + 1,\n //月份\n 'd+': this.getDate(),\n //日\n 'h+': this.getHours(),\n //小时\n 'm+': this.getMinutes(),\n //分\n 's+': this.getSeconds(),\n //秒\n 'q+': Math.floor((this.getMonth() + 3) / 3),\n //季度\n S: this.getMilliseconds() //毫秒\n\n };\n\n if (/(y+)/.test(fmt)) {\n fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));\n }\n\n for (var k in o) {\n if (new RegExp('(' + k + ')').test(fmt)) {\n fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));\n }\n }\n\n return fmt;\n }; // let orgAccount = JSON.parse(window.sessionStorage.getItem('currentUser'))\n // .account\n // this.getOrgInfo(orgAccount)\n // // 获取当前登录用户名\n // let currentUser = JSON.parse(window.sessionStorage.getItem('currentUser'))\n // this.currentUserName = currentUser.username\n\n },\n created: function created() {\n // this.getTypeOptions()\n this.getContractId();\n this.getInfo(); //获取路段信息\n // if(this.$route.query.node != 1){\n // this.getContractId()\n // }\n },\n computed: mapState({\n actionUrl: function actionUrl() {\n //工程图纸中文件上传\n if (this.dialogImageUrl) {\n return window.context.portal + this.dialogImageUrl;\n } else {\n return window.context.portal + '/bizAccessory/v1/minioDrawingUpload';\n }\n },\n money: function money() {\n if (this.tableData.price) {\n return this.tableData.amount * this.tableData.price;\n }\n }\n }),\n methods: {\n // 获取合同外工程清单科目信息\n getContractOutsideInfo: function getContractOutsideInfo(roadSegmentId) {\n var _this3 = this;\n\n var params = {\n pageBean: {\n pageSize: -1\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n property: 'road_segment_id_',\n relation: 'AND',\n value: roadSegmentId\n }]\n };\n this.$http.post('${yhxt}/bill/quanti/type/manag/v1/query', params).then(function (res) {\n var arr = res.data.rows;\n arr.length !== 0 && arr.forEach(function (item) {\n _this3.options.push({\n label: item.projectName,\n value: item.projectName,\n price: item.price,\n spec: item.spec,\n amount: item.amount\n });\n });\n });\n },\n //获取级角色信息\n getOrgInfo: function getOrgInfo(orgAccount) {\n var _this4 = this;\n\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 _this4.groupCodeArr.push(item.groupCode);\n });\n console.log(_this4.groupCodeArr, 'd');\n }\n });\n },\n //办理时请求细目列表\n getDetailsidName: function getDetailsidName(id) {\n var _this5 = this;\n\n basicData.getCostAccountManagement(id).then(function (res) {\n var arr = [];\n\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == id) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n\n _this5.cbkm = arr;\n });\n }\n });\n },\n //获取用户选择的数据的第一条数据用于默认赋值\n queryByType: function queryByType() {\n var _this6 = this;\n\n this.$http.post('${yhxt}/api/user/v1/users/queryByType').then(function (res) {\n console.log(res);\n var resp = res.data.rows[0];\n\n var date = _this6.getDate();\n\n _this6.form.workOrderInformation.demandFinishTime = date;\n _this6.form.workOrderInformation.issueDate = date; // 获取当前登录用户名\n\n var currentUser = JSON.parse(window.sessionStorage.getItem('currentUser'));\n\n if (_this6.currentNode == 1) {\n //默认签发人为当前登录人账号\n _this6.form.workOrderInformation.issuer = currentUser.username;\n _this6.form.workOrderInformation.assignedPersonnel = resp.fullname;\n _this6.form.workOrderInformation.assignedPersonnelAccount = resp.account; // this.form.workOrderInformation.assignedPersonnelId = resp.id\n // this.form.workOrderInformation.receivingPartyReview = resp.fullname\n // this.form.workOrderInformation.receivingPartyReviewAccount =\n // resp.account\n // this.form.workOrderInformation.receivingPartyReviewId = resp.id\n // this.form.workOrderInformation.maintenanceStationAudit = resp.fullname\n // this.form.workOrderInformation.maintenanceStationAuditAccount =\n // resp.account\n // this.form.workOrderInformation.maintenanceStationAuditId = resp.id\n // this.form.workOrderInformation.maintenanceDept = resp.fullname\n // this.form.workOrderInformation.maintenanceDeptAccount = resp.account\n // this.form.workOrderInformation.maintenanceDeptId = resp.id\n } else if (!_this6.form.workOrderInformation.assignedPersonnel && !_this6.form.workOrderInformation.maintenanceStationAudit && !_this6.form.workOrderInformation.maintenanceDept) {}\n });\n },\n //放大病害照片\n handleEnlarge: function handleEnlarge(index) {\n this.initialIndex = index;\n this.isEnlarge = true;\n },\n handleRemove: function handleRemove(file, fileList) {\n console.log(file, fileList);\n },\n handlePictureCardPreview: function handlePictureCardPreview(file) {\n console.log(file);\n this.dialogImageUrl = file.url;\n this.dialogVisible = true;\n },\n // imgUrl(url) {\n // console.log(url)\n // this.form.accessories = url\n // },\n imageUrl: function imageUrl(val) {\n console.log(val);\n },\n sonToDad: function sonToDad(data, key) {\n console.log(data); // this.form.accessories = data\n\n if (key == 'constructionPre') {\n //施工前照片\n this.form.accessoriesPre = data;\n } else if (key == 'constructionUnd') {\n //施工中照片\n this.form.accessoriesUnd = data;\n } else if (key == 'constructionSuf') {\n //施工后照片\n this.form.accessoriesSuf = data;\n } else {\n //附件管理\n this.form.accessoriesWorkOrder = data;\n } // console.log(this.form.accessories)\n\n },\n // 工程清单相关方法 start\n changePrice: function changePrice(val, index) {\n var currentObj;\n\n if (this.activeName == 'first') {\n currentObj = this.tableData[index];\n } else {\n currentObj = this.tableDataOutside[index];\n }\n\n currentObj.auditPrice = val;\n\n if (this.currentNode == 3) {\n currentObj.money = currentObj.amount * val;\n }\n\n if (this.currentNode == 4) {\n currentObj.receiverMoney = currentObj.receiverAmount * val;\n currentObj.receiverPrice = val;\n }\n\n currentObj.auditMoney = currentObj.auditAmount * val;\n\n if (this.activeName == 'first') {\n currentObj.taxMoney = this.getTaxmoney(currentObj.auditMoney);\n this.tableData.splice(index, 1, currentObj);\n } else {\n this.tableDataOutside.splice(index, 1, currentObj);\n }\n },\n changeAmount: function changeAmount(val, index) {\n var currentObj;\n\n if (this.activeName == 'first') {\n currentObj = this.tableData[index];\n } else {\n currentObj = this.tableDataOutside[index];\n }\n\n if (!currentObj.auditPrice && !currentObj.receiverPrice) {\n currentObj.auditPrice = currentObj.price;\n currentObj.receiverPrice = currentObj.price;\n }\n\n currentObj.amount = val;\n currentObj.money = currentObj.price * val;\n currentObj.auditAmount = val;\n currentObj.auditMoney = currentObj.auditPrice * val;\n currentObj.receiverAmount = val;\n currentObj.receiverMoney = currentObj.receiverPrice * val;\n\n if (this.activeName == 'first') {\n currentObj.taxMoney = this.getTaxmoney(currentObj.auditMoney);\n this.tableData.splice(index, 1, currentObj);\n } else {\n this.tableDataOutside.splice(index, 1, currentObj);\n }\n },\n changeColNum: function changeColNum(val, index, colums, otherCol, totalCol) {\n var currentObj;\n\n if (this.activeName == 'first') {\n currentObj = this.tableData[index];\n } else {\n currentObj = this.tableDataOutside[index];\n }\n\n currentObj[colums] = val;\n currentObj[totalCol] = currentObj[colums] * currentObj[otherCol];\n currentObj.auditAmount = val;\n currentObj.auditMoney = currentObj.auditPrice * val;\n\n if (this.activeName == 'first') {\n currentObj.taxMoney = this.getTaxmoney(currentObj.auditMoney);\n this.tableData.splice(index, 1, currentObj);\n } else {\n this.tableDataOutside.splice(index, 1, currentObj);\n }\n },\n addListItem: function addListItem() {\n console.log(this.form, 'ddddddddddd');\n var length = 0;\n\n if (this.activeName == 'first') {\n length = this.tableData.length;\n } else {\n length = this.tableDataOutside.length;\n }\n\n var workOrderInformationId = this.form.workOrderInformation && this.form.workOrderInformation.id ? this.form.workOrderInformation.id : '';\n var contractId = this.form.workOrderInformation && this.form.workOrderInformation.contractId ? this.form.workOrderInformation.contractId : '';\n var newData = {\n // todo 回显时需加上工单id合同id,key\n key: length + 1,\n workOrderInformationId: workOrderInformationId,\n contractId: contractId,\n subjectName: '',\n fineSubjectName: '',\n sonSubjectName: '',\n spec: '',\n price: 0,\n amount: 0,\n money: 0,\n auditPrice: 0,\n auditAmount: 0,\n auditMoney: 0,\n receiverPrice: 0,\n receiverAmount: 0,\n receiverMoney: 0,\n subOption: []\n };\n\n if (this.activeName == 'first') {\n this.tableData.push(newData);\n } else {\n this.tableDataOutside.push(newData);\n }\n },\n deleteListItem: function deleteListItem(index) {\n if (this.activeName == 'first') {\n this.tableData.splice(index, 1);\n } else {\n this.tableDataOutside.splice(index, 1);\n }\n },\n searchSubject: function searchSubject(index) {\n if (this.form.workOrderInformation && this.form.workOrderInformation.contractId) {\n this.$refs.selectContract.open(index, this.form.workOrderInformation.contractId, this.form.workOrderInformation.roadSegmentName);\n }\n },\n getTaxmoney: function getTaxmoney(val) {\n var BigNumber = require('bignumber.js');\n\n val = new BigNumber(val);\n var num = val.plus(val.times(0.066)).times(1.09).toFixed(2);\n return num;\n },\n getContractItem: function getContractItem(obj, index) {\n console.log(obj);\n obj.key = index + 1;\n obj.workOrderInformationId = this.form.workOrderInformation && this.form.workOrderInformation.id ? this.form.workOrderInformation.id : ''; // obj.auditPrice = obj.price\n\n obj.contractItemId = obj.id;\n obj.number = obj.code;\n obj.sort = obj.key;\n obj.money = obj.monty;\n obj.amount = obj.amount || 1; //数量默认为1\n\n obj.receiverPrice = obj.price;\n obj.receiverAmount = obj.amount;\n obj.receiverMoney = obj.money;\n obj.auditPrice = obj.price;\n obj.auditAmount = obj.amount;\n obj.auditMoney = obj.money;\n\n if (this.activeName == 'first') {\n obj.taxMoney = this.getTaxmoney(obj.auditMoney); // 含税金额\n\n this.tableData.splice(index, 1, obj);\n } else {\n this.tableDataOutside.splice(index, 1, obj);\n }\n },\n changeseleOut_: function changeseleOut_(val, index) {\n var _this7 = this;\n\n this.options.forEach(function (item) {\n if (item.value == val) {\n _this7.tableDataOutside[index].price = item.price;\n _this7.tableDataOutside[index].spec = item.spec;\n _this7.tableDataOutside[index].amount = item.amount;\n _this7.tableDataOutside[index].money = item.price * item.amount;\n }\n });\n },\n handleBlur: function handleBlur(e, index) {\n if (e.target.value) {\n var val = e.target.value;\n this.$set(this.tableDataOutside[index], 'subjectName', e.target.value);\n }\n },\n changeseleOut: function changeseleOut(value, key) {\n var _this8 = this;\n\n var arr = [];\n basicData.getCostAccountManagement(value).then(function (res) {\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == value) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n }); //默然赋值细科目的第一条数据\n\n _this8.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.subOption = arr;\n item.fineSubjectNumber = item.subOption[0].value;\n item.fineSubjectCode = item.subOption[0].value;\n item.fineSubjectName = item.subOption[0].label;\n basicData.getCostAccountManagement(item.fineSubjectCode).then(function (res) {\n if (res.data.length > 0) {\n res.data.forEach(function (item1) {\n if (item1.pcode == item.fineSubjectCode) {\n arr.push({\n label: item1.subjectName,\n value: item1.subjectCode\n });\n }\n });\n\n _this8.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.childOption = arr;\n item.sonSubjectName = item.childOption[0].label;\n item.sonSubjectCode = item.childOption[0].value;\n }\n });\n } else {\n _this8.$message.info('暂无子科目数据');\n\n _this8.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.childOption = [];\n item.sonSubjectName = '';\n item.sonSubjectCode = '';\n }\n });\n }\n });\n }\n }); //赋值科目名称\n\n\n _this8.options.forEach(function (item) {\n if (item.value == value) {\n _this8.tableDataOutside.forEach(function (item1) {\n if (item1.key == key) {\n item1.subjectName = item.label;\n item1.subjectCode = item.value;\n item1.number = item.value;\n }\n });\n }\n });\n } else {\n _this8.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.subOption = [];\n item.fineSubjectCode = '';\n item.fineSubjectName = '';\n }\n });\n }\n });\n },\n subSubChange: function subSubChange(val, obj) {\n var _this9 = this;\n\n var value; // console.log(val, obj)\n\n if (obj.subOption) {\n obj.subOption.forEach(function (item) {\n if (item.value == val) {\n _this9.tableDataOutside.forEach(function (item1) {\n if (item1.key == obj.key) {\n item1.fineSubjectName = item.label;\n item1.fineSubjectNumber = item.value;\n value = item1.value;\n var arr = [];\n var key = obj.key;\n basicData.getCostAccountManagement(value).then(function (res) {\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == value) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n }); //默然赋值子科目的第一条数据\n\n _this9.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.childOption = arr;\n item.sonSubjectName = item.childOption[0].label;\n item.sonSubjectCode = item.childOption[0].value;\n }\n });\n } else {\n _this9.$message.info('暂无子科目数据');\n\n _this9.tableDataOutside.forEach(function (item) {\n if (item.key == key) {\n item.childOption = [];\n item.sonSubjectName = '';\n item.sonSubjectCode = '';\n }\n });\n }\n });\n }\n });\n }\n });\n }\n },\n //子科目名称赋值\n childSubChange: function childSubChange(val, obj) {\n var _this10 = this;\n\n if (obj.childOption) {\n obj.childOption.forEach(function (item) {\n if (item.value == val) {\n _this10.tableDataOutside.forEach(function (item1) {\n if (item1.key == obj.key) {\n item1.sonSubjectName = item.label;\n item1.sonSubjectCode = item.value;\n }\n });\n }\n });\n }\n },\n // 工程清单相关方法 end\n // handleRemove(file, fileList) {\n // console.log(file, fileList)\n // },\n // handlePictureCardPreview(file) {\n // this.dialogImageUrl = file.url\n // // this.dialogVisible = true\n // },\n handleFocusDisease: function handleFocusDisease() {\n this.$refs.disease.open();\n },\n openDisease: function openDisease() {\n this.$refs.disease.open();\n },\n handleFocusRespons: function handleFocusRespons() {\n this.$refs.respons.open(this.form.workOrderInformation.maintenanceUnitAuditId);\n },\n openRespons: function openRespons() {\n this.$refs.respons.open(this.form.workOrderInformation.maintenanceUnitAuditId);\n },\n //选取病害回填数据\n handleSelectDisease: function handleSelectDisease(data, sclection) {\n if (data.id && data.description) {\n if (!this.form.workOrderInformation.diseaseId) {\n this.form.workOrderInformation.diseaseId = '';\n }\n\n this.form.workOrderInformation.diseaseId += data.id + ';';\n this.form.workOrderInformation.description += data.startPeg + ';'; // this.form.workOrderInformation.diseaseId = data.id\n // this.form.workOrderInformation.description = data.description\n\n this.form.routeId = data.id;\n this.form.createAccount = data.createAccount; //创建人账号 运用于流程\n\n this.form.description = data.description; //病号描述\n\n this.form.createTime = data.createTime; //病害创建时间\n // this.$refs.diseaseName.focus()\n\n this.$refs.diseaseName.blur();\n console.log(this.form.workOrderInformation.diseaseId, 'ids');\n } else {\n this.$message.info('此病害无法添加');\n }\n },\n handleSelectRespons: function handleSelectRespons(data) {\n var _this11 = this;\n\n // console.log(data)\n this.hanldeResponsClear(); //每次回填清空当前数据,防止重复填写\n\n data.forEach(function (item) {\n _this11.form.workOrderInformation.responsiblePerson += item.name + ';';\n _this11.form.workOrderInformation.constructUnitId += item.id + ';'; // this.responsIdArr.push(item.id)\n });\n this.$refs.responsName.focus();\n this.$refs.responsName.blur();\n this.accountObj = {}; //施工人员账号对象\n //根据施工班组id查询用户账号循环进流程变量中,自定义的参数\n\n this.getResponsAccount().then(function (res) {\n res.forEach(function (item, index) {\n _this11.accountObj['props_' + index] = item;\n });\n });\n },\n handleDiseaseClear: function handleDiseaseClear() {\n this.form.workOrderInformation.diseaseId = '';\n this.form.workOrderInformation.description = '';\n this.form.routeId = '';\n this.form.createAccount = ''; //创建人账号 运用于流程\n\n this.form.description = ''; //病号描述\n\n this.form.createTime = ''; //病害创建时间\n },\n hanldeResponsClear: function hanldeResponsClear() {\n // this.responsIdArr = []\n this.form.workOrderInformation.constructUnitId = '';\n this.form.workOrderInformation.responsiblePerson = '';\n },\n // //字典回调数据\n handleDict: function handleDict(val, obj, str) {\n if (str === 'yhgd-gdlx') {\n this.form.workOrderInformation.typeValue = obj.name;\n } else if (str === 'fx') {\n this.form.disease.directionName = obj.name;\n }\n },\n handleCancel: function handleCancel() {\n this.$emit('handleCancel');\n },\n //根据选取的施工班组查询账户\n getResponsAccount: function getResponsAccount() {\n var _this12 = this;\n\n return new Promise(function (resolve, reject) {\n var arr = [];\n var params = {\n pageBean: {\n page: 1,\n pageSize: 10,\n showTotal: true\n },\n params: {},\n org_id_: '',\n querys: [{\n group: 'main',\n operation: 'IN',\n parentGroup: '',\n property: 'org_id_',\n relation: 'AND',\n value: []\n }],\n sorter: []\n };\n\n var arr_ = _this12.form.workOrderInformation.constructUnitId.split(';');\n\n params.querys[0].value = arr_.slice(0, arr_.length - 1);\n\n _this12.$http.post('${form}/api/user/v1/users/queryByType', params).then(function (res) {\n res.data.rows.forEach(function (item) {\n arr.push(item.account);\n });\n resolve(arr);\n });\n });\n },\n saveData: function saveData() {\n var _this13 = this;\n\n if (JSON.stringify(this.accountObj) === '{}' || !this.accountObj || this.accountObj == undefined) {\n if (this.form.workOrderInformation.constructUnitId !== undefined && this.form.workOrderInformation.constructUnitId !== '') {\n this.getResponsAccount().then(function (res) {\n res.forEach(function (item, index) {\n _this13.accountObj['props_' + index] = item;\n });\n });\n }\n }\n\n console.log(this.accountObj, 'accountObj'); //判断是否存在数据否则清除数据\n\n if (this.tableData.length !== 0 || this.tableDataOutside.length !== 0) {\n this.tableData.forEach(function (item, index) {\n if (!item.subjectName) {\n _this13.tableData.splice(index, 1);\n }\n });\n this.tableDataOutside.forEach(function (item, index) {\n if (!item.subjectName) {\n _this13.tableDataOutside.splice(index, 1);\n }\n });\n } // this.getResponsAccount()\n\n\n var _this = this; //验证表单是否填写完\n\n\n this.tableData.length !== 0 && this.tableData.forEach(function (item) {\n delete item.id;\n });\n this.form.billOfQuantities = this.tableData;\n this.form.billOutOfQuantities = this.tableDataOutside; // console.log(this.form, 'ddddddddddddddddd')\n\n this.$refs.taskManageForm.validate(function (pass) {\n if (pass) {\n //请求保存提交\n console.log(_this13.form, 'this.form'); // let accountObj = {} //施工人员账号对象\n // //根据施工班组id查询用户账号循环进流程变量中,自定义的参数\n // if (this.currentNode == 2) {\n // this.getResponsAccount().then(res => {\n // console.log(res, 'res工单信息')\n // // debugger\n // res.forEach((item, index) => {\n // accountObj['props_' + index] = item\n // })\n // })\n // }\n // this.accountObj = {} //施工人员账号对象\n // //根据施工班组id查询用户账号循环进流程变量中,自定义的参数\n // this.getResponsAccount().then(res => {\n // res.forEach((item, index) => {\n // this.accountObj['props_' + index] = item\n // })\n // })\n\n if (_this13.isFirst) {\n _this13.$http.post('${yhxt}/workOrderInformation/v1/saveVo', _this13.form).then(function (res) {\n console.log(res, 'resresree');\n\n if (res.data.state) {\n _this13.businessKeyId = res.data.value.workOrderInformation.id;\n _this13.jobNumber = res.data.value.workOrderInformation.jobNumber;\n }\n\n var params = {\n type: 'saveData',\n state: true,\n businessKey: _this13.businessKeyId,\n sysCode: ''\n };\n params.vars = {};\n\n if (_this13.form.createAccount) {\n params.vars.createAccount = _this13.form.createAccount; //创建者\n }\n\n if (_this13.form.description) {\n params.vars.description = _this13.form.description; //描述\n }\n\n if (_this13.form.createTime) {\n params.vars.createTime = _this13.form.createTime; //创建时间\n }\n\n if (_this13.jobNumber) {\n params.vars.jobNumber = _this13.jobNumber; //工单号\n }\n\n if (_this13.form.workOrderInformation.assignedPersonnelAccount) {\n params.vars.assignedPersonnelAccount = _this13.form.workOrderInformation.assignedPersonnelAccount; //养护人员账号\n }\n\n if (_this13.form.workOrderInformation.receivingPartyReviewAccount) {\n params.vars.receivingPartyReviewAccount = _this13.form.workOrderInformation.receivingPartyReviewAccount; //收方审核账号\n }\n\n if (_this13.form.workOrderInformation.maintenanceStationAuditAccount) {\n params.vars.maintenanceStationAuditAccount = _this13.form.workOrderInformation.maintenanceStationAuditAccount;\n }\n\n if (_this13.form.workOrderInformation.maintenanceDeptAccount) {\n params.vars.maintenanceDeptAccount = _this13.form.workOrderInformation.maintenanceDeptAccount; //养护站审核账号\n } //将施工账号存储进params.vars里\n\n\n if (_this13.accountObj) {\n params.vars = $.extend(params.vars, _this13.accountObj);\n }\n\n console.log(params.vars, '4444444444444444444444');\n hotent.sendMessage(params);\n _this13.isFirst = false; //数据保存后置为false,防止多次保存\n });\n } else {\n var params = {\n type: 'saveData',\n state: true,\n businessKey: _this13.businessKeyId,\n sysCode: ''\n };\n params.vars = {};\n\n if (_this13.form.createAccount) {\n params.vars.createAccount = _this13.form.createAccount; //创建者\n }\n\n if (_this13.form.description) {\n params.vars.description = _this13.form.description; //描述\n }\n\n if (_this13.form.createTime) {\n params.vars.createTime = _this13.form.createTime; //创建时间\n }\n\n if (_this13.jobNumber) {\n params.vars.jobNumber = _this13.jobNumber; //工单号\n }\n\n if (_this13.form.workOrderInformation.assignedPersonnelAccount) {\n params.vars.assignedPersonnelAccount = _this13.form.workOrderInformation.assignedPersonnelAccount; //养护人员账号\n }\n\n if (_this13.form.workOrderInformation.receivingPartyReviewAccount) {\n params.vars.receivingPartyReviewAccount = _this13.form.workOrderInformation.receivingPartyReviewAccount; //收方审核账号\n }\n\n if (_this13.form.workOrderInformation.maintenanceStationAuditAccount) {\n params.vars.maintenanceStationAuditAccount = _this13.form.workOrderInformation.maintenanceStationAuditAccount;\n }\n\n if (_this13.form.workOrderInformation.maintenanceDeptAccount) {\n params.vars.maintenanceDeptAccount = _this13.form.workOrderInformation.maintenanceDeptAccount; //养护站审核账号\n }\n\n if (_this13.accountObj) {\n // params.vars = {...accountObj, ...params[vars]}\n params.vars = $.extend(params.vars, _this13.accountObj);\n }\n\n console.log(params.vars, '4444444444444444444444');\n hotent.sendMessage(params);\n _this13.isFirst = false; //数据保存后置为false,防止多次保存\n }\n } else {\n return false;\n }\n });\n },\n //路线信息赋值\n changed: function changed(id) {\n var _this14 = this;\n\n this.form.workOrderInformation.roadSegmentId = id;\n this.roadOptions.forEach(function (item) {\n if (item.id == id) {\n _this14.form.workOrderInformation.roadSegmentName = item.name;\n }\n });\n this.form.workOrderInformation.contractId = '';\n this.getContractId(); //路段改变再次获取合同信息\n //根据路段查询科目名称数据\n // this.getByRoadSegmentId_Pcode()\n // 获取工程清单外信息\n\n this.getContractOutsideInfo(id);\n },\n getByRoadSegmentId_Pcode: function getByRoadSegmentId_Pcode() {\n var _this15 = this;\n\n var roadSegmentId = this.form.workOrderInformation.roadSegmentId;\n this.getByRoadSegmentId('', roadSegmentId).then(function (res) {\n if (res.length !== 0) {\n var pcode = res[0].subjectCode;\n\n _this15.getByRoadSegmentId(pcode, roadSegmentId).then(function (res) {\n _this15.options = [];\n _this15.cbkm = [];\n _this15.form.workOrderInformation.categoryId = '';\n _this15.form.workOrderInformation.detailsId = '';\n\n if (res.length !== 0) {\n res.forEach(function (item) {\n _this15.options.push({\n label: item.subjectName,\n value: item.subjectCode,\n roadSegmentId: item.roadSegmentId,\n roadSegmentName: item.roadSegmentName\n });\n });\n }\n });\n } else {\n //获取所有科目数据\n _this15.getTypeOptions();\n }\n });\n },\n getInfo: function getInfo() {\n var _this16 = this;\n\n basicData.getRoadManagement().then(function (res) {\n if (res.rows.length !== 0) {\n _this16.roadOptions = res.rows; // this.form.workOrderInformation.roadSegmentName = res.rows[0].name\n // this.form.workOrderInformation.roadSegmentId = res.rows[0].id\n\n _this16.getContractId(); //路段改变再次获取合同信息\n // this.getByRoadSegmentId_Pcode()\n\n\n _this16.getContractOutsideInfo(_this16.form.workOrderInformation.roadSegmentId);\n }\n });\n },\n // value(obj) {\n // console.log(obj)\n // if (obj) {\n // this.form.workOrderInformation.roadSegmentName = obj.name\n // this.form.workOrderInformation.roadSegmentId = obj.id\n // this.getContractId() //路段改变再次获取合同信息\n // }\n // },\n //公司赋值\n handleChanged: function handleChanged(obj) {\n console.log(obj.valueInfo.join(','));\n this.form.workOrderInformation.companyIds = JSON.stringify(obj.valueInfo);\n this.form.workOrderInformation.companyName = obj.name;\n this.form.workOrderInformation.companyId = obj.id;\n },\n companyValue: function companyValue(obj) {\n console.log(obj);\n this.form.workOrderInformation.companyName = obj.name;\n this.form.workOrderInformation.companyId = obj.id;\n this.form.workOrderInformation.companyIds = JSON.stringify(obj.id.split(' ')); //必须是空格\n },\n changesele: function changesele(value) {\n var _this17 = this;\n\n console.log(value);\n this.options.forEach(function (item) {\n if (value == item.value) {\n _this17.form.workOrderInformation.subjectName = item.label;\n _this17.form.workOrderInformation.categoryId = item.value;\n }\n });\n var arr = [];\n basicData.getCostAccountManagement(value).then(function (res) {\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == value) {\n arr.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n\n _this17.cbkm = arr;\n _this17.form.workOrderInformation.detailsId = arr[0].value;\n _this17.form.workOrderInformation.dsubjectName = arr[0].label;\n }); //查询子细目\n\n var val = arr[0].value;\n\n _this17.getsonCbkm(val);\n }\n });\n },\n //根据科目父节点编码以及路段id获取科目数据\n getByRoadSegmentId: function getByRoadSegmentId(pcode, id) {\n return new Promise(function (resolve, reject) {\n req.get(window.context.yhxt + \"/bizCourseDetails/v1/get/getByParentIdRoad?pCode=\".concat(pcode, \"&roadSegmentId=\").concat(id)).then(function (resp) {\n resolve(resp.data);\n }, function (error) {\n reject(error);\n });\n });\n },\n dsubchange: function dsubchange(val) {\n var _this18 = this;\n\n console.log(val);\n this.cbkm.forEach(function (item) {\n if (item.value == val) {\n _this18.form.workOrderInformation.dsubjectName = item.label;\n _this18.form.workOrderInformation.detailsId = item.value; //查询子细目\n\n var _val = item.value;\n\n _this18.getsonCbkm(_val);\n }\n });\n this.$forceUpdate();\n },\n //获取子细目数据\n getsonCbkm: function getsonCbkm(pcode) {\n var _this19 = this;\n\n var arrson = [];\n basicData.getCostAccountManagement(pcode).then(function (res) {\n if (res.data.length > 0) {\n res.data.forEach(function (item) {\n if (item.pcode == pcode) {\n arrson.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n }\n\n _this19.soncbkm = arrson;\n _this19.form.workOrderInformation.sonSubjectCode = arrson[0].value;\n _this19.form.workOrderInformation.sonSubjectName = arrson[0].label;\n });\n } else {\n _this19.$message.info('暂无子细目数据');\n }\n });\n },\n //子细目\n sondsubchange: function sondsubchange(val) {\n var _this20 = this;\n\n this.soncbkm.forEach(function (item) {\n if (item.value == val) {\n _this20.form.workOrderInformation.sonSubjectName = item.label;\n _this20.form.workOrderInformation.sonSubjectCode = item.value;\n }\n });\n },\n //获取类型数据\n getTypeOptions: function getTypeOptions() {\n var _this21 = this;\n\n this.options = [];\n var data = 'CBKM';\n basicData.getCostAccountManagement(data).then(function (res) {\n res.data.forEach(function (item) {\n _this21.options.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n });\n });\n },\n //获取合同信息\n getContractId: function getContractId() {\n var _this22 = this;\n\n var params = {\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n },\n params: {},\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n property: 'road_segment_id_',\n relation: 'AND',\n value: this.form.workOrderInformation.roadSegmentId\n }],\n sorter: [{\n direction: 'DESC',\n property: 'contract_date_'\n }]\n };\n basicData.getDailyMaintenanceontract(params).then(function (res) {\n console.log(res, 'd');\n _this22.contractInfoList = res.rows;\n\n if (_this22.contractInfoList.length !== 0 && _this22.$route.query.node == 1) {\n _this22.form.workOrderInformation.contractId = _this22.contractInfoList[0].id;\n }\n\n console.log(_this22.contractInfoList);\n });\n },\n //赋值合同名称\n contractChange: function contractChange(val) {\n console.log(val); // this.contractInfoList.forEach((item) => {\n // this.form.workOrderInformation.contractId = item.id\n // })\n },\n //公司赋值\n handleChangedA: function handleChangedA(obj) {\n // console.log(obj.valueInfo.join(','))\n this.form.workOrderInformation.maintenanceUnitAuditIds = JSON.stringify(obj.valueInfo);\n this.form.workOrderInformation.maintenanceUnitAudit = obj.name;\n this.form.workOrderInformation.maintenanceUnitAuditId = obj.id; //根据id获取当前组织单位下的用户角色\n\n this.getByOrgId(obj.id);\n },\n companyValueA: function companyValueA(obj) {\n // console.log(obj)\n this.form.workOrderInformation.maintenanceUnitAudit = obj.name;\n this.form.workOrderInformation.maintenanceUnitAuditId = obj.id; // this.responsId = this.form.workOrderInformation.maintenanceUnitAuditId\n\n this.form.workOrderInformation.maintenanceUnitAuditIds = JSON.stringify(obj.id.split(' ')); //必须是空格\n\n this.getByOrgId(obj.id);\n },\n //获取用户选择养护单位下组织用户\n getByOrgId: function getByOrgId(orgId) {\n var _this23 = this;\n\n var params = {\n pageBean: {\n page: 1,\n pageSize: -1\n },\n querys: [{\n group: 'orgTree',\n operation: 'IN',\n property: 'ORG_ID_',\n relation: 'AND',\n value: orgId\n }],\n sorter: [{\n direction: 'DESC',\n property: 'updateTime'\n }]\n };\n this.$http.post('${yhxt}/api/user/v1/users/getOrgUserQuery', params).then(function (res) {\n var data = res.data.rows;\n _this23.orgUserArr = data; //默认赋值第一条数据养护人员名称\n\n if (data.length != 0) {\n _this23.form.workOrderInformation.assignedPersonnelId = data[0].id;\n _this23.form.workOrderInformation.assignedPersonnelAccount = data[0].account;\n _this23.form.workOrderInformation.assignedPersonnel = data[0].fullname;\n } else {\n _this23.form.workOrderInformation.assignedPersonnelId = '';\n _this23.form.workOrderInformation.assignedPersonnelAccount = '';\n _this23.form.workOrderInformation.assignedPersonnel = '';\n } //根据承包方经办人id查询承包方负责人\n\n\n var reviewID = _this23.form.workOrderInformation.assignedPersonnelId;\n\n _this23.getByReviewId(reviewID);\n });\n },\n //根据承包方经办人id查询承包方负责人\n getByReviewId: function getByReviewId(id) {\n var _this24 = this;\n\n this.$http.get('${yhxt}/workOrderInformation/v1/getPrincipal?userId=' + id).then(function (res) {\n _this24.reviewUserArr = res.data;\n });\n },\n //组织用户回调函数\n handleOrgUserchange: function handleOrgUserchange(id) {\n var _this25 = this;\n\n this.orgUserArr.forEach(function (item) {\n if (item.id == id) {\n _this25.form.workOrderInformation.assignedPersonnelId = item.id;\n _this25.form.workOrderInformation.assignedPersonnelAccount = item.account;\n _this25.form.workOrderInformation.assignedPersonnel = item.fullname;\n }\n });\n this.$forceUpdate();\n },\n handleReviewUserchange: function handleReviewUserchange(id) {\n var _this26 = this;\n\n this.reviewUserArr.forEach(function (item) {\n if (item.id == id) {\n _this26.form.workOrderInformation.receivingPartyReviewId = item.id;\n _this26.form.workOrderInformation.receivingPartyReviewAccount = item.account;\n _this26.form.workOrderInformation.receivingPartyReview = item.fullname;\n }\n });\n this.$forceUpdate();\n }\n }\n};",null]}