{"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\\specialProjectManagement\\children\\ProjectManagement.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\specialProjectManagement\\children\\ProjectManagement.vue","mtime":1724436823385},{"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.regexp.split\";\nimport \"core-js/modules/es6.object.keys\";\nimport _typeof from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/typeof.js\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\nimport \"core-js/modules/es6.reflect.delete-property\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { mapState } from 'vuex';\nimport req from '@/request.js';\nimport basicData from '@/api/basicData.js';\nimport BridgeInfoDialog from '@/components/dialog/BridgeInfoDialog.vue';\nimport eipOrgSelector from '@/components/eipControl/selector/EipOrgSelector.vue';\nimport eipUserSelector from '@/components/eipControl/selector/EipUserSelector.vue';\nimport UserSelector from '@/components/selector/userSelector.vue';\nimport sctionInfoSelector from '@/components/selector/sctionInfoSelector.vue';\nimport companyInfoSelector from '@/components/selector/companyInfoSelector.vue';\nimport fileUpload from '@/components/upload/fileUploadProject.vue';\nimport CascaderCompany from '@/components/selector/CascaderCompany.vue';\nimport EntryNameDialog from '@/components/dialog/EntryNameDialog.vue';\nexport default {\n name: 'ProjectManagement',\n components: {\n BridgeInfoDialog: BridgeInfoDialog,\n // eipOrgSelector,\n eipUserSelector: eipUserSelector,\n // UserSelector,\n // sctionInfoSelector,\n companyInfoSelector: companyInfoSelector,\n fileUpload: fileUpload,\n CascaderCompany: CascaderCompany,\n EntryNameDialog: EntryNameDialog\n },\n data: function data() {\n return {\n fullscreenLoading: false,\n //全屏加载控件\n dadToSon: {\n bizPath: 'specialproject',\n fileList: []\n },\n accessories: [],\n roadData: [],\n searchForm: {},\n companyOptions: [],\n company: [],\n dataBaseOptions: {\n dataBaseId: '',\n tableName: 'biz_engineering_project',\n // 必填\n tableSchema: ''\n },\n originAPIOptions: {\n url: '/bizEngineeringProject/v1/getJson',\n // 列表请求接口地址\n method: 'post',\n // 列表请求方法\n moduleRoot: 'yhxt' // 微服务根路径\n },\n\n exportQuery: {},\n data: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n pageBean: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n dialogVisible: false,\n dialogVisibleEnclosure: false,\n //判断是否是添加还是修改\n type: '',\n form: {\n project: '',\n projectYear: '',\n //年份\n checkUnitConfirmSituation: '1',\n //检查单位肯定情况\n checkProgress: '1',\n //检测进度\n designUnitConfirmSituation: '1',\n //设计单位确定情况\n designProgress: '1',\n //设计进度\n settlementInfo: '1',\n //结算情况\n checkType: '1',\n //检测类型\n constructionProgress: '1',\n //施工进度\n projectNature: '1',\n //工程属性\n isCheck: '1',\n //是否检测\n isDesign: '1',\n //是否设计\n isTendering: '1',\n //是否招标\n isDeliver: '1',\n //是否交工\n startupFlag: '1',\n //开工状态\n projectType: '1',\n specialType: 1,\n // 专项类型\n workProgress: 0,\n // 工作进度\n accessories: [],\n projectName: '' //项目名称\n },\n\n disabledSave: false,\n companyPathId: '',\n //公司路径id\n constructUnitPersonLiable: 'userId',\n //防止影响选择施工单位负责人\n permission: 'w',\n //附件数据\n enclosureData: [],\n //附件管理所需id\n sourceId: '',\n //删除附件管理ids\n ids: [],\n loading: false,\n //上传附件加载控制\n disabled: false,\n //按钮禁用控制\n downLoading: false,\n //文件导出加载控制\n accept: '.jpg,.jpeg,.png,.bmp,.pdf,.JPG,.JPEG,.PBG,.BMP,.PDF,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.rtf,.txt,.zip,.rar,.vsd,.dwg,',\n files: [],\n activeNames: ['1', '2', '3', '4'],\n optionYears: [],\n //顶部搜索年份选择数组\n formExport: {\n roadSegmentId: '',\n contractId: '',\n projectId: ''\n },\n tableData: [],\n exportDialogVisible: false,\n contractOptions: [],\n //选择合同信息\n projectOptions: [],\n //选取项目\n budgetIds: [],\n roadOptions: [],\n //选取路段\n projectParams: {\n pageBean: {\n pageSize: -1,\n showTotal: true\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'roadSegmentId',\n relation: 'AND',\n value: ''\n }]\n },\n projectList: [],\n contractPrams: {\n pageBean: {\n pageSize: -1,\n showTotal: true\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'projectId',\n relation: 'AND',\n value: ''\n }]\n },\n exportRules: {\n roadSegmentId: {\n required: true,\n message: '请选择路段名称',\n trigger: 'change'\n },\n projectId: {\n required: true,\n message: '请选择项目名称',\n trigger: 'change'\n }\n },\n controlUrl: false,\n //控制导出url地址\n active: 0,\n routers: [],\n // 跳转路由配置\n routeForm: {},\n specialTypeOptions: [{\n label: '政策型专项',\n value: '0'\n }, {\n label: '非政策型专项',\n value: '1'\n }],\n // 专项类型options\n rules: {\n companyName: {\n required: true,\n message: '请选择所属公司',\n trigger: 'blur'\n },\n projectName: {\n required: true,\n message: '请输入项目名称',\n trigger: 'blur'\n },\n project: {\n required: true,\n message: '请选择预算项目',\n trigger: 'blur'\n },\n projectYear: {\n required: true,\n message: '请输入项目年份',\n trigger: 'blur'\n },\n // projectMoney: {\n // required: true,\n // message: '请输入项目金额',\n // trigger: 'blur',\n // },\n // workProgress: {\n // required: true,\n // message: '请输入工作进度',\n // trigger: 'blur',\n // },\n roadSegmentName: {\n required: true,\n message: '请选择路段',\n trigger: 'blur'\n },\n // accessories: {\n // required: true,\n // message: '请上传附件',\n // trigger: 'blur',\n // },\n // designUnit: {\n // required: true,\n // },\n // constructUnitName: {\n // required: true\n // },\n // constructUnitPersonLiable: {\n // required: true\n // },\n // supervisorUnit: {\n // required: true\n // },\n // ownerRepresentative: {\n // required: true\n // },\n supportStartTime: {\n required: true,\n message: '请选择预期开始时间',\n trigger: 'blur'\n },\n supportDeliverTime: {\n required: true,\n message: '请选择预期交工时间',\n trigger: 'blur'\n }\n }\n };\n },\n computed: mapState({\n // submitUrl: function () {\n // return `${window.context.portal}/portal/commonBasic/v1/`\n // },\n downLoad: function downLoad() {\n return \"\".concat(window.context.portal, \"/bizEngineeringAccessories/v1/minioDrawingUpload?sourceId=\").concat(this.sourceId);\n },\n deleteUrl: function deleteUrl() {\n sessionStorage.removeItem('projectRow'); // 清除浏览中数据\n return window.context.yhxt + '/bizEngineeringProject/v1/updateEngineeringProject';\n },\n headers: function headers(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n mounted: function mounted() {\n var _this = this;\n this.$nextTick(function () {\n _this.findinfo();\n });\n this.$EventBus.$on('route', function (data) {\n _this.routeForm = JSON.parse(data);\n console.log(_this.routeForm, 'form');\n });\n if (this.routeForm.roadSegmentId != undefined) {\n this.active = 1;\n this.searchForm.roadSegmentId = this.routeForm.roadSegmentId;\n this.findinfo();\n }\n },\n beforeDestroy: function beforeDestroy() {\n this.$EventBus.$off('route');\n },\n created: function created() {\n this.init();\n this.roadData = this.getroad();\n console.log(this.$route.params.value, 'this.roadData');\n this.company = this.getCompany();\n this.getYear();\n // 获取工程管理下面菜单路由信息\n var routers = JSON.parse(sessionStorage.getItem('currentFrontMenus')).filter(function (item) {\n return item.alias == 'specialProjectManagement';\n });\n this.routers = routers[0].children;\n },\n methods: {\n tableRowClassName: function tableRowClassName(_ref) {\n var row = _ref.row;\n if (row.beCompleted == 1) {\n return 'error-row';\n }\n return '';\n },\n handleCommand: function handleCommand(params) {\n this.$router.push({\n name: params.command,\n params: params.row\n });\n var searchParams = {\n searchForm: this.searchForm,\n pageResult: this.pageResult\n };\n sessionStorage.setItem('searchParams', JSON.stringify(searchParams));\n // 添加时带入信息\n // let data = {\n // roadSegmentId: params.row.roadSegmentId,\n // roadSegmentName: params.row.roadSegmentName,\n // projectId: params.row.id,\n // projectName: params.row.projectName\n // }\n // sessionStorage.setItem('projectRow', JSON.stringify(data))\n },\n handleSelectionChange: function handleSelectionChange(rows) {\n if (rows && rows.length == 0) return;\n var data = {\n roadSegmentId: rows[0].roadSegmentId,\n roadSegmentName: rows[0].roadSegmentName,\n projectId: rows[0].id,\n projectName: rows[0].projectName\n };\n sessionStorage.setItem('projectRow', JSON.stringify(data));\n },\n //获取顶部搜索的年份区间\n getYear: function getYear() {\n var myDate = new Date();\n var startYear = 2006; //起始年份\n var endYear = myDate.getFullYear() + 3; //结束年份\n for (var i = endYear; i >= startYear; i--) {\n this.optionYears.push({\n label: i + '年',\n value: i\n });\n }\n },\n handleSelectRoad: function handleSelectRoad(id) {\n var _this2 = this;\n this.roadData.length !== 0 && this.roadData.forEach(function (item) {\n if (item.id === id) {\n _this2.form.roadSegmentName = item.name;\n _this2.form.companyId = item.companyId;\n _this2.form.companyName = item.companyName;\n }\n });\n },\n sonToDad: function sonToDad(data) {\n console.log(data);\n var arr = [];\n data.forEach(function (item) {\n arr.push({\n isDele: item.isDele,\n attachmentName: item.name,\n attachmentPath: item.url,\n attachmentSuffix: item.suffix,\n attachmentType: item.type,\n type: 0\n });\n });\n this.accessories = arr;\n this.form.accessories = arr;\n // 防止用户打开了文件选择框之后不选择文件而出现效验失败\n if (this.form.accessories) {\n this.$refs.ruleForm.clearValidate('accessories');\n }\n },\n //初始化年份\n init: function init() {\n var myDate = new Date();\n var year = myDate.getFullYear(); //获取当前年\n this.initSelectYear(year);\n this.form.projectYear = year;\n },\n //计算要显示年份\n initSelectYear: function initSelectYear(year) {\n this.years = [];\n for (var i = 0; i < 12; i++) {\n this.years.push({\n value: year - i,\n label: year - i + '年'\n });\n }\n },\n //年份赋值\n yearChange: function yearChange(value) {\n this.form.projectYear = value;\n },\n //所属桥梁获取焦点触发事件\n handleFocusRouter: function handleFocusRouter() {\n this.$refs.bridge.open();\n },\n //所属桥梁打开弹框\n openRoute: function openRoute() {\n this.$refs.bridge.open();\n },\n //选取桥梁回填数据\n handleSelectBridge: function handleSelectBridge(data) {\n this.form.brigeName = data.name;\n this.form.brigeId = data.id;\n this.$refs.brigeName.focus();\n this.$refs.brigeName.blur();\n },\n afterDelete: function afterDelete() {\n this.$refs.htTable.load();\n },\n //新增\n handleAdd: function handleAdd() {\n this.dialogVisible = false;\n this.dialogVisible = true;\n this.projectList = [];\n this.type = 'add';\n this.form = _objectSpread(_objectSpread({}, this.form), {}, {\n specialType: '0',\n projectType: 1,\n project: '',\n roadSegmentId: this.$route.params.value.roadSegmentId,\n roadSegmentName: this.$route.params.value.name\n });\n },\n //修改\n handleEdit: function handleEdit(data) {\n var _this3 = this;\n // let form = {\n // projectYear: '', //年份\n // checkUnitConfirmSituation: '1', //检查单位肯定情况\n // checkProgress: '1', //检测进度\n // designUnitConfirmSituation: '1', //设计单位确定情况\n // designProgress: '1', //设计进度\n // settlementInfo: '1', //结算情况\n // checkType: '1', //检测类型\n // constructionProgress: '1', //施工进度\n // projectNature: '1', //工程属性\n // isCheck: '1', //是否检测\n // isDesign: '1', //是否设计\n // isTendering: '1', //是否招标\n // isDeliver: '1', //是否交工\n // startupFlag: '1' //开工状态\n // }\n // this.sourceId = data.id\n // this.type = 'edit'\n // this.dialogVisible = true\n // this.form = {...form, ...data}\n this.type = 'edit';\n this.projectList = [];\n this.$http.get('${form}/bizEngineeringProject/v1/getVo/' + data.id).then(function (res) {\n console.log(res);\n _this3.dialogVisible = true;\n var accessories = res.data.bizEngineeringAccessoriesList || [];\n _this3.form = res.data.bizEngineeringProject;\n _this3.form.accessories = accessories;\n _this3.form.project = '';\n _this3.budgetIds = res.data.budgetIds;\n res.data.bizEngineeringAccessoriesList.forEach(function (item) {\n item.url = item.attachmentPath;\n item.name = item.attachmentName;\n });\n if (_this3.form.project == '' || _this3.form.project == undefined) {\n _this3.form.project = _this3.form.projectName;\n } else {\n _this3.form.project = _this3.projectList.join(',');\n }\n console.log(_this3.form.project, 'this.form.project');\n console.log(_this3.projectList, 'this.projectList');\n if (_this3.form.projectName == '' || _this3.form.projectName == undefined) {\n _this3.form.projectName = _this3.projectList.join(',');\n }\n _this3.dadToSon.fileList = res.data.bizEngineeringAccessoriesList;\n });\n },\n handleClose: function handleClose(done) {\n //清空表单\n this.form = {\n projectYear: '',\n //年份\n checkUnitConfirmSituation: '1',\n //检查单位肯定情况\n checkProgress: '1',\n //检测进度\n designUnitConfirmSituation: '1',\n //设计单位确定情况\n designProgress: '1',\n //设计进度\n settlementInfo: '1',\n //结算情况\n checkType: '1',\n //检测类型\n constructionProgress: '1',\n //施工进度\n projectNature: '1',\n //工程属性\n isCheck: '1',\n //是否检测\n isDesign: '1',\n //是否设计\n isTendering: '1',\n //是否招标\n isDeliver: '1',\n //是否交工\n startupFlag: '0' //开工状态\n };\n\n this.dadToSon.fileList = [];\n // this.$refs.exportRef.resetField()\n done();\n },\n //取消弹窗\n handleCancel: function handleCancel() {\n //清空表单\n // this.form = {companyName: '', companyId: ''}\n this.form = {\n projectYear: '',\n //年份\n checkUnitConfirmSituation: '1',\n //检查单位肯定情况\n checkProgress: '1',\n //检测进度\n designUnitConfirmSituation: '1',\n //设计单位确定情况\n designProgress: '1',\n //设计进度\n settlementInfo: '1',\n //结算情况\n checkType: '1',\n //检测类型\n constructionProgress: '1',\n //施工进度\n projectNature: '1',\n //工程属性\n isCheck: '1',\n //是否检测\n isDesign: '1',\n //是否设计\n isTendering: '1',\n //是否招标\n isDeliver: '1',\n //是否交工\n startupFlag: '1' //开工状态\n };\n\n this.dialogVisible = false;\n this.dadToSon.fileList = [];\n },\n //提交保存或者修改\n handleSubmit: function handleSubmit() {\n var _this4 = this;\n //验证表单是否填写完\n this.$refs.form.validate(function (bool) {\n if (bool) {\n _this4.disabledSave = true;\n _this4.fullscreenLoading = true;\n Reflect.deleteProperty(_this4.form, 'accessories');\n // this.dialogVisible = false\n //请求保存提交\n _this4.form.workProgress = _this4.form.workProgress;\n var data = {\n bizEngineeringAccessoriesList: _this4.accessories,\n bizEngineeringProject: _this4.form,\n budgetIds: _this4.budgetIds\n };\n basicData.addProjectManagementData(data).then(function (res) {\n //请求附件管理\n if (res.state) {\n _this4.$message.success(res.message);\n _this4.dialogVisible = false;\n _this4.fullscreenLoading = false;\n _this4.$refs.htTable.load();\n } else {\n _this4.$message.error(res.message);\n }\n\n // this.getEnclosureData(res.value.id)\n // if (res.message === '添加成功') {\n // this.dialogVisible = false\n // this.type = 'edit'\n // }\n // else {\n // this.dialogVisible = false\n // this.form = {\n // projectYear: '', //年份\n // checkUnitConfirmSituation: '1', //检查单位肯定情况\n // checkProgress: '1', //检测进度\n // designUnitConfirmSituation: '1', //设计单位确定情况\n // designProgress: '1', //设计进度\n // settlementInfo: '1', //结算情况\n // checkType: '1', //检测类型\n // constructionProgress: '1', //施工进度\n // projectNature: '1', //工程属性\n // isCheck: '1', //是否检测\n // isDesign: '1', //是否设计\n // isTendering: '1', //是否招标\n // isDeliver: '1', //是否交工\n // startupFlag: '1' //开工状态\n // }\n // }\n\n //打开修改弹窗\n // if (this.type === 'add') {\n // this.dialogVisible = true\n // this.handleEdit(res.value)\n // } else {\n // this.dialogVisible = false\n // }\n // this.handleEdit(res.value)\n // this.loadData() //重新获取数据\n });\n }\n });\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 companyIds: '',\n startupFlag: '',\n projectName: '',\n projectYear: '',\n specialType: ''\n });\n this.findinfo();\n },\n findinfo: function findinfo() {\n var _this5 = this;\n console.log(this.searchForm, 'searchForm');\n console.log(this.roadData, 'roadData');\n var roadSegmentId = this.roadData.map(function (item) {\n return item.id;\n });\n typeof this.$refs.filterTable !== 'undefined' && this.$refs.filterTable.clearFilter();\n var searchParams = JSON.parse(sessionStorage.getItem('searchParams'));\n var pageResult = {};\n if (searchParams) {\n this.searchForm = searchParams.searchForm;\n pageResult = searchParams.pageResult;\n }\n var query = [];\n var search = {\n road_segment_id_: this.searchForm.companyIds,\n constructUnitName: this.searchForm.constructUnitName,\n designUnit: this.searchForm.designUnit,\n supervisorUnit: this.searchForm.supervisorUnit,\n // startupFlag: this.searchForm.startupFlag,\n projectName: this.searchForm.projectName,\n roadSegmentId: this.searchForm.roadSegmentId,\n projectYear: this.searchForm.projectYear,\n specialType: this.searchForm.specialType,\n constructionProgress: this.searchForm.constructionProgress\n };\n for (var i in search) {\n if (search[i]) {\n if (i == 'road_segment_id_' || i == 'roadSegmentId') {\n query.push({\n group: 'companyIds',\n operation: 'IN',\n parentGroup: '',\n property: i,\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 query = this.uniqueFunc(query, 'property');\n var data = {\n pageBean: {\n page: pageResult.page || 1,\n pageSize: pageResult.pageSize || 20,\n showTotal: true\n },\n querys: query\n };\n this.topQuery = query;\n basicData.getProjectManagementData(data).then(function (response) {\n // console.log(res, '11')\n _this5.tableData = response.rows;\n _this5.pageBean = {\n page: response.page,\n pageSize: response.pageSize,\n total: response.total\n };\n // 清除缓存数据\n if (searchParams) {\n sessionStorage.removeItem('searchParams');\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 name: item.name,\n id: item.id\n });\n });\n });\n return arr;\n },\n getCompany: function getCompany() {\n var _this6 = this;\n this.$http.post('${yhxt}/Company/v1/getCompany').then(function (res) {\n res.data.forEach(function (item) {\n _this6.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 loadData: function loadData(param, cb) {\n var _this7 = this;\n // let r = JSON.stringify(param.pageBean)\n // let l = JSON.stringify(this.pageResult)\n // console.log(r, l)\n // if (r == l) {\n // param\n // } else {\n // let query = []\n // let search = {\n // constructUnitName: this.searchForm.constructUnitName,\n // designUnit: this.searchForm.designUnit,\n // supervisorUnit: this.searchForm.supervisorUnit,\n // startupFlag: this.searchForm.startupFlag,\n // projectName: this.searchForm.projectName\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 param.sorter && param.sorter.forEach(function (item) {\n if (item.property == 'roadSegmentName') {\n item.property = 'road_segment_name_';\n }\n });\n this.exportQuery = param;\n basicData.getProjectManagementData(param).then(function (response) {\n console.log(response);\n _this7.data = response.rows;\n _this7.pageResult = {\n page: response.page,\n pageSize: response.pageSize,\n total: response.total\n };\n }).finally(function () {\n if (cb) {\n if (Object.keys(_this7.$route.params).length !== 0 && Object.keys(_this7.$route.params.value).length !== 0 && _this7.$route.params.value.roadSegmentId && !_this7.isFindinfo) {\n _this7.searchForm = {\n roadSegmentId: _this7.$route.params.value.roadSegmentId,\n projectYear: _this7.$route.params.year || new Date().getFullYear()\n };\n _this7.isFindinfo = true;\n _this7.findinfo();\n }\n cb();\n }\n });\n },\n //附件管理\n handleEnclosure: function handleEnclosure() {\n var _this8 = this;\n this.$refs.form.validate(function (bool) {\n // this.dialogVisibleEnclosure = true\n if (bool) {\n if (_this8.type === 'edit') {\n _this8.dialogVisibleEnclosure = true;\n _this8.getEnclosureData(_this8.sourceId);\n } else {\n _this8.$message.error('请先保存该表单才能进入附件管理');\n }\n } else {\n _this8.$message.error('请先保存该表单才能进入附件管理');\n }\n });\n },\n getEnclosureData: function getEnclosureData(id) {\n var _this9 = this;\n var params = {\n pageBean: {\n page: 1,\n pageSize: 20,\n showTotal: true\n },\n params: {},\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'sourceId',\n relation: 'AND',\n value: id\n }],\n sorter: []\n };\n basicData.getEnclosureManagement(params).then(function (res) {\n _this9.enclosureData = res.rows;\n });\n },\n handleCloseEnclosure: function handleCloseEnclosure(done) {\n this.enclosureData = [];\n done();\n },\n //文件上传时的钩子\n progress: function progress(event, file, fileList) {\n //将图标改成加载图标\n this.loading = true;\n //将按钮禁用\n this.disabled = true;\n },\n success: function success(response, file, fileList) {\n this.$message.success('文件上传成功');\n //重新加载数据\n this.getEnclosureData(this.sourceId);\n //将图标改成上传图标\n this.loading = false;\n //将按钮解禁\n this.disabled = false;\n },\n error: function error(response, file, fileList) {\n this.$message.error('文件上传失败');\n delete this.uploadingFiles[Base64.encode(file.name)];\n },\n //去重\n unique: function unique(arr) {\n for (var i = 0; i < arr.length; i++) {\n for (var j = i + 1; j < arr.length; j++) {\n if (arr[i] == arr[j]) {\n //第一个等同于第二个,splice方法删除第二个\n arr.splice(j, 1);\n j--;\n }\n }\n }\n return arr;\n },\n //附件管理删除\n handleEnclosureDel: function handleEnclosureDel() {\n var _this10 = this;\n this.downLoading = true;\n var ids = this.unique(this.ids);\n // console.log(ids.join(','))\n var strs = ids.join(',');\n basicData.deleteEnclosureManagement(strs).then(function (res) {\n if (res.state) {\n _this10.$message.success('附件删除成功');\n _this10.downLoading = false;\n } else {\n _this10.$message.error('附件删除失败');\n _this10.downLoading = false;\n }\n _this10.getEnclosureData(_this10.sourceId);\n //清空ids\n _this10.ids = [];\n });\n },\n handleSelectionChangeEnclosure: function handleSelectionChangeEnclosure(rows) {\n var _this11 = this;\n rows.forEach(function (item) {\n _this11.ids.push(item.id);\n });\n },\n //附件导出\n downLoadImg: function downLoadImg(file) {\n var _this12 = this;\n // console.log(file, 'ddddddddd')\n if (file.id) {\n req.download(window.context.portal + '/bizAccessory/v1/minioDrawingdownFile?ids=' + file.id).then(function (res) {\n _this12.$message.success('下载成功');\n });\n } else {\n this.$message.info('请先保存附件');\n }\n\n // this.downLoading = true\n // const ids = this.unique(this.ids)\n // const strs = ids.join(',')\n // req\n // .download(\n // window.context.portal +\n // '/bizAccessory/v1/minioDrawingdownFile?ids=' +\n // strs\n // )\n // .then(res => {\n // this.downLoading = false\n // this.$refs.multipleTable.clearSelection()\n // this.ids = []\n // })\n },\n //公司赋值\n handleChanged: function handleChanged(obj) {\n // console.log(obj.path)\n //判断是否是选择的施工单位\n if (obj.constructUnitPersonLiable === 'userId') {\n this.companyPathId = obj.path;\n }\n // console.log(obj.valueInfo.join(','))\n this.form.companyIds = JSON.stringify(obj.valueInfo);\n this.form.companyName = obj.name;\n this.form.companyId = obj.id;\n },\n //默认赋值\n value: function value(val) {\n // console.log(val, 'fffffffffffffffffffff')\n this.companyPathId = val;\n },\n //赋值公司员工\n changed: function changed(val) {\n this.form.constructUnitPersonLiable = val;\n },\n //默认赋值\n defaultValue: function defaultValue(val) {\n this.form.constructUnitPersonLiable = val;\n },\n //公司赋值\n handleChangedA: function handleChangedA(obj) {\n // console.log(obj.valueInfo.join(','))\n this.form.designUnitIds = JSON.stringify(obj.valueInfo);\n this.form.designUnit = obj.name;\n this.form.designUnitId = obj.id;\n },\n companyValueA: function companyValueA(obj) {\n // console.log(obj)\n this.form.designUnit = obj.name;\n this.form.designUnitId = obj.id;\n this.form.designUnitIds = JSON.stringify(obj.id.split(' ')); //必须是空格\n },\n //公司赋值\n handleChangedB: function handleChangedB(obj) {\n // console.log(obj.valueInfo.join(','))\n this.form.constructUnitIds = JSON.stringify(obj.valueInfo);\n this.form.constructUnitName = obj.name;\n this.form.constructUnitId = obj.id;\n },\n companyValueB: function companyValueB(obj) {\n // console.log(obj)\n this.form.constructUnitName = obj.name;\n this.form.constructUnitId = obj.id;\n this.form.constructUnitIds = JSON.stringify(obj.id.split(' ')); //必须是空格\n },\n //公司赋值\n handleChangedC: function handleChangedC(obj) {\n // console.log(obj.valueInfo.join(','))\n this.form.supervisorUnitIds = JSON.stringify(obj.valueInfo);\n this.form.supervisorUnit = obj.name;\n this.form.supervisorUnitId = obj.id;\n },\n companyValueC: function companyValueC(obj) {\n // console.log(obj)\n this.form.supervisorUnit = obj.name;\n this.form.supervisorUnitId = obj.id;\n this.form.supervisorUnitIds = JSON.stringify(obj.id.split(' ')); //必须是空格\n },\n handleExport: function handleExport(bool) {\n this.controlUrl = bool;\n this.exportDialogVisible = true;\n this.formExport = {\n roadSegmentId: '',\n projectId: '',\n contractId: ''\n };\n this.roadOptions = [];\n this.getRoadInfo();\n },\n getRoadInfo: function getRoadInfo() {\n var _this13 = this;\n basicData.getRoadManagement().then(function (res) {\n if (res.rows.length !== 0) {\n _this13.roadOptions = res.rows;\n }\n });\n },\n handleRoadSegmentChanged: function handleRoadSegmentChanged(id) {\n this.projectOptions = [];\n this.formExport.projectId = '';\n this.getProjectInfo(id);\n },\n handleProjectClick: function handleProjectClick(id) {\n this.contractOptions = [];\n this.formExport.contractId = '';\n this.getByIdContractData(id);\n },\n getProjectInfo: function getProjectInfo(roadSegmentId) {\n var _this14 = this;\n this.projectParams.querys[0].value = roadSegmentId;\n this.$http.post('${yhxt}/bizEngineeringProject/v1/getJson', this.projectParams).then(function (res) {\n _this14.projectOptions = res.data.rows;\n });\n },\n getByIdContractData: function getByIdContractData(id) {\n var _this15 = this;\n this.contractPrams.querys[0].value = id;\n this.$http.post('${yhxt}/bizProjectContract/v1/getJson', this.contractPrams).then(function (res) {\n _this15.contractOptions = res.data.rows;\n });\n },\n handleExportDown: function handleExportDown() {\n var _this16 = this;\n var params = {\n roadSegmentId: this.formExport.roadSegmentId,\n projectId: this.formExport.projectId,\n projectContractId: this.formExport.contractId\n };\n this.$refs.exportRef.validate(function (valid) {\n if (valid) {\n var url;\n if (_this16.controlUrl) {\n url = '/measurement/payment/v1/export/collect';\n } else {\n url = '/measurement/payment/v1/export/construction';\n }\n req.downloadPost(window.context.portal + url, params).then(function (res) {});\n }\n });\n },\n handleExportView: function handleExportView() {\n var _this17 = this;\n var params = {\n roadSegmentId: this.formExport.roadSegmentId,\n projectId: this.formExport.projectId,\n projectContractId: this.formExport.contractId\n };\n this.$refs.exportRef.validate(function (valid) {\n if (valid) {\n var url;\n if (_this17.controlUrl) {\n url = '/measurement/payment/v1/online/preview/collect';\n } else {\n url = '/measurement/payment/v1/online/preview/construction';\n }\n _this17.$http.post('${yhxt}' + url, params).then(function (res) {\n var url = res.data.value.url;\n window.open(url);\n });\n }\n });\n },\n openProjectName: function openProjectName(val) {\n this.$refs.reference.open(val, this.budgetIds, this.type);\n },\n backData: function backData(data) {\n console.log(data, 'data');\n var sum = 0;\n this.projectList = data.map(function (item) {\n return item.budgetContent;\n });\n var arr1 = data.map(function (item) {\n return item.id;\n });\n data.forEach(function (item) {\n sum += item.totalPrice;\n return sum;\n });\n this.form.projectMoney = sum;\n if (this.form.project == '' || this.form.project == undefined) {\n this.form.project = this.projectList.join(',');\n } else {\n this.form.project = this.projectList.join(',');\n }\n if (this.form.projectName == '' || this.form.projectName == undefined) {\n this.form.projectName = this.projectList.join(',');\n }\n console.log(this.form, 'this.form');\n this.budgetIds = arr1;\n this.$forceUpdate();\n var field = 'project'; // 替换为要清除校验的字段名\n var rules = this.$refs.form.rules;\n if (rules && rules[field]) {\n this.$refs.form.clearValidate(field);\n }\n if (rules && rules.projectMoney) {\n this.$refs.form.clearValidate('projectMoney');\n }\n }\n }\n};",null]}