{"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\\approvalWorkDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\components\\flowURLForm\\approvalWorkDialog.vue","mtime":1706175428928},{"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 _typeof from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/typeof.js\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 RoadInfoDialog from '@/components/dialog/RoadInfoDialog.vue';\nimport companyInfoSelector from '@/components/selector/companyInfoSelector.vue';\nimport EipUserSelector from '@/components/eipControl/selector/EipUserSelector.vue';\nimport DictSelect from '@/components/dict/DictSelect.vue';\nexport default {\n name: 'PatrolWorkOrder',\n // 巡检工单\n components: {\n RoadInfoDialog: RoadInfoDialog,\n EipUserSelector: EipUserSelector,\n DictSelect: DictSelect,\n companyInfoSelector: companyInfoSelector\n },\n data: function data() {\n return {\n currentNode: 1,\n form: {\n roadSegmentName: '',\n rummagerId: '',\n rummagerName: '',\n patrolDate: '',\n type: '1',\n content: '',\n props1: ''\n },\n tableData: [],\n options: [],\n cbkm: [],\n roadData: [],\n temporaryOptions: [{\n label: '否',\n value: 0\n }, {\n label: '是',\n value: 1\n }],\n //是否暂存\n handlingSituationOptions: [{\n label: '未处理',\n value: 0\n }, {\n label: '处理中',\n value: 1\n }, {\n label: '已处理',\n value: 2\n }, {\n label: '观察记录',\n value: 3\n }],\n companyOptions: [],\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 typeOptions: []\n };\n },\n created: function created() {\n this.typeOptions = utils.getDictItemsFromCache('xjlx');\n this.getDataInfo();\n },\n mounted: function mounted() {\n this.currentNode = this.$route.query.node;\n var _this = this;\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 if (this.id) {\n req.get(window.context.yhxt + '/siteInspection/v1/get/' + this.id).then(function (res) {\n if (res.data) {\n res.data.type ? res.data.type = res.data.type + '' : null;\n _this.form = res.data;\n }\n });\n }\n },\n methods: {\n /* 添加病害 */\n //按钮添加一行数据\n addListItem: function addListItem() {\n var length = this.tableData.length;\n // let workOrderInformationId =\n // this.form.workOrderInformation && this.form.workOrderInformation.id\n // ? this.form.workOrderInformation.id\n // : ''\n // let contractId =\n // this.form.workOrderInformation &&\n // this.form.workOrderInformation.contractId\n // ? this.form.workOrderInformation.contractId\n // : ''\n var newData = {\n // todo 回显时需加上工单id合同id,key\n key: length + 1,\n companyId: this.companyOptions[0].id ? this.companyOptions[0].id : '',\n //公司信息\n companyName: this.companyOptions[0].name ? this.companyOptions[0].name : '',\n //公司信息\n roadId: this.roadData[0].id ? this.roadData[0].id : '',\n //路段信息\n type: 1,\n direction: 1,\n categoryId: '',\n //病号类别id\n subjectName: '',\n //病号类别名称\n subOption: [],\n //病害细目,\n detailsId: '',\n //病害细目id\n dsubjectName: '',\n //病害细目名称\n temporary: 1,\n //是否暂存\n // position: 1, //病害部位\n handlingSituation: 1 //处理情况\n };\n\n this.tableData.push(newData);\n },\n deleteListItem: function deleteListItem(index) {\n this.tableData.splice(index, 1);\n },\n //根据病害类别获取病害细目\n changesele: function changesele(value, key) {\n var _this2 = this;\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 _this2.tableData.forEach(function (item) {\n if (item.key == key) {\n item.subOption = arr;\n item.detailsId = item.subOption[0].value;\n item.dsubjectName = item.subOption[0].label;\n }\n });\n //赋值类别名称\n _this2.options.forEach(function (item) {\n if (item.value == value) {\n _this2.form.detailList.forEach(function (item1) {\n if (item1.key == key) {\n item1.subjectName = item.label;\n item1.categoryId = item.value;\n }\n });\n }\n });\n } else {\n _this2.tableData.forEach(function (item) {\n if (item.key == key) {\n item.subOption = [];\n item.subSubjectName = '';\n }\n });\n }\n });\n },\n //细目改变事件,赋值细科目名称\n subSubChange: function subSubChange(val, obj) {\n var _this3 = this;\n // console.log(val, obj)\n if (obj.subOption) {\n obj.subOption.forEach(function (item) {\n if (item.value == val) {\n _this3.form.detailList.forEach(function (item1) {\n if (item1.key == obj.key) {\n item1.detailsId = item.value;\n item1.dsubjectName = item.label;\n }\n });\n }\n });\n }\n },\n //获取路段下拉信息\n getDataInfo: function getDataInfo() {\n var _this4 = this;\n // 获取路段信息\n basicData.getRoadManagement().then(function (res) {\n _this4.roadData = res.rows;\n });\n // 获取病害类别\n if (this.options.length == 0) {\n var data = 'CBKM';\n basicData.getCostAccountManagement(data).then(function (res) {\n res.data.forEach(function (item) {\n _this4.options.push({\n label: item.subjectName,\n value: item.subjectCode\n });\n });\n });\n }\n //获取公司信息\n this.$http.post('${yhxt}/Company/v1/getCompany').then(function (res) {\n res.data.forEach(function (item) {\n _this4.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 //如果不是,简单复制\n objClone[key] = obj[key];\n }\n }\n }\n }\n },\n //字典回调,赋值\n handleSelectValue: function handleSelectValue(val, obj, str) {\n if (str == 'xjlb') {\n this.tableData.forEach(function (item) {\n if (item.key == obj.key) {\n item.typeName = obj.name;\n }\n });\n } else if (str == 'fx') {\n this.tableData.forEach(function (item) {\n if (item.key == obj.key) {\n item.directionName = obj.name;\n }\n });\n } else if (str == 'bhbw') {\n this.tableData.forEach(function (item) {\n if (item.key == obj.key) {\n item.positionName = obj.name;\n }\n });\n }\n },\n /* 添加病害结束 */saveData: function saveData() {\n var _this5 = this;\n var _this = this;\n //验证表单是否填写完\n this.$refs.taskManageForm.validate(function (pass) {\n if (pass) {\n //请求保存提交\n console.log(_this5.form, 'this.form');\n _this5.$http.post('${yhxt}/siteInspection/v1/saveSiteInspectionSpecial', _this5.form).then(function (res) {\n if (res.data.state) {\n var params = {\n type: 'saveData',\n state: true,\n businessKey: res.data.value.id,\n sysCode: ''\n };\n // params.vars = {\n // props1: this.forms.props1,\n // }\n hotent.sendMessage(params);\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 top.postMessage({\n handlerType: 'isMaskShow',\n params: {\n isMaskShow: false\n }\n }, '*');\n },\n //所属路线打开弹框\n openRoad: function openRoad() {\n this.$refs.road.open();\n }\n }\n};",null]}