{"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\\startInfo\\createStart.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\specialProjectManagement\\startInfo\\createStart.vue","mtime":1720808032505},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport _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\nimport { mapState } from 'vuex';\nimport req from '@/request.js';\nimport basicData from '@/api/basicData.js';\nimport { antiShake } from '@/antiShake';\nimport eipOrgSelector from '@/components/eipControl/selector/EipOrgSelector.vue';\nimport EipUserSelector from '@/components/eipControl/selector/EipUserSelector.vue';\nimport ProjectInfoDialog from '@/components/dialog/ProjectInfoDialog.vue';\nimport projectInfoSelector from '@/components/selector/projectInfoSelector.vue';\nimport companyInfoSelector from '@/components/selector/companyInfoSelector.vue';\nimport fileUpload from '@/components/upload/fileUploadProject.vue';\nimport CascaderCompany from '@/components/selector/CascaderCompany.vue';\nimport projectDialog from '@/components/dialog/projectDialog.vue';\nimport processRecord from \"../flowComponents/processRecord.vue\";\nimport RectificationData from \"../flowComponents/RectificationData.vue\";\nimport RectificationTable from \"../flowComponents/RectificationTable.vue\";\nimport { flowStatus } from \"../mixins/flowStatus\";\nimport processApproval from \"../flowComponents/processApproval.vue\";\nexport default {\n name: 'createStart',\n mixins: [flowStatus],\n components: {\n // eipOrgSelector,\n ProjectInfoDialog: ProjectInfoDialog,\n EipUserSelector: EipUserSelector,\n // projectInfoSelector,\n // companyInfoSelector,\n fileUpload: fileUpload,\n CascaderCompany: CascaderCompany,\n projectDialog: projectDialog,\n processRecord: processRecord,\n RectificationData: RectificationData,\n RectificationTable: RectificationTable,\n processApproval: processApproval\n },\n data: function data() {\n return {\n years: '',\n optionYears: [],\n //顶部搜索年份选择数组\n roadData: [],\n fullscreenLoading: false,\n accessories: [],\n dadToSon: {\n bizPath: 'specialproject',\n fileList: []\n },\n visible: false,\n saving: false,\n hackReset: false,\n company: [],\n searchForm: {},\n companyOptions: [],\n dataBaseOptions: {\n dataBaseId: '',\n tableName: 'biz_project_begin_apply_for',\n // 必填\n tableSchema: ''\n },\n originAPIOptions: {\n url: '/bizProjectBeginApplyFor/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 dialogVisible: false,\n dialogVisibleEnclosure: false,\n //判断是否是添加还是修改\n type: '',\n approveLog: {\n // userName: '',\n // userId: '',\n // userAccount: '',\n type: '1',\n status: '',\n rejectReason: '',\n id: ''\n },\n form: {\n // confirmStatus: 0, //审核状态通过,2是未通过\n projectName: '',\n projectId: '',\n projectCategory: 1,\n //项目类型\n accessories: [],\n projectNature: 1,\n //工程属性\n startupTime: ''\n // confirmStatus: 1,\n },\n\n formExamine: {\n confirmStatus: 1 //审核状态通过,2是未通过\n },\n\n disabledSave: false,\n isShow: false,\n //是否显示审核操作\n permission: 'b',\n disabled: false,\n //附件数据\n enclosureData: [],\n //附件管理所需id\n sourceId: '',\n //删除附件管理ids\n ids: [],\n loading: false,\n //上传附件加载控制\n disabledBtn: 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 roadSegmentOptions: [],\n //路段下拉框数据\n projectOptions: [],\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 loadingDialog: false,\n dataReady: false,\n paramsRules: {\n userName: {\n required: true,\n message: '请选择审核人',\n trigger: 'blur'\n }\n },\n rules: {\n roadSegmentId: {\n required: true,\n message: '请选择路段名称',\n trigger: 'change'\n },\n projectId: {\n required: true,\n message: '请选择项目名称',\n trigger: 'change'\n },\n projectName: {\n required: true,\n message: '请选择项目名称',\n trigger: 'change'\n },\n companyName: {\n required: true,\n message: '必填',\n trigger: 'blur'\n },\n applyUserName: {\n required: true,\n message: '必填',\n trigger: 'blur'\n },\n startupTime: {\n required: true,\n message: '请选择开工时间',\n trigger: 'blur'\n },\n accessories: {\n required: true,\n message: '请上传附件',\n trigger: 'change'\n },\n confirmUserName: {\n required: true,\n message: '必填',\n trigger: 'blur'\n },\n managementApproveId: {\n required: true,\n message: '必填',\n trigger: 'blur'\n }\n },\n statusOptions: [{\n label: '发起',\n value: 1\n }, {\n label: '管理中心发起整改',\n value: 2\n }, {\n label: '已整改',\n value: 3\n }, {\n label: '分公司待确认',\n value: 4\n }, {\n label: '分公司发起整改',\n value: 5\n }, {\n label: '完成',\n value: 6\n }],\n rowData: {},\n managementApproveUsers: [],\n // 管理中心审核人\n operationApproveUsers: [],\n // 分公司审核人\n readyForDefaultParams: false\n };\n },\n mounted: function mounted() {\n // ht-table 组件会在created时默认执行一次查询\n // 为了添加上级页面携带的查询参数,这里在参数获取到以后再渲染ht-table组件\n if (this.$route.params) {\n this.searchForm.projectName = this.$route.params.projectName || '';\n this.searchForm.projectId = this.$route.params.id || '';\n this.searchForm.startupTime = this.$route.params.year || new Date().getFullYear();\n }\n this.readyForDefaultParams = true;\n },\n beforeDestroy: function beforeDestroy() {\n this.$EventBus.$off('route');\n },\n created: function created() {\n this.company = this.getCompany();\n this.getRoadSegmentData(); //获取路段数据\n this.roadData = this.getroad();\n this.getManagementApproveUsers();\n this.getOperationApproveUsers();\n this.getYear();\n this.init();\n console.log('created', this.searchForm);\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 return window.context.yhxt + '/bizProjectBeginApplyFor/v1/updateBeginApplyFor';\n },\n headers: function headers(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n methods: {\n //初始化年份\n init: function init() {\n var myDate = new Date();\n var year = myDate.getFullYear(); //获取当前年\n this.initSelectYear(year);\n this.searchForm.startupTime = 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 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 // 获取管理中心审核人数据列表\n getManagementApproveUsers: function getManagementApproveUsers() {\n var _this = this;\n this.$http.get('${yhxt}/bizRectificationCommon/v1/users/getManagementApproveUsers').then(function (res) {\n _this.managementApproveUsers = res.data;\n });\n },\n // handleManagementApprove(id) {\n // this.managementApproveUsers.forEach((item) => {\n // if (item.id === id) {\n // this.form.managementApproveAccount = item.account\n // this.form.managementApproveName = item.fullname\n // }\n // })\n // },\n // 获取分公司审核人数据列表\n getOperationApproveUsers: function getOperationApproveUsers() {\n var _this2 = this;\n this.$http.get('${yhxt}/bizRectificationCommon/v1/users/getOperationApproveUsers').then(function (res) {\n _this2.operationApproveUsers = res.data;\n });\n },\n // handleOperationId(id) {\n // this.operationApproveUsers.forEach((item) => {\n // if (item.id === id) {\n // this.form.operationAccount = item.account\n // this.form.operationName = item.fullname\n // }\n // })\n // },\n getroad: function getroad() {\n var arr = [];\n basicData.getRoadManagement().then(function (res) {\n res.rows.forEach(function (item) {\n arr.push({\n value: item.name,\n key: item.id\n });\n });\n console.log(arr, '12');\n });\n return arr;\n },\n handleProjectChanged: function handleProjectChanged(id) {\n var _this3 = this;\n this.projectOptions.forEach(function (item) {\n if (item.id === id) {\n _this3.form.projectName = item.projectName;\n }\n });\n },\n getProjectInfo: function getProjectInfo(roadSegmentId) {\n var _this4 = this;\n this.projectParams.querys[0].value = roadSegmentId;\n this.$http.post('${yhxt}/bizEngineeringProject/v1/getJson', this.projectParams).then(function (res) {\n _this4.projectOptions = res.data.rows;\n });\n },\n getRoadSegmentData: function getRoadSegmentData() {\n var _this5 = this;\n basicData.getRoadManagement().then(function (res) {\n if (res.rows.length !== 0) {\n _this5.roadSegmentOptions = res.rows;\n }\n });\n },\n handleRoadSegmentChanged: function handleRoadSegmentChanged(id) {\n if (!id) return;\n var target = this.roadSegmentOptions.filter(function (item) {\n return item.id == id;\n })[0];\n if (target) {\n this.form = _objectSpread(_objectSpread({}, this.form), {}, {\n companyName: target.companyName,\n companyId: target.companyId,\n roadSegmentName: target.name,\n roadSegmentId: id,\n projectId: '',\n projectName: ''\n });\n this.projectOptions = [];\n this.getProjectInfo(id);\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.form.clearValidate('accessories');\n }\n },\n afterDelete: function afterDelete() {\n this.$refs.htTable.load();\n },\n //新增\n handleAdd: function handleAdd() {\n this.projectOptions = [];\n var myDate = new Date();\n var date = myDate.toLocaleDateString(); // 获取当前登录用户名\n var currentUser = JSON.parse(window.sessionStorage.getItem('currentUser'));\n this.form = {\n startupTime: '',\n applyUserName: currentUser.username,\n applyUserId: currentUser.userId,\n confirmUserName: currentUser.username,\n confirmUserId: currentUser.userId,\n accessories: []\n // confirmStatus: 1,\n };\n\n this.permission = 'b';\n this.disabledSave = false;\n this.dialogVisible = true;\n this.type = 'add';\n\n /* 添加时默认填写项目管理选中数据的第一条 */\n // let obj = JSON.parse(sessionStorage.getItem('projectRow'))\n // if (!obj) return\n var data = this.$route.params;\n var obj = {};\n if (data.id) {\n obj = {\n roadSegmentId: data.roadSegmentId,\n roadSegmentName: data.roadSegmentName,\n projectId: data.id,\n projectName: data.projectName\n };\n }\n this.form = _objectSpread(_objectSpread({}, this.form), obj);\n this.dataReady = true;\n this.handleRoadSegmentChanged(this.form.roadSegmentId);\n },\n //修改\n handleEdit: function handleEdit(data) {\n var _this6 = this;\n this.getProjectInfo(data.roadSegmentId);\n this.permission = 'b';\n this.type = data.status == 0 ? 'edit' : 'detail';\n this.dialogVisible = true;\n this.loadingDialog = true;\n setTimeout(function () {\n _this6.$refs.rectificationTable && _this6.$refs.rectificationTable.handleOpen(data);\n }, 500);\n this.$http.get('${form}/bizProjectBeginApplyFor/v1/getVo/' + data.id).then(function (res) {\n var accessories = res.data.bizEngineeringAccessoriesList || [];\n _this6.form = _objectSpread(_objectSpread({}, res.data.bizProjectBeginApplyFor), {}, {\n accessories: accessories\n });\n res.data.bizEngineeringAccessoriesList.forEach(function (item) {\n item.url = item.attachmentPath;\n item.name = item.attachmentName;\n });\n _this6.dadToSon.fileList = res.data.bizEngineeringAccessoriesList;\n _this6.loadingDialog = false;\n _this6.dataReady = true;\n });\n // this.disabledSave = false\n // let form = {\n // confirmStatus: 0, //审核状态通过,2是未通过\n // projectName: '',\n // projectId: '',\n // projectCategory: 1, //项目类型\n // projectNature: 1 //工程属性\n // }\n // this.type = 'edit'\n // this.sourceId = data.id\n // this.dialogVisible = true\n // this.form = data\n // this.form = {...form, ...data}\n },\n handleClose: function handleClose(done) {\n //清空表单\n this.form = {\n // confirmStatus: 0, //审核状态通过,2是未通过\n projectName: '',\n projectId: '',\n projectCategory: 1,\n //项目类型\n projectNature: 1 //工程属性\n };\n\n this.isShow = false;\n this.disabled = false;\n this.dadToSon = {\n fileList: []\n };\n done();\n },\n //取消弹窗\n handleCancel: function handleCancel() {\n //清空表单\n this.form = {\n // confirmStatus: 0, //审核状态通过,2是未通过\n projectName: '',\n projectId: '',\n projectCategory: 1,\n //项目类型\n projectNature: 1 //工程属性\n };\n\n this.dadToSon = {\n fileList: []\n };\n this.dialogVisible = false;\n this.isShow = false;\n this.disabled = false;\n this.dataReady = false;\n },\n //提交保存或者修改\n handleSubmit: function handleSubmit() {\n var _this7 = this;\n var startFlow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n console.log(this.form);\n //验证表单是否填写完\n this.$refs.form.validate(function (bool) {\n if (bool) {\n _this7.disabledSave = true;\n _this7.fullscreenLoading = true;\n // this.dialogVisible = false\n\n var data = {\n bizEngineeringAccessoriesList: _this7.accessories,\n bizProjectBeginApplyFor: _this7.form\n };\n //请求保存提交\n Reflect.deleteProperty(_this7.form, 'accessories');\n basicData.addStartInfo(data).then(function (res) {\n //请求附件管理\n if (res.state) {\n _this7.$message.success(res.message);\n if (startFlow) {\n // todo同步发起流程 这里需要接口返回保存后的id,\n _this7.$refs.processApproval.handleOpen(res.value, true, 1); // 1 开工\n } else {\n _this7.dialogVisible = false;\n _this7.fullscreenLoading = false;\n _this7.$refs.htTable.load();\n _this7.dataReady = false;\n }\n } else {\n _this7.$message.error(res.message);\n }\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 companyId: ['1419863231459102720'],\n projectNature: '',\n projectName: '',\n roadSegmentId: '',\n status: '',\n startupTime: ''\n });\n this.findinfo();\n },\n findinfo: function findinfo() {\n var _this8 = this;\n typeof this.$refs.filterTable !== 'undefined' && this.$refs.filterTable.clearFilter();\n var query = [];\n var search = {\n company_id_: this.searchForm.companyIds,\n projectName: this.searchForm.projectName,\n projectNature: this.searchForm.projectNature,\n road_segment_id_: this.searchForm.roadSegmentId,\n status: this.searchForm.status,\n startupTime: this.searchForm.startupTime\n };\n for (var i in search) {\n if (search[i]) {\n if (i == 'company_id_') {\n query.push({\n group: 'companyIds',\n operation: 'IN',\n parentGroup: '',\n property: 'companyId',\n relation: 'AND',\n value: search[i]\n });\n } else if (i == 'status') {\n query.push({\n group: 'advance',\n operation: 'IN',\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: 1,\n pageSize: 20,\n showTotal: true\n },\n querys: query,\n sorter: [{\n direction: 'DESC',\n property: 'create_time_'\n }]\n };\n this.topQuery = query;\n basicData.getStartInfo(data).then(function (res) {\n console.log(res, '11');\n _this8.data = res.rows;\n _this8.pageResult = {\n page: res.page,\n pageSize: res.pageSize,\n total: res.total\n };\n });\n },\n getCompany: function getCompany() {\n var _this9 = this;\n this.$http.post('${yhxt}/Company/v1/getCompany').then(function (res) {\n res.data.forEach(function (item) {\n _this9.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 _this10 = this;\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 if (this.searchForm.projectId) {\n param.querys = [{\n group: 'defaultQuerys',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'projectId',\n relation: 'AND',\n value: this.searchForm.projectId\n }, {\n group: 'defaultQuerys',\n operation: 'LIKE',\n parentGroup: '',\n property: 'startupTime',\n relation: 'AND',\n value: this.searchForm.startupTime\n }];\n } else {\n param.querys = [{\n group: 'defaultQuerys',\n operation: 'LIKE',\n parentGroup: '',\n property: 'startupTime',\n relation: 'AND',\n value: new Date().getFullYear()\n }];\n }\n this.exportQuery = param;\n console.log(param, 'param');\n this.$http.post('${form}/bizProjectBeginApplyFor/v1/getJson', param).then(function (response) {\n console.log(response);\n response.data.rows.forEach(function (item, index) {\n item.indexNo = index + 1;\n });\n _this10.data = response.data.rows;\n _this10.pageResult = {\n page: response.data.page,\n pageSize: response.data.pageSize,\n total: response.data.total\n };\n }).finally(function () {\n if (cb) {\n cb();\n }\n });\n },\n //审核\n handleExamine: function handleExamine(data) {\n this.permission = 'r';\n this.isShow = true;\n this.disabled = true;\n this.type = 'examine';\n this.dialogVisible = true;\n this.form = data;\n this.formExamine.id = data.id;\n },\n //附件管理\n handleEnclosure: function handleEnclosure() {\n var _this11 = this;\n this.$refs.form.validate(function (bool) {\n // this.dialogVisibleEnclosure = true\n if (bool) {\n if (_this11.type === 'edit') {\n _this11.dialogVisibleEnclosure = true;\n _this11.getEnclosureData(_this11.sourceId);\n } else {\n _this11.$message.error('请先保存该表单才能进入附件管理');\n }\n } else {\n _this11.$message.error('请先保存该表单才能进入附件管理');\n }\n });\n },\n getEnclosureData: function getEnclosureData(id) {\n var _this12 = 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.getSpecialProjectManagement(3, params).then(function (res) {\n _this12.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 _this13 = this;\n this.downLoading = true;\n var ids = this.unique(this.ids);\n // console.log(ids.join(','))\n var strs = ids.join(',');\n basicData.deleteSpecialProjectManagement(strs).then(function (res) {\n if (res.state) {\n _this13.$message.success('附件删除成功');\n _this13.downLoading = false;\n } else {\n _this13.$message.error('附件删除失败');\n _this13.downLoading = false;\n }\n _this13.getEnclosureData(_this13.sourceId);\n //清空ids\n _this13.ids = [];\n });\n },\n handleSelectionChangeEnclosure: function handleSelectionChangeEnclosure(rows) {\n var _this14 = this;\n rows.forEach(function (item) {\n _this14.ids.push(item.id);\n });\n },\n //附件导出\n downLoadImg: function downLoadImg() {\n var _this15 = this;\n this.downLoading = true;\n var ids = this.unique(this.ids);\n var strs = ids.join(',');\n req.download(window.context.portal + '/bizAccessory/v1/minioDrawingdownFile?ids=' + strs).then(function (res) {\n _this15.downLoading = false;\n _this15.$refs.multipleTable.clearSelection();\n _this15.ids = [];\n });\n },\n //所属项目\n handleFocusProject: function handleFocusProject() {\n this.$refs.project.open();\n },\n openProject: function openProject() {\n this.$refs.project.open();\n },\n handleSelectProject: function handleSelectProject(data) {\n console.log(data);\n this.form.projectType = data.projectType;\n this.form.projectNature = data.projectNature;\n this.form.projectName = data.projectName;\n this.form.projectId = data.projectId;\n this.$refs.projectName.focus();\n this.$refs.projectName.blur();\n },\n //信息赋值\n changedProject: function changedProject(obj) {\n this.form.projectName = obj.projectName;\n this.form.projectId = obj.id;\n },\n valueProject: function valueProject(obj) {\n console.log(obj);\n this.form.projectName = obj.projectName;\n this.form.projectId = obj.id;\n },\n openProjectName: function openProjectName(val) {\n if (this.type == 'detail') return;\n this.$refs.reference.open(val);\n },\n backData: function backData(data) {\n console.log(data, 'data');\n this.form.projectId = data[0].id;\n this.form.projectName = data[0].projectName;\n this.$forceUpdate();\n var field = 'projectName'; // 替换为要清除校验的字段名\n var rules = this.$refs.form.rules;\n if (rules && rules[field]) {\n this.$refs.form.clearValidate(field);\n }\n },\n // 流程\n handleCommand: function handleCommand(params) {\n var _this16 = this;\n if (params.command == 'handleDetail') {\n this.handleEdit(params.row);\n } else if (params.command == 'handleDelete') {\n this.$confirm('确定删除吗?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this16.$http.remove('${yhxt}/bizProjectBeginApplyFor/v1/updateBeginApplyFor?ids=' + params.row.id).then(function (res) {\n _this16.$refs.htTable.load();\n if (res.state) {\n _this16.$message({\n message: '删除成功',\n type: 'success'\n });\n }\n });\n });\n } else if (params.command == 'processRecord') {\n this.$refs.processRecord.handleOpen(params.row);\n } else if (params.command == 'initiateReview') {\n this.$refs.processApproval.handleOpen(params.row, true, 1); // 1 开工\n } else if (params.command == 'rectification') {\n this.rowData = params.row;\n // 原来为发起整改\n // this.$refs.RectificationData.handleOpen(params.row, 1)\n\n // 2024年2月22日之后期修改为更改为调用接口修改状态,后端接口开发中\n this.$confirm('确认再次提交吗?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n var data = {\n id: params.row.id,\n status: 1,\n type: 1 // 0质量 1开工 2安全 3验收\n };\n\n _this16.fullscreenLoading = true;\n _this16.$http.post('${yhxt}/bizRectificationCommon/v1/commit/status', data).then(function (res) {\n _this16.$message({\n type: 'success',\n message: '提交成功!'\n });\n _this16.fullscreenLoading = false;\n _this16.$refs.htTable.load();\n });\n });\n } else if (params.command == 'export') {\n this.rowData = params.row;\n var url = '${form}/bizProjectBeginApplyFor/v1/detail/export/' + this.rowData.id;\n req.downloadGet(url);\n }\n },\n saveReview: function saveReview() {\n var _this17 = this;\n console.log(this.approveLog, 'wwwwww');\n this.$refs.approveLog.validate(function (pass) {\n if (pass) {\n _this17.saving = true;\n _this17.$http.post('${yhxt}/bizRectificationCommon/v1/approve', _this17.approveLog).then(function (res) {\n if (res.data.state) {\n _this17.$message.success(res.data.message);\n }\n _this17.saving = false;\n _this17.dialogClose();\n _this17.$refs.htTable.load();\n });\n }\n });\n },\n dialogClose: function dialogClose() {\n this.approveLog = {\n userName: '',\n userId: '',\n userAccount: '',\n type: '1',\n status: '',\n rejectReason: '',\n id: ''\n };\n this.visible = false;\n },\n reload: function reload() {\n var _this18 = this;\n setTimeout(function () {\n _this18.$refs.htTable.load();\n }, 100);\n },\n // 返回上一页面\n clickBack: function clickBack() {\n var form = this.$route.params;\n this.$EventBus.$emit('route', JSON.stringify(form));\n this.$router.go(-1);\n }\n }\n};",null]}